@nuskin/foundation-ui-components 2.2.1 → 3.0.0-fix-carousel.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/README.md CHANGED
@@ -8,10 +8,6 @@
8
8
 
9
9
  This comprehensive library houses a collection of reusable React components specifically designed for NuSkin Pages. These components are meticulously crafted to ensure consistent UI/UX across all NuSkin digital properties, fostering a seamless user experience.
10
10
 
11
- ## Releases
12
-
13
- ### [CHANGELOG](https://code.tls.nuskin.io/ns-am/content-foundation/foundation-ui-components/-/blob/master/CHANGELOG.md)
14
-
15
11
  ## Installation Guide
16
12
 
17
13
  To integrate the NuSkin React Components Library into your NuSkin Pages project, follow these steps:
package/dist/index.d.mts CHANGED
@@ -681,19 +681,36 @@ type NsAwardCardProps = {
681
681
  };
682
682
  declare function NsAwardCard({ title, awardName, mediaOutlet, backgroundImageDetail, className, fontColor, }: NsAwardCardProps): ReactElement;
683
683
 
684
- interface CarousalProps<T = any> {
684
+ type NsCarouselProps<T = any> = {
685
685
  entries: T[];
686
+ // eslint-disable-next-line no-unused-vars
686
687
  renderEntry(entry: T, index: number): ReactNode;
687
688
  allEntryLink?: string;
688
689
  allEntryLabel?: string;
689
690
  settings: any;
690
691
  showControlButtons?: boolean;
691
- }
692
- declare function NsCarousal({ entries, renderEntry, allEntryLink, settings, allEntryLabel, showControlButtons, }: CarousalProps): ReactElement;
692
+ ariaLabel?: string;
693
+ ariaLabelledBy?: string;
694
+ };
695
+
696
+ type NsScrollingCarouselProps<T = any> = {
697
+ slides: T;
698
+ // eslint-disable-next-line no-unused-vars
699
+ renderSlide(slide: T, index: number): ReactNode;
700
+ /* time it takes while scrolling */
701
+ scrollSeconds: number;
702
+ /* time for which slide stays still before scrolling */
703
+ stillSeconds: number;
704
+ settings: any;
705
+ /* value in number, specifying how much the dots should be from bottom of slides container */
706
+ dotsBottomPixel?: number;
707
+ } & AdditionalProps;
693
708
 
694
- declare const NsScrollingCarousal: ({ slides, scrollSeconds, stillSeconds, renderSlide, settings, dotsBottomPixel, additionalProps, }: NsScrollingCarousalProps) => ReactElement;
709
+ declare function NsCarousel<T = any>({ entries, renderEntry, allEntryLink, settings, allEntryLabel, showControlButtons, ariaLabel, ariaLabelledBy, }: NsCarouselProps<T>): ReactElement;
695
710
 
696
- declare const settings: {
711
+ declare const NsScrollingCarousel: ({ slides, scrollSeconds, stillSeconds, renderSlide, settings, dotsBottomPixel, additionalProps, }: NsScrollingCarouselProps) => ReactElement;
712
+
713
+ declare const defaultCarouselSettings: {
697
714
  dots: boolean;
698
715
  infinite: boolean;
699
716
  speed: number;
@@ -730,7 +747,7 @@ declare const settings: {
730
747
  })[];
731
748
  };
732
749
 
