@redsift/design-system 11.6.0-muiv5-alpha.4 → 11.6.0-muiv5-alpha.5
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/_internal/Alert2.js +54 -0
- package/_internal/Alert2.js.map +1 -0
- package/_internal/AppBar.js +37 -0
- package/_internal/AppBar.js.map +1 -0
- package/_internal/AppContainer.js +96 -0
- package/_internal/AppContainer.js.map +1 -0
- package/_internal/AppContent.js +25 -0
- package/_internal/AppContent.js.map +1 -0
- package/_internal/Badge2.js +9 -0
- package/_internal/Badge2.js.map +1 -0
- package/_internal/BreadcrumbItem.js +9 -0
- package/_internal/BreadcrumbItem.js.map +1 -0
- package/_internal/Breadcrumbs2.js +29 -0
- package/_internal/Breadcrumbs2.js.map +1 -0
- package/_internal/Button2.js +30 -0
- package/_internal/Button2.js.map +1 -0
- package/_internal/ButtonGroup.js +41 -0
- package/_internal/ButtonGroup.js.map +1 -0
- package/_internal/ButtonLink.js +28 -0
- package/_internal/ButtonLink.js.map +1 -0
- package/_internal/Card2.js +35 -0
- package/_internal/Card2.js.map +1 -0
- package/_internal/CardActions.js +9 -0
- package/_internal/CardActions.js.map +1 -0
- package/_internal/CardBody.js +9 -0
- package/_internal/CardBody.js.map +1 -0
- package/_internal/CardHeader.js +9 -0
- package/_internal/CardHeader.js.map +1 -0
- package/_internal/Checkbox2.js +68 -0
- package/_internal/Checkbox2.js.map +1 -0
- package/_internal/CheckboxGroup.js +10 -0
- package/_internal/CheckboxGroup.js.map +1 -0
- package/_internal/ConditionalWrapper.js +14 -0
- package/_internal/ConditionalWrapper.js.map +1 -0
- package/_internal/DetailedCard.js +52 -0
- package/_internal/DetailedCard.js.map +1 -0
- package/_internal/DetailedCardCollapsibleSectionItems.js +9 -0
- package/_internal/DetailedCardCollapsibleSectionItems.js.map +1 -0
- package/_internal/DetailedCardHeader.js +9 -0
- package/_internal/DetailedCardHeader.js.map +1 -0
- package/_internal/DetailedCardSection.js +9 -0
- package/_internal/DetailedCardSection.js.map +1 -0
- package/_internal/DetailedCardSectionItem.js +9 -0
- package/_internal/DetailedCardSectionItem.js.map +1 -0
- package/_internal/Flexbox2.js +30 -0
- package/_internal/Flexbox2.js.map +1 -0
- package/_internal/Grid2.js +32 -0
- package/_internal/Grid2.js.map +1 -0
- package/_internal/GridItem.js +9 -0
- package/_internal/GridItem.js.map +1 -0
- package/_internal/Heading2.js +9 -0
- package/_internal/Heading2.js.map +1 -0
- package/_internal/Icon2.js +10 -0
- package/_internal/Icon2.js.map +1 -0
- package/_internal/IconButton.js +12 -0
- package/_internal/IconButton.js.map +1 -0
- package/_internal/IconButtonLink.js +28 -0
- package/_internal/IconButtonLink.js.map +1 -0
- package/_internal/Item2.js +82 -0
- package/_internal/Item2.js.map +1 -0
- package/_internal/Link2.js +26 -0
- package/_internal/Link2.js.map +1 -0
- package/_internal/LinkButton.js +23 -0
- package/_internal/LinkButton.js.map +1 -0
- package/_internal/Listbox2.js +274 -0
- package/_internal/Listbox2.js.map +1 -0
- package/_internal/Number2.js +69 -0
- package/_internal/Number2.js.map +1 -0
- package/_internal/NumberField.js +80 -0
- package/_internal/NumberField.js.map +1 -0
- package/_internal/Pill2.js +9 -0
- package/_internal/Pill2.js.map +1 -0
- package/_internal/ProgressBar.js +26 -0
- package/_internal/ProgressBar.js.map +1 -0
- package/_internal/Radio2.js +66 -0
- package/_internal/Radio2.js.map +1 -0
- package/_internal/RadioGroup.js +10 -0
- package/_internal/RadioGroup.js.map +1 -0
- package/_internal/Shield2.js +9 -0
- package/_internal/Shield2.js.map +1 -0
- package/_internal/SideNavigationMenu.js +9 -0
- package/_internal/SideNavigationMenu.js.map +1 -0
- package/_internal/SideNavigationMenuBar.js +9 -0
- package/_internal/SideNavigationMenuItem.js +9 -0
- package/_internal/SideNavigationMenuItem.js.map +1 -0
- package/_internal/Skeleton2.js +15 -0
- package/_internal/Skeleton2.js.map +1 -0
- package/_internal/SkeletonCircle.js +9 -0
- package/_internal/SkeletonCircle.js.map +1 -0
- package/_internal/SkeletonText.js +9 -0
- package/_internal/SkeletonText.js.map +1 -0
- package/_internal/Spinner2.js +43 -0
- package/_internal/Spinner2.js.map +1 -0
- package/_internal/Switch2.js +66 -0
- package/_internal/Switch2.js.map +1 -0
- package/_internal/SwitchGroup.js +10 -0
- package/_internal/SwitchGroup.js.map +1 -0
- package/_internal/Text2.js +9 -0
- package/_internal/Text2.js.map +1 -0
- package/_internal/TextArea.js +34 -0
- package/_internal/TextArea.js.map +1 -0
- package/_internal/TextField.js +29 -0
- package/_internal/TextField.js.map +1 -0
- package/_internal/_rollupPluginBabelHelpers.js +133 -0
- package/_internal/alert.js +5 -0
- package/_internal/alert.js.map +1 -0
- package/_internal/app-bar.js +8 -0
- package/_internal/app-bar.js.map +1 -0
- package/_internal/app-container.js +9 -0
- package/_internal/app-container.js.map +1 -0
- package/_internal/app-content.js +5 -0
- package/_internal/app-content.js.map +1 -0
- package/_internal/app-side-panel.js +11 -0
- package/_internal/app-side-panel.js.map +1 -0
- package/_internal/badge.js +6 -0
- package/_internal/badge.js.map +1 -0
- package/_internal/breadcrumb-item.js +5 -0
- package/_internal/breadcrumb-item.js.map +1 -0
- package/_internal/breadcrumbs.js +6 -0
- package/_internal/breadcrumbs.js.map +1 -0
- package/_internal/button-group.js +5 -0
- package/_internal/button-group.js.map +1 -0
- package/_internal/button-link.js +8 -0
- package/_internal/button-link.js.map +1 -0
- package/_internal/button.js +8 -0
- package/_internal/button.js.map +1 -0
- package/_internal/card-actions.js +5 -0
- package/_internal/card-actions.js.map +1 -0
- package/_internal/card-body.js +5 -0
- package/_internal/card-body.js.map +1 -0
- package/_internal/card-header.js +9 -0
- package/_internal/card-header.js.map +1 -0
- package/_internal/card.js +11 -0
- package/_internal/card.js.map +1 -0
- package/_internal/checkbox-group.js +6 -0
- package/_internal/checkbox-group.js.map +1 -0
- package/_internal/checkbox.js +6 -0
- package/_internal/checkbox.js.map +1 -0
- package/_internal/colors.js +102 -0
- package/_internal/colors.js.map +1 -0
- package/_internal/conditional-wrapper.js +2 -0
- package/_internal/conditional-wrapper.js.map +1 -0
- package/_internal/context.js +6 -0
- package/_internal/context.js.map +1 -0
- package/_internal/context2.js +300 -0
- package/_internal/context2.js.map +1 -0
- package/_internal/context3.js +6 -0
- package/_internal/context3.js.map +1 -0
- package/_internal/context4.js +6 -0
- package/_internal/context4.js.map +1 -0
- package/_internal/context5.js +6 -0
- package/_internal/context5.js.map +1 -0
- package/_internal/detailed-card-collapsible-section-items.js +4 -0
- package/_internal/detailed-card-collapsible-section-items.js.map +1 -0
- package/_internal/detailed-card-header.js +8 -0
- package/_internal/detailed-card-header.js.map +1 -0
- package/_internal/detailed-card-section-item.js +11 -0
- package/_internal/detailed-card-section-item.js.map +1 -0
- package/_internal/detailed-card-section.js +7 -0
- package/_internal/detailed-card-section.js.map +1 -0
- package/_internal/detailed-card.js +16 -0
- package/_internal/detailed-card.js.map +1 -0
- package/_internal/filterComponents.js +24 -0
- package/_internal/filterComponents.js.map +1 -0
- package/_internal/flexbox.js +5 -0
- package/_internal/flexbox.js.map +1 -0
- package/_internal/focus-within-group.js +3 -0
- package/_internal/focus-within-group.js.map +1 -0
- package/_internal/fonts.js +12 -0
- package/_internal/gradient-border.js +19 -0
- package/_internal/gradient-border.js.map +1 -0
- package/_internal/grid-item.js +5 -0
- package/_internal/grid-item.js.map +1 -0
- package/_internal/grid.js +6 -0
- package/_internal/grid.js.map +1 -0
- package/_internal/heading.js +7 -0
- package/_internal/heading.js.map +1 -0
- package/_internal/helpers.js +23 -0
- package/_internal/icon-button-link.js +8 -0
- package/_internal/icon-button-link.js.map +1 -0
- package/_internal/icon-button.js +7 -0
- package/_internal/icon-button.js.map +1 -0
- package/_internal/icon.js +6 -0
- package/_internal/icon.js.map +1 -0
- package/_internal/isComponent.js +15 -0
- package/_internal/isComponent.js.map +1 -0
- package/_internal/item.js +8 -0
- package/_internal/item.js.map +1 -0
- package/_internal/link-button.js +8 -0
- package/_internal/link-button.js.map +1 -0
- package/_internal/link.js +8 -0
- package/_internal/link.js.map +1 -0
- package/_internal/listbox.js +6 -0
- package/_internal/listbox.js.map +1 -0
- package/_internal/number-field.js +9 -0
- package/_internal/number-field.js.map +1 -0
- package/_internal/number.js +7 -0
- package/_internal/number.js.map +1 -0
- package/_internal/partitionComponents.js +26 -0
- package/_internal/pill.js +6 -0
- package/_internal/pill.js.map +1 -0
- package/_internal/progress-bar.js +5 -0
- package/_internal/progress-bar.js.map +1 -0
- package/_internal/radio-group.js +6 -0
- package/_internal/radio-group.js.map +1 -0
- package/_internal/radio.js +6 -0
- package/_internal/radio.js.map +1 -0
- package/_internal/redsift-design-tokens.js +1391 -0
- package/_internal/shared.js +5 -0
- package/_internal/shared.js.map +1 -0
- package/_internal/shield.js +6 -0
- package/_internal/shield.js.map +1 -0
- package/_internal/side-navigation-menu-bar.js +9 -0
- package/_internal/side-navigation-menu-bar.js.map +1 -0
- package/_internal/side-navigation-menu-item.js +8 -0
- package/_internal/side-navigation-menu-item.js.map +1 -0
- package/_internal/side-navigation-menu.js +8 -0
- package/_internal/side-navigation-menu.js.map +1 -0
- package/_internal/skeleton-circle.js +7 -0
- package/_internal/skeleton-circle.js.map +1 -0
- package/_internal/skeleton-text.js +7 -0
- package/_internal/skeleton-text.js.map +1 -0
- package/_internal/skeleton.js +8 -0
- package/_internal/skeleton.js.map +1 -0
- package/_internal/spinner.js +5 -0
- package/_internal/spinner.js.map +1 -0
- package/_internal/styles.js +17 -0
- package/_internal/styles.js.map +1 -0
- package/_internal/styles2.js +283 -0
- package/_internal/styles2.js.map +1 -0
- package/_internal/styles3.js +145 -0
- package/_internal/styles3.js.map +1 -0
- package/_internal/styles4.js +250 -0
- package/_internal/styles4.js.map +1 -0
- package/_internal/styles5.js +143 -0
- package/_internal/styles5.js.map +1 -0
- package/_internal/styles6.js +84 -0
- package/_internal/styles6.js.map +1 -0
- package/_internal/switch-group.js +6 -0
- package/_internal/switch-group.js.map +1 -0
- package/_internal/switch.js +6 -0
- package/_internal/switch.js.map +1 -0
- package/_internal/text-area.js +9 -0
- package/_internal/text-area.js.map +1 -0
- package/_internal/text-field.js +10 -0
- package/_internal/text-field.js.map +1 -0
- package/_internal/text.js +7 -0
- package/_internal/text.js.map +1 -0
- package/_internal/theme.js +4 -0
- package/_internal/theme.js.map +1 -0
- package/_internal/types.js +39 -0
- package/_internal/types.js.map +1 -0
- package/_internal/types10.js +20 -0
- package/_internal/types11.js +27 -0
- package/_internal/types12.js +35 -0
- package/_internal/types13.js +143 -0
- package/_internal/types14.js +11 -0
- package/_internal/types15.js +62 -0
- package/_internal/types16.js +56 -0
- package/_internal/types17.js +57 -0
- package/_internal/types18.js +40 -0
- package/_internal/types19.js +101 -0
- package/_internal/types2.js +37 -0
- package/_internal/types2.js.map +1 -0
- package/_internal/types20.js +47 -0
- package/_internal/types21.js +68 -0
- package/_internal/types22.js +52 -0
- package/_internal/types23.js +174 -0
- package/_internal/types24.js +18 -0
- package/_internal/types25.js +12 -0
- package/_internal/types26.js +36 -0
- package/_internal/types27.js +72 -0
- package/_internal/types28.js +73 -0
- package/_internal/types29.js +99 -0
- package/_internal/types3.js +23 -0
- package/_internal/types3.js.map +1 -0
- package/_internal/types4.js +67 -0
- package/_internal/types5.js +11 -0
- package/_internal/types6.js +11 -0
- package/_internal/types7.js +28 -0
- package/_internal/types8.js +72 -0
- package/_internal/types9.js +16 -0
- package/_internal/useAppSidePanel.js +12 -0
- package/_internal/useAppSidePanel.js.map +1 -0
- package/_internal/useFocusOnList.js +83 -0
- package/_internal/useFocusOnList.js.map +1 -0
- package/_internal/useFocusOnListItem.js +203 -0
- package/_internal/useFocusOnListItem.js.map +1 -0
- package/_internal/useFocusRing.js +669 -0
- package/_internal/useFocusRing.js.map +1 -0
- package/_internal/useId.js +42 -0
- package/_internal/useId.js.map +1 -0
- package/_internal/useIsLoaded.js +14 -0
- package/_internal/useListboxItem.js +32 -0
- package/_internal/useListboxItem.js.map +1 -0
- package/_internal/useMessageFormatter.js +143 -0
- package/_internal/useMessageFormatter.js.map +1 -0
- package/_internal/useNumberFormatter.js +239 -0
- package/_internal/useNumberFormatter.js.map +1 -0
- package/_internal/useSideNavigationMenuBar.js +9 -0
- package/_internal/useSideNavigationMenuBar.js.map +1 -0
- package/_internal/useTheme.js +13 -0
- package/_internal/useTheme.js.map +1 -0
- package/_internal/warnIfNoAccessibleLabelFound.js +20 -0
- package/index.js +1738 -122
- package/index.js.map +1 -1
- package/package.json +2 -7
- package/_virtual/_rollupPluginBabelHelpers.js +0 -133
- package/components/alert/Alert.d.ts +0 -9
- package/components/alert/Alert.js +0 -117
- package/components/alert/Alert.js.map +0 -1
- package/components/alert/intl/en-US.json.js +0 -7
- package/components/alert/intl/en-US.json.js.map +0 -1
- package/components/alert/intl/fr-FR.json.js +0 -7
- package/components/alert/intl/fr-FR.json.js.map +0 -1
- package/components/alert/intl/index.js +0 -10
- package/components/alert/intl/index.js.map +0 -1
- package/components/alert/styles.js +0 -54
- package/components/alert/styles.js.map +0 -1
- package/components/alert/types.d.ts +0 -49
- package/components/alert/types.js +0 -20
- package/components/alert/types.js.map +0 -1
- package/components/app-bar/AppBar.d.ts +0 -9
- package/components/app-bar/AppBar.js +0 -95
- package/components/app-bar/AppBar.js.map +0 -1
- package/components/app-bar/intl/en-US.json.js +0 -9
- package/components/app-bar/intl/en-US.json.js.map +0 -1
- package/components/app-bar/intl/fr-FR.json.js +0 -9
- package/components/app-bar/intl/fr-FR.json.js.map +0 -1
- package/components/app-bar/intl/index.js +0 -10
- package/components/app-bar/intl/index.js.map +0 -1
- package/components/app-bar/styles.js +0 -139
- package/components/app-bar/styles.js.map +0 -1
- package/components/app-bar/types.d.ts +0 -31
- package/components/app-container/AppContainer.d.ts +0 -11
- package/components/app-container/AppContainer.js +0 -117
- package/components/app-container/AppContainer.js.map +0 -1
- package/components/app-container/context.d.ts +0 -6
- package/components/app-container/context.js +0 -6
- package/components/app-container/context.js.map +0 -1
- package/components/app-container/styles.js +0 -30
- package/components/app-container/styles.js.map +0 -1
- package/components/app-container/types.d.ts +0 -51
- package/components/app-content/AppContent.d.ts +0 -9
- package/components/app-content/AppContent.js +0 -42
- package/components/app-content/AppContent.js.map +0 -1
- package/components/app-content/styles.js +0 -54
- package/components/app-content/styles.js.map +0 -1
- package/components/app-content/types.d.ts +0 -19
- package/components/app-side-panel/AppSidePanel.d.ts +0 -9
- package/components/app-side-panel/AppSidePanel.js +0 -86
- package/components/app-side-panel/AppSidePanel.js.map +0 -1
- package/components/app-side-panel/intl/en-US.json.js +0 -9
- package/components/app-side-panel/intl/en-US.json.js.map +0 -1
- package/components/app-side-panel/intl/fr-FR.json.js +0 -9
- package/components/app-side-panel/intl/fr-FR.json.js.map +0 -1
- package/components/app-side-panel/intl/index.js +0 -10
- package/components/app-side-panel/intl/index.js.map +0 -1
- package/components/app-side-panel/styles.js +0 -183
- package/components/app-side-panel/styles.js.map +0 -1
- package/components/app-side-panel/types.d.ts +0 -39
- package/components/app-side-panel/types.js +0 -15
- package/components/app-side-panel/types.js.map +0 -1
- package/components/app-side-panel/useAppSidePanel.d.ts +0 -6
- package/components/app-side-panel/useAppSidePanel.js +0 -23
- package/components/app-side-panel/useAppSidePanel.js.map +0 -1
- package/components/badge/Badge.d.ts +0 -9
- package/components/badge/Badge.js +0 -44
- package/components/badge/Badge.js.map +0 -1
- package/components/badge/styles.js +0 -93
- package/components/badge/styles.js.map +0 -1
- package/components/badge/types.d.ts +0 -37
- package/components/badge/types.js +0 -14
- package/components/badge/types.js.map +0 -1
- package/components/breadcrumb-item/BreadcrumbItem.d.ts +0 -9
- package/components/breadcrumb-item/BreadcrumbItem.js +0 -47
- package/components/breadcrumb-item/BreadcrumbItem.js.map +0 -1
- package/components/breadcrumb-item/styles.js +0 -48
- package/components/breadcrumb-item/styles.js.map +0 -1
- package/components/breadcrumb-item/types.d.ts +0 -23
- package/components/breadcrumbs/Breadcrumbs.d.ts +0 -13
- package/components/breadcrumbs/Breadcrumbs.js +0 -61
- package/components/breadcrumbs/Breadcrumbs.js.map +0 -1
- package/components/breadcrumbs/styles.js +0 -38
- package/components/breadcrumbs/styles.js.map +0 -1
- package/components/breadcrumbs/types.d.ts +0 -19
- package/components/button/Button.d.ts +0 -13
- package/components/button/Button.js +0 -92
- package/components/button/Button.js.map +0 -1
- package/components/button/styles.d.ts +0 -20
- package/components/button/styles.js +0 -219
- package/components/button/styles.js.map +0 -1
- package/components/button/types.d.ts +0 -67
- package/components/button/types.js +0 -19
- package/components/button/types.js.map +0 -1
- package/components/button-group/ButtonGroup.d.ts +0 -9
- package/components/button-group/ButtonGroup.js +0 -67
- package/components/button-group/ButtonGroup.js.map +0 -1
- package/components/button-group/styles.js +0 -103
- package/components/button-group/styles.js.map +0 -1
- package/components/button-group/types.d.ts +0 -36
- package/components/button-group/types.js +0 -19
- package/components/button-group/types.js.map +0 -1
- package/components/button-link/ButtonLink.d.ts +0 -13
- package/components/button-link/ButtonLink.js +0 -85
- package/components/button-link/ButtonLink.js.map +0 -1
- package/components/button-link/types.d.ts +0 -18
- package/components/card/Card.d.ts +0 -13
- package/components/card/Card.js +0 -81
- package/components/card/Card.js.map +0 -1
- package/components/card/intl/en-US.json.js +0 -9
- package/components/card/intl/en-US.json.js.map +0 -1
- package/components/card/intl/fr-FR.json.js +0 -9
- package/components/card/intl/fr-FR.json.js.map +0 -1
- package/components/card/intl/index.js +0 -10
- package/components/card/intl/index.js.map +0 -1
- package/components/card/styles.js +0 -63
- package/components/card/styles.js.map +0 -1
- package/components/card/types.d.ts +0 -25
- package/components/card-actions/CardActions.d.ts +0 -9
- package/components/card-actions/CardActions.js +0 -33
- package/components/card-actions/CardActions.js.map +0 -1
- package/components/card-actions/styles.js +0 -15
- package/components/card-actions/styles.js.map +0 -1
- package/components/card-actions/types.d.ts +0 -11
- package/components/card-body/CardBody.d.ts +0 -9
- package/components/card-body/CardBody.js +0 -28
- package/components/card-body/CardBody.js.map +0 -1
- package/components/card-body/styles.js +0 -18
- package/components/card-body/styles.js.map +0 -1
- package/components/card-body/types.d.ts +0 -11
- package/components/card-header/CardHeader.d.ts +0 -9
- package/components/card-header/CardHeader.js +0 -56
- package/components/card-header/CardHeader.js.map +0 -1
- package/components/card-header/styles.js +0 -31
- package/components/card-header/styles.js.map +0 -1
- package/components/card-header/types.d.ts +0 -28
- package/components/checkbox/Checkbox.d.ts +0 -11
- package/components/checkbox/Checkbox.js +0 -135
- package/components/checkbox/Checkbox.js.map +0 -1
- package/components/checkbox/styles.js +0 -113
- package/components/checkbox/styles.js.map +0 -1
- package/components/checkbox/types.d.ts +0 -60
- package/components/checkbox-group/CheckboxGroup.d.ts +0 -10
- package/components/checkbox-group/CheckboxGroup.js +0 -101
- package/components/checkbox-group/CheckboxGroup.js.map +0 -1
- package/components/checkbox-group/context.js +0 -6
- package/components/checkbox-group/context.js.map +0 -1
- package/components/checkbox-group/styles.js +0 -78
- package/components/checkbox-group/styles.js.map +0 -1
- package/components/checkbox-group/types.d.ts +0 -72
- package/components/checkbox-group/types.js +0 -18
- package/components/checkbox-group/types.js.map +0 -1
- package/components/conditional-wrapper/ConditionalWrapper.d.ts +0 -6
- package/components/conditional-wrapper/ConditionalWrapper.js +0 -13
- package/components/conditional-wrapper/ConditionalWrapper.js.map +0 -1
- package/components/conditional-wrapper/types.d.ts +0 -10
- package/components/detailed-card/DetailedCard.d.ts +0 -15
- package/components/detailed-card/DetailedCard.js +0 -170
- package/components/detailed-card/DetailedCard.js.map +0 -1
- package/components/detailed-card/intl/en-US.json.js +0 -7
- package/components/detailed-card/intl/en-US.json.js.map +0 -1
- package/components/detailed-card/intl/fr-FR.json.js +0 -7
- package/components/detailed-card/intl/fr-FR.json.js.map +0 -1
- package/components/detailed-card/intl/index.js +0 -10
- package/components/detailed-card/intl/index.js.map +0 -1
- package/components/detailed-card/styles.js +0 -49
- package/components/detailed-card/styles.js.map +0 -1
- package/components/detailed-card/types.d.ts +0 -49
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.d.ts +0 -9
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js +0 -33
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js.map +0 -1
- package/components/detailed-card-collapsible-section-items/styles.js +0 -35
- package/components/detailed-card-collapsible-section-items/styles.js.map +0 -1
- package/components/detailed-card-collapsible-section-items/types.d.ts +0 -16
- package/components/detailed-card-header/DetailedCardHeader.d.ts +0 -9
- package/components/detailed-card-header/DetailedCardHeader.js +0 -45
- package/components/detailed-card-header/DetailedCardHeader.js.map +0 -1
- package/components/detailed-card-header/styles.js +0 -26
- package/components/detailed-card-header/styles.js.map +0 -1
- package/components/detailed-card-header/types.d.ts +0 -20
- package/components/detailed-card-section/DetailedCardSection.d.ts +0 -9
- package/components/detailed-card-section/DetailedCardSection.js +0 -90
- package/components/detailed-card-section/DetailedCardSection.js.map +0 -1
- package/components/detailed-card-section/intl/en-US.json.js +0 -9
- package/components/detailed-card-section/intl/en-US.json.js.map +0 -1
- package/components/detailed-card-section/intl/fr-FR.json.js +0 -9
- package/components/detailed-card-section/intl/fr-FR.json.js.map +0 -1
- package/components/detailed-card-section/intl/index.js +0 -10
- package/components/detailed-card-section/intl/index.js.map +0 -1
- package/components/detailed-card-section/styles.js +0 -69
- package/components/detailed-card-section/styles.js.map +0 -1
- package/components/detailed-card-section/types.d.ts +0 -27
- package/components/detailed-card-section-item/DetailedCardSectionItem.d.ts +0 -9
- package/components/detailed-card-section-item/DetailedCardSectionItem.js +0 -64
- package/components/detailed-card-section-item/DetailedCardSectionItem.js.map +0 -1
- package/components/detailed-card-section-item/styles.js +0 -34
- package/components/detailed-card-section-item/styles.js.map +0 -1
- package/components/detailed-card-section-item/types.d.ts +0 -35
- package/components/flexbox/Flexbox.d.ts +0 -9
- package/components/flexbox/Flexbox.js +0 -44
- package/components/flexbox/Flexbox.js.map +0 -1
- package/components/flexbox/styles.js +0 -54
- package/components/flexbox/styles.js.map +0 -1
- package/components/flexbox/types.d.ts +0 -24
- package/components/focus-within-group/FocusWithinGroup.d.ts +0 -41
- package/components/focus-within-group/FocusWithinGroup.js +0 -91
- package/components/focus-within-group/FocusWithinGroup.js.map +0 -1
- package/components/focus-within-group/context.d.ts +0 -7
- package/components/focus-within-group/context.js +0 -21
- package/components/focus-within-group/context.js.map +0 -1
- package/components/focus-within-group/reducer.d.ts +0 -5
- package/components/focus-within-group/reducer.js +0 -419
- package/components/focus-within-group/reducer.js.map +0 -1
- package/components/focus-within-group/types.d.ts +0 -143
- package/components/focus-within-group/types.js +0 -42
- package/components/focus-within-group/types.js.map +0 -1
- package/components/focus-within-group/useFocusOnList.d.ts +0 -5
- package/components/focus-within-group/useFocusOnList.js +0 -44
- package/components/focus-within-group/useFocusOnList.js.map +0 -1
- package/components/focus-within-group/useFocusOnListItem.d.ts +0 -39
- package/components/focus-within-group/useFocusOnListItem.js +0 -148
- package/components/focus-within-group/useFocusOnListItem.js.map +0 -1
- package/components/gradient-border/index.d.ts +0 -14
- package/components/gradient-border/index.js +0 -38
- package/components/gradient-border/index.js.map +0 -1
- package/components/grid/Grid.d.ts +0 -13
- package/components/grid/Grid.js +0 -45
- package/components/grid/Grid.js.map +0 -1
- package/components/grid/styles.js +0 -55
- package/components/grid/styles.js.map +0 -1
- package/components/grid/types.d.ts +0 -22
- package/components/grid-item/GridItem.d.ts +0 -9
- package/components/grid-item/GridItem.js +0 -28
- package/components/grid-item/GridItem.js.map +0 -1
- package/components/grid-item/styles.js +0 -16
- package/components/grid-item/styles.js.map +0 -1
- package/components/grid-item/types.d.ts +0 -11
- package/components/heading/Heading.d.ts +0 -9
- package/components/heading/Heading.js +0 -50
- package/components/heading/Heading.js.map +0 -1
- package/components/heading/styles.js +0 -67
- package/components/heading/styles.js.map +0 -1
- package/components/heading/types.d.ts +0 -62
- package/components/heading/types.js +0 -26
- package/components/heading/types.js.map +0 -1
- package/components/icon/Icon.d.ts +0 -10
- package/components/icon/Icon.js +0 -116
- package/components/icon/Icon.js.map +0 -1
- package/components/icon/styles.js +0 -84
- package/components/icon/styles.js.map +0 -1
- package/components/icon/types.d.ts +0 -57
- package/components/icon/types.js +0 -18
- package/components/icon/types.js.map +0 -1
- package/components/icon-button/IconButton.d.ts +0 -12
- package/components/icon-button/IconButton.js +0 -81
- package/components/icon-button/IconButton.js.map +0 -1
- package/components/icon-button/styles.js +0 -31
- package/components/icon-button/styles.js.map +0 -1
- package/components/icon-button/types.d.ts +0 -56
- package/components/icon-button/types.js +0 -19
- package/components/icon-button/types.js.map +0 -1
- package/components/icon-button-link/IconButtonLink.d.ts +0 -13
- package/components/icon-button-link/IconButtonLink.js +0 -76
- package/components/icon-button-link/IconButtonLink.js.map +0 -1
- package/components/icon-button-link/types.d.ts +0 -18
- package/components/item/Item.d.ts +0 -10
- package/components/item/Item.js +0 -225
- package/components/item/Item.js.map +0 -1
- package/components/item/styles.d.ts +0 -20
- package/components/item/styles.js +0 -129
- package/components/item/styles.js.map +0 -1
- package/components/item/types.d.ts +0 -59
- package/components/item/useMenuItem.js +0 -55
- package/components/item/useMenuItem.js.map +0 -1
- package/components/link/Link.d.ts +0 -14
- package/components/link/Link.js +0 -67
- package/components/link/Link.js.map +0 -1
- package/components/link/styles.d.ts +0 -15
- package/components/link/styles.js +0 -145
- package/components/link/styles.js.map +0 -1
- package/components/link/types.d.ts +0 -40
- package/components/link-button/LinkButton.d.ts +0 -13
- package/components/link-button/LinkButton.js +0 -66
- package/components/link-button/LinkButton.js.map +0 -1
- package/components/link-button/types.d.ts +0 -13
- package/components/listbox/ActiveDescendantListbox.d.ts +0 -8
- package/components/listbox/ActiveDescendantListbox.js +0 -74
- package/components/listbox/ActiveDescendantListbox.js.map +0 -1
- package/components/listbox/Listbox.d.ts +0 -10
- package/components/listbox/Listbox.js +0 -110
- package/components/listbox/Listbox.js.map +0 -1
- package/components/listbox/RovingTabindexListbox.d.ts +0 -8
- package/components/listbox/RovingTabindexListbox.js +0 -30
- package/components/listbox/RovingTabindexListbox.js.map +0 -1
- package/components/listbox/context.d.ts +0 -7
- package/components/listbox/context.js +0 -15
- package/components/listbox/context.js.map +0 -1
- package/components/listbox/reducer.d.ts +0 -5
- package/components/listbox/reducer.js +0 -45
- package/components/listbox/reducer.js.map +0 -1
- package/components/listbox/styles.js +0 -44
- package/components/listbox/styles.js.map +0 -1
- package/components/listbox/types.d.ts +0 -101
- package/components/listbox/types.js +0 -32
- package/components/listbox/types.js.map +0 -1
- package/components/listbox/useListboxItem.d.ts +0 -12
- package/components/listbox/useListboxItem.js +0 -90
- package/components/listbox/useListboxItem.js.map +0 -1
- package/components/number/Number.d.ts +0 -9
- package/components/number/Number.js +0 -105
- package/components/number/Number.js.map +0 -1
- package/components/number/styles.js +0 -10
- package/components/number/styles.js.map +0 -1
- package/components/number/types.d.ts +0 -63
- package/components/number-field/NumberField.d.ts +0 -10
- package/components/number-field/NumberField.js +0 -216
- package/components/number-field/NumberField.js.map +0 -1
- package/components/number-field/styles.js +0 -240
- package/components/number-field/styles.js.map +0 -1
- package/components/number-field/types.d.ts +0 -74
- package/components/number-field/types.js +0 -14
- package/components/number-field/types.js.map +0 -1
- package/components/pill/Pill.d.ts +0 -9
- package/components/pill/Pill.js +0 -93
- package/components/pill/Pill.js.map +0 -1
- package/components/pill/styles.js +0 -305
- package/components/pill/styles.js.map +0 -1
- package/components/pill/types.d.ts +0 -47
- package/components/pill/types.js +0 -15
- package/components/pill/types.js.map +0 -1
- package/components/progress-bar/ProgressBar.d.ts +0 -9
- package/components/progress-bar/ProgressBar.js +0 -35
- package/components/progress-bar/ProgressBar.js.map +0 -1
- package/components/progress-bar/styles.js +0 -38
- package/components/progress-bar/styles.js.map +0 -1
- package/components/progress-bar/types.d.ts +0 -20
- package/components/radio/Radio.d.ts +0 -11
- package/components/radio/Radio.js +0 -128
- package/components/radio/Radio.js.map +0 -1
- package/components/radio/styles.js +0 -113
- package/components/radio/styles.js.map +0 -1
- package/components/radio/types.d.ts +0 -58
- package/components/radio-group/RadioGroup.d.ts +0 -10
- package/components/radio-group/RadioGroup.js +0 -89
- package/components/radio-group/RadioGroup.js.map +0 -1
- package/components/radio-group/context.js +0 -6
- package/components/radio-group/context.js.map +0 -1
- package/components/radio-group/styles.js +0 -78
- package/components/radio-group/styles.js.map +0 -1
- package/components/radio-group/types.d.ts +0 -68
- package/components/radio-group/types.js +0 -18
- package/components/radio-group/types.js.map +0 -1
- package/components/shared/styles.d.ts +0 -17
- package/components/shared/styles.js +0 -250
- package/components/shared/styles.js.map +0 -1
- package/components/shield/Shield.d.ts +0 -9
- package/components/shield/Shield.js +0 -136
- package/components/shield/Shield.js.map +0 -1
- package/components/shield/styles.js +0 -71
- package/components/shield/styles.js.map +0 -1
- package/components/shield/types.d.ts +0 -52
- package/components/shield/types.js +0 -25
- package/components/shield/types.js.map +0 -1
- package/components/side-navigation-menu/SideNavigationMenu.d.ts +0 -9
- package/components/side-navigation-menu/SideNavigationMenu.js +0 -367
- package/components/side-navigation-menu/SideNavigationMenu.js.map +0 -1
- package/components/side-navigation-menu/context.js +0 -6
- package/components/side-navigation-menu/context.js.map +0 -1
- package/components/side-navigation-menu/reducer.js +0 -26
- package/components/side-navigation-menu/reducer.js.map +0 -1
- package/components/side-navigation-menu/styles.js +0 -196
- package/components/side-navigation-menu/styles.js.map +0 -1
- package/components/side-navigation-menu/types.d.ts +0 -72
- package/components/side-navigation-menu/types.js +0 -21
- package/components/side-navigation-menu/types.js.map +0 -1
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.d.ts +0 -9
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.js +0 -217
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.js.map +0 -1
- package/components/side-navigation-menu-bar/context.js +0 -6
- package/components/side-navigation-menu-bar/context.js.map +0 -1
- package/components/side-navigation-menu-bar/styles.js +0 -89
- package/components/side-navigation-menu-bar/styles.js.map +0 -1
- package/components/side-navigation-menu-bar/types.d.ts +0 -65
- package/components/side-navigation-menu-bar/types.js +0 -22
- package/components/side-navigation-menu-bar/types.js.map +0 -1
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.d.ts +0 -9
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js +0 -70
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js.map +0 -1
- package/components/side-navigation-menu-item/SideNavigationMenuItem.d.ts +0 -9
- package/components/side-navigation-menu-item/SideNavigationMenuItem.js +0 -115
- package/components/side-navigation-menu-item/SideNavigationMenuItem.js.map +0 -1
- package/components/side-navigation-menu-item/styles.js +0 -174
- package/components/side-navigation-menu-item/styles.js.map +0 -1
- package/components/side-navigation-menu-item/types.d.ts +0 -51
- package/components/skeleton/Skeleton.d.ts +0 -15
- package/components/skeleton/Skeleton.js +0 -42
- package/components/skeleton/Skeleton.js.map +0 -1
- package/components/skeleton/styles.js +0 -84
- package/components/skeleton/styles.js.map +0 -1
- package/components/skeleton/types.d.ts +0 -18
- package/components/skeleton-circle/SkeletonCircle.d.ts +0 -9
- package/components/skeleton-circle/SkeletonCircle.js +0 -36
- package/components/skeleton-circle/SkeletonCircle.js.map +0 -1
- package/components/skeleton-circle/styles.js +0 -26
- package/components/skeleton-circle/styles.js.map +0 -1
- package/components/skeleton-circle/types.d.ts +0 -12
- package/components/skeleton-text/SkeletonText.d.ts +0 -9
- package/components/skeleton-text/SkeletonText.js +0 -42
- package/components/skeleton-text/SkeletonText.js.map +0 -1
- package/components/skeleton-text/styles.js +0 -39
- package/components/skeleton-text/styles.js.map +0 -1
- package/components/skeleton-text/types.d.ts +0 -36
- package/components/skeleton-text/types.js +0 -20
- package/components/skeleton-text/types.js.map +0 -1
- package/components/spinner/Spinner.d.ts +0 -9
- package/components/spinner/Spinner.js +0 -82
- package/components/spinner/Spinner.js.map +0 -1
- package/components/spinner/images/spinner-grey-l1.svg.js +0 -4
- package/components/spinner/images/spinner-grey-l1.svg.js.map +0 -1
- package/components/spinner/images/spinner-grey-l2.svg.js +0 -4
- package/components/spinner/images/spinner-grey-l2.svg.js.map +0 -1
- package/components/spinner/images/spinner-grey-l3.svg.js +0 -4
- package/components/spinner/images/spinner-grey-l3.svg.js.map +0 -1
- package/components/spinner/images/spinner-primary-n.svg.js +0 -4
- package/components/spinner/images/spinner-primary-n.svg.js.map +0 -1
- package/components/spinner/intl/en-US.json.js +0 -7
- package/components/spinner/intl/en-US.json.js.map +0 -1
- package/components/spinner/intl/fr-FR.json.js +0 -7
- package/components/spinner/intl/fr-FR.json.js.map +0 -1
- package/components/spinner/intl/index.js +0 -10
- package/components/spinner/intl/index.js.map +0 -1
- package/components/spinner/styles.js +0 -13
- package/components/spinner/styles.js.map +0 -1
- package/components/spinner/types.d.ts +0 -38
- package/components/spinner/types.js +0 -16
- package/components/spinner/types.js.map +0 -1
- package/components/switch/Switch.d.ts +0 -11
- package/components/switch/Switch.js +0 -137
- package/components/switch/Switch.js.map +0 -1
- package/components/switch/styles.js +0 -187
- package/components/switch/styles.js.map +0 -1
- package/components/switch/types.d.ts +0 -58
- package/components/switch-group/SwitchGroup.d.ts +0 -10
- package/components/switch-group/SwitchGroup.js +0 -101
- package/components/switch-group/SwitchGroup.js.map +0 -1
- package/components/switch-group/context.js +0 -6
- package/components/switch-group/context.js.map +0 -1
- package/components/switch-group/styles.js +0 -78
- package/components/switch-group/styles.js.map +0 -1
- package/components/switch-group/types.d.ts +0 -72
- package/components/switch-group/types.js +0 -18
- package/components/switch-group/types.js.map +0 -1
- package/components/text/Text.d.ts +0 -9
- package/components/text/Text.js +0 -51
- package/components/text/Text.js.map +0 -1
- package/components/text/styles.js +0 -112
- package/components/text/styles.js.map +0 -1
- package/components/text/types.d.ts +0 -73
- package/components/text/types.js +0 -34
- package/components/text/types.js.map +0 -1
- package/components/text-area/TextArea.d.ts +0 -10
- package/components/text-area/TextArea.js +0 -165
- package/components/text-area/TextArea.js.map +0 -1
- package/components/text-area/styles.js +0 -240
- package/components/text-area/styles.js.map +0 -1
- package/components/text-area/types.d.ts +0 -28
- package/components/text-area/types.js +0 -14
- package/components/text-area/types.js.map +0 -1
- package/components/text-field/TextField.d.ts +0 -10
- package/components/text-field/TextField.js +0 -197
- package/components/text-field/TextField.js.map +0 -1
- package/components/text-field/intl/en-US.json.js +0 -8
- package/components/text-field/intl/en-US.json.js.map +0 -1
- package/components/text-field/intl/fr-FR.json.js +0 -8
- package/components/text-field/intl/fr-FR.json.js.map +0 -1
- package/components/text-field/intl/index.js +0 -10
- package/components/text-field/intl/index.js.map +0 -1
- package/components/text-field/styles.d.ts +0 -22
- package/components/text-field/styles.js +0 -252
- package/components/text-field/styles.js.map +0 -1
- package/components/text-field/types.d.ts +0 -99
- package/components/text-field/types.js +0 -18
- package/components/text-field/types.js.map +0 -1
- package/components/theme/context.d.ts +0 -11
- package/components/theme/context.js +0 -7
- package/components/theme/context.js.map +0 -1
- package/components/theme/useTheme.d.ts +0 -5
- package/components/theme/useTheme.js +0 -13
- package/components/theme/useTheme.js.map +0 -1
- package/hooks/useBoundingRect.d.ts +0 -8
- package/hooks/useBoundingRect.js +0 -17
- package/hooks/useBoundingRect.js.map +0 -1
- package/hooks/useComputeNumberOfRows.d.ts +0 -15
- package/hooks/useComputeNumberOfRows.js +0 -40
- package/hooks/useComputeNumberOfRows.js.map +0 -1
- package/hooks/useIsLoaded.d.ts +0 -5
- package/hooks/useIsLoaded.js +0 -14
- package/hooks/useWindowSize.d.ts +0 -8
- package/hooks/useWindowSize.js +0 -42
- package/hooks/useWindowSize.js.map +0 -1
- package/index.d.ts +0 -157
- package/react-aria/internationalized/date/DateFormatter.d.ts +0 -25
- package/react-aria/internationalized/date/DateFormatter.js +0 -187
- package/react-aria/internationalized/date/DateFormatter.js.map +0 -1
- package/react-aria/internationalized/message/MessageDictionary.d.ts +0 -7
- package/react-aria/internationalized/message/MessageDictionary.js +0 -82
- package/react-aria/internationalized/message/MessageDictionary.js.map +0 -1
- package/react-aria/internationalized/message/MessageFormatter.js +0 -38
- package/react-aria/internationalized/message/MessageFormatter.js.map +0 -1
- package/react-aria/internationalized/number/NumberFormatter.d.ts +0 -6
- package/react-aria/internationalized/number/NumberFormatter.js +0 -222
- package/react-aria/internationalized/number/NumberFormatter.js.map +0 -1
- package/react-aria/internationalized/number/NumberParser.js +0 -288
- package/react-aria/internationalized/number/NumberParser.js.map +0 -1
- package/react-aria/internationalized/string/LocalizedStringDictionary.d.ts +0 -21
- package/react-aria/internationalized/string/LocalizedStringDictionary.js +0 -118
- package/react-aria/internationalized/string/LocalizedStringDictionary.js.map +0 -1
- package/react-aria/internationalized/string/LocalizedStringFormatter.d.ts +0 -21
- package/react-aria/internationalized/string/LocalizedStringFormatter.js +0 -70
- package/react-aria/internationalized/string/LocalizedStringFormatter.js.map +0 -1
- package/react-aria/react-aria/button/useButton.js +0 -95
- package/react-aria/react-aria/button/useButton.js.map +0 -1
- package/react-aria/react-aria/focus/focusSafely.js +0 -33
- package/react-aria/react-aria/focus/focusSafely.js.map +0 -1
- package/react-aria/react-aria/focus/useFocusRing.js +0 -57
- package/react-aria/react-aria/focus/useFocusRing.js.map +0 -1
- package/react-aria/react-aria/focus/useFocusable.js +0 -47
- package/react-aria/react-aria/focus/useFocusable.js.map +0 -1
- package/react-aria/react-aria/form/useFormValidation.js +0 -112
- package/react-aria/react-aria/form/useFormValidation.js.map +0 -1
- package/react-aria/react-aria/i18n/context.d.ts +0 -19
- package/react-aria/react-aria/i18n/context.js +0 -41
- package/react-aria/react-aria/i18n/context.js.map +0 -1
- package/react-aria/react-aria/i18n/useCollator.d.ts +0 -8
- package/react-aria/react-aria/i18n/useCollator.js +0 -25
- package/react-aria/react-aria/i18n/useCollator.js.map +0 -1
- package/react-aria/react-aria/i18n/useDateFormatter.d.ts +0 -13
- package/react-aria/react-aria/i18n/useDateFormatter.js +0 -39
- package/react-aria/react-aria/i18n/useDateFormatter.js.map +0 -1
- package/react-aria/react-aria/i18n/useDefaultLocale.d.ts +0 -10
- package/react-aria/react-aria/i18n/useDefaultLocale.js +0 -67
- package/react-aria/react-aria/i18n/useDefaultLocale.js.map +0 -1
- package/react-aria/react-aria/i18n/useFilter.d.ts +0 -15
- package/react-aria/react-aria/i18n/useFilter.js +0 -58
- package/react-aria/react-aria/i18n/useFilter.js.map +0 -1
- package/react-aria/react-aria/i18n/useListFormatter.d.ts +0 -8
- package/react-aria/react-aria/i18n/useListFormatter.js +0 -20
- package/react-aria/react-aria/i18n/useListFormatter.js.map +0 -1
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.d.ts +0 -15
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js +0 -38
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js.map +0 -1
- package/react-aria/react-aria/i18n/useMessageFormatter.d.ts +0 -13
- package/react-aria/react-aria/i18n/useMessageFormatter.js +0 -32
- package/react-aria/react-aria/i18n/useMessageFormatter.js.map +0 -1
- package/react-aria/react-aria/i18n/useNumberFormatter.d.ts +0 -10
- package/react-aria/react-aria/i18n/useNumberFormatter.js +0 -21
- package/react-aria/react-aria/i18n/useNumberFormatter.js.map +0 -1
- package/react-aria/react-aria/i18n/utils.js +0 -49
- package/react-aria/react-aria/i18n/utils.js.map +0 -1
- package/react-aria/react-aria/interactions/context.js +0 -20
- package/react-aria/react-aria/interactions/context.js.map +0 -1
- package/react-aria/react-aria/interactions/createEventHandler.js +0 -48
- package/react-aria/react-aria/interactions/createEventHandler.js.map +0 -1
- package/react-aria/react-aria/interactions/textSelection.js +0 -85
- package/react-aria/react-aria/interactions/textSelection.js.map +0 -1
- package/react-aria/react-aria/interactions/useFocus.js +0 -53
- package/react-aria/react-aria/interactions/useFocus.js.map +0 -1
- package/react-aria/react-aria/interactions/useFocusVisible.js +0 -236
- package/react-aria/react-aria/interactions/useFocusVisible.js.map +0 -1
- package/react-aria/react-aria/interactions/useFocusWithin.js +0 -65
- package/react-aria/react-aria/interactions/useFocusWithin.js.map +0 -1
- package/react-aria/react-aria/interactions/useKeyboard.js +0 -27
- package/react-aria/react-aria/interactions/useKeyboard.js.map +0 -1
- package/react-aria/react-aria/interactions/usePress.js +0 -769
- package/react-aria/react-aria/interactions/usePress.js.map +0 -1
- package/react-aria/react-aria/interactions/useScrollWheel.js +0 -31
- package/react-aria/react-aria/interactions/useScrollWheel.js.map +0 -1
- package/react-aria/react-aria/interactions/utils.js +0 -116
- package/react-aria/react-aria/interactions/utils.js.map +0 -1
- package/react-aria/react-aria/label/useField.js +0 -42
- package/react-aria/react-aria/label/useField.js.map +0 -1
- package/react-aria/react-aria/label/useLabel.js +0 -42
- package/react-aria/react-aria/label/useLabel.js.map +0 -1
- package/react-aria/react-aria/live-announcer/LiveAnnouncer.js +0 -121
- package/react-aria/react-aria/live-announcer/LiveAnnouncer.js.map +0 -1
- package/react-aria/react-aria/numberfield/intl/en-US.json.js +0 -11
- package/react-aria/react-aria/numberfield/intl/en-US.json.js.map +0 -1
- package/react-aria/react-aria/numberfield/intl/fr-FR.json.js +0 -11
- package/react-aria/react-aria/numberfield/intl/fr-FR.json.js.map +0 -1
- package/react-aria/react-aria/numberfield/intl/index.js +0 -10
- package/react-aria/react-aria/numberfield/intl/index.js.map +0 -1
- package/react-aria/react-aria/numberfield/useNumberField.js +0 -294
- package/react-aria/react-aria/numberfield/useNumberField.js.map +0 -1
- package/react-aria/react-aria/spinbutton/intl/en-US.json.js +0 -7
- package/react-aria/react-aria/spinbutton/intl/en-US.json.js.map +0 -1
- package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js +0 -7
- package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js.map +0 -1
- package/react-aria/react-aria/spinbutton/intl/index.js +0 -10
- package/react-aria/react-aria/spinbutton/intl/index.js.map +0 -1
- package/react-aria/react-aria/spinbutton/useSpinButton.js +0 -168
- package/react-aria/react-aria/spinbutton/useSpinButton.js.map +0 -1
- package/react-aria/react-aria/ssr/SSRProvider.d.ts +0 -22
- package/react-aria/react-aria/ssr/SSRProvider.js +0 -157
- package/react-aria/react-aria/ssr/SSRProvider.js.map +0 -1
- package/react-aria/react-aria/textfield/useFormattedTextField.js +0 -142
- package/react-aria/react-aria/textfield/useFormattedTextField.js.map +0 -1
- package/react-aria/react-aria/textfield/useTextField.js +0 -156
- package/react-aria/react-aria/textfield/useTextField.js.map +0 -1
- package/react-aria/react-aria/utils/chain.js +0 -33
- package/react-aria/react-aria/utils/chain.js.map +0 -1
- package/react-aria/react-aria/utils/domHelpers.js +0 -14
- package/react-aria/react-aria/utils/domHelpers.js.map +0 -1
- package/react-aria/react-aria/utils/filterDOMProps.js +0 -45
- package/react-aria/react-aria/utils/filterDOMProps.js.map +0 -1
- package/react-aria/react-aria/utils/focusWithoutScrolling.js +0 -88
- package/react-aria/react-aria/utils/focusWithoutScrolling.js.map +0 -1
- package/react-aria/react-aria/utils/isVirtualEvent.js +0 -51
- package/react-aria/react-aria/utils/isVirtualEvent.js.map +0 -1
- package/react-aria/react-aria/utils/mergeProps.js +0 -48
- package/react-aria/react-aria/utils/mergeProps.js.map +0 -1
- package/react-aria/react-aria/utils/openLink.js +0 -55
- package/react-aria/react-aria/utils/openLink.js.map +0 -1
- package/react-aria/react-aria/utils/platform.js +0 -69
- package/react-aria/react-aria/utils/platform.js.map +0 -1
- package/react-aria/react-aria/utils/runAfterTransition.js +0 -100
- package/react-aria/react-aria/utils/runAfterTransition.js.map +0 -1
- package/react-aria/react-aria/utils/useDeepMemo.js +0 -16
- package/react-aria/react-aria/utils/useDeepMemo.js.map +0 -1
- package/react-aria/react-aria/utils/useEffectEvent.js +0 -31
- package/react-aria/react-aria/utils/useEffectEvent.js.map +0 -1
- package/react-aria/react-aria/utils/useEvent.js +0 -21
- package/react-aria/react-aria/utils/useEvent.js.map +0 -1
- package/react-aria/react-aria/utils/useFormReset.js +0 -23
- package/react-aria/react-aria/utils/useFormReset.js.map +0 -1
- package/react-aria/react-aria/utils/useGlobalListeners.js +0 -44
- package/react-aria/react-aria/utils/useGlobalListeners.js.map +0 -1
- package/react-aria/react-aria/utils/useId.js +0 -86
- package/react-aria/react-aria/utils/useId.js.map +0 -1
- package/react-aria/react-aria/utils/useLabels.js +0 -39
- package/react-aria/react-aria/utils/useLabels.js.map +0 -1
- package/react-aria/react-aria/utils/useLayoutEffect.js +0 -21
- package/react-aria/react-aria/utils/useLayoutEffect.js.map +0 -1
- package/react-aria/react-aria/utils/useSyncRef.js +0 -29
- package/react-aria/react-aria/utils/useSyncRef.js.map +0 -1
- package/react-aria/react-aria/utils/useValueEffect.js +0 -52
- package/react-aria/react-aria/utils/useValueEffect.js.map +0 -1
- package/react-aria/react-stately/form/useFormValidationState.js +0 -191
- package/react-aria/react-stately/form/useFormValidationState.js.map +0 -1
- package/react-aria/react-stately/numberfield/useNumberFieldState.js +0 -196
- package/react-aria/react-stately/numberfield/useNumberFieldState.js.map +0 -1
- package/react-aria/react-stately/utils/number.js +0 -56
- package/react-aria/react-stately/utils/number.js.map +0 -1
- package/react-aria/react-stately/utils/useControlledState.js +0 -68
- package/react-aria/react-stately/utils/useControlledState.js.map +0 -1
- package/react-aria/react-types/shared/locale.d.ts +0 -3
- package/types/colors.d.ts +0 -102
- package/types/colors.js +0 -64
- package/types/colors.js.map +0 -1
- package/types/fonts.d.ts +0 -12
- package/types/fonts.js +0 -10
- package/types/helpers.d.ts +0 -23
- package/types/products.d.ts +0 -40
- package/types/products.js +0 -38
- package/types/products.js.map +0 -1
- package/types/styles.d.ts +0 -283
- package/types/styles.js +0 -161
- package/types/styles.js.map +0 -1
- package/utils/filterComponents.d.ts +0 -12
- package/utils/filterComponents.js +0 -24
- package/utils/filterComponents.js.map +0 -1
- package/utils/getTextWidth.d.ts +0 -6
- package/utils/getTextWidth.js +0 -32
- package/utils/getTextWidth.js.map +0 -1
- package/utils/isComponent.d.ts +0 -12
- package/utils/isComponent.js +0 -15
- package/utils/isComponent.js.map +0 -1
- package/utils/partitionComponents.d.ts +0 -10
- package/utils/partitionComponents.js +0 -26
- package/utils/redsift-design-tokens.d.ts +0 -1389
- package/utils/redsift-design-tokens.js +0 -1391
- package/utils/useId.d.ts +0 -6
- package/utils/useId.js +0 -42
- package/utils/useId.js.map +0 -1
- package/utils/warnIfNoAccessibleLabelFound.d.ts +0 -11
- package/utils/warnIfNoAccessibleLabelFound.js +0 -20
- /package/{_virtual → _internal}/_rollupPluginBabelHelpers.js.map +0 -0
- /package/{types → _internal}/fonts.js.map +0 -0
- /package/{utils → _internal}/partitionComponents.js.map +0 -0
- /package/{utils → _internal}/redsift-design-tokens.js.map +0 -0
- /package/{hooks → _internal}/useIsLoaded.js.map +0 -0
- /package/{utils → _internal}/warnIfNoAccessibleLabelFound.js.map +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { D as DetailedCardCollapsibleSectionItemsProps } from './types9.js';
|
|
2
|
+
import { C as Comp } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardCollapsibleSectionItems Section component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardCollapsibleSectionItems: Comp<DetailedCardCollapsibleSectionItemsProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardCollapsibleSectionItems as D };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardCollapsibleSectionItems.js","sources":["../../src/components/detailed-card-collapsible-section-items/styles.ts","../../src/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { StyledDetailedCardCollapsibleSectionItemsProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledDetailedCardCollapsibleSectionItems = styled.div<StyledDetailedCardCollapsibleSectionItemsProps>`\n ${({ $hideBackground }) =>\n $hideBackground\n ? css`\n background: none;\n `\n : css`\n background-color: var(--redsift-color-neutral-x-light-grey);\n margin: 8px -16px;\n padding: 8px 16px;\n `}\n\n .redsift-detailed-card-collapsible-section-items__caption {\n color: var(--redsift-color-neutral-x-dark-grey);\n display: flex;\n font-family: var(--redsift-typography-font-family-poppins);\n font-size: 12px;\n font-weight: 300;\n justify-content: flex-end;\n line-height: 14px;\n margin: 8px 0px;\n padding-top: 8px;\n border-top: 1px solid var(--redsift-color-neutral-mid-grey);\n }\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\n\nimport { Comp } from '../../types';\nimport { DetailedCardCollapsibleSectionItemsProps } from './types';\nimport { StyledDetailedCardCollapsibleSectionItems } from './styles';\n\nconst COMPONENT_NAME = 'DetailedCardCollapsibleSectionItems';\nconst CLASSNAME = 'redsift-detailed-card-collapsible-section-items';\n\n/**\n * The DetailedCardCollapsibleSectionItems Section component.\n */\nexport const DetailedCardCollapsibleSectionItems: Comp<DetailedCardCollapsibleSectionItemsProps, HTMLDivElement> =\n forwardRef((props, ref) => {\n const { caption, children, className, hideBackground, ...forwardedProps } = props;\n\n return (\n <StyledDetailedCardCollapsibleSectionItems\n {...forwardedProps}\n className={classNames(DetailedCardCollapsibleSectionItems.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $hideBackground={hideBackground}\n >\n {children}\n {caption ? <div className={`${DetailedCardCollapsibleSectionItems.className}__caption`}>{caption}</div> : null}\n </StyledDetailedCardCollapsibleSectionItems>\n );\n });\nDetailedCardCollapsibleSectionItems.className = CLASSNAME;\nDetailedCardCollapsibleSectionItems.displayName = COMPONENT_NAME;\n"],"names":["StyledDetailedCardCollapsibleSectionItems","styled","div","_ref","$hideBackground","css","COMPONENT_NAME","CLASSNAME","DetailedCardCollapsibleSectionItems","forwardRef","props","ref","caption","children","className","hideBackground","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","_extends","classNames","displayName"],"mappings":";;;;;AAGA;AACA;AACA;AACO,MAAMA,yCAAyC,GAAGC,MAAM,CAACC,GAAoD,CAAA;AACpH,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,eAAAA;AAAgB,GAAC,GAAAD,IAAA,CAAA;EAAA,OACpBC,eAAe,GACXC,GAAI,CAAA;AACZ;AACA,QAAA,CAAS,GACDA,GAAI,CAAA;AACZ;AACA;AACA;AACA,QAAS,CAAA,CAAA;AAAA,CAAC,CAAA;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;ACvBD,MAAMC,cAAc,GAAG,qCAAqC,CAAA;AAC5D,MAAMC,SAAS,GAAG,iDAAiD,CAAA;;AAEnE;AACA;AACA;AACO,MAAMC,mCAAmG,gBAC9GC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACzB,MAAM;MAAEC,OAAO;MAAEC,QAAQ;MAAEC,SAAS;AAAEC,MAAAA,cAAAA;AAAkC,KAAC,GAAGL,KAAK;AAAxBM,IAAAA,cAAc,GAAAC,wBAAA,CAAKP,KAAK,EAAAQ,SAAA,CAAA,CAAA;EAEjF,oBACEC,cAAA,CAAAC,aAAA,CAACpB,yCAAyC,EAAAqB,QAAA,KACpCL,cAAc,EAAA;IAClBF,SAAS,EAAEQ,UAAU,CAACd,mCAAmC,CAACM,SAAS,EAAEA,SAAS,CAAE;AAChFH,IAAAA,GAAG,EAAEA,GAAiC;AACtCP,IAAAA,eAAe,EAAEW,cAAAA;AAAe,GAAA,CAAA,EAE/BF,QAAQ,EACRD,OAAO,gBAAGO,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKN,IAAAA,SAAS,EAAG,CAAA,EAAEN,mCAAmC,CAACM,SAAU,CAAA,SAAA,CAAA;AAAW,GAAA,EAAEF,OAAa,CAAC,GAAG,IACjE,CAAC,CAAA;AAEhD,CAAC,EAAC;AACJJ,mCAAmC,CAACM,SAAS,GAAGP,SAAS,CAAA;AACzDC,mCAAmC,CAACe,WAAW,GAAGjB,cAAc;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { D as DetailedCardHeaderProps } from './types10.js';
|
|
2
|
+
import { C as Comp } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardHeader component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardHeader: Comp<DetailedCardHeaderProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardHeader as D };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardHeader.js","sources":["../../src/components/detailed-card-header/styles.ts","../../src/components/detailed-card-header/DetailedCardHeader.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { StyledDetailedCardHeaderProps } from './types';\nimport { Theme } from '../../types';\n\n/**\n * Component style.\n */\nexport const StyledDetailedCardHeader = styled.div<StyledDetailedCardHeaderProps>`\n margin: 8px 0;\n\n .redsift-detailed-card-header__header {\n color: var(--redsift-color-neutral-${({ $theme }) => ($theme === Theme.light ? 'x-dark-grey' : 'white')});\n font-family: var(--redsift-typography-font-family-poppins);\n font-size: 32px;\n font-weight: 500;\n line-height: 32px;\n margin-bottom: 16px;\n }\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\n\nimport { Comp } from '../../types';\nimport { Heading } from '../heading';\nimport { Skeleton } from '../skeleton';\nimport { StyledDetailedCardHeader } from './styles';\nimport { DetailedCardHeaderProps } from './types';\nimport { useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'DetailedCardHeader';\nconst CLASSNAME = 'redsift-detailed-card-header';\n\n/**\n * The DetailedCardHeader component.\n */\nexport const DetailedCardHeader: Comp<DetailedCardHeaderProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, header, headingProps, isLoading, ...forwardedProps } = props;\n const theme = useTheme();\n\n return (\n <StyledDetailedCardHeader\n {...forwardedProps}\n className={classNames(DetailedCardHeader.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $theme={theme}\n >\n {header ? (\n <Skeleton.Text variant=\"h2\" isLoaded={!isLoading} height=\"32px\" marginBottom=\"16px\">\n <Heading as=\"h2\" className={`${DetailedCardHeader.className}__header`} variant=\"h2\" {...headingProps}>\n {header}\n </Heading>\n </Skeleton.Text>\n ) : null}\n\n {children}\n </StyledDetailedCardHeader>\n );\n});\nDetailedCardHeader.className = CLASSNAME;\nDetailedCardHeader.displayName = COMPONENT_NAME;\n"],"names":["StyledDetailedCardHeader","styled","div","_ref","$theme","Theme","light","COMPONENT_NAME","CLASSNAME","DetailedCardHeader","forwardRef","props","ref","children","className","header","headingProps","isLoading","forwardedProps","_objectWithoutProperties","_excluded","theme","useTheme","React","createElement","_extends","classNames","Skeleton","Text","variant","isLoaded","height","marginBottom","Heading","as","displayName"],"mappings":";;;;;;;;;AAIA;AACA;AACA;AACO,MAAMA,wBAAwB,GAAGC,MAAM,CAACC,GAAmC,CAAA;AAClF;AACA;AACA;AACA,uCAAA,EAAyCC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAD,IAAA,CAAA;EAAA,OAAMC,MAAM,KAAKC,KAAK,CAACC,KAAK,GAAG,aAAa,GAAG,OAAO,CAAA;AAAA,CAAE,CAAA;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;ACRD,MAAMC,cAAc,GAAG,oBAAoB,CAAA;AAC3C,MAAMC,SAAS,GAAG,8BAA8B,CAAA;;AAEhD;AACA;AACA;AACO,MAAMC,kBAAiE,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC1G,MAAM;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,MAAM;MAAEC,YAAY;AAAEC,MAAAA,SAAAA;AAA6B,KAAC,GAAGN,KAAK;AAAxBO,IAAAA,cAAc,GAAAC,wBAAA,CAAKR,KAAK,EAAAS,SAAA,CAAA,CAAA;AACzF,EAAA,MAAMC,KAAK,GAAGC,QAAQ,EAAE,CAAA;EAExB,oBACEC,cAAA,CAAAC,aAAA,CAACxB,wBAAwB,EAAAyB,QAAA,KACnBP,cAAc,EAAA;IAClBJ,SAAS,EAAEY,UAAU,CAACjB,kBAAkB,CAACK,SAAS,EAAEA,SAAS,CAAE;AAC/DF,IAAAA,GAAG,EAAEA,GAAiC;AACtCR,IAAAA,MAAM,EAAEiB,KAAAA;GAEPN,CAAAA,EAAAA,MAAM,gBACLQ,cAAA,CAAAC,aAAA,CAACG,QAAQ,CAACC,IAAI,EAAA;AAACC,IAAAA,OAAO,EAAC,IAAI;IAACC,QAAQ,EAAE,CAACb,SAAU;AAACc,IAAAA,MAAM,EAAC,MAAM;AAACC,IAAAA,YAAY,EAAC,MAAA;AAAM,GAAA,eACjFT,cAAA,CAAAC,aAAA,CAACS,OAAO,EAAAR,QAAA,CAAA;AAACS,IAAAA,EAAE,EAAC,IAAI;AAACpB,IAAAA,SAAS,EAAG,CAAA,EAAEL,kBAAkB,CAACK,SAAU,CAAU,QAAA,CAAA;AAACe,IAAAA,OAAO,EAAC,IAAA;GAASb,EAAAA,YAAY,GACjGD,MACM,CACI,CAAC,GACd,IAAI,EAEPF,QACuB,CAAC,CAAA;AAE/B,CAAC,EAAC;AACFJ,kBAAkB,CAACK,SAAS,GAAGN,SAAS,CAAA;AACxCC,kBAAkB,CAAC0B,WAAW,GAAG5B,cAAc;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { D as DetailedCardSectionProps } from './types11.js';
|
|
2
|
+
import { C as Comp } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardSection component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardSection: Comp<DetailedCardSectionProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardSection as D };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardSection.js","sources":["../../src/components/detailed-card-section/intl/index.ts","../../src/components/detailed-card-section/styles.ts","../../src/components/detailed-card-section/DetailedCardSection.tsx"],"sourcesContent":["import enUS from './en-US.json';\nimport frFR from './fr-FR.json';\n\nexport default {\n 'en-US': enUS,\n 'fr-FR': frFR,\n};\n","import styled, { css } from 'styled-components';\nimport { StyledDetailedCardSectionProps } from './types';\nimport { NotificationsColorPalette, ProductColorPalette } from '../../types';\n\n/**\n * Component style.\n */\nexport const StyledDetailedCardSection = styled.div<StyledDetailedCardSectionProps>`\n margin: 8px 0;\n\n .redsift-detailed-card-section__header {\n ${({ $color }) =>\n $color && Object.keys(NotificationsColorPalette).indexOf($color) !== -1\n ? css`\n border-bottom: 1px solid var(--redsift-color-notifications-${$color}-primary);\n `\n : $color && Object.keys(ProductColorPalette).indexOf($color) !== -1\n ? css`\n border-bottom: 1px solid var(--redsift-color-product-${$color});\n `\n : css`\n border-bottom: 1px solid ${$color || css`var(--redsift-color-neutral-mid-grey)`};\n `}\n margin-bottom: 8px;\n }\n\n .redsift-detailed-card-section-header__title {\n font-size: 18px;\n font-weight: 500;\n lineheight: 22px;\n padding: 6px 0px;\n }\n\n .redsift-detailed-card-section-header__collapse-button {\n color: var(--redsift-color-neutral-x-dark-grey);\n }\n\n .redsift-detailed-card-collapsible-section-items {\n visibility: ${({ $isCollapsed }) => (!$isCollapsed ? 'visible' : 'hidden')};\n overflow: ${({ $isCollapsed }) => (!$isCollapsed ? 'visible' : 'hidden')};\n height: ${({ $isCollapsed }) => (!$isCollapsed ? 'auto' : '0px')};\n ${({ $isCollapsed }) =>\n $isCollapsed\n ? css`\n margin: unset;\n padding: unset;\n `\n : ''};\n }\n`;\n","import React, { forwardRef, ReactNode, RefObject, useState } from 'react';\nimport classNames from 'classnames';\n\nimport { useMessageFormatter } from '../../react-aria/react-aria/i18n';\nimport intlMessages from './intl';\n\nimport { mdiChevronDown, mdiChevronUp } from '@redsift/icons';\nimport { Comp } from '../../types';\nimport { Flexbox } from '../flexbox';\nimport { IconButton } from '../icon-button';\nimport { DetailedCardSectionProps } from './types';\nimport { isComponent } from '../../utils/isComponent';\nimport { DetailedCardCollapsibleSectionItems } from '../detailed-card-collapsible-section-items';\nimport { StyledDetailedCardSection } from './styles';\nimport { Skeleton } from '../skeleton';\nimport { Text } from '../text';\nimport { Badge, BadgeVariant } from '../badge';\n\nconst COMPONENT_NAME = 'DetailedCardSection';\nconst CLASSNAME = 'redsift-detailed-card-section';\n\nconst hasCollapsibleChildren = (children: ReactNode): boolean => {\n let hasCollapsible = false;\n\n React.Children.map(children, (child) => {\n if (isComponent(DetailedCardCollapsibleSectionItems)(child)) {\n hasCollapsible = true;\n }\n });\n\n return hasCollapsible;\n};\n\n/**\n * The DetailedCardSection component.\n */\nexport const DetailedCardSection: Comp<DetailedCardSectionProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n badge,\n color,\n children,\n className,\n header,\n isCollapsed: propsIsCollapsed,\n isCollapsible: propsIsCollapsible = true,\n isLoading,\n ...forwardedProps\n } = props;\n\n const format = useMessageFormatter(intlMessages);\n\n const isCollapsible = propsIsCollapsible && hasCollapsibleChildren(children);\n\n const [isCollapsed, setIsCollapsed] = useState<boolean>(Boolean(propsIsCollapsed));\n\n return (\n <StyledDetailedCardSection\n {...forwardedProps}\n className={classNames(DetailedCardSection.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $color={color}\n $isCollapsed={isCollapsed}\n >\n <Flexbox justifyContent=\"space-between\" className={`${DetailedCardSection.className}__header`}>\n {header ? (\n <Skeleton.Text\n variant=\"body\"\n isLoaded={!isLoading}\n fontSize=\"18px\"\n lineHeight=\"22px\"\n marginTop=\"6px\"\n marginBottom=\"12px\"\n >\n <Flexbox alignItems=\"center\" gap=\"8px\">\n {typeof header === 'string' ? (\n <Text\n className={`${DetailedCardSection.className}-header__title`}\n color=\"black\"\n fontSize=\"18px\"\n lineHeight=\"22px\"\n >\n {header}\n </Text>\n ) : (\n <div className={`${DetailedCardSection.className}-header__title`}>{header}</div>\n )}\n {badge ? <Badge variant={BadgeVariant.standard} {...badge} /> : null}\n </Flexbox>\n </Skeleton.Text>\n ) : null}\n {isCollapsible && !isLoading ? (\n <IconButton\n marginLeft=\"auto\"\n aria-label={format(isCollapsed ? 'expand' : 'collapse')}\n className={`${DetailedCardSection.className}-header__collapse-button`}\n color=\"grey\"\n icon={isCollapsed ? mdiChevronDown : mdiChevronUp}\n onClick={() => {\n setIsCollapsed((isCollapsed) => !isCollapsed);\n }}\n />\n ) : null}\n </Flexbox>\n\n {children}\n </StyledDetailedCardSection>\n );\n});\nDetailedCardSection.className = CLASSNAME;\nDetailedCardSection.displayName = COMPONENT_NAME;\n"],"names":["enUS","frFR","StyledDetailedCardSection","styled","div","_ref","$color","Object","keys","NotificationsColorPalette","indexOf","css","ProductColorPalette","_ref2","$isCollapsed","_ref3","_ref4","_ref5","COMPONENT_NAME","CLASSNAME","hasCollapsibleChildren","children","hasCollapsible","React","Children","map","child","isComponent","DetailedCardCollapsibleSectionItems","DetailedCardSection","forwardRef","props","ref","badge","color","className","header","isCollapsed","propsIsCollapsed","isCollapsible","propsIsCollapsible","isLoading","forwardedProps","_objectWithoutProperties","_excluded","format","useMessageFormatter","intlMessages","setIsCollapsed","useState","Boolean","createElement","_extends","classNames","Flexbox","justifyContent","Skeleton","Text","variant","isLoaded","fontSize","lineHeight","marginTop","marginBottom","alignItems","gap","Badge","BadgeVariant","standard","IconButton","marginLeft","icon","mdiChevronDown","mdiChevronUp","onClick","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,mBAAe;AACb,EAAA,OAAO,EAAEA,IAAI;AACb,EAAA,OAAO,EAAEC,IAAAA;AACX,CAAC;;ACFD;AACA;AACA;AACO,MAAMC,yBAAyB,GAAGC,MAAM,CAACC,GAAoC,CAAA;AACpF;AACA;AACA;AACA,IAAA,EAAMC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OACXC,MAAM,IAAIC,MAAM,CAACC,IAAI,CAACC,yBAAyB,CAAC,CAACC,OAAO,CAACJ,MAAM,CAAC,KAAK,CAAC,CAAC,GACnEK,GAAI,CAAA;AACd,uEAAA,EAAyEL,MAAO,CAAA;AAChF,UAAA,CAAW,GACDA,MAAM,IAAIC,MAAM,CAACC,IAAI,CAACI,mBAAmB,CAAC,CAACF,OAAO,CAACJ,MAAM,CAA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,MAAM,CAACR,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAE;AACxDF,IAAAA,SAAS,EAAG,CAAA,EAAEN,mBAAmB,CAACM,SAAU,CAA0B,wBAAA,CAAA;AACtED,IAAAA,KAAK,EAAC,MAAM;AACZqC,IAAAA,IAAI,EAAElC,WAAW,GAAGmC,cAAc,GAAGC,YAAa;IAClDC,OAAO,EAAEA,MAAM;AACb1B,MAAAA,cAAc,CAAEX,WAAW,IAAK,CAACA,WAAW,CAAC,CAAA;AAC/C,KAAA;AAAE,GACH,CAAC,GACA,IACG,CAAC,EAEThB,QACwB,CAAC,CAAA;AAEhC,CAAC,EAAC;AACFQ,mBAAmB,CAACM,SAAS,GAAGhB,SAAS,CAAA;AACzCU,mBAAmB,CAAC8C,WAAW,GAAGzD,cAAc;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { D as DetailedCardSectionItemProps } from './types12.js';
|
|
2
|
+
import { C as Comp } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardSectionItems component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardSectionItem: Comp<DetailedCardSectionItemProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardSectionItem as D };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardSectionItem.js","sources":["../../src/components/detailed-card-section-item/styles.ts","../../src/components/detailed-card-section-item/DetailedCardSectionItem.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { StyledDetailedCardSectionItemProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledDetailedCardSectionItem = styled.div<StyledDetailedCardSectionItemProps>`\n padding: 8px 0;\n\n .redsift-detailed-card-section-item-header__shield {\n align-items: center;\n display: flex;\n height: 28px;\n justify-content: center;\n padding: 0 4px;\n }\n\n .redsift-detailed-card-section-item-header__icon {\n height: 28px;\n }\n\n .redsift-detailed-card-section-item-header__pill {\n display: inline-block;\n margin-right: 8px;\n }\n\n .redsift-detailed-card-section-item-header__description {\n line-height: 28px;\n display: inline-flex;\n align-items: center;\n }\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\n\nimport { Comp } from '../../types';\nimport { Flexbox } from '../flexbox';\nimport { Shield } from '../shield';\nimport { Icon } from '../icon';\nimport { Pill } from '../pill';\nimport { Text } from '../text';\nimport { DetailedCardSectionItemProps } from './types';\nimport { StyledDetailedCardSectionItem } from './styles';\nimport { Skeleton } from '../skeleton';\n\nconst COMPONENT_NAME = 'DetailedCardSectionItem';\nconst CLASSNAME = 'redsift-detailed-card-section-item';\n\n/**\n * The DetailedCardSectionItems component.\n */\nexport const DetailedCardSectionItem: Comp<DetailedCardSectionItemProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n children,\n className,\n description,\n descriptionProps,\n icon,\n iconProps,\n isLoading,\n pill,\n pillProps,\n shield,\n ...forwardedProps\n } = props;\n\n return (\n <StyledDetailedCardSectionItem\n {...forwardedProps}\n className={classNames(DetailedCardSectionItem.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n >\n <Flexbox alignItems=\"flex-start\" className={`${DetailedCardSectionItem.className}__header`}>\n {shield ? (\n <Skeleton isLoaded={!isLoading}>\n <Shield variant={shield} className={`${DetailedCardSectionItem.className}-header__shield`} />\n </Skeleton>\n ) : icon ? (\n <Skeleton isLoaded={!isLoading}>\n <div className={`${DetailedCardSectionItem.className}-header__icon`}>\n <Icon icon={icon} {...iconProps} size=\"large\" />\n </div>\n </Skeleton>\n ) : null}\n {description || pill ? (\n <div className={`${DetailedCardSectionItem.className}-header__description`}>\n <Skeleton isLoaded={!isLoading}>\n {pill && (\n <Pill className={`${DetailedCardSectionItem.className}-header__pill`} {...pillProps}>\n {pill}\n </Pill>\n )}\n {typeof description === 'string' ? <Text {...descriptionProps}>{description}</Text> : description}\n </Skeleton>\n </div>\n ) : null}\n </Flexbox>\n {children}\n </StyledDetailedCardSectionItem>\n );\n});\nDetailedCardSectionItem.className = CLASSNAME;\nDetailedCardSectionItem.displayName = COMPONENT_NAME;\n"],"names":["StyledDetailedCardSectionItem","styled","div","COMPONENT_NAME","CLASSNAME","DetailedCardSectionItem","forwardRef","props","ref","children","className","description","descriptionProps","icon","iconProps","isLoading","pill","pillProps","shield","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","_extends","classNames","Flexbox","alignItems","Skeleton","isLoaded","Shield","variant","Icon","size","Pill","Text","displayName"],"mappings":";;;;;;;;;;;AAGA;AACA;AACA;AACO,MAAMA,6BAA6B,GAAGC,MAAM,CAACC,GAAwC,CAAA;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AClBD,MAAMC,cAAc,GAAG,yBAAyB,CAAA;AAChD,MAAMC,SAAS,GAAG,oCAAoC,CAAA;;AAEtD;AACA;AACA;AACO,MAAMC,uBAA2E,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACpH,MAAM;MACJC,QAAQ;MACRC,SAAS;MACTC,WAAW;MACXC,gBAAgB;MAChBC,IAAI;MACJC,SAAS;MACTC,SAAS;MACTC,IAAI;MACJC,SAAS;AACTC,MAAAA,MAAAA;AAEF,KAAC,GAAGX,KAAK;AADJY,IAAAA,cAAc,GAAAC,wBAAA,CACfb,KAAK,EAAAc,SAAA,CAAA,CAAA;EAET,oBACEC,cAAA,CAAAC,aAAA,CAACvB,6BAA6B,EAAAwB,QAAA,KACxBL,cAAc,EAAA;IAClBT,SAAS,EAAEe,UAAU,CAACpB,uBAAuB,CAACK,SAAS,EAAEA,SAAS,CAAE;AACpEF,IAAAA,GAAG,EAAEA,GAAAA;AAAiC,GAAA,CAAA,eAEtCc,cAAA,CAAAC,aAAA,CAACG,OAAO,EAAA;AAACC,IAAAA,UAAU,EAAC,YAAY;AAACjB,IAAAA,SAAS,EA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,EAChFD,IACG,CACP,EACA,OAAOL,WAAW,KAAK,QAAQ,gBAAGW,cAAA,CAAAC,aAAA,CAACY,IAAI,EAAKvB,gBAAgB,EAAGD,WAAkB,CAAC,GAAGA,WAC9E,CACP,CAAC,GACJ,IACG,CAAC,EACTF,QAC4B,CAAC,CAAA;AAEpC,CAAC,EAAC;AACFJ,uBAAuB,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC7CC,uBAAuB,CAAC+B,WAAW,GAAGjC,cAAc;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { h as StylingProps, I as InternalSpacingProps, g as FlexLayoutProps, B as BorderProps } from './styles2.js';
|
|
3
|
+
import { T as Theme } from './colors.js';
|
|
4
|
+
import { C as Comp } from './helpers.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Component props.
|
|
8
|
+
*/
|
|
9
|
+
interface FlexboxProps extends ComponentProps<'div'>, StylingProps, InternalSpacingProps, FlexLayoutProps, BorderProps {
|
|
10
|
+
/** Used to use a different tag in lieu of a div. */
|
|
11
|
+
as?: any;
|
|
12
|
+
/** Whether the flexbox has internal divider or not. The number of pixels defining the gap between columns and rows is mandatory. This replaces the gap property. */
|
|
13
|
+
divider?: {
|
|
14
|
+
colGap: number;
|
|
15
|
+
rowGap: number;
|
|
16
|
+
};
|
|
17
|
+
/** Theme. */
|
|
18
|
+
theme?: Theme;
|
|
19
|
+
}
|
|
20
|
+
type StyledFlexboxProps = FlexboxProps & {
|
|
21
|
+
$divider: FlexboxProps['divider'];
|
|
22
|
+
$theme: FlexboxProps['theme'];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The Flexbox component.
|
|
27
|
+
*/
|
|
28
|
+
declare const Flexbox: Comp<FlexboxProps, HTMLDivElement>;
|
|
29
|
+
|
|
30
|
+
export { FlexboxProps as F, StyledFlexboxProps as S, Flexbox as a };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flexbox2.js","sources":["../../src/components/flexbox/styles.ts","../../src/components/flexbox/Flexbox.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseBorder, baseFlexbox, baseInternalSpacing, baseStyling } from '../shared';\nimport { StyledFlexboxProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledFlexbox = styled.div<StyledFlexboxProps>`\n display: ${({ inline }) => (inline ? 'inline-flex' : 'flex')};\n\n ${baseStyling}\n ${baseInternalSpacing}\n ${baseBorder}\n ${baseFlexbox}\n\n ${({ $divider }) =>\n $divider\n ? css`\n overflow: hidden;\n > *:not(:empty) {\n position: relative;\n\n ::before {\n content: '';\n position: absolute;\n background-color: var(--redsift-color-neutral-light-grey);\n inline-size: 1px;\n block-size: 100%;\n inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);\n }\n\n ::after {\n content: '';\n position: absolute;\n background-color: var(--redsift-color-neutral-light-grey);\n inline-size: 200vw;\n block-size: 1px;\n inset-inline-start: -100vw;\n inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);\n z-index: 0;\n }\n }\n `\n : ''}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { StyledFlexbox } from './styles';\nimport { FlexboxProps } from './types';\nimport { ThemeProvider, useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Flexbox';\nconst CLASSNAME = 'redsift-flex-box';\n\n/**\n * The Flexbox component.\n */\nexport const Flexbox: Comp<FlexboxProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { as, children, className, divider, gap = '16px', theme: propsTheme, ...forwardedProps } = props;\n\n const theme = useTheme(propsTheme);\n\n return (\n <ThemeProvider value={{ theme }}>\n <StyledFlexbox\n as={as}\n {...forwardedProps}\n gap={divider ? `${divider.rowGap}px ${divider.colGap}px` : gap}\n className={classNames(Flexbox.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $divider={divider}\n $theme={theme}\n >\n {children}\n </StyledFlexbox>\n </ThemeProvider>\n );\n});\nFlexbox.className = CLASSNAME;\nFlexbox.displayName = COMPONENT_NAME;\n"],"names":["StyledFlexbox","styled","div","_ref","inline","baseStyling","baseInternalSpacing","baseBorder","baseFlexbox","_ref2","$divider","css","Math","max","colGap","rowGap","COMPONENT_NAME","CLASSNAME","Flexbox","forwardRef","props","ref","as","children","className","divider","gap","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","createElement","ThemeProvider","value","_extends","classNames","$theme","displayName"],"mappings":";;;;;;;AAIA;AACA;AACA;AACO,MAAMA,aAAa,GAAGC,MAAM,CAACC,GAAwB,CAAA;AAC5D,WAAA,EAAaC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OAAMC,MAAM,GAAG,aAAa,GAAG,MAAM,CAAA;AAAA,CAAE,CAAA;AAC/D;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB,EAAA,EAAIC,mBAAoB,CAAA;AACxB,EAAA,EAAIC,UAAW,CAAA;AACf,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA,EAAA,EAAIC,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,QAAAA;AAAS,GAAC,GAAAD,KAAA,CAAA;EAAA,OACbC,QAAQ,GACJC,GAAI,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAyCC,EAAAA,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,QAAQ,CAACI,MAAM,GAAG,CAAC,CAAE,CAAA;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAwCF,EAAAA,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,QAAQ,CAACK,MAAM,GAAG,CAAC,CAAE,CAAA;AACzE;AACA;AACA;AACA,QAAA,CAAS,GACD,EAAE,CAAA;AAAA,CAA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1,32 @@
|
|
|
1
|
+
import { G as GridItemProps } from './types14.js';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { h as StylingProps, I as InternalSpacingProps, G as GridLayoutProps, B as BorderProps } from './styles2.js';
|
|
4
|
+
import { T as Theme } from './colors.js';
|
|
5
|
+
import { C as Comp } from './helpers.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Component props.
|
|
9
|
+
*/
|
|
10
|
+
interface GridProps extends ComponentProps<'div'>, StylingProps, InternalSpacingProps, GridLayoutProps, BorderProps {
|
|
11
|
+
/** Whether the grid has divider or not. The number of pixels defining the gap between columns and rows is mandatory. This replaces the grid gap property. */
|
|
12
|
+
divider?: {
|
|
13
|
+
colGap: number;
|
|
14
|
+
rowGap: number;
|
|
15
|
+
};
|
|
16
|
+
/** Theme. */
|
|
17
|
+
theme?: Theme;
|
|
18
|
+
}
|
|
19
|
+
type StyledGridProps = GridProps & {
|
|
20
|
+
$divider: GridProps['divider'];
|
|
21
|
+
$theme: GridProps['theme'];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The Grid component.
|
|
26
|
+
*/
|
|
27
|
+
declare const BaseGrid: Comp<GridProps, HTMLDivElement>;
|
|
28
|
+
declare const Grid: Comp<GridProps, HTMLDivElement> & {
|
|
29
|
+
Item: Comp<GridItemProps, HTMLDivElement>;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { BaseGrid as B, GridProps as G, StyledGridProps as S, Grid as a };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid2.js","sources":["../../src/components/grid/styles.ts","../../src/components/grid/Grid.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseBorder, baseGrid, baseInternalSpacing, baseStyling } from '../shared';\nimport { StyledGridProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledGrid = styled.div<StyledGridProps>`\n display: ${({ inline }) => (inline ? 'inline-grid' : 'grid')};\n flex: 1;\n\n ${baseStyling}\n ${baseInternalSpacing}\n ${baseGrid}\n ${baseBorder}\n\n ${({ $divider }) =>\n $divider\n ? css`\n overflow: hidden;\n > .redsift-grid-item:not(:empty) {\n position: relative;\n\n ::before {\n content: '';\n position: absolute;\n background-color: var(--redsift-color-neutral-light-grey);\n inline-size: 1px;\n block-size: 100%;\n inset-inline-start: calc(${Math.max(1, $divider.colGap / 2)}px * -1);\n }\n\n ::after {\n content: '';\n position: absolute;\n background-color: var(--redsift-color-neutral-light-grey);\n inline-size: 200vw;\n block-size: 1px;\n inset-inline-start: -100vw;\n inset-block-start: calc(${Math.max(1, $divider.rowGap / 2)}px * -1);\n z-index: 0;\n }\n }\n `\n : ''}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { StyledGrid } from './styles';\nimport { GridProps } from './types';\nimport { GridItem } from '../grid-item';\nimport { ThemeProvider, useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Grid';\nconst CLASSNAME = 'redsift-grid';\n\n/**\n * The Grid component.\n */\nexport const BaseGrid: Comp<GridProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, divider, gap, theme: propsTheme, ...forwardedProps } = props;\n const theme = useTheme(propsTheme);\n\n return (\n <ThemeProvider value={{ theme }}>\n <StyledGrid\n {...forwardedProps}\n gap={divider ? `${divider.rowGap}px ${divider.colGap}px` : gap}\n className={classNames(BaseGrid.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $divider={divider}\n $theme={theme}\n >\n {children}\n </StyledGrid>\n </ThemeProvider>\n );\n});\nBaseGrid.className = CLASSNAME;\nBaseGrid.displayName = COMPONENT_NAME;\n\nexport const Grid = Object.assign(BaseGrid, {\n Item: GridItem,\n});\n"],"names":["StyledGrid","styled","div","_ref","inline","baseStyling","baseInternalSpacing","baseGrid","baseBorder","_ref2","$divider","css","Math","max","colGap","rowGap","COMPONENT_NAME","CLASSNAME","BaseGrid","forwardRef","props","ref","children","className","divider","gap","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","createElement","ThemeProvider","value","_extends","classNames","$theme","displayName","Grid","Object","assign","Item","GridItem"],"mappings":";;;;;;;;AAIA;AACA;AACA;AACO,MAAMA,UAAU,GAAGC,MAAM,CAACC,GAAqB,CAAA;AACtD,WAAA,EAAaC,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAD,IAAA,CAAA;AAAA,EAAA,OAAMC,MAAM,GAAG,aAAa,GAAG,MAAM,CAAA;AAAA,CAAE,CAAA;AAC/D;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB,EAAA,EAAIC,mBAAoB,CAAA;AACxB,EAAA,EAAIC,QAAS,CAAA;AACb,EAAA,EAAIC,UAAW,CAAA;AACf;AACA,EAAA,EAAIC,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,QAAAA;AAAS,GAAC,GAAAD,KAAA,CAAA;EAAA,OACbC,QAAQ,GACJC,GAAI,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAyCC,EAAAA,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,QAAQ,CAACI,MAAM,GAAG,CAAC,CAAE,CAAA;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAwCF,EAAAA,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,QAAQ,CAACK,MAAM,GAAG,CAAC,CAAE,CAAA;AACzE;AACA;AACA;AACA,QAAA,CAAS,GACD,EAAE,CAAA;AAAA,CAAC,CAAA;AACX,CAAC;;;ACrCD,MAAMC,cAAc,GAAG,MAAM,CAAA;AAC7B,MAAMC,SAAS,GAAG,cAAc,CAAA;;AAEhC;AACA;AACA;AACO,MAAMC,QAAyC,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAClF,MAAM;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,OAAO;MAAEC,GAAG;AAAEC,MAAAA,KAAK,EAAEC,UAAAA;AAA8B,KAAC,GAAGP,KAAK;AAAxBQ,IAAAA,cAAc,GAAAC,wBAAA,CAAKT,KAAK,EAAAU,SAAA,CAAA,CAAA;AACzF,EAAA,MAAMJ,KAAK,GAAGK,QAAQ,CAACJ,UAAU,CAAC,CAAA;AAElC,EAAA,oBACEK,cAAA,CAAAC,aAAA,CAACC,aAAa,EAAA;AAACC,IAAAA,KAAK,EAAE;AAAET,MAAAA,KAAAA;AAAM,KAAA;GAC5BM,eAAAA,cAAA,CAAAC,aAAA,CAACjC,UAAU,EAAAoC,QAAA,KACLR,cAAc,EAAA;AAClBH,IAAAA,GAAG,EAAED,OAAO,GAAI,CAAA,EAAEA,OAAO,CAACT,MAAO,CAAA,GAAA,EAAKS,OAAO,CAACV,MAAO,CAAA,EAAA,CAAG,GAAGW,GAAI;IAC/DF,SAAS,EAAEc,UAAU,CAACnB,QAAQ,CAACK,SAAS,EAAEA,SAAS,CAAE;AACrDF,IAAAA,GAAG,EAAEA,GAAiC;AACtCX,IAAAA,QAAQ,EAAEc,OAAQ;AAClBc,IAAAA,MAAM,EAAEZ,KAAAA;GAEPJ,CAAAA,EAAAA,QACS,CACC,CAAC,CAAA;AAEpB,CAAC,EAAC;AACFJ,QAAQ,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC9BC,QAAQ,CAACqB,WAAW,GAAGvB,cAAc,CAAA;AAE9B,MAAMwB,IAAI,GAAGC,MAAM,CAACC,MAAM,CAACxB,QAAQ,EAAE;AAC1CyB,EAAAA,IAAI,EAAEC,QAAAA;AACR,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridItem.js","sources":["../../src/components/grid-item/styles.ts","../../src/components/grid-item/GridItem.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { baseBorder, baseInternalSpacing, baseStyling } from '../shared';\nimport { StyledGridItemProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledGridItem = styled.div<StyledGridItemProps>`\n display: inherit;\n\n ${baseStyling}\n ${baseInternalSpacing}\n ${baseBorder}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { StyledGridItem } from './styles';\nimport { GridItemProps } from './types';\n\nconst COMPONENT_NAME = 'GridItem';\nconst CLASSNAME = 'redsift-grid-item';\n\n/**\n * The GridItem component.\n */\nexport const GridItem: Comp<GridItemProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <StyledGridItem\n {...forwardedProps}\n className={classNames(GridItem.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n >\n {children}\n </StyledGridItem>\n );\n});\nGridItem.className = CLASSNAME;\nGridItem.displayName = COMPONENT_NAME;\n"],"names":["StyledGridItem","styled","div","baseStyling","baseInternalSpacing","baseBorder","COMPONENT_NAME","CLASSNAME","GridItem","forwardRef","props","ref","children","className","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","_extends","classNames","displayName"],"mappings":";;;;;;AAIA;AACA;AACA;AACO,MAAMA,cAAc,GAAGC,MAAM,CAACC,GAAyB,CAAA;AAC9D;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB,EAAA,EAAIC,mBAAoB,CAAA;AACxB,EAAA,EAAIC,UAAW,CAAA;AACf,CAAC;;;ACPD,MAAMC,cAAc,GAAG,UAAU,CAAA;AACjC,MAAMC,SAAS,GAAG,mBAAmB,CAAA;;AAErC;AACA;AACA;AACO,MAAMC,QAA6C,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACtF,MAAM;MAAEC,QAAQ;AAAEC,MAAAA,SAAAA;AAA6B,KAAC,GAAGH,KAAK;AAAxBI,IAAAA,cAAc,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;EAExD,oBACEC,cAAA,CAAAC,aAAA,CAAClB,cAAc,EAAAmB,QAAA,KACTL,cAAc,EAAA;IAClBD,SAAS,EAAEO,UAAU,CAACZ,QAAQ,CAACK,SAAS,EAAEA,SAAS,CAAE;AACrDF,IAAAA,GAAG,EAAEA,GAAAA;AAAiC,GAAA,CAAA,EAErCC,QACa,CAAC,CAAA;AAErB,CAAC,EAAC;AACFJ,QAAQ,CAACK,SAAS,GAAGN,SAAS,CAAA;AAC9BC,QAAQ,CAACa,WAAW,GAAGf,cAAc;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading2.js","sources":["../../src/components/heading/styles.ts","../../src/components/heading/Heading.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { StyledHeadingProps } from './types';\nimport { NotificationsColorPalette, NeutralColorPalette, ProductColorPalette } from '../../types';\n\n/**\n * Component style.\n */\nexport const StyledHeading = styled.span<StyledHeadingProps>`\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n\n ${baseStyling}\n\n ${({ $color, $theme }) =>\n $color && $color === 'radar'\n ? css`\n background: linear-gradient(90deg, #51b78e 0%, #0081c3 100%);\n background-clip: text;\n color: transparent;\n `\n : Object.keys(NotificationsColorPalette).indexOf($color!) !== -1\n ? css`\n color: var(--redsift-color-notifications-${$color}-primary);\n `\n : Object.keys(NeutralColorPalette).indexOf($color!) !== -1\n ? css`\n color: var(--redsift-color-neutral-${$color});\n `\n : Object.keys(ProductColorPalette).indexOf($color!) !== -1\n ? css`\n color: var(--redsift-color-product-${$color});\n `\n : css`\n color: ${$color || css`var(--redsift-color-${$theme}-components-text-primary)`};\n `}\n\n ${({ $variant, $fontFamily, $fontSize, $fontWeight, $lineHeight }) => css`\n font-family: ${$fontFamily\n ? css`var(--redsift-typography-font-family-${$fontFamily})`\n : css`var(--redsift-typography-${$variant ?? 'body'}-font-family)`};\n font-size: ${$fontSize ? $fontSize : css`var(--redsift-typography-${$variant ?? 'body'}-font-size)`};\n font-weight: ${$fontWeight ? $fontWeight : css`var(--redsift-typography-${$variant ?? 'body'}-font-weight)`};\n line-height: ${$lineHeight ? $lineHeight : css`var(--redsift-typography-${$variant ?? 'body'}-line-height)`};\n `}\n\n ${({ $noWrap }) =>\n $noWrap\n ? css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `\n : ''}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp, FontFamily } from '../../types';\nimport { StyledHeading } from './styles';\nimport { HeadingProps } from './types';\nimport { useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Heading';\nconst CLASSNAME = 'redsift-heading';\n\n/**\n * The Heading component.\n */\nexport const Heading: Comp<HeadingProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n as,\n children,\n className,\n color,\n fontFamily = FontFamily.poppins,\n fontSize,\n fontWeight,\n lineHeight,\n noWrap,\n theme: propsTheme,\n variant,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n return (\n <StyledHeading\n as={as}\n {...forwardedProps}\n className={classNames(Heading.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $noWrap={noWrap}\n $theme={theme}\n $color={color}\n $fontFamily={fontFamily}\n $fontSize={fontSize}\n $fontWeight={fontWeight}\n $lineHeight={lineHeight}\n $variant={variant ? variant : as === 'span' ? 'body' : as}\n >\n {children}\n </StyledHeading>\n );\n});\nHeading.className = CLASSNAME;\nHeading.displayName = COMPONENT_NAME;\n"],"names":["StyledHeading","styled","span","baseStyling","_ref","$color","$theme","css","Object","keys","NotificationsColorPalette","indexOf","NeutralColorPalette","ProductColorPalette","_ref2","$variant","$fontFamily","$fontSize","$fontWeight","$lineHeight","_ref3","$noWrap","COMPONENT_NAME","CLASSNAME","Heading","forwardRef","props","ref","as","children","className","color","fontFamily","FontFamily","poppins","fontSize","fontWeight","lineHeight","noWrap","theme","propsTheme","variant","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","create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UAAU,CAACC,OAAO;MAC/BC,QAAQ;MACRC,UAAU;MACVC,UAAU;MACVC,MAAM;AACNC,MAAAA,KAAK,EAAEC,UAAU;AACjBC,MAAAA,OAAAA;AAEF,KAAC,GAAGf,KAAK;AADJgB,IAAAA,cAAc,GAAAC,wBAAA,CACfjB,KAAK,EAAAkB,SAAA,CAAA,CAAA;AAET,EAAA,MAAML,KAAK,GAAGM,QAAQ,CAACL,UAAU,CAAC,CAAA;AAElC,EAAA,oBACEM,cAAA,CAAAC,aAAA,CAAC/C,aAAa,EAAAgD,QAAA,CAAA;AACZpB,IAAAA,EAAE,EAAEA,EAAAA;AAAG,GAAA,EACHc,cAAc,EAAA;IAClBZ,SAAS,EAAEmB,UAAU,CAACzB,OAAO,CAACM,SAAS,EAAEA,SAAS,CAAE;AACpDH,IAAAA,GAAG,EAAEA,GAAiC;AACtCN,IAAAA,OAAO,EAAEiB,MAAO;AAChBhC,IAAAA,MAAM,EAAEiC,KAAM;AACdlC,IAAAA,MAAM,EAAE0B,KAAM;AACdf,IAAAA,WAAW,EAAEgB,UAAW;AACxBf,IAAAA,SAAS,EAAEkB,QAAS;AACpBjB,IAAAA,WAAW,EAAEkB,UAAW;AACxBjB,IAAAA,WAAW,EAAEkB,UAAW;IACxBtB,QAAQ,EAAE0B,OAAO,GAAGA,OAAO,GAAGb,EAAE,KAAK,MAAM,GAAG,MAAM,GAAGA,EAAAA;AAAG,GAAA,CAAA,EAEzDC,QACY,CAAC,CAAA;AAEpB,CAAC,EAAC;AACFL,OAAO,CAACM,SAAS,GAAGP,SAAS,CAAA;AAC7BC,OAAO,CAAC0B,WAAW,GAAG5B,cAAc;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { I as IconSize, a as IconDimensions, b as IconProps } from './types17.js';
|
|
2
|
+
import { C as Comp } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
declare const sizeToDimension: (size: IconSize | IconDimensions) => IconDimensions;
|
|
5
|
+
/**
|
|
6
|
+
* The Icon component.
|
|
7
|
+
*/
|
|
8
|
+
declare const Icon: Comp<IconProps, HTMLSpanElement>;
|
|
9
|
+
|
|
10
|
+
export { Icon as I, sizeToDimension as s };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon2.js","sources":["../../src/components/icon/types.ts","../../src/components/icon/styles.ts","../../src/components/icon/Icon.tsx"],"sourcesContent":["import { ComponentProps, ReactElement } from 'react';\nimport {\n NotificationsColorPalette,\n LayoutProps,\n PositioningProps,\n SpacingProps,\n ValueOf,\n ProductColorPalette,\n Theme,\n} from '../../types';\n\n/**\n * Component size.\n */\nexport const IconSize = {\n xsmall: 'xsmall',\n small: 'small',\n medium: 'medium',\n large: 'large',\n xlarge: 'xlarge',\n xxlarge: 'xxlarge',\n} as const;\nexport type IconSize = ValueOf<typeof IconSize>;\n\nexport type IconDimensions = { width?: number; height?: number; fontSize?: number; lineHeight?: number };\n\n/**\n * Component props.\n */\nexport interface IconProps extends ComponentProps<'span'>, LayoutProps, SpacingProps, PositioningProps {\n /** Indicates whether the element is exposed to an accessibility API. */\n 'aria-hidden'?: boolean | 'false' | 'true';\n /** A screen reader only label for the Icon. */\n 'aria-label'?: string;\n /** Color variant. Either from color palette or hex or rgb strings. */\n color?: NotificationsColorPalette | ProductColorPalette | (string & {});\n /** Whether the icon has a badge attached to it. */\n badge?: ReactElement;\n /**\n * Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />\n * Can also be a ReactElement.\n */\n icon: string | string[] | ReactElement;\n /** Icon size. */\n size?: IconSize | IconDimensions;\n /** Additional properties to forward to the SVG tag. */\n svgProps?: ComponentProps<'svg'>;\n /** Theme. */\n theme?: Theme;\n}\n\nexport type StyledIconProps = Omit<IconProps, 'color' | 'size' | 'icon' | 'svgProps'> & {\n $color: IconProps['color'];\n $width: IconDimensions['width'];\n $height: IconDimensions['height'];\n $fontSize: IconDimensions['fontSize'];\n $lineHeight: IconDimensions['lineHeight'];\n $theme: IconProps['theme'];\n};\n","import styled, { css } from 'styled-components';\nimport { NotificationsColorPalette, ProductColorPalette, Theme } from '../../types';\nimport { baseStyling } from '../shared';\nimport { StyledIconProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledIcon = styled.span<StyledIconProps>`\n position: relative;\n display: inline-grid;\n ${baseStyling}\n\n font-style: normal;\n\n svg {\n vertical-align: -0.125em;\n grid-column: 1;\n grid-row: 1;\n }\n\n ${({ $color, $theme }) =>\n $color && Object.keys(NotificationsColorPalette).indexOf($color) !== -1\n ? css`\n color: var(--redsift-color-notifications-${$color}-primary);\n `\n : $color && Object.keys(ProductColorPalette).indexOf($color) !== -1\n ? css`\n color: var(--redsift-color-product-${$color});\n `\n : css`\n color: ${$color || css`var(--redsift-color-neutral-${$theme === Theme.dark ? 'white' : 'x-dark-grey'})`};\n `}\n\n ${({ $width, $height, $fontSize, $lineHeight }) => css`\n ${$width\n ? css`\n width: ${$width}px;\n `\n : ''}\n ${$height\n ? css`\n height: ${$height}px;\n `\n : ''}\n ${$fontSize\n ? css`\n font-size: ${$fontSize}px;\n `\n : ''}\n ${$lineHeight\n ? css`\n line-height: ${$lineHeight}px;\n `\n : ''}\n\n & .redsift-badge-standard {\n grid-column: 1;\n grid-row: 1;\n margin-right: unset;\n ${$width\n ? css`\n margin-left: ${$width * 0.75}px;\n `\n : ''}\n ${$height\n ? css`\n margin-top: ${$height * 0.1 - 4}px;\n `\n : ''}\n }\n\n & .redsift-badge-dot {\n grid-column: 1;\n grid-row: 1;\n margin-right: unset;\n ${$width\n ? css`\n margin-left: ${$width * 0.8}px;\n `\n : ''}\n ${$height\n ? css`\n margin-top: ${$height * 0.2 - 3}px;\n `\n : ''}\n }\n `}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { StyledIcon } from './styles';\nimport { IconDimensions, IconProps, IconSize } from './types';\nimport { useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'Icon';\nconst CLASSNAME = 'redsift-icon';\n\nexport const sizeToDimension = (size: IconSize | IconDimensions): IconDimensions => {\n if (typeof size !== 'string') {\n return size;\n }\n\n switch (size) {\n case IconSize.xsmall:\n return { width: 16, height: 16, fontSize: 16, lineHeight: 16 };\n case IconSize.small:\n return { width: 20, height: 20, fontSize: 20, lineHeight: 20 };\n case IconSize.medium:\n default:\n return { width: 24, height: 24, fontSize: 24, lineHeight: 24 };\n case IconSize.large:\n return { width: 30, height: 30, fontSize: 30, lineHeight: 30 };\n case IconSize.xlarge:\n return { width: 40, height: 40, fontSize: 40, lineHeight: 40 };\n case IconSize.xxlarge:\n return { width: 55, height: 55, fontSize: 55, lineHeight: 55 };\n }\n};\n\n/**\n * The Icon component.\n */\nexport const Icon: Comp<IconProps, HTMLSpanElement> = forwardRef((props, ref) => {\n const {\n 'aria-hidden': ariaHidden,\n 'aria-label': ariaLabel,\n badge,\n className,\n color,\n icon,\n size = IconSize.medium,\n svgProps,\n theme: propsTheme,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n const { width, height, fontSize, lineHeight } = sizeToDimension(size!);\n\n return (\n <StyledIcon\n {...forwardedProps}\n $color={color}\n $width={width}\n $height={height}\n $fontSize={fontSize}\n $lineHeight={lineHeight}\n $theme={theme}\n aria-hidden={ariaLabel ? (ariaHidden ? ariaHidden : undefined) : true}\n aria-label={ariaLabel}\n className={classNames(Icon.className, className, color ? 'colored' : undefined)}\n ref={ref as RefObject<HTMLSpanElement>}\n >\n {React.cloneElement(\n typeof icon === 'string' || (Array.isArray(icon) && icon.every((it) => typeof it === 'string')) ? (\n <svg viewBox=\"0 0 24 24\">\n {(Array.isArray(icon) ? icon : [icon]).map((path) => (\n <path key={path} d={path} fill=\"currentColor\" />\n ))}\n </svg>\n ) : React.isValidElement(icon) ? (\n icon\n ) : (\n <></>\n ),\n {\n 'aria-hidden': ariaLabel ? (ariaHidden ? ariaHidden : undefined) : true,\n 'aria-label': ariaLabel,\n focusable: 'false',\n height,\n preserveAspectRatio: 'xMidYMid meet',\n role: 'img',\n width,\n ...svgProps,\n }\n )}\n {badge ? badge : null}\n </StyledIcon>\n );\n});\nIcon.className = CLASSNAME;\nIcon.displayName = COMPONENT_NAME;\n"],"names":["IconSize","xsmall","small","medium","large","xlarge","xxlarge","StyledIcon","styled","span","baseStyling","_ref","$color","$theme","Object","keys","NotificationsColorPalette","indexOf","css","ProductColorPalette","Theme","dark","_ref2","$width","$height","$fontSize","$lineHeight","COMPONENT_NAME","CLASSNAME","sizeToDimension","size","width","height","fontSize","lineHeight","Icon","forwardRef","props","ref","ariaHidden","ariaLabel","badge","className","color","icon","svgProps","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","createElement","_extends","undefined","classNames","cloneElement","Array","isArray","every","it","viewBox","map","path","key","d","fill","isValidElement","Fragment","_objectSpread","focusable","preserveAspectRatio","role","displayName"],"mappings":";;;;;;;;AAWA;AACA;AACA;AACO,MAAMA,QAAQ,GAAG;AACtBC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,OAAO,EAAE,SAAA;AACX,EAAU;;AAKV;AACA;AACA;;ACvBA;AACA;AACA;AACO,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAsB,CAAA;AACvD;AACA;AACA,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;IAAEC,MAAM;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAF,IAAA,CAAA;AAAA,EAAA,OACnBC,MAAM,IAAIE,MAAM,CAACC,IAAI,CAACC,yBAAyB,CAAC,CAACC,OAAO,CAACL,MAAM,CAAC,KAAK,CAAC,CAAC,GACnEM,GAAI,CAAA;AACZ,mDAAA,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AAI,CACL,EAAAC,cAAA,CAAA;IAEC,aAAa,EAAE9B,SAAS,GAAID,UAAU,GAAGA,UAAU,GAAGgB,SAAS,GAAI,IAAI;AACvE,IAAA,YAAY,EAAEf,SAAS;AACvB+B,IAAAA,SAAS,EAAE,OAAO;IAClBvC,MAAM;AACNwC,IAAAA,mBAAmB,EAAE,eAAe;AACpCC,IAAAA,IAAI,EAAE,KAAK;AACX1C,IAAAA,KAAAA;GACGc,EAAAA,QAAQ,CAEf,CAAC,EACAJ,KAAK,GAAGA,KAAK,GAAG,IACP,CAAC,CAAA;AAEjB,CAAC,EAAC;AACFN,IAAI,CAACO,SAAS,GAAGd,SAAS,CAAA;AAC1BO,IAAI,CAACuC,WAAW,GAAG/C,cAAc;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { b as IconButtonProps } from './types16.js';
|
|
2
|
+
import { C as Comp } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Icon Button is a component that contains only one icon as a child, without text.
|
|
6
|
+
*
|
|
7
|
+
* This component should use aria-label, aria-labelledby or aria-describedby to make this
|
|
8
|
+
* component usable with a screen reader.
|
|
9
|
+
*/
|
|
10
|
+
declare const IconButton: Comp<IconButtonProps, HTMLButtonElement>;
|
|
11
|
+
|
|
12
|
+
export { IconButton as I };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../src/components/icon-button/IconButton.tsx"],"sourcesContent":["import React, { forwardRef, RefObject, useRef } from 'react';\nimport classNames from 'classnames';\nimport { ButtonsColorPalette, Comp } from '../../types';\nimport { Icon } from '../icon';\nimport { warnIfNoAccessibleLabelFound } from '../../utils/warnIfNoAccessibleLabelFound';\nimport { StyledIconButton } from './styles';\nimport { IconButtonProps, IconButtonVariant } 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 = 'IconButton';\nconst CLASSNAME = 'redsift-icon-button';\n\n/**\n * The Icon Button is a component that contains only one icon as a child, without text.\n *\n * This component should use aria-label, aria-labelledby or aria-describedby to make this\n * component usable with a screen reader.\n */\nexport const IconButton: Comp<IconButtonProps, HTMLButtonElement> = forwardRef((props, ref) => {\n const buttonRef = ref || useRef<HTMLButtonElement>();\n\n const {\n className,\n color: propsColor,\n disabled,\n icon,\n iconProps,\n isActive,\n isDisabled: propsIsDisabled,\n isHovered,\n isLoading,\n theme: propsTheme,\n variant: propsVariant,\n ...forwardedProps\n } = props;\n const isDisabled = props.isLoading || propsIsDisabled || disabled;\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const variant = Object.values(IconButtonVariant).includes(propsVariant!) ? propsVariant : 'unstyled';\n\n warnIfNoAccessibleLabelFound(props, undefined, 'IconButton');\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient && variant === IconButtonVariant.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 <StyledIconButton\n type=\"button\"\n {...forwardedProps}\n $color={color}\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(IconButton.className, className)}\n disabled={isDisabled}\n ref={buttonRef as RefObject<HTMLButtonElement>}\n >\n {isLoading ? (\n <Spinner size=\"small\" color={variant === IconButtonVariant.primary ? 'grey-l1' : 'grey-l2'} />\n ) : (\n <Icon {...iconProps} icon={icon} />\n )}\n </StyledIconButton>\n </ConditionalWrapper>\n );\n});\nIconButton.className = CLASSNAME;\nIconButton.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","IconButton","forwardRef","props","ref","buttonRef","useRef","className","color","propsColor","disabled","icon","iconProps","isActive","isDisabled","propsIsDisabled","isHovered","isLoading","theme","propsTheme","variant","propsVariant","forwardedProps","_objectWithoutProperties","_excluded","useTheme","Object","values","ButtonsColorPalette","includes","IconButtonVariant","warnIfNoAccessibleLabelFound","undefined","isGradient","radar","React","createElement","ConditionalWrapper","condition","secondary","wrapper","children","StyledGradientBorder","$color","$isActive","$isDisabled","$isHovered","$theme","StyledIconButton","_extends","type","$isGradient","$isLoading","$variant","classNames","Spinner","size","primary","Icon","displayName"],"mappings":";;;;;;;;;;;;;AAYA,MAAMA,cAAc,GAAG,YAAY,CAAA;AACnC,MAAMC,SAAS,GAAG,qBAAqB,CAAA;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,UAAoD,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;AAC7F,EAAA,MAAMC,SAAS,GAAGD,GAAG,IAAIE,MAAM,EAAqB,CAAA;EAEpD,MAAM;MACJC,SAAS;AACTC,MAAAA,KAAK,EAAEC,UAAU;MACjBC,QAAQ;MACRC,IAAI;MACJC,SAAS;MACTC,QAAQ;AACRC,MAAAA,UAAU,EAAEC,eAAe;MAC3BC,SAAS;MACTC,SAAS;AACTC,MAAAA,KAAK,EAAEC,UAAU;AACjBC,MAAAA,OAAO,EAAEC,YAAAA;AAEX,KAAC,GAAGlB,KAAK;AADJmB,IAAAA,cAAc,GAAAC,wBAAA,CACfpB,KAAK,EAAAqB,SAAA,CAAA,CAAA;EACT,MAAMV,UAAU,GAAGX,KAAK,CAACc,SAAS,IAAIF,eAAe,IAAIL,QAAQ,CAAA;AAEjE,EAAA,MAAMQ,KAAK,GAAGO,QAAQ,CAACN,UAAU,CAAC,CAAA;AAClC,EAAA,MAAMX,KAAK,GAAGkB,MAAM,CAACC,MAAM,CAACC,mBAAmB,CAAC,CAACC,QAAQ,CAACpB,UAAW,CAAC,GAAGA,U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AU,CAACM,SAAS,EAAEA,SAAS,CAAE;AACvDG,IAAAA,QAAQ,EAAEI,UAAW;AACrBV,IAAAA,GAAG,EAAEC,SAAAA;AAA0C,GAAA,CAAA,EAE9CY,SAAS,gBACRkB,cAAA,CAAAC,aAAA,CAACmB,OAAO,EAAA;AAACC,IAAAA,IAAI,EAAC,OAAO;IAAChD,KAAK,EAAEY,OAAO,KAAKU,iBAAiB,CAAC2B,OAAO,GAAG,SAAS,GAAG,SAAA;GAAY,CAAC,gBAE9FtB,cAAA,CAAAC,aAAA,CAACsB,IAAI,EAAAT,QAAA,CAAA,EAAA,EAAKrC,SAAS,EAAA;AAAED,IAAAA,IAAI,EAAEA,IAAAA;GAAO,CAAA,CAEpB,CACA,CAAC,CAAA;AAEzB,CAAC,EAAC;AACFV,UAAU,CAACM,SAAS,GAAGP,SAAS,CAAA;AAChCC,UAAU,CAAC0D,WAAW,GAAG5D,cAAc;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { b as IconButtonProps } from './types16.js';
|
|
2
|
+
import { L as LinkProps } from './types18.js';
|
|
3
|
+
import { C as Comp } from './helpers.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component props.
|
|
7
|
+
*/
|
|
8
|
+
interface IconButtonLinkProps extends Omit<LinkProps, 'color'>, Pick<IconButtonProps, 'icon' | 'iconProps' | 'color' | 'isActive' | 'isDisabled' | 'isHovered' | 'variant' | 'theme'> {
|
|
9
|
+
}
|
|
10
|
+
type StyledIconButtonLinkProps = Omit<IconButtonLinkProps, 'isActive' | 'isDisabled' | 'variant' | 'color' | 'size'> & {
|
|
11
|
+
$isActive: IconButtonLinkProps['isActive'];
|
|
12
|
+
$isDisabled: IconButtonLinkProps['isDisabled'];
|
|
13
|
+
$isHovered: IconButtonLinkProps['isHovered'];
|
|
14
|
+
$variant: IconButtonLinkProps['variant'];
|
|
15
|
+
$theme: IconButtonLinkProps['theme'];
|
|
16
|
+
$color: IconButtonLinkProps['color'];
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The IconButtonLink is a semantic link that looks like an icon button.
|
|
21
|
+
*
|
|
22
|
+
* For a semantic button that looks like an icon button, please use the IconButton component.
|
|
23
|
+
* For a semantic link that looks like a link, please use the Link component.
|
|
24
|
+
* For a semantic button that looks like a link, please use the LinkButton component.
|
|
25
|
+
*/
|
|
26
|
+
declare const IconButtonLink: Comp<IconButtonLinkProps, HTMLAnchorElement>;
|
|
27
|
+
|
|
28
|
+
export { IconButtonLinkProps as I, StyledIconButtonLinkProps as S, IconButtonLink as a };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButtonLink.js","sources":["../../src/components/icon-button-link/IconButtonLink.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp, ButtonsColorPalette } from '../../types';\nimport { Icon } from '../icon';\nimport { IconButtonLinkProps } from './types';\nimport { useTheme } from '../theme';\nimport { ConditionalWrapper } from '../conditional-wrapper';\nimport { StyledGradientBorder } from '../gradient-border';\nimport { StyledIconButton } from '../icon-button/styles';\nimport { IconButtonVariant } from '../icon-button/types';\n\nconst COMPONENT_NAME = 'IconButtonLink';\nconst CLASSNAME = 'redsift-icon-button-link';\n\n/**\n * The IconButtonLink is a semantic link that looks like an icon button.\n *\n * For a semantic button that looks like an icon button, please use the IconButton 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 IconButtonLink: Comp<IconButtonLinkProps, HTMLAnchorElement> = forwardRef((props, ref) => {\n const {\n as,\n className,\n color: propsColor,\n href,\n icon,\n iconProps,\n isActive,\n isDisabled,\n isHovered,\n target,\n theme: propsTheme,\n variant: propsVariant,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const variant = Object.values(IconButtonVariant).includes(propsVariant!) ? propsVariant : 'unstyled';\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient && variant === IconButtonVariant.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 <StyledIconButton\n as={(as || 'a') as any}\n role=\"link\"\n tabIndex={!isDisabled ? 0 : undefined}\n {...forwardedProps}\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isGradient={isGradient}\n $isHovered={isHovered}\n $theme={theme}\n $variant={variant}\n className={classNames(IconButtonLink.className, className)}\n href={!isDisabled ? href : undefined}\n ref={ref as RefObject<HTMLAnchorElement>}\n target={target}\n >\n <Icon {...iconProps} icon={icon} />\n </StyledIconButton>\n </ConditionalWrapper>\n );\n});\nIconButtonLink.className = CLASSNAME;\nIconButtonLink.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","IconButtonLink","forwardRef","props","ref","as","className","color","propsColor","href","icon","iconProps","isActive","isDisabled","isHovered","target","theme","propsTheme","variant","propsVariant","forwardedProps","_objectWithoutProperties","_excluded","useTheme","Object","values","ButtonsColorPalette","includes","IconButtonVariant","isGradient","radar","React","createElement","ConditionalWrapper","condition","secondary","wrapper","children","StyledGradientBorder","$color","$isActive","$isDisabled","$isHovered","$theme","StyledIconButton","_extends","role","tabIndex","undefined","$isGradient","$variant","classNames","Icon","displayName"],"mappings":";;;;;;;;;;;AAWA,MAAMA,cAAc,GAAG,gBAAgB,CAAA;AACvC,MAAMC,SAAS,GAAG,0BAA0B,CAAA;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAA4D,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACrG,MAAM;MACJC,EAAE;MACFC,SAAS;AACTC,MAAAA,KAAK,EAAEC,UAAU;MACjBC,IAAI;MACJC,I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,EAAE,CAAClC,UAAU,GAAG,CAAC,GAAGmC,SAAAA;AAAU,GAAA,EAClC5B,cAAc,EAAA;AAClBmB,IAAAA,MAAM,EAAEhC,KAAM;AACdiC,IAAAA,SAAS,EAAE5B,QAAS;AACpB6B,IAAAA,WAAW,EAAE5B,UAAW;AACxBoC,IAAAA,WAAW,EAAEpB,UAAW;AACxBa,IAAAA,UAAU,EAAE5B,SAAU;AACtB6B,IAAAA,MAAM,EAAE3B,KAAM;AACdkC,IAAAA,QAAQ,EAAEhC,OAAQ;IAClBZ,SAAS,EAAE6C,UAAU,CAAClD,cAAc,CAACK,SAAS,EAAEA,SAAS,CAAE;AAC3DG,IAAAA,IAAI,EAAE,CAACI,UAAU,GAAGJ,IAAI,GAAGuC,SAAU;AACrC5C,IAAAA,GAAG,EAAEA,GAAoC;AACzCW,IAAAA,MAAM,EAAEA,MAAAA;GAERgB,CAAAA,eAAAA,cAAA,CAAAC,aAAA,CAACoB,IAAI,EAAAP,QAAA,KAAKlC,SAAS,EAAA;AAAED,IAAAA,IAAI,EAAEA,IAAAA;GAAO,CAAA,CAClB,CACA,CAAC,CAAA;AAEzB,CAAC,EAAC;AACFT,cAAc,CAACK,SAAS,GAAGN,SAAS,CAAA;AACpCC,cAAc,CAACoD,WAAW,GAAGtD,cAAc;;;;"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as styled_components from 'styled-components';
|
|
2
|
+
import { B as ButtonsColorPalette, T as Theme } from './colors.js';
|
|
3
|
+
import { ComponentProps, MouseEvent } from 'react';
|
|
4
|
+
import { d as ListboxContextProps } from './types19.js';
|
|
5
|
+
import { C as ContainerProps } from './styles2.js';
|
|
6
|
+
import { C as Comp } from './helpers.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Component color.
|
|
10
|
+
*/
|
|
11
|
+
type ItemColor = ButtonsColorPalette;
|
|
12
|
+
/**
|
|
13
|
+
* Component props.
|
|
14
|
+
*/
|
|
15
|
+
interface ItemProps extends Omit<ComponentProps<any>, 'onClick'>, ContainerProps {
|
|
16
|
+
/** Border radius, only if hasBorder is true. */
|
|
17
|
+
borderRadius?: string;
|
|
18
|
+
/** Color variant. */
|
|
19
|
+
color?: ItemColor;
|
|
20
|
+
/**
|
|
21
|
+
* Default select status.
|
|
22
|
+
* Used for uncontrolled version.
|
|
23
|
+
*/
|
|
24
|
+
defaultSelected?: boolean;
|
|
25
|
+
/** Whether the component is active or not. */
|
|
26
|
+
isActive?: boolean;
|
|
27
|
+
/** Whether the component is disabled or not. */
|
|
28
|
+
isDisabled?: boolean;
|
|
29
|
+
/** Whether the component is focused or not. */
|
|
30
|
+
isFocused?: boolean;
|
|
31
|
+
/** Whether the component is hovered or not. */
|
|
32
|
+
isHovered?: boolean;
|
|
33
|
+
/** Whether the Item has borders or not. */
|
|
34
|
+
hasBorder?: boolean;
|
|
35
|
+
/** Whether the Item is selectable within a group of multiple selectable Items. */
|
|
36
|
+
hasCheckbox?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the component is selected or not.
|
|
39
|
+
* Used for controlled version.
|
|
40
|
+
*/
|
|
41
|
+
isSelected?: boolean;
|
|
42
|
+
/** Method to handle component change. */
|
|
43
|
+
onClick?: (isSelected: boolean, value?: string, event?: MouseEvent<HTMLElement>, state?: ListboxContextProps) => void | ComponentProps<'div'>['onClick'];
|
|
44
|
+
/** Theme. */
|
|
45
|
+
theme?: Theme;
|
|
46
|
+
/** Value. */
|
|
47
|
+
value?: string;
|
|
48
|
+
}
|
|
49
|
+
type StyledItemProps = Omit<ItemProps, 'color' | 'onClick' | 'value'> & {
|
|
50
|
+
$borderRadius: ItemProps['borderRadius'];
|
|
51
|
+
$color: ItemProps['color'];
|
|
52
|
+
$hasBorder: ItemProps['hasBorder'];
|
|
53
|
+
$hasCheckbox: ItemProps['hasCheckbox'];
|
|
54
|
+
$isActive: ItemProps['isActive'];
|
|
55
|
+
$isDisabled: ItemProps['isDisabled'];
|
|
56
|
+
$isGradient: boolean;
|
|
57
|
+
$isHovered: ItemProps['isHovered'];
|
|
58
|
+
$theme: ItemProps['theme'];
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Component style.
|
|
63
|
+
*/
|
|
64
|
+
declare const StyledItem: styled_components.StyledComponent<"div", any, Omit<ItemProps, "color" | "onClick" | "value"> & {
|
|
65
|
+
$borderRadius: string | undefined;
|
|
66
|
+
$color: string | undefined;
|
|
67
|
+
$hasBorder: boolean | undefined;
|
|
68
|
+
$hasCheckbox: boolean | undefined;
|
|
69
|
+
$isActive: boolean | undefined;
|
|
70
|
+
$isDisabled: boolean | undefined;
|
|
71
|
+
$isGradient: boolean;
|
|
72
|
+
$isHovered: boolean | undefined;
|
|
73
|
+
$theme: Theme | undefined;
|
|
74
|
+
}, never>;
|
|
75
|
+
|
|
76
|
+
declare const RenderedListboxItem: Comp<Omit<ItemProps, 'value'> & Required<Pick<ItemProps, 'value'>>, HTMLElement>;
|
|
77
|
+
/**
|
|
78
|
+
* The Item component.
|
|
79
|
+
*/
|
|
80
|
+
declare const Item: Comp<ItemProps, HTMLElement>;
|
|
81
|
+
|
|
82
|
+
export { ItemColor as I, RenderedListboxItem as R, StyledItemProps as S, ItemProps as a, StyledItem as b, Item as c };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item2.js","sources":["../../src/components/item/styles.ts","../../src/components/item/useMenuItem.ts","../../src/components/item/Item.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseContainer } from '../shared';\nimport { StyledItemProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledItem = styled.div<StyledItemProps>`\n min-height: 36px;\n position: relative;\n width: 100%;\n padding: 8px 16px;\n\n ${baseContainer}\n\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n display: inline-flex;\n\n > a {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n color: inherit;\n }\n\n ${({ $color, $isActive, $isDisabled, $isGradient, $isHovered, $hasBorder, $theme }) => css`\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-background-${$isActive ? 'active' : $isHovered || $isDisabled ? 'hover' : 'default'}\n );\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-background-${$isActive ? 'active' : $isHovered || $isDisabled ? 'hover' : 'default'}\n );\n `}\n\n ${$hasBorder\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled ? 'grey' : $color}-text-${$isActive ? 'active' : $isHovered || $isDisabled ? 'hover' : 'default'}\n );\n `\n : ''}\n `}\n\n &:hover {\n outline: none;\n\n ${({ $color, $isDisabled, $isGradient, $hasBorder, $theme }) => css`\n cursor: ${$isDisabled ? 'default' : 'pointer'};\n\n ${!$isDisabled\n ? css`\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-background-hover\n );\n\n ${$hasBorder\n ? css`\n border: 1px solid\n var(--redsift-color-${$theme}-components-buttons-secondary-button-${$color}-text-hover);\n `\n : ''}\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$color}-background-hover\n );\n `}\n `\n : ''}\n `};\n }\n\n &:active {\n outline: none;\n\n ${({ $color, $hasBorder, $isHovered, $isDisabled, $isGradient, $theme }) => css`\n ${!$isDisabled\n ? css`\n ${!$isGradient\n ? css`\n background-color: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled\n ? 'grey'\n : $color}-background-${$isHovered ? 'hover' : 'active'}\n );\n\n ${$hasBorder\n ? css`\n border: 1px solid\n var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled\n ? 'grey'\n : $color}-text-${$isHovered ? 'hover' : 'active'}\n );\n `\n : ''}\n `\n : css`\n background: var(\n --redsift-color-${$theme}-components-buttons-secondary-button-${$isDisabled\n ? 'grey'\n : $color}-background-${$isHovered ? 'hover' : 'active'}\n );\n `}\n `\n : ''}\n `};\n }\n`;\n","import { useCallback, useEffect, RefObject, KeyboardEvent } from 'react';\nimport { UseFocusWithinGroupProps, useFocusOnListItem } from '../focus-within-group';\n\nexport function useMenuItem(props: {\n domElementRef: RefObject<Element>;\n id: string;\n isDisabled?: boolean;\n onClick?: () => void;\n isLinkMenuItem?: boolean;\n linkRef?: RefObject<HTMLAnchorElement>;\n}): UseFocusWithinGroupProps & {\n isDisabled?: boolean;\n} {\n const { domElementRef, id, isDisabled, onClick, isLinkMenuItem, linkRef } = props;\n\n const {\n tabIndex,\n isFocused,\n handleKeyDown: handleFocusKeyDown,\n handleClick: handleFocusClick,\n } = useFocusOnListItem({ domElementRef, isDisabled: isDisabled!, id });\n\n const handleKeyDown = useCallback((event: KeyboardEvent) => {\n const code = event.code;\n if (code === 'Enter' || code === 'Space') {\n if (isLinkMenuItem) {\n linkRef?.current?.click();\n } else {\n onClick?.();\n }\n }\n handleFocusKeyDown(event);\n }, []);\n\n const handleClick = useCallback(() => {\n handleFocusClick();\n onClick?.();\n }, []);\n\n useEffect(() => {\n if (isFocused && domElementRef.current) {\n (domElementRef as RefObject<SVGElement | HTMLElement>).current?.focus();\n }\n }, [isFocused]);\n\n return {\n tabIndex,\n isFocused,\n isDisabled,\n handleKeyDown,\n handleClick,\n };\n}\n","import React, { forwardRef, RefObject, useContext, useRef } from 'react';\nimport classNames from 'classnames';\nimport { ButtonsColorPalette, Comp } from '../../types';\nimport { ItemProps } from './types';\nimport { StyledItem } from './styles';\nimport { useListboxItem } from '../listbox/useListboxItem';\nimport { FocusWithinGroupContext } from '../focus-within-group';\nimport { useMenuItem } from './useMenuItem';\nimport { isComponent, useId } from '../../utils';\nimport { useTheme } from '../theme';\nimport { Flexbox } from '../flexbox';\nimport { Icon } from '../icon';\nimport { Text } from '../text';\nimport { mdiCheckboxBlankOutline, mdiCheckboxMarked } from '@redsift/icons';\nimport { ConditionalWrapper } from '../conditional-wrapper';\nimport { StyledGradientBorder } from '../gradient-border';\n\nconst COMPONENT_NAME = 'Item';\nconst CLASSNAME = 'redsift-item';\n\nexport const RenderedListboxItem: Comp<Omit<ItemProps, 'value'> & Required<Pick<ItemProps, 'value'>>, HTMLElement> =\n forwardRef((props, ref) => {\n const {\n borderRadius = '0',\n children,\n className,\n color: propsColor,\n defaultSelected,\n id: propsId,\n isActive,\n isDisabled: propsIsDisabled,\n isHovered,\n isSelected: propsIsSelected,\n hasBorder,\n hasCheckbox,\n theme: propsTheme,\n value,\n ...forwardedProps\n } = props;\n const id = propsId ?? value;\n const _ref = useRef<HTMLElement>();\n const divRef = ref ?? _ref;\n\n const { tabIndex, isFocused, isSelected, isDisabled, handleKeyDown, handleClick } = useListboxItem({\n domElementRef: divRef as RefObject<Element>,\n value,\n id,\n isDisabled: propsIsDisabled!,\n propsIsSelected: propsIsSelected ?? defaultSelected,\n });\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient}\n wrapper={(children) => (\n <StyledGradientBorder\n $borderRadius={borderRadius}\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isHovered={isHovered}\n $theme={theme}\n width=\"auto\"\n >\n {children}\n </StyledGradientBorder>\n )}\n >\n <StyledItem\n role=\"option\"\n {...forwardedProps}\n id={id}\n $borderRadius={borderRadius}\n $color={color}\n $hasBorder={hasBorder}\n $hasCheckbox={hasCheckbox}\n $isActive={isActive || isSelected}\n $isDisabled={isDisabled}\n $isGradient={isGradient}\n $isHovered={isHovered || isFocused}\n $theme={theme}\n aria-selected={isSelected}\n aria-disabled={isDisabled}\n className={classNames(Item.className, className)}\n onClick={isDisabled ? undefined : handleClick}\n ref={divRef as RefObject<HTMLElement>}\n onKeyDown={handleKeyDown}\n tabIndex={tabIndex}\n >\n {hasCheckbox ? (\n <Flexbox>\n {isSelected ? (\n <Icon color={isDisabled ? 'grey' : color} icon={mdiCheckboxMarked} />\n ) : (\n <Icon color=\"question\" icon={mdiCheckboxBlankOutline} />\n )}\n {children ? children : <Text>{value}</Text>}\n </Flexbox>\n ) : (\n children ?? value\n )}\n </StyledItem>\n </ConditionalWrapper>\n );\n });\n\nconst RenderedMenuItem: Comp<Omit<ItemProps, 'value'>, HTMLElement> = forwardRef((props, ref) => {\n const {\n borderRadius = '0',\n children,\n className,\n color: propsColor,\n hasBorder,\n id: propsId,\n isActive,\n isDisabled: propsIsDisabled,\n isHovered,\n theme: propsTheme,\n onClick,\n ...forwardedProps\n } = props;\n const [_id] = useId();\n const id = propsId ?? _id;\n const _ref = useRef<HTMLElement>();\n const divRef = ref ?? _ref;\n const linkRef = useRef<HTMLAnchorElement>(null);\n\n const isLinkMenuItem = isComponent('Link')(children);\n const { tabIndex, isFocused, isDisabled, handleKeyDown, handleClick } = useMenuItem({\n domElementRef: divRef as RefObject<Element>,\n id,\n isDisabled: propsIsDisabled!,\n onClick: onClick as any,\n isLinkMenuItem,\n linkRef,\n });\n\n const theme = useTheme(propsTheme);\n const color = Object.values(ButtonsColorPalette).includes(propsColor!) ? propsColor : 'primary';\n const isGradient = color === ButtonsColorPalette.radar;\n\n return (\n <ConditionalWrapper\n condition={isGradient}\n wrapper={(children) => (\n <StyledGradientBorder\n $borderRadius={borderRadius}\n $color={color}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isHovered={isHovered}\n $theme={theme}\n width=\"auto\"\n >\n {children}\n </StyledGradientBorder>\n )}\n >\n <StyledItem\n as=\"li\"\n role={isLinkMenuItem ? 'none' : 'menuitem'}\n {...forwardedProps}\n id={id}\n $borderRadius={borderRadius}\n $color={color}\n $hasBorder={hasBorder}\n $hasCheckbox={false}\n $isActive={isActive}\n $isDisabled={isDisabled}\n $isGradient={isGradient}\n $isHovered={isHovered || isFocused}\n $theme={theme}\n aria-disabled={isDisabled}\n className={classNames(Item.className, className)}\n onClick={isDisabled ? undefined : handleClick}\n ref={divRef}\n onKeyDown={handleKeyDown}\n tabIndex={tabIndex}\n >\n {isLinkMenuItem\n ? React.cloneElement(children, {\n role: 'menuitem',\n ref: linkRef,\n })\n : children}\n </StyledItem>\n </ConditionalWrapper>\n );\n});\n\n/**\n * The Item component.\n */\nexport const Item: Comp<ItemProps, HTMLElement> = forwardRef((props, ref) => {\n const { value } = props;\n const focusContext = useContext(FocusWithinGroupContext);\n const isListbox = focusContext.state.listRole === 'listbox';\n\n if (!focusContext.state.filter) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n }\n\n const { value: filterValue, type, caseSensitive } = focusContext.state.filter;\n\n if (!filterValue) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n } else if (\n caseSensitive &&\n ((type === 'startsWith' && value!.startsWith(filterValue)) ||\n (type === 'contains' && value!.includes(filterValue)) ||\n (type === 'endsWith' && value!.endsWith(filterValue)))\n ) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n } else if (\n !caseSensitive &&\n ((type === 'startsWith' && value!.toLowerCase().startsWith(filterValue.toLowerCase())) ||\n (type === 'contains' && value!.toLowerCase().includes(filterValue.toLowerCase())) ||\n (type === 'endsWith' && value!.toLowerCase().endsWith(filterValue.toLowerCase())))\n ) {\n return isListbox ? (\n <RenderedListboxItem {...props} value={props.value!} ref={ref} />\n ) : (\n <RenderedMenuItem {...props} ref={ref} />\n );\n }\n\n return null;\n});\nItem.className = CLASSNAME;\nItem.displayName = COMPONENT_NAME;\n"],"names":["StyledItem","styled","div","baseContainer","_ref","$color","$isActive","$isDisabled","$isGradient","$isHovered","$hasBorder","$theme","css","_ref2","_ref3","useMenuItem","props","domElementRef","id","isDisabled","onClick","isLinkMenuItem","linkRef","tabIndex","isFocused","handleKeyDown","handleFocusKeyDown","handleClick","handleFocusClick","useFocusOnListItem","useCallback","event","code","_linkRef$current","current","click","useEffect","_current","focus","COMPONENT_NAME","CLASSNAME","RenderedListboxItem","forwardRef","ref","borderRadius","children","className","color","propsColor","defaultSelected","propsId","isActive","propsIsDisabled","isHovered","isSelected","propsIsSelected","hasBorder","hasCheckbox","theme","propsTheme","value","forwardedProps","_objectWithoutProperties","_excluded","useRef","divRef","useListboxItem","useTheme","Object","values","ButtonsColorPalette","includes","isGradient","radar","React","createElement","ConditionalWrapper","condition","wrapper","StyledGradientBorder","$borderRadius","width","_extends","role","$hasCheckbox","classNames","Item","undefined","onKeyDown","Flexbox","Icon","icon","mdiCheckboxMarked","mdiCheckboxBlankOutline","Text","RenderedMenuItem","_excluded2","_id","useId","isComponent","as","cloneElement","focusContext","useContext","FocusWithinGroupContext","isListbox","state","listRole","filter","filterValue","type","caseSensitive","startsWith","endsWith","toLowerCase","displayName"],"mappings":";;;;;;;;;;;;;;;;;;AAIA;AACA;AACA;AACaA,MAAAA,UAAU,GAAGC,MAAM,CAACC,GAAqB,CAAA;AACtD;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,aAAc,CAAA;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIC,IAAA,IAAA;EAAA,IAAC;IAAEC,MAAM;IAAEC,SAAS;IAAEC,WAAW;IAAEC,WAAW;IAAEC,UAAU;IAAEC,UAAU;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAP,IAAA,CAAA;AAAA,EAAA,OAAKQ,GAAI,CAAA;AAC7F,IAAM,EAAA,CAACJ,WAAW,GACVI,GAAI,CAAA;AACZ;AACA,4BAAA,EAA8BD,MAAO,CAAuCJ,qCAAAA,EAAAA,WAAW,GAAG,MAAM,GAAGF,MAAO,CAAcC,YAAAA,EAAAA,SAAS,GAAG,QAAQ,GAAGG,UAAU,IAAIF,WA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AAM,CAAA,CAAC,gBAEjE+B,cAAA,CAAAC,aAAA,CAACoB,gBAAgB,EAAAb,QAAA,CAAA,EAAA,EAAKlE,KAAK,EAAA;AAAE2B,MAAAA,GAAG,EAAEA,GAAAA;AAAI,KAAA,CAAE,CACzC,CAAA;AACH,GAAC,MAAM,IACL,CAACoE,aAAa,KACZD,IAAI,KAAK,YAAY,IAAIlD,KAAK,CAAEsD,WAAW,EAAE,CAACF,UAAU,CAACH,WAAW,CAACK,WAAW,EAAE,CAAC,IAClFJ,IAAI,KAAK,UAAU,IAAIlD,KAAK,CAAEsD,WAAW,EAAE,CAAC3C,QAAQ,CAACsC,WAAW,CAACK,WAAW,EAAE,CAAE,IAChFJ,IAAI,KAAK,UAAU,IAAIlD,KAAK,CAAEsD,WAAW,EAAE,CAACD,QAAQ,CAACJ,WAAW,CAACK,WAAW,EAAE,CAAE,CAAC,EACpF;IACA,OAAOT,SAAS,gBACd/B,cAAA,CAAAC,aAAA,CAAClC,mBAAmB,EAAAyC,QAAA,CAAA,EAAA,EAAKlE,KAAK,EAAA;MAAE4C,KAAK,EAAE5C,KAAK,CAAC4C,KAAO;AAACjB,MAAAA,GAAG,EAAEA,GAAAA;KAAM,CAAA,CAAC,gBAEjE+B,cAAA,CAAAC,aAAA,CAACoB,gBAAgB,EAAAb,QAAA,CAAA,EAAA,EAAKlE,KAAK,EAAA;AAAE2B,MAAAA,GAAG,EAAEA,GAAAA;AAAI,KAAA,CAAE,CACzC,CAAA;AACH,GAAA;AAEA,EAAA,OAAO,IAAI,CAAA;AACb,CAAC,EAAC;AACF2C,IAAI,CAACxC,SAAS,GAAGN,SAAS,CAAA;AAC1B8C,IAAI,CAAC6B,WAAW,GAAG5E,cAAc;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as styled_components from 'styled-components';
|
|
2
|
+
import { L as LinkProps } from './types18.js';
|
|
3
|
+
import { N as NotificationsColorPalette, d as NeutralColorPalette, T as Theme } from './colors.js';
|
|
4
|
+
import { C as Comp } from './helpers.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Component style.
|
|
8
|
+
*/
|
|
9
|
+
declare const StyledLink: styled_components.StyledComponent<"a", any, Omit<LinkProps, "isDisabled"> & {
|
|
10
|
+
$isDisabled: boolean | undefined;
|
|
11
|
+
$color: (string & {}) | "radar" | NotificationsColorPalette | NeutralColorPalette | undefined;
|
|
12
|
+
$theme: Theme | undefined;
|
|
13
|
+
$hasIcons: boolean;
|
|
14
|
+
}, never>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The Link is a semantic link that looks like a link.
|
|
18
|
+
* Shoud be used for internal and external navigation only.
|
|
19
|
+
*
|
|
20
|
+
* For a semantic link that looks like a button, please use the ButtonLink component.
|
|
21
|
+
* For a semantic button that looks like a button, please use the Button component.
|
|
22
|
+
* For a semantic button that looks like a link, please use the LinkButton component.
|
|
23
|
+
*/
|
|
24
|
+
declare const Link: Comp<LinkProps, HTMLAnchorElement>;
|
|
25
|
+
|
|
26
|
+
export { Link as L, StyledLink as S };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link2.js","sources":["../../src/components/link/Link.tsx"],"sourcesContent":["import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '../../types';\nimport { StyledLink } from './styles';\nimport { LinkProps } from './types';\nimport { useTheme } from '../theme';\nimport { Icon } from '../icon';\n\nconst COMPONENT_NAME = 'Link';\nconst CLASSNAME = 'redsift-link';\n\n/**\n * The Link is a semantic link that looks like a link.\n * Shoud be used for internal and external navigation only.\n *\n * For a semantic link that looks like a button, please use the ButtonLink component.\n * For a semantic button that looks like a button, please use the Button component.\n * For a semantic button that looks like a link, please use the LinkButton component.\n */\nexport const Link: Comp<LinkProps, HTMLAnchorElement> = forwardRef((props, ref) => {\n const {\n as,\n children,\n className,\n color = 'primary',\n href,\n isDisabled,\n leftIcon,\n leftIconProps,\n rightIcon,\n rightIconProps,\n theme: propsTheme,\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n return (\n <StyledLink\n as={as as any}\n aria-disabled={isDisabled}\n role=\"link\"\n tabIndex={!isDisabled ? 0 : undefined}\n {...forwardedProps}\n $color={color}\n $isDisabled={isDisabled}\n $theme={theme}\n $hasIcons={leftIcon || rightIcon}\n className={classNames(Link.className, className)}\n href={!isDisabled ? href : undefined}\n ref={ref as RefObject<HTMLAnchorElement>}\n >\n {leftIcon || rightIcon ? (\n <>\n {leftIcon ? (\n <Icon icon={leftIcon} aria-hidden=\"true\" className=\"left\" size=\"xsmall\" {...leftIconProps} />\n ) : null}\n <span className=\"text\">{children}</span>\n {rightIcon ? (\n <Icon icon={rightIcon} aria-hidden=\"true\" className=\"right\" size=\"xsmall\" {...rightIconProps} />\n ) : null}\n </>\n ) : (\n children\n )}\n </StyledLink>\n );\n});\nLink.className = CLASSNAME;\nLink.displayName = COMPONENT_NAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","Link","forwardRef","props","ref","as","children","className","color","href","isDisabled","leftIcon","leftIconProps","rightIcon","rightIconProps","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","createElement","StyledLink","_extends","role","tabIndex","undefined","$color","$isDisabled","$theme","$hasIcons","classNames","Fragment","Icon","icon","size","displayName"],"mappings":";;;;;;;;AAQA,MAAMA,cAAc,GAAG,MAAM,CAAA;AAC7B,MAAMC,SAAS,GAAG,cAAc,CAAA;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,IAAwC,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACjF,MAAM;MACJC,EAAE;MACFC,QAAQ;MACRC,SAAS;AACTC,MAAAA,KAAK,GAAG,SAAS;MACjBC,IAAI;MACJC,UAAU;MACVC,QAAQ;MACRC,aAAa;MACbC,SAAS;MACTC,cAAc;AACdC,MAAAA,KAAK,EAAEC,UAAAA;AAET,KAAC,GAAGb,KAAK;A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IAAI,EAAAV,QAAA,CAAA;AAACW,IAAAA,IAAI,EAAEtB,SAAU;AAAC,IAAA,aAAA,EAAY,MAAM;AAACN,IAAAA,SAAS,EAAC,OAAO;AAAC6B,IAAAA,IAAI,EAAC,QAAA;GAAatB,EAAAA,cAAc,CAAG,CAAC,GAC9F,IACJ,CAAC,GAEHR,QAEQ,CAAC,CAAA;AAEjB,CAAC,EAAC;AACFL,IAAI,CAACM,SAAS,GAAGP,SAAS,CAAA;AAC1BC,IAAI,CAACoC,WAAW,GAAGtC,cAAc;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { b as ButtonProps } from './types4.js';
|
|
2
|
+
import { L as LinkProps } from './types18.js';
|
|
3
|
+
import { C as Comp } from './helpers.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component props.
|
|
7
|
+
*/
|
|
8
|
+
interface LinkButtonProps extends Pick<LinkProps, 'color' | 'leftIcon' | 'leftIconProps' | 'rightIconProps' | 'rightIcon'>, Omit<ButtonProps, 'color' | 'fullWidth' | 'leftIcon' | 'leftIconProps' | 'rightIconProps' | 'rightIcon' | 'size' | 'variant'> {
|
|
9
|
+
}
|
|
10
|
+
type StyledLinkButtonProps = Omit<LinkButtonProps, 'isDisabled'> & {
|
|
11
|
+
$isDisabled: LinkButtonProps['isDisabled'];
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The LinkButton is a semantic button that looks like a link.
|
|
16
|
+
*
|
|
17
|
+
* For a semantic button that looks like a button, please use the Button component.
|
|
18
|
+
* For a semantic link that looks like a link, please use the Link component.
|
|
19
|
+
* For a semantic link that looks like a button, please use the ButtonLink component.
|
|
20
|
+
*/
|
|
21
|
+
declare const LinkButton: Comp<LinkButtonProps, HTMLButtonElement>;
|
|
22
|
+
|
|
23
|
+
export { LinkButtonProps as L, StyledLinkButtonProps as S, LinkButton as a };
|