@redsift/design-system 11.5.0 → 11.6.0-muiv5-alpha.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/_virtual/_rollupPluginBabelHelpers.js +133 -0
- package/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/_virtual/jsx-runtime.js +4 -0
- package/_virtual/jsx-runtime.js.map +1 -0
- package/_virtual/react-jsx-runtime.development.js +4 -0
- package/_virtual/react-jsx-runtime.development.js.map +1 -0
- package/_virtual/react-jsx-runtime.production.min.js +4 -0
- package/_virtual/react-jsx-runtime.production.min.js.map +1 -0
- package/components/alert/Alert.d.ts +9 -0
- package/components/alert/Alert.js +117 -0
- package/components/alert/Alert.js.map +1 -0
- package/components/alert/intl/en-US.json.js +7 -0
- package/components/alert/intl/en-US.json.js.map +1 -0
- package/components/alert/intl/fr-FR.json.js +7 -0
- package/components/alert/intl/fr-FR.json.js.map +1 -0
- package/components/alert/intl/index.js +10 -0
- package/components/alert/intl/index.js.map +1 -0
- package/components/alert/styles.js +54 -0
- package/components/alert/styles.js.map +1 -0
- package/components/alert/types.d.ts +49 -0
- package/components/alert/types.js +20 -0
- package/components/alert/types.js.map +1 -0
- package/components/app-bar/AppBar.d.ts +9 -0
- package/components/app-bar/AppBar.js +95 -0
- package/components/app-bar/AppBar.js.map +1 -0
- package/components/app-bar/intl/en-US.json.js +9 -0
- package/components/app-bar/intl/en-US.json.js.map +1 -0
- package/components/app-bar/intl/fr-FR.json.js +9 -0
- package/components/app-bar/intl/fr-FR.json.js.map +1 -0
- package/components/app-bar/intl/index.js +10 -0
- package/components/app-bar/intl/index.js.map +1 -0
- package/components/app-bar/styles.js +139 -0
- package/components/app-bar/styles.js.map +1 -0
- package/components/app-bar/types.d.ts +31 -0
- package/components/app-container/AppContainer.d.ts +11 -0
- package/components/app-container/AppContainer.js +117 -0
- package/components/app-container/AppContainer.js.map +1 -0
- package/components/app-container/context.d.ts +6 -0
- package/components/app-container/context.js +6 -0
- package/components/app-container/context.js.map +1 -0
- package/components/app-container/styles.js +30 -0
- package/components/app-container/styles.js.map +1 -0
- package/components/app-container/types.d.ts +51 -0
- package/components/app-content/AppContent.d.ts +9 -0
- package/components/app-content/AppContent.js +42 -0
- package/components/app-content/AppContent.js.map +1 -0
- package/components/app-content/styles.js +54 -0
- package/components/app-content/styles.js.map +1 -0
- package/components/app-content/types.d.ts +19 -0
- package/components/app-side-panel/AppSidePanel.d.ts +9 -0
- package/components/app-side-panel/AppSidePanel.js +86 -0
- package/components/app-side-panel/AppSidePanel.js.map +1 -0
- package/components/app-side-panel/intl/en-US.json.js +9 -0
- package/components/app-side-panel/intl/en-US.json.js.map +1 -0
- package/components/app-side-panel/intl/fr-FR.json.js +9 -0
- package/components/app-side-panel/intl/fr-FR.json.js.map +1 -0
- package/components/app-side-panel/intl/index.js +10 -0
- package/components/app-side-panel/intl/index.js.map +1 -0
- package/components/app-side-panel/styles.js +183 -0
- package/components/app-side-panel/styles.js.map +1 -0
- package/components/app-side-panel/types.d.ts +39 -0
- package/components/app-side-panel/types.js +15 -0
- package/components/app-side-panel/types.js.map +1 -0
- package/components/app-side-panel/useAppSidePanel.d.ts +6 -0
- package/components/app-side-panel/useAppSidePanel.js +23 -0
- package/components/app-side-panel/useAppSidePanel.js.map +1 -0
- package/components/badge/Badge.d.ts +9 -0
- package/components/badge/Badge.js +44 -0
- package/components/badge/Badge.js.map +1 -0
- package/components/badge/styles.js +93 -0
- package/components/badge/styles.js.map +1 -0
- package/components/badge/types.d.ts +37 -0
- package/components/badge/types.js +14 -0
- package/components/badge/types.js.map +1 -0
- package/components/breadcrumb-item/BreadcrumbItem.d.ts +9 -0
- package/components/breadcrumb-item/BreadcrumbItem.js +47 -0
- package/components/breadcrumb-item/BreadcrumbItem.js.map +1 -0
- package/components/breadcrumb-item/styles.js +48 -0
- package/components/breadcrumb-item/styles.js.map +1 -0
- package/components/breadcrumb-item/types.d.ts +23 -0
- package/components/breadcrumbs/Breadcrumbs.d.ts +13 -0
- package/components/breadcrumbs/Breadcrumbs.js +61 -0
- package/components/breadcrumbs/Breadcrumbs.js.map +1 -0
- package/components/breadcrumbs/styles.js +38 -0
- package/components/breadcrumbs/styles.js.map +1 -0
- package/components/breadcrumbs/types.d.ts +19 -0
- package/components/button/Button.d.ts +13 -0
- package/components/button/Button.js +92 -0
- package/components/button/Button.js.map +1 -0
- package/components/button/styles.d.ts +20 -0
- package/components/button/styles.js +219 -0
- package/components/button/styles.js.map +1 -0
- package/components/button/types.d.ts +67 -0
- package/components/button/types.js +19 -0
- package/components/button/types.js.map +1 -0
- package/components/button-group/ButtonGroup.d.ts +9 -0
- package/components/button-group/ButtonGroup.js +67 -0
- package/components/button-group/ButtonGroup.js.map +1 -0
- package/components/button-group/styles.js +103 -0
- package/components/button-group/styles.js.map +1 -0
- package/components/button-group/types.d.ts +36 -0
- package/components/button-group/types.js +19 -0
- package/components/button-group/types.js.map +1 -0
- package/components/button-link/ButtonLink.d.ts +13 -0
- package/components/button-link/ButtonLink.js +85 -0
- package/components/button-link/ButtonLink.js.map +1 -0
- package/components/button-link/types.d.ts +18 -0
- package/components/card/Card.d.ts +13 -0
- package/components/card/Card.js +81 -0
- package/components/card/Card.js.map +1 -0
- package/components/card/intl/en-US.json.js +9 -0
- package/components/card/intl/en-US.json.js.map +1 -0
- package/components/card/intl/fr-FR.json.js +9 -0
- package/components/card/intl/fr-FR.json.js.map +1 -0
- package/components/card/intl/index.js +10 -0
- package/components/card/intl/index.js.map +1 -0
- package/components/card/styles.js +63 -0
- package/components/card/styles.js.map +1 -0
- package/components/card/types.d.ts +25 -0
- package/components/card-actions/CardActions.d.ts +9 -0
- package/components/card-actions/CardActions.js +33 -0
- package/components/card-actions/CardActions.js.map +1 -0
- package/components/card-actions/styles.js +15 -0
- package/components/card-actions/styles.js.map +1 -0
- package/components/card-actions/types.d.ts +11 -0
- package/components/card-body/CardBody.d.ts +9 -0
- package/components/card-body/CardBody.js +28 -0
- package/components/card-body/CardBody.js.map +1 -0
- package/components/card-body/styles.js +18 -0
- package/components/card-body/styles.js.map +1 -0
- package/components/card-body/types.d.ts +11 -0
- package/components/card-header/CardHeader.d.ts +9 -0
- package/components/card-header/CardHeader.js +56 -0
- package/components/card-header/CardHeader.js.map +1 -0
- package/components/card-header/styles.js +31 -0
- package/components/card-header/styles.js.map +1 -0
- package/components/card-header/types.d.ts +28 -0
- package/components/checkbox/Checkbox.d.ts +11 -0
- package/components/checkbox/Checkbox.js +135 -0
- package/components/checkbox/Checkbox.js.map +1 -0
- package/components/checkbox/styles.js +113 -0
- package/components/checkbox/styles.js.map +1 -0
- package/components/checkbox/types.d.ts +60 -0
- package/components/checkbox-group/CheckboxGroup.d.ts +10 -0
- package/components/checkbox-group/CheckboxGroup.js +101 -0
- package/components/checkbox-group/CheckboxGroup.js.map +1 -0
- package/components/checkbox-group/context.js +6 -0
- package/components/checkbox-group/context.js.map +1 -0
- package/components/checkbox-group/styles.js +78 -0
- package/components/checkbox-group/styles.js.map +1 -0
- package/components/checkbox-group/types.d.ts +72 -0
- package/components/checkbox-group/types.js +18 -0
- package/components/checkbox-group/types.js.map +1 -0
- package/components/conditional-wrapper/ConditionalWrapper.d.ts +6 -0
- package/components/conditional-wrapper/ConditionalWrapper.js +13 -0
- package/components/conditional-wrapper/ConditionalWrapper.js.map +1 -0
- package/components/conditional-wrapper/types.d.ts +10 -0
- package/components/detailed-card/DetailedCard.d.ts +15 -0
- package/components/detailed-card/DetailedCard.js +170 -0
- package/components/detailed-card/DetailedCard.js.map +1 -0
- package/components/detailed-card/intl/en-US.json.js +7 -0
- package/components/detailed-card/intl/en-US.json.js.map +1 -0
- package/components/detailed-card/intl/fr-FR.json.js +7 -0
- package/components/detailed-card/intl/fr-FR.json.js.map +1 -0
- package/components/detailed-card/intl/index.js +10 -0
- package/components/detailed-card/intl/index.js.map +1 -0
- package/components/detailed-card/styles.js +49 -0
- package/components/detailed-card/styles.js.map +1 -0
- package/components/detailed-card/types.d.ts +40 -0
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.d.ts +9 -0
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js +33 -0
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js.map +1 -0
- package/components/detailed-card-collapsible-section-items/styles.js +35 -0
- package/components/detailed-card-collapsible-section-items/styles.js.map +1 -0
- package/components/detailed-card-collapsible-section-items/types.d.ts +16 -0
- package/components/detailed-card-header/DetailedCardHeader.d.ts +9 -0
- package/components/detailed-card-header/DetailedCardHeader.js +45 -0
- package/components/detailed-card-header/DetailedCardHeader.js.map +1 -0
- package/components/detailed-card-header/styles.js +26 -0
- package/components/detailed-card-header/styles.js.map +1 -0
- package/components/detailed-card-header/types.d.ts +20 -0
- package/components/detailed-card-section/DetailedCardSection.d.ts +9 -0
- package/components/detailed-card-section/DetailedCardSection.js +90 -0
- package/components/detailed-card-section/DetailedCardSection.js.map +1 -0
- package/components/detailed-card-section/intl/en-US.json.js +9 -0
- package/components/detailed-card-section/intl/en-US.json.js.map +1 -0
- package/components/detailed-card-section/intl/fr-FR.json.js +9 -0
- package/components/detailed-card-section/intl/fr-FR.json.js.map +1 -0
- package/components/detailed-card-section/intl/index.js +10 -0
- package/components/detailed-card-section/intl/index.js.map +1 -0
- package/components/detailed-card-section/styles.js +69 -0
- package/components/detailed-card-section/styles.js.map +1 -0
- package/components/detailed-card-section/types.d.ts +27 -0
- package/components/detailed-card-section-item/DetailedCardSectionItem.d.ts +9 -0
- package/components/detailed-card-section-item/DetailedCardSectionItem.js +64 -0
- package/components/detailed-card-section-item/DetailedCardSectionItem.js.map +1 -0
- package/components/detailed-card-section-item/styles.js +34 -0
- package/components/detailed-card-section-item/styles.js.map +1 -0
- package/components/detailed-card-section-item/types.d.ts +35 -0
- package/components/flexbox/Flexbox.d.ts +9 -0
- package/components/flexbox/Flexbox.js +44 -0
- package/components/flexbox/Flexbox.js.map +1 -0
- package/components/flexbox/styles.js +54 -0
- package/components/flexbox/styles.js.map +1 -0
- package/components/flexbox/types.d.ts +24 -0
- package/components/focus-within-group/FocusWithinGroup.d.ts +41 -0
- package/components/focus-within-group/FocusWithinGroup.js +91 -0
- package/components/focus-within-group/FocusWithinGroup.js.map +1 -0
- package/components/focus-within-group/context.d.ts +7 -0
- package/components/focus-within-group/context.js +21 -0
- package/components/focus-within-group/context.js.map +1 -0
- package/components/focus-within-group/reducer.d.ts +5 -0
- package/components/focus-within-group/reducer.js +419 -0
- package/components/focus-within-group/reducer.js.map +1 -0
- package/components/focus-within-group/types.d.ts +143 -0
- package/components/focus-within-group/types.js +42 -0
- package/components/focus-within-group/types.js.map +1 -0
- package/components/focus-within-group/useFocusOnList.d.ts +5 -0
- package/components/focus-within-group/useFocusOnList.js +44 -0
- package/components/focus-within-group/useFocusOnList.js.map +1 -0
- package/components/focus-within-group/useFocusOnListItem.d.ts +39 -0
- package/components/focus-within-group/useFocusOnListItem.js +148 -0
- package/components/focus-within-group/useFocusOnListItem.js.map +1 -0
- package/components/gradient-border/index.d.ts +14 -0
- package/components/gradient-border/index.js +38 -0
- package/components/gradient-border/index.js.map +1 -0
- package/components/grid/Grid.d.ts +13 -0
- package/components/grid/Grid.js +45 -0
- package/components/grid/Grid.js.map +1 -0
- package/components/grid/styles.js +55 -0
- package/components/grid/styles.js.map +1 -0
- package/components/grid/types.d.ts +22 -0
- package/components/grid-item/GridItem.d.ts +9 -0
- package/components/grid-item/GridItem.js +28 -0
- package/components/grid-item/GridItem.js.map +1 -0
- package/components/grid-item/styles.js +16 -0
- package/components/grid-item/styles.js.map +1 -0
- package/components/grid-item/types.d.ts +11 -0
- package/components/heading/Heading.d.ts +9 -0
- package/components/heading/Heading.js +50 -0
- package/components/heading/Heading.js.map +1 -0
- package/components/heading/styles.js +67 -0
- package/components/heading/styles.js.map +1 -0
- package/components/heading/types.d.ts +62 -0
- package/components/heading/types.js +26 -0
- package/components/heading/types.js.map +1 -0
- package/components/icon/Icon.d.ts +10 -0
- package/components/icon/Icon.js +116 -0
- package/components/icon/Icon.js.map +1 -0
- package/components/icon/styles.js +84 -0
- package/components/icon/styles.js.map +1 -0
- package/components/icon/types.d.ts +57 -0
- package/components/icon/types.js +18 -0
- package/components/icon/types.js.map +1 -0
- package/components/icon-button/IconButton.d.ts +12 -0
- package/components/icon-button/IconButton.js +81 -0
- package/components/icon-button/IconButton.js.map +1 -0
- package/components/icon-button/styles.js +31 -0
- package/components/icon-button/styles.js.map +1 -0
- package/components/icon-button/types.d.ts +56 -0
- package/components/icon-button/types.js +19 -0
- package/components/icon-button/types.js.map +1 -0
- package/components/icon-button-link/IconButtonLink.d.ts +13 -0
- package/components/icon-button-link/IconButtonLink.js +76 -0
- package/components/icon-button-link/IconButtonLink.js.map +1 -0
- package/components/icon-button-link/types.d.ts +18 -0
- package/components/item/Item.d.ts +10 -0
- package/components/item/Item.js +225 -0
- package/components/item/Item.js.map +1 -0
- package/components/item/styles.d.ts +20 -0
- package/components/item/styles.js +129 -0
- package/components/item/styles.js.map +1 -0
- package/components/item/types.d.ts +59 -0
- package/components/item/useMenuItem.js +55 -0
- package/components/item/useMenuItem.js.map +1 -0
- package/components/link/Link.d.ts +14 -0
- package/components/link/Link.js +67 -0
- package/components/link/Link.js.map +1 -0
- package/components/link/styles.d.ts +15 -0
- package/components/link/styles.js +145 -0
- package/components/link/styles.js.map +1 -0
- package/components/link/types.d.ts +40 -0
- package/components/link-button/LinkButton.d.ts +13 -0
- package/components/link-button/LinkButton.js +66 -0
- package/components/link-button/LinkButton.js.map +1 -0
- package/components/link-button/types.d.ts +13 -0
- package/components/listbox/ActiveDescendantListbox.d.ts +8 -0
- package/components/listbox/ActiveDescendantListbox.js +74 -0
- package/components/listbox/ActiveDescendantListbox.js.map +1 -0
- package/components/listbox/Listbox.d.ts +10 -0
- package/components/listbox/Listbox.js +110 -0
- package/components/listbox/Listbox.js.map +1 -0
- package/components/listbox/RovingTabindexListbox.d.ts +8 -0
- package/components/listbox/RovingTabindexListbox.js +30 -0
- package/components/listbox/RovingTabindexListbox.js.map +1 -0
- package/components/listbox/context.d.ts +7 -0
- package/components/listbox/context.js +15 -0
- package/components/listbox/context.js.map +1 -0
- package/components/listbox/reducer.d.ts +5 -0
- package/components/listbox/reducer.js +45 -0
- package/components/listbox/reducer.js.map +1 -0
- package/components/listbox/styles.js +44 -0
- package/components/listbox/styles.js.map +1 -0
- package/components/listbox/types.d.ts +101 -0
- package/components/listbox/types.js +32 -0
- package/components/listbox/types.js.map +1 -0
- package/components/listbox/useListboxItem.d.ts +12 -0
- package/components/listbox/useListboxItem.js +90 -0
- package/components/listbox/useListboxItem.js.map +1 -0
- package/components/number/Number.d.ts +9 -0
- package/components/number/Number.js +105 -0
- package/components/number/Number.js.map +1 -0
- package/components/number/styles.js +10 -0
- package/components/number/styles.js.map +1 -0
- package/components/number/types.d.ts +63 -0
- package/components/number-field/NumberField.d.ts +10 -0
- package/components/number-field/NumberField.js +216 -0
- package/components/number-field/NumberField.js.map +1 -0
- package/components/number-field/styles.js +240 -0
- package/components/number-field/styles.js.map +1 -0
- package/components/number-field/types.d.ts +74 -0
- package/components/number-field/types.js +14 -0
- package/components/number-field/types.js.map +1 -0
- package/components/pill/Pill.d.ts +9 -0
- package/components/pill/Pill.js +93 -0
- package/components/pill/Pill.js.map +1 -0
- package/components/pill/styles.js +305 -0
- package/components/pill/styles.js.map +1 -0
- package/components/pill/types.d.ts +47 -0
- package/components/pill/types.js +15 -0
- package/components/pill/types.js.map +1 -0
- package/components/progress-bar/ProgressBar.d.ts +9 -0
- package/components/progress-bar/ProgressBar.js +35 -0
- package/components/progress-bar/ProgressBar.js.map +1 -0
- package/components/progress-bar/styles.js +38 -0
- package/components/progress-bar/styles.js.map +1 -0
- package/components/progress-bar/types.d.ts +20 -0
- package/components/radio/Radio.d.ts +11 -0
- package/components/radio/Radio.js +128 -0
- package/components/radio/Radio.js.map +1 -0
- package/components/radio/styles.js +113 -0
- package/components/radio/styles.js.map +1 -0
- package/components/radio/types.d.ts +58 -0
- package/components/radio-group/RadioGroup.d.ts +10 -0
- package/components/radio-group/RadioGroup.js +89 -0
- package/components/radio-group/RadioGroup.js.map +1 -0
- package/components/radio-group/context.js +6 -0
- package/components/radio-group/context.js.map +1 -0
- package/components/radio-group/styles.js +78 -0
- package/components/radio-group/styles.js.map +1 -0
- package/components/radio-group/types.d.ts +68 -0
- package/components/radio-group/types.js +18 -0
- package/components/radio-group/types.js.map +1 -0
- package/components/shared/styles.d.ts +17 -0
- package/components/shared/styles.js +250 -0
- package/components/shared/styles.js.map +1 -0
- package/components/shield/Shield.d.ts +9 -0
- package/components/shield/Shield.js +136 -0
- package/components/shield/Shield.js.map +1 -0
- package/components/shield/styles.js +71 -0
- package/components/shield/styles.js.map +1 -0
- package/components/shield/types.d.ts +52 -0
- package/components/shield/types.js +25 -0
- package/components/shield/types.js.map +1 -0
- package/components/side-navigation-menu/SideNavigationMenu.d.ts +9 -0
- package/components/side-navigation-menu/SideNavigationMenu.js +367 -0
- package/components/side-navigation-menu/SideNavigationMenu.js.map +1 -0
- package/components/side-navigation-menu/context.js +6 -0
- package/components/side-navigation-menu/context.js.map +1 -0
- package/components/side-navigation-menu/reducer.js +26 -0
- package/components/side-navigation-menu/reducer.js.map +1 -0
- package/components/side-navigation-menu/styles.js +196 -0
- package/components/side-navigation-menu/styles.js.map +1 -0
- package/components/side-navigation-menu/types.d.ts +72 -0
- package/components/side-navigation-menu/types.js +21 -0
- package/components/side-navigation-menu/types.js.map +1 -0
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.d.ts +9 -0
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.js +217 -0
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.js.map +1 -0
- package/components/side-navigation-menu-bar/context.js +6 -0
- package/components/side-navigation-menu-bar/context.js.map +1 -0
- package/components/side-navigation-menu-bar/styles.js +89 -0
- package/components/side-navigation-menu-bar/styles.js.map +1 -0
- package/components/side-navigation-menu-bar/types.d.ts +65 -0
- package/components/side-navigation-menu-bar/types.js +22 -0
- package/components/side-navigation-menu-bar/types.js.map +1 -0
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.d.ts +9 -0
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js +70 -0
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js.map +1 -0
- package/components/side-navigation-menu-item/SideNavigationMenuItem.d.ts +9 -0
- package/components/side-navigation-menu-item/SideNavigationMenuItem.js +115 -0
- package/components/side-navigation-menu-item/SideNavigationMenuItem.js.map +1 -0
- package/components/side-navigation-menu-item/styles.js +174 -0
- package/components/side-navigation-menu-item/styles.js.map +1 -0
- package/components/side-navigation-menu-item/types.d.ts +51 -0
- package/components/skeleton/Skeleton.d.ts +15 -0
- package/components/skeleton/Skeleton.js +42 -0
- package/components/skeleton/Skeleton.js.map +1 -0
- package/components/skeleton/styles.js +84 -0
- package/components/skeleton/styles.js.map +1 -0
- package/components/skeleton/types.d.ts +18 -0
- package/components/skeleton-circle/SkeletonCircle.d.ts +9 -0
- package/components/skeleton-circle/SkeletonCircle.js +36 -0
- package/components/skeleton-circle/SkeletonCircle.js.map +1 -0
- package/components/skeleton-circle/styles.js +26 -0
- package/components/skeleton-circle/styles.js.map +1 -0
- package/components/skeleton-circle/types.d.ts +12 -0
- package/components/skeleton-text/SkeletonText.d.ts +9 -0
- package/components/skeleton-text/SkeletonText.js +42 -0
- package/components/skeleton-text/SkeletonText.js.map +1 -0
- package/components/skeleton-text/styles.js +39 -0
- package/components/skeleton-text/styles.js.map +1 -0
- package/components/skeleton-text/types.d.ts +36 -0
- package/components/skeleton-text/types.js +20 -0
- package/components/skeleton-text/types.js.map +1 -0
- package/components/spinner/Spinner.d.ts +9 -0
- package/components/spinner/Spinner.js +82 -0
- package/components/spinner/Spinner.js.map +1 -0
- package/components/spinner/images/spinner-grey-l1.svg.js +4 -0
- package/components/spinner/images/spinner-grey-l1.svg.js.map +1 -0
- package/components/spinner/images/spinner-grey-l2.svg.js +4 -0
- package/components/spinner/images/spinner-grey-l2.svg.js.map +1 -0
- package/components/spinner/images/spinner-grey-l3.svg.js +4 -0
- package/components/spinner/images/spinner-grey-l3.svg.js.map +1 -0
- package/components/spinner/images/spinner-primary-n.svg.js +4 -0
- package/components/spinner/images/spinner-primary-n.svg.js.map +1 -0
- package/components/spinner/intl/en-US.json.js +7 -0
- package/components/spinner/intl/en-US.json.js.map +1 -0
- package/components/spinner/intl/fr-FR.json.js +7 -0
- package/components/spinner/intl/fr-FR.json.js.map +1 -0
- package/components/spinner/intl/index.js +10 -0
- package/components/spinner/intl/index.js.map +1 -0
- package/components/spinner/styles.js +13 -0
- package/components/spinner/styles.js.map +1 -0
- package/components/spinner/types.d.ts +38 -0
- package/components/spinner/types.js +16 -0
- package/components/spinner/types.js.map +1 -0
- package/components/switch/Switch.d.ts +11 -0
- package/components/switch/Switch.js +137 -0
- package/components/switch/Switch.js.map +1 -0
- package/components/switch/styles.js +187 -0
- package/components/switch/styles.js.map +1 -0
- package/components/switch/types.d.ts +58 -0
- package/components/switch-group/SwitchGroup.d.ts +10 -0
- package/components/switch-group/SwitchGroup.js +101 -0
- package/components/switch-group/SwitchGroup.js.map +1 -0
- package/components/switch-group/context.js +6 -0
- package/components/switch-group/context.js.map +1 -0
- package/components/switch-group/styles.js +78 -0
- package/components/switch-group/styles.js.map +1 -0
- package/components/switch-group/types.d.ts +72 -0
- package/components/switch-group/types.js +18 -0
- package/components/switch-group/types.js.map +1 -0
- package/components/text/Text.d.ts +9 -0
- package/components/text/Text.js +51 -0
- package/components/text/Text.js.map +1 -0
- package/components/text/styles.js +112 -0
- package/components/text/styles.js.map +1 -0
- package/components/text/types.d.ts +73 -0
- package/components/text/types.js +34 -0
- package/components/text/types.js.map +1 -0
- package/components/text-area/TextArea.d.ts +10 -0
- package/components/text-area/TextArea.js +165 -0
- package/components/text-area/TextArea.js.map +1 -0
- package/components/text-area/styles.js +240 -0
- package/components/text-area/styles.js.map +1 -0
- package/components/text-area/types.d.ts +28 -0
- package/components/text-area/types.js +14 -0
- package/components/text-area/types.js.map +1 -0
- package/components/text-field/TextField.d.ts +10 -0
- package/components/text-field/TextField.js +197 -0
- package/components/text-field/TextField.js.map +1 -0
- package/components/text-field/intl/en-US.json.js +8 -0
- package/components/text-field/intl/en-US.json.js.map +1 -0
- package/components/text-field/intl/fr-FR.json.js +8 -0
- package/components/text-field/intl/fr-FR.json.js.map +1 -0
- package/components/text-field/intl/index.js +10 -0
- package/components/text-field/intl/index.js.map +1 -0
- package/components/text-field/styles.d.ts +22 -0
- package/components/text-field/styles.js +252 -0
- package/components/text-field/styles.js.map +1 -0
- package/components/text-field/types.d.ts +99 -0
- package/components/text-field/types.js +18 -0
- package/components/text-field/types.js.map +1 -0
- package/components/theme/context.d.ts +11 -0
- package/components/theme/context.js +7 -0
- package/components/theme/context.js.map +1 -0
- package/components/theme/useTheme.d.ts +5 -0
- package/components/theme/useTheme.js +13 -0
- package/components/theme/useTheme.js.map +1 -0
- package/hooks/useBoundingRect.d.ts +8 -0
- package/hooks/useBoundingRect.js +17 -0
- package/hooks/useBoundingRect.js.map +1 -0
- package/hooks/useComputeNumberOfRows.d.ts +15 -0
- package/hooks/useComputeNumberOfRows.js +40 -0
- package/hooks/useComputeNumberOfRows.js.map +1 -0
- package/hooks/useIsLoaded.d.ts +5 -0
- package/hooks/useIsLoaded.js +14 -0
- package/hooks/useIsLoaded.js.map +1 -0
- package/hooks/useWindowSize.d.ts +8 -0
- package/hooks/useWindowSize.js +42 -0
- package/hooks/useWindowSize.js.map +1 -0
- package/index.d.ts +157 -4667
- package/index.js +121 -24514
- package/index.js.map +1 -1
- package/package.json +11 -3
- package/packages/popovers/src/components/tooltip/Tooltip.js +62 -0
- package/packages/popovers/src/components/tooltip/Tooltip.js.map +1 -0
- package/packages/popovers/src/components/tooltip/context.js +6 -0
- package/packages/popovers/src/components/tooltip/context.js.map +1 -0
- package/packages/popovers/src/components/tooltip/types.js +28 -0
- package/packages/popovers/src/components/tooltip/types.js.map +1 -0
- package/packages/popovers/src/components/tooltip/useTooltip.js +78 -0
- package/packages/popovers/src/components/tooltip/useTooltip.js.map +1 -0
- package/packages/popovers/src/components/tooltip/useTooltipContext.js +13 -0
- package/packages/popovers/src/components/tooltip/useTooltipContext.js.map +1 -0
- package/packages/popovers/src/components/tooltip-content/TooltipContent.js +80 -0
- package/packages/popovers/src/components/tooltip-content/TooltipContent.js.map +1 -0
- package/packages/popovers/src/components/tooltip-content/styles.js +128 -0
- package/packages/popovers/src/components/tooltip-content/styles.js.map +1 -0
- package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js +47 -0
- package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js.map +1 -0
- package/react-aria/internationalized/date/DateFormatter.d.ts +25 -0
- package/react-aria/internationalized/date/DateFormatter.js +187 -0
- package/react-aria/internationalized/date/DateFormatter.js.map +1 -0
- package/react-aria/internationalized/message/MessageDictionary.d.ts +7 -0
- package/react-aria/internationalized/message/MessageDictionary.js +82 -0
- package/react-aria/internationalized/message/MessageDictionary.js.map +1 -0
- package/react-aria/internationalized/message/MessageFormatter.js +38 -0
- package/react-aria/internationalized/message/MessageFormatter.js.map +1 -0
- package/react-aria/internationalized/number/NumberFormatter.d.ts +6 -0
- package/react-aria/internationalized/number/NumberFormatter.js +222 -0
- package/react-aria/internationalized/number/NumberFormatter.js.map +1 -0
- package/react-aria/internationalized/number/NumberParser.js +288 -0
- package/react-aria/internationalized/number/NumberParser.js.map +1 -0
- package/react-aria/internationalized/string/LocalizedStringDictionary.d.ts +21 -0
- package/react-aria/internationalized/string/LocalizedStringDictionary.js +118 -0
- package/react-aria/internationalized/string/LocalizedStringDictionary.js.map +1 -0
- package/react-aria/internationalized/string/LocalizedStringFormatter.d.ts +21 -0
- package/react-aria/internationalized/string/LocalizedStringFormatter.js +70 -0
- package/react-aria/internationalized/string/LocalizedStringFormatter.js.map +1 -0
- package/react-aria/react-aria/button/useButton.js +95 -0
- package/react-aria/react-aria/button/useButton.js.map +1 -0
- package/react-aria/react-aria/focus/focusSafely.js +33 -0
- package/react-aria/react-aria/focus/focusSafely.js.map +1 -0
- package/react-aria/react-aria/focus/useFocusRing.js +57 -0
- package/react-aria/react-aria/focus/useFocusRing.js.map +1 -0
- package/react-aria/react-aria/focus/useFocusable.js +47 -0
- package/react-aria/react-aria/focus/useFocusable.js.map +1 -0
- package/react-aria/react-aria/form/useFormValidation.js +112 -0
- package/react-aria/react-aria/form/useFormValidation.js.map +1 -0
- package/react-aria/react-aria/i18n/context.d.ts +19 -0
- package/react-aria/react-aria/i18n/context.js +41 -0
- package/react-aria/react-aria/i18n/context.js.map +1 -0
- package/react-aria/react-aria/i18n/useCollator.d.ts +8 -0
- package/react-aria/react-aria/i18n/useCollator.js +25 -0
- package/react-aria/react-aria/i18n/useCollator.js.map +1 -0
- package/react-aria/react-aria/i18n/useDateFormatter.d.ts +13 -0
- package/react-aria/react-aria/i18n/useDateFormatter.js +39 -0
- package/react-aria/react-aria/i18n/useDateFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useDefaultLocale.d.ts +10 -0
- package/react-aria/react-aria/i18n/useDefaultLocale.js +67 -0
- package/react-aria/react-aria/i18n/useDefaultLocale.js.map +1 -0
- package/react-aria/react-aria/i18n/useFilter.d.ts +15 -0
- package/react-aria/react-aria/i18n/useFilter.js +58 -0
- package/react-aria/react-aria/i18n/useFilter.js.map +1 -0
- package/react-aria/react-aria/i18n/useListFormatter.d.ts +8 -0
- package/react-aria/react-aria/i18n/useListFormatter.js +20 -0
- package/react-aria/react-aria/i18n/useListFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.d.ts +15 -0
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js +38 -0
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useMessageFormatter.d.ts +13 -0
- package/react-aria/react-aria/i18n/useMessageFormatter.js +32 -0
- package/react-aria/react-aria/i18n/useMessageFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useNumberFormatter.d.ts +10 -0
- package/react-aria/react-aria/i18n/useNumberFormatter.js +21 -0
- package/react-aria/react-aria/i18n/useNumberFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/utils.js +49 -0
- package/react-aria/react-aria/i18n/utils.js.map +1 -0
- package/react-aria/react-aria/interactions/context.js +20 -0
- package/react-aria/react-aria/interactions/context.js.map +1 -0
- package/react-aria/react-aria/interactions/createEventHandler.js +48 -0
- package/react-aria/react-aria/interactions/createEventHandler.js.map +1 -0
- package/react-aria/react-aria/interactions/textSelection.js +85 -0
- package/react-aria/react-aria/interactions/textSelection.js.map +1 -0
- package/react-aria/react-aria/interactions/useFocus.js +53 -0
- package/react-aria/react-aria/interactions/useFocus.js.map +1 -0
- package/react-aria/react-aria/interactions/useFocusVisible.js +236 -0
- package/react-aria/react-aria/interactions/useFocusVisible.js.map +1 -0
- package/react-aria/react-aria/interactions/useFocusWithin.js +65 -0
- package/react-aria/react-aria/interactions/useFocusWithin.js.map +1 -0
- package/react-aria/react-aria/interactions/useKeyboard.js +27 -0
- package/react-aria/react-aria/interactions/useKeyboard.js.map +1 -0
- package/react-aria/react-aria/interactions/usePress.js +769 -0
- package/react-aria/react-aria/interactions/usePress.js.map +1 -0
- package/react-aria/react-aria/interactions/useScrollWheel.js +31 -0
- package/react-aria/react-aria/interactions/useScrollWheel.js.map +1 -0
- package/react-aria/react-aria/interactions/utils.js +116 -0
- package/react-aria/react-aria/interactions/utils.js.map +1 -0
- package/react-aria/react-aria/label/useField.js +42 -0
- package/react-aria/react-aria/label/useField.js.map +1 -0
- package/react-aria/react-aria/label/useLabel.js +42 -0
- package/react-aria/react-aria/label/useLabel.js.map +1 -0
- package/react-aria/react-aria/live-announcer/LiveAnnouncer.js +121 -0
- package/react-aria/react-aria/live-announcer/LiveAnnouncer.js.map +1 -0
- package/react-aria/react-aria/numberfield/intl/en-US.json.js +11 -0
- package/react-aria/react-aria/numberfield/intl/en-US.json.js.map +1 -0
- package/react-aria/react-aria/numberfield/intl/fr-FR.json.js +11 -0
- package/react-aria/react-aria/numberfield/intl/fr-FR.json.js.map +1 -0
- package/react-aria/react-aria/numberfield/intl/index.js +10 -0
- package/react-aria/react-aria/numberfield/intl/index.js.map +1 -0
- package/react-aria/react-aria/numberfield/useNumberField.js +294 -0
- package/react-aria/react-aria/numberfield/useNumberField.js.map +1 -0
- package/react-aria/react-aria/spinbutton/intl/en-US.json.js +7 -0
- package/react-aria/react-aria/spinbutton/intl/en-US.json.js.map +1 -0
- package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js +7 -0
- package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js.map +1 -0
- package/react-aria/react-aria/spinbutton/intl/index.js +10 -0
- package/react-aria/react-aria/spinbutton/intl/index.js.map +1 -0
- package/react-aria/react-aria/spinbutton/useSpinButton.js +168 -0
- package/react-aria/react-aria/spinbutton/useSpinButton.js.map +1 -0
- package/react-aria/react-aria/ssr/SSRProvider.d.ts +22 -0
- package/react-aria/react-aria/ssr/SSRProvider.js +157 -0
- package/react-aria/react-aria/ssr/SSRProvider.js.map +1 -0
- package/react-aria/react-aria/textfield/useFormattedTextField.js +142 -0
- package/react-aria/react-aria/textfield/useFormattedTextField.js.map +1 -0
- package/react-aria/react-aria/textfield/useTextField.js +156 -0
- package/react-aria/react-aria/textfield/useTextField.js.map +1 -0
- package/react-aria/react-aria/utils/chain.js +33 -0
- package/react-aria/react-aria/utils/chain.js.map +1 -0
- package/react-aria/react-aria/utils/domHelpers.js +14 -0
- package/react-aria/react-aria/utils/domHelpers.js.map +1 -0
- package/react-aria/react-aria/utils/filterDOMProps.js +45 -0
- package/react-aria/react-aria/utils/filterDOMProps.js.map +1 -0
- package/react-aria/react-aria/utils/focusWithoutScrolling.js +88 -0
- package/react-aria/react-aria/utils/focusWithoutScrolling.js.map +1 -0
- package/react-aria/react-aria/utils/isVirtualEvent.js +51 -0
- package/react-aria/react-aria/utils/isVirtualEvent.js.map +1 -0
- package/react-aria/react-aria/utils/mergeProps.js +48 -0
- package/react-aria/react-aria/utils/mergeProps.js.map +1 -0
- package/react-aria/react-aria/utils/openLink.js +55 -0
- package/react-aria/react-aria/utils/openLink.js.map +1 -0
- package/react-aria/react-aria/utils/platform.js +69 -0
- package/react-aria/react-aria/utils/platform.js.map +1 -0
- package/react-aria/react-aria/utils/runAfterTransition.js +100 -0
- package/react-aria/react-aria/utils/runAfterTransition.js.map +1 -0
- package/react-aria/react-aria/utils/useDeepMemo.js +16 -0
- package/react-aria/react-aria/utils/useDeepMemo.js.map +1 -0
- package/react-aria/react-aria/utils/useEffectEvent.js +31 -0
- package/react-aria/react-aria/utils/useEffectEvent.js.map +1 -0
- package/react-aria/react-aria/utils/useEvent.js +21 -0
- package/react-aria/react-aria/utils/useEvent.js.map +1 -0
- package/react-aria/react-aria/utils/useFormReset.js +23 -0
- package/react-aria/react-aria/utils/useFormReset.js.map +1 -0
- package/react-aria/react-aria/utils/useGlobalListeners.js +44 -0
- package/react-aria/react-aria/utils/useGlobalListeners.js.map +1 -0
- package/react-aria/react-aria/utils/useId.js +86 -0
- package/react-aria/react-aria/utils/useId.js.map +1 -0
- package/react-aria/react-aria/utils/useLabels.js +39 -0
- package/react-aria/react-aria/utils/useLabels.js.map +1 -0
- package/react-aria/react-aria/utils/useLayoutEffect.js +21 -0
- package/react-aria/react-aria/utils/useLayoutEffect.js.map +1 -0
- package/react-aria/react-aria/utils/useSyncRef.js +29 -0
- package/react-aria/react-aria/utils/useSyncRef.js.map +1 -0
- package/react-aria/react-aria/utils/useValueEffect.js +52 -0
- package/react-aria/react-aria/utils/useValueEffect.js.map +1 -0
- package/react-aria/react-stately/form/useFormValidationState.js +191 -0
- package/react-aria/react-stately/form/useFormValidationState.js.map +1 -0
- package/react-aria/react-stately/numberfield/useNumberFieldState.js +196 -0
- package/react-aria/react-stately/numberfield/useNumberFieldState.js.map +1 -0
- package/react-aria/react-stately/utils/number.js +56 -0
- package/react-aria/react-stately/utils/number.js.map +1 -0
- package/react-aria/react-stately/utils/useControlledState.js +68 -0
- package/react-aria/react-stately/utils/useControlledState.js.map +1 -0
- package/react-aria/react-types/shared/locale.d.ts +3 -0
- package/types/colors.d.ts +102 -0
- package/types/colors.js +64 -0
- package/types/colors.js.map +1 -0
- package/types/fonts.d.ts +12 -0
- package/types/fonts.js +10 -0
- package/types/fonts.js.map +1 -0
- package/types/helpers.d.ts +23 -0
- package/types/products.d.ts +40 -0
- package/types/products.js +38 -0
- package/types/products.js.map +1 -0
- package/types/styles.d.ts +283 -0
- package/types/styles.js +161 -0
- package/types/styles.js.map +1 -0
- package/utils/filterComponents.d.ts +12 -0
- package/utils/filterComponents.js +24 -0
- package/utils/filterComponents.js.map +1 -0
- package/utils/getTextWidth.d.ts +6 -0
- package/utils/getTextWidth.js +32 -0
- package/utils/getTextWidth.js.map +1 -0
- package/utils/isComponent.d.ts +12 -0
- package/utils/isComponent.js +15 -0
- package/utils/isComponent.js.map +1 -0
- package/utils/partitionComponents.d.ts +10 -0
- package/utils/partitionComponents.js +26 -0
- package/utils/partitionComponents.js.map +1 -0
- package/utils/redsift-design-tokens.d.ts +1389 -0
- package/utils/redsift-design-tokens.js +1391 -0
- package/utils/redsift-design-tokens.js.map +1 -0
- package/utils/useId.d.ts +6 -0
- package/utils/useId.js +42 -0
- package/utils/useId.js.map +1 -0
- package/utils/warnIfNoAccessibleLabelFound.d.ts +11 -0
- package/utils/warnIfNoAccessibleLabelFound.js +20 -0
- package/utils/warnIfNoAccessibleLabelFound.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/badge/types.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport {\n NotificationsColorPalette,\n PresentationColorPalette,\n LayoutProps,\n PositioningProps,\n SpacingProps,\n ValueOf,\n Theme,\n} from '../../types';\n\n/**\n * Component variant.\n */\nexport const BadgeVariant = {\n dot: 'dot',\n standard: 'standard',\n} as const;\nexport type BadgeVariant = ValueOf<typeof BadgeVariant>;\n\n/**\n * Component props.\n */\nexport interface BadgeProps extends ComponentProps<'div'>, LayoutProps, SpacingProps, PositioningProps {\n /** Whether the badge should automatically break content. */\n autoBreak?: boolean;\n /** Color variant. The product colors are available but should only be used to display the Badge in the color of another product. To display a Badge with a color of the current product, use `default`. */\n color?: NotificationsColorPalette | PresentationColorPalette;\n /** Whether the Badge has its colors reversed or not. */\n isReversed?: boolean;\n /** Theme. */\n theme?: Theme;\n /** Badge variant. */\n variant?: BadgeVariant;\n}\n\nexport type StyledBadgeProps = Omit<BadgeProps, 'color' | 'variant' | 'isReversed' | 'autoBreak'> & {\n $autoBreak: BadgeProps['autoBreak'];\n $color: BadgeProps['color'];\n $isReversed: BadgeProps['isReversed'];\n $variant: BadgeProps['variant'];\n $theme: BadgeProps['theme'];\n};\n"],"names":["BadgeVariant","dot","standard"],"mappings":"AAWA;AACA;AACA;AACO,MAAMA,YAAY,GAAG;AAC1BC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,QAAQ,EAAE,UAAA;AACZ,EAAU;;AAGV;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BreadcrumbItemProps } from './types.js';
|
|
2
|
+
import { Comp } from '../../types/helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The BreadcrumbItem components is a list of links to the parent pages of the current page in hierarchical order.
|
|
6
|
+
*/
|
|
7
|
+
declare const BreadcrumbItem: Comp<BreadcrumbItemProps, HTMLAnchorElement>;
|
|
8
|
+
|
|
9
|
+
export { BreadcrumbItem };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound.js';
|
|
5
|
+
import { StyledBreadcrumbItem } from './styles.js';
|
|
6
|
+
import { useTheme } from '../theme/useTheme.js';
|
|
7
|
+
|
|
8
|
+
const _excluded = ["as", "children", "className", "href", "isCurrent", "isDisabled", "theme"];
|
|
9
|
+
const COMPONENT_NAME = 'BreadcrumbItem';
|
|
10
|
+
const CLASSNAME = 'redsift-breadcrumb-item';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The BreadcrumbItem components is a list of links to the parent pages of the current page in hierarchical order.
|
|
14
|
+
*/
|
|
15
|
+
const BreadcrumbItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
16
|
+
const {
|
|
17
|
+
as,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
href,
|
|
21
|
+
isCurrent,
|
|
22
|
+
isDisabled,
|
|
23
|
+
theme: propsTheme
|
|
24
|
+
} = props,
|
|
25
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
26
|
+
warnIfNoAccessibleLabelFound(props, [children], 'BreadcrumbItem');
|
|
27
|
+
const theme = useTheme(propsTheme);
|
|
28
|
+
return /*#__PURE__*/React__default.createElement(StyledBreadcrumbItem, _extends({
|
|
29
|
+
as: as || 'a',
|
|
30
|
+
role: !isCurrent ? 'link' : undefined,
|
|
31
|
+
tabIndex: !isDisabled && !isCurrent ? 0 : undefined
|
|
32
|
+
}, forwardedProps, {
|
|
33
|
+
$isCurrent: isCurrent,
|
|
34
|
+
$isDisabled: isDisabled,
|
|
35
|
+
$theme: theme,
|
|
36
|
+
"aria-current": isCurrent ? 'page' : undefined,
|
|
37
|
+
"aria-disabled": isDisabled || isCurrent,
|
|
38
|
+
className: classNames(BreadcrumbItem.className, className),
|
|
39
|
+
href: !isDisabled && !isCurrent ? href : undefined,
|
|
40
|
+
ref: ref
|
|
41
|
+
}), children);
|
|
42
|
+
});
|
|
43
|
+
BreadcrumbItem.className = CLASSNAME;
|
|
44
|
+
BreadcrumbItem.displayName = COMPONENT_NAME;
|
|
45
|
+
|
|
46
|
+
export { BreadcrumbItem };
|
|
47
|
+
//# sourceMappingURL=BreadcrumbItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BreadcrumbItem.js","sources":["../../../src/components/breadcrumb-item/BreadcrumbItem.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound';\nimport { StyledBreadcrumbItem } from './styles';\nimport { BreadcrumbItemProps } from './types';\nimport { useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'BreadcrumbItem';\nconst CLASSNAME = 'redsift-breadcrumb-item';\n\n/**\n * The BreadcrumbItem components is a list of links to the parent pages of the current page in hierarchical order.\n */\nexport const BreadcrumbItem: Comp<BreadcrumbItemProps, HTMLAnchorElement> = forwardRef((props, ref) => {\n const { as, children, className, href, isCurrent, isDisabled, theme: propsTheme, ...forwardedProps } = props;\n\n warnIfNoAccessibleLabelFound(props, [children], 'BreadcrumbItem');\n\n const theme = useTheme(propsTheme);\n\n return (\n <StyledBreadcrumbItem\n as={(as || 'a') as any}\n role={!isCurrent ? 'link' : undefined}\n tabIndex={!isDisabled && !isCurrent ? 0 : undefined}\n {...forwardedProps}\n $isCurrent={isCurrent}\n $isDisabled={isDisabled}\n $theme={theme}\n aria-current={isCurrent ? 'page' : undefined}\n aria-disabled={isDisabled || isCurrent}\n className={classNames(BreadcrumbItem.className, className)}\n href={!isDisabled && !isCurrent ? href : undefined}\n ref={ref as RefObject<HTMLAnchorElement>}\n >\n {children}\n </StyledBreadcrumbItem>\n );\n});\nBreadcrumbItem.className = CLASSNAME;\nBreadcrumbItem.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","BreadcrumbItem","forwardRef","props","ref","as","children","className","href","isCurrent","isDisabled","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","warnIfNoAccessibleLabelFound","useTheme","React","createElement","StyledBreadcrumbItem","_extends","role","undefined","tabIndex","$isCurrent","$isDisabled","$theme","classNames","displayName"],"mappings":";;;;;;;;AAQA,MAAMA,cAAc,GAAG,gBAAgB,CAAA;AACvC,MAAMC,SAAS,GAAG,yBAAyB,CAAA;;AAE3C;AACA;AACA;AACO,MAAMC,cAA4D,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACrG,MAAM;MAAEC,EAAE;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,IAAI;MAAEC,SAAS;MAAEC,UAAU;AAAEC,MAAAA,KAAK,EAAEC,UAAAA;AAA8B,KAAC,GAAGT,KAAK;AAAxBU,IAAAA,cAAc,GAAAC,wBAAA,CAAKX,KAAK,EAAAY,SAAA,CAAA,CAAA;EAE5GC,4BAA4B,CAACb,KAAK,EAAE,CAACG,QAAQ,CAAC,EAAE,gBAAgB,CAAC,CAAA;AAEjE,EAAA,MAAMK,KAAK,GAAGM,QAAQ,CAACL,UAAU,CAAC,CAAA;AAElC,EAAA,oBACEM,cAAA,CAAAC,aAAA,CAACC,oBAAoB,EAAAC,QAAA,CAAA;IACnBhB,EAAE,EAAGA,EAAE,IAAI,GAAY;AACvBiB,IAAAA,IAAI,EAAE,CAACb,SAAS,GAAG,MAAM,GAAGc,SAAU;IACtCC,QAAQ,EAAE,CAACd,UAAU,IAAI,CAACD,SAAS,GAAG,CAAC,GAAGc,SAAAA;AAAU,GAAA,EAChDV,cAAc,EAAA;AAClBY,IAAAA,UAAU,EAAEhB,SAAU;AACtBiB,IAAAA,WAAW,EAAEhB,UAAW;AACxBiB,IAAAA,MAAM,EAAEhB,KAAM;AACd,IAAA,cAAA,EAAcF,SAAS,GAAG,MAAM,GAAGc,SAAU;IAC7C,eAAeb,EAAAA,UAAU,IAAID,SAAU;IACvCF,SAAS,EAAEqB,UAAU,CAAC3B,cAAc,CAACM,SAAS,EAAEA,SAAS,CAAE;IAC3DC,IAAI,EAAE,CAACE,UAAU,IAAI,CAACD,SAAS,GAAGD,IAAI,GAAGe,SAAU;AACnDnB,IAAAA,GAAG,EAAEA,GAAAA;AAAoC,GAAA,CAAA,EAExCE,QACmB,CAAC,CAAA;AAE3B,CAAC,EAAC;AACFL,cAAc,CAACM,SAAS,GAAGP,SAAS,CAAA;AACpCC,cAAc,CAAC4B,WAAW,GAAG9B,cAAc;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Component style.
|
|
5
|
+
*/
|
|
6
|
+
const StyledBreadcrumbItem = styled.a`
|
|
7
|
+
background: none;
|
|
8
|
+
border: none;
|
|
9
|
+
cursor: unset;
|
|
10
|
+
font-family: var(--redsift-typography-body-font-family);
|
|
11
|
+
font-size: var(--redsift-typography-body-font-size);
|
|
12
|
+
font-weight: var(--redsift-typography-body-font-weight);
|
|
13
|
+
line-height: var(--redsift-typography-body-line-height);
|
|
14
|
+
padding: 4px;
|
|
15
|
+
text-decoration: none;
|
|
16
|
+
|
|
17
|
+
${_ref => {
|
|
18
|
+
let {
|
|
19
|
+
$isDisabled,
|
|
20
|
+
$isCurrent
|
|
21
|
+
} = _ref;
|
|
22
|
+
return css`
|
|
23
|
+
${$isDisabled ? `
|
|
24
|
+
color: var(--redsift-color-neutral-mid-grey);
|
|
25
|
+
` : $isCurrent ? `
|
|
26
|
+
color: var(--redsift-color-primary-n);
|
|
27
|
+
` : `
|
|
28
|
+
color: var(--redsift-redsift-color-text-primary);
|
|
29
|
+
`}
|
|
30
|
+
|
|
31
|
+
${!$isDisabled && !$isCurrent && css`
|
|
32
|
+
&:hover,
|
|
33
|
+
&:focus-visible {
|
|
34
|
+
// cursor: pointer;
|
|
35
|
+
text-decoration: underline;
|
|
36
|
+
text-underline-offset: 2px;
|
|
37
|
+
}
|
|
38
|
+
`}
|
|
39
|
+
`;
|
|
40
|
+
}}
|
|
41
|
+
|
|
42
|
+
&:focus-visible {
|
|
43
|
+
outline: 2px solid var(--redsift-redsift-color-text-primary);
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
export { StyledBreadcrumbItem };
|
|
48
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/breadcrumb-item/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { StyledBreadcrumbItemProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledBreadcrumbItem = styled.a<StyledBreadcrumbItemProps>`\n background: none;\n border: none;\n cursor: unset;\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n padding: 4px;\n text-decoration: none;\n\n ${({ $isDisabled, $isCurrent }) => css`\n ${$isDisabled\n ? `\n color: var(--redsift-color-neutral-mid-grey);\n `\n : $isCurrent\n ? `\n color: var(--redsift-color-primary-n);\n `\n : `\n color: var(--redsift-redsift-color-text-primary);\n `}\n\n ${!$isDisabled &&\n !$isCurrent &&\n css`\n &:hover,\n &:focus-visible {\n // cursor: pointer;\n text-decoration: underline;\n text-underline-offset: 2px;\n }\n `}\n `}\n\n &:focus-visible {\n outline: 2px solid var(--redsift-redsift-color-text-primary);\n }\n`;\n"],"names":["StyledBreadcrumbItem","styled","a","_ref","$isDisabled","$isCurrent","css"],"mappings":";;AAGA;AACA;AACA;AACaA,MAAAA,oBAAoB,GAAGC,MAAM,CAACC,CAA6B,CAAA;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;IAAEC,WAAW;AAAEC,IAAAA,UAAAA;AAAW,GAAC,GAAAF,IAAA,CAAA;AAAA,EAAA,OAAKG,GAAI,CAAA;AACzC,IAAA,EAAMF,WAAW,GACR,CAAA;AACT;AACA,MAAO,CAAA,GACCC,UAAU,GACT,CAAA;AACT;AACA,MAAA,CAAO,GACE,CAAA;AACT;AACA,MAAQ,CAAA,CAAA;AACR;AACA,IAAA,EAAM,CAACD,WAAW,IACd,CAACC,UAAU,IACXC,GAAI,CAAA;AACR;AACA;AACA;AACA;AACA;AACA;AACA,IAAM,CAAA,CAAA;AACN,EAAG,CAAA,CAAA;AAAA,CAAC,CAAA;AACJ;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import { Theme } from '../../types/colors.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component props.
|
|
6
|
+
*/
|
|
7
|
+
interface BreadcrumbItemProps extends ComponentProps<'a'> {
|
|
8
|
+
/** Prop to pass a custom react component instead of a simple HTML anchor (useful for Nextjs or React Router Link component). */
|
|
9
|
+
as?: 'a' | ElementType;
|
|
10
|
+
/** Whether the breadcrumb item is the current page. */
|
|
11
|
+
isCurrent?: boolean;
|
|
12
|
+
/** Whether the component is disabled or not. */
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
/** Theme. */
|
|
15
|
+
theme?: Theme;
|
|
16
|
+
}
|
|
17
|
+
type StyledBreadcrumbItemProps = Omit<BreadcrumbItemProps, 'isDisabled' | 'isCurrent'> & {
|
|
18
|
+
$isCurrent: BreadcrumbItemProps['isCurrent'];
|
|
19
|
+
$isDisabled: BreadcrumbItemProps['isDisabled'];
|
|
20
|
+
$theme: BreadcrumbItemProps['theme'];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { BreadcrumbItemProps, StyledBreadcrumbItemProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BreadcrumbsProps } from './types.js';
|
|
2
|
+
import { Comp } from '../../types/helpers.js';
|
|
3
|
+
import { BreadcrumbItemProps } from '../breadcrumb-item/types.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The Breadcrumbs components is a list of links to the parent pages of the current page in hierarchical order.
|
|
7
|
+
*/
|
|
8
|
+
declare const BaseBreadcrumbs: Comp<BreadcrumbsProps, HTMLElement>;
|
|
9
|
+
declare const Breadcrumbs: Comp<BreadcrumbsProps, HTMLElement> & {
|
|
10
|
+
Item: Comp<BreadcrumbItemProps, HTMLAnchorElement>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { BaseBreadcrumbs, Breadcrumbs };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound.js';
|
|
5
|
+
import { StyledBreadcrumbs } from './styles.js';
|
|
6
|
+
import { filterComponents } from '../../utils/filterComponents.js';
|
|
7
|
+
import { BreadcrumbItem } from '../breadcrumb-item/BreadcrumbItem.js';
|
|
8
|
+
import { useTheme } from '../theme/useTheme.js';
|
|
9
|
+
import { ThemeProvider } from '../theme/context.js';
|
|
10
|
+
|
|
11
|
+
const _excluded = ["children", "className", "isDisabled", "theme"];
|
|
12
|
+
const COMPONENT_NAME = 'Breadcrumbs';
|
|
13
|
+
const CLASSNAME = 'redsift-breadcrumbs';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The Breadcrumbs components is a list of links to the parent pages of the current page in hierarchical order.
|
|
17
|
+
*/
|
|
18
|
+
const BaseBreadcrumbs = /*#__PURE__*/forwardRef((props, ref) => {
|
|
19
|
+
const {
|
|
20
|
+
children,
|
|
21
|
+
className,
|
|
22
|
+
isDisabled,
|
|
23
|
+
theme: propsTheme
|
|
24
|
+
} = props,
|
|
25
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
26
|
+
warnIfNoAccessibleLabelFound(props, undefined, 'Breadcrumbs');
|
|
27
|
+
const theme = useTheme(propsTheme);
|
|
28
|
+
const childArray = filterComponents([Breadcrumbs.Item])(children);
|
|
29
|
+
const breadcrumbItems = childArray.map((child, index) => {
|
|
30
|
+
var _child$key;
|
|
31
|
+
const isCurrent = index === childArray.length - 1;
|
|
32
|
+
return /*#__PURE__*/React__default.createElement("li", {
|
|
33
|
+
key: index
|
|
34
|
+
}, /*#__PURE__*/React__default.createElement(Breadcrumbs.Item, _extends({
|
|
35
|
+
isDisabled: child.props.isDisabled || isDisabled || undefined
|
|
36
|
+
}, child.props, {
|
|
37
|
+
key: (_child$key = child.key) !== null && _child$key !== void 0 ? _child$key : index,
|
|
38
|
+
isCurrent: isCurrent
|
|
39
|
+
})), isCurrent === false ? /*#__PURE__*/React__default.createElement("span", {
|
|
40
|
+
className: `${BaseBreadcrumbs.className}__separator`
|
|
41
|
+
}, '/') : null);
|
|
42
|
+
});
|
|
43
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
44
|
+
value: {
|
|
45
|
+
theme
|
|
46
|
+
}
|
|
47
|
+
}, /*#__PURE__*/React__default.createElement(StyledBreadcrumbs, _extends({}, forwardedProps, {
|
|
48
|
+
$isDisabled: isDisabled,
|
|
49
|
+
$theme: theme,
|
|
50
|
+
className: classNames(BaseBreadcrumbs.className, className),
|
|
51
|
+
ref: ref
|
|
52
|
+
}), /*#__PURE__*/React__default.createElement("ol", null, breadcrumbItems)));
|
|
53
|
+
});
|
|
54
|
+
BaseBreadcrumbs.className = CLASSNAME;
|
|
55
|
+
BaseBreadcrumbs.displayName = COMPONENT_NAME;
|
|
56
|
+
const Breadcrumbs = Object.assign(BaseBreadcrumbs, {
|
|
57
|
+
Item: BreadcrumbItem
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export { BaseBreadcrumbs, Breadcrumbs };
|
|
61
|
+
//# sourceMappingURL=Breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sources":["../../../src/components/breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { BreadcrumbItem } from '../breadcrumb-item';\nimport { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound';\nimport { StyledBreadcrumbs } from './styles';\nimport { BreadcrumbsProps } from './types';\nimport { filterComponents } from '../../utils';\nimport { ThemeProvider, useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Breadcrumbs';\nconst CLASSNAME = 'redsift-breadcrumbs';\n\n/**\n * The Breadcrumbs components is a list of links to the parent pages of the current page in hierarchical order.\n */\nexport const BaseBreadcrumbs: Comp<BreadcrumbsProps, HTMLElement> = forwardRef((props, ref) => {\n const { children, className, isDisabled, theme: propsTheme, ...forwardedProps } = props;\n\n warnIfNoAccessibleLabelFound(props, undefined, 'Breadcrumbs');\n\n const theme = useTheme(propsTheme);\n\n const childArray = filterComponents([Breadcrumbs.Item])(children);\n const breadcrumbItems = childArray.map((child, index) => {\n const isCurrent = index === childArray.length - 1;\n\n return (\n <li key={index}>\n <Breadcrumbs.Item\n isDisabled={child.props.isDisabled || isDisabled || undefined}\n {...child.props}\n key={child.key ?? index}\n isCurrent={isCurrent}\n />\n {isCurrent === false ? <span className={`${BaseBreadcrumbs.className}__separator`}>{'/'}</span> : null}\n </li>\n );\n });\n\n return (\n <ThemeProvider value={{ theme }}>\n <StyledBreadcrumbs\n {...forwardedProps}\n $isDisabled={isDisabled}\n $theme={theme}\n className={classNames(BaseBreadcrumbs.className, className)}\n ref={ref as RefObject<HTMLElement>}\n >\n <ol>{breadcrumbItems}</ol>\n </StyledBreadcrumbs>\n </ThemeProvider>\n );\n});\nBaseBreadcrumbs.className = CLASSNAME;\nBaseBreadcrumbs.displayName = COMPONENT_NAME;\n\nexport const Breadcrumbs = Object.assign(BaseBreadcrumbs, {\n Item: BreadcrumbItem,\n});\n"],"names":["COMPONENT_NAME","CLASSNAME","BaseBreadcrumbs","forwardRef","props","ref","children","className","isDisabled","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","warnIfNoAccessibleLabelFound","undefined","useTheme","childArray","filterComponents","Breadcrumbs","Item","breadcrumbItems","map","child","index","_child$key","isCurrent","length","React","createElement","key","_extends","ThemeProvider","value","StyledBreadcrumbs","$isDisabled","$theme","classNames","displayName","Object","assign","BreadcrumbItem"],"mappings":";;;;;;;;;;;AAUA,MAAMA,cAAc,GAAG,aAAa,CAAA;AACpC,MAAMC,SAAS,GAAG,qBAAqB,CAAA;;AAEvC;AACA;AACA;AACO,MAAMC,eAAoD,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC7F,MAAM;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,UAAU;AAAEC,MAAAA,KAAK,EAAEC,UAAAA;AAA8B,KAAC,GAAGN,KAAK;AAAxBO,IAAAA,cAAc,GAAAC,wBAAA,CAAKR,KAAK,EAAAS,SAAA,CAAA,CAAA;AAEvFC,EAAAA,4BAA4B,CAACV,KAAK,EAAEW,SAAS,EAAE,aAAa,CAAC,CAAA;AAE7D,EAAA,MAAMN,KAAK,GAAGO,QAAQ,CAACN,UAAU,CAAC,CAAA;AAElC,EAAA,MAAMO,UAAU,GAAGC,gBAAgB,CAAC,CAACC,WAAW,CAACC,IAAI,CAAC,CAAC,CAACd,QAAQ,CAAC,CAAA;EACjE,MAAMe,eAAe,GAAGJ,UAAU,CAACK,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAK;AAAA,IAAA,IAAAC,UAAA,CAAA;IACvD,MAAMC,SAAS,GAAGF,KAAK,KAAKP,UAAU,CAACU,MAAM,GAAG,CAAC,CAAA;IAEjD,oBACEC,cAAA,CAAAC,aAAA,CAAA,IAAA,EAAA;AAAIC,MAAAA,GAAG,EAAEN,KAAAA;KACPI,eAAAA,cAAA,CAAAC,aAAA,CAACV,WAAW,CAACC,IAAI,EAAAW,QAAA,CAAA;MACfvB,UAAU,EAAEe,KAAK,CAACnB,KAAK,CAACI,UAAU,IAAIA,UAAU,IAAIO,SAAAA;KAChDQ,EAAAA,KAAK,CAACnB,KAAK,EAAA;MACf0B,GAAG,EAAA,CAAAL,UAAA,GAAEF,KAAK,CAACO,GAAG,MAAA,IAAA,IAAAL,UAAA,KAAA,KAAA,CAAA,GAAAA,UAAA,GAAID,KAAM;AACxBE,MAAAA,SAAS,EAAEA,SAAAA;KACZ,CAAA,CAAC,EACDA,SAAS,KAAK,KAAK,gBAAGE,cAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMtB,MAAAA,SAAS,EAAG,CAAA,EAAEL,eAAe,CAACK,SAAU,CAAA,WAAA,CAAA;AAAa,KAAA,EAAE,GAAU,CAAC,GAAG,IAChG,CAAC,CAAA;AAET,GAAC,CAAC,CAAA;AAEF,EAAA,oBACEqB,cAAA,CAAAC,aAAA,CAACG,aAAa,EAAA;AAACC,IAAAA,KAAK,EAAE;AAAExB,MAAAA,KAAAA;AAAM,KAAA;GAC5BmB,eAAAA,cAAA,CAAAC,aAAA,CAACK,iBAAiB,EAAAH,QAAA,KACZpB,cAAc,EAAA;AAClBwB,IAAAA,WAAW,EAAE3B,UAAW;AACxB4B,IAAAA,MAAM,EAAE3B,KAAM;IACdF,SAAS,EAAE8B,UAAU,CAACnC,eAAe,CAACK,SAAS,EAAEA,SAAS,CAAE;AAC5DF,IAAAA,GAAG,EAAEA,GAAAA;AAA8B,GAAA,CAAA,eAEnCuB,cAAA,CAAAC,aAAA,aAAKR,eAAoB,CACR,CACN,CAAC,CAAA;AAEpB,CAAC,EAAC;AACFnB,eAAe,CAACK,SAAS,GAAGN,SAAS,CAAA;AACrCC,eAAe,CAACoC,WAAW,GAAGtC,cAAc,CAAA;AAErC,MAAMmB,WAAW,GAAGoB,MAAM,CAACC,MAAM,CAACtC,eAAe,EAAE;AACxDkB,EAAAA,IAAI,EAAEqB,cAAAA;AACR,CAAC;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { baseStyling } from '../shared/styles.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component style.
|
|
6
|
+
*/
|
|
7
|
+
const StyledBreadcrumbs = styled.nav`
|
|
8
|
+
${baseStyling}
|
|
9
|
+
|
|
10
|
+
ol {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
list-style: none;
|
|
13
|
+
padding: unset;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.redsift-breadcrumbs__separator {
|
|
17
|
+
font-family: var(--redsift-typography-body-font-family);
|
|
18
|
+
font-size: var(--redsift-typography-body-font-size);
|
|
19
|
+
font-weight: var(--redsift-typography-body-font-weight);
|
|
20
|
+
line-height: var(--redsift-typography-body-line-height);
|
|
21
|
+
margin: 0px 4px;
|
|
22
|
+
|
|
23
|
+
${_ref => {
|
|
24
|
+
let {
|
|
25
|
+
$isDisabled,
|
|
26
|
+
$theme
|
|
27
|
+
} = _ref;
|
|
28
|
+
return $isDisabled ? css`
|
|
29
|
+
color: var(--redsift-color-neutral-mid-grey);
|
|
30
|
+
` : css`
|
|
31
|
+
color: var(--redsift-color-${$theme}-components-text-primary);
|
|
32
|
+
`;
|
|
33
|
+
}}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
export { StyledBreadcrumbs };
|
|
38
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/breadcrumbs/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { StyledBreadcrumbsProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledBreadcrumbs = styled.nav<StyledBreadcrumbsProps>`\n ${baseStyling}\n\n ol {\n display: inline-flex;\n list-style: none;\n padding: unset;\n }\n\n .redsift-breadcrumbs__separator {\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n margin: 0px 4px;\n\n ${({ $isDisabled, $theme }) =>\n $isDisabled\n ? css`\n color: var(--redsift-color-neutral-mid-grey);\n `\n : css`\n color: var(--redsift-color-${$theme}-components-text-primary);\n `}\n }\n`;\n"],"names":["StyledBreadcrumbs","styled","nav","baseStyling","_ref","$isDisabled","$theme","css"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,iBAAiB,GAAGC,MAAM,CAACC,GAA4B,CAAA;AACpE,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAA,EAAMC,IAAA,IAAA;EAAA,IAAC;IAAEC,WAAW;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAF,IAAA,CAAA;EAAA,OACxBC,WAAW,GACPE,GAAI,CAAA;AACd;AACA,UAAA,CAAW,GACDA,GAAI,CAAA;AACd,uCAAA,EAAyCD,MAAO,CAAA;AAChD,UAAW,CAAA,CAAA;AAAA,CAAC,CAAA;AACZ;AACA;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { StylingProps } from '../../types/styles.js';
|
|
3
|
+
import { Theme } from '../../types/colors.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component props.
|
|
7
|
+
*/
|
|
8
|
+
interface BreadcrumbsProps extends ComponentProps<'nav'>, StylingProps {
|
|
9
|
+
/** Whether the component is disabled or not. */
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
/** Theme. */
|
|
12
|
+
theme?: Theme;
|
|
13
|
+
}
|
|
14
|
+
type StyledBreadcrumbsProps = Omit<BreadcrumbsProps, 'isDisabled'> & {
|
|
15
|
+
$isDisabled: BreadcrumbsProps['isDisabled'];
|
|
16
|
+
$theme: BreadcrumbsProps['theme'];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { BreadcrumbsProps, StyledBreadcrumbsProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonProps } from './types.js';
|
|
2
|
+
import { Comp } from '../../types/helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Button is a semantic button that looks like a button.
|
|
6
|
+
*
|
|
7
|
+
* For a semantic link that looks like a button, please use the ButtonLink component.
|
|
8
|
+
* For a semantic link that looks like a link, please use the Link component.
|
|
9
|
+
* For a semantic button that looks like a link, please use the LinkButton component.
|
|
10
|
+
*/
|
|
11
|
+
declare const Button: Comp<ButtonProps, HTMLButtonElement>;
|
|
12
|
+
|
|
13
|
+
export { Button };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef, useRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { StyledButton } from './styles.js';
|
|
5
|
+
import { ButtonVariant } from './types.js';
|
|
6
|
+
import { StyledGradientBorder } from '../gradient-border/index.js';
|
|
7
|
+
import { ButtonsColorPalette } from '../../types/colors.js';
|
|
8
|
+
import { ConditionalWrapper } from '../conditional-wrapper/ConditionalWrapper.js';
|
|
9
|
+
import { Icon } from '../icon/Icon.js';
|
|
10
|
+
import { Spinner } from '../spinner/Spinner.js';
|
|
11
|
+
import { useTheme } from '../theme/useTheme.js';
|
|
12
|
+
|
|
13
|
+
const _excluded = ["children", "className", "color", "disabled", "fullWidth", "isActive", "isDisabled", "isHovered", "isLoading", "leftIcon", "leftIconProps", "rightIcon", "rightIconProps", "theme", "variant"];
|
|
14
|
+
const COMPONENT_NAME = 'Button';
|
|
15
|
+
const CLASSNAME = 'redsift-button';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The Button is a semantic button that looks like a button.
|
|
19
|
+
*
|
|
20
|
+
* For a semantic link that looks like a button, please use the ButtonLink component.
|
|
21
|
+
* For a semantic link that looks like a link, please use the Link component.
|
|
22
|
+
* For a semantic button that looks like a link, please use the LinkButton component.
|
|
23
|
+
*/
|
|
24
|
+
const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
25
|
+
const _ref = useRef();
|
|
26
|
+
const buttonRef = ref || _ref;
|
|
27
|
+
const {
|
|
28
|
+
children,
|
|
29
|
+
className,
|
|
30
|
+
color: propsColor,
|
|
31
|
+
disabled,
|
|
32
|
+
fullWidth,
|
|
33
|
+
isActive,
|
|
34
|
+
isDisabled: propsIsDisabled,
|
|
35
|
+
isHovered,
|
|
36
|
+
isLoading,
|
|
37
|
+
leftIcon,
|
|
38
|
+
leftIconProps,
|
|
39
|
+
rightIcon,
|
|
40
|
+
rightIconProps,
|
|
41
|
+
theme: propsTheme,
|
|
42
|
+
variant: propsVariant
|
|
43
|
+
} = props,
|
|
44
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
45
|
+
const isDisabled = isLoading || propsIsDisabled || disabled;
|
|
46
|
+
const theme = useTheme(propsTheme);
|
|
47
|
+
const color = Object.values(ButtonsColorPalette).includes(propsColor) ? propsColor : 'primary';
|
|
48
|
+
const variant = Object.values(ButtonVariant).includes(propsVariant) ? propsVariant : 'primary';
|
|
49
|
+
const isGradient = color === ButtonsColorPalette.radar;
|
|
50
|
+
return /*#__PURE__*/React__default.createElement(ConditionalWrapper, {
|
|
51
|
+
condition: isGradient && variant === ButtonVariant.secondary,
|
|
52
|
+
wrapper: children => /*#__PURE__*/React__default.createElement(StyledGradientBorder, {
|
|
53
|
+
$color: color,
|
|
54
|
+
$isActive: isActive,
|
|
55
|
+
$isDisabled: isDisabled,
|
|
56
|
+
$isHovered: isHovered,
|
|
57
|
+
$theme: theme
|
|
58
|
+
}, children)
|
|
59
|
+
}, /*#__PURE__*/React__default.createElement(StyledButton, _extends({
|
|
60
|
+
type: "button"
|
|
61
|
+
}, forwardedProps, {
|
|
62
|
+
$color: color,
|
|
63
|
+
$fullWidth: fullWidth,
|
|
64
|
+
$isActive: isActive,
|
|
65
|
+
$isDisabled: isDisabled,
|
|
66
|
+
$isGradient: isGradient,
|
|
67
|
+
$isHovered: isHovered,
|
|
68
|
+
$isLoading: isLoading,
|
|
69
|
+
$theme: theme,
|
|
70
|
+
$variant: variant,
|
|
71
|
+
"aria-disabled": isDisabled,
|
|
72
|
+
className: classNames(Button.className, className),
|
|
73
|
+
disabled: isDisabled,
|
|
74
|
+
ref: buttonRef
|
|
75
|
+
}), leftIcon ? /*#__PURE__*/React__default.createElement(Icon, _extends({
|
|
76
|
+
icon: leftIcon,
|
|
77
|
+
"aria-hidden": "true",
|
|
78
|
+
className: "left"
|
|
79
|
+
}, leftIconProps)) : null, isLoading ? /*#__PURE__*/React__default.createElement(Spinner, {
|
|
80
|
+
size: "small",
|
|
81
|
+
color: variant === ButtonVariant.primary ? 'grey-l1' : 'grey-l2'
|
|
82
|
+
}) : null, /*#__PURE__*/React__default.createElement("span", null, children), rightIcon ? /*#__PURE__*/React__default.createElement(Icon, _extends({
|
|
83
|
+
icon: rightIcon,
|
|
84
|
+
"aria-hidden": "true",
|
|
85
|
+
className: "right"
|
|
86
|
+
}, rightIconProps)) : null));
|
|
87
|
+
});
|
|
88
|
+
Button.className = CLASSNAME;
|
|
89
|
+
Button.displayName = COMPONENT_NAME;
|
|
90
|
+
|
|
91
|
+
export { Button };
|
|
92
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import React, { forwardRef, RefObject, useRef } from 'react';\nimport classNames from 'classnames';\nimport { ButtonsColorPalette, Comp } from '../../types';\nimport { Icon } from '../../components/icon';\nimport { StyledButton } from './styles';\nimport { ButtonProps, ButtonVariant } from './types';\nimport { Spinner } from '../../components/spinner';\nimport { useTheme } from '../theme';\nimport { ConditionalWrapper } from '../conditional-wrapper';\nimport { StyledGradientBorder } from '../gradient-border';\n\nconst COMPONENT_NAME = 'Button';\nconst CLASSNAME = 'redsift-button';\n\n/**\n * The Button is a semantic button that looks like a button.\n *\n * For a semantic link that looks like a button, please use the ButtonLink component.\n * For a semantic link that looks like a link, please use the Link component.\n * For a semantic button that looks like a link, please use the LinkButton component.\n */\nexport const Button: Comp<ButtonProps, HTMLButtonElement> = forwardRef((props, ref) => {\n const _ref = useRef<HTMLButtonElement>();\n const buttonRef = ref || _ref;\n\n const {\n children,\n className,\n color: propsColor,\n disabled,\n fullWidth,\n isActive,\n isDisabled: propsIsDisabled,\n isHovered,\n isLoading,\n leftIcon,\n leftIconProps,\n rightIcon,\n rightIconProps,\n theme: propsTheme,\n variant: propsVariant,\n ...forwardedProps\n } = props;\n const isDisabled = isLoading || propsIsDisabled || disabled;\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const variant = Object.values(ButtonVariant).includes(propsVariant!) ? propsVariant : 'primary';\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient && variant === ButtonVariant.secondary}\n wrapper={(children) => (\n <StyledGradientBorder\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isHovered={isHovered}\n $theme={theme}\n >\n {children}\n </StyledGradientBorder>\n )}\n >\n <StyledButton\n type=\"button\"\n {...forwardedProps}\n $color={color}\n $fullWidth={fullWidth}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isGradient={isGradient}\n $isHovered={isHovered}\n $isLoading={isLoading}\n $theme={theme}\n $variant={variant}\n aria-disabled={isDisabled}\n className={classNames(Button.className, className)}\n disabled={isDisabled}\n ref={buttonRef as RefObject<HTMLButtonElement>}\n >\n {leftIcon ? <Icon icon={leftIcon} aria-hidden=\"true\" className=\"left\" {...leftIconProps} /> : null}\n {isLoading ? <Spinner size=\"small\" color={variant === ButtonVariant.primary ? 'grey-l1' : 'grey-l2'} /> : null}\n <span>{children}</span>\n {rightIcon ? <Icon icon={rightIcon} aria-hidden=\"true\" className=\"right\" {...rightIconProps} /> : null}\n </StyledButton>\n </ConditionalWrapper>\n );\n});\nButton.className = CLASSNAME;\nButton.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","Button","forwardRef","props","ref","_ref","useRef","buttonRef","children","className","color","propsColor","disabled","fullWidth","isActive","isDisabled","propsIsDisabled","isHovered","isLoading","leftIcon","leftIconProps","rightIcon","rightIconProps","theme","propsTheme","variant","propsVariant","forwardedProps","_objectWithoutProperties","_excluded","useTheme","Object","values","ButtonsColorPalette","includes","ButtonVariant","isGradient","radar","React","createElement","ConditionalWrapper","condition","secondary","wrapper","StyledGradientBorder","$color","$isActive","$isDisabled","$isHovered","$theme","StyledButton","_extends","type","$fullWidth","$isGradient","$isLoading","$variant","classNames","Icon","icon","Spinner","size","primary","displayName"],"mappings":";;;;;;;;;;;;;AAWA,MAAMA,cAAc,GAAG,QAAQ,CAAA;AAC/B,MAAMC,SAAS,GAAG,gBAAgB,CAAA;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,MAA4C,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;AACrF,EAAA,MAAMC,IAAI,GAAGC,MAAM,EAAqB,CAAA;AACxC,EAAA,MAAMC,SAAS,GAAGH,GAAG,IAAIC,IAAI,CAAA;EAE7B,MAAM;MACJG,QAAQ;MACRC,SAAS;AACTC,MAAAA,KAAK,EAAEC,UAAU;MACjBC,QAAQ;MACRC,SAAS;MACTC,QAAQ;AACRC,MAAAA,UAAU,EAAEC,eAAe;MAC3BC,SAAS;MACTC,SAAS;MACTC,QAAQ;MACRC,aAAa;MACbC,SAAS;MACTC,cAAc;AACdC,MAAAA,KAAK,EAAEC,UAAU;AACjBC,MAAAA,OAAO,EAAEC,YAAAA;AAEX,KAAC,GAAGvB,KAAK;AADJwB,IAAAA,cAAc,GAAAC,wBAAA,CACfzB,KAAK,EAAA0B,SAAA,CAAA,CAAA;AACT,EAAA,MAAMd,UAAU,GAAGG,SAAS,IAAIF,eAAe,IAAIJ,QAAQ,CAAA;AAE3D,EAAA,MAAMW,KAAK,GAAGO,QAAQ,CAACN,UAAU,CAAC,CAAA;AAClC,EAAA,MAAMd,KAAK,GAAGqB,MAAM,CAACC,MAAM,CAACC,mBAAmB,CAAC,CAACC,QAAQ,CAACvB,UAAW,CAAC,GAAGA,UAAU,GAAG,SAAS,CAAA;AAC/F,EAAA,MAAMc,OAAO,GAAGM,MAAM,CAACC,MAAM,CAACG,aAAa,CAAC,CAACD,QAAQ,CAACR,YAAa,CAAC,GAAGA,YAAY,GAAG,SAAS,CAAA;AAC/F,EAAA,MAAMU,UAAU,GAAG1B,KAAK,KAAKuB,mBAAmB,CAACI,KAAK,CAAA;AAEtD,EAAA,oBACEC,cAAA,CAAAC,aAAA,CAACC,kBAAkB,EAAA;AACjBC,IAAAA,SAAS,EAAEL,UAAU,IAAIX,OAAO,KAAKU,aAAa,CAACO,SAAU;AAC7DC,IAAAA,OAAO,EAAGnC,QAAQ,iBAChB8B,cAAA,CAAAC,aAAA,CAACK,oBAAoB,EAAA;AACnBC,MAAAA,MAAM,EAAEnC,KAAM;AACdoC,MAAAA,SAAS,EAAEhC,QAAS;AACpBiC,MAAAA,WAAW,EAAEhC,UAAW;AACxBiC,MAAAA,UAAU,EAAE/B,SAAU;AACtBgC,MAAAA,MAAM,EAAE1B,KAAAA;AAAM,KAAA,EAEbf,QACmB,CAAA;AACtB,GAAA,eAEF8B,cAAA,CAAAC,aAAA,CAACW,YAAY,EAAAC,QAAA,CAAA;AACXC,IAAAA,IAAI,EAAC,QAAA;AAAQ,GAAA,EACTzB,cAAc,EAAA;AAClBkB,IAAAA,MAAM,EAAEnC,KAAM;AACd2C,IAAAA,UAAU,EAAExC,SAAU;AACtBiC,IAAAA,SAAS,EAAEhC,QAAS;AACpBiC,IAAAA,WAAW,EAAEhC,UAAW;AACxBuC,IAAAA,WAAW,EAAElB,UAAW;AACxBY,IAAAA,UAAU,EAAE/B,SAAU;AACtBsC,IAAAA,UAAU,EAAErC,SAAU;AACtB+B,IAAAA,MAAM,EAAE1B,KAAM;AACdiC,IAAAA,QAAQ,EAAE/B,OAAQ;AAClB,IAAA,eAAA,EAAeV,UAAW;IAC1BN,SAAS,EAAEgD,UAAU,CAACxD,MAAM,CAACQ,SAAS,EAAEA,SAAS,CAAE;AACnDG,IAAAA,QAAQ,EAAEG,UAAW;AACrBX,IAAAA,GAAG,EAAEG,SAAAA;GAEJY,CAAAA,EAAAA,QAAQ,gBAAGmB,cAAA,CAAAC,aAAA,CAACmB,IAAI,EAAAP,QAAA,CAAA;AAACQ,IAAAA,IAAI,EAAExC,QAAS;AAAC,IAAA,aAAA,EAAY,MAAM;AAACV,IAAAA,SAAS,EAAC,MAAA;AAAM,GAAA,EAAKW,aAAa,CAAG,CAAC,GAAG,IAAI,EACjGF,SAAS,gBAAGoB,cAAA,CAAAC,aAAA,CAACqB,OAAO,EAAA;AAACC,IAAAA,IAAI,EAAC,OAAO;IAACnD,KAAK,EAAEe,OAAO,KAAKU,aAAa,CAAC2B,OAAO,GAAG,SAAS,GAAG,SAAA;AAAU,GAAE,CAAC,GAAG,IAAI,eAC9GxB,cAAA,CAAAC,aAAA,CAAO/B,MAAAA,EAAAA,IAAAA,EAAAA,QAAe,CAAC,EACtBa,SAAS,gBAAGiB,cAAA,CAAAC,aAAA,CAACmB,IAAI,EAAAP,QAAA,CAAA;AAACQ,IAAAA,IAAI,EAAEtC,SAAU;AAAC,IAAA,aAAA,EAAY,MAAM;AAACZ,IAAAA,SAAS,EAAC,OAAA;AAAO,GAAA,EAAKa,cAAc,CAAG,CAAC,GAAG,IACtF,CACI,CAAC,CAAA;AAEzB,CAAC,EAAC;AACFrB,MAAM,CAACQ,SAAS,GAAGT,SAAS,CAAA;AAC5BC,MAAM,CAAC8D,WAAW,GAAGhE,cAAc;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as styled_components from 'styled-components';
|
|
2
|
+
import { ButtonProps, ButtonVariant } from './types.js';
|
|
3
|
+
import { Theme } from '../../types/colors.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component style.
|
|
7
|
+
*/
|
|
8
|
+
declare const StyledButton: styled_components.StyledComponent<"button", any, ButtonProps & {
|
|
9
|
+
$color: string | undefined;
|
|
10
|
+
$fullWidth?: boolean | undefined;
|
|
11
|
+
$isActive: boolean | undefined;
|
|
12
|
+
$isDisabled: boolean | undefined;
|
|
13
|
+
$isGradient: boolean;
|
|
14
|
+
$isHovered: boolean | undefined;
|
|
15
|
+
$isLoading: boolean | undefined;
|
|
16
|
+
$theme: Theme | undefined;
|
|
17
|
+
$variant: ButtonVariant | undefined;
|
|
18
|
+
}, never>;
|
|
19
|
+
|
|
20
|
+
export { StyledButton };
|