@digital-b2c/coreui-kit 0.24.2 → 0.25.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
@@ -1902,7 +1902,14 @@ var NewsCard = ({
1902
1902
  renderLink
1903
1903
  }) => {
1904
1904
  const id = React72.useId();
1905
+ const cardRef = React72.useRef(null);
1905
1906
  const isRestricted = type === "restricted";
1907
+ const handleCtaClick = () => {
1908
+ var _a, _b;
1909
+ if (!isRestricted) {
1910
+ (_b = (_a = cardRef.current) == null ? void 0 : _a.querySelector(".news-card-link")) == null ? void 0 : _b.click();
1911
+ }
1912
+ };
1906
1913
  const linkProps = cta && cta.url ? __spreadProps(__spreadValues({
1907
1914
  href: cta.url,
1908
1915
  target: cta.isExternal ? "_blank" : void 0,
@@ -1918,6 +1925,7 @@ var NewsCard = ({
1918
1925
  return /* @__PURE__ */ jsxRuntime.jsxs(
1919
1926
  "article",
1920
1927
  {
1928
+ ref: cardRef,
1921
1929
  className: clsx65__default.default(
1922
1930
  "news-card",
1923
1931
  NewsCard_module_default["news-card"],
@@ -1953,9 +1961,10 @@ var NewsCard = ({
1953
1961
  variant: "secondary",
1954
1962
  className: clsx65__default.default("news-card-cta", NewsCard_module_default["news-card-cta"]),
1955
1963
  icon: cta.icon,
1964
+ type: "button",
1965
+ onClick: handleCtaClick,
1956
1966
  "aria-hidden": "true",
1957
1967
  tabIndex: -1,
1958
- renderLink: renderLink ? (props) => renderLink(__spreadProps(__spreadValues({}, props), { tabIndex: -1 })) : void 0,
1959
1968
  children: cta.label
1960
1969
  }
1961
1970
  ) })
@@ -6303,6 +6312,39 @@ var PodcastGridCards = ({ title, items, className }) => {
6303
6312
 
6304
6313
  // src/widgets/PodcastGridCards/index.tsx
6305
6314
  var PodcastGridCards2 = Object.assign(PodcastGridCards, {});
6315
+
6316
+ // src/widgets/TextFootnote/TextFootnote.module.scss
6317
+ var TextFootnote_module_default = {
6318
+ textFootnote: "TextFootnote_module_textFootnote",
6319
+ title: "TextFootnote_module_title",
6320
+ body: "TextFootnote_module_body"
6321
+ };
6322
+ var TextFootnoteTitle = ({ children }) => {
6323
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
6324
+ };
6325
+ var TextFootnoteBody = ({ children }) => {
6326
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
6327
+ };
6328
+ var TextFootnote = (props) => {
6329
+ var _a, _b;
6330
+ const { className, body, title, titleAlign = "text-left", children } = props;
6331
+ const slots = resolveCompoundSlots(children, {
6332
+ title: TextFootnoteTitle,
6333
+ body: TextFootnoteBody
6334
+ });
6335
+ const titleNode = (_a = slots.title) != null ? _a : title;
6336
+ const bodyNode = (_b = slots.body) != null ? _b : body;
6337
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx65__default.default(TextFootnote_module_default.textFootnote, className), children: [
6338
+ titleNode && /* @__PURE__ */ jsxRuntime.jsx(Text, { tag: "h4", className: clsx65__default.default(TextFootnote_module_default.title, titleAlign), children: titleNode }),
6339
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx65__default.default(TextFootnote_module_default.body), children: bodyNode })
6340
+ ] });
6341
+ };
6342
+
6343
+ // src/widgets/TextFootnote/index.ts
6344
+ var TextFootnote2 = Object.assign(TextFootnote, {
6345
+ Title: TextFootnoteTitle,
6346
+ Body: TextFootnoteBody
6347
+ });
6306
6348
  function useIntersectionObserver({
6307
6349
  animateOnce = false,
6308
6350
  options = {}
@@ -6388,6 +6430,7 @@ exports.TextBody = TextBody2;
6388
6430
  exports.TextCenterCtaInBottom = TextCenterCtaInBottom2;
6389
6431
  exports.TextCenterWithMedia = TextCenterWithMedia2;
6390
6432
  exports.TextEvent = TextEvent2;
6433
+ exports.TextFootnote = TextFootnote2;
6391
6434
  exports.TimelineCards = TimelineCards2;
6392
6435
  exports.TwoColTextMenu = TwoColTextMenu;
6393
6436
  exports.UpcomingEventCard = UpcomingEventCard;