@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/dist/index.d.cts
CHANGED
|
@@ -1179,6 +1179,36 @@ declare const LocationsBrandCards: (({ className, title, subtitle, image, cards,
|
|
|
1179
1179
|
Text: ({ children }: LocationsBrandCardsTextProps) => react.JSX.Element;
|
|
1180
1180
|
};
|
|
1181
1181
|
|
|
1182
|
+
interface BrandTab {
|
|
1183
|
+
trigger: {
|
|
1184
|
+
default: string | {
|
|
1185
|
+
src: string;
|
|
1186
|
+
alt: string;
|
|
1187
|
+
};
|
|
1188
|
+
active: string | {
|
|
1189
|
+
src: string;
|
|
1190
|
+
alt: string;
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
content?: {
|
|
1194
|
+
title?: string;
|
|
1195
|
+
description: React.ReactNode | string;
|
|
1196
|
+
logo?: IPicture;
|
|
1197
|
+
textColor?: string;
|
|
1198
|
+
}[];
|
|
1199
|
+
image?: IPicture;
|
|
1200
|
+
cta?: ICtaLogo;
|
|
1201
|
+
theme: string;
|
|
1202
|
+
}
|
|
1203
|
+
interface BrandsTabProps {
|
|
1204
|
+
title?: string;
|
|
1205
|
+
className?: string;
|
|
1206
|
+
subtitle?: React.ReactNode;
|
|
1207
|
+
tabs?: BrandTab[];
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
declare const BrandsTab: (props: BrandsTabProps) => react.JSX.Element;
|
|
1211
|
+
|
|
1182
1212
|
/** Tracks the current browser path, updating on back/forward navigation. */
|
|
1183
1213
|
declare const useActivePath: () => string;
|
|
1184
1214
|
|
|
@@ -1207,4 +1237,4 @@ type SlotMap = Record<string, SlotComponent>;
|
|
|
1207
1237
|
*/
|
|
1208
1238
|
declare function resolveCompoundSlots(children: ReactNode, slots: SlotMap): Record<string, ReactNode>;
|
|
1209
1239
|
|
|
1210
|
-
export { Anchor, type AnchorProps, Badge, type BadgeProps, BlogCardGrid, type BlogCardGridProps, BlogPost, BlogPostContent, type BlogPostContentProps, type BlogPostProps, BlogSearchResultsList, type BlogSearchResultsListProps, BrandCard, type BrandCardProps, BrandsStrip, type BrandsStripProps, Button, type ButtonProps, Card, CardCollection, type CardCollectionProps, type CardProps, ColTextMenu, type ColTextMenuProps, ConditionalWrapper, type ConditionalWrapperProps, ContactModule, type ContactModuleProps, Container, type ContainerProps, CountingCard, type CountingCardProps, EventList, type EventListProps, FeaturedNewsHighlights, type FeaturedNewsHighlightsProps, FilterBar, type FilterBarProps, type FilterOption, Footer, type FooterProps, GlobalSearchResultsList, type GlobalSearchResultsListProps, type GridItemProps, type GridProps, HeroBanner, HeroBannerCarousel, type HeroBannerCarouselProps, type HeroBannerProps, type IColTextMenuItem, type ICta, type ICtaHoverLogo, type ICtaIcon, type ICtaLogo, type IFooterSupportGroup, type IPicture, type ITwoColTextMenuSection, Icon, type IconType, InfoCard, type InfoCardProps, Input, type InputProps, InternalBrandsTab, type InternalBrandsTabProps, type UserMenuItem as InternalNavMenuItem, Loader, type LoaderProps, LocationsBrandCards, type LocationsBrandCardsProps, MiniBanner, type MiniBannerProps, MiniSectionCta, type MiniSectionCtaProps, type NavItem, Navigation, type NavigationBrandBar, type NavigationProps, type UserMenuUser as NavigationUser, NewsCard, NewsCardList, type NewsCardListProps, type NewsCardProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Picture, type PictureProps, PracticeCard, type PracticeCardProps, PracticePathCards, type PracticePathCardsProps, QuoteSectionBlock, type QuoteSectionBlockProps, ResourceCardItem, type ResourceCardItemProps, type ResourceItem, type ResourceItemType, type ResourceView, ResourcesGridList, type ResourcesGridListProps, Search, type SearchProps, Sidebar, type SidebarCategory, type SidebarProps, type SortOption, type TButtonVariant, Teaser5050With3Text, type Teaser5050With3TextProps, Teaser5050WithCta, type Teaser5050WithCtaProps, Text, TextBody, type TextBodyProps, TextCenterCtaInBottom, type TextCenterCtaInBottomProps, TextCenterWithMedia, type TextCenterWithMediaProps, TextEvent, type TextEventProps, type TextProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
|
|
1240
|
+
export { Anchor, type AnchorProps, Badge, type BadgeProps, BlogCardGrid, type BlogCardGridProps, BlogPost, BlogPostContent, type BlogPostContentProps, type BlogPostProps, BlogSearchResultsList, type BlogSearchResultsListProps, BrandCard, type BrandCardProps, BrandsStrip, type BrandsStripProps, BrandsTab, type BrandsTabProps, Button, type ButtonProps, Card, CardCollection, type CardCollectionProps, type CardProps, ColTextMenu, type ColTextMenuProps, ConditionalWrapper, type ConditionalWrapperProps, ContactModule, type ContactModuleProps, Container, type ContainerProps, CountingCard, type CountingCardProps, EventList, type EventListProps, FeaturedNewsHighlights, type FeaturedNewsHighlightsProps, FilterBar, type FilterBarProps, type FilterOption, Footer, type FooterProps, GlobalSearchResultsList, type GlobalSearchResultsListProps, type GridItemProps, type GridProps, HeroBanner, HeroBannerCarousel, type HeroBannerCarouselProps, type HeroBannerProps, type IColTextMenuItem, type ICta, type ICtaHoverLogo, type ICtaIcon, type ICtaLogo, type IFooterSupportGroup, type IPicture, type ITwoColTextMenuSection, Icon, type IconType, InfoCard, type InfoCardProps, Input, type InputProps, InternalBrandsTab, type InternalBrandsTabProps, type UserMenuItem as InternalNavMenuItem, Loader, type LoaderProps, LocationsBrandCards, type LocationsBrandCardsProps, MiniBanner, type MiniBannerProps, MiniSectionCta, type MiniSectionCtaProps, type NavItem, Navigation, type NavigationBrandBar, type NavigationProps, type UserMenuUser as NavigationUser, NewsCard, NewsCardList, type NewsCardListProps, type NewsCardProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Picture, type PictureProps, PracticeCard, type PracticeCardProps, PracticePathCards, type PracticePathCardsProps, QuoteSectionBlock, type QuoteSectionBlockProps, ResourceCardItem, type ResourceCardItemProps, type ResourceItem, type ResourceItemType, type ResourceView, ResourcesGridList, type ResourcesGridListProps, Search, type SearchProps, Sidebar, type SidebarCategory, type SidebarProps, type SortOption, type TButtonVariant, Teaser5050With3Text, type Teaser5050With3TextProps, Teaser5050WithCta, type Teaser5050WithCtaProps, Text, TextBody, type TextBodyProps, TextCenterCtaInBottom, type TextCenterCtaInBottomProps, TextCenterWithMedia, type TextCenterWithMediaProps, TextEvent, type TextEventProps, type TextProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
|
package/dist/index.d.ts
CHANGED
|
@@ -1179,6 +1179,36 @@ declare const LocationsBrandCards: (({ className, title, subtitle, image, cards,
|
|
|
1179
1179
|
Text: ({ children }: LocationsBrandCardsTextProps) => react.JSX.Element;
|
|
1180
1180
|
};
|
|
1181
1181
|
|
|
1182
|
+
interface BrandTab {
|
|
1183
|
+
trigger: {
|
|
1184
|
+
default: string | {
|
|
1185
|
+
src: string;
|
|
1186
|
+
alt: string;
|
|
1187
|
+
};
|
|
1188
|
+
active: string | {
|
|
1189
|
+
src: string;
|
|
1190
|
+
alt: string;
|
|
1191
|
+
};
|
|
1192
|
+
};
|
|
1193
|
+
content?: {
|
|
1194
|
+
title?: string;
|
|
1195
|
+
description: React.ReactNode | string;
|
|
1196
|
+
logo?: IPicture;
|
|
1197
|
+
textColor?: string;
|
|
1198
|
+
}[];
|
|
1199
|
+
image?: IPicture;
|
|
1200
|
+
cta?: ICtaLogo;
|
|
1201
|
+
theme: string;
|
|
1202
|
+
}
|
|
1203
|
+
interface BrandsTabProps {
|
|
1204
|
+
title?: string;
|
|
1205
|
+
className?: string;
|
|
1206
|
+
subtitle?: React.ReactNode;
|
|
1207
|
+
tabs?: BrandTab[];
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
declare const BrandsTab: (props: BrandsTabProps) => react.JSX.Element;
|
|
1211
|
+
|
|
1182
1212
|
/** Tracks the current browser path, updating on back/forward navigation. */
|
|
1183
1213
|
declare const useActivePath: () => string;
|
|
1184
1214
|
|
|
@@ -1207,4 +1237,4 @@ type SlotMap = Record<string, SlotComponent>;
|
|
|
1207
1237
|
*/
|
|
1208
1238
|
declare function resolveCompoundSlots(children: ReactNode, slots: SlotMap): Record<string, ReactNode>;
|
|
1209
1239
|
|
|
1210
|
-
export { Anchor, type AnchorProps, Badge, type BadgeProps, BlogCardGrid, type BlogCardGridProps, BlogPost, BlogPostContent, type BlogPostContentProps, type BlogPostProps, BlogSearchResultsList, type BlogSearchResultsListProps, BrandCard, type BrandCardProps, BrandsStrip, type BrandsStripProps, Button, type ButtonProps, Card, CardCollection, type CardCollectionProps, type CardProps, ColTextMenu, type ColTextMenuProps, ConditionalWrapper, type ConditionalWrapperProps, ContactModule, type ContactModuleProps, Container, type ContainerProps, CountingCard, type CountingCardProps, EventList, type EventListProps, FeaturedNewsHighlights, type FeaturedNewsHighlightsProps, FilterBar, type FilterBarProps, type FilterOption, Footer, type FooterProps, GlobalSearchResultsList, type GlobalSearchResultsListProps, type GridItemProps, type GridProps, HeroBanner, HeroBannerCarousel, type HeroBannerCarouselProps, type HeroBannerProps, type IColTextMenuItem, type ICta, type ICtaHoverLogo, type ICtaIcon, type ICtaLogo, type IFooterSupportGroup, type IPicture, type ITwoColTextMenuSection, Icon, type IconType, InfoCard, type InfoCardProps, Input, type InputProps, InternalBrandsTab, type InternalBrandsTabProps, type UserMenuItem as InternalNavMenuItem, Loader, type LoaderProps, LocationsBrandCards, type LocationsBrandCardsProps, MiniBanner, type MiniBannerProps, MiniSectionCta, type MiniSectionCtaProps, type NavItem, Navigation, type NavigationBrandBar, type NavigationProps, type UserMenuUser as NavigationUser, NewsCard, NewsCardList, type NewsCardListProps, type NewsCardProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Picture, type PictureProps, PracticeCard, type PracticeCardProps, PracticePathCards, type PracticePathCardsProps, QuoteSectionBlock, type QuoteSectionBlockProps, ResourceCardItem, type ResourceCardItemProps, type ResourceItem, type ResourceItemType, type ResourceView, ResourcesGridList, type ResourcesGridListProps, Search, type SearchProps, Sidebar, type SidebarCategory, type SidebarProps, type SortOption, type TButtonVariant, Teaser5050With3Text, type Teaser5050With3TextProps, Teaser5050WithCta, type Teaser5050WithCtaProps, Text, TextBody, type TextBodyProps, TextCenterCtaInBottom, type TextCenterCtaInBottomProps, TextCenterWithMedia, type TextCenterWithMediaProps, TextEvent, type TextEventProps, type TextProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
|
|
1240
|
+
export { Anchor, type AnchorProps, Badge, type BadgeProps, BlogCardGrid, type BlogCardGridProps, BlogPost, BlogPostContent, type BlogPostContentProps, type BlogPostProps, BlogSearchResultsList, type BlogSearchResultsListProps, BrandCard, type BrandCardProps, BrandsStrip, type BrandsStripProps, BrandsTab, type BrandsTabProps, Button, type ButtonProps, Card, CardCollection, type CardCollectionProps, type CardProps, ColTextMenu, type ColTextMenuProps, ConditionalWrapper, type ConditionalWrapperProps, ContactModule, type ContactModuleProps, Container, type ContainerProps, CountingCard, type CountingCardProps, EventList, type EventListProps, FeaturedNewsHighlights, type FeaturedNewsHighlightsProps, FilterBar, type FilterBarProps, type FilterOption, Footer, type FooterProps, GlobalSearchResultsList, type GlobalSearchResultsListProps, type GridItemProps, type GridProps, HeroBanner, HeroBannerCarousel, type HeroBannerCarouselProps, type HeroBannerProps, type IColTextMenuItem, type ICta, type ICtaHoverLogo, type ICtaIcon, type ICtaLogo, type IFooterSupportGroup, type IPicture, type ITwoColTextMenuSection, Icon, type IconType, InfoCard, type InfoCardProps, Input, type InputProps, InternalBrandsTab, type InternalBrandsTabProps, type UserMenuItem as InternalNavMenuItem, Loader, type LoaderProps, LocationsBrandCards, type LocationsBrandCardsProps, MiniBanner, type MiniBannerProps, MiniSectionCta, type MiniSectionCtaProps, type NavItem, Navigation, type NavigationBrandBar, type NavigationProps, type UserMenuUser as NavigationUser, NewsCard, NewsCardList, type NewsCardListProps, type NewsCardProps, PageLoader, type PageLoaderProps, Pagination, type PaginationProps, Picture, type PictureProps, PracticeCard, type PracticeCardProps, PracticePathCards, type PracticePathCardsProps, QuoteSectionBlock, type QuoteSectionBlockProps, ResourceCardItem, type ResourceCardItemProps, type ResourceItem, type ResourceItemType, type ResourceView, ResourcesGridList, type ResourcesGridListProps, Search, type SearchProps, Sidebar, type SidebarCategory, type SidebarProps, type SortOption, type TButtonVariant, Teaser5050With3Text, type Teaser5050With3TextProps, Teaser5050WithCta, type Teaser5050WithCtaProps, Text, TextBody, type TextBodyProps, TextCenterCtaInBottom, type TextCenterCtaInBottomProps, TextCenterWithMedia, type TextCenterWithMediaProps, TextEvent, type TextEventProps, type TextProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
|
package/dist/index.mjs
CHANGED
|
@@ -2848,6 +2848,7 @@ var AccordionItem = ({
|
|
|
2848
2848
|
children,
|
|
2849
2849
|
isOpen = false,
|
|
2850
2850
|
onToggle,
|
|
2851
|
+
renderItemHeader,
|
|
2851
2852
|
className
|
|
2852
2853
|
}) => {
|
|
2853
2854
|
const contentRef = useRef(null);
|
|
@@ -2898,7 +2899,10 @@ var AccordionItem = ({
|
|
|
2898
2899
|
className
|
|
2899
2900
|
),
|
|
2900
2901
|
children: [
|
|
2901
|
-
|
|
2902
|
+
renderItemHeader ? renderItemHeader({
|
|
2903
|
+
isOpen,
|
|
2904
|
+
toggle: handleToggle
|
|
2905
|
+
}) : /* @__PURE__ */ jsxs(
|
|
2902
2906
|
"button",
|
|
2903
2907
|
{
|
|
2904
2908
|
className: clsx50(Accordion_module_default.accordionHeader, {
|
|
@@ -2925,12 +2929,20 @@ var AccordionItem = ({
|
|
|
2925
2929
|
"div",
|
|
2926
2930
|
{
|
|
2927
2931
|
ref: contentRef,
|
|
2928
|
-
className: Accordion_module_default.accordionContent,
|
|
2932
|
+
className: clsx50("accordionContent", Accordion_module_default.accordionContent),
|
|
2929
2933
|
style: {
|
|
2930
2934
|
overflow: "hidden",
|
|
2931
2935
|
height: 0
|
|
2932
2936
|
},
|
|
2933
|
-
|
|
2937
|
+
inert: !isOpen,
|
|
2938
|
+
children: /* @__PURE__ */ jsx(
|
|
2939
|
+
"div",
|
|
2940
|
+
{
|
|
2941
|
+
ref: contentInnerRef,
|
|
2942
|
+
className: clsx50("accordionContentInner", Accordion_module_default.accordionContentInner),
|
|
2943
|
+
children
|
|
2944
|
+
}
|
|
2945
|
+
)
|
|
2934
2946
|
}
|
|
2935
2947
|
)
|
|
2936
2948
|
]
|
|
@@ -2964,17 +2976,20 @@ var Accordion = ({
|
|
|
2964
2976
|
if (items.length === 0) {
|
|
2965
2977
|
return null;
|
|
2966
2978
|
}
|
|
2967
|
-
return /* @__PURE__ */ jsx("div", { className: clsx50(Accordion_module_default.accordion, className), children: items.map((item) =>
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2979
|
+
return /* @__PURE__ */ jsx("div", { className: clsx50(Accordion_module_default.accordion, className), children: items.map((item) => {
|
|
2980
|
+
return /* @__PURE__ */ jsx(
|
|
2981
|
+
AccordionItem,
|
|
2982
|
+
{
|
|
2983
|
+
id: item.id,
|
|
2984
|
+
title: item.title,
|
|
2985
|
+
isOpen: openIds.includes(item.id),
|
|
2986
|
+
onToggle: handleToggle,
|
|
2987
|
+
renderItemHeader: item.renderItemHeader,
|
|
2988
|
+
children: item.content
|
|
2989
|
+
},
|
|
2990
|
+
item.id
|
|
2991
|
+
);
|
|
2992
|
+
}) });
|
|
2978
2993
|
};
|
|
2979
2994
|
|
|
2980
2995
|
// src/widgets/InternalBrandsTab/InternalBrandsTab.module.scss
|
|
@@ -3265,11 +3280,12 @@ var MiniSectionCta = ({
|
|
|
3265
3280
|
});
|
|
3266
3281
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
3267
3282
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
3283
|
+
const hasModuleStyles = moduleStyles && Object.values(moduleStyles).length > 0;
|
|
3268
3284
|
return /* @__PURE__ */ jsx(
|
|
3269
3285
|
"div",
|
|
3270
3286
|
{
|
|
3271
3287
|
className: clsx50(MiniSectionCta_module_default.miniSectionCta, MiniSectionCta_module_default[variant], theme && MiniSectionCta_module_default[theme], className),
|
|
3272
|
-
style: __spreadValues({},
|
|
3288
|
+
style: __spreadValues({}, hasModuleStyles && {
|
|
3273
3289
|
"--custom-background-color": moduleStyles.backgroundColor,
|
|
3274
3290
|
"--custom-color": moduleStyles.color
|
|
3275
3291
|
}),
|
|
@@ -4252,18 +4268,19 @@ var Teaser5050WithCta = ({
|
|
|
4252
4268
|
});
|
|
4253
4269
|
const titleNode = (_a = slots.title) != null ? _a : title;
|
|
4254
4270
|
const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
|
|
4271
|
+
const hasModuleStyles = moduleStyles && Object.values(moduleStyles).length > 0;
|
|
4255
4272
|
return /* @__PURE__ */ jsx(
|
|
4256
4273
|
"div",
|
|
4257
4274
|
{
|
|
4258
4275
|
className: clsx50(Teaser5050WithCta_module_default.teaser5050, Teaser5050WithCta_module_default[variant], className),
|
|
4259
|
-
style: __spreadValues({},
|
|
4276
|
+
style: __spreadValues({}, hasModuleStyles && {
|
|
4260
4277
|
"--custom-background-color": moduleStyles.backgroundColor,
|
|
4261
4278
|
"--custom-color": moduleStyles.color
|
|
4262
4279
|
}),
|
|
4263
4280
|
children: /* @__PURE__ */ jsxs(Container, { className: Teaser5050WithCta_module_default.container, children: [
|
|
4264
4281
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.wrapper, children: [
|
|
4265
4282
|
/* @__PURE__ */ jsxs("div", { className: Teaser5050WithCta_module_default.content, children: [
|
|
4266
|
-
titleNode && /* @__PURE__ */ jsx("div", { className: clsx50(Teaser5050WithCta_module_default.title
|
|
4283
|
+
titleNode && /* @__PURE__ */ jsx("div", { className: clsx50("h3", Teaser5050WithCta_module_default.title), children: titleNode }),
|
|
4267
4284
|
subtitleNode && /* @__PURE__ */ jsx("div", { className: clsx50("subheading", Teaser5050WithCta_module_default.subheading), children: subtitleNode })
|
|
4268
4285
|
] }),
|
|
4269
4286
|
/* @__PURE__ */ jsx("div", { className: Teaser5050WithCta_module_default.ctaWrapper, children: ctas.map((cta, key) => /* @__PURE__ */ jsx(
|
|
@@ -4703,7 +4720,7 @@ var ResourcesGridList = ({
|
|
|
4703
4720
|
if (isMobile) setIsSidebarOpen(false);
|
|
4704
4721
|
setTimeout(() => {
|
|
4705
4722
|
var _a3;
|
|
4706
|
-
(_a3 = widgetRef.current) == null ? void 0 : _a3.scrollIntoView({ behavior: "smooth" });
|
|
4723
|
+
(_a3 = widgetRef.current) == null ? void 0 : _a3.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
4707
4724
|
}, 200);
|
|
4708
4725
|
};
|
|
4709
4726
|
const handleFilterChange = (value) => {
|
|
@@ -4816,7 +4833,13 @@ var ResourcesGridList = ({
|
|
|
4816
4833
|
currentPage: safeCurrentPage,
|
|
4817
4834
|
totalPages,
|
|
4818
4835
|
loop: false,
|
|
4819
|
-
onPageChange:
|
|
4836
|
+
onPageChange: (page) => {
|
|
4837
|
+
setCurrentPage(page);
|
|
4838
|
+
setTimeout(() => {
|
|
4839
|
+
var _a2;
|
|
4840
|
+
(_a2 = widgetRef.current) == null ? void 0 : _a2.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
4841
|
+
}, 200);
|
|
4842
|
+
}
|
|
4820
4843
|
},
|
|
4821
4844
|
`${selectedCategory}-${filterValue}-${sortValue}-${searchQuery}`
|
|
4822
4845
|
)
|
|
@@ -5650,6 +5673,193 @@ var LocationsBrandCards = ({
|
|
|
5650
5673
|
var LocationsBrandCards2 = Object.assign(LocationsBrandCards, {
|
|
5651
5674
|
Text: LocationsBrandCardsText
|
|
5652
5675
|
});
|
|
5676
|
+
|
|
5677
|
+
// src/widgets/BrandsTab/BrandsTab.module.scss
|
|
5678
|
+
var BrandsTab_module_default = {
|
|
5679
|
+
"brands-tab": "BrandsTab_module_brands-tab",
|
|
5680
|
+
"text-container": "BrandsTab_module_text-container",
|
|
5681
|
+
title: "BrandsTab_module_title",
|
|
5682
|
+
"tab-wrapper": "BrandsTab_module_tab-wrapper",
|
|
5683
|
+
"tab-buttons": "BrandsTab_module_tab-buttons",
|
|
5684
|
+
"tab-trigger": "BrandsTab_module_tab-trigger",
|
|
5685
|
+
"tab-active": "BrandsTab_module_tab-active",
|
|
5686
|
+
"tab-content-area": "BrandsTab_module_tab-content-area",
|
|
5687
|
+
"content-cards": "BrandsTab_module_content-cards",
|
|
5688
|
+
card: "BrandsTab_module_card",
|
|
5689
|
+
"card-header": "BrandsTab_module_card-header",
|
|
5690
|
+
"card-logo": "BrandsTab_module_card-logo",
|
|
5691
|
+
"content-side": "BrandsTab_module_content-side",
|
|
5692
|
+
"card-cta": "BrandsTab_module_card-cta",
|
|
5693
|
+
"card-image": "BrandsTab_module_card-image",
|
|
5694
|
+
accordion: "BrandsTab_module_accordion",
|
|
5695
|
+
"accordion-header": "BrandsTab_module_accordion-header",
|
|
5696
|
+
"accordion-header-open": "BrandsTab_module_accordion-header-open",
|
|
5697
|
+
"accordion-content": "BrandsTab_module_accordion-content",
|
|
5698
|
+
"card-description": "BrandsTab_module_card-description"
|
|
5699
|
+
};
|
|
5700
|
+
var BrandsTab = (props) => {
|
|
5701
|
+
var _a, _b, _c;
|
|
5702
|
+
const { title, subtitle, className, tabs } = props;
|
|
5703
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
5704
|
+
const { is } = useViewPort_default();
|
|
5705
|
+
const isTabletBelow = is("tablet", "below");
|
|
5706
|
+
const accordionItems = useMemo(() => {
|
|
5707
|
+
return (tabs == null ? void 0 : tabs.map((tab, index) => {
|
|
5708
|
+
var _a2, _b2, _c2, _d, _e;
|
|
5709
|
+
return {
|
|
5710
|
+
id: index,
|
|
5711
|
+
title: typeof tab.trigger.active === "string" ? tab.trigger.active : /* @__PURE__ */ jsx(Picture, __spreadValues({}, tab.trigger.active)),
|
|
5712
|
+
content: /* @__PURE__ */ jsxs(
|
|
5713
|
+
"div",
|
|
5714
|
+
{
|
|
5715
|
+
className: clsx50(BrandsTab_module_default["accordion-content"]),
|
|
5716
|
+
style: {
|
|
5717
|
+
"--theme-color": `var(${tab.theme})`
|
|
5718
|
+
},
|
|
5719
|
+
children: [
|
|
5720
|
+
(_a2 = tab == null ? void 0 : tab.content) == null ? void 0 : _a2.map((content) => {
|
|
5721
|
+
return /* @__PURE__ */ jsxs(
|
|
5722
|
+
"div",
|
|
5723
|
+
{
|
|
5724
|
+
className: BrandsTab_module_default["card"],
|
|
5725
|
+
style: {
|
|
5726
|
+
"--theme-text-color": `var(${content.textColor})`
|
|
5727
|
+
},
|
|
5728
|
+
children: [
|
|
5729
|
+
/* @__PURE__ */ jsxs("div", { className: BrandsTab_module_default["card-header"], children: [
|
|
5730
|
+
content.logo && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: BrandsTab_module_default["card-logo"] }, content.logo)),
|
|
5731
|
+
/* @__PURE__ */ jsx("h3", { className: clsx50("h4", BrandsTab_module_default["card-title"]), children: content.title })
|
|
5732
|
+
] }),
|
|
5733
|
+
/* @__PURE__ */ jsx("div", { className: BrandsTab_module_default["card-description"], children: content.description })
|
|
5734
|
+
]
|
|
5735
|
+
},
|
|
5736
|
+
`${content.title}-${index}`
|
|
5737
|
+
);
|
|
5738
|
+
}),
|
|
5739
|
+
tab.image && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, tab.image), { className: BrandsTab_module_default["card-image"] })),
|
|
5740
|
+
/* @__PURE__ */ jsx(
|
|
5741
|
+
Button,
|
|
5742
|
+
{
|
|
5743
|
+
variant: "secondary",
|
|
5744
|
+
className: BrandsTab_module_default["card-cta"],
|
|
5745
|
+
logo: (_b2 = tab.cta) == null ? void 0 : _b2.logo,
|
|
5746
|
+
title: (_c2 = tab.cta) == null ? void 0 : _c2.label,
|
|
5747
|
+
children: /* @__PURE__ */ jsx("span", { "aria-label": (_d = tab.cta) == null ? void 0 : _d.label, children: (_e = tab.cta) == null ? void 0 : _e.label })
|
|
5748
|
+
}
|
|
5749
|
+
)
|
|
5750
|
+
]
|
|
5751
|
+
}
|
|
5752
|
+
),
|
|
5753
|
+
renderItemHeader: ({ isOpen, toggle }) => {
|
|
5754
|
+
return /* @__PURE__ */ jsxs(
|
|
5755
|
+
"button",
|
|
5756
|
+
{
|
|
5757
|
+
className: clsx50(BrandsTab_module_default["accordion-header"], {
|
|
5758
|
+
[BrandsTab_module_default["accordion-header-open"]]: isOpen
|
|
5759
|
+
}),
|
|
5760
|
+
style: {
|
|
5761
|
+
"--theme-color": `var(${tab.theme})`
|
|
5762
|
+
},
|
|
5763
|
+
onClick: toggle,
|
|
5764
|
+
"aria-expanded": isOpen,
|
|
5765
|
+
"aria-label": `Toggle accordion item #${index + 1}`,
|
|
5766
|
+
children: [
|
|
5767
|
+
typeof tab.trigger.active === "string" ? tab.trigger.active : /* @__PURE__ */ jsx(Picture, __spreadValues({}, tab.trigger.active)),
|
|
5768
|
+
/* @__PURE__ */ jsx(
|
|
5769
|
+
"span",
|
|
5770
|
+
{
|
|
5771
|
+
className: clsx50(BrandsTab_module_default.accordionChevron, {
|
|
5772
|
+
[BrandsTab_module_default.accordionChevronOpen]: isOpen
|
|
5773
|
+
}),
|
|
5774
|
+
children: isOpen ? /* @__PURE__ */ jsx(Icon, { type: "filledChevronUp", size: 40 }) : /* @__PURE__ */ jsx(Icon, { type: "circleChevronDown", size: 40 })
|
|
5775
|
+
}
|
|
5776
|
+
)
|
|
5777
|
+
]
|
|
5778
|
+
}
|
|
5779
|
+
);
|
|
5780
|
+
}
|
|
5781
|
+
};
|
|
5782
|
+
})) || [];
|
|
5783
|
+
}, [tabs]);
|
|
5784
|
+
return /* @__PURE__ */ jsxs(Container, { className: clsx50(BrandsTab_module_default["brands-tab"], className), children: [
|
|
5785
|
+
/* @__PURE__ */ jsxs("div", { className: BrandsTab_module_default["text-container"], children: [
|
|
5786
|
+
title && /* @__PURE__ */ jsx(Text, { tag: "h2", className: BrandsTab_module_default.title, children: title }),
|
|
5787
|
+
subtitle && /* @__PURE__ */ jsx("div", { className: clsx50("subheading", BrandsTab_module_default.subtitle), children: subtitle })
|
|
5788
|
+
] }),
|
|
5789
|
+
isTabletBelow ? /* @__PURE__ */ jsx(
|
|
5790
|
+
Accordion,
|
|
5791
|
+
{
|
|
5792
|
+
items: accordionItems,
|
|
5793
|
+
allowMultiple: true,
|
|
5794
|
+
defaultOpenIds: [],
|
|
5795
|
+
className: clsx50(BrandsTab_module_default["accordion"])
|
|
5796
|
+
}
|
|
5797
|
+
) : /* @__PURE__ */ jsxs("div", { className: BrandsTab_module_default["tab-wrapper"], children: [
|
|
5798
|
+
/* @__PURE__ */ jsx("div", { className: BrandsTab_module_default["tab-buttons"], children: tabs == null ? void 0 : tabs.map(({ trigger, theme }, index) => {
|
|
5799
|
+
const isActive = activeIndex === index;
|
|
5800
|
+
return /* @__PURE__ */ jsx(
|
|
5801
|
+
Button,
|
|
5802
|
+
{
|
|
5803
|
+
variant: "tabbutton",
|
|
5804
|
+
onClick: () => setActiveIndex(index),
|
|
5805
|
+
isActive,
|
|
5806
|
+
className: clsx50(BrandsTab_module_default["tab-trigger"], isActive ? BrandsTab_module_default["tab-active"] : null),
|
|
5807
|
+
style: {
|
|
5808
|
+
"--theme-color": `var(${theme})`
|
|
5809
|
+
},
|
|
5810
|
+
children: trigger ? isActive ? typeof trigger.active === "string" ? /* @__PURE__ */ jsx("span", { children: trigger.active }) : /* @__PURE__ */ jsx(Picture, __spreadValues({}, trigger.active)) : typeof trigger.default === "string" ? /* @__PURE__ */ jsx("span", { children: trigger.default }) : /* @__PURE__ */ jsx(Picture, __spreadValues({}, trigger.default)) : null
|
|
5811
|
+
},
|
|
5812
|
+
index
|
|
5813
|
+
);
|
|
5814
|
+
}) }),
|
|
5815
|
+
/* @__PURE__ */ jsxs(
|
|
5816
|
+
"div",
|
|
5817
|
+
{
|
|
5818
|
+
className: clsx50(BrandsTab_module_default["tab-content-area"]),
|
|
5819
|
+
style: {
|
|
5820
|
+
"--theme-color": `var(${tabs == null ? void 0 : tabs[activeIndex].theme})`
|
|
5821
|
+
},
|
|
5822
|
+
children: [
|
|
5823
|
+
/* @__PURE__ */ jsx("div", { className: BrandsTab_module_default["content-cards"], children: (_a = tabs == null ? void 0 : tabs[activeIndex].content) == null ? void 0 : _a.map((content, index) => {
|
|
5824
|
+
return /* @__PURE__ */ jsxs(
|
|
5825
|
+
"div",
|
|
5826
|
+
{
|
|
5827
|
+
className: BrandsTab_module_default["card"],
|
|
5828
|
+
style: {
|
|
5829
|
+
"--theme-text-color": `var(${content.textColor})`
|
|
5830
|
+
},
|
|
5831
|
+
children: [
|
|
5832
|
+
/* @__PURE__ */ jsxs("div", { className: BrandsTab_module_default["card-header"], children: [
|
|
5833
|
+
content.logo && /* @__PURE__ */ jsx(Picture, __spreadValues({ className: BrandsTab_module_default["card-logo"] }, content.logo)),
|
|
5834
|
+
/* @__PURE__ */ jsx("h3", { className: clsx50("h4", BrandsTab_module_default["card-title"]), children: content.title })
|
|
5835
|
+
] }),
|
|
5836
|
+
/* @__PURE__ */ jsx("div", { className: BrandsTab_module_default["card-description"], children: content.description })
|
|
5837
|
+
]
|
|
5838
|
+
},
|
|
5839
|
+
`${content.title}-${index}`
|
|
5840
|
+
);
|
|
5841
|
+
}) }),
|
|
5842
|
+
/* @__PURE__ */ jsxs("div", { className: BrandsTab_module_default["content-side"], children: [
|
|
5843
|
+
(tabs == null ? void 0 : tabs[activeIndex].image) && /* @__PURE__ */ jsx(Picture, __spreadProps(__spreadValues({}, tabs == null ? void 0 : tabs[activeIndex].image), { className: BrandsTab_module_default["card-image"] })),
|
|
5844
|
+
/* @__PURE__ */ jsx(
|
|
5845
|
+
Button,
|
|
5846
|
+
{
|
|
5847
|
+
variant: "secondary",
|
|
5848
|
+
className: BrandsTab_module_default["card-cta"],
|
|
5849
|
+
logo: (_b = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _b.logo,
|
|
5850
|
+
children: (_c = tabs == null ? void 0 : tabs[activeIndex].cta) == null ? void 0 : _c.label
|
|
5851
|
+
}
|
|
5852
|
+
)
|
|
5853
|
+
] })
|
|
5854
|
+
]
|
|
5855
|
+
}
|
|
5856
|
+
)
|
|
5857
|
+
] })
|
|
5858
|
+
] });
|
|
5859
|
+
};
|
|
5860
|
+
|
|
5861
|
+
// src/widgets/BrandsTab/index.tsx
|
|
5862
|
+
var BrandsTab2 = Object.assign(BrandsTab, {});
|
|
5653
5863
|
function useIntersectionObserver({
|
|
5654
5864
|
animateOnce = false,
|
|
5655
5865
|
options = {}
|
|
@@ -5679,6 +5889,6 @@ function useIntersectionObserver({
|
|
|
5679
5889
|
return { observeRef, isVisible };
|
|
5680
5890
|
}
|
|
5681
5891
|
|
|
5682
|
-
export { Anchor, Badge, BlogCardGrid2 as BlogCardGrid, BlogPost2 as BlogPost, BlogPostContent2 as BlogPostContent, BlogSearchResultsList2 as BlogSearchResultsList, BrandCard, BrandsStrip, Button, Card2 as Card, CardCollection2 as CardCollection, ColTextMenu, ConditionalWrapper, ContactModule2 as ContactModule, Container, CountingCard2 as CountingCard, EventList2 as EventList, FeaturedNewsHighlights2 as FeaturedNewsHighlights, FilterBar, Footer, GlobalSearchResultsList2 as GlobalSearchResultsList, HeroBanner2 as HeroBanner, HeroBannerCarousel, Icon, InfoCard2 as InfoCard, Input, InternalBrandsTab2 as InternalBrandsTab, Loader, LocationsBrandCards2 as LocationsBrandCards, MiniBanner2 as MiniBanner, MiniSectionCta2 as MiniSectionCta, Navigation3 as Navigation, NewsCard, NewsCardList2 as NewsCardList, PageLoader2 as PageLoader, Pagination, Picture, PracticeCard, PracticePathCards2 as PracticePathCards, QuoteSectionBlock, ResourceCardItem, ResourcesGridList, Search, Sidebar, Teaser5050With3Text2 as Teaser5050With3Text, Teaser5050WithCta2 as Teaser5050WithCta, Text, TextBody2 as TextBody, TextCenterCtaInBottom2 as TextCenterCtaInBottom, TextCenterWithMedia2 as TextCenterWithMedia, TextEvent2 as TextEvent, TwoColTextMenu, UpcomingEventCard, UserMenu, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
|
|
5892
|
+
export { Anchor, Badge, BlogCardGrid2 as BlogCardGrid, BlogPost2 as BlogPost, BlogPostContent2 as BlogPostContent, BlogSearchResultsList2 as BlogSearchResultsList, BrandCard, BrandsStrip, BrandsTab2 as BrandsTab, Button, Card2 as Card, CardCollection2 as CardCollection, ColTextMenu, ConditionalWrapper, ContactModule2 as ContactModule, Container, CountingCard2 as CountingCard, EventList2 as EventList, FeaturedNewsHighlights2 as FeaturedNewsHighlights, FilterBar, Footer, GlobalSearchResultsList2 as GlobalSearchResultsList, HeroBanner2 as HeroBanner, HeroBannerCarousel, Icon, InfoCard2 as InfoCard, Input, InternalBrandsTab2 as InternalBrandsTab, Loader, LocationsBrandCards2 as LocationsBrandCards, MiniBanner2 as MiniBanner, MiniSectionCta2 as MiniSectionCta, Navigation3 as Navigation, NewsCard, NewsCardList2 as NewsCardList, PageLoader2 as PageLoader, Pagination, Picture, PracticeCard, PracticePathCards2 as PracticePathCards, QuoteSectionBlock, ResourceCardItem, ResourcesGridList, Search, Sidebar, Teaser5050With3Text2 as Teaser5050With3Text, Teaser5050WithCta2 as Teaser5050WithCta, Text, TextBody2 as TextBody, TextCenterCtaInBottom2 as TextCenterCtaInBottom, TextCenterWithMedia2 as TextCenterWithMedia, TextEvent2 as TextEvent, TwoColTextMenu, UpcomingEventCard, UserMenu, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
|
|
5683
5893
|
//# sourceMappingURL=index.mjs.map
|
|
5684
5894
|
//# sourceMappingURL=index.mjs.map
|