@digital-b2c/coreui-kit 0.25.0 → 0.26.1
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 +90 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +184 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +90 -4
- package/dist/index.mjs.map +1 -1
- package/dist/types/global.d.ts +25 -25
- package/package.json +101 -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
|
@@ -1157,7 +1157,7 @@ var InfoCard_module_default = {
|
|
|
1157
1157
|
"info-card": "InfoCard_module_info-card",
|
|
1158
1158
|
header: "InfoCard_module_header",
|
|
1159
1159
|
badge: "InfoCard_module_badge",
|
|
1160
|
-
|
|
1160
|
+
icon: "InfoCard_module_icon"
|
|
1161
1161
|
};
|
|
1162
1162
|
var InfoCard = ({ className, title, subtitle, icon, badge, children }) => {
|
|
1163
1163
|
var _a, _b;
|
|
@@ -1169,7 +1169,7 @@ var InfoCard = ({ className, title, subtitle, icon, badge, children }) => {
|
|
|
1169
1169
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
1170
1170
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx65__default.default(InfoCard_module_default["info-card"], { [InfoCard_module_default.hasIcon]: !!icon }, className), children: [
|
|
1171
1171
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: InfoCard_module_default.header, children: [
|
|
1172
|
-
icon ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx65__default.default(InfoCard_module_default.badge, "h4"), children: badge }) : null,
|
|
1172
|
+
icon && typeof icon === "object" ? /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: InfoCard_module_default.icon }, icon)) : icon ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: icon }) : badge ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx65__default.default(InfoCard_module_default.badge, "h4"), children: badge }) : null,
|
|
1173
1173
|
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h4", children: titleNode })
|
|
1174
1174
|
] }),
|
|
1175
1175
|
subtitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "body", children: subtitleNode })
|
|
@@ -3066,7 +3066,8 @@ var Accordion_module_default = {
|
|
|
3066
3066
|
accordionHeaderLeft: "Accordion_module_accordionHeaderLeft",
|
|
3067
3067
|
accordionChevron: "Accordion_module_accordionChevron",
|
|
3068
3068
|
accordionContent: "Accordion_module_accordionContent",
|
|
3069
|
-
accordionContentInner: "Accordion_module_accordionContentInner"
|
|
3069
|
+
accordionContentInner: "Accordion_module_accordionContentInner",
|
|
3070
|
+
accordionContentDivider: "Accordion_module_accordionContentDivider"
|
|
3070
3071
|
};
|
|
3071
3072
|
var AccordionItem = ({
|
|
3072
3073
|
id,
|
|
@@ -3075,6 +3076,7 @@ var AccordionItem = ({
|
|
|
3075
3076
|
isOpen = false,
|
|
3076
3077
|
onToggle,
|
|
3077
3078
|
renderItemHeader,
|
|
3079
|
+
hasDivider,
|
|
3078
3080
|
className
|
|
3079
3081
|
}) => {
|
|
3080
3082
|
const contentRef = React72.useRef(null);
|
|
@@ -3118,6 +3120,7 @@ var AccordionItem = ({
|
|
|
3118
3120
|
"div",
|
|
3119
3121
|
{
|
|
3120
3122
|
className: clsx65__default.default(
|
|
3123
|
+
"accordionItem",
|
|
3121
3124
|
Accordion_module_default.accordionItem,
|
|
3122
3125
|
{
|
|
3123
3126
|
[Accordion_module_default.accordionItemOpen]: isOpen
|
|
@@ -3170,6 +3173,13 @@ var AccordionItem = ({
|
|
|
3170
3173
|
}
|
|
3171
3174
|
)
|
|
3172
3175
|
}
|
|
3176
|
+
),
|
|
3177
|
+
hasDivider && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3178
|
+
"div",
|
|
3179
|
+
{
|
|
3180
|
+
className: clsx65__default.default("accordionContentDivider", Accordion_module_default.accordionContentDivider),
|
|
3181
|
+
"aria-hidden": "true"
|
|
3182
|
+
}
|
|
3173
3183
|
)
|
|
3174
3184
|
]
|
|
3175
3185
|
}
|
|
@@ -3211,6 +3221,7 @@ var Accordion = ({
|
|
|
3211
3221
|
isOpen: openIds.includes(item.id),
|
|
3212
3222
|
onToggle: handleToggle,
|
|
3213
3223
|
renderItemHeader: item.renderItemHeader,
|
|
3224
|
+
hasDivider: item.hasDivider,
|
|
3214
3225
|
children: item.content
|
|
3215
3226
|
},
|
|
3216
3227
|
item.id
|
|
@@ -6345,6 +6356,81 @@ var TextFootnote2 = Object.assign(TextFootnote, {
|
|
|
6345
6356
|
Title: TextFootnoteTitle,
|
|
6346
6357
|
Body: TextFootnoteBody
|
|
6347
6358
|
});
|
|
6359
|
+
|
|
6360
|
+
// src/widgets/Faq/Faq.module.scss
|
|
6361
|
+
var Faq_module_default = {
|
|
6362
|
+
faq: "Faq_module_faq",
|
|
6363
|
+
accordion: "Faq_module_accordion",
|
|
6364
|
+
"accordion-header": "Faq_module_accordion-header",
|
|
6365
|
+
"accordion-content": "Faq_module_accordion-content",
|
|
6366
|
+
"accordion-title": "Faq_module_accordion-title",
|
|
6367
|
+
accordionChevron: "Faq_module_accordionChevron",
|
|
6368
|
+
collapsed: "Faq_module_collapsed"
|
|
6369
|
+
};
|
|
6370
|
+
var Faq = (props) => {
|
|
6371
|
+
const { items, className } = props;
|
|
6372
|
+
const accordionItems = React72.useMemo(() => {
|
|
6373
|
+
return (items == null ? void 0 : items.map((item, index) => ({
|
|
6374
|
+
id: index,
|
|
6375
|
+
title: item.title,
|
|
6376
|
+
content: /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx65__default.default(Faq_module_default["accordion-content"]), children: item.body }),
|
|
6377
|
+
hasDivider: true,
|
|
6378
|
+
renderItemHeader: ({ isOpen, toggle }) => {
|
|
6379
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6380
|
+
"button",
|
|
6381
|
+
{
|
|
6382
|
+
className: clsx65__default.default(Faq_module_default["accordion-header"], {
|
|
6383
|
+
[Faq_module_default["accordion-header-open"]]: isOpen
|
|
6384
|
+
}),
|
|
6385
|
+
onClick: toggle,
|
|
6386
|
+
"aria-expanded": isOpen,
|
|
6387
|
+
"aria-label": `Toggle accordion item #${index + 1}`,
|
|
6388
|
+
children: [
|
|
6389
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6390
|
+
"span",
|
|
6391
|
+
{
|
|
6392
|
+
className: clsx65__default.default(Faq_module_default["accordion-title"], {
|
|
6393
|
+
[Faq_module_default.accordionChevronOpen]: isOpen
|
|
6394
|
+
}),
|
|
6395
|
+
children: item.title
|
|
6396
|
+
}
|
|
6397
|
+
),
|
|
6398
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6399
|
+
"span",
|
|
6400
|
+
{
|
|
6401
|
+
className: clsx65__default.default(Faq_module_default.accordionChevron, {
|
|
6402
|
+
[Faq_module_default.accordionChevronOpen]: isOpen
|
|
6403
|
+
}),
|
|
6404
|
+
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "downChevronBlack", size: 40 }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6405
|
+
Icon,
|
|
6406
|
+
{
|
|
6407
|
+
type: "downChevronBlack",
|
|
6408
|
+
size: 40,
|
|
6409
|
+
stroke: "#949494",
|
|
6410
|
+
className: clsx65__default.default(Faq_module_default.collapsed)
|
|
6411
|
+
}
|
|
6412
|
+
)
|
|
6413
|
+
}
|
|
6414
|
+
)
|
|
6415
|
+
]
|
|
6416
|
+
}
|
|
6417
|
+
);
|
|
6418
|
+
}
|
|
6419
|
+
}))) || [];
|
|
6420
|
+
}, [items]);
|
|
6421
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Container, { className: clsx65__default.default(Faq_module_default["faq"], className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6422
|
+
Accordion,
|
|
6423
|
+
{
|
|
6424
|
+
items: accordionItems,
|
|
6425
|
+
allowMultiple: true,
|
|
6426
|
+
defaultOpenIds: [],
|
|
6427
|
+
className: clsx65__default.default(Faq_module_default["accordion"])
|
|
6428
|
+
}
|
|
6429
|
+
) });
|
|
6430
|
+
};
|
|
6431
|
+
|
|
6432
|
+
// src/widgets/Faq/index.tsx
|
|
6433
|
+
var Faq2 = Object.assign(Faq, {});
|
|
6348
6434
|
function useIntersectionObserver({
|
|
6349
6435
|
animateOnce = false,
|
|
6350
6436
|
options = {}
|
|
@@ -6393,6 +6479,7 @@ exports.ContactModule = ContactModule2;
|
|
|
6393
6479
|
exports.Container = Container;
|
|
6394
6480
|
exports.CountingCard = CountingCard2;
|
|
6395
6481
|
exports.EventList = EventList2;
|
|
6482
|
+
exports.Faq = Faq2;
|
|
6396
6483
|
exports.FeaturedNewsHighlights = FeaturedNewsHighlights2;
|
|
6397
6484
|
exports.FilterBar = FilterBar;
|
|
6398
6485
|
exports.Footer = Footer;
|