@digital-b2c/coreui-kit 0.4.5 → 0.5.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 +21 -21
- package/README.md +52 -52
- package/dist/index.cjs +83 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +318 -32
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.mjs +83 -31
- package/dist/index.mjs.map +1 -1
- package/dist/types/global.d.ts +25 -25
- package/package.json +100 -100
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
|
@@ -1312,8 +1312,10 @@ var MiniBannerSubtitle = ({ children }) => {
|
|
|
1312
1312
|
var MiniBanner_module_default = {
|
|
1313
1313
|
minibanner: "MiniBanner_module_minibanner",
|
|
1314
1314
|
background: "MiniBanner_module_background",
|
|
1315
|
+
wrapper: "MiniBanner_module_wrapper",
|
|
1315
1316
|
textContainer: "MiniBanner_module_textContainer",
|
|
1316
1317
|
logo: "MiniBanner_module_logo",
|
|
1318
|
+
pretitle: "MiniBanner_module_pretitle",
|
|
1317
1319
|
headingWrapper: "MiniBanner_module_headingWrapper",
|
|
1318
1320
|
title: "MiniBanner_module_title",
|
|
1319
1321
|
ctaContainer: "MiniBanner_module_ctaContainer",
|
|
@@ -1347,37 +1349,39 @@ var MiniBanner = ({
|
|
|
1347
1349
|
const pretitleNode = (_a = slots.pretitle) != null ? _a : pretitle;
|
|
1348
1350
|
const titleNode = (_b = slots.title) != null ? _b : title;
|
|
1349
1351
|
const subtitleNode = (_c = slots.subtitle) != null ? _c : subtitle;
|
|
1350
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1352
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx19__default.default(MiniBanner_module_default.minibanner, MiniBanner_module_default[variant], className), children: [
|
|
1351
1353
|
((background == null ? void 0 : background.src) || ((_d = background == null ? void 0 : background.desktop) == null ? void 0 : _d.src) || ((_e = background == null ? void 0 : background.mobile) == null ? void 0 : _e.src)) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.background }, background)),
|
|
1352
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1354
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.wrapper, children: [
|
|
1355
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: MiniBanner_module_default.textContainer, children: [
|
|
1356
|
+
(logo == null ? void 0 : logo.src) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: MiniBanner_module_default.logo }, logo)),
|
|
1357
|
+
pretitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx19__default.default(MiniBanner_module_default.pretitle, "small"), children: pretitleNode }),
|
|
1358
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: MiniBanner_module_default.headingWrapper, children: titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx19__default.default(MiniBanner_module_default.title, isMiniBannerTextLeft ? "h1" : "h4"), children: titleNode }) }),
|
|
1359
|
+
subtitleNode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1360
|
+
"div",
|
|
1361
|
+
{
|
|
1362
|
+
className: clsx19__default.default(MiniBanner_module_default.title, {
|
|
1363
|
+
subheading: isMiniBannerNoBG || isMiniBannerTextLeft,
|
|
1364
|
+
h1: !isMiniBannerNoBG && !isMiniBannerTextLeft
|
|
1365
|
+
}),
|
|
1366
|
+
children: subtitleNode
|
|
1367
|
+
}
|
|
1368
|
+
)
|
|
1369
|
+
] }),
|
|
1370
|
+
cta && cta.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: MiniBanner_module_default.ctaContainer, children: cta.slice(0, 2).map((cta2, key) => {
|
|
1371
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1372
|
+
Button,
|
|
1373
|
+
{
|
|
1374
|
+
href: cta2.url,
|
|
1375
|
+
isExternal: cta2.isExternal,
|
|
1376
|
+
variant: "secondary",
|
|
1377
|
+
fullWidth: isTabletBelow,
|
|
1378
|
+
logo: cta2.logo,
|
|
1379
|
+
children: cta2.label
|
|
1380
|
+
},
|
|
1381
|
+
key
|
|
1382
|
+
);
|
|
1383
|
+
}) })
|
|
1384
|
+
] })
|
|
1381
1385
|
] });
|
|
1382
1386
|
};
|
|
1383
1387
|
|
|
@@ -1732,6 +1736,54 @@ var EventList = ({ className, title, items, cta, variant, children }) => {
|
|
|
1732
1736
|
var EventList2 = Object.assign(EventList, {
|
|
1733
1737
|
Title: EventListTitle
|
|
1734
1738
|
});
|
|
1739
|
+
var Text = (_a) => {
|
|
1740
|
+
var _b = _a, { tag = "p", promoteToH1 = false, ref, children } = _b, props = __objRest(_b, ["tag", "promoteToH1", "ref", "children"]);
|
|
1741
|
+
const Component = promoteToH1 ? "h1" : tag;
|
|
1742
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, __spreadProps(__spreadValues({ ref }, props), { children }));
|
|
1743
|
+
};
|
|
1744
|
+
Text.displayName = "Text";
|
|
1745
|
+
|
|
1746
|
+
// src/widgets/TextEvent/TextEvent.module.scss
|
|
1747
|
+
var TextEvent_module_default = {
|
|
1748
|
+
h1: "TextEvent_module_h1",
|
|
1749
|
+
h2: "TextEvent_module_h2",
|
|
1750
|
+
h3: "TextEvent_module_h3",
|
|
1751
|
+
textEvent: "TextEvent_module_textEvent",
|
|
1752
|
+
richText: "TextEvent_module_richText",
|
|
1753
|
+
h4: "TextEvent_module_h4",
|
|
1754
|
+
subheading: "TextEvent_module_subheading",
|
|
1755
|
+
body: "TextEvent_module_body",
|
|
1756
|
+
small: "TextEvent_module_small",
|
|
1757
|
+
smallest: "TextEvent_module_smallest",
|
|
1758
|
+
title: "TextEvent_module_title",
|
|
1759
|
+
"table-center": "TextEvent_module_table-center"
|
|
1760
|
+
};
|
|
1761
|
+
var TextEventTitle = ({ children }) => {
|
|
1762
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
1763
|
+
};
|
|
1764
|
+
var TextEventRichText = ({ children }) => {
|
|
1765
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
1766
|
+
};
|
|
1767
|
+
var TextEvent = (props) => {
|
|
1768
|
+
var _a, _b;
|
|
1769
|
+
const { className, richText, title, variant, children } = props;
|
|
1770
|
+
const slots = resolveCompoundSlots(children, {
|
|
1771
|
+
title: TextEventTitle,
|
|
1772
|
+
richText: TextEventRichText
|
|
1773
|
+
});
|
|
1774
|
+
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
1775
|
+
const richTextNode = (_b = slots.richText) != null ? _b : richText;
|
|
1776
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx19__default.default(TextEvent_module_default.textEvent, className), children: [
|
|
1777
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { tag: "h2", className: TextEvent_module_default.title, children: titleNode }),
|
|
1778
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx19__default.default(TextEvent_module_default.richText, TextEvent_module_default[variant != null ? variant : ""]), children: richTextNode })
|
|
1779
|
+
] });
|
|
1780
|
+
};
|
|
1781
|
+
|
|
1782
|
+
// src/widgets/TextEvent/index.ts
|
|
1783
|
+
var TextEvent2 = Object.assign(TextEvent, {
|
|
1784
|
+
Title: TextEventTitle,
|
|
1785
|
+
RichText: TextEventRichText
|
|
1786
|
+
});
|
|
1735
1787
|
function useIntersectionObserver({
|
|
1736
1788
|
animateOnce = false,
|
|
1737
1789
|
options = {}
|
|
@@ -1783,6 +1835,7 @@ exports.PracticeCard = PracticeCard;
|
|
|
1783
1835
|
exports.PracticePathCards = PracticePathCards2;
|
|
1784
1836
|
exports.Teaser5050With3Text = Teaser5050With3Text2;
|
|
1785
1837
|
exports.Teaser5050WithCta = Teaser5050WithCta2;
|
|
1838
|
+
exports.TextEvent = TextEvent2;
|
|
1786
1839
|
exports.resolveCompoundSlots = resolveCompoundSlots;
|
|
1787
1840
|
exports.svgs = svgs;
|
|
1788
1841
|
exports.useIntersectionObserver = useIntersectionObserver;
|