@digital-b2c/coreui-kit 0.21.3 → 0.21.6
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 +31 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +16 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +31 -10
- package/dist/index.mjs.map +1 -1
- package/dist/types/global.d.ts +25 -25
- package/package.json +100 -101
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
|
@@ -2442,19 +2442,16 @@ var CardCarousel = ({
|
|
|
2442
2442
|
onResize: syncPagination,
|
|
2443
2443
|
children: cards.map((_d, index) => {
|
|
2444
2444
|
var _e = _d, { isLocked, className: cardClassName, videoUrl } = _e, card = __objRest(_e, ["isLocked", "className", "videoUrl"]);
|
|
2445
|
-
var _a2;
|
|
2446
2445
|
return /* @__PURE__ */ jsxRuntime.jsx(react$1.SwiperSlide, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2447
2446
|
Card2,
|
|
2448
|
-
__spreadProps(__spreadValues({
|
|
2447
|
+
__spreadProps(__spreadValues({}, card), {
|
|
2449
2448
|
variant: theme,
|
|
2450
2449
|
className: clsx52__default.default(CardCarousel_module_default.card, isLocked && CardCarousel_module_default.locked, cardClassName),
|
|
2451
|
-
onCtaClick:
|
|
2452
|
-
var _a3, _b2;
|
|
2450
|
+
onCtaClick: !isLocked && videoUrl ? (event) => {
|
|
2453
2451
|
event.preventDefault();
|
|
2454
|
-
setActiveVideo(
|
|
2455
|
-
} : card.onCtaClick
|
|
2456
|
-
|
|
2457
|
-
cta: videoUrl && card.cta ? __spreadProps(__spreadValues({}, card.cta), { icon: "watchBlack" }) : card.cta
|
|
2452
|
+
setActiveVideo(videoUrl);
|
|
2453
|
+
} : card.onCtaClick,
|
|
2454
|
+
cta: !isLocked && videoUrl && card.cta ? __spreadProps(__spreadValues({}, card.cta), { icon: "watchBlack" }) : card.cta
|
|
2458
2455
|
})
|
|
2459
2456
|
) }, index);
|
|
2460
2457
|
})
|
|
@@ -4190,6 +4187,24 @@ var Navigation2 = (props) => {
|
|
|
4190
4187
|
document.body.style.overflow = "";
|
|
4191
4188
|
};
|
|
4192
4189
|
}, [isMobileMenuOpen]);
|
|
4190
|
+
React72.useEffect(() => {
|
|
4191
|
+
if (!navRef.current) return;
|
|
4192
|
+
const navigation = navRef.current;
|
|
4193
|
+
const root = document.documentElement;
|
|
4194
|
+
const updateNavigationHeight = () => {
|
|
4195
|
+
root.style.setProperty(
|
|
4196
|
+
"--navigation-height",
|
|
4197
|
+
`${navigation.getBoundingClientRect().height}px`
|
|
4198
|
+
);
|
|
4199
|
+
};
|
|
4200
|
+
updateNavigationHeight();
|
|
4201
|
+
const resizeObserver = new ResizeObserver(updateNavigationHeight);
|
|
4202
|
+
resizeObserver.observe(navigation);
|
|
4203
|
+
return () => {
|
|
4204
|
+
resizeObserver.disconnect();
|
|
4205
|
+
root.style.removeProperty("--navigation-height");
|
|
4206
|
+
};
|
|
4207
|
+
}, []);
|
|
4193
4208
|
React72.useEffect(() => {
|
|
4194
4209
|
if (!dropdownOpen) return;
|
|
4195
4210
|
const handleKey = (e) => {
|
|
@@ -5699,6 +5714,7 @@ var QuoteSectionBlock_module_default = {
|
|
|
5699
5714
|
inner: "QuoteSectionBlock_module_inner",
|
|
5700
5715
|
title: "QuoteSectionBlock_module_title",
|
|
5701
5716
|
swiperContainer: "QuoteSectionBlock_module_swiperContainer",
|
|
5717
|
+
swiperContainerFullWidth: "QuoteSectionBlock_module_swiperContainerFullWidth",
|
|
5702
5718
|
card: "QuoteSectionBlock_module_card",
|
|
5703
5719
|
quoteLogo: "QuoteSectionBlock_module_quoteLogo",
|
|
5704
5720
|
bodyText: "QuoteSectionBlock_module_bodyText",
|
|
@@ -5709,7 +5725,12 @@ var QuoteSectionBlock_module_default = {
|
|
|
5709
5725
|
jobTitleLogo: "QuoteSectionBlock_module_jobTitleLogo",
|
|
5710
5726
|
controls: "QuoteSectionBlock_module_controls"
|
|
5711
5727
|
};
|
|
5712
|
-
var QuoteSectionBlock = ({
|
|
5728
|
+
var QuoteSectionBlock = ({
|
|
5729
|
+
className,
|
|
5730
|
+
title,
|
|
5731
|
+
viewtype,
|
|
5732
|
+
items = []
|
|
5733
|
+
}) => {
|
|
5713
5734
|
const { is } = useViewPort_default();
|
|
5714
5735
|
const isMobile = is("tablet", "below");
|
|
5715
5736
|
const [swiperInstance, setSwiperInstance] = React72.useState(null);
|
|
@@ -5717,7 +5738,7 @@ var QuoteSectionBlock = ({ className, title, items = [] }) => {
|
|
|
5717
5738
|
if (!items.length) return null;
|
|
5718
5739
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx52__default.default(QuoteSectionBlock_module_default.quoteSectionBlock, className), children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: QuoteSectionBlock_module_default.inner, children: [
|
|
5719
5740
|
title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: QuoteSectionBlock_module_default.title, children: title }),
|
|
5720
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: QuoteSectionBlock_module_default.swiperContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5741
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: !viewtype ? QuoteSectionBlock_module_default.swiperContainer : QuoteSectionBlock_module_default.swiperContainerFullWidth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5721
5742
|
react$1.Swiper,
|
|
5722
5743
|
{
|
|
5723
5744
|
slidesPerView: "auto",
|