@crystaldesign/content-item 24.12.0-beta.2 → 24.12.0-beta.21

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.
@@ -68,8 +68,7 @@ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t
68
68
  var Image = function Image(_ref) {
69
69
  var _ref$item = _ref.item,
70
70
  image = _ref$item.image,
71
- _ref$item$cover = _ref$item.cover,
72
- cover = _ref$item$cover === void 0 ? true : _ref$item$cover,
71
+ cover = _ref$item.cover,
73
72
  style = _ref$item.style,
74
73
  altText = _ref$item.altText;
75
74
  var styles = {};
@@ -92,7 +91,7 @@ var Image = function Image(_ref) {
92
91
 
93
92
  var videoClass = "videoClass-jg-N2";
94
93
  var youtubeThumb = "youtube-thumb-XJDvt";
95
- var css_248z$3 = ".videoClass-jg-N2 {\n width: 100%;\n}\n\n.youtube-thumb-XJDvt {\n background: center / 75% no-repeat url(\"data:image/svg+xml,%3Csvg fill%3D%22%23000000%22 height%3D%22800px%22 width%3D%22800px%22 version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 %09 viewBox%3D%220 0 49 49%22 xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cpath d%3D%22M39.256%2C6.5H9.744C4.371%2C6.5%2C0%2C10.885%2C0%2C16.274v16.451c0%2C5.39%2C4.371%2C9.774%2C9.744%2C9.774h29.512%09%09%09c5.373%2C0%2C9.744-4.385%2C9.744-9.774V16.274C49%2C10.885%2C44.629%2C6.5%2C39.256%2C6.5z M47%2C32.726c0%2C4.287-3.474%2C7.774-7.744%2C7.774H9.744%09%09%09C5.474%2C40.5%2C2%2C37.012%2C2%2C32.726V16.274C2%2C11.988%2C5.474%2C8.5%2C9.744%2C8.5h29.512c4.27%2C0%2C7.744%2C3.488%2C7.744%2C7.774V32.726z%22%2F%3E%09%09%3Cpath d%3D%22M33.36%2C24.138l-13.855-8.115c-0.308-0.18-0.691-0.183-1.002-0.005S18%2C16.527%2C18%2C16.886v16.229%09%09%09c0%2C0.358%2C0.192%2C0.69%2C0.502%2C0.868c0.154%2C0.088%2C0.326%2C0.132%2C0.498%2C0.132c0.175%2C0%2C0.349-0.046%2C0.505-0.137l13.855-8.113%09%09%09c0.306-0.179%2C0.495-0.508%2C0.495-0.863S33.667%2C24.317%2C33.36%2C24.138z M20%2C31.37V18.63l10.876%2C6.371L20%2C31.37z%22%2F%3E%09%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n width: 100%;\n height: 100%;\n}\n";
94
+ var css_248z$3 = ".videoClass-jg-N2 {\n width: 100%;\n max-height: 100%;\n}\n\n.youtube-thumb-XJDvt {\n background: center / 75% no-repeat url(\"data:image/svg+xml,%3Csvg fill%3D%22%23000000%22 height%3D%22800px%22 width%3D%22800px%22 version%3D%221.1%22 id%3D%22Capa_1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 %09 viewBox%3D%220 0 49 49%22 xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%09%3Cg%3E%09%09%3Cpath d%3D%22M39.256%2C6.5H9.744C4.371%2C6.5%2C0%2C10.885%2C0%2C16.274v16.451c0%2C5.39%2C4.371%2C9.774%2C9.744%2C9.774h29.512%09%09%09c5.373%2C0%2C9.744-4.385%2C9.744-9.774V16.274C49%2C10.885%2C44.629%2C6.5%2C39.256%2C6.5z M47%2C32.726c0%2C4.287-3.474%2C7.774-7.744%2C7.774H9.744%09%09%09C5.474%2C40.5%2C2%2C37.012%2C2%2C32.726V16.274C2%2C11.988%2C5.474%2C8.5%2C9.744%2C8.5h29.512c4.27%2C0%2C7.744%2C3.488%2C7.744%2C7.774V32.726z%22%2F%3E%09%09%3Cpath d%3D%22M33.36%2C24.138l-13.855-8.115c-0.308-0.18-0.691-0.183-1.002-0.005S18%2C16.527%2C18%2C16.886v16.229%09%09%09c0%2C0.358%2C0.192%2C0.69%2C0.502%2C0.868c0.154%2C0.088%2C0.326%2C0.132%2C0.498%2C0.132c0.175%2C0%2C0.349-0.046%2C0.505-0.137l13.855-8.113%09%09%09c0.306-0.179%2C0.495-0.508%2C0.495-0.863S33.667%2C24.317%2C33.36%2C24.138z M20%2C31.37V18.63l10.876%2C6.371L20%2C31.37z%22%2F%3E%09%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n width: 100%;\n height: 100%;\n}\n";
96
95
  styleInject(css_248z$3);
97
96
 
98
97
  var Video = function Video(_ref) {
@@ -4,6 +4,6 @@ type Props = {
4
4
  contentItems: ContentItemType[];
5
5
  wrapperStyle?: React.CSSProperties;
6
6
  };
7
- declare const ContentItems: ({ contentItems, wrapperStyle }: Props) => JSX.Element;
7
+ declare const ContentItems: ({ contentItems, wrapperStyle }: Props) => React.JSX.Element;
8
8
  export default ContentItems;
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/ContentItems/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,KAAK,KAAK,GAAG;IAAE,YAAY,EAAE,eAAe,EAAE,CAAC;IAAC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,CAAC;AAErF,QAAA,MAAM,YAAY,mCAAoC,KAAK,gBAU1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/ContentItems/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,KAAK,KAAK,GAAG;IAAE,YAAY,EAAE,eAAe,EAAE,CAAC;IAAC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,CAAC;AAErF,QAAA,MAAM,YAAY,mCAAoC,KAAK,sBAU1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import './styles.css';
2
+ import React from 'react';
2
3
  import { GalleryType } from '../../types';
3
4
  type Props = {
4
5
  item: GalleryType;
5
6
  };
6
- declare const Gallery: ({ item: { content, wrappingStyle } }: Props) => JSX.Element;
7
+ declare const Gallery: ({ item: { content, wrappingStyle } }: Props) => React.JSX.Element;
7
8
  export default Gallery;
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Gallery/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnC,QAAA,MAAM,OAAO,yCAA0C,KAAK,gBA6C3D,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Gallery/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnC,QAAA,MAAM,OAAO,yCAA0C,KAAK,sBA6C3D,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { ImageType } from '../../types';
2
3
  type Props = {
3
4
  item: ImageType;
4
5
  };
5
- declare const Image: ({ item: { image, cover, style, altText } }: Props) => JSX.Element;
6
+ declare const Image: ({ item: { image, cover, style, altText } }: Props) => React.JSX.Element;
6
7
  export default Image;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Image/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,QAAA,MAAM,KAAK,+CAAuD,KAAK,gBAetE,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,QAAA,MAAM,KAAK,+CAAgD,KAAK,sBAe/D,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { RichTextType } from '../../types';
2
3
  type Props = {
3
4
  item: RichTextType;
4
5
  };
5
- declare const RichText: ({ item: { text, style } }: Props) => JSX.Element;
6
+ declare const RichText: ({ item: { text, style } }: Props) => React.JSX.Element;
6
7
  export default RichText;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/RichText/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC;AAEpC,QAAA,MAAM,QAAQ,8BAA+B,KAAK,gBAEjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/RichText/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC;AAEpC,QAAA,MAAM,QAAQ,8BAA+B,KAAK,sBAEjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { TitleType } from '../../types';
2
3
  type Props = {
3
4
  item: TitleType;
4
5
  };
5
- declare const Title: ({ item: { text, style } }: Props) => JSX.Element;
6
+ declare const Title: ({ item: { text, style } }: Props) => React.JSX.Element;
6
7
  export default Title;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Title/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,QAAA,MAAM,KAAK,8BAA+B,KAAK,gBAO9C,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,QAAA,MAAM,KAAK,8BAA+B,KAAK,sBAO9C,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { URLType } from '../../types';
2
3
  type Props = {
3
4
  item: URLType;
4
5
  };
5
- declare const URL: ({ item: { url, icon, text } }: Props) => JSX.Element;
6
+ declare const URL: ({ item: { url, icon, text } }: Props) => React.JSX.Element;
6
7
  export default URL;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/URL/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/B,QAAA,MAAM,GAAG,kCAAmC,KAAK,gBAOhD,CAAC;AAEF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/URL/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/B,QAAA,MAAM,GAAG,kCAAmC,KAAK,sBAOhD,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { VideoType } from '../../types';
2
3
  type Props = {
3
4
  item: VideoType;
4
5
  };
5
- declare const Video: ({ item: { video, thumb } }: Props) => JSX.Element;
6
+ declare const Video: ({ item: { video, thumb } }: Props) => React.JSX.Element;
6
7
  export default Video;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Video/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,QAAA,MAAM,KAAK,+BAAgC,KAAK,gBA2B/C,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Video/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEjC,QAAA,MAAM,KAAK,+BAAgC,KAAK,sBA2B/C,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { WrapperType } from '../../types';
2
3
  type Props = {
3
4
  item: WrapperType;
4
5
  };
5
- declare const Wrapper: ({ item: { style, content } }: Props) => JSX.Element;
6
+ declare const Wrapper: ({ item: { style, content } }: Props) => React.JSX.Element;
6
7
  export default Wrapper;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Wrapper/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnC,QAAA,MAAM,OAAO,iCAAkC,KAAK,gBAQnD,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Components/Wrapper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAEnC,QAAA,MAAM,OAAO,iCAAkC,KAAK,sBAQnD,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { ContentItemType } from '../types';
2
3
  type Props = {
3
4
  item: ContentItemType;
4
5
  };
5
- declare const ContentItem: ({ item }: Props) => JSX.Element;
6
+ declare const ContentItem: ({ item }: Props) => React.JSX.Element;
6
7
  export default ContentItem;
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Components/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAS3C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,WAAW,aAAc,KAAK,gBAkBnC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAS3C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,WAAW,aAAc,KAAK,sBAkBnC,CAAC;AAEF,eAAe,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/content-item",
3
- "version": "24.12.0-beta.2",
3
+ "version": "24.12.0-beta.21",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "storybook": "storybook dev -p 6006",
@@ -14,25 +14,26 @@
14
14
  "@storybook/blocks": "7.0.2",
15
15
  "@storybook/react": "7.0.2",
16
16
  "@storybook/react-webpack5": "7.0.2",
17
- "@storybook/testing-library": "0.0.14-next.2",
18
- "@testing-library/jest-dom": "^5.15.0",
19
- "@testing-library/react": "^12.1.2",
17
+ "@storybook/testing-library": "0.2.2",
18
+ "@testing-library/jest-dom": "^6.5.0",
19
+ "@testing-library/react": "^16.0.1",
20
20
  "@types/classnames": "^2.2.11",
21
- "@types/swiper": "5.4.3",
22
- "classnames": "^2.2.6",
23
- "react": "17.0.2",
24
- "react-dom": "17.0.2",
25
- "storybook": "^7.0.2"
21
+ "@types/swiper": "^6.0.0",
22
+ "react": "18.3.1",
23
+ "react-dom": "18.3.1",
24
+ "storybook": "^7.0.2",
25
+ "webpack": "^5.73.0"
26
26
  },
27
27
  "dependencies": {
28
- "swiper": "^11.1.7"
28
+ "classnames": "^2.5.1",
29
+ "swiper": "^11.1.12"
29
30
  },
30
31
  "peerDependencies": {
31
- "@crystaldesign/diva-core": "23.0.0-authmig.53",
32
- "react": "17.0.2",
33
- "react-dom": "17.0.2"
32
+ "@crystaldesign/diva-core": "*",
33
+ "react": "^18.3.1",
34
+ "react-dom": "^18.3.1"
34
35
  },
35
36
  "module": "build/esm/index.js",
36
37
  "types": "./build/types/content-item/src/index.d.ts",
37
- "gitHead": "c2e12a45a73cd2355f1f406049fee7a7a3e73ca3"
38
+ "gitHead": "cbfb0ed95573dd7cb546ff876312c5e2940f4103"
38
39
  }