@crystaldesign/widget-image-carousel 25.11.0-beta.9 → 25.11.0-rc.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.
Files changed (23) hide show
  1. package/build/esm/index.js +330 -84
  2. package/build/types/widget-image-carousel/src/components/ImageList/index.d.ts +2 -3
  3. package/build/types/widget-image-carousel/src/components/ImageList/index.d.ts.map +1 -1
  4. package/build/types/widget-image-carousel/src/components/InfoElement/index.d.ts +9 -0
  5. package/build/types/widget-image-carousel/src/components/InfoElement/index.d.ts.map +1 -0
  6. package/build/types/widget-image-carousel/src/components/OpenConfiguratorButton/index.d.ts +13 -0
  7. package/build/types/widget-image-carousel/src/components/OpenConfiguratorButton/index.d.ts.map +1 -0
  8. package/build/types/widget-image-carousel/src/components/Swiper/index.d.ts +4 -3
  9. package/build/types/widget-image-carousel/src/components/Swiper/index.d.ts.map +1 -1
  10. package/build/types/widget-image-carousel/src/components/index.d.ts.map +1 -1
  11. package/build/types/widget-image-carousel/src/index.d.ts.map +1 -1
  12. package/build/types/widget-image-carousel/src/stories/SimilarProducts/default.stories.d.ts.map +1 -1
  13. package/build/types/widget-image-carousel/src/stories/SimpleProductList/kirchner-prod.stories.d.ts +8 -0
  14. package/build/types/widget-image-carousel/src/stories/SimpleProductList/kirchner-prod.stories.d.ts.map +1 -0
  15. package/build/types/widget-image-carousel/src/stories/SimpleProductList/kirchner-test.stories.d.ts +8 -0
  16. package/build/types/widget-image-carousel/src/stories/SimpleProductList/kirchner-test.stories.d.ts.map +1 -0
  17. package/build/types/widget-image-carousel/src/types/index.d.ts +31 -4
  18. package/build/types/widget-image-carousel/src/types/index.d.ts.map +1 -1
  19. package/build/types/widget-image-carousel/src/useImageCarousel.d.ts +3 -8
  20. package/build/types/widget-image-carousel/src/useImageCarousel.d.ts.map +1 -1
  21. package/build/umd/report.html +1 -1
  22. package/build/umd/widget-image-carousel.umd.min.js +1 -1
  23. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/InfoElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEjD,UAAU,yBAAyB;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAUpE,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface OpenConfiguratorButtonProps {
3
+ settings: {
4
+ enabled: boolean;
5
+ className: string;
6
+ ctaText?: string;
7
+ ctaIcon?: string;
8
+ };
9
+ onClick: () => void;
10
+ }
11
+ export declare const OpenConfiguratorButton: React.FC<OpenConfiguratorButtonProps>;
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/OpenConfiguratorButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,2BAA2B;IACnC,QAAQ,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAWxE,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import React from 'react';
2
2
  import 'swiper/css';
3
3
  import 'swiper/css/navigation';
4
- import { Media } from '@crystaldesign/widget-image-carousel/useImageCarousel';
5
- import { Configuration } from '@crystaldesign/widget-image-carousel/types';
4
+ import { Configuration, Media } from '@crystaldesign/widget-image-carousel/types';
5
+ import { Action } from '@crystaldesign/diva-core';
6
6
  interface SwiperComponentProps {
7
7
  media: Media[];
8
8
  settings: Configuration;
9
- setSelectedProductId: (id: string) => void;
9
+ onClickProduct: (id: string, openComponent?: Action) => void;
10
+ isMobile: boolean;
10
11
  }
11
12
  export declare const SwiperComponent: React.FC<SwiperComponentProps>;
