@digital-b2c/coreui-kit 0.20.0 → 0.21.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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import react__default, { ImgHTMLAttributes, AnchorHTMLAttributes, ReactNode, Ref, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, PropsWithChildren, JSX, FC, RefObject, CSSProperties } from 'react';
2
+ import react__default, { ImgHTMLAttributes, AnchorHTMLAttributes, ReactNode, MouseEventHandler, Ref, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, PropsWithChildren, JSX, FC, RefObject, CSSProperties } from 'react';
3
3
 
4
4
  interface IPicture {
5
5
  src: string;
@@ -154,12 +154,13 @@ interface CardProps {
154
154
  icon?: IconType;
155
155
  logo?: IPicture;
156
156
  cta?: ICtaLogo & ICtaIcon;
157
+ onCtaClick?: MouseEventHandler<HTMLElement>;
157
158
  children?: ReactNode;
158
159
  ref?: Ref<HTMLDivElement>;
159
160
  }
160
161
 
161
162
  declare const Card: {
162
- ({ className, variant, title, subtitle, cta, icon, logo, children, ref, }: CardProps): react.JSX.Element;
163
+ ({ className, variant, title, subtitle, cta, onCtaClick, icon, logo, children, ref, }: CardProps): react.JSX.Element;
163
164
  displayName: string;
164
165
  } & {
165
166
  Title: ({ children }: CardTitleProps) => react.JSX.Element;
@@ -243,6 +244,24 @@ declare const InfoCard: (({ className, title, subtitle, icon, badge, children }:
243
244
  Subtitle: ({ children }: InfoCardSubtitleProps) => react.JSX.Element;
244
245
  };
245
246
 
247
+ interface ModalProps {
248
+ className?: string;
249
+ /** Applied to the white panel that holds the close button and the content */
250
+ contentClassName?: string;
251
+ isOpen: boolean;
252
+ onClose: () => void;
253
+ ariaLabel?: string;
254
+ closeLabel?: string;
255
+ /** Hides the default close button, e.g. when the content provides its own */
256
+ hideCloseButton?: boolean;
257
+ children?: ReactNode;
258
+ }
259
+
260
+ declare const Modal: {
261
+ ({ className, contentClassName, isOpen, onClose, ariaLabel, closeLabel, hideCloseButton, children, }: ModalProps): react.JSX.Element;
262
+ displayName: string;
263
+ };
264
+
246
265
  interface PaginationProps {
247
266
  className?: string;
248
267
  totalPages: number;
@@ -534,6 +553,42 @@ interface BrandCardProps {
534
553
 
535
554
  declare const BrandCard: ({ theme, title, subtitle, image, animationSettings, className, }: BrandCardProps) => react.JSX.Element;
536
555
 
556
+ type CardCarouselFootnoteProps = {
557
+ children: ReactNode;
558
+ };
559
+
560
+ type CardCarouselSubtitleProps = {
561
+ children: ReactNode;
562
+ };
563
+
564
+ type CardCarouselTitleProps = {
565
+ children: ReactNode;
566
+ };
567
+
568
+ interface CardCarouselItem extends CardProps {
569
+ /** Blurs the card content, used as a teaser for gated modules */
570
+ isLocked?: boolean;
571
+ /** Opens the video in a modal on cta click instead of following the cta url */
572
+ videoUrl?: string;
573
+ }
574
+ interface CardCarouselProps {
575
+ className?: string;
576
+ title?: ReactNode;
577
+ subtitle?: ReactNode;
578
+ /** Disclaimer rendered below the carousel */
579
+ footnote?: ReactNode;
580
+ cards?: CardCarouselItem[];
581
+ theme?: 'dark' | 'light';
582
+ ariaLabel?: string;
583
+ children?: ReactNode;
584
+ }
585
+
586
+ declare const CardCarousel: (({ className, title, subtitle, footnote, cards, theme, ariaLabel, children, }: CardCarouselProps) => react.JSX.Element | null) & {
587
+ Title: ({ children }: CardCarouselTitleProps) => react.JSX.Element;
588
+ Subtitle: ({ children }: CardCarouselSubtitleProps) => react.JSX.Element;
589
+ Footnote: ({ children }: CardCarouselFootnoteProps) => react.JSX.Element;
590
+ };
591
+
537
592
  type CardCollectionSubtitleProps = {
538
593
  children: ReactNode;
539
594
  };
@@ -1249,4 +1304,4 @@ type SlotMap = Record<string, SlotComponent>;
1249
1304
  */
1250
1305
  declare function resolveCompoundSlots(children: ReactNode, slots: SlotMap): Record<string, ReactNode>;
1251
1306
 
1252
- 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, TimelineCards, type TimelineCardsProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
1307
+ 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, CardCarousel, type CardCarouselItem, type CardCarouselProps, 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, Modal, type ModalProps, 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, TimelineCards, type TimelineCardsProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import react__default, { ImgHTMLAttributes, AnchorHTMLAttributes, ReactNode, Ref, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, PropsWithChildren, JSX, FC, RefObject, CSSProperties } from 'react';
2
+ import react__default, { ImgHTMLAttributes, AnchorHTMLAttributes, ReactNode, MouseEventHandler, Ref, HTMLAttributes, ButtonHTMLAttributes, InputHTMLAttributes, PropsWithChildren, JSX, FC, RefObject, CSSProperties } from 'react';
3
3
 
4
4
  interface IPicture {
5
5
  src: string;
@@ -154,12 +154,13 @@ interface CardProps {
154
154
  icon?: IconType;
155
155
  logo?: IPicture;
156
156
  cta?: ICtaLogo & ICtaIcon;
157
+ onCtaClick?: MouseEventHandler<HTMLElement>;
157
158
  children?: ReactNode;
158
159
  ref?: Ref<HTMLDivElement>;
159
160
  }
160
161
 
161
162
  declare const Card: {
162
- ({ className, variant, title, subtitle, cta, icon, logo, children, ref, }: CardProps): react.JSX.Element;
163
+ ({ className, variant, title, subtitle, cta, onCtaClick, icon, logo, children, ref, }: CardProps): react.JSX.Element;
163
164
  displayName: string;
164
165
  } & {
165
166
  Title: ({ children }: CardTitleProps) => react.JSX.Element;
@@ -243,6 +244,24 @@ declare const InfoCard: (({ className, title, subtitle, icon, badge, children }:
243
244
  Subtitle: ({ children }: InfoCardSubtitleProps) => react.JSX.Element;
244
245
  };
245
246
 
247
+ interface ModalProps {
248
+ className?: string;
249
+ /** Applied to the white panel that holds the close button and the content */
250
+ contentClassName?: string;
251
+ isOpen: boolean;
252
+ onClose: () => void;
253
+ ariaLabel?: string;
254
+ closeLabel?: string;
255
+ /** Hides the default close button, e.g. when the content provides its own */
256
+ hideCloseButton?: boolean;
257
+ children?: ReactNode;
258
+ }
259
+
260
+ declare const Modal: {
261
+ ({ className, contentClassName, isOpen, onClose, ariaLabel, closeLabel, hideCloseButton, children, }: ModalProps): react.JSX.Element;
262
+ displayName: string;
263
+ };
264
+
246
265
  interface PaginationProps {
247
266
  className?: string;
248
267
  totalPages: number;
@@ -534,6 +553,42 @@ interface BrandCardProps {
534
553
 
535
554
  declare const BrandCard: ({ theme, title, subtitle, image, animationSettings, className, }: BrandCardProps) => react.JSX.Element;
536
555
 
556
+ type CardCarouselFootnoteProps = {
557
+ children: ReactNode;
558
+ };
559
+
560
+ type CardCarouselSubtitleProps = {
561
+ children: ReactNode;
562
+ };
563
+
564
+ type CardCarouselTitleProps = {
565
+ children: ReactNode;
566
+ };
567
+
568
+ interface CardCarouselItem extends CardProps {
569
+ /** Blurs the card content, used as a teaser for gated modules */
570
+ isLocked?: boolean;
571
+ /** Opens the video in a modal on cta click instead of following the cta url */
572
+ videoUrl?: string;
573
+ }
574
+ interface CardCarouselProps {
575
+ className?: string;
576
+ title?: ReactNode;
577
+ subtitle?: ReactNode;
578
+ /** Disclaimer rendered below the carousel */
579
+ footnote?: ReactNode;
580
+ cards?: CardCarouselItem[];
581
+ theme?: 'dark' | 'light';
582
+ ariaLabel?: string;
583
+ children?: ReactNode;
584
+ }
585
+
586
+ declare const CardCarousel: (({ className, title, subtitle, footnote, cards, theme, ariaLabel, children, }: CardCarouselProps) => react.JSX.Element | null) & {
587
+ Title: ({ children }: CardCarouselTitleProps) => react.JSX.Element;
588
+ Subtitle: ({ children }: CardCarouselSubtitleProps) => react.JSX.Element;
589
+ Footnote: ({ children }: CardCarouselFootnoteProps) => react.JSX.Element;
590
+ };
591
+
537
592
  type CardCollectionSubtitleProps = {
538
593
  children: ReactNode;
539
594
  };
@@ -1249,4 +1304,4 @@ type SlotMap = Record<string, SlotComponent>;
1249
1304
  */
1250
1305
  declare function resolveCompoundSlots(children: ReactNode, slots: SlotMap): Record<string, ReactNode>;
1251
1306
 
1252
- 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, TimelineCards, type TimelineCardsProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };
1307
+ 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, CardCarousel, type CardCarouselItem, type CardCarouselProps, 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, Modal, type ModalProps, 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, TimelineCards, type TimelineCardsProps, TwoColTextMenu, type TwoColTextMenuProps, UpcomingEventCard, type UpcomingEventCardProps, UserMenu, type UserMenuItem, type UserMenuProps, type UserMenuUser, resolveCompoundSlots, svgs, useActivePath, useIntersectionObserver, useIsAtTop };