@redsift/design-system 11.5.0-muiv5 → 11.6.0-muiv5-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_rollupPluginBabelHelpers.js +133 -0
- package/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/_virtual/jsx-runtime.js +4 -0
- package/_virtual/jsx-runtime.js.map +1 -0
- package/_virtual/react-jsx-runtime.development.js +4 -0
- package/_virtual/react-jsx-runtime.development.js.map +1 -0
- package/_virtual/react-jsx-runtime.production.min.js +4 -0
- package/_virtual/react-jsx-runtime.production.min.js.map +1 -0
- package/components/alert/Alert.d.ts +9 -0
- package/components/alert/Alert.js +117 -0
- package/components/alert/Alert.js.map +1 -0
- package/components/alert/intl/en-US.json.js +7 -0
- package/components/alert/intl/en-US.json.js.map +1 -0
- package/components/alert/intl/fr-FR.json.js +7 -0
- package/components/alert/intl/fr-FR.json.js.map +1 -0
- package/components/alert/intl/index.js +10 -0
- package/components/alert/intl/index.js.map +1 -0
- package/components/alert/styles.js +54 -0
- package/components/alert/styles.js.map +1 -0
- package/components/alert/types.d.ts +49 -0
- package/components/alert/types.js +20 -0
- package/components/alert/types.js.map +1 -0
- package/components/app-bar/AppBar.d.ts +9 -0
- package/components/app-bar/AppBar.js +95 -0
- package/components/app-bar/AppBar.js.map +1 -0
- package/components/app-bar/intl/en-US.json.js +9 -0
- package/components/app-bar/intl/en-US.json.js.map +1 -0
- package/components/app-bar/intl/fr-FR.json.js +9 -0
- package/components/app-bar/intl/fr-FR.json.js.map +1 -0
- package/components/app-bar/intl/index.js +10 -0
- package/components/app-bar/intl/index.js.map +1 -0
- package/components/app-bar/styles.js +139 -0
- package/components/app-bar/styles.js.map +1 -0
- package/components/app-bar/types.d.ts +31 -0
- package/components/app-container/AppContainer.d.ts +11 -0
- package/components/app-container/AppContainer.js +117 -0
- package/components/app-container/AppContainer.js.map +1 -0
- package/components/app-container/context.d.ts +6 -0
- package/components/app-container/context.js +6 -0
- package/components/app-container/context.js.map +1 -0
- package/components/app-container/styles.js +30 -0
- package/components/app-container/styles.js.map +1 -0
- package/components/app-container/types.d.ts +51 -0
- package/components/app-content/AppContent.d.ts +9 -0
- package/components/app-content/AppContent.js +42 -0
- package/components/app-content/AppContent.js.map +1 -0
- package/components/app-content/styles.js +54 -0
- package/components/app-content/styles.js.map +1 -0
- package/components/app-content/types.d.ts +19 -0
- package/components/app-side-panel/AppSidePanel.d.ts +9 -0
- package/components/app-side-panel/AppSidePanel.js +86 -0
- package/components/app-side-panel/AppSidePanel.js.map +1 -0
- package/components/app-side-panel/intl/en-US.json.js +9 -0
- package/components/app-side-panel/intl/en-US.json.js.map +1 -0
- package/components/app-side-panel/intl/fr-FR.json.js +9 -0
- package/components/app-side-panel/intl/fr-FR.json.js.map +1 -0
- package/components/app-side-panel/intl/index.js +10 -0
- package/components/app-side-panel/intl/index.js.map +1 -0
- package/components/app-side-panel/styles.js +183 -0
- package/components/app-side-panel/styles.js.map +1 -0
- package/components/app-side-panel/types.d.ts +39 -0
- package/components/app-side-panel/types.js +15 -0
- package/components/app-side-panel/types.js.map +1 -0
- package/components/app-side-panel/useAppSidePanel.d.ts +6 -0
- package/components/app-side-panel/useAppSidePanel.js +23 -0
- package/components/app-side-panel/useAppSidePanel.js.map +1 -0
- package/components/badge/Badge.d.ts +9 -0
- package/components/badge/Badge.js +44 -0
- package/components/badge/Badge.js.map +1 -0
- package/components/badge/styles.js +93 -0
- package/components/badge/styles.js.map +1 -0
- package/components/badge/types.d.ts +37 -0
- package/components/badge/types.js +14 -0
- package/components/badge/types.js.map +1 -0
- package/components/breadcrumb-item/BreadcrumbItem.d.ts +9 -0
- package/components/breadcrumb-item/BreadcrumbItem.js +47 -0
- package/components/breadcrumb-item/BreadcrumbItem.js.map +1 -0
- package/components/breadcrumb-item/styles.js +48 -0
- package/components/breadcrumb-item/styles.js.map +1 -0
- package/components/breadcrumb-item/types.d.ts +23 -0
- package/components/breadcrumbs/Breadcrumbs.d.ts +13 -0
- package/components/breadcrumbs/Breadcrumbs.js +61 -0
- package/components/breadcrumbs/Breadcrumbs.js.map +1 -0
- package/components/breadcrumbs/styles.js +38 -0
- package/components/breadcrumbs/styles.js.map +1 -0
- package/components/breadcrumbs/types.d.ts +19 -0
- package/components/button/Button.d.ts +13 -0
- package/components/button/Button.js +92 -0
- package/components/button/Button.js.map +1 -0
- package/components/button/styles.d.ts +20 -0
- package/components/button/styles.js +219 -0
- package/components/button/styles.js.map +1 -0
- package/components/button/types.d.ts +67 -0
- package/components/button/types.js +19 -0
- package/components/button/types.js.map +1 -0
- package/components/button-group/ButtonGroup.d.ts +9 -0
- package/components/button-group/ButtonGroup.js +67 -0
- package/components/button-group/ButtonGroup.js.map +1 -0
- package/components/button-group/styles.js +103 -0
- package/components/button-group/styles.js.map +1 -0
- package/components/button-group/types.d.ts +36 -0
- package/components/button-group/types.js +19 -0
- package/components/button-group/types.js.map +1 -0
- package/components/button-link/ButtonLink.d.ts +13 -0
- package/components/button-link/ButtonLink.js +85 -0
- package/components/button-link/ButtonLink.js.map +1 -0
- package/components/button-link/types.d.ts +18 -0
- package/components/card/Card.d.ts +13 -0
- package/components/card/Card.js +81 -0
- package/components/card/Card.js.map +1 -0
- package/components/card/intl/en-US.json.js +9 -0
- package/components/card/intl/en-US.json.js.map +1 -0
- package/components/card/intl/fr-FR.json.js +9 -0
- package/components/card/intl/fr-FR.json.js.map +1 -0
- package/components/card/intl/index.js +10 -0
- package/components/card/intl/index.js.map +1 -0
- package/components/card/styles.js +63 -0
- package/components/card/styles.js.map +1 -0
- package/components/card/types.d.ts +25 -0
- package/components/card-actions/CardActions.d.ts +9 -0
- package/components/card-actions/CardActions.js +33 -0
- package/components/card-actions/CardActions.js.map +1 -0
- package/components/card-actions/styles.js +15 -0
- package/components/card-actions/styles.js.map +1 -0
- package/components/card-actions/types.d.ts +11 -0
- package/components/card-body/CardBody.d.ts +9 -0
- package/components/card-body/CardBody.js +28 -0
- package/components/card-body/CardBody.js.map +1 -0
- package/components/card-body/styles.js +18 -0
- package/components/card-body/styles.js.map +1 -0
- package/components/card-body/types.d.ts +11 -0
- package/components/card-header/CardHeader.d.ts +9 -0
- package/components/card-header/CardHeader.js +56 -0
- package/components/card-header/CardHeader.js.map +1 -0
- package/components/card-header/styles.js +31 -0
- package/components/card-header/styles.js.map +1 -0
- package/components/card-header/types.d.ts +28 -0
- package/components/checkbox/Checkbox.d.ts +11 -0
- package/components/checkbox/Checkbox.js +135 -0
- package/components/checkbox/Checkbox.js.map +1 -0
- package/components/checkbox/styles.js +113 -0
- package/components/checkbox/styles.js.map +1 -0
- package/components/checkbox/types.d.ts +60 -0
- package/components/checkbox-group/CheckboxGroup.d.ts +10 -0
- package/components/checkbox-group/CheckboxGroup.js +101 -0
- package/components/checkbox-group/CheckboxGroup.js.map +1 -0
- package/components/checkbox-group/context.js +6 -0
- package/components/checkbox-group/context.js.map +1 -0
- package/components/checkbox-group/styles.js +78 -0
- package/components/checkbox-group/styles.js.map +1 -0
- package/components/checkbox-group/types.d.ts +72 -0
- package/components/checkbox-group/types.js +18 -0
- package/components/checkbox-group/types.js.map +1 -0
- package/components/conditional-wrapper/ConditionalWrapper.d.ts +6 -0
- package/components/conditional-wrapper/ConditionalWrapper.js +13 -0
- package/components/conditional-wrapper/ConditionalWrapper.js.map +1 -0
- package/components/conditional-wrapper/types.d.ts +10 -0
- package/components/detailed-card/DetailedCard.d.ts +15 -0
- package/components/detailed-card/DetailedCard.js +170 -0
- package/components/detailed-card/DetailedCard.js.map +1 -0
- package/components/detailed-card/intl/en-US.json.js +7 -0
- package/components/detailed-card/intl/en-US.json.js.map +1 -0
- package/components/detailed-card/intl/fr-FR.json.js +7 -0
- package/components/detailed-card/intl/fr-FR.json.js.map +1 -0
- package/components/detailed-card/intl/index.js +10 -0
- package/components/detailed-card/intl/index.js.map +1 -0
- package/components/detailed-card/styles.js +49 -0
- package/components/detailed-card/styles.js.map +1 -0
- package/components/detailed-card/types.d.ts +40 -0
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.d.ts +9 -0
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js +33 -0
- package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js.map +1 -0
- package/components/detailed-card-collapsible-section-items/styles.js +35 -0
- package/components/detailed-card-collapsible-section-items/styles.js.map +1 -0
- package/components/detailed-card-collapsible-section-items/types.d.ts +16 -0
- package/components/detailed-card-header/DetailedCardHeader.d.ts +9 -0
- package/components/detailed-card-header/DetailedCardHeader.js +45 -0
- package/components/detailed-card-header/DetailedCardHeader.js.map +1 -0
- package/components/detailed-card-header/styles.js +26 -0
- package/components/detailed-card-header/styles.js.map +1 -0
- package/components/detailed-card-header/types.d.ts +20 -0
- package/components/detailed-card-section/DetailedCardSection.d.ts +9 -0
- package/components/detailed-card-section/DetailedCardSection.js +90 -0
- package/components/detailed-card-section/DetailedCardSection.js.map +1 -0
- package/components/detailed-card-section/intl/en-US.json.js +9 -0
- package/components/detailed-card-section/intl/en-US.json.js.map +1 -0
- package/components/detailed-card-section/intl/fr-FR.json.js +9 -0
- package/components/detailed-card-section/intl/fr-FR.json.js.map +1 -0
- package/components/detailed-card-section/intl/index.js +10 -0
- package/components/detailed-card-section/intl/index.js.map +1 -0
- package/components/detailed-card-section/styles.js +69 -0
- package/components/detailed-card-section/styles.js.map +1 -0
- package/components/detailed-card-section/types.d.ts +27 -0
- package/components/detailed-card-section-item/DetailedCardSectionItem.d.ts +9 -0
- package/components/detailed-card-section-item/DetailedCardSectionItem.js +64 -0
- package/components/detailed-card-section-item/DetailedCardSectionItem.js.map +1 -0
- package/components/detailed-card-section-item/styles.js +34 -0
- package/components/detailed-card-section-item/styles.js.map +1 -0
- package/components/detailed-card-section-item/types.d.ts +35 -0
- package/components/flexbox/Flexbox.d.ts +9 -0
- package/components/flexbox/Flexbox.js +44 -0
- package/components/flexbox/Flexbox.js.map +1 -0
- package/components/flexbox/styles.js +54 -0
- package/components/flexbox/styles.js.map +1 -0
- package/components/flexbox/types.d.ts +24 -0
- package/components/focus-within-group/FocusWithinGroup.d.ts +41 -0
- package/components/focus-within-group/FocusWithinGroup.js +91 -0
- package/components/focus-within-group/FocusWithinGroup.js.map +1 -0
- package/components/focus-within-group/context.d.ts +7 -0
- package/components/focus-within-group/context.js +21 -0
- package/components/focus-within-group/context.js.map +1 -0
- package/components/focus-within-group/reducer.d.ts +5 -0
- package/components/focus-within-group/reducer.js +419 -0
- package/components/focus-within-group/reducer.js.map +1 -0
- package/components/focus-within-group/types.d.ts +143 -0
- package/components/focus-within-group/types.js +42 -0
- package/components/focus-within-group/types.js.map +1 -0
- package/components/focus-within-group/useFocusOnList.d.ts +5 -0
- package/components/focus-within-group/useFocusOnList.js +44 -0
- package/components/focus-within-group/useFocusOnList.js.map +1 -0
- package/components/focus-within-group/useFocusOnListItem.d.ts +39 -0
- package/components/focus-within-group/useFocusOnListItem.js +148 -0
- package/components/focus-within-group/useFocusOnListItem.js.map +1 -0
- package/components/gradient-border/index.d.ts +14 -0
- package/components/gradient-border/index.js +38 -0
- package/components/gradient-border/index.js.map +1 -0
- package/components/grid/Grid.d.ts +13 -0
- package/components/grid/Grid.js +45 -0
- package/components/grid/Grid.js.map +1 -0
- package/components/grid/styles.js +55 -0
- package/components/grid/styles.js.map +1 -0
- package/components/grid/types.d.ts +22 -0
- package/components/grid-item/GridItem.d.ts +9 -0
- package/components/grid-item/GridItem.js +28 -0
- package/components/grid-item/GridItem.js.map +1 -0
- package/components/grid-item/styles.js +16 -0
- package/components/grid-item/styles.js.map +1 -0
- package/components/grid-item/types.d.ts +11 -0
- package/components/heading/Heading.d.ts +9 -0
- package/components/heading/Heading.js +50 -0
- package/components/heading/Heading.js.map +1 -0
- package/components/heading/styles.js +67 -0
- package/components/heading/styles.js.map +1 -0
- package/components/heading/types.d.ts +62 -0
- package/components/heading/types.js +26 -0
- package/components/heading/types.js.map +1 -0
- package/components/icon/Icon.d.ts +10 -0
- package/components/icon/Icon.js +116 -0
- package/components/icon/Icon.js.map +1 -0
- package/components/icon/styles.js +84 -0
- package/components/icon/styles.js.map +1 -0
- package/components/icon/types.d.ts +57 -0
- package/components/icon/types.js +18 -0
- package/components/icon/types.js.map +1 -0
- package/components/icon-button/IconButton.d.ts +12 -0
- package/components/icon-button/IconButton.js +81 -0
- package/components/icon-button/IconButton.js.map +1 -0
- package/components/icon-button/styles.js +31 -0
- package/components/icon-button/styles.js.map +1 -0
- package/components/icon-button/types.d.ts +56 -0
- package/components/icon-button/types.js +19 -0
- package/components/icon-button/types.js.map +1 -0
- package/components/icon-button-link/IconButtonLink.d.ts +13 -0
- package/components/icon-button-link/IconButtonLink.js +76 -0
- package/components/icon-button-link/IconButtonLink.js.map +1 -0
- package/components/icon-button-link/types.d.ts +18 -0
- package/components/item/Item.d.ts +10 -0
- package/components/item/Item.js +225 -0
- package/components/item/Item.js.map +1 -0
- package/components/item/styles.d.ts +20 -0
- package/components/item/styles.js +129 -0
- package/components/item/styles.js.map +1 -0
- package/components/item/types.d.ts +59 -0
- package/components/item/useMenuItem.js +55 -0
- package/components/item/useMenuItem.js.map +1 -0
- package/components/link/Link.d.ts +14 -0
- package/components/link/Link.js +67 -0
- package/components/link/Link.js.map +1 -0
- package/components/link/styles.d.ts +15 -0
- package/components/link/styles.js +145 -0
- package/components/link/styles.js.map +1 -0
- package/components/link/types.d.ts +40 -0
- package/components/link-button/LinkButton.d.ts +13 -0
- package/components/link-button/LinkButton.js +66 -0
- package/components/link-button/LinkButton.js.map +1 -0
- package/components/link-button/types.d.ts +13 -0
- package/components/listbox/ActiveDescendantListbox.d.ts +8 -0
- package/components/listbox/ActiveDescendantListbox.js +74 -0
- package/components/listbox/ActiveDescendantListbox.js.map +1 -0
- package/components/listbox/Listbox.d.ts +10 -0
- package/components/listbox/Listbox.js +110 -0
- package/components/listbox/Listbox.js.map +1 -0
- package/components/listbox/RovingTabindexListbox.d.ts +8 -0
- package/components/listbox/RovingTabindexListbox.js +30 -0
- package/components/listbox/RovingTabindexListbox.js.map +1 -0
- package/components/listbox/context.d.ts +7 -0
- package/components/listbox/context.js +15 -0
- package/components/listbox/context.js.map +1 -0
- package/components/listbox/reducer.d.ts +5 -0
- package/components/listbox/reducer.js +45 -0
- package/components/listbox/reducer.js.map +1 -0
- package/components/listbox/styles.js +44 -0
- package/components/listbox/styles.js.map +1 -0
- package/components/listbox/types.d.ts +101 -0
- package/components/listbox/types.js +32 -0
- package/components/listbox/types.js.map +1 -0
- package/components/listbox/useListboxItem.d.ts +12 -0
- package/components/listbox/useListboxItem.js +90 -0
- package/components/listbox/useListboxItem.js.map +1 -0
- package/components/number/Number.d.ts +9 -0
- package/components/number/Number.js +105 -0
- package/components/number/Number.js.map +1 -0
- package/components/number/styles.js +10 -0
- package/components/number/styles.js.map +1 -0
- package/components/number/types.d.ts +63 -0
- package/components/number-field/NumberField.d.ts +10 -0
- package/components/number-field/NumberField.js +216 -0
- package/components/number-field/NumberField.js.map +1 -0
- package/components/number-field/styles.js +240 -0
- package/components/number-field/styles.js.map +1 -0
- package/components/number-field/types.d.ts +74 -0
- package/components/number-field/types.js +14 -0
- package/components/number-field/types.js.map +1 -0
- package/components/pill/Pill.d.ts +9 -0
- package/components/pill/Pill.js +93 -0
- package/components/pill/Pill.js.map +1 -0
- package/components/pill/styles.js +305 -0
- package/components/pill/styles.js.map +1 -0
- package/components/pill/types.d.ts +47 -0
- package/components/pill/types.js +15 -0
- package/components/pill/types.js.map +1 -0
- package/components/progress-bar/ProgressBar.d.ts +9 -0
- package/components/progress-bar/ProgressBar.js +35 -0
- package/components/progress-bar/ProgressBar.js.map +1 -0
- package/components/progress-bar/styles.js +38 -0
- package/components/progress-bar/styles.js.map +1 -0
- package/components/progress-bar/types.d.ts +20 -0
- package/components/radio/Radio.d.ts +11 -0
- package/components/radio/Radio.js +128 -0
- package/components/radio/Radio.js.map +1 -0
- package/components/radio/styles.js +113 -0
- package/components/radio/styles.js.map +1 -0
- package/components/radio/types.d.ts +58 -0
- package/components/radio-group/RadioGroup.d.ts +10 -0
- package/components/radio-group/RadioGroup.js +89 -0
- package/components/radio-group/RadioGroup.js.map +1 -0
- package/components/radio-group/context.js +6 -0
- package/components/radio-group/context.js.map +1 -0
- package/components/radio-group/styles.js +78 -0
- package/components/radio-group/styles.js.map +1 -0
- package/components/radio-group/types.d.ts +68 -0
- package/components/radio-group/types.js +18 -0
- package/components/radio-group/types.js.map +1 -0
- package/components/shared/styles.d.ts +17 -0
- package/components/shared/styles.js +250 -0
- package/components/shared/styles.js.map +1 -0
- package/components/shield/Shield.d.ts +9 -0
- package/components/shield/Shield.js +136 -0
- package/components/shield/Shield.js.map +1 -0
- package/components/shield/styles.js +71 -0
- package/components/shield/styles.js.map +1 -0
- package/components/shield/types.d.ts +52 -0
- package/components/shield/types.js +25 -0
- package/components/shield/types.js.map +1 -0
- package/components/side-navigation-menu/SideNavigationMenu.d.ts +9 -0
- package/components/side-navigation-menu/SideNavigationMenu.js +367 -0
- package/components/side-navigation-menu/SideNavigationMenu.js.map +1 -0
- package/components/side-navigation-menu/context.js +6 -0
- package/components/side-navigation-menu/context.js.map +1 -0
- package/components/side-navigation-menu/reducer.js +26 -0
- package/components/side-navigation-menu/reducer.js.map +1 -0
- package/components/side-navigation-menu/styles.js +196 -0
- package/components/side-navigation-menu/styles.js.map +1 -0
- package/components/side-navigation-menu/types.d.ts +72 -0
- package/components/side-navigation-menu/types.js +21 -0
- package/components/side-navigation-menu/types.js.map +1 -0
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.d.ts +9 -0
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.js +217 -0
- package/components/side-navigation-menu-bar/SideNavigationMenuBar.js.map +1 -0
- package/components/side-navigation-menu-bar/context.js +6 -0
- package/components/side-navigation-menu-bar/context.js.map +1 -0
- package/components/side-navigation-menu-bar/styles.js +89 -0
- package/components/side-navigation-menu-bar/styles.js.map +1 -0
- package/components/side-navigation-menu-bar/types.d.ts +65 -0
- package/components/side-navigation-menu-bar/types.js +22 -0
- package/components/side-navigation-menu-bar/types.js.map +1 -0
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.d.ts +9 -0
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js +70 -0
- package/components/side-navigation-menu-bar/useSideNavigationMenuBar.js.map +1 -0
- package/components/side-navigation-menu-item/SideNavigationMenuItem.d.ts +9 -0
- package/components/side-navigation-menu-item/SideNavigationMenuItem.js +115 -0
- package/components/side-navigation-menu-item/SideNavigationMenuItem.js.map +1 -0
- package/components/side-navigation-menu-item/styles.js +174 -0
- package/components/side-navigation-menu-item/styles.js.map +1 -0
- package/components/side-navigation-menu-item/types.d.ts +51 -0
- package/components/skeleton/Skeleton.d.ts +15 -0
- package/components/skeleton/Skeleton.js +42 -0
- package/components/skeleton/Skeleton.js.map +1 -0
- package/components/skeleton/styles.js +84 -0
- package/components/skeleton/styles.js.map +1 -0
- package/components/skeleton/types.d.ts +18 -0
- package/components/skeleton-circle/SkeletonCircle.d.ts +9 -0
- package/components/skeleton-circle/SkeletonCircle.js +36 -0
- package/components/skeleton-circle/SkeletonCircle.js.map +1 -0
- package/components/skeleton-circle/styles.js +26 -0
- package/components/skeleton-circle/styles.js.map +1 -0
- package/components/skeleton-circle/types.d.ts +12 -0
- package/components/skeleton-text/SkeletonText.d.ts +9 -0
- package/components/skeleton-text/SkeletonText.js +42 -0
- package/components/skeleton-text/SkeletonText.js.map +1 -0
- package/components/skeleton-text/styles.js +39 -0
- package/components/skeleton-text/styles.js.map +1 -0
- package/components/skeleton-text/types.d.ts +36 -0
- package/components/skeleton-text/types.js +20 -0
- package/components/skeleton-text/types.js.map +1 -0
- package/components/spinner/Spinner.d.ts +9 -0
- package/components/spinner/Spinner.js +82 -0
- package/components/spinner/Spinner.js.map +1 -0
- package/components/spinner/images/spinner-grey-l1.svg.js +4 -0
- package/components/spinner/images/spinner-grey-l1.svg.js.map +1 -0
- package/components/spinner/images/spinner-grey-l2.svg.js +4 -0
- package/components/spinner/images/spinner-grey-l2.svg.js.map +1 -0
- package/components/spinner/images/spinner-grey-l3.svg.js +4 -0
- package/components/spinner/images/spinner-grey-l3.svg.js.map +1 -0
- package/components/spinner/images/spinner-primary-n.svg.js +4 -0
- package/components/spinner/images/spinner-primary-n.svg.js.map +1 -0
- package/components/spinner/intl/en-US.json.js +7 -0
- package/components/spinner/intl/en-US.json.js.map +1 -0
- package/components/spinner/intl/fr-FR.json.js +7 -0
- package/components/spinner/intl/fr-FR.json.js.map +1 -0
- package/components/spinner/intl/index.js +10 -0
- package/components/spinner/intl/index.js.map +1 -0
- package/components/spinner/styles.js +13 -0
- package/components/spinner/styles.js.map +1 -0
- package/components/spinner/types.d.ts +38 -0
- package/components/spinner/types.js +16 -0
- package/components/spinner/types.js.map +1 -0
- package/components/switch/Switch.d.ts +11 -0
- package/components/switch/Switch.js +137 -0
- package/components/switch/Switch.js.map +1 -0
- package/components/switch/styles.js +187 -0
- package/components/switch/styles.js.map +1 -0
- package/components/switch/types.d.ts +58 -0
- package/components/switch-group/SwitchGroup.d.ts +10 -0
- package/components/switch-group/SwitchGroup.js +101 -0
- package/components/switch-group/SwitchGroup.js.map +1 -0
- package/components/switch-group/context.js +6 -0
- package/components/switch-group/context.js.map +1 -0
- package/components/switch-group/styles.js +78 -0
- package/components/switch-group/styles.js.map +1 -0
- package/components/switch-group/types.d.ts +72 -0
- package/components/switch-group/types.js +18 -0
- package/components/switch-group/types.js.map +1 -0
- package/components/text/Text.d.ts +9 -0
- package/components/text/Text.js +51 -0
- package/components/text/Text.js.map +1 -0
- package/components/text/styles.js +112 -0
- package/components/text/styles.js.map +1 -0
- package/components/text/types.d.ts +73 -0
- package/components/text/types.js +34 -0
- package/components/text/types.js.map +1 -0
- package/components/text-area/TextArea.d.ts +10 -0
- package/components/text-area/TextArea.js +165 -0
- package/components/text-area/TextArea.js.map +1 -0
- package/components/text-area/styles.js +240 -0
- package/components/text-area/styles.js.map +1 -0
- package/components/text-area/types.d.ts +28 -0
- package/components/text-area/types.js +14 -0
- package/components/text-area/types.js.map +1 -0
- package/components/text-field/TextField.d.ts +10 -0
- package/components/text-field/TextField.js +197 -0
- package/components/text-field/TextField.js.map +1 -0
- package/components/text-field/intl/en-US.json.js +8 -0
- package/components/text-field/intl/en-US.json.js.map +1 -0
- package/components/text-field/intl/fr-FR.json.js +8 -0
- package/components/text-field/intl/fr-FR.json.js.map +1 -0
- package/components/text-field/intl/index.js +10 -0
- package/components/text-field/intl/index.js.map +1 -0
- package/components/text-field/styles.d.ts +22 -0
- package/components/text-field/styles.js +252 -0
- package/components/text-field/styles.js.map +1 -0
- package/components/text-field/types.d.ts +99 -0
- package/components/text-field/types.js +18 -0
- package/components/text-field/types.js.map +1 -0
- package/components/theme/context.d.ts +11 -0
- package/components/theme/context.js +7 -0
- package/components/theme/context.js.map +1 -0
- package/components/theme/useTheme.d.ts +5 -0
- package/components/theme/useTheme.js +13 -0
- package/components/theme/useTheme.js.map +1 -0
- package/hooks/useBoundingRect.d.ts +8 -0
- package/hooks/useBoundingRect.js +17 -0
- package/hooks/useBoundingRect.js.map +1 -0
- package/hooks/useComputeNumberOfRows.d.ts +15 -0
- package/hooks/useComputeNumberOfRows.js +40 -0
- package/hooks/useComputeNumberOfRows.js.map +1 -0
- package/hooks/useIsLoaded.d.ts +5 -0
- package/hooks/useIsLoaded.js +14 -0
- package/hooks/useIsLoaded.js.map +1 -0
- package/hooks/useWindowSize.d.ts +8 -0
- package/hooks/useWindowSize.js +42 -0
- package/hooks/useWindowSize.js.map +1 -0
- package/index.d.ts +157 -4667
- package/index.js +121 -24514
- package/index.js.map +1 -1
- package/package.json +11 -3
- package/packages/popovers/src/components/tooltip/Tooltip.js +62 -0
- package/packages/popovers/src/components/tooltip/Tooltip.js.map +1 -0
- package/packages/popovers/src/components/tooltip/context.js +6 -0
- package/packages/popovers/src/components/tooltip/context.js.map +1 -0
- package/packages/popovers/src/components/tooltip/types.js +28 -0
- package/packages/popovers/src/components/tooltip/types.js.map +1 -0
- package/packages/popovers/src/components/tooltip/useTooltip.js +78 -0
- package/packages/popovers/src/components/tooltip/useTooltip.js.map +1 -0
- package/packages/popovers/src/components/tooltip/useTooltipContext.js +13 -0
- package/packages/popovers/src/components/tooltip/useTooltipContext.js.map +1 -0
- package/packages/popovers/src/components/tooltip-content/TooltipContent.js +80 -0
- package/packages/popovers/src/components/tooltip-content/TooltipContent.js.map +1 -0
- package/packages/popovers/src/components/tooltip-content/styles.js +128 -0
- package/packages/popovers/src/components/tooltip-content/styles.js.map +1 -0
- package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js +47 -0
- package/packages/popovers/src/components/tooltip-trigger/TooltipTrigger.js.map +1 -0
- package/react-aria/internationalized/date/DateFormatter.d.ts +25 -0
- package/react-aria/internationalized/date/DateFormatter.js +187 -0
- package/react-aria/internationalized/date/DateFormatter.js.map +1 -0
- package/react-aria/internationalized/message/MessageDictionary.d.ts +7 -0
- package/react-aria/internationalized/message/MessageDictionary.js +82 -0
- package/react-aria/internationalized/message/MessageDictionary.js.map +1 -0
- package/react-aria/internationalized/message/MessageFormatter.js +38 -0
- package/react-aria/internationalized/message/MessageFormatter.js.map +1 -0
- package/react-aria/internationalized/number/NumberFormatter.d.ts +6 -0
- package/react-aria/internationalized/number/NumberFormatter.js +222 -0
- package/react-aria/internationalized/number/NumberFormatter.js.map +1 -0
- package/react-aria/internationalized/number/NumberParser.js +288 -0
- package/react-aria/internationalized/number/NumberParser.js.map +1 -0
- package/react-aria/internationalized/string/LocalizedStringDictionary.d.ts +21 -0
- package/react-aria/internationalized/string/LocalizedStringDictionary.js +118 -0
- package/react-aria/internationalized/string/LocalizedStringDictionary.js.map +1 -0
- package/react-aria/internationalized/string/LocalizedStringFormatter.d.ts +21 -0
- package/react-aria/internationalized/string/LocalizedStringFormatter.js +70 -0
- package/react-aria/internationalized/string/LocalizedStringFormatter.js.map +1 -0
- package/react-aria/react-aria/button/useButton.js +95 -0
- package/react-aria/react-aria/button/useButton.js.map +1 -0
- package/react-aria/react-aria/focus/focusSafely.js +33 -0
- package/react-aria/react-aria/focus/focusSafely.js.map +1 -0
- package/react-aria/react-aria/focus/useFocusRing.js +57 -0
- package/react-aria/react-aria/focus/useFocusRing.js.map +1 -0
- package/react-aria/react-aria/focus/useFocusable.js +47 -0
- package/react-aria/react-aria/focus/useFocusable.js.map +1 -0
- package/react-aria/react-aria/form/useFormValidation.js +112 -0
- package/react-aria/react-aria/form/useFormValidation.js.map +1 -0
- package/react-aria/react-aria/i18n/context.d.ts +19 -0
- package/react-aria/react-aria/i18n/context.js +41 -0
- package/react-aria/react-aria/i18n/context.js.map +1 -0
- package/react-aria/react-aria/i18n/useCollator.d.ts +8 -0
- package/react-aria/react-aria/i18n/useCollator.js +25 -0
- package/react-aria/react-aria/i18n/useCollator.js.map +1 -0
- package/react-aria/react-aria/i18n/useDateFormatter.d.ts +13 -0
- package/react-aria/react-aria/i18n/useDateFormatter.js +39 -0
- package/react-aria/react-aria/i18n/useDateFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useDefaultLocale.d.ts +10 -0
- package/react-aria/react-aria/i18n/useDefaultLocale.js +67 -0
- package/react-aria/react-aria/i18n/useDefaultLocale.js.map +1 -0
- package/react-aria/react-aria/i18n/useFilter.d.ts +15 -0
- package/react-aria/react-aria/i18n/useFilter.js +58 -0
- package/react-aria/react-aria/i18n/useFilter.js.map +1 -0
- package/react-aria/react-aria/i18n/useListFormatter.d.ts +8 -0
- package/react-aria/react-aria/i18n/useListFormatter.js +20 -0
- package/react-aria/react-aria/i18n/useListFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.d.ts +15 -0
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js +38 -0
- package/react-aria/react-aria/i18n/useLocalizedStringFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useMessageFormatter.d.ts +13 -0
- package/react-aria/react-aria/i18n/useMessageFormatter.js +32 -0
- package/react-aria/react-aria/i18n/useMessageFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/useNumberFormatter.d.ts +10 -0
- package/react-aria/react-aria/i18n/useNumberFormatter.js +21 -0
- package/react-aria/react-aria/i18n/useNumberFormatter.js.map +1 -0
- package/react-aria/react-aria/i18n/utils.js +49 -0
- package/react-aria/react-aria/i18n/utils.js.map +1 -0
- package/react-aria/react-aria/interactions/context.js +20 -0
- package/react-aria/react-aria/interactions/context.js.map +1 -0
- package/react-aria/react-aria/interactions/createEventHandler.js +48 -0
- package/react-aria/react-aria/interactions/createEventHandler.js.map +1 -0
- package/react-aria/react-aria/interactions/textSelection.js +85 -0
- package/react-aria/react-aria/interactions/textSelection.js.map +1 -0
- package/react-aria/react-aria/interactions/useFocus.js +53 -0
- package/react-aria/react-aria/interactions/useFocus.js.map +1 -0
- package/react-aria/react-aria/interactions/useFocusVisible.js +236 -0
- package/react-aria/react-aria/interactions/useFocusVisible.js.map +1 -0
- package/react-aria/react-aria/interactions/useFocusWithin.js +65 -0
- package/react-aria/react-aria/interactions/useFocusWithin.js.map +1 -0
- package/react-aria/react-aria/interactions/useKeyboard.js +27 -0
- package/react-aria/react-aria/interactions/useKeyboard.js.map +1 -0
- package/react-aria/react-aria/interactions/usePress.js +769 -0
- package/react-aria/react-aria/interactions/usePress.js.map +1 -0
- package/react-aria/react-aria/interactions/useScrollWheel.js +31 -0
- package/react-aria/react-aria/interactions/useScrollWheel.js.map +1 -0
- package/react-aria/react-aria/interactions/utils.js +116 -0
- package/react-aria/react-aria/interactions/utils.js.map +1 -0
- package/react-aria/react-aria/label/useField.js +42 -0
- package/react-aria/react-aria/label/useField.js.map +1 -0
- package/react-aria/react-aria/label/useLabel.js +42 -0
- package/react-aria/react-aria/label/useLabel.js.map +1 -0
- package/react-aria/react-aria/live-announcer/LiveAnnouncer.js +121 -0
- package/react-aria/react-aria/live-announcer/LiveAnnouncer.js.map +1 -0
- package/react-aria/react-aria/numberfield/intl/en-US.json.js +11 -0
- package/react-aria/react-aria/numberfield/intl/en-US.json.js.map +1 -0
- package/react-aria/react-aria/numberfield/intl/fr-FR.json.js +11 -0
- package/react-aria/react-aria/numberfield/intl/fr-FR.json.js.map +1 -0
- package/react-aria/react-aria/numberfield/intl/index.js +10 -0
- package/react-aria/react-aria/numberfield/intl/index.js.map +1 -0
- package/react-aria/react-aria/numberfield/useNumberField.js +294 -0
- package/react-aria/react-aria/numberfield/useNumberField.js.map +1 -0
- package/react-aria/react-aria/spinbutton/intl/en-US.json.js +7 -0
- package/react-aria/react-aria/spinbutton/intl/en-US.json.js.map +1 -0
- package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js +7 -0
- package/react-aria/react-aria/spinbutton/intl/fr-FR.json.js.map +1 -0
- package/react-aria/react-aria/spinbutton/intl/index.js +10 -0
- package/react-aria/react-aria/spinbutton/intl/index.js.map +1 -0
- package/react-aria/react-aria/spinbutton/useSpinButton.js +168 -0
- package/react-aria/react-aria/spinbutton/useSpinButton.js.map +1 -0
- package/react-aria/react-aria/ssr/SSRProvider.d.ts +22 -0
- package/react-aria/react-aria/ssr/SSRProvider.js +157 -0
- package/react-aria/react-aria/ssr/SSRProvider.js.map +1 -0
- package/react-aria/react-aria/textfield/useFormattedTextField.js +142 -0
- package/react-aria/react-aria/textfield/useFormattedTextField.js.map +1 -0
- package/react-aria/react-aria/textfield/useTextField.js +156 -0
- package/react-aria/react-aria/textfield/useTextField.js.map +1 -0
- package/react-aria/react-aria/utils/chain.js +33 -0
- package/react-aria/react-aria/utils/chain.js.map +1 -0
- package/react-aria/react-aria/utils/domHelpers.js +14 -0
- package/react-aria/react-aria/utils/domHelpers.js.map +1 -0
- package/react-aria/react-aria/utils/filterDOMProps.js +45 -0
- package/react-aria/react-aria/utils/filterDOMProps.js.map +1 -0
- package/react-aria/react-aria/utils/focusWithoutScrolling.js +88 -0
- package/react-aria/react-aria/utils/focusWithoutScrolling.js.map +1 -0
- package/react-aria/react-aria/utils/isVirtualEvent.js +51 -0
- package/react-aria/react-aria/utils/isVirtualEvent.js.map +1 -0
- package/react-aria/react-aria/utils/mergeProps.js +48 -0
- package/react-aria/react-aria/utils/mergeProps.js.map +1 -0
- package/react-aria/react-aria/utils/openLink.js +55 -0
- package/react-aria/react-aria/utils/openLink.js.map +1 -0
- package/react-aria/react-aria/utils/platform.js +69 -0
- package/react-aria/react-aria/utils/platform.js.map +1 -0
- package/react-aria/react-aria/utils/runAfterTransition.js +100 -0
- package/react-aria/react-aria/utils/runAfterTransition.js.map +1 -0
- package/react-aria/react-aria/utils/useDeepMemo.js +16 -0
- package/react-aria/react-aria/utils/useDeepMemo.js.map +1 -0
- package/react-aria/react-aria/utils/useEffectEvent.js +31 -0
- package/react-aria/react-aria/utils/useEffectEvent.js.map +1 -0
- package/react-aria/react-aria/utils/useEvent.js +21 -0
- package/react-aria/react-aria/utils/useEvent.js.map +1 -0
- package/react-aria/react-aria/utils/useFormReset.js +23 -0
- package/react-aria/react-aria/utils/useFormReset.js.map +1 -0
- package/react-aria/react-aria/utils/useGlobalListeners.js +44 -0
- package/react-aria/react-aria/utils/useGlobalListeners.js.map +1 -0
- package/react-aria/react-aria/utils/useId.js +86 -0
- package/react-aria/react-aria/utils/useId.js.map +1 -0
- package/react-aria/react-aria/utils/useLabels.js +39 -0
- package/react-aria/react-aria/utils/useLabels.js.map +1 -0
- package/react-aria/react-aria/utils/useLayoutEffect.js +21 -0
- package/react-aria/react-aria/utils/useLayoutEffect.js.map +1 -0
- package/react-aria/react-aria/utils/useSyncRef.js +29 -0
- package/react-aria/react-aria/utils/useSyncRef.js.map +1 -0
- package/react-aria/react-aria/utils/useValueEffect.js +52 -0
- package/react-aria/react-aria/utils/useValueEffect.js.map +1 -0
- package/react-aria/react-stately/form/useFormValidationState.js +191 -0
- package/react-aria/react-stately/form/useFormValidationState.js.map +1 -0
- package/react-aria/react-stately/numberfield/useNumberFieldState.js +196 -0
- package/react-aria/react-stately/numberfield/useNumberFieldState.js.map +1 -0
- package/react-aria/react-stately/utils/number.js +56 -0
- package/react-aria/react-stately/utils/number.js.map +1 -0
- package/react-aria/react-stately/utils/useControlledState.js +68 -0
- package/react-aria/react-stately/utils/useControlledState.js.map +1 -0
- package/react-aria/react-types/shared/locale.d.ts +3 -0
- package/types/colors.d.ts +102 -0
- package/types/colors.js +64 -0
- package/types/colors.js.map +1 -0
- package/types/fonts.d.ts +12 -0
- package/types/fonts.js +10 -0
- package/types/fonts.js.map +1 -0
- package/types/helpers.d.ts +23 -0
- package/types/products.d.ts +40 -0
- package/types/products.js +38 -0
- package/types/products.js.map +1 -0
- package/types/styles.d.ts +283 -0
- package/types/styles.js +161 -0
- package/types/styles.js.map +1 -0
- package/utils/filterComponents.d.ts +12 -0
- package/utils/filterComponents.js +24 -0
- package/utils/filterComponents.js.map +1 -0
- package/utils/getTextWidth.d.ts +6 -0
- package/utils/getTextWidth.js +32 -0
- package/utils/getTextWidth.js.map +1 -0
- package/utils/isComponent.d.ts +12 -0
- package/utils/isComponent.js +15 -0
- package/utils/isComponent.js.map +1 -0
- package/utils/partitionComponents.d.ts +10 -0
- package/utils/partitionComponents.js +26 -0
- package/utils/partitionComponents.js.map +1 -0
- package/utils/redsift-design-tokens.d.ts +1389 -0
- package/utils/redsift-design-tokens.js +1391 -0
- package/utils/redsift-design-tokens.js.map +1 -0
- package/utils/useId.d.ts +6 -0
- package/utils/useId.js +42 -0
- package/utils/useId.js.map +1 -0
- package/utils/warnIfNoAccessibleLabelFound.d.ts +11 -0
- package/utils/warnIfNoAccessibleLabelFound.js +20 -0
- package/utils/warnIfNoAccessibleLabelFound.js.map +1 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { ValueOf } from '../../types/helpers.js';
|
|
3
|
+
import { StylingProps } from '../../types/styles.js';
|
|
4
|
+
import { Theme } from '../../types/colors.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Context props.
|
|
8
|
+
*/
|
|
9
|
+
type CheckboxGroupState = {
|
|
10
|
+
/** Adds a value to the set of selected values. */
|
|
11
|
+
addValue(value: string): void;
|
|
12
|
+
/** Whether the checkbox group is disabled or not. */
|
|
13
|
+
readonly isDisabled: boolean;
|
|
14
|
+
/** Whether the checkbox group is read only or not. */
|
|
15
|
+
readonly isReadOnly: boolean;
|
|
16
|
+
/** Removes a value from the set of selected values. */
|
|
17
|
+
removeValue(value: string): void;
|
|
18
|
+
/** Sets the selected values. */
|
|
19
|
+
setValue(value: string[]): void;
|
|
20
|
+
/** Current selected values. */
|
|
21
|
+
readonly value: readonly string[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Component orientation.
|
|
25
|
+
*/
|
|
26
|
+
declare const CheckboxGroupOrientation: {
|
|
27
|
+
readonly vertical: "vertical";
|
|
28
|
+
readonly horizontal: "horizontal";
|
|
29
|
+
};
|
|
30
|
+
type CheckboxGroupOrientation = ValueOf<typeof CheckboxGroupOrientation>;
|
|
31
|
+
/**
|
|
32
|
+
* Component props.
|
|
33
|
+
*/
|
|
34
|
+
interface CheckboxGroupProps extends Omit<ComponentProps<'div'>, 'onChange'>, StylingProps {
|
|
35
|
+
/**
|
|
36
|
+
* Default selected values.
|
|
37
|
+
* Used for uncontrolled version.
|
|
38
|
+
*/
|
|
39
|
+
defaultValues?: string[];
|
|
40
|
+
/** Description of the checkbox group. */
|
|
41
|
+
description?: string;
|
|
42
|
+
/** Whether the component is disabled or not. */
|
|
43
|
+
isDisabled?: boolean;
|
|
44
|
+
/** Whether the component is invalid or not. */
|
|
45
|
+
isInvalid?: boolean;
|
|
46
|
+
/** Whether the component is read only or not. */
|
|
47
|
+
isReadOnly?: boolean;
|
|
48
|
+
/** Whether the component is required or not. */
|
|
49
|
+
isRequired?: boolean;
|
|
50
|
+
/** Label of the checkbox group. */
|
|
51
|
+
label?: string;
|
|
52
|
+
/** Method to handle component change. */
|
|
53
|
+
onChange?(values: string[]): void;
|
|
54
|
+
/** Method to handle component change. */
|
|
55
|
+
orientation?: CheckboxGroupOrientation;
|
|
56
|
+
/** Theme. */
|
|
57
|
+
theme?: Theme;
|
|
58
|
+
/**
|
|
59
|
+
* Currently selected values.
|
|
60
|
+
* Used for controlled version.
|
|
61
|
+
*/
|
|
62
|
+
value?: string[];
|
|
63
|
+
}
|
|
64
|
+
type StyledCheckboxGroupProps = Omit<CheckboxGroupProps, 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'orientation' | 'isRequired'> & {
|
|
65
|
+
$isDisabled: CheckboxGroupProps['isDisabled'];
|
|
66
|
+
$isInvalid: CheckboxGroupProps['isInvalid'];
|
|
67
|
+
$isReadOnly: CheckboxGroupProps['isReadOnly'];
|
|
68
|
+
$orientation: CheckboxGroupProps['orientation'];
|
|
69
|
+
$theme: CheckboxGroupProps['theme'];
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export { CheckboxGroupOrientation, CheckboxGroupProps, CheckboxGroupState, StyledCheckboxGroupProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context props.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component orientation.
|
|
7
|
+
*/
|
|
8
|
+
const CheckboxGroupOrientation = {
|
|
9
|
+
vertical: 'vertical',
|
|
10
|
+
horizontal: 'horizontal'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Component props.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { CheckboxGroupOrientation };
|
|
18
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/checkbox-group/types.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { ValueOf, StylingProps, Theme } from '../../types';\n\n/**\n * Context props.\n */\nexport type CheckboxGroupState = {\n /** Adds a value to the set of selected values. */\n addValue(value: string): void;\n /** Whether the checkbox group is disabled or not. */\n readonly isDisabled: boolean;\n /** Whether the checkbox group is read only or not. */\n readonly isReadOnly: boolean;\n /** Removes a value from the set of selected values. */\n removeValue(value: string): void;\n /** Sets the selected values. */\n setValue(value: string[]): void;\n /** Current selected values. */\n readonly value: readonly string[];\n};\n\n/**\n * Component orientation.\n */\nexport const CheckboxGroupOrientation = {\n vertical: 'vertical',\n horizontal: 'horizontal',\n} as const;\nexport type CheckboxGroupOrientation = ValueOf<typeof CheckboxGroupOrientation>;\n\n/**\n * Component props.\n */\nexport interface CheckboxGroupProps extends Omit<ComponentProps<'div'>, 'onChange'>, StylingProps {\n /**\n * Default selected values.\n * Used for uncontrolled version.\n */\n defaultValues?: string[];\n /** Description of the checkbox group. */\n description?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is invalid or not. */\n isInvalid?: boolean;\n /** Whether the component is read only or not. */\n isReadOnly?: boolean;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** Label of the checkbox group. */\n label?: string;\n /** Method to handle component change. */\n onChange?(values: string[]): void;\n /** Method to handle component change. */\n orientation?: CheckboxGroupOrientation;\n /** Theme. */\n theme?: Theme;\n /**\n * Currently selected values.\n * Used for controlled version.\n */\n value?: string[];\n}\n\nexport type StyledCheckboxGroupProps = Omit<\n CheckboxGroupProps,\n 'isDisabled' | 'isInvalid' | 'isReadOnly' | 'orientation' | 'isRequired'\n> & {\n $isDisabled: CheckboxGroupProps['isDisabled'];\n $isInvalid: CheckboxGroupProps['isInvalid'];\n $isReadOnly: CheckboxGroupProps['isReadOnly'];\n $orientation: CheckboxGroupProps['orientation'];\n $theme: CheckboxGroupProps['theme'];\n};\n"],"names":["CheckboxGroupOrientation","vertical","horizontal"],"mappings":"AAGA;AACA;AACA;;AAgBA;AACA;AACA;AACO,MAAMA,wBAAwB,GAAG;AACtCC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,UAAU,EAAE,YAAA;AACd,EAAU;;AAGV;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
const ConditionalWrapper = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
children,
|
|
6
|
+
condition,
|
|
7
|
+
wrapper
|
|
8
|
+
} = _ref;
|
|
9
|
+
return condition ? wrapper(children) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { ConditionalWrapper };
|
|
13
|
+
//# sourceMappingURL=ConditionalWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConditionalWrapper.js","sources":["../../../src/components/conditional-wrapper/ConditionalWrapper.tsx"],"sourcesContent":["import React from 'react';\nimport { ConditionalWrapperProps } from './types';\n\nexport const ConditionalWrapper: React.FC<ConditionalWrapperProps> = ({\n children,\n condition,\n wrapper,\n}) => (condition ? wrapper(children) : <>{children}</>);\n"],"names":["ConditionalWrapper","_ref","children","condition","wrapper","React","createElement","Fragment"],"mappings":";;AAGO,MAAMA,kBAAqD,GAAGC,IAAA,IAAA;EAAA,IAAC;IACpEC,QAAQ;IACRC,SAAS;AACTC,IAAAA,OAAAA;AACF,GAAC,GAAAH,IAAA,CAAA;AAAA,EAAA,OAAME,SAAS,GAAGC,OAAO,CAACF,QAAQ,CAAC,gBAAGG,cAAA,CAAAC,aAAA,CAAAD,cAAA,CAAAE,QAAA,EAAA,IAAA,EAAGL,QAAW,CAAC,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface ConditionalWrapperProps<T = {}> {
|
|
2
|
+
/** Children to render with or without the wrapper. */
|
|
3
|
+
children: React.ReactElement<T> | null;
|
|
4
|
+
/** Condition to define whether or not the children should be wrapped. */
|
|
5
|
+
condition: boolean;
|
|
6
|
+
/** Wrapper to conditionaly put around the children. */
|
|
7
|
+
wrapper: (children: React.ReactElement<T> | null) => React.ReactElement<T> | null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { ConditionalWrapperProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DetailedCardProps } from './types.js';
|
|
2
|
+
import { DetailedCardSectionProps } from '../detailed-card-section/types.js';
|
|
3
|
+
import { Comp } from '../../types/helpers.js';
|
|
4
|
+
import { DetailedCardHeaderProps } from '../detailed-card-header/types.js';
|
|
5
|
+
import { DetailedCardCollapsibleSectionItemsProps } from '../detailed-card-collapsible-section-items/types.js';
|
|
6
|
+
import { DetailedCardSectionItemProps } from '../detailed-card-section-item/types.js';
|
|
7
|
+
|
|
8
|
+
declare const DetailedCard: Comp<DetailedCardProps, HTMLDivElement> & {
|
|
9
|
+
Header: Comp<DetailedCardHeaderProps, HTMLDivElement>;
|
|
10
|
+
Section: Comp<DetailedCardSectionProps, HTMLDivElement>;
|
|
11
|
+
CollapsibleSectionItems: Comp<DetailedCardCollapsibleSectionItemsProps, HTMLDivElement>;
|
|
12
|
+
SectionItem: Comp<DetailedCardSectionItemProps, HTMLDivElement>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { DetailedCard };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef, useState, useEffect, useCallback } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import intlMessages from './intl/index.js';
|
|
5
|
+
import { mdiPageLast, mdiKeyboardCaps } from '@redsift/icons';
|
|
6
|
+
import { StyledDetailedCard } from './styles.js';
|
|
7
|
+
import { DetailedCardHeader } from '../detailed-card-header/DetailedCardHeader.js';
|
|
8
|
+
import { DetailedCardSection } from '../detailed-card-section/DetailedCardSection.js';
|
|
9
|
+
import { DetailedCardSectionItem } from '../detailed-card-section-item/DetailedCardSectionItem.js';
|
|
10
|
+
import { useMessageFormatter } from '../../react-aria/react-aria/i18n/useMessageFormatter.js';
|
|
11
|
+
import { Tooltip } from '../../packages/popovers/src/components/tooltip/Tooltip.js';
|
|
12
|
+
import { DetailedCardCollapsibleSectionItems } from '../detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js';
|
|
13
|
+
import { useTheme } from '../theme/useTheme.js';
|
|
14
|
+
import { partitionComponents } from '../../utils/partitionComponents.js';
|
|
15
|
+
import { isComponent } from '../../utils/isComponent.js';
|
|
16
|
+
import { ThemeProvider } from '../theme/context.js';
|
|
17
|
+
import { Skeleton } from '../skeleton/Skeleton.js';
|
|
18
|
+
import { Flexbox } from '../flexbox/Flexbox.js';
|
|
19
|
+
import { Shield } from '../shield/Shield.js';
|
|
20
|
+
import { Icon } from '../icon/Icon.js';
|
|
21
|
+
import { IconButton } from '../icon-button/IconButton.js';
|
|
22
|
+
|
|
23
|
+
const _excluded = ["areAllCollapsed", "bannerVariant", "children", "className", "color", "defaultAllCollapsed", "icon", "isCollapsible", "isLoading", "onCollapseAll", "shield", "theme", "width"];
|
|
24
|
+
const COMPONENT_NAME = 'DetailedCard';
|
|
25
|
+
const CLASSNAME = 'redsift-detailed-card';
|
|
26
|
+
const hasMultipleCollapsibleChildren = children => {
|
|
27
|
+
const collapsibleChildren = [];
|
|
28
|
+
const childrenArray = React__default.Children.toArray(children);
|
|
29
|
+
for (const child of childrenArray) {
|
|
30
|
+
if (isComponent(DetailedCardSection)(child)) {
|
|
31
|
+
let hasCollapsibleItems = Boolean(child.isCollapsible);
|
|
32
|
+
React__default.Children.forEach(child.props.children, sectionChild => {
|
|
33
|
+
if (isComponent(DetailedCardCollapsibleSectionItems)(sectionChild)) {
|
|
34
|
+
hasCollapsibleItems = true;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
if (hasCollapsibleItems) {
|
|
38
|
+
collapsibleChildren.push(child);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return collapsibleChildren.length > 1;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The DetailedCard component.
|
|
47
|
+
*/
|
|
48
|
+
const BaseDetailedCard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
49
|
+
const {
|
|
50
|
+
areAllCollapsed: propsAreAllCollapsed,
|
|
51
|
+
bannerVariant,
|
|
52
|
+
children,
|
|
53
|
+
className,
|
|
54
|
+
color,
|
|
55
|
+
defaultAllCollapsed,
|
|
56
|
+
icon,
|
|
57
|
+
isCollapsible: propsIsCollapsible = true,
|
|
58
|
+
isLoading,
|
|
59
|
+
onCollapseAll,
|
|
60
|
+
shield,
|
|
61
|
+
theme: propsTheme,
|
|
62
|
+
width = '400px'
|
|
63
|
+
} = props,
|
|
64
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
65
|
+
const theme = useTheme(propsTheme);
|
|
66
|
+
const format = useMessageFormatter(intlMessages);
|
|
67
|
+
const isCollapsible = propsIsCollapsible && hasMultipleCollapsibleChildren(children);
|
|
68
|
+
const [allCollapsed, setAllCollapsed] = useState({
|
|
69
|
+
state: propsAreAllCollapsed !== null && propsAreAllCollapsed !== void 0 ? propsAreAllCollapsed : defaultAllCollapsed
|
|
70
|
+
});
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
setAllCollapsed({
|
|
73
|
+
state: propsAreAllCollapsed !== null && propsAreAllCollapsed !== void 0 ? propsAreAllCollapsed : defaultAllCollapsed
|
|
74
|
+
});
|
|
75
|
+
}, [propsAreAllCollapsed, defaultAllCollapsed]);
|
|
76
|
+
const handleCollapse = useCallback(allCollapsed => {
|
|
77
|
+
if (onCollapseAll) {
|
|
78
|
+
onCollapseAll(allCollapsed);
|
|
79
|
+
}
|
|
80
|
+
if (propsAreAllCollapsed === undefined || propsAreAllCollapsed === null) {
|
|
81
|
+
setAllCollapsed({
|
|
82
|
+
state: allCollapsed
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}, [onCollapseAll]);
|
|
86
|
+
const [[header], content] = partitionComponents(React__default.Children.toArray(children), [isComponent('DetailedCardHeader')]);
|
|
87
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
88
|
+
value: {
|
|
89
|
+
theme
|
|
90
|
+
}
|
|
91
|
+
}, /*#__PURE__*/React__default.createElement(StyledDetailedCard, _extends({
|
|
92
|
+
width: width
|
|
93
|
+
}, forwardedProps, {
|
|
94
|
+
className: classNames(BaseDetailedCard.className, className),
|
|
95
|
+
ref: ref,
|
|
96
|
+
$color: color,
|
|
97
|
+
$theme: theme
|
|
98
|
+
}), color ? isLoading ? /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
99
|
+
theme: theme,
|
|
100
|
+
height: bannerVariant === 'condensed' ? '8px' : '80px',
|
|
101
|
+
width: "calc(100% + 32px)",
|
|
102
|
+
margin: "-16px -16px 16px -16px"
|
|
103
|
+
}) : /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
104
|
+
className: `${BaseDetailedCard.className}__banner`,
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
height: bannerVariant === 'condensed' ? '8px' : '80px',
|
|
107
|
+
justifyContent: "center",
|
|
108
|
+
margin: "-16px -16px 16px -16px",
|
|
109
|
+
width: "calc(100% + 32px)"
|
|
110
|
+
}, bannerVariant === 'condensed' ? null : shield ? /*#__PURE__*/React__default.createElement(Shield, {
|
|
111
|
+
variant: shield,
|
|
112
|
+
isOutlined: true,
|
|
113
|
+
isReversed: true,
|
|
114
|
+
svgProps: {
|
|
115
|
+
width: '40px',
|
|
116
|
+
height: '40px'
|
|
117
|
+
},
|
|
118
|
+
style: {
|
|
119
|
+
width: '40px',
|
|
120
|
+
height: '40px'
|
|
121
|
+
}
|
|
122
|
+
}) : icon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
123
|
+
icon: icon,
|
|
124
|
+
color: "white",
|
|
125
|
+
size: "xlarge"
|
|
126
|
+
}) : null) : null, header && isComponent('DetailedCardHeader')(header) ? /*#__PURE__*/React__default.createElement("div", {
|
|
127
|
+
className: `${BaseDetailedCard.className}__header`
|
|
128
|
+
}, header) : null, isCollapsible ? /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
129
|
+
justifyContent: "flex-end",
|
|
130
|
+
className: `${BaseDetailedCard.className}__collapse-buttons`
|
|
131
|
+
}, /*#__PURE__*/React__default.createElement(Tooltip, null, /*#__PURE__*/React__default.createElement(Tooltip.Trigger, null, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
132
|
+
"aria-label": format('collapse-all'),
|
|
133
|
+
"aria-describedby": undefined,
|
|
134
|
+
icon: mdiPageLast,
|
|
135
|
+
onClick: () => handleCollapse(true),
|
|
136
|
+
style: {
|
|
137
|
+
transform: 'rotate(-90deg)'
|
|
138
|
+
},
|
|
139
|
+
color: "grey"
|
|
140
|
+
})), /*#__PURE__*/React__default.createElement(Tooltip.Content, null, format('collapse-all'))), /*#__PURE__*/React__default.createElement(Tooltip, null, /*#__PURE__*/React__default.createElement(Tooltip.Trigger, null, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
141
|
+
"aria-label": format('expand-all'),
|
|
142
|
+
"aria-describedby": undefined,
|
|
143
|
+
icon: mdiKeyboardCaps,
|
|
144
|
+
onClick: () => handleCollapse(false),
|
|
145
|
+
style: {
|
|
146
|
+
transform: 'rotate(180deg)'
|
|
147
|
+
},
|
|
148
|
+
color: "grey"
|
|
149
|
+
})), /*#__PURE__*/React__default.createElement(Tooltip.Content, null, format('expand-all')))) : null, React__default.Children.map(content, child => {
|
|
150
|
+
if (isComponent(DetailedCardSection)(child)) {
|
|
151
|
+
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
152
|
+
theme,
|
|
153
|
+
isCollapsed: allCollapsed.state,
|
|
154
|
+
key: Math.random()
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return child;
|
|
158
|
+
})));
|
|
159
|
+
});
|
|
160
|
+
BaseDetailedCard.className = CLASSNAME;
|
|
161
|
+
BaseDetailedCard.displayName = COMPONENT_NAME;
|
|
162
|
+
const DetailedCard = Object.assign(BaseDetailedCard, {
|
|
163
|
+
Header: DetailedCardHeader,
|
|
164
|
+
Section: DetailedCardSection,
|
|
165
|
+
CollapsibleSectionItems: DetailedCardCollapsibleSectionItems,
|
|
166
|
+
SectionItem: DetailedCardSectionItem
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export { DetailedCard };
|
|
170
|
+
//# sourceMappingURL=DetailedCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCard.js","sources":["../../../src/components/detailed-card/DetailedCard.tsx"],"sourcesContent":["import React, { forwardRef, ReactElement, ReactNode, RefObject, useCallback, useEffect, useState } from 'react';\nimport classNames from 'classnames';\n\nimport { useMessageFormatter } from '../../react-aria/react-aria/i18n';\nimport intlMessages from './intl';\n\nimport { mdiKeyboardCaps, mdiPageLast } from '@redsift/icons';\nimport { Comp } from '../../types';\nimport { Icon } from '../icon';\nimport { Flexbox } from '../flexbox';\nimport { IconButton } from '../icon-button';\nimport { Shield } from '../shield';\nimport { DetailedCardSection, DetailedCardSectionProps } from '../detailed-card-section';\nimport { StyledDetailedCard } from './styles';\nimport { DetailedCardProps } from './types';\nimport { partitionComponents, isComponent } from '../../utils';\nimport { DetailedCardCollapsibleSectionItems } from '../detailed-card-collapsible-section-items';\nimport { DetailedCardHeader } from '../detailed-card-header';\nimport { DetailedCardSectionItem } from '../detailed-card-section-item';\nimport { Tooltip } from '@redsift/popovers';\nimport { Skeleton } from '../skeleton';\nimport { ThemeProvider, useTheme } from '../theme';\n\nconst COMPONENT_NAME = 'DetailedCard';\nconst CLASSNAME = 'redsift-detailed-card';\n\nconst hasMultipleCollapsibleChildren = (children: ReactNode): boolean => {\n const collapsibleChildren: ReactNode[] = [];\n\n const childrenArray = React.Children.toArray(children);\n for (const child of childrenArray) {\n if (isComponent(DetailedCardSection)(child)) {\n let hasCollapsibleItems = Boolean((child as DetailedCardSectionProps).isCollapsible);\n React.Children.forEach(child.props.children, (sectionChild) => {\n if (isComponent(DetailedCardCollapsibleSectionItems)(sectionChild)) {\n hasCollapsibleItems = true;\n }\n });\n\n if (hasCollapsibleItems) {\n collapsibleChildren.push(child);\n }\n }\n }\n\n return collapsibleChildren.length > 1;\n};\n\n/**\n * The DetailedCard component.\n */\nconst BaseDetailedCard: Comp<DetailedCardProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n areAllCollapsed: propsAreAllCollapsed,\n bannerVariant,\n children,\n className,\n color,\n defaultAllCollapsed,\n icon,\n isCollapsible: propsIsCollapsible = true,\n isLoading,\n onCollapseAll,\n shield,\n theme: propsTheme,\n width = '400px',\n ...forwardedProps\n } = props;\n\n const theme = useTheme(propsTheme);\n\n const format = useMessageFormatter(intlMessages);\n\n const isCollapsible = propsIsCollapsible && hasMultipleCollapsibleChildren(children);\n\n const [allCollapsed, setAllCollapsed] = useState({\n state: propsAreAllCollapsed ?? defaultAllCollapsed,\n });\n\n useEffect(() => {\n setAllCollapsed({\n state: propsAreAllCollapsed ?? defaultAllCollapsed,\n });\n }, [propsAreAllCollapsed, defaultAllCollapsed]);\n\n const handleCollapse = useCallback(\n (allCollapsed: boolean) => {\n if (onCollapseAll) {\n onCollapseAll(allCollapsed);\n }\n if (propsAreAllCollapsed === undefined || propsAreAllCollapsed === null) {\n setAllCollapsed({\n state: allCollapsed,\n });\n }\n },\n [onCollapseAll]\n );\n\n const [[header], content] = partitionComponents(React.Children.toArray(children), [\n isComponent('DetailedCardHeader'),\n ]);\n\n return (\n <ThemeProvider value={{ theme }}>\n <StyledDetailedCard\n width={width}\n {...forwardedProps}\n className={classNames(BaseDetailedCard.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n $color={color}\n $theme={theme}\n >\n {color ? (\n isLoading ? (\n <Skeleton\n theme={theme}\n height={bannerVariant === 'condensed' ? '8px' : '80px'}\n width=\"calc(100% + 32px)\"\n margin=\"-16px -16px 16px -16px\"\n />\n ) : (\n <Flexbox\n className={`${BaseDetailedCard.className}__banner`}\n alignItems=\"center\"\n height={bannerVariant === 'condensed' ? '8px' : '80px'}\n justifyContent=\"center\"\n margin=\"-16px -16px 16px -16px\"\n width=\"calc(100% + 32px)\"\n >\n {bannerVariant === 'condensed' ? null : shield ? (\n <Shield\n variant={shield}\n isOutlined\n isReversed\n svgProps={{ width: '40px', height: '40px' }}\n style={{ width: '40px', height: '40px' }}\n />\n ) : icon ? (\n <Icon icon={icon} color=\"white\" size=\"xlarge\" />\n ) : null}\n </Flexbox>\n )\n ) : null}\n {header && isComponent('DetailedCardHeader')(header) ? (\n <div className={`${BaseDetailedCard.className}__header`}>{header}</div>\n ) : null}\n {isCollapsible ? (\n <Flexbox justifyContent=\"flex-end\" className={`${BaseDetailedCard.className}__collapse-buttons`}>\n <Tooltip>\n <Tooltip.Trigger>\n <IconButton\n aria-label={format('collapse-all')}\n aria-describedby={undefined}\n icon={mdiPageLast}\n onClick={() => handleCollapse(true)}\n style={{ transform: 'rotate(-90deg)' }}\n color=\"grey\"\n />\n </Tooltip.Trigger>\n <Tooltip.Content>{format('collapse-all')}</Tooltip.Content>\n </Tooltip>\n <Tooltip>\n <Tooltip.Trigger>\n <IconButton\n aria-label={format('expand-all')}\n aria-describedby={undefined}\n icon={mdiKeyboardCaps}\n onClick={() => handleCollapse(false)}\n style={{ transform: 'rotate(180deg)' }}\n color=\"grey\"\n />\n </Tooltip.Trigger>\n <Tooltip.Content>{format('expand-all')}</Tooltip.Content>\n </Tooltip>\n </Flexbox>\n ) : null}\n\n {React.Children.map(content, (child) => {\n if (isComponent(DetailedCardSection)(child)) {\n return React.cloneElement(child as ReactElement, {\n theme,\n isCollapsed: allCollapsed.state,\n key: Math.random(),\n });\n }\n return child;\n })}\n </StyledDetailedCard>\n </ThemeProvider>\n );\n});\nBaseDetailedCard.className = CLASSNAME;\nBaseDetailedCard.displayName = COMPONENT_NAME;\n\nexport const DetailedCard = Object.assign(BaseDetailedCard, {\n Header: DetailedCardHeader,\n Section: DetailedCardSection,\n CollapsibleSectionItems: DetailedCardCollapsibleSectionItems,\n SectionItem: DetailedCardSectionItem,\n});\n"],"names":["COMPONENT_NAME","CLASSNAME","hasMultipleCollapsibleChildren","children","collapsibleChildren","childrenArray","React","Children","toArray","child","isComponent","DetailedCardSection","hasCollapsibleItems","Boolean","isCollapsible","forEach","props","sectionChild","DetailedCardCollapsibleSectionItems","push","length","BaseDetailedCard","forwardRef","ref","areAllCollapsed","propsAreAllCollapsed","bannerVariant","className","color","defaultAllCollapsed","icon","propsIsCollapsible","isLoading","onCollapseAll","shield","theme","propsTheme","width","forwardedProps","_objectWithoutProperties","_excluded","useTheme","format","useMessageFormatter","intlMessages","allCollapsed","setAllCollapsed","useState","state","useEffect","handleCollapse","useCallback","undefined","header","content","partitionComponents","createElement","ThemeProvider","value","StyledDetailedCard","_extends","classNames","$color","$theme","Skeleton","height","margin","Flexbox","alignItems","justifyContent","Shield","variant","isOutlined","isReversed","svgProps","style","Icon","size","Tooltip","Trigger","IconButton","mdiPageLast","onClick","transform","Content","mdiKeyboardCaps","map","cloneElement","isCollapsed","key","Math","random","displayName","DetailedCard","Object","assign","Header","DetailedCardHeader","Section","CollapsibleSectionItems","SectionItem","DetailedCardSectionItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAMA,cAAc,GAAG,cAAc,CAAA;AACrC,MAAMC,SAAS,GAAG,uBAAuB,CAAA;AAEzC,MAAMC,8BAA8B,GAAIC,QAAmB,IAAc;EACvE,MAAMC,mBAAgC,GAAG,EAAE,CAAA;EAE3C,MAAMC,aAAa,GAAGC,cAAK,CAACC,QAAQ,CAACC,OAAO,CAACL,QAAQ,CAAC,CAAA;AACtD,EAAA,KAAK,MAAMM,KAAK,IAAIJ,aAAa,EAAE;AACjC,IAAA,IAAIK,WAAW,CAACC,mBAAmB,CAAC,CAACF,KAAK,CAAC,EAAE;AAC3C,MAAA,IAAIG,mBAAmB,GAAGC,OAAO,CAAEJ,KAAK,CAA8BK,aAAa,CAAC,CAAA;AACpFR,MAAAA,cAAK,CAACC,QAAQ,CAACQ,OAAO,CAACN,KAAK,CAACO,KAAK,CAACb,QAAQ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
1
|
+
{"version":3,"file":"en-US.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr-FR.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/detailed-card/intl/index.ts"],"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"],"names":["enUS","frFR"],"mappings":";;;AAGA,mBAAe;AACb,EAAA,OAAO,EAAEA,IAAI;AACb,EAAA,OAAO,EAAEC,IAAAA;AACX,CAAC;;;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { baseStyling } from '../shared/styles.js';
|
|
3
|
+
import { Theme } from '../../types/colors.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component style.
|
|
7
|
+
*/
|
|
8
|
+
const StyledDetailedCard = styled.div`
|
|
9
|
+
${baseStyling}
|
|
10
|
+
|
|
11
|
+
color: var(--redsift-color-neutral-${_ref => {
|
|
12
|
+
let {
|
|
13
|
+
$theme
|
|
14
|
+
} = _ref;
|
|
15
|
+
return $theme === Theme.light ? 'x-dark-grey' : 'white';
|
|
16
|
+
}});
|
|
17
|
+
background-color: var(--redsift-color-neutral-${_ref2 => {
|
|
18
|
+
let {
|
|
19
|
+
$theme
|
|
20
|
+
} = _ref2;
|
|
21
|
+
return $theme === Theme.light ? 'white' : 'x-dark-grey';
|
|
22
|
+
}});
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
box-shadow: 0px 1px 2px rgba(0, 0, 0, ${_ref3 => {
|
|
25
|
+
let {
|
|
26
|
+
$theme
|
|
27
|
+
} = _ref3;
|
|
28
|
+
return $theme === Theme.light ? '0.5' : '1';
|
|
29
|
+
}});
|
|
30
|
+
box-sizing: content-box;
|
|
31
|
+
padding: 16px;
|
|
32
|
+
|
|
33
|
+
.redsift-detailed-card__banner {
|
|
34
|
+
background-color: ${_ref4 => {
|
|
35
|
+
let {
|
|
36
|
+
$color
|
|
37
|
+
} = _ref4;
|
|
38
|
+
return css`var(--redsift-color-notifications-${$color}-primary)`;
|
|
39
|
+
}};
|
|
40
|
+
color: var(--redsift-color-neutral-white);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.redsift-detailed-card__collapse-buttons {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
export { StyledDetailedCard };
|
|
49
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/detailed-card/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { baseStyling } from '../shared';\nimport { StyledDetailedCardProps } from './types';\nimport { Theme } from '../../types';\n\n/**\n * Component style.\n */\nexport const StyledDetailedCard = styled.div<StyledDetailedCardProps>`\n ${baseStyling}\n\n color: var(--redsift-color-neutral-${({ $theme }) => ($theme === Theme.light ? 'x-dark-grey' : 'white')});\n background-color: var(--redsift-color-neutral-${({ $theme }) => ($theme === Theme.light ? 'white' : 'x-dark-grey')});\n border-radius: 4px;\n box-shadow: 0px 1px 2px rgba(0, 0, 0, ${({ $theme }) => ($theme === Theme.light ? '0.5' : '1')});\n box-sizing: content-box;\n padding: 16px;\n\n .redsift-detailed-card__banner {\n background-color: ${({ $color }) => css`var(--redsift-color-notifications-${$color}-primary)`};\n color: var(--redsift-color-neutral-white);\n }\n\n .redsift-detailed-card__collapse-buttons {\n width: 100%;\n }\n`;\n"],"names":["StyledDetailedCard","styled","div","baseStyling","_ref","$theme","Theme","light","_ref2","_ref3","_ref4","$color","css"],"mappings":";;;;AAKA;AACA;AACA;AACaA,MAAAA,kBAAkB,GAAGC,MAAM,CAACC,GAA6B,CAAA;AACtE,EAAA,EAAIC,WAAY,CAAA;AAChB;AACA,qCAAA,EAAuCC,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;AAC1G,gDAAA,EAAkDC,KAAA,IAAA;EAAA,IAAC;AAAEH,IAAAA,MAAAA;AAAO,GAAC,GAAAG,KAAA,CAAA;EAAA,OAAMH,MAAM,KAAKC,KAAK,CAACC,KAAK,GAAG,OAAO,GAAG,aAAa,CAAA;AAAA,CAAE,CAAA;AACrH;AACA,wCAAA,EAA0CE,KAAA,IAAA;EAAA,IAAC;AAAEJ,IAAAA,MAAAA;AAAO,GAAC,GAAAI,KAAA,CAAA;EAAA,OAAMJ,MAAM,KAAKC,KAAK,CAACC,KAAK,GAAG,KAAK,GAAG,GAAG,CAAA;AAAA,CAAE,CAAA;AACjG;AACA;AACA;AACA;AACA,sBAAA,EAAwBG,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,MAAAA;AAAO,GAAC,GAAAD,KAAA,CAAA;EAAA,OAAKE,GAAI,CAAoCD,kCAAAA,EAAAA,MAAO,CAAU,SAAA,CAAA,CAAA;AAAA,CAAC,CAAA;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { ShieldVariant } from '../shield/types.js';
|
|
3
|
+
import { StylingProps } from '../../types/styles.js';
|
|
4
|
+
import { NotificationsColorPalette, Theme } from '../../types/colors.js';
|
|
5
|
+
import { IconProps } from '../icon/types.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Component props.
|
|
9
|
+
*/
|
|
10
|
+
interface DetailedCardProps extends ComponentProps<'div'>, StylingProps {
|
|
11
|
+
/** Whether the component is collapsed or not. Used for controlled version. */
|
|
12
|
+
areAllCollapsed?: boolean;
|
|
13
|
+
/** Banner variant. */
|
|
14
|
+
bannerVariant?: 'standard' | 'condensed';
|
|
15
|
+
/** Banner color. */
|
|
16
|
+
color?: NotificationsColorPalette;
|
|
17
|
+
/** Default collapse status. Used for uncontrolled version. */
|
|
18
|
+
defaultAllCollapsed?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
21
|
+
* Can also be a ReactElement.
|
|
22
|
+
*/
|
|
23
|
+
icon?: IconProps['icon'];
|
|
24
|
+
/** Whether the card has buttons to collapse and expand all section items. */
|
|
25
|
+
isCollapsible?: boolean;
|
|
26
|
+
/** Whether the card is loading or not. */
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
/** Shield to display in place of the banner icon. */
|
|
29
|
+
shield?: ShieldVariant;
|
|
30
|
+
/** Theme. */
|
|
31
|
+
theme?: Theme;
|
|
32
|
+
/** Method to handle component change. */
|
|
33
|
+
onCollapseAll?(areAllCollapsed: boolean): void;
|
|
34
|
+
}
|
|
35
|
+
type StyledDetailedCardProps = Omit<DetailedCardProps, 'color'> & {
|
|
36
|
+
$color: DetailedCardProps['color'];
|
|
37
|
+
$theme: DetailedCardProps['theme'];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { DetailedCardProps, StyledDetailedCardProps };
|
package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DetailedCardCollapsibleSectionItemsProps } from './types.js';
|
|
2
|
+
import { Comp } from '../../types/helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardCollapsibleSectionItems Section component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardCollapsibleSectionItems: Comp<DetailedCardCollapsibleSectionItemsProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardCollapsibleSectionItems };
|
package/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { StyledDetailedCardCollapsibleSectionItems } from './styles.js';
|
|
5
|
+
|
|
6
|
+
const _excluded = ["caption", "children", "className", "hideBackground"];
|
|
7
|
+
const COMPONENT_NAME = 'DetailedCardCollapsibleSectionItems';
|
|
8
|
+
const CLASSNAME = 'redsift-detailed-card-collapsible-section-items';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The DetailedCardCollapsibleSectionItems Section component.
|
|
12
|
+
*/
|
|
13
|
+
const DetailedCardCollapsibleSectionItems = /*#__PURE__*/forwardRef((props, ref) => {
|
|
14
|
+
const {
|
|
15
|
+
caption,
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
hideBackground
|
|
19
|
+
} = props,
|
|
20
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
21
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardCollapsibleSectionItems, _extends({}, forwardedProps, {
|
|
22
|
+
className: classNames(DetailedCardCollapsibleSectionItems.className, className),
|
|
23
|
+
ref: ref,
|
|
24
|
+
$hideBackground: hideBackground
|
|
25
|
+
}), children, caption ? /*#__PURE__*/React__default.createElement("div", {
|
|
26
|
+
className: `${DetailedCardCollapsibleSectionItems.className}__caption`
|
|
27
|
+
}, caption) : null);
|
|
28
|
+
});
|
|
29
|
+
DetailedCardCollapsibleSectionItems.className = CLASSNAME;
|
|
30
|
+
DetailedCardCollapsibleSectionItems.displayName = COMPONENT_NAME;
|
|
31
|
+
|
|
32
|
+
export { DetailedCardCollapsibleSectionItems };
|
|
33
|
+
//# sourceMappingURL=DetailedCardCollapsibleSectionItems.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardCollapsibleSectionItems.js","sources":["../../../src/components/detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.tsx"],"sourcesContent":["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":["COMPONENT_NAME","CLASSNAME","DetailedCardCollapsibleSectionItems","forwardRef","props","ref","caption","children","className","hideBackground","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","StyledDetailedCardCollapsibleSectionItems","_extends","classNames","$hideBackground","displayName"],"mappings":";;;;;;AAOA,MAAMA,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,CAACC,yCAAyC,EAAAC,QAAA,KACpCN,cAAc,EAAA;IAClBF,SAAS,EAAES,UAAU,CAACf,mCAAmC,CAACM,SAAS,EAAEA,SAAS,CAAE;AAChFH,IAAAA,GAAG,EAAEA,GAAiC;AACtCa,IAAAA,eAAe,EAAET,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,CAACiB,WAAW,GAAGnB,cAAc;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Component style.
|
|
5
|
+
*/
|
|
6
|
+
const StyledDetailedCardCollapsibleSectionItems = styled.div`
|
|
7
|
+
${_ref => {
|
|
8
|
+
let {
|
|
9
|
+
$hideBackground
|
|
10
|
+
} = _ref;
|
|
11
|
+
return $hideBackground ? css`
|
|
12
|
+
background: none;
|
|
13
|
+
` : css`
|
|
14
|
+
background-color: var(--redsift-color-neutral-x-light-grey);
|
|
15
|
+
margin: 8px -16px;
|
|
16
|
+
padding: 8px 16px;
|
|
17
|
+
`;
|
|
18
|
+
}}
|
|
19
|
+
|
|
20
|
+
.redsift-detailed-card-collapsible-section-items__caption {
|
|
21
|
+
color: var(--redsift-color-neutral-x-dark-grey);
|
|
22
|
+
display: flex;
|
|
23
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
font-weight: 300;
|
|
26
|
+
justify-content: flex-end;
|
|
27
|
+
line-height: 14px;
|
|
28
|
+
margin: 8px 0px;
|
|
29
|
+
padding-top: 8px;
|
|
30
|
+
border-top: 1px solid var(--redsift-color-neutral-mid-grey);
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export { StyledDetailedCardCollapsibleSectionItems };
|
|
35
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/detailed-card-collapsible-section-items/styles.ts"],"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"],"names":["StyledDetailedCardCollapsibleSectionItems","styled","div","_ref","$hideBackground","css"],"mappings":";;AAGA;AACA;AACA;AACaA,MAAAA,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;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Component props.
|
|
5
|
+
*/
|
|
6
|
+
interface DetailedCardCollapsibleSectionItemsProps extends ComponentProps<'div'> {
|
|
7
|
+
/** Small caption at the bottom right corner of the collapsible area. */
|
|
8
|
+
caption?: string;
|
|
9
|
+
/** Whether the background should be hidden or not. */
|
|
10
|
+
hideBackground?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type StyledDetailedCardCollapsibleSectionItemsProps = Omit<DetailedCardCollapsibleSectionItemsProps, 'hideBackground'> & {
|
|
13
|
+
$hideBackground: DetailedCardCollapsibleSectionItemsProps['hideBackground'];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { DetailedCardCollapsibleSectionItemsProps, StyledDetailedCardCollapsibleSectionItemsProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DetailedCardHeaderProps } from './types.js';
|
|
2
|
+
import { Comp } from '../../types/helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardHeader component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardHeader: Comp<DetailedCardHeaderProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardHeader };
|