@semcore/carousel 3.18.1 → 3.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [3.18.1-prerelease.1] - 2023-11-28
5
+ ## [3.19.0-prerelease.1] - 2023-11-30
6
+
7
+ ### Changed
8
+
9
+ - Version preminor update due to children dependencies update (`@semcore/breakpoints` [1.12.3 ~> 1.13.0]).
10
+
11
+ ## [3.18.1] - 2023-11-28
6
12
 
7
13
  ### Added
8
14
 
@@ -30,22 +30,22 @@ var _logger = _interopRequireDefault(require("@semcore/utils/lib/logger"));
30
30
  var _findComponent = require("@semcore/utils/lib/findComponent");
31
31
  var _breakpoints = require("@semcore/breakpoints");
32
32
  /*__reshadow-styles__:"./style/carousel.shadow.css"*/
33
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SCarousel_nl7ab_gg_{overflow:hidden;outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_nl7ab_gg_,.___SModalContainer_nl7ab_gg_{display:flex;transition:transform var(--duration_nl7ab) ease-in-out}.___SItem_nl7ab_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_nl7ab);border-radius:var(--intergalactic-surface-rounded, 6px);overflow:hidden}.___SItem_nl7ab_gg_.__zoomIn_nl7ab_gg_{cursor:zoom-in}.___SItem_nl7ab_gg_.__zoomOut_nl7ab_gg_{cursor:zoom-out}.___SIndicators_nl7ab_gg_{display:flex;justify-content:center;margin-top:var(--intergalactic-spacing-4x, 16px)}.___SIndicator_nl7ab_gg_{margin:0 calc(.5*var(--intergalactic-spacing-3x, 12px));cursor:pointer;display:block;width:12px;height:12px;border-radius:var(--intergalactic-control-rounded, 6px);background-color:var(--intergalactic-icon-secondary-neutral, #a9abb6);opacity:var(--intergalactic-disabled-opacity, 0.3);-o-object-fit:cover;object-fit:cover;transition:ease-in-out opacity .1s}@media (hover:hover){.___SIndicator_nl7ab_gg_:hover{opacity:calc(2*var(--intergalactic-disabled-opacity, 0.3))}}.___SIndicator_nl7ab_gg_.__active_nl7ab_gg_{opacity:1}.___SIndicator_nl7ab_gg_.__inverted_nl7ab_gg_{background-color:var(--intergalactic-icon-primary-invert, #ffffff)}.___SNext_nl7ab_gg_,.___SPrev_nl7ab_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SPrev_nl7ab_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNext_nl7ab_gg_{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SNext_nl7ab_gg_.__disabled_nl7ab_gg_,.___SPrev_nl7ab_gg_.__disabled_nl7ab_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_nl7ab_gg_{transition:none}}" /*__inner_css_end__*/, "nl7ab_gg_") /*__reshadow_css_end__*/, {
34
- "__SCarousel": "___SCarousel_nl7ab_gg_",
35
- "__SContainer": "___SContainer_nl7ab_gg_",
36
- "--duration": "--duration_nl7ab",
37
- "__SModalContainer": "___SModalContainer_nl7ab_gg_",
38
- "__SItem": "___SItem_nl7ab_gg_",
39
- "--transform": "--transform_nl7ab",
40
- "_zoomIn": "__zoomIn_nl7ab_gg_",
41
- "_zoomOut": "__zoomOut_nl7ab_gg_",
42
- "__SIndicators": "___SIndicators_nl7ab_gg_",
43
- "__SIndicator": "___SIndicator_nl7ab_gg_",
44
- "_active": "__active_nl7ab_gg_",
45
- "_inverted": "__inverted_nl7ab_gg_",
46
- "__SPrev": "___SPrev_nl7ab_gg_",
47
- "__SNext": "___SNext_nl7ab_gg_",
48
- "_disabled": "__disabled_nl7ab_gg_"
33
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SCarousel_72upy_gg_{overflow:hidden;outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_72upy_gg_,.___SModalContainer_72upy_gg_{display:flex;transition:transform var(--duration_72upy) ease-in-out}.___SItem_72upy_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_72upy);border-radius:var(--intergalactic-surface-rounded, 6px);overflow:hidden}.___SItem_72upy_gg_.__zoomIn_72upy_gg_{cursor:zoom-in}.___SItem_72upy_gg_.__zoomOut_72upy_gg_{cursor:zoom-out}.___SIndicators_72upy_gg_{display:flex;justify-content:center;margin-top:var(--intergalactic-spacing-4x, 16px)}.___SIndicator_72upy_gg_{margin:0 calc(.5*var(--intergalactic-spacing-3x, 12px));cursor:pointer;display:block;width:12px;height:12px;border-radius:var(--intergalactic-control-rounded, 6px);background-color:var(--intergalactic-icon-secondary-neutral, #a9abb6);opacity:var(--intergalactic-disabled-opacity, 0.3);-o-object-fit:cover;object-fit:cover;transition:ease-in-out opacity .1s}@media (hover:hover){.___SIndicator_72upy_gg_:hover{opacity:calc(2*var(--intergalactic-disabled-opacity, 0.3))}}.___SIndicator_72upy_gg_.__active_72upy_gg_{opacity:1}.___SIndicator_72upy_gg_.__inverted_72upy_gg_{background-color:var(--intergalactic-icon-primary-invert, #ffffff)}.___SNext_72upy_gg_,.___SPrev_72upy_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SPrev_72upy_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNext_72upy_gg_{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SNext_72upy_gg_.__disabled_72upy_gg_,.___SPrev_72upy_gg_.__disabled_72upy_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_72upy_gg_{transition:none}}" /*__inner_css_end__*/, "72upy_gg_") /*__reshadow_css_end__*/, {
34
+ "__SCarousel": "___SCarousel_72upy_gg_",
35
+ "__SContainer": "___SContainer_72upy_gg_",
36
+ "--duration": "--duration_72upy",
37
+ "__SModalContainer": "___SModalContainer_72upy_gg_",
38
+ "__SItem": "___SItem_72upy_gg_",
39
+ "--transform": "--transform_72upy",
40
+ "_zoomIn": "__zoomIn_72upy_gg_",
41
+ "_zoomOut": "__zoomOut_72upy_gg_",
42
+ "__SIndicators": "___SIndicators_72upy_gg_",
43
+ "__SIndicator": "___SIndicator_72upy_gg_",
44
+ "_active": "__active_72upy_gg_",
45
+ "_inverted": "__inverted_72upy_gg_",
46
+ "__SPrev": "___SPrev_72upy_gg_",
47
+ "__SNext": "___SNext_72upy_gg_",
48
+ "_disabled": "__disabled_72upy_gg_"
49
49
  });
50
50
  var MAP_TRANSFORM = {
51
51
  ArrowLeft: 'left',
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.types.js","names":[],"sources":["../../src/Carousel.types.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\nimport { IRootComponentProps } from '@semcore/core/src';\n\n/** @deprecated */\nexport interface ICarouselProps extends CarouselProps, UnknownProperties {}\nexport type CarouselProps = BoxProps & {\n /** Index active item */\n index?: number;\n /**\n * Index of the active item selected by default\n * @default 0\n */\n defaultIndex?: number;\n /** Called when the selection is changed */\n onIndexChange?: (index: number) => void;\n /** Animation duration\n * @default 300 */\n duration?: number;\n /** Disables infinite items change in the carousel\n * @default false */\n bounded?: boolean;\n /** @ignore */\n step?: number;\n locale?: string;\n /** Enable zoom feature for carousel items */\n zoom?: boolean;\n /** Width for items in zooming modal */\n zoomWidth?: number;\n /** Type of indicators */\n indicators?: 'default' | 'hide' | 'preview';\n};\n\n/** @deprecated */\nexport interface ICarouselContext extends CarouselContext, UnknownProperties {}\nexport type CarouselContext = {\n getContainerProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getIndicatorsProps: PropGetterFn;\n};\n\nexport type CarouselItem = {\n node: HTMLElement;\n};\n\nexport type CarouselItemProps = BoxProps & {\n /** Flag for css cursor\n * @private\n */\n zoomIn?: boolean;\n /** Flag for css cursor\n * @private\n */\n zoomOut?: boolean;\n\n /** Function to add item to list in Carousel\n * @private\n */\n toggleItem?: (item: CarouselItem, toRemove?: boolean) => void;\n\n /** Index of item in carousel */\n index?: number;\n\n uid?: string;\n\n /** Flag - is current item shown now */\n current?: boolean;\n\n /** Handler for show item in modal window\n * @private\n */\n onToggleZoomModal?: () => void;\n\n /** Value for transform item\n * @private\n */\n transform?: number;\n};\n\n/** @deprecated */\nexport interface ICarouselState extends CarouselState, UnknownProperties {}\nexport type CarouselState = {\n isOpenZoom: boolean;\n selectedIndex: number;\n items: CarouselItem[];\n};\n\nexport type CarouselButtonProps = IRootComponentProps &\n BoxProps & {\n label?: string;\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorsProps = IRootComponentProps &\n BoxProps & {\n items?: CarouselItem[];\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorProps = IRootComponentProps &\n Omit<BoxProps, 'position'> & {\n active?: boolean;\n onClick?: () => void;\n inverted?: boolean;\n } & CarouselItem;\n\ndeclare const CarouselType: Intergalactic.Component<\n 'div',\n CarouselProps,\n CarouselContext & CarouselState\n> & {\n Container: Intergalactic.Component<'div', BoxProps>;\n Indicators: Intergalactic.Component<'div', CarouselIndicatorsProps, CarouselState>;\n Indicator: Intergalactic.Component<'div', CarouselIndicatorProps>;\n Item: Intergalactic.Component<'div', CarouselItemProps>;\n Prev: Intergalactic.Component<'div', CarouselButtonProps>;\n Next: Intergalactic.Component<'div', CarouselButtonProps>;\n};\n\nexport default CarouselType;\n"],"mappings":""}
1
+ {"version":3,"file":"Carousel.types.js","names":[],"sources":["../../src/Carousel.types.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic, IRootComponentProps } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ICarouselProps extends CarouselProps, UnknownProperties {}\nexport type CarouselProps = BoxProps & {\n /** Index active item */\n index?: number;\n /**\n * Index of the active item selected by default\n * @default 0\n */\n defaultIndex?: number;\n /** Called when the selection is changed */\n onIndexChange?: (index: number) => void;\n /** Animation duration\n * @default 300 */\n duration?: number;\n /** Disables infinite items change in the carousel\n * @default false */\n bounded?: boolean;\n /** @ignore */\n step?: number;\n locale?: string;\n /** Enable zoom feature for carousel items */\n zoom?: boolean;\n /** Width for items in zooming modal */\n zoomWidth?: number;\n /** Type of indicators */\n indicators?: 'default' | 'hide' | 'preview';\n};\n\n/** @deprecated */\nexport interface ICarouselContext extends CarouselContext, UnknownProperties {}\nexport type CarouselContext = {\n getContainerProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getIndicatorsProps: PropGetterFn;\n};\n\nexport type CarouselItem = {\n node: HTMLElement;\n};\n\nexport type CarouselItemProps = BoxProps & {\n /** Flag for css cursor\n * @private\n */\n zoomIn?: boolean;\n /** Flag for css cursor\n * @private\n */\n zoomOut?: boolean;\n\n /** Function to add item to list in Carousel\n * @private\n */\n toggleItem?: (item: CarouselItem, toRemove?: boolean) => void;\n\n /** Index of item in carousel */\n index?: number;\n\n uid?: string;\n\n /** Flag - is current item shown now */\n current?: boolean;\n\n /** Handler for show item in modal window\n * @private\n */\n onToggleZoomModal?: () => void;\n\n /** Value for transform item\n * @private\n */\n transform?: number;\n};\n\n/** @deprecated */\nexport interface ICarouselState extends CarouselState, UnknownProperties {}\nexport type CarouselState = {\n isOpenZoom: boolean;\n selectedIndex: number;\n items: CarouselItem[];\n};\n\nexport type CarouselButtonProps = IRootComponentProps &\n BoxProps & {\n label?: string;\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorsProps = IRootComponentProps &\n BoxProps & {\n items?: CarouselItem[];\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorProps = IRootComponentProps &\n Omit<BoxProps, 'position'> & {\n active?: boolean;\n onClick?: () => void;\n inverted?: boolean;\n } & CarouselItem;\n\ndeclare const CarouselType: Intergalactic.Component<\n 'div',\n CarouselProps,\n CarouselContext & CarouselState\n> & {\n Container: Intergalactic.Component<'div', BoxProps>;\n Indicators: Intergalactic.Component<'div', CarouselIndicatorsProps, CarouselState>;\n Indicator: Intergalactic.Component<'div', CarouselIndicatorProps>;\n Item: Intergalactic.Component<'div', CarouselItemProps>;\n Prev: Intergalactic.Component<'div', CarouselButtonProps>;\n Next: Intergalactic.Component<'div', CarouselButtonProps>;\n};\n\nexport default CarouselType;\n"],"mappings":""}
@@ -30,22 +30,22 @@ import i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';
30
30
  import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
31
31
  import logger from '@semcore/utils/lib/logger';
32
32
  /*__reshadow-styles__:"./style/carousel.shadow.css"*/
33
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCarousel_nl7ab_gg_{overflow:hidden;outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_nl7ab_gg_,.___SModalContainer_nl7ab_gg_{display:flex;transition:transform var(--duration_nl7ab) ease-in-out}.___SItem_nl7ab_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_nl7ab);border-radius:var(--intergalactic-surface-rounded, 6px);overflow:hidden}.___SItem_nl7ab_gg_.__zoomIn_nl7ab_gg_{cursor:zoom-in}.___SItem_nl7ab_gg_.__zoomOut_nl7ab_gg_{cursor:zoom-out}.___SIndicators_nl7ab_gg_{display:flex;justify-content:center;margin-top:var(--intergalactic-spacing-4x, 16px)}.___SIndicator_nl7ab_gg_{margin:0 calc(.5*var(--intergalactic-spacing-3x, 12px));cursor:pointer;display:block;width:12px;height:12px;border-radius:var(--intergalactic-control-rounded, 6px);background-color:var(--intergalactic-icon-secondary-neutral, #a9abb6);opacity:var(--intergalactic-disabled-opacity, 0.3);-o-object-fit:cover;object-fit:cover;transition:ease-in-out opacity .1s}@media (hover:hover){.___SIndicator_nl7ab_gg_:hover{opacity:calc(2*var(--intergalactic-disabled-opacity, 0.3))}}.___SIndicator_nl7ab_gg_.__active_nl7ab_gg_{opacity:1}.___SIndicator_nl7ab_gg_.__inverted_nl7ab_gg_{background-color:var(--intergalactic-icon-primary-invert, #ffffff)}.___SNext_nl7ab_gg_,.___SPrev_nl7ab_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SPrev_nl7ab_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNext_nl7ab_gg_{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SNext_nl7ab_gg_.__disabled_nl7ab_gg_,.___SPrev_nl7ab_gg_.__disabled_nl7ab_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_nl7ab_gg_{transition:none}}" /*__inner_css_end__*/, "nl7ab_gg_") /*__reshadow_css_end__*/, {
34
- "__SCarousel": "___SCarousel_nl7ab_gg_",
35
- "__SContainer": "___SContainer_nl7ab_gg_",
36
- "--duration": "--duration_nl7ab",
37
- "__SModalContainer": "___SModalContainer_nl7ab_gg_",
38
- "__SItem": "___SItem_nl7ab_gg_",
39
- "--transform": "--transform_nl7ab",
40
- "_zoomIn": "__zoomIn_nl7ab_gg_",
41
- "_zoomOut": "__zoomOut_nl7ab_gg_",
42
- "__SIndicators": "___SIndicators_nl7ab_gg_",
43
- "__SIndicator": "___SIndicator_nl7ab_gg_",
44
- "_active": "__active_nl7ab_gg_",
45
- "_inverted": "__inverted_nl7ab_gg_",
46
- "__SPrev": "___SPrev_nl7ab_gg_",
47
- "__SNext": "___SNext_nl7ab_gg_",
48
- "_disabled": "__disabled_nl7ab_gg_"
33
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCarousel_72upy_gg_{overflow:hidden;outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.___SContainer_72upy_gg_,.___SModalContainer_72upy_gg_{display:flex;transition:transform var(--duration_72upy) ease-in-out}.___SItem_72upy_gg_{flex:0 0 100%;max-width:100%;box-sizing:border-box;transform:var(--transform_72upy);border-radius:var(--intergalactic-surface-rounded, 6px);overflow:hidden}.___SItem_72upy_gg_.__zoomIn_72upy_gg_{cursor:zoom-in}.___SItem_72upy_gg_.__zoomOut_72upy_gg_{cursor:zoom-out}.___SIndicators_72upy_gg_{display:flex;justify-content:center;margin-top:var(--intergalactic-spacing-4x, 16px)}.___SIndicator_72upy_gg_{margin:0 calc(.5*var(--intergalactic-spacing-3x, 12px));cursor:pointer;display:block;width:12px;height:12px;border-radius:var(--intergalactic-control-rounded, 6px);background-color:var(--intergalactic-icon-secondary-neutral, #a9abb6);opacity:var(--intergalactic-disabled-opacity, 0.3);-o-object-fit:cover;object-fit:cover;transition:ease-in-out opacity .1s}@media (hover:hover){.___SIndicator_72upy_gg_:hover{opacity:calc(2*var(--intergalactic-disabled-opacity, 0.3))}}.___SIndicator_72upy_gg_.__active_72upy_gg_{opacity:1}.___SIndicator_72upy_gg_.__inverted_72upy_gg_{background-color:var(--intergalactic-icon-primary-invert, #ffffff)}.___SNext_72upy_gg_,.___SPrev_72upy_gg_{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:var(--intergalactic-icon-primary-neutral, #6c6e79)}.___SPrev_72upy_gg_{margin-right:var(--intergalactic-spacing-2x, 8px)}.___SNext_72upy_gg_{margin-left:var(--intergalactic-spacing-2x, 8px)}.___SNext_72upy_gg_.__disabled_72upy_gg_,.___SPrev_72upy_gg_.__disabled_72upy_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}@media (prefers-reduced-motion){.___SContainer_72upy_gg_{transition:none}}" /*__inner_css_end__*/, "72upy_gg_") /*__reshadow_css_end__*/, {
34
+ "__SCarousel": "___SCarousel_72upy_gg_",
35
+ "__SContainer": "___SContainer_72upy_gg_",
36
+ "--duration": "--duration_72upy",
37
+ "__SModalContainer": "___SModalContainer_72upy_gg_",
38
+ "__SItem": "___SItem_72upy_gg_",
39
+ "--transform": "--transform_72upy",
40
+ "_zoomIn": "__zoomIn_72upy_gg_",
41
+ "_zoomOut": "__zoomOut_72upy_gg_",
42
+ "__SIndicators": "___SIndicators_72upy_gg_",
43
+ "__SIndicator": "___SIndicator_72upy_gg_",
44
+ "_active": "__active_72upy_gg_",
45
+ "_inverted": "__inverted_72upy_gg_",
46
+ "__SPrev": "___SPrev_72upy_gg_",
47
+ "__SNext": "___SNext_72upy_gg_",
48
+ "_disabled": "__disabled_72upy_gg_"
49
49
  });
50
50
  import { findAllComponents } from '@semcore/utils/lib/findComponent';
51
51
  import { createBreakpoints } from '@semcore/breakpoints';
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.types.js","names":[],"sources":["../../src/Carousel.types.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\nimport { IRootComponentProps } from '@semcore/core/src';\n\n/** @deprecated */\nexport interface ICarouselProps extends CarouselProps, UnknownProperties {}\nexport type CarouselProps = BoxProps & {\n /** Index active item */\n index?: number;\n /**\n * Index of the active item selected by default\n * @default 0\n */\n defaultIndex?: number;\n /** Called when the selection is changed */\n onIndexChange?: (index: number) => void;\n /** Animation duration\n * @default 300 */\n duration?: number;\n /** Disables infinite items change in the carousel\n * @default false */\n bounded?: boolean;\n /** @ignore */\n step?: number;\n locale?: string;\n /** Enable zoom feature for carousel items */\n zoom?: boolean;\n /** Width for items in zooming modal */\n zoomWidth?: number;\n /** Type of indicators */\n indicators?: 'default' | 'hide' | 'preview';\n};\n\n/** @deprecated */\nexport interface ICarouselContext extends CarouselContext, UnknownProperties {}\nexport type CarouselContext = {\n getContainerProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getIndicatorsProps: PropGetterFn;\n};\n\nexport type CarouselItem = {\n node: HTMLElement;\n};\n\nexport type CarouselItemProps = BoxProps & {\n /** Flag for css cursor\n * @private\n */\n zoomIn?: boolean;\n /** Flag for css cursor\n * @private\n */\n zoomOut?: boolean;\n\n /** Function to add item to list in Carousel\n * @private\n */\n toggleItem?: (item: CarouselItem, toRemove?: boolean) => void;\n\n /** Index of item in carousel */\n index?: number;\n\n uid?: string;\n\n /** Flag - is current item shown now */\n current?: boolean;\n\n /** Handler for show item in modal window\n * @private\n */\n onToggleZoomModal?: () => void;\n\n /** Value for transform item\n * @private\n */\n transform?: number;\n};\n\n/** @deprecated */\nexport interface ICarouselState extends CarouselState, UnknownProperties {}\nexport type CarouselState = {\n isOpenZoom: boolean;\n selectedIndex: number;\n items: CarouselItem[];\n};\n\nexport type CarouselButtonProps = IRootComponentProps &\n BoxProps & {\n label?: string;\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorsProps = IRootComponentProps &\n BoxProps & {\n items?: CarouselItem[];\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorProps = IRootComponentProps &\n Omit<BoxProps, 'position'> & {\n active?: boolean;\n onClick?: () => void;\n inverted?: boolean;\n } & CarouselItem;\n\ndeclare const CarouselType: Intergalactic.Component<\n 'div',\n CarouselProps,\n CarouselContext & CarouselState\n> & {\n Container: Intergalactic.Component<'div', BoxProps>;\n Indicators: Intergalactic.Component<'div', CarouselIndicatorsProps, CarouselState>;\n Indicator: Intergalactic.Component<'div', CarouselIndicatorProps>;\n Item: Intergalactic.Component<'div', CarouselItemProps>;\n Prev: Intergalactic.Component<'div', CarouselButtonProps>;\n Next: Intergalactic.Component<'div', CarouselButtonProps>;\n};\n\nexport default CarouselType;\n"],"mappings":""}
1
+ {"version":3,"file":"Carousel.types.js","names":[],"sources":["../../src/Carousel.types.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic, IRootComponentProps } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface ICarouselProps extends CarouselProps, UnknownProperties {}\nexport type CarouselProps = BoxProps & {\n /** Index active item */\n index?: number;\n /**\n * Index of the active item selected by default\n * @default 0\n */\n defaultIndex?: number;\n /** Called when the selection is changed */\n onIndexChange?: (index: number) => void;\n /** Animation duration\n * @default 300 */\n duration?: number;\n /** Disables infinite items change in the carousel\n * @default false */\n bounded?: boolean;\n /** @ignore */\n step?: number;\n locale?: string;\n /** Enable zoom feature for carousel items */\n zoom?: boolean;\n /** Width for items in zooming modal */\n zoomWidth?: number;\n /** Type of indicators */\n indicators?: 'default' | 'hide' | 'preview';\n};\n\n/** @deprecated */\nexport interface ICarouselContext extends CarouselContext, UnknownProperties {}\nexport type CarouselContext = {\n getContainerProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getPrevProps: PropGetterFn;\n getNextProps: PropGetterFn;\n getIndicatorsProps: PropGetterFn;\n};\n\nexport type CarouselItem = {\n node: HTMLElement;\n};\n\nexport type CarouselItemProps = BoxProps & {\n /** Flag for css cursor\n * @private\n */\n zoomIn?: boolean;\n /** Flag for css cursor\n * @private\n */\n zoomOut?: boolean;\n\n /** Function to add item to list in Carousel\n * @private\n */\n toggleItem?: (item: CarouselItem, toRemove?: boolean) => void;\n\n /** Index of item in carousel */\n index?: number;\n\n uid?: string;\n\n /** Flag - is current item shown now */\n current?: boolean;\n\n /** Handler for show item in modal window\n * @private\n */\n onToggleZoomModal?: () => void;\n\n /** Value for transform item\n * @private\n */\n transform?: number;\n};\n\n/** @deprecated */\nexport interface ICarouselState extends CarouselState, UnknownProperties {}\nexport type CarouselState = {\n isOpenZoom: boolean;\n selectedIndex: number;\n items: CarouselItem[];\n};\n\nexport type CarouselButtonProps = IRootComponentProps &\n BoxProps & {\n label?: string;\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorsProps = IRootComponentProps &\n BoxProps & {\n items?: CarouselItem[];\n inverted?: boolean;\n };\n\nexport type CarouselIndicatorProps = IRootComponentProps &\n Omit<BoxProps, 'position'> & {\n active?: boolean;\n onClick?: () => void;\n inverted?: boolean;\n } & CarouselItem;\n\ndeclare const CarouselType: Intergalactic.Component<\n 'div',\n CarouselProps,\n CarouselContext & CarouselState\n> & {\n Container: Intergalactic.Component<'div', BoxProps>;\n Indicators: Intergalactic.Component<'div', CarouselIndicatorsProps, CarouselState>;\n Indicator: Intergalactic.Component<'div', CarouselIndicatorProps>;\n Item: Intergalactic.Component<'div', CarouselItemProps>;\n Prev: Intergalactic.Component<'div', CarouselButtonProps>;\n Next: Intergalactic.Component<'div', CarouselButtonProps>;\n};\n\nexport default CarouselType;\n"],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import CarouselType from './Carousel.types';
2
+ declare const Carousel: typeof CarouselType;
3
+ export default Carousel;
@@ -0,0 +1,101 @@
1
+ import { PropGetterFn, UnknownProperties, Intergalactic, IRootComponentProps } from '@semcore/core';
2
+ import { BoxProps } from '@semcore/flex-box';
3
+ /** @deprecated */
4
+ export interface ICarouselProps extends CarouselProps, UnknownProperties {
5
+ }
6
+ export type CarouselProps = BoxProps & {
7
+ /** Index active item */
8
+ index?: number;
9
+ /**
10
+ * Index of the active item selected by default
11
+ * @default 0
12
+ */
13
+ defaultIndex?: number;
14
+ /** Called when the selection is changed */
15
+ onIndexChange?: (index: number) => void;
16
+ /** Animation duration
17
+ * @default 300 */
18
+ duration?: number;
19
+ /** Disables infinite items change in the carousel
20
+ * @default false */
21
+ bounded?: boolean;
22
+ /** @ignore */
23
+ step?: number;
24
+ locale?: string;
25
+ /** Enable zoom feature for carousel items */
26
+ zoom?: boolean;
27
+ /** Width for items in zooming modal */
28
+ zoomWidth?: number;
29
+ /** Type of indicators */
30
+ indicators?: 'default' | 'hide' | 'preview';
31
+ };
32
+ /** @deprecated */
33
+ export interface ICarouselContext extends CarouselContext, UnknownProperties {
34
+ }
35
+ export type CarouselContext = {
36
+ getContainerProps: PropGetterFn;
37
+ getItemProps: PropGetterFn;
38
+ getPrevProps: PropGetterFn;
39
+ getNextProps: PropGetterFn;
40
+ getIndicatorsProps: PropGetterFn;
41
+ };
42
+ export type CarouselItem = {
43
+ node: HTMLElement;
44
+ };
45
+ export type CarouselItemProps = BoxProps & {
46
+ /** Flag for css cursor
47
+ * @private
48
+ */
49
+ zoomIn?: boolean;
50
+ /** Flag for css cursor
51
+ * @private
52
+ */
53
+ zoomOut?: boolean;
54
+ /** Function to add item to list in Carousel
55
+ * @private
56
+ */
57
+ toggleItem?: (item: CarouselItem, toRemove?: boolean) => void;
58
+ /** Index of item in carousel */
59
+ index?: number;
60
+ uid?: string;
61
+ /** Flag - is current item shown now */
62
+ current?: boolean;
63
+ /** Handler for show item in modal window
64
+ * @private
65
+ */
66
+ onToggleZoomModal?: () => void;
67
+ /** Value for transform item
68
+ * @private
69
+ */
70
+ transform?: number;
71
+ };
72
+ /** @deprecated */
73
+ export interface ICarouselState extends CarouselState, UnknownProperties {
74
+ }
75
+ export type CarouselState = {
76
+ isOpenZoom: boolean;
77
+ selectedIndex: number;
78
+ items: CarouselItem[];
79
+ };
80
+ export type CarouselButtonProps = IRootComponentProps & BoxProps & {
81
+ label?: string;
82
+ inverted?: boolean;
83
+ };
84
+ export type CarouselIndicatorsProps = IRootComponentProps & BoxProps & {
85
+ items?: CarouselItem[];
86
+ inverted?: boolean;
87
+ };
88
+ export type CarouselIndicatorProps = IRootComponentProps & Omit<BoxProps, 'position'> & {
89
+ active?: boolean;
90
+ onClick?: () => void;
91
+ inverted?: boolean;
92
+ } & CarouselItem;
93
+ declare const CarouselType: Intergalactic.Component<'div', CarouselProps, CarouselContext & CarouselState> & {
94
+ Container: Intergalactic.Component<'div', BoxProps>;
95
+ Indicators: Intergalactic.Component<'div', CarouselIndicatorsProps, CarouselState>;
96
+ Indicator: Intergalactic.Component<'div', CarouselIndicatorProps>;
97
+ Item: Intergalactic.Component<'div', CarouselItemProps>;
98
+ Prev: Intergalactic.Component<'div', CarouselButtonProps>;
99
+ Next: Intergalactic.Component<'div', CarouselButtonProps>;
100
+ };
101
+ export default CarouselType;
@@ -0,0 +1,2 @@
1
+ export { default } from './Carousel';
2
+ export * from './Carousel.types';
@@ -0,0 +1,58 @@
1
+ export declare const localizedMessages: {
2
+ de: {
3
+ next: string;
4
+ prev: string;
5
+ };
6
+ en: {
7
+ next: string;
8
+ prev: string;
9
+ };
10
+ es: {
11
+ next: string;
12
+ prev: string;
13
+ };
14
+ fr: {
15
+ next: string;
16
+ prev: string;
17
+ };
18
+ it: {
19
+ next: string;
20
+ prev: string;
21
+ };
22
+ ja: {
23
+ next: string;
24
+ prev: string;
25
+ };
26
+ ko: {
27
+ next: string;
28
+ prev: string;
29
+ };
30
+ nl: {
31
+ next: string;
32
+ prev: string;
33
+ };
34
+ pt: {
35
+ next: string;
36
+ prev: string;
37
+ };
38
+ tr: {
39
+ next: string;
40
+ prev: string;
41
+ };
42
+ vi: {
43
+ next: string;
44
+ prev: string;
45
+ };
46
+ zh: {
47
+ next: string;
48
+ prev: string;
49
+ };
50
+ pl: {
51
+ next: string;
52
+ prev: string;
53
+ };
54
+ sv: {
55
+ next: string;
56
+ prev: string;
57
+ };
58
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/carousel",
3
3
  "description": "Semrush Carousel Component",
4
- "version": "3.18.1",
4
+ "version": "3.19.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "@semcore/utils": "4.13.0",
15
15
  "@semcore/button": "5.12.0",
16
16
  "@semcore/modal": "4.19.0",
17
- "@semcore/breakpoints": "1.12.3"
17
+ "@semcore/breakpoints": "1.13.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@semcore/core": "^2.10.0",
@@ -34,6 +34,6 @@
34
34
  "@types/react": "18.0.21"
35
35
  },
36
36
  "scripts": {
37
- "build": "pnpm semcore-builder --source=js"
37
+ "build": "pnpm semcore-builder --source=js,ts"
38
38
  }
39
39
  }
@@ -1,6 +1,5 @@
1
- import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
1
+ import { PropGetterFn, UnknownProperties, Intergalactic, IRootComponentProps } from '@semcore/core';
2
2
  import { BoxProps } from '@semcore/flex-box';
3
- import { IRootComponentProps } from '@semcore/core/src';
4
3
 
5
4
  /** @deprecated */
6
5
  export interface ICarouselProps extends CarouselProps, UnknownProperties {}