@digital-b2c/coreui-kit 0.21.1 → 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
@@ -5915,14 +5915,14 @@ var BrandsTab_module_default = {
5915
5915
  "card-description": "BrandsTab_module_card-description"
5916
5916
  };
5917
5917
  var BrandsTab = (props) => {
5918
- var _a, _b, _c;
5918
+ var _a, _b, _c, _d, _e;
5919
5919
  const { title, subtitle, className, tabs } = props;
5920
5920
  const [activeIndex, setActiveIndex] = React72.useState(0);
5921
5921
  const { is } = useViewPort_default();
5922
5922
  const isTabletBelow = is("tablet", "below");
5923
5923
  const accordionItems = React72.useMemo(() => {
5924
5924
  return (tabs == null ? void 0 : tabs.map((tab, index) => {
5925
- var _a2, _b2, _c2, _d, _e;
5925
+ var _a2, _b2, _c2, _d2, _e2, _f, _g;
5926
5926
  return {
5927
5927
  id: index,
5928
5928
  title: typeof tab.trigger.active === "string" ? tab.trigger.active : /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({}, tab.trigger.active)),
@@ -5956,13 +5956,14 @@ var BrandsTab = (props) => {
5956
5956
  tab.image && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadProps(__spreadValues({}, tab.image), { className: BrandsTab_module_default["card-image"] })),
5957
5957
  /* @__PURE__ */ jsxRuntime.jsx(
5958
5958
  Button,
5959
- {
5959
+ __spreadProps(__spreadValues({
5960
5960
  variant: "secondary",
5961
- className: BrandsTab_module_default["card-cta"],
5962
- logo: (_b2 = tab.cta) == null ? void 0 : _b2.logo,
5963
- title: (_c2 = tab.cta) == null ? void 0 : _c2.label,
5964
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-label": (_d = tab.cta) == null ? void 0 : _d.label, children: (_e = tab.cta) == null ? void 0 : _e.label })
5965
- }
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
+ })
5966
5967
  )
5967
5968
  ]
5968
5969
  }
@@ -6060,12 +6061,13 @@ var BrandsTab = (props) => {
6060
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"] })),
6061
6062
  /* @__PURE__ */ jsxRuntime.jsx(
6062
6063
  Button,
6063
- {
6064
+ __spreadProps(__spreadValues({
6064
6065
  variant: "secondary",
6065
- className: BrandsTab_module_default["card-cta"],
6066
- logo: (_b = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _b.logo,
6067
- children: (_c = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _c.label
6068
- }
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
+ })
6069
6071
  )
6070
6072
  ] })
6071
6073
  ]