733
- interface CarousalControlProps {
750
+ interface CarouselControlProps {
734
751
  next(): void;
735
752
  prev(): void;
736
753
  viewAllLabel: string;
@@ -738,28 +755,7 @@ interface CarousalControlProps {
738
755
  prevAriaLabel?: string;
739
756
  nextAriaLabel?: string;
740
757
  }
741
- declare const CarousalControl: ({ next, prev, viewAllUrl, viewAllLabel, prevAriaLabel, nextAriaLabel, }: CarousalControlProps) => ReactElement;
742
-
743
- type NsCarousalProps<T = any> = {
744
- entries: T[];
745
- // eslint-disable-next-line no-unused-vars
746
- renderEntry(entry: T, index: number): ReactNode;
747
- allEntryLink: string;
748
- settings: any;
749
- };
750
-
751
- type NsScrollingCarousalProps<T = any> = {
752
- slides: T;
753
- // eslint-disable-next-line no-unused-vars
754
- renderSlide(slide: T, index: number): ReactNode;
755
- /* time it takes while scrolling */
756
- scrollSeconds: number;
757
- /* time for which slide stays still before scrolling */
758
- stillSeconds: number;
759
- settings: any;
760
- /* value in number, specifying how much the dots should be from bottom of slides container */
761
- dotsBottomPixel?: number;
762
- } & AdditionalProps;
758
+ declare const CarouselControl: ({ next, prev, viewAllUrl, viewAllLabel, prevAriaLabel, nextAriaLabel, }: CarouselControlProps) => ReactElement;
763
759
 
764
760
  type NsCartIconProps = {
765
761
  itemCount?: number;
@@ -1259,4 +1255,4 @@ type NsVideoProps = {
1259
1255
 
1260
1256
  declare const NsVideo: (props: PropsWithChildren<NsVideoProps>) => ReactElement;
1261
1257
 
1262
- export { type AccordionContentType, AccordionContentTypeObject, type AccordionItem, AccordionVariant, type AccordionVariantType, type AdditionalProps, type BynderImageDataType, Check, type ComponentBoxProps, type CslpTag, type DarkModeEnabledOption, type DropdownOptionProps, type DropdownProps, GlobalFontInter, type HtmlTagVariant, HtmlTagVariantMapping, IconWrapper, type ItemProps, type LabelValueType, LineLoader, type ListUiProps, type NavTabs, NsAccordion, NsAccordionHeader, type NsAccordionHeaderProps, NsAccordionItem, type NsAccordionItemProps, type NsAccordionProps, NsAlert, type NsAlertProps, NsAuthDropdown, type NsAuthDropdownProps, NsAutocomplete, type NsAutocompleteProps, NsAwardCard, NsBanner, type NsBannerProps, NsBgCard, NsBrandCard, NsBrandComponent, type NsBrandComponentProps, NsBrandLogo, NsBrandWrapper, NsBreadcrumb, type NsBreadcrumbProps, NsButton, type NsButtonProps, type NsCardButton, NsCarousal, type NsCarousalProps, CarousalControl as NsCarouselControl, NsCartIcon, type NsCartIconProps, NsCheckbox, type NsCheckboxProps, NsCheckoutCard, NsCollapse, type NsCollapseProps, NsColumnControl, type NsColumnControlProps, settings as NsDefaultCarousalSettings, NsDropdown, NsDropdownOption, NsEmailSimple, type NsEmailSimpleProps, type NsFfgCardProps, NsFlag, type NsFlagProps, type NsFlagSize, NsFlexColumns, NsGridColumns, NsHeroCardLevel1, NsHeroCardLevel2, NsIcon, type NsIconNameType, type NsIconProps, type NsIconSizeType, NsIconText, IconVariants as NsIconVariants, NsImage, NsInputField, type NsInputFieldProps, NsLabel, type NsLabelProps, NsLargeCard, NsLink, type NsLinkProps, NsMediumCard, NsModal, type NsModalProps, type NsModalVariant, NsNavProductCard, type NsNavProductCardProps, NsNavTabComponent as NsNavTab, type NsNavTabComponentProps, NsPost, NsProgress, type NsProgressProps, NsRadioGroup, type NsRadioGroupProps, NsScrollingCarousal, type NsScrollingCarousalProps, NsSelect, NsSelectOption, NsSmallFullCard, NsSpinner, type NsSpinnerProps, NsTable, type NsTableProps, NsTextStrip, type NsTextStripProps, NsToastProvider, NsToggleSection, type NsToggleSectionProps, NsTypography, type NsTypographyProps, NsVideo, type NsVideoProps, NsXLargeCard, type OptionsProps, type RenderSelectOptionArgType, type SelectOptionProps, type SelectProps, Show, type Themed, type ToastOptions, type Variants, getBasicDATWidthHeight, iconSize, useAccordionMap, useToast, useWindowSize };
1258
+ export { type AccordionContentType, AccordionContentTypeObject, type AccordionItem, AccordionVariant, type AccordionVariantType, type AdditionalProps, type BynderImageDataType, Check, type ComponentBoxProps, type CslpTag, type DarkModeEnabledOption, type DropdownOptionProps, type DropdownProps, GlobalFontInter, type HtmlTagVariant, HtmlTagVariantMapping, IconWrapper, type ItemProps, type LabelValueType, LineLoader, type ListUiProps, type NavTabs, NsAccordion, NsAccordionHeader, type NsAccordionHeaderProps, NsAccordionItem, type NsAccordionItemProps, type NsAccordionProps, NsAlert, type NsAlertProps, NsAuthDropdown, type NsAuthDropdownProps, NsAutocomplete, type NsAutocompleteProps, NsAwardCard, NsBanner, type NsBannerProps, NsBgCard, NsBrandCard, NsBrandComponent, type NsBrandComponentProps, NsBrandLogo, NsBrandWrapper, NsBreadcrumb, type NsBreadcrumbProps, NsButton, type NsButtonProps, type NsCardButton, NsCarousel, CarouselControl as NsCarouselControl, type NsCarouselProps, NsCartIcon, type NsCartIconProps, NsCheckbox, type NsCheckboxProps, NsCheckoutCard, NsCollapse, type NsCollapseProps, NsColumnControl, type NsColumnControlProps, defaultCarouselSettings as NsDefaultCarouselSettings, NsDropdown, NsDropdownOption, NsEmailSimple, type NsEmailSimpleProps, type NsFfgCardProps, NsFlag, type NsFlagProps, type NsFlagSize, NsFlexColumns, NsGridColumns, NsHeroCardLevel1, NsHeroCardLevel2, NsIcon, type NsIconNameType, type NsIconProps, type NsIconSizeType, NsIconText, IconVariants as NsIconVariants, NsImage, NsInputField, type NsInputFieldProps, NsLabel, type NsLabelProps, NsLargeCard, NsLink, type NsLinkProps, NsMediumCard, NsModal, type NsModalProps, type NsModalVariant, NsNavProductCard, type NsNavProductCardProps, NsNavTabComponent as NsNavTab, type NsNavTabComponentProps, NsPost, NsProgress, type NsProgressProps, NsRadioGroup, type NsRadioGroupProps, NsScrollingCarousel, type NsScrollingCarouselProps, NsSelect, NsSelectOption, NsSmallFullCard, NsSpinner, type NsSpinnerProps, NsTable, type NsTableProps, NsTextStrip, type NsTextStripProps, NsToastProvider, NsToggleSection, type NsToggleSectionProps, NsTypography, type NsTypographyProps, NsVideo, type NsVideoProps, NsXLargeCard, type OptionsProps, type RenderSelectOptionArgType, type SelectOptionProps, type SelectProps, Show, type Themed, type ToastOptions, type Variants, getBasicDATWidthHeight, iconSize, useAccordionMap, useToast, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -681,19 +681,36 @@ type NsAwardCardProps = {
681
681
  };
682
682
  declare function NsAwardCard({ title, awardName, mediaOutlet, backgroundImageDetail, className, fontColor, }: NsAwardCardProps): ReactElement;
683
683
 
684
- interface CarousalProps<T = any> {
684
+ type NsCarouselProps<T = any> = {
685
685
  entries: T[];
686
+ // eslint-disable-next-line no-unused-vars
686
687
  renderEntry(entry: T, index: number): ReactNode;
687
688
  allEntryLink?: string;
688
689
  allEntryLabel?: string;
689
690
  settings: any;
690
691
  showControlButtons?: boolean;
691
- }
692
- declare function NsCarousal({ entries, renderEntry, allEntryLink, settings, allEntryLabel, showControlButtons, }: CarousalProps): ReactElement;
692
+ ariaLabel?: string;
693
+ ariaLabelledBy?: string;
694
+ };
695
+
696
+ type NsScrollingCarouselProps<T = any> = {
697
+ slides: T;
698
+ // eslint-disable-next-line no-unused-vars
699
+ renderSlide(slide: T, index: number): ReactNode;
700
+ /* time it takes while scrolling */
701
+ scrollSeconds: number;
702
+ /* time for which slide stays still before scrolling */
703
+ stillSeconds: number;
704
+ settings: any;
705
+ /* value in number, specifying how much the dots should be from bottom of slides container */
706
+ dotsBottomPixel?: number;
707
+ } & AdditionalProps;
693
708
 
694
- declare const NsScrollingCarousal: ({ slides, scrollSeconds, stillSeconds, renderSlide, settings, dotsBottomPixel, additionalProps, }: NsScrollingCarousalProps) => ReactElement;
709
+ declare function NsCarousel<T = any>({ entries, renderEntry, allEntryLink, settings, allEntryLabel, showControlButtons, ariaLabel, ariaLabelledBy, }: NsCarouselProps<T>): ReactElement;
695
710
 
696
- declare const settings: {
711
+ declare const NsScrollingCarousel: ({ slides, scrollSeconds, stillSeconds, renderSlide, settings, dotsBottomPixel, additionalProps, }: NsScrollingCarouselProps) => ReactElement;
712
+
713
+ declare const defaultCarouselSettings: {
697
714
  dots: boolean;
698
715
  infinite: boolean;
699
716
  speed: number;
@@ -730,7 +747,7 @@ declare const settings: {
730
747
  })[];
731
748
  };
732
749
 
733
- interface CarousalControlProps {
750
+ interface CarouselControlProps {
734
751
  next(): void;
735
752
  prev(): void;
736
753
  viewAllLabel: string;
@@ -738,28 +755,7 @@ interface CarousalControlProps {
738
755
  prevAriaLabel?: string;
739
756
  nextAriaLabel?: string;
740
757
  }
741
- declare const CarousalControl: ({ next, prev, viewAllUrl, viewAllLabel, prevAriaLabel, nextAriaLabel, }: CarousalControlProps) => ReactElement;
742
-
743
- type NsCarousalProps<T = any> = {
744
- entries: T[];
745
- // eslint-disable-next-line no-unused-vars
746
- renderEntry(entry: T, index: number): ReactNode;
747
- allEntryLink: string;
748
- settings: any;
749
- };
750
-
751
- type NsScrollingCarousalProps<T = any> = {
752
- slides: T;
753
- // eslint-disable-next-line no-unused-vars
754
- renderSlide(slide: T, index: number): ReactNode;
755
- /* time it takes while scrolling */
756
- scrollSeconds: number;
757
- /* time for which slide stays still before scrolling */
758
- stillSeconds: number;
759
- settings: any;
760
- /* value in number, specifying how much the dots should be from bottom of slides container */
761
- dotsBottomPixel?: number;
762
- } & AdditionalProps;
758
+ declare const CarouselControl: ({ next, prev, viewAllUrl, viewAllLabel, prevAriaLabel, nextAriaLabel, }: CarouselControlProps) => ReactElement;
763
759
 
764
760
  type NsCartIconProps = {
765
761
  itemCount?: number;
@@ -1259,4 +1255,4 @@ type NsVideoProps = {
1259
1255
 
1260
1256
  declare const NsVideo: (props: PropsWithChildren<NsVideoProps>) => ReactElement;
1261
1257
 
1262
- export { type AccordionContentType, AccordionContentTypeObject, type AccordionItem, AccordionVariant, type AccordionVariantType, type AdditionalProps, type BynderImageDataType, Check, type ComponentBoxProps, type CslpTag, type DarkModeEnabledOption, type DropdownOptionProps, type DropdownProps, GlobalFontInter, type HtmlTagVariant, HtmlTagVariantMapping, IconWrapper, type ItemProps, type LabelValueType, LineLoader, type ListUiProps, type NavTabs, NsAccordion, NsAccordionHeader, type NsAccordionHeaderProps, NsAccordionItem, type NsAccordionItemProps, type NsAccordionProps, NsAlert, type NsAlertProps, NsAuthDropdown, type NsAuthDropdownProps, NsAutocomplete, type NsAutocompleteProps, NsAwardCard, NsBanner, type NsBannerProps, NsBgCard, NsBrandCard, NsBrandComponent, type NsBrandComponentProps, NsBrandLogo, NsBrandWrapper, NsBreadcrumb, type NsBreadcrumbProps, NsButton, type NsButtonProps, type NsCardButton, NsCarousal, type NsCarousalProps, CarousalControl as NsCarouselControl, NsCartIcon, type NsCartIconProps, NsCheckbox, type NsCheckboxProps, NsCheckoutCard, NsCollapse, type NsCollapseProps, NsColumnControl, type NsColumnControlProps, settings as NsDefaultCarousalSettings, NsDropdown, NsDropdownOption, NsEmailSimple, type NsEmailSimpleProps, type NsFfgCardProps, NsFlag, type NsFlagProps, type NsFlagSize, NsFlexColumns, NsGridColumns, NsHeroCardLevel1, NsHeroCardLevel2, NsIcon, type NsIconNameType, type NsIconProps, type NsIconSizeType, NsIconText, IconVariants as NsIconVariants, NsImage, NsInputField, type NsInputFieldProps, NsLabel, type NsLabelProps, NsLargeCard, NsLink, type NsLinkProps, NsMediumCard, NsModal, type NsModalProps, type NsModalVariant, NsNavProductCard, type NsNavProductCardProps, NsNavTabComponent as NsNavTab, type NsNavTabComponentProps, NsPost, NsProgress, type NsProgressProps, NsRadioGroup, type NsRadioGroupProps, NsScrollingCarousal, type NsScrollingCarousalProps, NsSelect, NsSelectOption, NsSmallFullCard, NsSpinner, type NsSpinnerProps, NsTable, type NsTableProps, NsTextStrip, type NsTextStripProps, NsToastProvider, NsToggleSection, type NsToggleSectionProps, NsTypography, type NsTypographyProps, NsVideo, type NsVideoProps, NsXLargeCard, type OptionsProps, type RenderSelectOptionArgType, type SelectOptionProps, type SelectProps, Show, type Themed, type ToastOptions, type Variants, getBasicDATWidthHeight, iconSize, useAccordionMap, useToast, useWindowSize };
1258
+ export { type AccordionContentType, AccordionContentTypeObject, type AccordionItem, AccordionVariant, type AccordionVariantType, type AdditionalProps, type BynderImageDataType, Check, type ComponentBoxProps, type CslpTag, type DarkModeEnabledOption, type DropdownOptionProps, type DropdownProps, GlobalFontInter, type HtmlTagVariant, HtmlTagVariantMapping, IconWrapper, type ItemProps, type LabelValueType, LineLoader, type ListUiProps, type NavTabs, NsAccordion, NsAccordionHeader, type NsAccordionHeaderProps, NsAccordionItem, type NsAccordionItemProps, type NsAccordionProps, NsAlert, type NsAlertProps, NsAuthDropdown, type NsAuthDropdownProps, NsAutocomplete, type NsAutocompleteProps, NsAwardCard, NsBanner, type NsBannerProps, NsBgCard, NsBrandCard, NsBrandComponent, type NsBrandComponentProps, NsBrandLogo, NsBrandWrapper, NsBreadcrumb, type NsBreadcrumbProps, NsButton, type NsButtonProps, type NsCardButton, NsCarousel, CarouselControl as NsCarouselControl, type NsCarouselProps, NsCartIcon, type NsCartIconProps, NsCheckbox, type NsCheckboxProps, NsCheckoutCard, NsCollapse, type NsCollapseProps, NsColumnControl, type NsColumnControlProps, defaultCarouselSettings as NsDefaultCarouselSettings, NsDropdown, NsDropdownOption, NsEmailSimple, type NsEmailSimpleProps, type NsFfgCardProps, NsFlag, type NsFlagProps, type NsFlagSize, NsFlexColumns, NsGridColumns, NsHeroCardLevel1, NsHeroCardLevel2, NsIcon, type NsIconNameType, type NsIconProps, type NsIconSizeType, NsIconText, IconVariants as NsIconVariants, NsImage, NsInputField, type NsInputFieldProps, NsLabel, type NsLabelProps, NsLargeCard, NsLink, type NsLinkProps, NsMediumCard, NsModal, type NsModalProps, type NsModalVariant, NsNavProductCard, type NsNavProductCardProps, NsNavTabComponent as NsNavTab, type NsNavTabComponentProps, NsPost, NsProgress, type NsProgressProps, NsRadioGroup, type NsRadioGroupProps, NsScrollingCarousel, type NsScrollingCarouselProps, NsSelect, NsSelectOption, NsSmallFullCard, NsSpinner, type NsSpinnerProps, NsTable, type NsTableProps, NsTextStrip, type NsTextStripProps, NsToastProvider, NsToggleSection, type NsToggleSectionProps, NsTypography, type NsTypographyProps, NsVideo, type NsVideoProps, NsXLargeCard, type OptionsProps, type RenderSelectOptionArgType, type SelectOptionProps, type SelectProps, Show, type Themed, type ToastOptions, type Variants, getBasicDATWidthHeight, iconSize, useAccordionMap, useToast, useWindowSize };