@digital-b2c/coreui-kit 0.21.0 → 0.21.2

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/LICENSE.txt CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Luxottica
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Luxottica
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,52 +1,52 @@
1
- # CoreUI Kit
2
-
3
- A React‑based design system and component library.
4
-
5
- ## 🚀 Getting Started
6
-
7
- Install
8
-
9
- ```bash
10
- npm install
11
- ```
12
-
13
- Development
14
-
15
- - Run the build in watch mode
16
-
17
- ```bash
18
- npm run dev
19
- ```
20
-
21
- Start Storybook
22
-
23
- ```bash
24
- npm run storybook
25
- ```
26
-
27
- Run tests
28
-
29
- ```bash
30
- npm test
31
- ```
32
-
33
- Lint/format
34
-
35
- ```bash
36
- npm run lint
37
- ```
38
-
39
- ## 🛠️ Usage
40
-
41
- Import components in other projects:
42
-
43
- ```ts
44
- import '@digital-b2c/coreui-kit/styles.css'
45
-
46
- import { MiniSectionCta } from '@digital-b2c/coreui-kit'
47
-
48
- <MiniSectionCta>
49
- <MiniSectionCta.Title>Header</MiniSectionCta.Title>
50
- <MiniSectionCta.Subtitle>Description</MiniSectionCta.Subtitle>
51
- </MiniSectionCta>
52
- ```
1
+ # CoreUI Kit
2
+
3
+ A React‑based design system and component library.
4
+
5
+ ## 🚀 Getting Started
6
+
7
+ Install
8
+
9
+ ```bash
10
+ npm install
11
+ ```
12
+
13
+ Development
14
+
15
+ - Run the build in watch mode
16
+
17
+ ```bash
18
+ npm run dev
19
+ ```
20
+
21
+ Start Storybook
22
+
23
+ ```bash
24
+ npm run storybook
25
+ ```
26
+
27
+ Run tests
28
+
29
+ ```bash
30
+ npm test
31
+ ```
32
+
33
+ Lint/format
34
+
35
+ ```bash
36
+ npm run lint
37
+ ```
38
+
39
+ ## 🛠️ Usage
40
+
41
+ Import components in other projects:
42
+
43
+ ```ts
44
+ import '@digital-b2c/coreui-kit/styles.css'
45
+
46
+ import { MiniSectionCta } from '@digital-b2c/coreui-kit'
47
+
48
+ <MiniSectionCta>
49
+ <MiniSectionCta.Title>Header</MiniSectionCta.Title>
50
+ <MiniSectionCta.Subtitle>Description</MiniSectionCta.Subtitle>
51
+ </MiniSectionCta>
52
+ ```
package/dist/index.cjs CHANGED
@@ -2441,11 +2441,11 @@ var CardCarousel = ({
2441
2441
  onSnapIndexChange: syncPagination,
2442
2442
  onResize: syncPagination,
2443
2443
  children: cards.map((_d, index) => {
2444
- var _e = _d, { isLocked, className: cardClassName } = _e, card = __objRest(_e, ["isLocked", "className"]);
2444
+ var _e = _d, { isLocked, className: cardClassName, videoUrl } = _e, card = __objRest(_e, ["isLocked", "className", "videoUrl"]);
2445
2445
  var _a2;
2446
2446
  return /* @__PURE__ */ jsxRuntime.jsx(react$1.SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsx(
2447
2447
  Card2,
2448
- __spreadValues({
2448
+ __spreadProps(__spreadValues({
2449
2449
  variant: theme,
2450
2450
  className: clsx52__default.default(CardCarousel_module_default.card, isLocked && CardCarousel_module_default.locked, cardClassName),
2451
2451
  onCtaClick: ((_a2 = card.cta) == null ? void 0 : _a2.url) ? (event) => {
@@ -2453,7 +2453,9 @@ var CardCarousel = ({
2453
2453
  event.preventDefault();
2454
2454
  setActiveVideo((_b2 = (_a3 = card.cta) == null ? void 0 : _a3.url) != null ? _b2 : null);
2455
2455
  } : card.onCtaClick
2456
- }, card)
2456
+ }, card), {
2457
+ cta: videoUrl && card.cta ? __spreadProps(__spreadValues({}, card.cta), { icon: "watchBlack" }) : card.cta
2458
+ })
2457
2459
  ) }, index);
2458
2460
  })
2459
2461
  }
@@ -5913,14 +5915,14 @@ var BrandsTab_module_default = {
5913
5915
  "card-description": "BrandsTab_module_card-description"
5914
5916
  };
5915
5917
  var BrandsTab = (props) => {
5916
- var _a, _b, _c;
5918
+ var _a, _b, _c, _d, _e;
5917
5919
  const { title, subtitle, className, tabs } = props;
5918
5920
  const [activeIndex, setActiveIndex] = React72.useState(0);
5919
5921
  const { is } = useViewPort_default();
5920
5922
  const isTabletBelow = is("tablet", "below");
5921
5923
  const accordionItems = React72.useMemo(() => {
5922
5924
  return (tabs == null ? void 0 : tabs.map((tab, index) => {
5923
- var _a2, _b2, _c2, _d, _e;
5925
+ var _a2, _b2, _c2, _d2, _e2, _f, _g;
5924
5926
  return {
5925
5927
  id: index,
5926
5928
  title: typeof tab.trigger.active === "string" ? tab.trigger.active : /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({}, tab.trigger.active)),
@@ -5954,13 +5956,14 @@ var BrandsTab = (props) => {
5954
5956
  tab.image && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadProps(__spreadValues({}, tab.image), { className: BrandsTab_module_default["card-image"] })),
5955
5957
  /* @__PURE__ */ jsxRuntime.jsx(
5956
5958
  Button,
5957
- {
5959
+ __spreadProps(__spreadValues({
5958
5960
  variant: "secondary",
5959
- className: BrandsTab_module_default["card-cta"],
5960
- logo: (_b2 = tab.cta) == null ? void 0 : _b2.logo,
5961
- title: (_c2 = tab.cta) == null ? void 0 : _c2.label,
5962
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-label": (_d = tab.cta) == null ? void 0 : _d.label, children: (_e = tab.cta) == null ? void 0 : _e.label })
5963
- }
5961
+ className: BrandsTab_module_default["card-cta"]
5962
+ }, (_b2 = tabs == null ? void 0 : tabs[activeIndex]) == null ? void 0 : _b2.cta), {
5963
+ href: (_d2 = (_c2 = tabs == null ? void 0 : tabs[activeIndex]) == null ? void 0 : _c2.cta) == null ? void 0 : _d2.url,
5964
+ title: (_e2 = tab.cta) == null ? void 0 : _e2.label,
5965
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-label": (_f = tab.cta) == null ? void 0 : _f.label, children: (_g = tab.cta) == null ? void 0 : _g.label })
5966
+ })
5964
5967
  )
5965
5968
  ]
5966
5969
  }
@@ -6058,12 +6061,13 @@ var BrandsTab = (props) => {
6058
6061
  (tabs == null ? void 0 : tabs[activeIndex].image) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadProps(__spreadValues({}, tabs == null ? void 0 : tabs[activeIndex].image), { className: BrandsTab_module_default["card-image"] })),
6059
6062
  /* @__PURE__ */ jsxRuntime.jsx(
6060
6063
  Button,
6061
- {
6064
+ __spreadProps(__spreadValues({
6062
6065
  variant: "secondary",
6063
- className: BrandsTab_module_default["card-cta"],
6064
- logo: (_b = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _b.logo,
6065
- children: (_c = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _c.label
6066
- }
6066
+ className: BrandsTab_module_default["card-cta"]
6067
+ }, (_b = tabs == null ? void 0 : tabs[activeIndex]) == null ? void 0 : _b.cta), {
6068
+ href: (_d = (_c = tabs == null ? void 0 : tabs[activeIndex]) == null ? void 0 : _c.cta) == null ? void 0 : _d.url,
6069
+ children: (_e = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _e.label
6070
+ })
6067
6071
  )
6068
6072
  ] })
6069
6073
  ]