Skip to content

Commit

Permalink
refactor(esl-carousel): move esl-carousel.utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Aug 16, 2024
1 parent b587f3b commit 5285b1e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/modules/esl-carousel/core/esl-carousel.renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {isEqual} from '../../esl-utils/misc/object';
import {SyntheticEventTarget} from '../../esl-utils/dom';
import {ESLCarouselDirection} from './esl-carousel.types';
import {ESLCarouselSlideEvent} from './esl-carousel.events';
import {indexToDirection, normalize, normalizeIndex, sequence} from './nav/esl-carousel.nav.utils';
import {indexToDirection, normalize, normalizeIndex, sequence} from './esl-carousel.utils';

import type {ESLCarousel} from './esl-carousel';
import type {ESLCarouselSlideEventInit} from './esl-carousel.events';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esl-carousel/core/esl-carousel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {ESLTraversingQuery} from '../../esl-traversing-query/core';
import {ESLMediaRuleList} from '../../esl-media-query/core';
import {ESLResizeObserverTarget} from '../../esl-event-listener/core';

import {normalize, toIndex, canNavigate} from './nav/esl-carousel.nav.utils';
import {normalize, toIndex, canNavigate} from './esl-carousel.utils';

import {ESLCarouselSlide} from './esl-carousel.slide';
import {ESLCarouselRenderer} from './esl-carousel.renderer';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {ESLCarouselDirection} from '../esl-carousel.types';
import {ESLCarouselDirection} from './esl-carousel.types';
import type {
ESLCarouselNavIndex,
ESLCarouselNavInfo,
ESLCarouselSlideTarget,
ESLCarouselState,
ESLCarouselStaticState
} from '../esl-carousel.types';
} from './esl-carousel.types';

/** @returns sign of the value */
export const sign = (value: number): -1 | 1 | 0 => value > 0 ? 1 : value < 0 ? -1 : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {attr, listen, memoize, prop, ready} from '../../../esl-utils/decorators'
import {ESLBaseElement} from '../../../esl-base-element/core';
import {ESLTraversingQuery} from '../../../esl-traversing-query/core';

import {indexToGroup} from '../../core/nav/esl-carousel.nav.utils';
import {indexToGroup} from '../../core/esl-carousel.utils';
import {ESLCarouselChangeEvent, ESLCarouselSlideEvent} from '../../core/esl-carousel.events';

import type {ESLCarousel} from '../../core/esl-carousel';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {normalize} from '../core/nav/esl-carousel.nav.utils';
import {normalize} from '../core/esl-carousel.utils';
import {ESLCarouselRenderer} from '../core/esl-carousel.renderer';
import {ESLDefaultCarouselRenderer} from './esl-carousel.default.renderer';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {normalize, sign} from '../core/nav/esl-carousel.nav.utils';
import {normalize, sign} from '../core/esl-carousel.utils';
import {ESLCarouselRenderer} from '../core/esl-carousel.renderer';

import type {ESLCarouselDirection, ESLCarouselActionParams} from '../core/esl-carousel.types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
indexToGroup,
indexToDirection,
toIndex, canNavigate
} from '../../core/nav/esl-carousel.nav.utils';
} from '../../core/esl-carousel.utils';
import {ESLCarouselDirection} from '../../core/esl-carousel.types';

import type {ESLCarouselSlideTarget, ESLCarouselState} from '../../core/esl-carousel.types';
Expand Down

0 comments on commit 5285b1e

Please sign in to comment.