12
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Swiper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,YAAY,CAAC;AACpB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,uDAAuD,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,UAAU,oBAAoB;IAC5B,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;IACxB,oBAAoB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2B1D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Swiper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,YAAY,CAAC;AACpB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAe,KAAK,EAAE,MAAM,4CAA4C,CAAC;AAI/F,OAAO,EAAE,MAAM,EAAe,MAAM,0BAA0B,CAAC;AAE/D,UAAU,oBAAoB;IAC5B,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;IACxB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAuD1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAK9C,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAW9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAsB,MAAM,UAAU,CAAC;AAMlE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAW9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAkB,MAAM,0BAA0B,CAAC;AAG/E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAM5D,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAG/D,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,mBAAmB,CAAC,aAAa,CAGrD,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAkB,MAAM,0BAA0B,CAAC;AAG/E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAO5D,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAG/D,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,mBAAmB,CAAC,aAAa,CAGrD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"default.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/SimilarProducts/default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAqB,MAAM,0BAA0B,CAAC;AAG3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAmBhD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAwCxD,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC"}
1
+ {"version":3,"file":"default.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/SimilarProducts/default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAqB,MAAM,0BAA0B,CAAC;AAG3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAmBhD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC;AA8CxD,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { WithDivaMock } from '@crystaldesign/diva-core';
3
+ import { ImageCarouselProps } from '../../types';
4
+ declare const meta: Meta<WithDivaMock<ImageCarouselProps>>;
5
+ export default meta;
6
+ type Story = StoryObj<WithDivaMock<ImageCarouselProps>>;
7
+ export declare const ImageCarousel: Story;
8
+ //# sourceMappingURL=kirchner-prod.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kirchner-prod.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/SimpleProductList/kirchner-prod.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAqB,MAAM,0BAA0B,CAAC;AAG3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAmBhD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAuFxD,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { WithDivaMock } from '@crystaldesign/diva-core';
3
+ import { ImageCarouselProps } from '../../types';
4
+ declare const meta: Meta<WithDivaMock<ImageCarouselProps>>;
5
+ export default meta;
6
+ type Story = StoryObj<WithDivaMock<ImageCarouselProps>>;
7
+ export declare const ImageCarousel: Story;
8
+ //# sourceMappingURL=kirchner-test.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kirchner-test.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/stories/SimpleProductList/kirchner-test.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAqB,MAAM,0BAA0B,CAAC;AAG3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAmBhD,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC;AA0ExD,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC"}
@@ -1,18 +1,45 @@
1
- import { BaseConfiguration } from '@crystaldesign/widget-library';
1
+ import { Action } from '@crystaldesign/diva-core';
2
+ import { ActionConfig, ActionGroupConfig, BaseConfiguration } from '@crystaldesign/widget-library';
2
3
  import { SwiperProps } from 'swiper/react';
3
4
  export interface ImageCarouselProps {
4
5
  settings: Configuration;
5
- productId: string;
6
+ productIds: string | string[];
6
7
  }
7
8
  export interface Configuration extends BaseConfiguration {
8
- type: 'WALL_MOCKUPS' | 'SIMILAR_PRODUCTS';
9
+ type: 'WALL_MOCKUPS' | 'SIMILAR_PRODUCTS' | 'SIMPLE_PRODUCT_LIST';
9
10
  mediaFunctionType?: string;
10
- description?: string;
11
+ infoElements?: InfoElement[];
11
12
  sliderProp?: SwiperProps;
12
13
  disableScrollToTop?: boolean;
13
14
  sirvProps?: {
14
15
  [data: string]: string;
15
16
  };
16
17
  avoidUsingSwiperOnMobile?: boolean;
18
+ openConfiguratorCta?: {
19
+ enabled: boolean;
20
+ className: string;
21
+ ctaText?: string;
22
+ ctaIcon?: string;
23
+ };
24
+ openComponent?: Action;
25
+ }
26
+ export interface InfoElement {
27
+ type: 'text' | 'cta';
28
+ text?: string;
29
+ className: string;
30
+ action?: ActionConfig | ActionGroupConfig;
31
+ }
32
+ export interface InfoElement {
33
+ type: 'text' | 'cta';
34
+ text?: string;
35
+ className: string;
36
+ action?: ActionConfig | ActionGroupConfig;
37
+ }
38
+ export interface Media {
39
+ url: string;
40
+ infoElements?: {
41
+ [key: string]: string;
42
+ };
43
+ productId: string;
17
44
  }
18
45
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,IAAI,EAAE,cAAc,GAAG,kBAAkB,CAAC;IAC1C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACvC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,IAAI,EAAE,cAAc,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACvC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,mBAAmB,CAAC,EAAE;QACpB,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC;CAC3C;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC;CAC3C;AAED,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IAEZ,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -1,13 +1,8 @@
1
- import { ImageCarouselProps } from './types';
2
- export interface Media {
3
- url: string;
4
- description?: string;
5
- productId: string;
6
- }
7
- export declare function useImageCarousel({ productId, settings }: ImageCarouselProps): {
1
+ import { ImageCarouselProps, Media } from './types';
2
+ export declare function useImageCarousel({ productIds, settings }: ImageCarouselProps): {
8
3
  media: Media[];
9
4
  error: Error | undefined;
10
5
  loading: boolean;
11
- setSelectedProductId: (productId: string) => void;
6
+ onClickProduct: (productId: string) => void;
12
7
  };
13
8
  //# sourceMappingURL=useImageCarousel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useImageCarousel.d.ts","sourceRoot":"","sources":["../../../../src/useImageCarousel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAK7C,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,kBAAkB;;;;sCAa5D,MAAM;EA6JrB"}
1
+ {"version":3,"file":"useImageCarousel.d.ts","sourceRoot":"","sources":["../../../../src/useImageCarousel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAe,KAAK,EAAE,MAAM,SAAS,CAAC;AAMjE,wBAAgB,gBAAgB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,kBAAkB;;;;gCA2B7D,MAAM;EA+MrB"}