@digital-b2c/coreui-kit 0.18.4 → 0.18.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 +230 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +301 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.mjs +230 -20
- 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
|
@@ -2857,6 +2857,7 @@ var AccordionItem = ({
|
|
|
2857
2857
|
children,
|
|
2858
2858
|
isOpen = false,
|
|
2859
2859
|
onToggle,
|
|
2860
|
+
renderItemHeader,
|
|
2860
2861
|
className
|
|
2861
2862
|
}) => {
|
|
2862
2863
|
const contentRef = React72.useRef(null);
|
|
@@ -2907,7 +2908,10 @@ var AccordionItem = ({
|
|
|
2907
2908
|
className
|
|
2908
2909
|
),
|
|
2909
2910
|
children: [
|
|
2910
|
-
|
|
2911
|
+
renderItemHeader ? renderItemHeader({
|
|
2912
|
+
isOpen,
|
|
2913
|
+
toggle: handleToggle
|
|
2914
|
+
}) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2911
2915
|
"button",
|
|
2912
2916
|
{
|
|
2913
2917
|
className: clsx50__default.default(Accordion_module_default.accordionHeader, {
|
|
@@ -2934,12 +2938,20 @@ var AccordionItem = ({
|
|
|
2934
2938
|
"div",
|
|
2935
2939
|
{
|
|
2936
2940
|
ref: contentRef,
|
|
2937
|
-
className: Accordion_module_default.accordionContent,
|
|
2941
|
+
className: clsx50__default.default("accordionContent", Accordion_module_default.accordionContent),
|
|
2938
2942
|
style: {
|
|
2939
2943
|
overflow: "hidden",
|
|
2940
2944
|
height: 0
|
|
2941
2945
|
},
|
|
2942
|
-
|
|
2946
|
+
inert: !isOpen,
|
|
2947
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2948
|
+
"div",
|
|
2949
|
+
{
|
|
2950
|
+
ref: contentInnerRef,
|
|
2951
|
+
className: clsx50__default.default("accordionContentInner", Accordion_module_default.accordionContentInner),
|
|
2952
|
+
children
|
|
2953
|
+
}
|
|
2954
|
+
)
|
|
2943
2955
|
}
|
|
2944
2956
|
)
|
|
2945
2957
|
]
|
|
@@ -2973,17 +2985,20 @@ var Accordion = ({
|
|
|
2973
2985
|
if (items.length === 0) {
|
|
2974
2986
|
return null;
|
|
2975
2987
|
}
|
|
2976
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx50__default.default(Accordion_module_default.accordion, className), children: items.map((item) =>
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2988
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx50__default.default(Accordion_module_default.accordion, className), children: items.map((item) => {
|
|
2989
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2990
|
+
AccordionItem,
|
|
2991
|
+
{
|
|
2992
|
+
id: item.id,
|
|
2993
|
+
title: item.title,
|
|
2994
|
+
isOpen: openIds.includes(item.id),
|
|
2995
|
+
onToggle: handleToggle,
|
|
2996
|
+
renderItemHeader: item.renderItemHeader,
|
|
2997
|
+
children: item.content
|
|
2998
|
+
},
|
|
2999
|
+
item.id
|
|
3000
|
+
);
|
|
3001
|
+
}) });
|
|
2987
3002
|
};
|
|
2988
3003
|
|
|
2989
3004
|
// src/widgets/InternalBrandsTab/InternalBrandsTab.module.scss
|
|
@@ -3274,11 +3289,12 @@ var MiniSectionCta = ({
|
|
|
3274
3289
|
});
|
|
3275
3290
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3276
3291
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
3292
|
+
const hasModuleStyles = moduleStyles && Object.values(moduleStyles).length > 0;
|
|
3277
3293
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3278
3294
|
"div",
|
|
3279
3295
|
{
|
|
3280
3296
|
className: clsx50__default.default(MiniSectionCta_module_default.miniSectionCta, MiniSectionCta_module_default[variant], theme && MiniSectionCta_module_default[theme], className),
|
|
3281
|
-
style: __spreadValues({},
|
|
3297
|
+
style: __spreadValues({}, hasModuleStyles && {
|
|
3282
3298
|
"--custom-background-color": moduleStyles.backgroundColor,
|
|
3283
3299
|
"--custom-color": moduleStyles.color
|
|
3284
3300
|
}),
|
|
@@ -4261,18 +4277,19 @@ var Teaser5050WithCta = ({
|
|
|
4261
4277
|
});
|
|
4262
4278
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4263
4279
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
4280
|
+
const hasModuleStyles = moduleStyles && Object.values(moduleStyles).length > 0;
|
|
4264
4281
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4265
4282
|
"div",
|
|
4266
4283
|
{
|
|
4267
4284
|
className: clsx50__default.default(Teaser5050WithCta_module_default.teaser5050, Teaser5050WithCta_module_default[variant], className),
|
|
4268
|
-
style: __spreadValues({},
|
|
4285
|
+
style: __spreadValues({}, hasModuleStyles && {
|
|
4269
4286
|
"--custom-background-color": moduleStyles.backgroundColor,
|
|
4270
4287
|
"--custom-color": moduleStyles.color
|
|
4271
4288
|
}),
|
|
4272
4289
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: Teaser5050WithCta_module_default.container, children: [
|
|
4273
4290
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: Teaser5050WithCta_module_default.wrapper, children: [
|
|
4274
4291
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: Teaser5050WithCta_module_default.content, children: [
|
|
4275
|
-
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx50__default.default(Teaser5050WithCta_module_default.title
|
|
4292
|
+
titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx50__default.default("h3", Teaser5050WithCta_module_default.title), children: titleNode }),
|
|
4276
4293
|
subtitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx50__default.default("subheading", Teaser5050WithCta_module_default.subheading), children: subtitleNode })
|
|
4277
4294
|
] }),
|
|
4278
4295
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: Teaser5050WithCta_module_default.ctaWrapper, children: ctas.map((cta, key) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4712,7 +4729,7 @@ var ResourcesGridList = ({
|
|
|
4712
4729
|
if (isMobile) setIsSidebarOpen(false);
|
|
4713
4730
|
setTimeout(() => {
|
|
4714
4731
|
var _a3;
|
|
4715
|
-
(_a3 = widgetRef.current) == null ? void 0 : _a3.scrollIntoView({ behavior: "smooth" });
|
|
4732
|
+
(_a3 = widgetRef.current) == null ? void 0 : _a3.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
4716
4733
|
}, 200);
|
|
4717
4734
|
};
|
|
4718
4735
|
const handleFilterChange = (value) => {
|
|
@@ -4825,7 +4842,13 @@ var ResourcesGridList = ({
|
|
|
4825
4842
|
currentPage: safeCurrentPage,
|
|
4826
4843
|
totalPages,
|
|
4827
4844
|
loop: false,
|
|
4828
|
-
onPageChange:
|
|
4845
|
+
onPageChange: (page) => {
|
|
4846
|
+
setCurrentPage(page);
|
|
4847
|
+
setTimeout(() => {
|
|
4848
|
+
var _a2;
|
|
4849
|
+
(_a2 = widgetRef.current) == null ? void 0 : _a2.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
4850
|
+
}, 200);
|
|
4851
|
+
}
|
|
4829
4852
|
},
|
|
4830
4853
|
`${selectedCategory}-${filterValue}-${sortValue}-${searchQuery}`
|
|
4831
4854
|
)
|
|
@@ -5659,6 +5682,193 @@ var LocationsBrandCards = ({
|
|
|
5659
5682
|
var LocationsBrandCards2 = Object.assign(LocationsBrandCards, {
|
|
5660
5683
|
Text: LocationsBrandCardsText
|
|
5661
5684
|
});
|
|
5685
|
+
|
|
5686
|
+
// src/widgets/BrandsTab/BrandsTab.module.scss
|
|
5687
|
+
var BrandsTab_module_default = {
|
|
5688
|
+
"brands-tab": "BrandsTab_module_brands-tab",
|
|
5689
|
+
"text-container": "BrandsTab_module_text-container",
|
|
5690
|
+
title: "BrandsTab_module_title",
|
|
5691
|
+
"tab-wrapper": "BrandsTab_module_tab-wrapper",
|
|
5692
|
+
"tab-buttons": "BrandsTab_module_tab-buttons",
|
|
5693
|
+
"tab-trigger": "BrandsTab_module_tab-trigger",
|
|
5694
|
+
"tab-active": "BrandsTab_module_tab-active",
|
|
5695
|
+
"tab-content-area": "BrandsTab_module_tab-content-area",
|
|
5696
|
+
"content-cards": "BrandsTab_module_content-cards",
|
|
5697
|
+
card: "BrandsTab_module_card",
|
|
5698
|
+
"card-header": "BrandsTab_module_card-header",
|
|
5699
|
+
"card-logo": "BrandsTab_module_card-logo",
|
|
5700
|
+
"content-side": "BrandsTab_module_content-side",
|
|
5701
|
+
"card-cta": "BrandsTab_module_card-cta",
|
|
5702
|
+
"card-image": "BrandsTab_module_card-image",
|
|
5703
|
+
accordion: "BrandsTab_module_accordion",
|
|
5704
|
+
"accordion-header": "BrandsTab_module_accordion-header",
|
|
5705
|
+
"accordion-header-open": "BrandsTab_module_accordion-header-open",
|
|
5706
|
+
"accordion-content": "BrandsTab_module_accordion-content",
|
|
5707
|
+
"card-description": "BrandsTab_module_card-description"
|
|
5708
|
+
};
|
|
5709
|
+
var BrandsTab = (props) => {
|
|
5710
|
+
var _a, _b, _c;
|
|
5711
|
+
const { title, subtitle, className, tabs } = props;
|
|
5712
|
+
const [activeIndex, setActiveIndex] = React72.useState(0);
|
|
5713
|
+
const { is } = useViewPort_default();
|
|
5714
|
+
const isTabletBelow = is("tablet", "below");
|
|
5715
|
+
const accordionItems = React72.useMemo(() => {
|
|
5716
|
+
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
5717
|
+
var _a2, _b2, _c2, _d, _e;
|
|
5718
|
+
return {
|
|
5719
|
+
id: index,
|
|
5720
|
+
title: typeof tab.trigger.active === "string" ? tab.trigger.active : /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({}, tab.trigger.active)),
|
|
5721
|
+
content: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5722
|
+
"div",
|
|
5723
|
+
{
|
|
5724
|
+
className: clsx50__default.default(BrandsTab_module_default["accordion-content"]),
|
|
5725
|
+
style: {
|
|
5726
|
+
"--theme-color": `var(${tab.theme})`
|
|
5727
|
+
},
|
|
5728
|
+
children: [
|
|
5729
|
+
(_a2 = tab == null ? void 0 : tab.content) == null ? void 0 : _a2.map((content) => {
|
|
5730
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5731
|
+
"div",
|
|
5732
|
+
{
|
|
5733
|
+
className: BrandsTab_module_default["card"],
|
|
5734
|
+
style: {
|
|
5735
|
+
"--theme-text-color": `var(${content.textColor})`
|
|
5736
|
+
},
|
|
5737
|
+
children: [
|
|
5738
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: BrandsTab_module_default["card-header"], children: [
|
|
5739
|
+
content.logo && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: BrandsTab_module_default["card-logo"] }, content.logo)),
|
|
5740
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: clsx50__default.default("h4", BrandsTab_module_default["card-title"]), children: content.title })
|
|
5741
|
+
] }),
|
|
5742
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: BrandsTab_module_default["card-description"], children: content.description })
|
|
5743
|
+
]
|
|
5744
|
+
},
|
|
5745
|
+
`${content.title}-${index}`
|
|
5746
|
+
);
|
|
5747
|
+
}),
|
|
5748
|
+
tab.image && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadProps(__spreadValues({}, tab.image), { className: BrandsTab_module_default["card-image"] })),
|
|
5749
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5750
|
+
Button,
|
|
5751
|
+
{
|
|
5752
|
+
variant: "secondary",
|
|
5753
|
+
className: BrandsTab_module_default["card-cta"],
|
|
5754
|
+
logo: (_b2 = tab.cta) == null ? void 0 : _b2.logo,
|
|
5755
|
+
title: (_c2 = tab.cta) == null ? void 0 : _c2.label,
|
|
5756
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-label": (_d = tab.cta) == null ? void 0 : _d.label, children: (_e = tab.cta) == null ? void 0 : _e.label })
|
|
5757
|
+
}
|
|
5758
|
+
)
|
|
5759
|
+
]
|
|
5760
|
+
}
|
|
5761
|
+
),
|
|
5762
|
+
renderItemHeader: ({ isOpen, toggle }) => {
|
|
5763
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5764
|
+
"button",
|
|
5765
|
+
{
|
|
5766
|
+
className: clsx50__default.default(BrandsTab_module_default["accordion-header"], {
|
|
5767
|
+
[BrandsTab_module_default["accordion-header-open"]]: isOpen
|
|
5768
|
+
}),
|
|
5769
|
+
style: {
|
|
5770
|
+
"--theme-color": `var(${tab.theme})`
|
|
5771
|
+
},
|
|
5772
|
+
onClick: toggle,
|
|
5773
|
+
"aria-expanded": isOpen,
|
|
5774
|
+
"aria-label": `Toggle accordion item #${index + 1}`,
|
|
5775
|
+
children: [
|
|
5776
|
+
typeof tab.trigger.active === "string" ? tab.trigger.active : /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({}, tab.trigger.active)),
|
|
5777
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5778
|
+
"span",
|
|
5779
|
+
{
|
|
5780
|
+
className: clsx50__default.default(BrandsTab_module_default.accordionChevron, {
|
|
5781
|
+
[BrandsTab_module_default.accordionChevronOpen]: isOpen
|
|
5782
|
+
}),
|
|
5783
|
+
children: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "filledChevronUp", size: 40 }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "circleChevronDown", size: 40 })
|
|
5784
|
+
}
|
|
5785
|
+
)
|
|
5786
|
+
]
|
|
5787
|
+
}
|
|
5788
|
+
);
|
|
5789
|
+
}
|
|
5790
|
+
};
|
|
5791
|
+
})) || [];
|
|
5792
|
+
}, [tabs]);
|
|
5793
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: clsx50__default.default(BrandsTab_module_default["brands-tab"], className), children: [
|
|
5794
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: BrandsTab_module_default["text-container"], children: [
|
|
5795
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(Text, { tag: "h2", className: BrandsTab_module_default.title, children: title }),
|
|
5796
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx50__default.default("subheading", BrandsTab_module_default.subtitle), children: subtitle })
|
|
5797
|
+
] }),
|
|
5798
|
+
isTabletBelow ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5799
|
+
Accordion,
|
|
5800
|
+
{
|
|
5801
|
+
items: accordionItems,
|
|
5802
|
+
allowMultiple: true,
|
|
5803
|
+
defaultOpenIds: [],
|
|
5804
|
+
className: clsx50__default.default(BrandsTab_module_default["accordion"])
|
|
5805
|
+
}
|
|
5806
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: BrandsTab_module_default["tab-wrapper"], children: [
|
|
5807
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: BrandsTab_module_default["tab-buttons"], children: tabs == null ? void 0 : tabs.map(({ trigger, theme }, index) => {
|
|
5808
|
+
const isActive = activeIndex === index;
|
|
5809
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5810
|
+
Button,
|
|
5811
|
+
{
|
|
5812
|
+
variant: "tabbutton",
|
|
5813
|
+
onClick: () => setActiveIndex(index),
|
|
5814
|
+
isActive,
|
|
5815
|
+
className: clsx50__default.default(BrandsTab_module_default["tab-trigger"], isActive ? BrandsTab_module_default["tab-active"] : null),
|
|
5816
|
+
style: {
|
|
5817
|
+
"--theme-color": `var(${theme})`
|
|
5818
|
+
},
|
|
5819
|
+
children: trigger ? isActive ? typeof trigger.active === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: trigger.active }) : /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({}, trigger.active)) : typeof trigger.default === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: trigger.default }) : /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({}, trigger.default)) : null
|
|
5820
|
+
},
|
|
5821
|
+
index
|
|
5822
|
+
);
|
|
5823
|
+
}) }),
|
|
5824
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
5825
|
+
"div",
|
|
5826
|
+
{
|
|
5827
|
+
className: clsx50__default.default(BrandsTab_module_default["tab-content-area"]),
|
|
5828
|
+
style: {
|
|
5829
|
+
"--theme-color": `var(${tabs == null ? void 0 : tabs[activeIndex].theme})`
|
|
5830
|
+
},
|
|
5831
|
+
children: [
|
|
5832
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: BrandsTab_module_default["content-cards"], children: (_a = tabs == null ? void 0 : tabs[activeIndex].content) == null ? void 0 : _a.map((content, index) => {
|
|
5833
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5834
|
+
"div",
|
|
5835
|
+
{
|
|
5836
|
+
className: BrandsTab_module_default["card"],
|
|
5837
|
+
style: {
|
|
5838
|
+
"--theme-text-color": `var(${content.textColor})`
|
|
5839
|
+
},
|
|
5840
|
+
children: [
|
|
5841
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: BrandsTab_module_default["card-header"], children: [
|
|
5842
|
+
content.logo && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: BrandsTab_module_default["card-logo"] }, content.logo)),
|
|
5843
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: clsx50__default.default("h4", BrandsTab_module_default["card-title"]), children: content.title })
|
|
5844
|
+
] }),
|
|
5845
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: BrandsTab_module_default["card-description"], children: content.description })
|
|
5846
|
+
]
|
|
5847
|
+
},
|
|
5848
|
+
`${content.title}-${index}`
|
|
5849
|
+
);
|
|
5850
|
+
}) }),
|
|
5851
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: BrandsTab_module_default["content-side"], children: [
|
|
5852
|
+
(tabs == null ? void 0 : tabs[activeIndex].image) && /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadProps(__spreadValues({}, tabs == null ? void 0 : tabs[activeIndex].image), { className: BrandsTab_module_default["card-image"] })),
|
|
5853
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5854
|
+
Button,
|
|
5855
|
+
{
|
|
5856
|
+
variant: "secondary",
|
|
5857
|
+
className: BrandsTab_module_default["card-cta"],
|
|
5858
|
+
logo: (_b = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _b.logo,
|
|
5859
|
+
children: (_c = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _c.label
|
|
5860
|
+
}
|
|
5861
|
+
)
|
|
5862
|
+
] })
|
|
5863
|
+
]
|
|
5864
|
+
}
|
|
5865
|
+
)
|
|
5866
|
+
] })
|
|
5867
|
+
] });
|
|
5868
|
+
};
|
|
5869
|
+
|
|
5870
|
+
// src/widgets/BrandsTab/index.tsx
|
|
5871
|
+
var BrandsTab2 = Object.assign(BrandsTab, {});
|
|
5662
5872
|
function useIntersectionObserver({
|
|
5663
5873
|
animateOnce = false,
|
|
5664
5874
|
options = {}
|
|
@@ -5696,6 +5906,7 @@ exports.BlogPostContent = BlogPostContent2;
|
|
|
5696
5906
|
exports.BlogSearchResultsList = BlogSearchResultsList2;
|
|
5697
5907
|
exports.BrandCard = BrandCard;
|
|
5698
5908
|
exports.BrandsStrip = BrandsStrip;
|
|
5909
|
+
exports.BrandsTab = BrandsTab2;
|
|
5699
5910
|
exports.Button = Button;
|
|
5700
5911
|
exports.Card = Card2;
|
|
5701
5912
|
exports.CardCollection = CardCollection2;
|