@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubNav.d.ts","sourceRoot":"","sources":["../../../src/components/SubNav/SubNav.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,iBAAiB,EAAmB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAUtF,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAK7E;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,iFAgElB,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,YAAY,6FAmBxB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cn } from '@timmbr/utils';
|
|
5
|
+
import { subNavIconVariants, subNavItemVariants, subNavListVariants, subNavFooterVariants } from './SubNav.styles.js';
|
|
6
|
+
import { Spinner } from '../Spinner/Spinner.js';
|
|
7
|
+
|
|
8
|
+
const DefaultLink = ({ href, className, children, ...rest }) => /* @__PURE__ */ jsx("a", { href, className, ...rest, children });
|
|
9
|
+
const trimSlash = (path) => path.length > 1 ? path.replace(/\/+$/, "") : path;
|
|
10
|
+
function isSubNavItemActive(href, activeHref) {
|
|
11
|
+
if (!activeHref) return false;
|
|
12
|
+
const item = trimSlash(href);
|
|
13
|
+
const current = trimSlash(activeHref.split(/[?#]/)[0] ?? "");
|
|
14
|
+
return current === item || current.startsWith(`${item}/`);
|
|
15
|
+
}
|
|
16
|
+
const SubNav = React.forwardRef(
|
|
17
|
+
({
|
|
18
|
+
items,
|
|
19
|
+
activeHref,
|
|
20
|
+
linkComponent: Link = DefaultLink,
|
|
21
|
+
footer,
|
|
22
|
+
mobileLayout = "scroll",
|
|
23
|
+
className,
|
|
24
|
+
"aria-label": ariaLabel = "Section navigation",
|
|
25
|
+
...props
|
|
26
|
+
}, ref) => {
|
|
27
|
+
const activeId = React.useMemo(() => {
|
|
28
|
+
const matches = items.filter((item) => isSubNavItemActive(item.href, activeHref));
|
|
29
|
+
return matches.sort((a, b) => b.href.length - a.href.length)[0]?.id;
|
|
30
|
+
}, [items, activeHref]);
|
|
31
|
+
return /* @__PURE__ */ jsxs(
|
|
32
|
+
"nav",
|
|
33
|
+
{
|
|
34
|
+
ref,
|
|
35
|
+
"aria-label": ariaLabel,
|
|
36
|
+
"data-slot": "sub-nav",
|
|
37
|
+
className: cn(
|
|
38
|
+
"flex gap-2 lg:flex-col lg:items-stretch lg:gap-0",
|
|
39
|
+
mobileLayout === "wrap" ? "flex-col items-stretch" : "items-center",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
...props,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx("ul", { className: cn(subNavListVariants({ mobileLayout }), "min-w-0 flex-1"), role: "list", children: items.map((item) => {
|
|
45
|
+
const active = item.id === activeId;
|
|
46
|
+
return /* @__PURE__ */ jsx("li", { className: "shrink-0", children: /* @__PURE__ */ jsxs(
|
|
47
|
+
Link,
|
|
48
|
+
{
|
|
49
|
+
href: item.href,
|
|
50
|
+
"aria-current": active ? "page" : void 0,
|
|
51
|
+
className: subNavItemVariants({ active }),
|
|
52
|
+
children: [
|
|
53
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: subNavIconVariants(), "aria-hidden": "true", children: item.icon }),
|
|
54
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children: item.label }),
|
|
55
|
+
item.badge !== void 0 && item.badge !== null && /* @__PURE__ */ jsx("span", { className: "text-caption-lg text-muted-foreground", children: item.badge })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
) }, item.id);
|
|
59
|
+
}) }),
|
|
60
|
+
footer && /* @__PURE__ */ jsx("div", { className: subNavFooterVariants(), "data-slot": "sub-nav-footer", children: footer })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
SubNav.displayName = "SubNav";
|
|
67
|
+
const SubNavAction = React.forwardRef(
|
|
68
|
+
({ icon, tone = "default", loading = false, disabled, className, children, type = "button", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
69
|
+
"button",
|
|
70
|
+
{
|
|
71
|
+
ref,
|
|
72
|
+
type,
|
|
73
|
+
disabled: disabled || loading,
|
|
74
|
+
"aria-busy": loading || void 0,
|
|
75
|
+
"data-slot": "sub-nav-action",
|
|
76
|
+
className: cn(subNavItemVariants({ tone }), className),
|
|
77
|
+
...props,
|
|
78
|
+
children: [
|
|
79
|
+
(icon || loading) && /* @__PURE__ */ jsx("span", { className: subNavIconVariants(), "aria-hidden": "true", children: loading ? /* @__PURE__ */ jsx(Spinner, { size: "sm" }) : icon }),
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
);
|
|
85
|
+
SubNavAction.displayName = "SubNavAction";
|
|
86
|
+
|
|
87
|
+
export { SubNav, SubNavAction, isSubNavItemActive };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/** Desktop (lg): a vertical list. Small screens: a scrolling row or wrapped lines. */
|
|
3
|
+
export declare const subNavListVariants: (props?: ({
|
|
4
|
+
mobileLayout?: "scroll" | "wrap" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Items and footer actions share this shape so their icons and labels line up.
|
|
8
|
+
* Active: dark brand text on a light brand tint (about 7:1) plus a bar on the
|
|
9
|
+
* inline-start edge on desktop, so the state never relies on colour alone.
|
|
10
|
+
*/
|
|
11
|
+
export declare const subNavItemVariants: (props?: ({
|
|
12
|
+
active?: boolean | null | undefined;
|
|
13
|
+
tone?: "default" | "destructive" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export declare const subNavIconVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
|
+
export declare const subNavFooterVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
export type SubNavItemVariants = VariantProps<typeof subNavItemVariants>;
|
|
18
|
+
//# sourceMappingURL=SubNav.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubNav.styles.d.ts","sourceRoot":"","sources":["../../../src/components/SubNav/SubNav.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,sFAAsF;AACtF,eAAO,MAAM,kBAAkB;;8EAQ7B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;8EAe9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,oFAA8E,CAAC;AAE9G,eAAO,MAAM,oBAAoB,oFAEhC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
const subNavListVariants = cva("flex gap-1 lg:flex-col lg:flex-nowrap lg:overflow-visible", {
|
|
4
|
+
variants: {
|
|
5
|
+
mobileLayout: {
|
|
6
|
+
scroll: "overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
7
|
+
wrap: "flex-wrap"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: { mobileLayout: "scroll" }
|
|
11
|
+
});
|
|
12
|
+
const subNavItemVariants = cva(
|
|
13
|
+
"relative flex w-full items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 lg:py-2.5 text-start font-sans text-body-2 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
active: {
|
|
17
|
+
true: "bg-muted font-semibold text-secondary-foreground lg:before:absolute lg:before:inset-y-2 lg:before:start-0 lg:before:w-1 lg:before:rounded-full lg:before:bg-primary",
|
|
18
|
+
false: "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
19
|
+
},
|
|
20
|
+
tone: {
|
|
21
|
+
default: "",
|
|
22
|
+
destructive: "text-destructive hover:bg-destructive/10 hover:text-destructive"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: { active: false, tone: "default" }
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
const subNavIconVariants = cva("flex size-5 shrink-0 items-center justify-center [&_svg]:size-[18px]");
|
|
29
|
+
const subNavFooterVariants = cva(
|
|
30
|
+
"flex shrink-0 flex-col lg:mt-2 lg:border-t lg:border-border lg:pt-2"
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export { subNavFooterVariants, subNavIconVariants, subNavItemVariants, subNavListVariants };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface SubNavItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
href: string;
|
|
6
|
+
/** Leading icon (decorative; hidden from screen readers). */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
/** Trailing count or tag, e.g. a number of items. */
|
|
9
|
+
badge?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface SubNavLinkProps {
|
|
12
|
+
href: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
'aria-current'?: 'page';
|
|
16
|
+
}
|
|
17
|
+
export interface SubNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'children'> {
|
|
18
|
+
items: SubNavItem[];
|
|
19
|
+
/**
|
|
20
|
+
* Current path. An item is active when it equals its `href` or is nested
|
|
21
|
+
* under it (`/account/orders/123` activates `/account/orders`).
|
|
22
|
+
*/
|
|
23
|
+
activeHref?: string;
|
|
24
|
+
/** Link to render items with (e.g. `next/link`). Defaults to `<a>`. */
|
|
25
|
+
linkComponent?: React.ComponentType<SubNavLinkProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Small screens: `scroll` keeps one horizontally scrolling row (good for many
|
|
28
|
+
* short items); `wrap` wraps the items onto several lines so every one stays
|
|
29
|
+
* visible (good for a handful of longer labels).
|
|
30
|
+
*/
|
|
31
|
+
mobileLayout?: 'scroll' | 'wrap';
|
|
32
|
+
/** Extra content after the items, e.g. a "Log out" button. */
|
|
33
|
+
footer?: React.ReactNode;
|
|
34
|
+
/** Accessible name of the navigation landmark. */
|
|
35
|
+
'aria-label'?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface SubNavActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
38
|
+
/** Leading icon, aligned with the item icons. */
|
|
39
|
+
icon?: React.ReactNode;
|
|
40
|
+
/** `destructive` for actions such as Log out. */
|
|
41
|
+
tone?: 'default' | 'destructive';
|
|
42
|
+
/** Shows a spinner in place of the icon and disables the button. */
|
|
43
|
+
loading?: boolean;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=SubNav.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubNav.types.d.ts","sourceRoot":"","sources":["../../../src/components/SubNav/SubNav.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,qDAAqD;IACrD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACtF,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IACrD;;;;OAIG;IACH,YAAY,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACtF,iDAAiD;IACjD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,iDAAiD;IACjD,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACjC,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SubNav/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
|
|
@@ -51,13 +51,13 @@ const Switch = React.forwardRef(
|
|
|
51
51
|
{
|
|
52
52
|
htmlFor: id,
|
|
53
53
|
className: cn(
|
|
54
|
-
"text-
|
|
54
|
+
"text-body-2 font-medium text-foreground cursor-pointer select-none leading-snug",
|
|
55
55
|
disabled && "cursor-not-allowed"
|
|
56
56
|
),
|
|
57
57
|
children: label
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
description && /* @__PURE__ */ jsx("p", { className: "text-
|
|
60
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-body-3 text-muted leading-normal mt-0.5", children: description })
|
|
61
61
|
] }),
|
|
62
62
|
/* @__PURE__ */ jsx("div", { className: "shrink-0 pt-0.5", children: switchElement })
|
|
63
63
|
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const switchVariants: (props?: ({
|
|
3
|
-
size?: "
|
|
3
|
+
size?: "sm" | "md" | "lg" | "default" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export declare const switchThumbVariants: (props?: ({
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "sm" | "md" | "lg" | "default" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export type SwitchVariants = VariantProps<typeof switchVariants>;
|
|
9
9
|
//# sourceMappingURL=Switch.styles.d.ts.map
|
|
@@ -17,7 +17,7 @@ const switchVariants = cva(
|
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
const switchThumbVariants = cva(
|
|
20
|
-
"pointer-events-none block rounded-full bg-
|
|
20
|
+
"pointer-events-none block rounded-full bg-grey-50 shadow-md ring-0 transition-transform data-[state=unchecked]:translate-x-0",
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
23
23
|
size: {
|
|
@@ -4,7 +4,7 @@ export declare const tableContainerVariants: (props?: ({
|
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export declare const tableVariants: (props?: ({
|
|
6
6
|
variant?: "default" | "bordered" | "striped" | null | undefined;
|
|
7
|
-
size?: "
|
|
7
|
+
size?: "sm" | "default" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export declare const tableRowVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
10
|
export declare const tableHeadVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -15,7 +15,7 @@ const tableContainerVariants = cva(
|
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
17
|
const tableVariants = cva(
|
|
18
|
-
"w-full caption-bottom text-
|
|
18
|
+
"w-full caption-bottom text-body-2 border-collapse text-left",
|
|
19
19
|
{
|
|
20
20
|
variants: {
|
|
21
21
|
variant: {
|
|
@@ -24,8 +24,8 @@ const tableVariants = cva(
|
|
|
24
24
|
bordered: "border-collapse border border-grey-200 dark:border-grey-800"
|
|
25
25
|
},
|
|
26
26
|
size: {
|
|
27
|
-
sm: "[&_td]:py-2 [&_td]:px-3 [&_th]:py-2 [&_th]:px-3 text-
|
|
28
|
-
default: "[&_td]:py-3.5 [&_td]:px-4 [&_th]:py-3 [&_th]:px-4 text-
|
|
27
|
+
sm: "[&_td]:py-2 [&_td]:px-3 [&_th]:py-2 [&_th]:px-3 text-body-3",
|
|
28
|
+
default: "[&_td]:py-3.5 [&_td]:px-4 [&_th]:py-3 [&_th]:px-4 text-body-2"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
defaultVariants: {
|
|
@@ -38,7 +38,7 @@ const tableRowVariants = cva(
|
|
|
38
38
|
"border-b border-grey-200 dark:border-grey-800 transition-colors data-[state=selected]:bg-primary/5 hover:bg-grey-50/80 dark:hover:bg-grey-900/60"
|
|
39
39
|
);
|
|
40
40
|
const tableHeadVariants = cva(
|
|
41
|
-
"h-10 text-left align-middle font-semibold text-muted-foreground text-
|
|
41
|
+
"h-10 text-left align-middle font-semibold text-muted-foreground text-body-3 uppercase tracking-wider select-none bg-grey-100/50 dark:bg-grey-900/30 [&:has([role=checkbox])]:pr-0"
|
|
42
42
|
);
|
|
43
43
|
const tableCellVariants = cva(
|
|
44
44
|
"align-middle [&:has([role=checkbox])]:pr-0"
|
|
@@ -47,7 +47,7 @@ const tableFooterVariants = cva(
|
|
|
47
47
|
"border-t border-grey-200 dark:border-grey-800 bg-grey-50/50 dark:bg-grey-900/50 font-medium [&>tr]:last:border-b-0"
|
|
48
48
|
);
|
|
49
49
|
const tablePaginationVariants = cva(
|
|
50
|
-
"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-3 border-t border-grey-200 dark:border-grey-800 text-
|
|
50
|
+
"flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-3 border-t border-grey-200 dark:border-grey-800 text-body-3 text-grey-600 dark:text-grey-400"
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
export { tableCellVariants, tableContainerVariants, tableFooterVariants, tableHeadVariants, tablePaginationVariants, tableRowVariants, tableVariants };
|
|
@@ -56,7 +56,7 @@ const TablePagination = React.forwardRef(
|
|
|
56
56
|
"aria-label": "Rows per page",
|
|
57
57
|
value: pageSize,
|
|
58
58
|
onChange: (e) => onPageSizeChange(Number(e.target.value)),
|
|
59
|
-
className: "h-7 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-
|
|
59
|
+
className: "h-7 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-grey-50 dark:bg-grey-900 px-2 py-0 text-body-3 font-medium text-foreground focus:outline-none focus:ring-1 focus:ring-primary",
|
|
60
60
|
children: pageSizeOptions.map((opt) => /* @__PURE__ */ jsx("option", { value: opt, children: opt }, opt))
|
|
61
61
|
}
|
|
62
62
|
)
|
|
@@ -70,14 +70,14 @@ const TablePagination = React.forwardRef(
|
|
|
70
70
|
"aria-label": "Previous page",
|
|
71
71
|
disabled: page <= 1,
|
|
72
72
|
onClick: () => onPageChange?.(page - 1),
|
|
73
|
-
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-
|
|
73
|
+
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-grey-50 dark:bg-grey-800 text-body-3 font-medium text-foreground hover:bg-grey-100 dark:hover:bg-grey-700 disabled:opacity-40 disabled:pointer-events-none transition-colors cursor-pointer",
|
|
74
74
|
children: [
|
|
75
75
|
/* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5" }),
|
|
76
76
|
/* @__PURE__ */ jsx("span", { children: "Previous" })
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */ jsxs("span", { className: "px-2 text-
|
|
80
|
+
/* @__PURE__ */ jsxs("span", { className: "px-2 text-body-3 font-medium text-muted-foreground", children: [
|
|
81
81
|
page,
|
|
82
82
|
" / ",
|
|
83
83
|
computedTotalPages
|
|
@@ -89,7 +89,7 @@ const TablePagination = React.forwardRef(
|
|
|
89
89
|
"aria-label": "Next page",
|
|
90
90
|
disabled: page >= computedTotalPages,
|
|
91
91
|
onClick: () => onPageChange?.(page + 1),
|
|
92
|
-
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-
|
|
92
|
+
className: "inline-flex items-center gap-1 h-8 px-2.5 rounded-[2px] border border-grey-200 dark:border-grey-700 bg-grey-50 dark:bg-grey-800 text-body-3 font-medium text-foreground hover:bg-grey-100 dark:hover:bg-grey-700 disabled:opacity-40 disabled:pointer-events-none transition-colors cursor-pointer",
|
|
93
93
|
children: [
|
|
94
94
|
/* @__PURE__ */ jsx("span", { children: "Next" }),
|
|
95
95
|
/* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5" })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAmBtB,eAAO,MAAM,IAAI,kFA4DhB,CAAC;AA6BF,eAAO,MAAM,QAAQ,sFA6EnB,CAAC;AAGH,eAAO,MAAM,WAAW,4FA2EvB,CAAC;AAGF,eAAO,MAAM,WAAW,yFAoBtB,CAAC"}
|
|
@@ -4,8 +4,9 @@ import * as React from 'react';
|
|
|
4
4
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
5
5
|
import { cn } from '@timmbr/utils';
|
|
6
6
|
import { motion } from '@timmbr/motion';
|
|
7
|
+
import { ChevronLeft, ChevronRight } from '@timmbr/icons';
|
|
7
8
|
import { resolveMotion } from '../../types/motion.js';
|
|
8
|
-
import { tabsContentVariants, tabsListVariants, tabsTriggerVariants } from './Tabs.styles.js';
|
|
9
|
+
import { tabsContentVariants, TABS_SCROLL_FADE, tabsListVariants, tabsScrollButtonVariants, tabsScrollEdgeVariants, tabsTriggerVariants } from './Tabs.styles.js';
|
|
9
10
|
import { useGlobalAnimation } from '../../providers/AnimationProvider.js';
|
|
10
11
|
|
|
11
12
|
const TabsContext = React.createContext({
|
|
@@ -71,19 +72,85 @@ const Tabs = React.forwardRef(
|
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
74
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
74
|
-
|
|
75
|
+
function useScrollEdges(ref, enabled) {
|
|
76
|
+
const [edges, setEdges] = React.useState({ start: false, end: false });
|
|
77
|
+
React.useEffect(() => {
|
|
78
|
+
const el = ref.current;
|
|
79
|
+
if (!enabled || !el) return;
|
|
80
|
+
const measure = () => {
|
|
81
|
+
const max = el.scrollWidth - el.clientWidth;
|
|
82
|
+
const next = { start: el.scrollLeft > 1, end: el.scrollLeft < max - 1 };
|
|
83
|
+
setEdges((prev) => prev.start === next.start && prev.end === next.end ? prev : next);
|
|
84
|
+
};
|
|
85
|
+
const frame = requestAnimationFrame(measure);
|
|
86
|
+
el.addEventListener("scroll", measure, { passive: true });
|
|
87
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
88
|
+
observer?.observe(el);
|
|
89
|
+
return () => {
|
|
90
|
+
cancelAnimationFrame(frame);
|
|
91
|
+
el.removeEventListener("scroll", measure);
|
|
92
|
+
observer?.disconnect();
|
|
93
|
+
};
|
|
94
|
+
}, [ref, enabled]);
|
|
95
|
+
return edges;
|
|
96
|
+
}
|
|
97
|
+
const TabsList = React.forwardRef(({ className, variant: localVariant, size: localSize, scrollable = false, scrollLabels, loading = false, ...props }, ref) => {
|
|
75
98
|
const context = React.useContext(TabsContext);
|
|
76
99
|
const variant = localVariant ?? context.variant;
|
|
77
100
|
const size = localSize ?? context.size;
|
|
78
|
-
|
|
101
|
+
const listRef = React.useRef(null);
|
|
102
|
+
const edges = useScrollEdges(listRef, scrollable);
|
|
103
|
+
const setRefs = (node) => {
|
|
104
|
+
listRef.current = node;
|
|
105
|
+
if (typeof ref === "function") ref(node);
|
|
106
|
+
else if (ref) ref.current = node;
|
|
107
|
+
};
|
|
108
|
+
const fade = scrollable && (edges.start || edges.end) ? `linear-gradient(to right, ${edges.start ? "transparent" : "#000"}, #000 ${edges.start ? TABS_SCROLL_FADE : "0px"}, #000 calc(100% - ${edges.end ? TABS_SCROLL_FADE : "0px"}), ${edges.end ? "transparent" : "#000"})` : void 0;
|
|
109
|
+
const list = /* @__PURE__ */ jsx(
|
|
79
110
|
TabsPrimitive.List,
|
|
80
111
|
{
|
|
81
|
-
ref,
|
|
112
|
+
ref: setRefs,
|
|
82
113
|
"data-slot": "tabs-list",
|
|
83
|
-
|
|
84
|
-
|
|
114
|
+
"aria-busy": loading || void 0,
|
|
115
|
+
className: cn(
|
|
116
|
+
tabsListVariants({ variant, size }),
|
|
117
|
+
loading && "opacity-70 transition-opacity",
|
|
118
|
+
scrollable && "max-w-full justify-start overflow-x-auto overflow-y-hidden scroll-smooth [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&>*]:shrink-0",
|
|
119
|
+
className
|
|
120
|
+
),
|
|
121
|
+
...props,
|
|
122
|
+
style: fade ? { ...props.style, maskImage: fade, WebkitMaskImage: fade } : props.style
|
|
85
123
|
}
|
|
86
124
|
);
|
|
125
|
+
if (!scrollable) return list;
|
|
126
|
+
const scrollByPage = (direction) => listRef.current?.scrollBy({ left: direction * listRef.current.clientWidth * 0.7, behavior: "smooth" });
|
|
127
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", "data-slot": "tabs-scroll", children: [
|
|
128
|
+
edges.start && /* @__PURE__ */ jsx("div", { className: tabsScrollEdgeVariants({ side: "start" }), children: /* @__PURE__ */ jsx(
|
|
129
|
+
"button",
|
|
130
|
+
{
|
|
131
|
+
type: "button",
|
|
132
|
+
tabIndex: -1,
|
|
133
|
+
"aria-label": scrollLabels?.previous ?? "Scroll tabs back",
|
|
134
|
+
"data-slot": "tabs-scroll-previous",
|
|
135
|
+
className: tabsScrollButtonVariants(),
|
|
136
|
+
onClick: () => scrollByPage(-1),
|
|
137
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": "true" })
|
|
138
|
+
}
|
|
139
|
+
) }),
|
|
140
|
+
list,
|
|
141
|
+
edges.end && /* @__PURE__ */ jsx("div", { className: tabsScrollEdgeVariants({ side: "end" }), children: /* @__PURE__ */ jsx(
|
|
142
|
+
"button",
|
|
143
|
+
{
|
|
144
|
+
type: "button",
|
|
145
|
+
tabIndex: -1,
|
|
146
|
+
"aria-label": scrollLabels?.next ?? "Scroll tabs forward",
|
|
147
|
+
"data-slot": "tabs-scroll-next",
|
|
148
|
+
className: tabsScrollButtonVariants(),
|
|
149
|
+
onClick: () => scrollByPage(1),
|
|
150
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true" })
|
|
151
|
+
}
|
|
152
|
+
) })
|
|
153
|
+
] });
|
|
87
154
|
});
|
|
88
155
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
89
156
|
const TabsTrigger = React.forwardRef(
|
|
@@ -122,11 +189,11 @@ const TabsTrigger = React.forwardRef(
|
|
|
122
189
|
tabsTriggerVariants({ variant, size }),
|
|
123
190
|
!shouldAnimate && "transition-none active:scale-100",
|
|
124
191
|
// Static active styles when animation is disabled
|
|
125
|
-
!shouldAnimate && isActive && variant === "pills" && "bg-primary text-
|
|
192
|
+
!shouldAnimate && isActive && variant === "pills" && "bg-primary text-grey-50 shadow-sm",
|
|
126
193
|
!shouldAnimate && isActive && variant === "underline" && "border-b-2 border-primary text-primary font-semibold",
|
|
127
194
|
!shouldAnimate && isActive && variant === "outline" && "bg-grey-200 dark:bg-grey-700 text-foreground",
|
|
128
195
|
// Text styling when active with animation
|
|
129
|
-
shouldAnimate && isActive && variant === "pills" && "text-
|
|
196
|
+
shouldAnimate && isActive && variant === "pills" && "text-grey-50",
|
|
130
197
|
shouldAnimate && isActive && variant === "underline" && "text-primary font-semibold",
|
|
131
198
|
shouldAnimate && isActive && variant === "outline" && "text-foreground",
|
|
132
199
|
motionClass,
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const tabsListVariants: (props?: ({
|
|
3
3
|
variant?: "underline" | "outline" | "pills" | null | undefined;
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "sm" | "md" | "lg" | "default" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export declare const tabsTriggerVariants: (props?: ({
|
|
7
7
|
variant?: "underline" | "outline" | "pills" | null | undefined;
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "sm" | "md" | "lg" | "default" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
/** Round chevron shown at an edge of a `scrollable` TabsList while there is more to scroll. */
|
|
11
|
+
export declare const tabsScrollButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
12
|
+
/** Holds a scroll button at one edge (the tabs under it are faded out with a mask). */
|
|
13
|
+
export declare const tabsScrollEdgeVariants: (props?: ({
|
|
14
|
+
side?: "start" | "end" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
/** Width of the faded strip under a scroll button. */
|
|
17
|
+
export declare const TABS_SCROLL_FADE = "56px";
|
|
10
18
|
export declare const tabsContentVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
19
|
export type TabsListVariants = VariantProps<typeof tabsListVariants>;
|
|
12
20
|
export type TabsTriggerVariants = VariantProps<typeof tabsTriggerVariants>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;8EAwB5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;8EAwB/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,oFAE/B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Tabs.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;8EAwB5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;8EAwB/B,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,wBAAwB,oFAEpC,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,sBAAsB;;8EAUlC,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC,eAAO,MAAM,mBAAmB,oFAE/B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -6,14 +6,14 @@ const tabsListVariants = cva(
|
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
pills: "rounded-md bg-grey-100 dark:bg-grey-800 p-1 text-muted-foreground",
|
|
9
|
-
underline: "border-b border-grey-200 dark:border-grey-700 bg-transparent p-0 gap-
|
|
9
|
+
underline: "border-b border-grey-200 dark:border-grey-700 bg-transparent p-0 gap-1 w-full justify-start",
|
|
10
10
|
outline: "rounded-md border border-grey-200 dark:border-grey-700 bg-transparent p-1 gap-1"
|
|
11
11
|
},
|
|
12
12
|
size: {
|
|
13
|
-
sm: "h-8 text-
|
|
14
|
-
default: "h-10 text-
|
|
15
|
-
md: "h-10 text-
|
|
16
|
-
lg: "h-12 text-
|
|
13
|
+
sm: "h-8 text-body-3",
|
|
14
|
+
default: "h-10 text-body-2",
|
|
15
|
+
md: "h-10 text-body-2",
|
|
16
|
+
lg: "h-12 text-body-1"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
defaultVariants: {
|
|
@@ -32,10 +32,10 @@ const tabsTriggerVariants = cva(
|
|
|
32
32
|
outline: "rounded-sm px-3 py-1.5 data-[state=inactive]:text-muted-foreground hover:text-foreground"
|
|
33
33
|
},
|
|
34
34
|
size: {
|
|
35
|
-
sm: "px-2.5 py-1 text-
|
|
36
|
-
default: "px-3 py-1.5 text-
|
|
37
|
-
md: "px-3 py-1.5 text-
|
|
38
|
-
lg: "px-4 py-2 text-
|
|
35
|
+
sm: "px-2.5 py-1 text-body-3",
|
|
36
|
+
default: "px-3 py-1.5 text-body-2",
|
|
37
|
+
md: "px-3 py-1.5 text-body-2",
|
|
38
|
+
lg: "px-4 py-2 text-body-1"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
defaultVariants: {
|
|
@@ -44,8 +44,23 @@ const tabsTriggerVariants = cva(
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
+
const tabsScrollButtonVariants = cva(
|
|
48
|
+
"pointer-events-auto flex size-8 shrink-0 items-center justify-center rounded-full border border-border bg-card text-foreground shadow-sm transition-colors hover:bg-accent [&_svg]:size-4"
|
|
49
|
+
);
|
|
50
|
+
const tabsScrollEdgeVariants = cva(
|
|
51
|
+
"pointer-events-none absolute inset-y-0 z-10 flex items-center",
|
|
52
|
+
{
|
|
53
|
+
variants: {
|
|
54
|
+
side: {
|
|
55
|
+
start: "start-0",
|
|
56
|
+
end: "end-0"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
const TABS_SCROLL_FADE = "56px";
|
|
47
62
|
const tabsContentVariants = cva(
|
|
48
63
|
"mt-3 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary font-sans text-foreground data-[state=active]:animate-tab-slide"
|
|
49
64
|
);
|
|
50
65
|
|
|
51
|
-
export { tabsContentVariants, tabsListVariants, tabsTriggerVariants };
|
|
66
|
+
export { TABS_SCROLL_FADE, tabsContentVariants, tabsListVariants, tabsScrollButtonVariants, tabsScrollEdgeVariants, tabsTriggerVariants };
|
|
@@ -19,6 +19,19 @@ export interface TabsProps extends TabsPrimitive.TabsProps {
|
|
|
19
19
|
motion?: MotionProp;
|
|
20
20
|
}
|
|
21
21
|
export interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>, TabsListVariants {
|
|
22
|
+
/**
|
|
23
|
+
* Let the tabs scroll sideways when they don't fit (e.g. on phones). Round
|
|
24
|
+
* chevron buttons appear at the edges while there is more to scroll.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
scrollable?: boolean;
|
|
28
|
+
/** Accessible names of the scroll buttons. */
|
|
29
|
+
scrollLabels?: {
|
|
30
|
+
previous?: string;
|
|
31
|
+
next?: string;
|
|
32
|
+
};
|
|
33
|
+
/** Content for the selected tab is loading (e.g. after a URL change): dims the tabs and sets aria-busy. */
|
|
34
|
+
loading?: boolean;
|
|
22
35
|
}
|
|
23
36
|
export interface TabsTriggerProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>, TabsTriggerVariants {
|
|
24
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.types.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,SAAU,SAAQ,aAAa,CAAC,SAAS;IACxD;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;IAC5C;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EAC/D,gBAAgB;
|
|
1
|
+
{"version":3,"file":"Tabs.types.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,SAAU,SAAQ,aAAa,CAAC,SAAS;IACxD;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;IAC5C;;;OAGG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EAC/D,gBAAgB;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,YAAY,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,2GAA2G;IAC3G,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,EAClE,mBAAmB;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC;IACpE;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,IAAI,+
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,IAAI,+EA6ChB,CAAC"}
|
|
@@ -15,6 +15,8 @@ const Text = React.forwardRef(
|
|
|
15
15
|
font = "sans",
|
|
16
16
|
weight,
|
|
17
17
|
italic,
|
|
18
|
+
tabular,
|
|
19
|
+
truncate,
|
|
18
20
|
asChild = false,
|
|
19
21
|
children,
|
|
20
22
|
...props
|
|
@@ -34,6 +36,8 @@ const Text = React.forwardRef(
|
|
|
34
36
|
font,
|
|
35
37
|
weight,
|
|
36
38
|
italic,
|
|
39
|
+
tabular,
|
|
40
|
+
truncate,
|
|
37
41
|
className
|
|
38
42
|
})
|
|
39
43
|
),
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const textVariants: (props?: ({
|
|
3
|
-
variant?: "caption" | "body-1" | "body-2" | "body-2-medium" | "body-2-semibold" | "body-2-light" | "body-3" | "body-3-light" | "subtitle-1" | "subtitle-2" | null | undefined;
|
|
4
|
-
foreground?: "default" | "destructive" | "inherit" | "white" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
3
|
+
variant?: "caption" | "overline" | "body-1" | "body-2" | "body-2-medium" | "body-2-semibold" | "body-2-light" | "body-3" | "body-3-light" | "subtitle-1" | "subtitle-2" | null | undefined;
|
|
4
|
+
foreground?: "default" | "destructive" | "success" | "warning" | "inherit" | "white" | "subtle" | "primary" | "secondary" | "muted" | null | undefined;
|
|
5
5
|
font?: "title" | "display" | "sans" | null | undefined;
|
|
6
6
|
weight?: "bold" | "normal" | "medium" | "light" | "semibold" | null | undefined;
|
|
7
|
+
tabular?: boolean | null | undefined;
|
|
8
|
+
truncate?: boolean | null | undefined;
|
|
7
9
|
italic?: boolean | null | undefined;
|
|
8
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
11
|
export type TextVariants = VariantProps<typeof textVariants>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"Text.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,YAAY;;;;;;;;8EA8DvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
|