@timmbr/ui 1.4.2 → 1.6.0
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 +12 -10
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.styles.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.styles.js +3 -3
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Alert/Alert.styles.d.ts +2 -2
- package/dist/components/Alert/Alert.styles.js +4 -4
- package/dist/components/AlertDialog/AlertDialog.d.ts +5 -3
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +21 -8
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts +7 -1
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.styles.js +29 -6
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +19 -2
- package/dist/components/AlertDialog/AlertDialog.types.d.ts.map +1 -1
- package/dist/components/AuthModal/AuthModal.d.ts +4 -0
- package/dist/components/AuthModal/AuthModal.d.ts.map +1 -0
- package/dist/components/AuthModal/AuthModal.js +89 -0
- package/dist/components/AuthModal/AuthModal.labels.d.ts +6 -0
- package/dist/components/AuthModal/AuthModal.labels.d.ts.map +1 -0
- package/dist/components/AuthModal/AuthModal.labels.js +52 -0
- package/dist/components/AuthModal/AuthModal.styles.d.ts +12 -0
- package/dist/components/AuthModal/AuthModal.styles.d.ts.map +1 -0
- package/dist/components/AuthModal/AuthModal.styles.js +38 -0
- package/dist/components/AuthModal/AuthModal.types.d.ts +158 -0
- package/dist/components/AuthModal/AuthModal.types.d.ts.map +1 -0
- package/dist/components/AuthModal/index.d.ts +6 -0
- package/dist/components/AuthModal/index.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalBanner.d.ts +11 -0
- package/dist/components/AuthModal/subcomponents/AuthModalBanner.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalBanner.js +58 -0
- package/dist/components/AuthModal/subcomponents/AuthModalIdentifierForm.d.ts +11 -0
- package/dist/components/AuthModal/subcomponents/AuthModalIdentifierForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalIdentifierForm.js +62 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOAuth.d.ts +11 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOAuth.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOAuth.js +19 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOtpForm.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOtpForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalOtpForm.js +62 -0
- package/dist/components/AuthModal/subcomponents/AuthModalParts.d.ts +44 -0
- package/dist/components/AuthModal/subcomponents/AuthModalParts.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalParts.js +134 -0
- package/dist/components/AuthModal/subcomponents/AuthModalPasswordForm.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalPasswordForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalPasswordForm.js +54 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSetPasswordForm.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSetPasswordForm.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSetPasswordForm.js +79 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSuccess.d.ts +10 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSuccess.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/AuthModalSuccess.js +26 -0
- package/dist/components/AuthModal/subcomponents/OAuthButton.d.ts +12 -0
- package/dist/components/AuthModal/subcomponents/OAuthButton.d.ts.map +1 -0
- package/dist/components/AuthModal/subcomponents/OAuthButton.js +38 -0
- package/dist/components/AuthModal/subcomponents/index.d.ts +9 -0
- package/dist/components/AuthModal/subcomponents/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.styles.d.ts +2 -2
- package/dist/components/Avatar/Avatar.styles.js +11 -11
- package/dist/components/Badge/Badge.styles.d.ts +2 -2
- package/dist/components/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/components/Badge/Badge.styles.js +10 -8
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +6 -0
- package/dist/components/Button/Button.styles.d.ts +4 -2
- package/dist/components/Button/Button.styles.d.ts.map +1 -1
- package/dist/components/Button/Button.styles.js +29 -10
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +51 -32
- package/dist/components/Card/Card.styles.d.ts +32 -5
- package/dist/components/Card/Card.styles.d.ts.map +1 -1
- package/dist/components/Card/Card.styles.js +70 -11
- package/dist/components/Card/Card.types.d.ts +14 -3
- package/dist/components/Card/Card.types.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +4 -4
- package/dist/components/Checkbox/Checkbox.styles.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.styles.js +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.styles.d.ts +1 -1
- package/dist/components/Chip/Chip.styles.js +5 -5
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +30 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.js +57 -0
- package/dist/components/ConfirmDialog/index.d.ts +2 -0
- package/dist/components/ConfirmDialog/index.d.ts.map +1 -0
- package/dist/components/Container/Container.styles.d.ts +1 -1
- package/dist/components/DataList/DataList.d.ts +3 -1
- package/dist/components/DataList/DataList.d.ts.map +1 -1
- package/dist/components/DataList/DataList.js +53 -15
- package/dist/components/DataList/DataList.styles.d.ts +17 -4
- package/dist/components/DataList/DataList.styles.d.ts.map +1 -1
- package/dist/components/DataList/DataList.styles.js +56 -13
- package/dist/components/DataList/DataList.types.d.ts +19 -2
- package/dist/components/DataList/DataList.types.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.styles.js +6 -6
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +4 -3
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.js +33 -6
- package/dist/components/Drawer/Drawer.styles.d.ts +4 -0
- package/dist/components/Drawer/Drawer.styles.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.styles.js +9 -6
- package/dist/components/Drawer/Drawer.types.d.ts +1 -0
- package/dist/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.js +25 -12
- package/dist/components/Dropdown/Dropdown.styles.d.ts +5 -1
- package/dist/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.styles.js +13 -3
- package/dist/components/Dropdown/Dropdown.types.d.ts +4 -0
- package/dist/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.js +4 -3
- package/dist/components/EmptyState/EmptyState.styles.d.ts +3 -2
- package/dist/components/EmptyState/EmptyState.styles.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.styles.js +8 -3
- package/dist/components/Fieldset/Fieldset.d.ts +14 -0
- package/dist/components/Fieldset/Fieldset.d.ts.map +1 -0
- package/dist/components/Fieldset/Fieldset.js +24 -0
- package/dist/components/Fieldset/index.d.ts +2 -0
- package/dist/components/Fieldset/index.d.ts.map +1 -0
- package/dist/components/FormActions/FormActions.d.ts +13 -0
- package/dist/components/FormActions/FormActions.d.ts.map +1 -0
- package/dist/components/FormActions/FormActions.js +24 -0
- package/dist/components/FormActions/index.d.ts +2 -0
- package/dist/components/FormActions/index.d.ts.map +1 -0
- package/dist/components/FormField/FormField.js +1 -1
- package/dist/components/Grid/Grid.d.ts +3 -1
- package/dist/components/Grid/Grid.d.ts.map +1 -1
- package/dist/components/Grid/Grid.js +31 -5
- package/dist/components/Grid/Grid.styles.d.ts +86 -0
- package/dist/components/Grid/Grid.styles.d.ts.map +1 -1
- package/dist/components/Grid/Grid.styles.js +85 -1
- package/dist/components/Grid/Grid.types.d.ts +31 -3
- package/dist/components/Grid/Grid.types.d.ts.map +1 -1
- package/dist/components/Heading/Heading.styles.d.ts +2 -2
- package/dist/components/Heading/Heading.styles.d.ts.map +1 -1
- package/dist/components/Heading/Heading.styles.js +15 -11
- package/dist/components/Heading/Heading.types.d.ts +1 -1
- package/dist/components/Heading/Heading.types.d.ts.map +1 -1
- package/dist/components/Icon/Icon.styles.d.ts +2 -2
- package/dist/components/Icon/Icon.styles.d.ts.map +1 -1
- package/dist/components/Icon/Icon.styles.js +12 -8
- package/dist/components/IconTile/IconTile.d.ts +8 -0
- package/dist/components/IconTile/IconTile.d.ts.map +1 -0
- package/dist/components/IconTile/IconTile.js +23 -0
- package/dist/components/IconTile/IconTile.styles.d.ts +7 -0
- package/dist/components/IconTile/IconTile.styles.d.ts.map +1 -0
- package/dist/components/IconTile/IconTile.styles.js +24 -0
- package/dist/components/IconTile/IconTile.types.d.ts +12 -0
- package/dist/components/IconTile/IconTile.types.d.ts.map +1 -0
- package/dist/components/IconTile/index.d.ts +4 -0
- package/dist/components/IconTile/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUpload.js +6 -6
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.js +10 -10
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.js +8 -8
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.js +7 -7
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.js +10 -10
- package/dist/components/Inline/Inline.d.ts.map +1 -1
- package/dist/components/Inline/Inline.js +10 -2
- package/dist/components/Inline/Inline.types.d.ts +6 -1
- package/dist/components/Inline/Inline.types.d.ts.map +1 -1
- package/dist/components/Input/Input.js +4 -4
- package/dist/components/Input/Input.styles.d.ts +1 -1
- package/dist/components/Input/Input.styles.js +6 -6
- package/dist/components/Label/Label.styles.d.ts +1 -1
- package/dist/components/Label/Label.styles.js +4 -4
- package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.js +2 -0
- package/dist/components/LinkButton/LinkButton.styles.d.ts +3 -2
- package/dist/components/LinkButton/LinkButton.styles.d.ts.map +1 -1
- package/dist/components/LinkButton/LinkButton.styles.js +12 -6
- package/dist/components/List/List.d.ts.map +1 -1
- package/dist/components/List/List.js +19 -6
- package/dist/components/List/List.styles.d.ts +3 -1
- package/dist/components/List/List.styles.d.ts.map +1 -1
- package/dist/components/List/List.styles.js +7 -6
- package/dist/components/List/List.types.d.ts +7 -0
- package/dist/components/List/List.types.d.ts.map +1 -1
- package/dist/components/MediaCard/MediaCard.d.ts +13 -0
- package/dist/components/MediaCard/MediaCard.d.ts.map +1 -0
- package/dist/components/MediaCard/MediaCard.js +123 -0
- package/dist/components/MediaCard/MediaCard.styles.d.ts +17 -0
- package/dist/components/MediaCard/MediaCard.styles.d.ts.map +1 -0
- package/dist/components/MediaCard/MediaCard.styles.js +57 -0
- package/dist/components/MediaCard/MediaCard.types.d.ts +73 -0
- package/dist/components/MediaCard/MediaCard.types.d.ts.map +1 -0
- package/dist/components/MediaCard/index.d.ts +4 -0
- package/dist/components/MediaCard/index.d.ts.map +1 -0
- package/dist/components/NavFooter/NavFooter.styles.d.ts +1 -1
- package/dist/components/NavFooter/NavFooter.styles.js +9 -9
- package/dist/components/NavFooter/subcomponents/FooterBrand.js +3 -3
- package/dist/components/NavFooter/subcomponents/FooterLegalBar.js +1 -1
- package/dist/components/NavFooter/subcomponents/FooterNavSection.js +4 -4
- package/dist/components/NavFooter/subcomponents/FooterNewsletter.js +7 -7
- package/dist/components/NavFooter/subcomponents/FooterOffice.js +5 -5
- package/dist/components/NavFooter/subcomponents/FooterSocial.js +3 -3
- package/dist/components/NavHeader/NavHeader.d.ts.map +1 -1
- package/dist/components/NavHeader/NavHeader.js +13 -4
- package/dist/components/NavHeader/NavHeader.styles.d.ts +1 -1
- package/dist/components/NavHeader/NavHeader.styles.js +16 -16
- package/dist/components/NavHeader/NavHeader.types.d.ts +41 -0
- package/dist/components/NavHeader/NavHeader.types.d.ts.map +1 -1
- package/dist/components/NavHeader/index.d.ts +1 -1
- package/dist/components/NavHeader/index.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActionLabelSkeleton.d.ts +4 -0
- package/dist/components/NavHeader/subcomponents/NavActionLabelSkeleton.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavActionLabelSkeleton.js +16 -0
- package/dist/components/NavHeader/subcomponents/NavActionOverflow.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActionOverflow.js +6 -5
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts +14 -0
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavActions.js +82 -16
- package/dist/components/NavHeader/subcomponents/NavBrand.d.ts.map +1 -1
- package/dist/components/NavHeader/subcomponents/NavBrand.js +14 -15
- package/dist/components/NavHeader/subcomponents/NavItems.js +3 -3
- package/dist/components/NavHeader/subcomponents/NavItemsOverflow.js +7 -7
- package/dist/components/NavHeader/subcomponents/NavMobileSearchDrawer.js +5 -5
- package/dist/components/NavHeader/subcomponents/NavMobileTabSlider.js +2 -2
- package/dist/components/NavHeader/subcomponents/NavSearch.js +5 -5
- package/dist/components/NavHeader/subcomponents/OfferBanner.js +1 -1
- package/dist/components/OtpInput/OtpInput.d.ts +4 -0
- package/dist/components/OtpInput/OtpInput.d.ts.map +1 -0
- package/dist/components/OtpInput/OtpInput.js +114 -0
- package/dist/components/OtpInput/OtpInput.styles.d.ts +10 -0
- package/dist/components/OtpInput/OtpInput.styles.d.ts.map +1 -0
- package/dist/components/OtpInput/OtpInput.styles.js +49 -0
- package/dist/components/OtpInput/OtpInput.types.d.ts +40 -0
- package/dist/components/OtpInput/OtpInput.types.d.ts.map +1 -0
- package/dist/components/OtpInput/index.d.ts +4 -0
- package/dist/components/OtpInput/index.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +8 -0
- package/dist/components/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeader.js +55 -0
- package/dist/components/PageHeader/PageHeader.styles.d.ts +10 -0
- package/dist/components/PageHeader/PageHeader.styles.d.ts.map +1 -0
- package/dist/components/PageHeader/PageHeader.styles.js +23 -0
- package/dist/components/PageHeader/PageHeader.types.d.ts +24 -0
- package/dist/components/PageHeader/PageHeader.types.d.ts.map +1 -0
- package/dist/components/PageHeader/index.d.ts +4 -0
- package/dist/components/PageHeader/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +9 -3
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +60 -39
- package/dist/components/Pagination/Pagination.styles.d.ts +1 -1
- package/dist/components/Pagination/Pagination.styles.js +3 -3
- package/dist/components/Pagination/Pagination.types.d.ts +23 -14
- package/dist/components/Pagination/Pagination.types.d.ts.map +1 -1
- package/dist/components/Popover/Popover.styles.js +1 -1
- package/dist/components/Price/Price.d.ts +10 -0
- package/dist/components/Price/Price.d.ts.map +1 -0
- package/dist/components/Price/Price.js +49 -0
- package/dist/components/Price/Price.styles.d.ts +15 -0
- package/dist/components/Price/Price.styles.d.ts.map +1 -0
- package/dist/components/Price/Price.styles.js +44 -0
- package/dist/components/Price/Price.types.d.ts +22 -0
- package/dist/components/Price/Price.types.d.ts.map +1 -0
- package/dist/components/Price/index.d.ts +4 -0
- package/dist/components/Price/index.d.ts.map +1 -0
- package/dist/components/Progress/Progress.js +2 -2
- package/dist/components/Progress/Progress.styles.d.ts +1 -1
- package/dist/components/Radio/Radio.js +4 -4
- package/dist/components/Radio/Radio.styles.d.ts +2 -2
- package/dist/components/Radio/Radio.styles.js +1 -1
- package/dist/components/RangeSlider/RangeSlider.js +3 -3
- package/dist/components/RangeSlider/RangeSlider.styles.js +1 -1
- package/dist/components/Rating/Rating.d.ts +5 -0
- package/dist/components/Rating/Rating.d.ts.map +1 -0
- package/dist/components/Rating/Rating.js +38 -0
- package/dist/components/Rating/Rating.styles.d.ts +6 -0
- package/dist/components/Rating/Rating.styles.d.ts.map +1 -0
- package/dist/components/Rating/Rating.styles.js +13 -0
- package/dist/components/Rating/Rating.types.d.ts +18 -0
- package/dist/components/Rating/Rating.types.d.ts.map +1 -0
- package/dist/components/Rating/index.d.ts +4 -0
- package/dist/components/Rating/index.d.ts.map +1 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.d.ts +29 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.d.ts.map +1 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.js +74 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.types.d.ts +27 -0
- package/dist/components/ResponsiveDialog/ResponsiveDialog.types.d.ts.map +1 -0
- package/dist/components/ResponsiveDialog/index.d.ts +3 -0
- package/dist/components/ResponsiveDialog/index.d.ts.map +1 -0
- package/dist/components/SectionNav/SectionNav.d.ts +12 -0
- package/dist/components/SectionNav/SectionNav.d.ts.map +1 -0
- package/dist/components/SectionNav/SectionNav.js +67 -0
- package/dist/components/SectionNav/SectionNav.styles.d.ts +11 -0
- package/dist/components/SectionNav/SectionNav.styles.d.ts.map +1 -0
- package/dist/components/SectionNav/SectionNav.styles.js +28 -0
- package/dist/components/SectionNav/SectionNav.types.d.ts +37 -0
- package/dist/components/SectionNav/SectionNav.types.d.ts.map +1 -0
- package/dist/components/SectionNav/index.d.ts +4 -0
- package/dist/components/SectionNav/index.d.ts.map +1 -0
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Select/Select.styles.d.ts +1 -1
- package/dist/components/Select/Select.styles.js +8 -8
- package/dist/components/SideBarNavigation/SideBarNavigation.styles.js +8 -8
- package/dist/components/SideBarNavigation/subcomponents/SidebarBranding.js +3 -3
- package/dist/components/SideBarNavigation/subcomponents/SidebarFooter.js +1 -1
- package/dist/components/SideBarNavigation/subcomponents/SidebarPopoverMenu.js +4 -4
- package/dist/components/SideBarNavigation/subcomponents/SidebarProfile.js +9 -9
- package/dist/components/SideBarNavigation/subcomponents/SidebarSubItem.js +2 -2
- package/dist/components/Skeleton/Skeleton.styles.js +1 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.js +9 -7
- package/dist/components/Spinner/Spinner.styles.d.ts +8 -2
- package/dist/components/Spinner/Spinner.styles.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.styles.js +27 -24
- package/dist/components/Spinner/Spinner.types.d.ts +9 -0
- package/dist/components/Spinner/Spinner.types.d.ts.map +1 -1
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +16 -1
- package/dist/components/Stack/Stack.types.d.ts +14 -1
- package/dist/components/Stack/Stack.types.d.ts.map +1 -1
- package/dist/components/Stat/Stat.styles.js +4 -4
- package/dist/components/Stepper/Stepper.d.ts +9 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.js +81 -0
- package/dist/components/Stepper/Stepper.styles.d.ts +14 -0
- package/dist/components/Stepper/Stepper.styles.d.ts.map +1 -0
- package/dist/components/Stepper/Stepper.styles.js +40 -0
- package/dist/components/Stepper/Stepper.types.d.ts +17 -0
- package/dist/components/Stepper/Stepper.types.d.ts.map +1 -0
- package/dist/components/Stepper/index.d.ts +4 -0
- package/dist/components/Stepper/index.d.ts.map +1 -0
- package/dist/components/Steps/Steps.d.ts +9 -0
- package/dist/components/Steps/Steps.d.ts.map +1 -0
- package/dist/components/Steps/Steps.js +81 -0
- package/dist/components/Steps/Steps.styles.d.ts +14 -0
- package/dist/components/Steps/Steps.styles.d.ts.map +1 -0
- package/dist/components/Steps/Steps.styles.js +40 -0
- package/dist/components/Steps/Steps.types.d.ts +17 -0
- package/dist/components/Steps/Steps.types.d.ts.map +1 -0
- package/dist/components/Steps/index.d.ts +4 -0
- package/dist/components/Steps/index.d.ts.map +1 -0
- package/dist/components/SubNav/SubNav.d.ts +17 -0
- package/dist/components/SubNav/SubNav.d.ts.map +1 -0
- package/dist/components/SubNav/SubNav.js +87 -0
- package/dist/components/SubNav/SubNav.styles.d.ts +18 -0
- package/dist/components/SubNav/SubNav.styles.d.ts.map +1 -0
- package/dist/components/SubNav/SubNav.styles.js +33 -0
- package/dist/components/SubNav/SubNav.types.d.ts +45 -0
- package/dist/components/SubNav/SubNav.types.d.ts.map +1 -0
- package/dist/components/SubNav/index.d.ts +4 -0
- package/dist/components/SubNav/index.d.ts.map +1 -0
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/Switch.styles.d.ts +2 -2
- package/dist/components/Switch/Switch.styles.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/Table.styles.d.ts +1 -1
- package/dist/components/Table/Table.styles.js +5 -5
- package/dist/components/Table/TablePagination.js +4 -4
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +75 -8
- package/dist/components/Tabs/Tabs.styles.d.ts +10 -2
- package/dist/components/Tabs/Tabs.styles.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.styles.js +25 -10
- package/dist/components/Tabs/Tabs.types.d.ts +13 -0
- package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +4 -0
- package/dist/components/Text/Text.styles.d.ts +4 -2
- package/dist/components/Text/Text.styles.d.ts.map +1 -1
- package/dist/components/Text/Text.styles.js +32 -16
- package/dist/components/Text/Text.types.d.ts +1 -1
- package/dist/components/Text/Text.types.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +4 -4
- package/dist/components/Textarea/Textarea.styles.d.ts +1 -1
- package/dist/components/Textarea/Textarea.styles.js +6 -6
- package/dist/components/Toast/Toast.js +3 -3
- package/dist/components/Toast/Toast.styles.js +5 -5
- package/dist/components/Toast/ToastContainer.js +1 -1
- package/dist/components/Tooltip/Tooltip.styles.js +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +14 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/VisuallyHidden/index.d.ts.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -14
- package/dist/utils/gap.d.ts +21 -1
- package/dist/utils/gap.d.ts.map +1 -1
- package/dist/utils/gap.js +306 -46
- package/package.json +7 -6
- package/dist/components/CrossZoneLink/CrossZoneLink.d.ts +0 -10
- package/dist/components/CrossZoneLink/CrossZoneLink.d.ts.map +0 -1
- package/dist/components/CrossZoneLink/CrossZoneLink.js +0 -111
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.d.ts +0 -8
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.d.ts.map +0 -1
- package/dist/components/CrossZoneLink/CrossZoneLink.styles.js +0 -33
- package/dist/components/CrossZoneLink/CrossZoneLink.types.d.ts +0 -31
- package/dist/components/CrossZoneLink/CrossZoneLink.types.d.ts.map +0 -1
- package/dist/components/CrossZoneLink/index.d.ts +0 -4
- package/dist/components/CrossZoneLink/index.d.ts.map +0 -1
|
@@ -3,14 +3,16 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { cn } from '@timmbr/utils';
|
|
5
5
|
import { Loader2 } from '@timmbr/icons';
|
|
6
|
-
import { spinnerVariants } from './Spinner.styles.js';
|
|
6
|
+
import { spinnerIconVariants, spinnerVariants } from './Spinner.styles.js';
|
|
7
7
|
|
|
8
8
|
const Spinner = React.forwardRef(
|
|
9
9
|
({
|
|
10
10
|
className,
|
|
11
|
+
iconClassName,
|
|
11
12
|
size = "md",
|
|
12
13
|
variant = "default",
|
|
13
14
|
label = "Loading...",
|
|
15
|
+
decorative = false,
|
|
14
16
|
children,
|
|
15
17
|
...props
|
|
16
18
|
}, ref) => {
|
|
@@ -18,22 +20,22 @@ const Spinner = React.forwardRef(
|
|
|
18
20
|
"span",
|
|
19
21
|
{
|
|
20
22
|
ref,
|
|
21
|
-
role: "status",
|
|
22
|
-
"aria-
|
|
23
|
+
role: decorative ? void 0 : "status",
|
|
24
|
+
"aria-hidden": decorative || void 0,
|
|
23
25
|
"data-slot": "spinner-container",
|
|
24
|
-
className: cn(
|
|
26
|
+
className: cn(spinnerVariants({ variant }), className),
|
|
25
27
|
...props,
|
|
26
28
|
children: [
|
|
27
29
|
/* @__PURE__ */ jsx(
|
|
28
30
|
Loader2,
|
|
29
31
|
{
|
|
30
|
-
className:
|
|
32
|
+
className: cn(spinnerIconVariants({ size }), iconClassName),
|
|
31
33
|
"aria-hidden": "true",
|
|
32
34
|
"data-slot": "spinner"
|
|
33
35
|
}
|
|
34
36
|
),
|
|
35
|
-
children && /* @__PURE__ */ jsx("span", { className: "text-
|
|
36
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
|
|
37
|
+
children && /* @__PURE__ */ jsx("span", { className: "text-body-3 font-medium select-none", "data-slot": "spinner-label", children }),
|
|
38
|
+
!decorative && /* @__PURE__ */ jsx("span", { className: "sr-only", children: label })
|
|
37
39
|
]
|
|
38
40
|
}
|
|
39
41
|
);
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* Colour lives on the wrapper and the icon inherits it (`currentColor`), so a
|
|
4
|
+
* consumer `className="text-grey-50"` reliably recolours the spinner.
|
|
5
|
+
*/
|
|
2
6
|
export declare const spinnerVariants: (props?: ({
|
|
3
|
-
size?: "sm" | "lg" | "md" | "xl" | "xs" | null | undefined;
|
|
4
7
|
variant?: "default" | "white" | "primary" | "secondary" | "muted" | null | undefined;
|
|
5
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
-
export
|
|
9
|
+
export declare const spinnerIconVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export type SpinnerVariants = VariantProps<typeof spinnerVariants> & VariantProps<typeof spinnerIconVariants>;
|
|
7
13
|
//# sourceMappingURL=Spinner.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"Spinner.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,eAAe;;8EAa1B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;8EAa9B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,GAChE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
2
|
|
|
3
|
-
const spinnerVariants = cva(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
lg: "size-7",
|
|
12
|
-
xl: "size-10"
|
|
13
|
-
},
|
|
14
|
-
variant: {
|
|
15
|
-
default: "text-primary",
|
|
16
|
-
primary: "text-primary",
|
|
17
|
-
secondary: "text-secondary-foreground",
|
|
18
|
-
white: "text-white",
|
|
19
|
-
muted: "text-muted-foreground"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
defaultVariants: {
|
|
23
|
-
size: "md",
|
|
24
|
-
variant: "default"
|
|
3
|
+
const spinnerVariants = cva("inline-flex items-center gap-2", {
|
|
4
|
+
variants: {
|
|
5
|
+
variant: {
|
|
6
|
+
default: "text-primary",
|
|
7
|
+
primary: "text-primary",
|
|
8
|
+
secondary: "text-primary-1000",
|
|
9
|
+
white: "text-grey-50",
|
|
10
|
+
muted: "text-grey-500"
|
|
25
11
|
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: "default"
|
|
26
15
|
}
|
|
27
|
-
);
|
|
16
|
+
});
|
|
17
|
+
const spinnerIconVariants = cva("shrink-0 animate-spin", {
|
|
18
|
+
variants: {
|
|
19
|
+
size: {
|
|
20
|
+
xs: "size-3",
|
|
21
|
+
sm: "size-4",
|
|
22
|
+
md: "size-5",
|
|
23
|
+
lg: "size-7",
|
|
24
|
+
xl: "size-10"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
size: "md"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
28
31
|
|
|
29
|
-
export { spinnerVariants };
|
|
32
|
+
export { spinnerIconVariants, spinnerVariants };
|
|
@@ -9,5 +9,14 @@ export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement>, Spi
|
|
|
9
9
|
* Visible companion text rendered next to the spinner.
|
|
10
10
|
*/
|
|
11
11
|
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Extra classes for the icon itself (the wrapper gets `className`).
|
|
14
|
+
*/
|
|
15
|
+
iconClassName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Purely visual: no status role or label. Use inside a control that already
|
|
18
|
+
* communicates its busy state (e.g. a button with `aria-busy`).
|
|
19
|
+
*/
|
|
20
|
+
decorative?: boolean;
|
|
12
21
|
}
|
|
13
22
|
//# sourceMappingURL=Spinner.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.types.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAC3C,eAAe;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Spinner.types.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,YACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAC3C,eAAe;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/Stack.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAqBhD,eAAO,MAAM,KAAK,mFA4CjB,CAAC"}
|
|
@@ -6,11 +6,26 @@ import { cn } from '@timmbr/utils';
|
|
|
6
6
|
import { formatGap } from '../../utils/gap.js';
|
|
7
7
|
import { stackVariants } from './Stack.styles.js';
|
|
8
8
|
|
|
9
|
+
const DIRECTION = {
|
|
10
|
+
base: { column: "flex-col", row: "flex-row" },
|
|
11
|
+
sm: { column: "sm:flex-col", row: "sm:flex-row" },
|
|
12
|
+
md: { column: "md:flex-col", row: "md:flex-row" },
|
|
13
|
+
lg: { column: "lg:flex-col", row: "lg:flex-row" }
|
|
14
|
+
};
|
|
15
|
+
function directionClasses(direction) {
|
|
16
|
+
if (!direction) return void 0;
|
|
17
|
+
if (typeof direction === "string") return DIRECTION.base[direction];
|
|
18
|
+
return Object.keys(DIRECTION).map((bp) => {
|
|
19
|
+
const value = direction[bp];
|
|
20
|
+
return value ? DIRECTION[bp][value] : void 0;
|
|
21
|
+
}).filter(Boolean).join(" ");
|
|
22
|
+
}
|
|
9
23
|
const Stack = React.forwardRef(
|
|
10
24
|
({
|
|
11
25
|
className,
|
|
12
26
|
style,
|
|
13
27
|
gap = 4,
|
|
28
|
+
direction,
|
|
14
29
|
align = "stretch",
|
|
15
30
|
justify = "start",
|
|
16
31
|
divider,
|
|
@@ -35,7 +50,7 @@ const Stack = React.forwardRef(
|
|
|
35
50
|
"data-slot": "stack",
|
|
36
51
|
"data-testid": "timmbr-stack",
|
|
37
52
|
style,
|
|
38
|
-
className: cn(stackVariants({ align, justify }), gapClass, className),
|
|
53
|
+
className: cn(stackVariants({ align, justify }), directionClasses(direction), gapClass, className),
|
|
39
54
|
...props,
|
|
40
55
|
children: renderChildren()
|
|
41
56
|
}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type { StackVariants } from './Stack.styles';
|
|
3
|
+
import type { GapValue } from '../../utils/gap';
|
|
4
|
+
/** Direction per breakpoint (`base` = all sizes). */
|
|
5
|
+
export interface ResponsiveDirection {
|
|
6
|
+
base?: 'column' | 'row';
|
|
7
|
+
sm?: 'column' | 'row';
|
|
8
|
+
md?: 'column' | 'row';
|
|
9
|
+
lg?: 'column' | 'row';
|
|
10
|
+
}
|
|
3
11
|
export interface StackProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'gap'>, Omit<StackVariants, 'gap'> {
|
|
4
12
|
/**
|
|
5
13
|
* Gap between items. Translates standard Tailwind tokens, any number (px), or custom string.
|
|
6
14
|
*/
|
|
7
|
-
gap?:
|
|
15
|
+
gap?: GapValue;
|
|
16
|
+
/**
|
|
17
|
+
* Stack direction: a column by default; e.g. `{ sm: 'row' }` lays the
|
|
18
|
+
* items out in a row from the `sm` breakpoint.
|
|
19
|
+
*/
|
|
20
|
+
direction?: 'column' | 'row' | ResponsiveDirection;
|
|
8
21
|
/**
|
|
9
22
|
* Optional divider element rendered between each child in the stack.
|
|
10
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/Stack.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Stack.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stack/Stack.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACxB,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACtB,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IACtB,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CACvB;AAED,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,EACvD,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC;IAC5B;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,mBAAmB,CAAC;IACnD;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -16,16 +16,16 @@ const statVariants = cva(
|
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
const statLabelVariants = cva(
|
|
19
|
-
"text-
|
|
19
|
+
"text-body-3 font-semibold text-muted-foreground uppercase tracking-wider select-none"
|
|
20
20
|
);
|
|
21
21
|
const statValueVariants = cva(
|
|
22
|
-
"text-
|
|
22
|
+
"text-h3 font-semibold text-foreground tracking-tight"
|
|
23
23
|
);
|
|
24
24
|
const statHelpTextVariants = cva(
|
|
25
|
-
"flex items-center gap-1.5 text-
|
|
25
|
+
"flex items-center gap-1.5 text-body-3 text-muted-foreground mt-1"
|
|
26
26
|
);
|
|
27
27
|
const statIndicatorVariants = cva(
|
|
28
|
-
"inline-flex items-center gap-1 font-semibold text-
|
|
28
|
+
"inline-flex items-center gap-1 font-semibold text-body-3",
|
|
29
29
|
{
|
|
30
30
|
variants: {
|
|
31
31
|
type: {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StepperProps } from './Stepper.types';
|
|
3
|
+
/**
|
|
4
|
+
* Progress through a sequence of steps (order tracking, checkout, onboarding).
|
|
5
|
+
* Steps before `current` are complete; `status="error"` marks the current
|
|
6
|
+
* step as failed (e.g. a cancelled order).
|
|
7
|
+
*/
|
|
8
|
+
export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLOListElement>>;
|
|
9
|
+
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAQ/D;;;;GAIG;AACH,eAAO,MAAM,OAAO,uFA0EnB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cn } from '@timmbr/utils';
|
|
4
|
+
import { Check, X } from '@timmbr/icons';
|
|
5
|
+
import { stepConnectorVariants, stepIndicatorVariants, stepperVariants } from './Stepper.styles.js';
|
|
6
|
+
|
|
7
|
+
function stateOf(index, current, status) {
|
|
8
|
+
if (index < current) return "complete";
|
|
9
|
+
if (index === current) return status === "error" ? "error" : "current";
|
|
10
|
+
return "upcoming";
|
|
11
|
+
}
|
|
12
|
+
const Stepper = React.forwardRef(
|
|
13
|
+
({ steps, current, status = "default", orientation = "horizontal", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
"ol",
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
"data-slot": "stepper",
|
|
18
|
+
"data-orientation": orientation,
|
|
19
|
+
className: cn(stepperVariants({ orientation }), className),
|
|
20
|
+
...props,
|
|
21
|
+
children: steps.map((step, index) => {
|
|
22
|
+
const state = stateOf(index, current, status);
|
|
23
|
+
const isLast = index === steps.length - 1;
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
"li",
|
|
26
|
+
{
|
|
27
|
+
"data-state": state,
|
|
28
|
+
"aria-current": state === "current" || state === "error" ? "step" : void 0,
|
|
29
|
+
className: cn(
|
|
30
|
+
"relative flex min-w-0",
|
|
31
|
+
orientation === "horizontal" ? "flex-1 flex-col items-center text-center" : "gap-3 pb-6 last:pb-0"
|
|
32
|
+
),
|
|
33
|
+
children: [
|
|
34
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
"aria-hidden": "true",
|
|
38
|
+
className: stepConnectorVariants({
|
|
39
|
+
orientation,
|
|
40
|
+
complete: state === "complete"
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: stepIndicatorVariants({ state }), "aria-hidden": "true", children: state === "complete" ? /* @__PURE__ */ jsx(Check, { size: 14, strokeWidth: 3 }) : state === "error" ? /* @__PURE__ */ jsx(X, { size: 14, strokeWidth: 3 }) : index + 1 }),
|
|
45
|
+
/* @__PURE__ */ jsxs(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
className: cn(
|
|
49
|
+
"min-w-0",
|
|
50
|
+
orientation === "horizontal" ? "mt-2 px-1" : "pt-0.5"
|
|
51
|
+
),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsxs(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
className: cn(
|
|
57
|
+
"block text-body-2 font-medium",
|
|
58
|
+
state === "upcoming" ? "text-muted-foreground" : "text-foreground",
|
|
59
|
+
state === "error" && "text-destructive"
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
step.label,
|
|
63
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: state === "complete" ? " (completed)" : state === "error" ? " (failed)" : "" })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
step.description && /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-caption-lg text-muted-foreground", children: step.description })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
step.id ?? index
|
|
74
|
+
);
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
Stepper.displayName = "Stepper";
|
|
80
|
+
|
|
81
|
+
export { Stepper };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const stepperVariants: (props?: ({
|
|
3
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const stepIndicatorVariants: (props?: ({
|
|
6
|
+
state?: "current" | "error" | "complete" | "upcoming" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
/** Line to the next step, behind the indicators. */
|
|
9
|
+
export declare const stepConnectorVariants: (props?: ({
|
|
10
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
+
complete?: boolean | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export type StepperVariants = VariantProps<typeof stepperVariants>;
|
|
14
|
+
//# sourceMappingURL=Stepper.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,eAAe;;8EAQ1B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;8EAajC,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,qBAAqB;;;8EAYhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
const stepperVariants = cva("font-sans", {
|
|
4
|
+
variants: {
|
|
5
|
+
orientation: {
|
|
6
|
+
horizontal: "flex items-start",
|
|
7
|
+
vertical: "flex flex-col"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: { orientation: "horizontal" }
|
|
11
|
+
});
|
|
12
|
+
const stepIndicatorVariants = cva(
|
|
13
|
+
"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full border-2 text-caption-lg font-semibold tabular-nums transition-colors",
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
state: {
|
|
17
|
+
complete: "border-primary bg-primary text-primary-foreground",
|
|
18
|
+
current: "border-primary bg-background text-primary",
|
|
19
|
+
error: "border-destructive bg-destructive text-destructive-foreground",
|
|
20
|
+
upcoming: "border-muted-foreground/40 bg-background text-muted-foreground"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: { state: "upcoming" }
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const stepConnectorVariants = cva("absolute", {
|
|
27
|
+
variants: {
|
|
28
|
+
orientation: {
|
|
29
|
+
horizontal: "left-1/2 top-3.5 h-0.5 w-full",
|
|
30
|
+
vertical: "left-3.5 top-7 h-full w-0.5 -translate-x-1/2"
|
|
31
|
+
},
|
|
32
|
+
complete: {
|
|
33
|
+
true: "bg-primary",
|
|
34
|
+
false: "bg-border"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: { orientation: "horizontal", complete: false }
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { stepConnectorVariants, stepIndicatorVariants, stepperVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export type StepState = 'complete' | 'current' | 'error' | 'upcoming';
|
|
3
|
+
export interface StepItem {
|
|
4
|
+
id?: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
/** Secondary line, e.g. a date. */
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface StepperProps extends React.OlHTMLAttributes<HTMLOListElement> {
|
|
10
|
+
steps: StepItem[];
|
|
11
|
+
/** Index of the current step. Steps before it are complete. */
|
|
12
|
+
current: number;
|
|
13
|
+
/** `error` marks the current step as failed. */
|
|
14
|
+
status?: 'default' | 'error';
|
|
15
|
+
orientation?: 'horizontal' | 'vertical';
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Stepper.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mCAAmC;IACnC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC;IAC5E,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StepsProps } from './Steps.types';
|
|
3
|
+
/**
|
|
4
|
+
* Progress through a sequence of steps (order tracking, checkout, onboarding).
|
|
5
|
+
* Steps before `current` are complete; `status="error"` marks the current
|
|
6
|
+
* step as failed (e.g. a cancelled order).
|
|
7
|
+
*/
|
|
8
|
+
export declare const Steps: React.ForwardRefExoticComponent<StepsProps & React.RefAttributes<HTMLOListElement>>;
|
|
9
|
+
//# sourceMappingURL=Steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/Steps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAa,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3D;;;;GAIG;AACH,eAAO,MAAM,KAAK,qFA0EjB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cn } from '@timmbr/utils';
|
|
4
|
+
import { Check, X } from '@timmbr/icons';
|
|
5
|
+
import { stepConnectorVariants, stepIndicatorVariants, stepsVariants } from './Steps.styles.js';
|
|
6
|
+
|
|
7
|
+
function stateOf(index, current, status) {
|
|
8
|
+
if (index < current) return "complete";
|
|
9
|
+
if (index === current) return status === "error" ? "error" : "current";
|
|
10
|
+
return "upcoming";
|
|
11
|
+
}
|
|
12
|
+
const Steps = React.forwardRef(
|
|
13
|
+
({ steps, current, status = "default", orientation = "horizontal", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
14
|
+
"ol",
|
|
15
|
+
{
|
|
16
|
+
ref,
|
|
17
|
+
"data-slot": "steps",
|
|
18
|
+
"data-orientation": orientation,
|
|
19
|
+
className: cn(stepsVariants({ orientation }), className),
|
|
20
|
+
...props,
|
|
21
|
+
children: steps.map((step, index) => {
|
|
22
|
+
const state = stateOf(index, current, status);
|
|
23
|
+
const isLast = index === steps.length - 1;
|
|
24
|
+
return /* @__PURE__ */ jsxs(
|
|
25
|
+
"li",
|
|
26
|
+
{
|
|
27
|
+
"data-state": state,
|
|
28
|
+
"aria-current": state === "current" || state === "error" ? "step" : void 0,
|
|
29
|
+
className: cn(
|
|
30
|
+
"relative flex min-w-0",
|
|
31
|
+
orientation === "horizontal" ? "flex-1 flex-col items-center text-center" : "gap-3 pb-6 last:pb-0"
|
|
32
|
+
),
|
|
33
|
+
children: [
|
|
34
|
+
!isLast && /* @__PURE__ */ jsx(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
"aria-hidden": "true",
|
|
38
|
+
className: stepConnectorVariants({
|
|
39
|
+
orientation,
|
|
40
|
+
complete: state === "complete"
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: stepIndicatorVariants({ state }), "aria-hidden": "true", children: state === "complete" ? /* @__PURE__ */ jsx(Check, { size: 14, strokeWidth: 3 }) : state === "error" ? /* @__PURE__ */ jsx(X, { size: 14, strokeWidth: 3 }) : index + 1 }),
|
|
45
|
+
/* @__PURE__ */ jsxs(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
className: cn(
|
|
49
|
+
"min-w-0",
|
|
50
|
+
orientation === "horizontal" ? "mt-2 px-1" : "pt-0.5"
|
|
51
|
+
),
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ jsxs(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
className: cn(
|
|
57
|
+
"block text-body-2 font-medium",
|
|
58
|
+
state === "upcoming" ? "text-muted-foreground" : "text-foreground",
|
|
59
|
+
state === "error" && "text-destructive"
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
step.label,
|
|
63
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: state === "complete" ? " (completed)" : state === "error" ? " (failed)" : "" })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
step.description && /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-caption-lg text-muted-foreground", children: step.description })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
step.id ?? index
|
|
74
|
+
);
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
Steps.displayName = "Steps";
|
|
80
|
+
|
|
81
|
+
export { Steps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const stepsVariants: (props?: ({
|
|
3
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const stepIndicatorVariants: (props?: ({
|
|
6
|
+
state?: "current" | "error" | "complete" | "upcoming" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
/** Line to the next step, behind the indicators. */
|
|
9
|
+
export declare const stepConnectorVariants: (props?: ({
|
|
10
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
+
complete?: boolean | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export type StepsVariants = VariantProps<typeof stepsVariants>;
|
|
14
|
+
//# sourceMappingURL=Steps.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/Steps.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,aAAa;;8EAQxB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;8EAajC,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,qBAAqB;;;8EAYhC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
const stepsVariants = cva("font-sans", {
|
|
4
|
+
variants: {
|
|
5
|
+
orientation: {
|
|
6
|
+
horizontal: "flex items-start",
|
|
7
|
+
vertical: "flex flex-col"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: { orientation: "horizontal" }
|
|
11
|
+
});
|
|
12
|
+
const stepIndicatorVariants = cva(
|
|
13
|
+
"relative z-10 flex size-7 shrink-0 items-center justify-center rounded-full border-2 text-caption-lg font-semibold tabular-nums transition-colors",
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
state: {
|
|
17
|
+
complete: "border-primary bg-primary text-primary-foreground",
|
|
18
|
+
current: "border-primary bg-background text-primary",
|
|
19
|
+
error: "border-destructive bg-destructive text-destructive-foreground",
|
|
20
|
+
upcoming: "border-grey-300 bg-background text-muted-foreground dark:border-grey-700"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: { state: "upcoming" }
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const stepConnectorVariants = cva("absolute", {
|
|
27
|
+
variants: {
|
|
28
|
+
orientation: {
|
|
29
|
+
horizontal: "left-1/2 top-3.5 h-0.5 w-full",
|
|
30
|
+
vertical: "left-3.5 top-7 h-full w-0.5 -translate-x-1/2"
|
|
31
|
+
},
|
|
32
|
+
complete: {
|
|
33
|
+
true: "bg-primary",
|
|
34
|
+
false: "bg-grey-200 dark:bg-grey-800"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
defaultVariants: { orientation: "horizontal", complete: false }
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { stepConnectorVariants, stepIndicatorVariants, stepsVariants };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export type StepState = 'complete' | 'current' | 'error' | 'upcoming';
|
|
3
|
+
export interface StepItem {
|
|
4
|
+
id?: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
/** Secondary line, e.g. a date. */
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface StepsProps extends React.OlHTMLAttributes<HTMLOListElement> {
|
|
10
|
+
steps: StepItem[];
|
|
11
|
+
/** Index of the current step. Steps before it are complete. */
|
|
12
|
+
current: number;
|
|
13
|
+
/** `error` marks the current step as failed. */
|
|
14
|
+
status?: 'default' | 'error';
|
|
15
|
+
orientation?: 'horizontal' | 'vertical';
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=Steps.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.types.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/Steps.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAEtE,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mCAAmC;IACnC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,gBAAgB,CAAC,gBAAgB,CAAC;IAC1E,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SubNavActionProps, SubNavProps } from './SubNav.types';
|
|
3
|
+
/** Exact match, or nested under the item (`/orders/1` → `/orders`). */
|
|
4
|
+
export declare function isSubNavItemActive(href: string, activeHref?: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* In-page section navigation (account, settings, help centre…): a vertical
|
|
7
|
+
* list on desktop and a horizontally scrolling row on small screens.
|
|
8
|
+
* Unlike `SideBarNavigation` it's not an app shell: no branding, collapse or
|
|
9
|
+
* full-height frame.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SubNav: React.ForwardRefExoticComponent<SubNavProps & React.RefAttributes<HTMLElement>>;
|
|
12
|
+
/**
|
|
13
|
+
* A button for the `footer` slot (e.g. Log out), shaped like the items so
|
|
14
|
+
* its icon and label line up with them.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SubNavAction: React.ForwardRefExoticComponent<SubNavActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
//# sourceMappingURL=SubNav.d.ts.map
|