@digital-b2c/coreui-kit 0.21.10 → 0.22.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/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
@@ -1422,6 +1422,7 @@ var PracticeCard = ({ className, title, cta, image }) => {
1422
1422
  var ResourceCardItem_module_default = {
1423
1423
  cardLink: "ResourceCardItem_module_cardLink",
1424
1424
  "global-search": "ResourceCardItem_module_global-search",
1425
+ cardLinkOverlay: "ResourceCardItem_module_cardLinkOverlay",
1425
1426
  cardGrid: "ResourceCardItem_module_cardGrid",
1426
1427
  restricted: "ResourceCardItem_module_restricted",
1427
1428
  cardBody: "ResourceCardItem_module_cardBody",
@@ -1460,6 +1461,7 @@ var ResourceCardItem = ({ item, view, variant, renderLink }) => {
1460
1461
  })
1461
1462
  ) : null;
1462
1463
  const linkWrapper = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("a", __spreadProps(__spreadValues({}, linkProps), { tabIndex: isGlobalSearchVariant ? -1 : 0, className: clsx52__default.default(ResourceCardItem_module_default.cardLink), children }));
1464
+ const cardLinkOverlay = linkProps && !isGlobalSearchVariant ? /* @__PURE__ */ jsxRuntime.jsx("a", __spreadProps(__spreadValues({}, linkProps), { tabIndex: -1, className: ResourceCardItem_module_default.cardLinkOverlay })) : null;
1463
1465
  function getIcon() {
1464
1466
  switch (item.type) {
1465
1467
  case "pdf":
@@ -1485,6 +1487,7 @@ var ResourceCardItem = ({ item, view, variant, renderLink }) => {
1485
1487
  "aria-describedby": isRestricted ? `restricted-${item.id}` : void 0,
1486
1488
  children: [
1487
1489
  cardLink,
1490
+ cardLinkOverlay,
1488
1491
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardBody, children: [
1489
1492
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1490
1493
  /* @__PURE__ */ jsxRuntime.jsx(ConditionalWrapper, { condition: hasHref, wrapper: linkWrapper, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardIconTitle, children: [
@@ -1506,6 +1509,7 @@ var ResourceCardItem = ({ item, view, variant, renderLink }) => {
1506
1509
  );
1507
1510
  }
1508
1511
  return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: ResourceCardItem_module_default.cardList, children: [
1512
+ cardLinkOverlay,
1509
1513
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ResourceCardItem_module_default.cardListLeft, children: [
1510
1514
  item.hasNotification && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.notificationDot, "aria-label": "New" }),
1511
1515
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: ResourceCardItem_module_default.cardDate, children: item.date })
@@ -3470,8 +3474,10 @@ var MiniSectionCta_module_default = {
3470
3474
  infoCallout: "MiniSectionCta_module_infoCallout",
3471
3475
  subtitle: "MiniSectionCta_module_subtitle",
3472
3476
  miniTextCenterCta: "MiniSectionCta_module_miniTextCenterCta",
3477
+ bgGradientGrey: "MiniSectionCta_module_bgGradientGrey",
3473
3478
  light: "MiniSectionCta_module_light",
3474
3479
  gray: "MiniSectionCta_module_gray",
3480
+ gradientGrey: "MiniSectionCta_module_gradientGrey",
3475
3481
  dark: "MiniSectionCta_module_dark",
3476
3482
  cta: "MiniSectionCta_module_cta",
3477
3483
  BgColorGrey: "MiniSectionCta_module_BgColorGrey"
@@ -3500,6 +3506,7 @@ var MiniSectionCta = ({
3500
3506
  className: clsx52__default.default(MiniSectionCta_module_default.miniSectionCta, MiniSectionCta_module_default[variant], theme && MiniSectionCta_module_default[theme], className),
3501
3507
  style: __spreadValues({}, hasModuleStyles && {
3502
3508
  "--custom-background-color": moduleStyles.backgroundColor,
3509
+ "--custom-mobile-background-color": moduleStyles.mobileBackgroundColor,
3503
3510
  "--custom-color": moduleStyles.color
3504
3511
  }),
3505
3512
  children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniSectionCta_module_default.wrapper, children: [
@@ -3519,7 +3526,7 @@ var MiniSectionCta = ({
3519
3526
  className: MiniSectionCta_module_default.cta,
3520
3527
  href: cta.url,
3521
3528
  isExternal: cta.isExternal,
3522
- variant: variant === "BgColorBlack" ? "shiny" : "primary",
3529
+ variant: variant === "BgColorBlack" ? "shiny" : variant === "bgGradientGrey" ? "secondary" : "primary",
3523
3530
  icon: variant === "miniTextCenterCta" ? "tiltedRightWhite" : void 0,
3524
3531
  children: cta.label
3525
3532
  }