@redsift/design-system 11.5.0 → 11.6.0-muiv5-alpha.1
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 +4 -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,45 @@
|
|
|
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 { StyledDetailedCardHeader } from './styles.js';
|
|
5
|
+
import { useTheme } from '../theme/useTheme.js';
|
|
6
|
+
import { Skeleton } from '../skeleton/Skeleton.js';
|
|
7
|
+
import { Heading } from '../heading/Heading.js';
|
|
8
|
+
|
|
9
|
+
const _excluded = ["children", "className", "header", "headingProps", "isLoading"];
|
|
10
|
+
const COMPONENT_NAME = 'DetailedCardHeader';
|
|
11
|
+
const CLASSNAME = 'redsift-detailed-card-header';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The DetailedCardHeader component.
|
|
15
|
+
*/
|
|
16
|
+
const DetailedCardHeader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
17
|
+
const {
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
header,
|
|
21
|
+
headingProps,
|
|
22
|
+
isLoading
|
|
23
|
+
} = props,
|
|
24
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
25
|
+
const theme = useTheme();
|
|
26
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardHeader, _extends({}, forwardedProps, {
|
|
27
|
+
className: classNames(DetailedCardHeader.className, className),
|
|
28
|
+
ref: ref,
|
|
29
|
+
$theme: theme
|
|
30
|
+
}), header ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
|
|
31
|
+
variant: "h2",
|
|
32
|
+
isLoaded: !isLoading,
|
|
33
|
+
height: "32px",
|
|
34
|
+
marginBottom: "16px"
|
|
35
|
+
}, /*#__PURE__*/React__default.createElement(Heading, _extends({
|
|
36
|
+
as: "h2",
|
|
37
|
+
className: `${DetailedCardHeader.className}__header`,
|
|
38
|
+
variant: "h2"
|
|
39
|
+
}, headingProps), header)) : null, children);
|
|
40
|
+
});
|
|
41
|
+
DetailedCardHeader.className = CLASSNAME;
|
|
42
|
+
DetailedCardHeader.displayName = COMPONENT_NAME;
|
|
43
|
+
|
|
44
|
+
export { DetailedCardHeader };
|
|
45
|
+
//# sourceMappingURL=DetailedCardHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardHeader.js","sources":["../../../src/components/detailed-card-header/DetailedCardHeader.tsx"],"sourcesContent":["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":["COMPONENT_NAME","CLASSNAME","DetailedCardHeader","forwardRef","props","ref","children","className","header","headingProps","isLoading","forwardedProps","_objectWithoutProperties","_excluded","theme","useTheme","React","createElement","StyledDetailedCardHeader","_extends","classNames","$theme","Skeleton","Text","variant","isLoaded","height","marginBottom","Heading","as","displayName"],"mappings":";;;;;;;;;AAUA,MAAMA,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,CAACC,wBAAwB,EAAAC,QAAA,KACnBR,cAAc,EAAA;IAClBJ,SAAS,EAAEa,UAAU,CAAClB,kBAAkB,CAACK,SAAS,EAAEA,SAAS,CAAE;AAC/DF,IAAAA,GAAG,EAAEA,GAAiC;AACtCgB,IAAAA,MAAM,EAAEP,KAAAA;GAEPN,CAAAA,EAAAA,MAAM,gBACLQ,cAAA,CAAAC,aAAA,CAACK,QAAQ,CAACC,IAAI,EAAA;AAACC,IAAAA,OAAO,EAAC,IAAI;IAACC,QAAQ,EAAE,CAACf,SAAU;AAACgB,IAAAA,MAAM,EAAC,MAAM;AAACC,IAAAA,YAAY,EAAC,MAAA;AAAM,GAAA,eACjFX,cAAA,CAAAC,aAAA,CAACW,OAAO,EAAAT,QAAA,CAAA;AAACU,IAAAA,EAAE,EAAC,IAAI;AAACtB,IAAAA,SAAS,EAAG,CAAA,EAAEL,kBAAkB,CAACK,SAAU,CAAU,QAAA,CAAA;AAACiB,IAAAA,OAAO,EAAC,IAAA;GAASf,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,CAAC4B,WAAW,GAAG9B,cAAc;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Theme } from '../../types/colors.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component style.
|
|
6
|
+
*/
|
|
7
|
+
const StyledDetailedCardHeader = styled.div`
|
|
8
|
+
margin: 8px 0;
|
|
9
|
+
|
|
10
|
+
.redsift-detailed-card-header__header {
|
|
11
|
+
color: var(--redsift-color-neutral-${_ref => {
|
|
12
|
+
let {
|
|
13
|
+
$theme
|
|
14
|
+
} = _ref;
|
|
15
|
+
return $theme === Theme.light ? 'x-dark-grey' : 'white';
|
|
16
|
+
}});
|
|
17
|
+
font-family: var(--redsift-typography-font-family-poppins);
|
|
18
|
+
font-size: 32px;
|
|
19
|
+
font-weight: 500;
|
|
20
|
+
line-height: 32px;
|
|
21
|
+
margin-bottom: 16px;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export { StyledDetailedCardHeader };
|
|
26
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/detailed-card-header/styles.ts"],"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"],"names":["StyledDetailedCardHeader","styled","div","_ref","$theme","Theme","light"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,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;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { HeadingProps } from '../heading/types.js';
|
|
3
|
+
import { Theme } from '../../types/colors.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component props.
|
|
7
|
+
*/
|
|
8
|
+
interface DetailedCardHeaderProps extends ComponentProps<'div'> {
|
|
9
|
+
/** Header. */
|
|
10
|
+
header?: string;
|
|
11
|
+
/** Heading props allowing to override the component rendered by the heading without changing its style. */
|
|
12
|
+
headingProps?: Pick<HeadingProps, 'as' | 'noWrap'>;
|
|
13
|
+
/** Whether the card is loading or not. */
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
}
|
|
16
|
+
type StyledDetailedCardHeaderProps = DetailedCardHeaderProps & {
|
|
17
|
+
$theme: Theme;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { DetailedCardHeaderProps, StyledDetailedCardHeaderProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DetailedCardSectionProps } from './types.js';
|
|
2
|
+
import { Comp } from '../../types/helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardSection component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardSection: Comp<DetailedCardSectionProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardSection };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef, useState } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import intlMessages from './intl/index.js';
|
|
5
|
+
import { mdiChevronDown, mdiChevronUp } from '@redsift/icons';
|
|
6
|
+
import { isComponent } from '../../utils/isComponent.js';
|
|
7
|
+
import { StyledDetailedCardSection } from './styles.js';
|
|
8
|
+
import { useMessageFormatter } from '../../react-aria/react-aria/i18n/useMessageFormatter.js';
|
|
9
|
+
import { DetailedCardCollapsibleSectionItems } from '../detailed-card-collapsible-section-items/DetailedCardCollapsibleSectionItems.js';
|
|
10
|
+
import { Flexbox } from '../flexbox/Flexbox.js';
|
|
11
|
+
import { Skeleton } from '../skeleton/Skeleton.js';
|
|
12
|
+
import { Text } from '../text/Text.js';
|
|
13
|
+
import { Badge } from '../badge/Badge.js';
|
|
14
|
+
import { BadgeVariant } from '../badge/types.js';
|
|
15
|
+
import { IconButton } from '../icon-button/IconButton.js';
|
|
16
|
+
|
|
17
|
+
const _excluded = ["badge", "color", "children", "className", "header", "isCollapsed", "isCollapsible", "isLoading"];
|
|
18
|
+
const COMPONENT_NAME = 'DetailedCardSection';
|
|
19
|
+
const CLASSNAME = 'redsift-detailed-card-section';
|
|
20
|
+
const hasCollapsibleChildren = children => {
|
|
21
|
+
let hasCollapsible = false;
|
|
22
|
+
React__default.Children.map(children, child => {
|
|
23
|
+
if (isComponent(DetailedCardCollapsibleSectionItems)(child)) {
|
|
24
|
+
hasCollapsible = true;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return hasCollapsible;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The DetailedCardSection component.
|
|
32
|
+
*/
|
|
33
|
+
const DetailedCardSection = /*#__PURE__*/forwardRef((props, ref) => {
|
|
34
|
+
const {
|
|
35
|
+
badge,
|
|
36
|
+
color,
|
|
37
|
+
children,
|
|
38
|
+
className,
|
|
39
|
+
header,
|
|
40
|
+
isCollapsed: propsIsCollapsed,
|
|
41
|
+
isCollapsible: propsIsCollapsible = true,
|
|
42
|
+
isLoading
|
|
43
|
+
} = props,
|
|
44
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
45
|
+
const format = useMessageFormatter(intlMessages);
|
|
46
|
+
const isCollapsible = propsIsCollapsible && hasCollapsibleChildren(children);
|
|
47
|
+
const [isCollapsed, setIsCollapsed] = useState(Boolean(propsIsCollapsed));
|
|
48
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardSection, _extends({}, forwardedProps, {
|
|
49
|
+
className: classNames(DetailedCardSection.className, className),
|
|
50
|
+
ref: ref,
|
|
51
|
+
$color: color,
|
|
52
|
+
$isCollapsed: isCollapsed
|
|
53
|
+
}), /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
54
|
+
justifyContent: "space-between",
|
|
55
|
+
className: `${DetailedCardSection.className}__header`
|
|
56
|
+
}, header ? /*#__PURE__*/React__default.createElement(Skeleton.Text, {
|
|
57
|
+
variant: "body",
|
|
58
|
+
isLoaded: !isLoading,
|
|
59
|
+
fontSize: "18px",
|
|
60
|
+
lineHeight: "22px",
|
|
61
|
+
marginTop: "6px",
|
|
62
|
+
marginBottom: "12px"
|
|
63
|
+
}, /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
gap: "8px"
|
|
66
|
+
}, typeof header === 'string' ? /*#__PURE__*/React__default.createElement(Text, {
|
|
67
|
+
className: `${DetailedCardSection.className}-header__title`,
|
|
68
|
+
color: "black",
|
|
69
|
+
fontSize: "18px",
|
|
70
|
+
lineHeight: "22px"
|
|
71
|
+
}, header) : /*#__PURE__*/React__default.createElement("div", {
|
|
72
|
+
className: `${DetailedCardSection.className}-header__title`
|
|
73
|
+
}, header), badge ? /*#__PURE__*/React__default.createElement(Badge, _extends({
|
|
74
|
+
variant: BadgeVariant.standard
|
|
75
|
+
}, badge)) : null)) : null, isCollapsible && !isLoading ? /*#__PURE__*/React__default.createElement(IconButton, {
|
|
76
|
+
marginLeft: "auto",
|
|
77
|
+
"aria-label": format(isCollapsed ? 'expand' : 'collapse'),
|
|
78
|
+
className: `${DetailedCardSection.className}-header__collapse-button`,
|
|
79
|
+
color: "grey",
|
|
80
|
+
icon: isCollapsed ? mdiChevronDown : mdiChevronUp,
|
|
81
|
+
onClick: () => {
|
|
82
|
+
setIsCollapsed(isCollapsed => !isCollapsed);
|
|
83
|
+
}
|
|
84
|
+
}) : null), children);
|
|
85
|
+
});
|
|
86
|
+
DetailedCardSection.className = CLASSNAME;
|
|
87
|
+
DetailedCardSection.displayName = COMPONENT_NAME;
|
|
88
|
+
|
|
89
|
+
export { DetailedCardSection };
|
|
90
|
+
//# sourceMappingURL=DetailedCardSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardSection.js","sources":["../../../src/components/detailed-card-section/DetailedCardSection.tsx"],"sourcesContent":["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":["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","StyledDetailedCardSection","_extends","classNames","$color","$isCollapsed","Flexbox","justifyContent","Skeleton","Text","variant","isLoaded","fontSize","lineHeight","marginTop","marginBottom","alignItems","gap","Badge","BadgeVariant","standard","IconButton","marginLeft","icon","mdiChevronDown","mdiChevronUp","onClick","displayName"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,MAAMA,cAAc,GAAG,qBAAqB,CAAA;AAC5C,MAAMC,SAAS,GAAG,+BAA+B,CAAA;AAEjD,MAAMC,sBAAsB,GAAIC,QAAmB,IAAc;EAC/D,IAAIC,cAAc,GAAG,KAAK,CAAA;EAE1BC,cAAK,CAACC,QAAQ,CAACC,GAAG,CAACJ,QAAQ,EAAGK,KAAK,IAAK;AACtC,IAAA,IAAIC,WAAW,CAACC,mCAAmC,CAAC,CAACF,KAAK,CAAC,EAAE;AAC3DJ,MAAAA,cAAc,GAAG,IAAI,CAAA;AACvB,KAAA;AACF,GAAC,CAAC,CAAA;AAEF,EAAA,OAAOA,cAAc,CAAA;AACvB,CAAC,CAAA;;AAED;AACA;AACA;AACO,MAAMO,mBAAmE,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC5G,MAAM;MACJC,KAAK;MACLC,KAAK;MACLb,QAAQ;MACRc,SAAS;MACTC,MAAM;AACNC,MAAAA,WAAW,EAAEC,gBAAgB;MAC7BC,aAAa,EAAEC,kBAAkB,GAAG,IAAI;AACxCC,MAAAA,SAAAA;AAEF,KAAC,GAAGV,KAAK;AADJW,IAAAA,cAAc,GAAAC,wBAAA,CACfZ,KAAK,EAAAa,SAAA,CAAA,CAAA;AAET,EAAA,MAAMC,MAAM,GAAGC,mBAAmB,CAACC,YAAY,CAAC,CAAA;AAEhD,EAAA,MAAMR,aAAa,GAAGC,kBAAkB,IAAIpB,sBAAsB,CAACC,QAAQ,CAAC,CAAA;AAE5E,EAAA,MAAM,CAACgB,WAAW,EAAEW,cAAc,CAAC,GAAGC,QAAQ,CAAUC,OAAO,CAACZ,gBAAgB,CAAC,CAAC,CAAA;EAElF,oBACEf,cAAA,CAAA4B,aAAA,CAACC,yBAAyB,EAAAC,QAAA,KACpBX,cAAc,EAAA;IAClBP,SAAS,EAAEmB,UAAU,CAACzB,mBAAmB,CAACM,SAAS,EAAEA,SAAS,CAAE;AAChEH,IAAAA,GAAG,EAAEA,GAAiC;AACtCuB,IAAAA,MAAM,EAAErB,KAAM;AACdsB,IAAAA,YAAY,EAAEnB,WAAAA;AAAY,GAAA,CAAA,eAE1Bd,cAAA,CAAA4B,aAAA,CAACM,OAAO,EAAA;AAACC,IAAAA,cAAc,EAAC,eAAe;AAACvB,IAAAA,SAAS,EAAG,CAAA,EAAEN,mBAAmB,CAACM,SAAU,CAAA,QAAA,CAAA;GACjFC,EAAAA,MAAM,gBACLb,cAAA,CAAA4B,aAAA,CAACQ,QAAQ,CAACC,IAAI,EAAA;AACZC,IAAAA,OAAO,EAAC,MAAM;IACdC,QAAQ,EAAE,CAACrB,SAAU;AACrBsB,IAAAA,QAAQ,EAAC,MAAM;AACfC,IAAAA,UAAU,EAAC,MAAM;AACjBC,IAAAA,SAAS,EAAC,KAAK;AACfC,IAAAA,YAAY,EAAC,MAAA;AAAM,GAAA,eAEnB3C,cAAA,CAAA4B,aAAA,CAACM,OAAO,EAAA;AAACU,IAAAA,UAAU,EAAC,QAAQ;AAACC,IAAAA,GAAG,EAAC,KAAA;GAC9B,EAAA,OAAOhC,MAAM,KAAK,QAAQ,gBACzBb,cAAA,CAAA4B,aAAA,CAACS,IAAI,EAAA;AACHzB,IAAAA,SAAS,EAAG,CAAA,EAAEN,mBAAmB,CAACM,SAAU,CAAgB,cAAA,CAAA;AAC5DD,IAAAA,KAAK,EAAC,OAAO;AACb6B,IAAAA,QAAQ,EAAC,MAAM;AACfC,IAAAA,UAAU,EAAC,MAAA;AAAM,GAAA,EAEhB5B,MACG,CAAC,gBAEPb,cAAA,CAAA4B,aAAA,CAAA,KAAA,EAAA;AAAKhB,IAAAA,SAAS,EAAG,CAAA,EAAEN,mBAAmB,CAACM,SAAU,CAAA,cAAA,CAAA;GAAkBC,EAAAA,MAAY,CAChF,EACAH,KAAK,gBAAGV,cAAA,CAAA4B,aAAA,CAACkB,KAAK,EAAAhB,QAAA,CAAA;IAACQ,OAAO,EAAES,YAAY,CAACC,QAAAA;AAAS,GAAA,EAAKtC,KAAK,CAAG,CAAC,GAAG,IACzD,CACI,CAAC,GACd,IAAI,EACPM,aAAa,IAAI,CAACE,SAAS,gBAC1BlB,cAAA,CAAA4B,aAAA,CAACqB,UAAU,EAAA;AACTC,IAAAA,UAAU,EAAC,MAAM;AACjB,IAAA,YAAA,EAAY5B,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;AACZwC,IAAAA,IAAI,EAAErC,WAAW,GAAGsC,cAAc,GAAGC,YAAa;IAClDC,OAAO,EAAEA,MAAM;AACb7B,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,CAACiD,WAAW,GAAG5D,cAAc;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
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-section/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,69 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { NotificationsColorPalette, ProductColorPalette } from '../../types/colors.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component style.
|
|
6
|
+
*/
|
|
7
|
+
const StyledDetailedCardSection = styled.div`
|
|
8
|
+
margin: 8px 0;
|
|
9
|
+
|
|
10
|
+
.redsift-detailed-card-section__header {
|
|
11
|
+
${_ref => {
|
|
12
|
+
let {
|
|
13
|
+
$color
|
|
14
|
+
} = _ref;
|
|
15
|
+
return $color && Object.keys(NotificationsColorPalette).indexOf($color) !== -1 ? css`
|
|
16
|
+
border-bottom: 1px solid var(--redsift-color-notifications-${$color}-primary);
|
|
17
|
+
` : $color && Object.keys(ProductColorPalette).indexOf($color) !== -1 ? css`
|
|
18
|
+
border-bottom: 1px solid var(--redsift-color-product-${$color});
|
|
19
|
+
` : css`
|
|
20
|
+
border-bottom: 1px solid ${$color || css`var(--redsift-color-neutral-mid-grey)`};
|
|
21
|
+
`;
|
|
22
|
+
}}
|
|
23
|
+
margin-bottom: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.redsift-detailed-card-section-header__title {
|
|
27
|
+
font-size: 18px;
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
lineheight: 22px;
|
|
30
|
+
padding: 6px 0px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.redsift-detailed-card-section-header__collapse-button {
|
|
34
|
+
color: var(--redsift-color-neutral-x-dark-grey);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.redsift-detailed-card-collapsible-section-items {
|
|
38
|
+
visibility: ${_ref2 => {
|
|
39
|
+
let {
|
|
40
|
+
$isCollapsed
|
|
41
|
+
} = _ref2;
|
|
42
|
+
return !$isCollapsed ? 'visible' : 'hidden';
|
|
43
|
+
}};
|
|
44
|
+
overflow: ${_ref3 => {
|
|
45
|
+
let {
|
|
46
|
+
$isCollapsed
|
|
47
|
+
} = _ref3;
|
|
48
|
+
return !$isCollapsed ? 'visible' : 'hidden';
|
|
49
|
+
}};
|
|
50
|
+
height: ${_ref4 => {
|
|
51
|
+
let {
|
|
52
|
+
$isCollapsed
|
|
53
|
+
} = _ref4;
|
|
54
|
+
return !$isCollapsed ? 'auto' : '0px';
|
|
55
|
+
}};
|
|
56
|
+
${_ref5 => {
|
|
57
|
+
let {
|
|
58
|
+
$isCollapsed
|
|
59
|
+
} = _ref5;
|
|
60
|
+
return $isCollapsed ? css`
|
|
61
|
+
margin: unset;
|
|
62
|
+
padding: unset;
|
|
63
|
+
` : '';
|
|
64
|
+
}};
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
export { StyledDetailedCardSection };
|
|
69
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/detailed-card-section/styles.ts"],"sourcesContent":["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"],"names":["StyledDetailedCardSection","styled","div","_ref","$color","Object","keys","NotificationsColorPalette","indexOf","css","ProductColorPalette","_ref2","$isCollapsed","_ref3","_ref4","_ref5"],"mappings":";;;AAIA;AACA;AACA;AACaA,MAAAA,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,CAAC,KAAK,CAAC,CAAC,GACjEK,GAAI,CAAA;AACd,iEAAA,EAAmEL,MAAO,CAAA;AAC1E,UAAA,CAAW,GACDK,GAAI,CAAA;AACd,qCAAuCL,EAAAA,MAAM,IAAIK,GAAI,CAAuC,qCAAA,CAAA,CAAA;AAC5F,UAAW,CAAA,CAAA;AAAA,CAAC,CAAA;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAA,EAAkBE,KAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,YAAAA;AAAa,GAAC,GAAAD,KAAA,CAAA;AAAA,EAAA,OAAM,CAACC,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAA;AAAA,CAAE,CAAA;AAC/E,cAAA,EAAgBC,KAAA,IAAA;EAAA,IAAC;AAAED,IAAAA,YAAAA;AAAa,GAAC,GAAAC,KAAA,CAAA;AAAA,EAAA,OAAM,CAACD,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAA;AAAA,CAAE,CAAA;AAC7E,YAAA,EAAcE,KAAA,IAAA;EAAA,IAAC;AAAEF,IAAAA,YAAAA;AAAa,GAAC,GAAAE,KAAA,CAAA;AAAA,EAAA,OAAM,CAACF,YAAY,GAAG,MAAM,GAAG,KAAK,CAAA;AAAA,CAAE,CAAA;AACrE,IAAA,EAAMG,KAAA,IAAA;EAAA,IAAC;AAAEH,IAAAA,YAAAA;AAAa,GAAC,GAAAG,KAAA,CAAA;EAAA,OACjBH,YAAY,GACRH,GAAI,CAAA;AACd;AACA;AACA,UAAA,CAAW,GACD,EAAE,CAAA;AAAA,CAAC,CAAA;AACb;AACA;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import { BadgeProps } from '../badge/types.js';
|
|
3
|
+
import { NotificationsColorPalette, PresentationColorPalette } from '../../types/colors.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Component props.
|
|
7
|
+
*/
|
|
8
|
+
interface DetailedCardSectionProps extends ComponentProps<'div'> {
|
|
9
|
+
/** Props to pass to the badge displayed next to the title. */
|
|
10
|
+
badge?: Omit<BadgeProps, 'ref'>;
|
|
11
|
+
/** Color that will be used on the header line. */
|
|
12
|
+
color?: NotificationsColorPalette | PresentationColorPalette | (string & {});
|
|
13
|
+
/** Header. */
|
|
14
|
+
header?: string | ReactElement;
|
|
15
|
+
/** Whether the section is collapsed or not. */
|
|
16
|
+
readonly isCollapsed?: boolean;
|
|
17
|
+
/** Whether the section can be collasped or not. */
|
|
18
|
+
isCollapsible?: boolean;
|
|
19
|
+
/** Whether the card is loading or not. */
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
}
|
|
22
|
+
type StyledDetailedCardSectionProps = Omit<DetailedCardSectionProps, 'color' | 'isCollapsed'> & {
|
|
23
|
+
$color: DetailedCardSectionProps['color'];
|
|
24
|
+
$isCollapsed: DetailedCardSectionProps['isCollapsed'];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { DetailedCardSectionProps, StyledDetailedCardSectionProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DetailedCardSectionItemProps } from './types.js';
|
|
2
|
+
import { Comp } from '../../types/helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The DetailedCardSectionItems component.
|
|
6
|
+
*/
|
|
7
|
+
declare const DetailedCardSectionItem: Comp<DetailedCardSectionItemProps, HTMLDivElement>;
|
|
8
|
+
|
|
9
|
+
export { DetailedCardSectionItem };
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { StyledDetailedCardSectionItem } from './styles.js';
|
|
5
|
+
import { Shield } from '../shield/Shield.js';
|
|
6
|
+
import { Pill } from '../pill/Pill.js';
|
|
7
|
+
import { Flexbox } from '../flexbox/Flexbox.js';
|
|
8
|
+
import { Skeleton } from '../skeleton/Skeleton.js';
|
|
9
|
+
import { Icon } from '../icon/Icon.js';
|
|
10
|
+
import { Text } from '../text/Text.js';
|
|
11
|
+
|
|
12
|
+
const _excluded = ["children", "className", "description", "descriptionProps", "icon", "iconProps", "isLoading", "pill", "pillProps", "shield"];
|
|
13
|
+
const COMPONENT_NAME = 'DetailedCardSectionItem';
|
|
14
|
+
const CLASSNAME = 'redsift-detailed-card-section-item';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The DetailedCardSectionItems component.
|
|
18
|
+
*/
|
|
19
|
+
const DetailedCardSectionItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
className,
|
|
23
|
+
description,
|
|
24
|
+
descriptionProps,
|
|
25
|
+
icon,
|
|
26
|
+
iconProps,
|
|
27
|
+
isLoading,
|
|
28
|
+
pill,
|
|
29
|
+
pillProps,
|
|
30
|
+
shield
|
|
31
|
+
} = props,
|
|
32
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
33
|
+
return /*#__PURE__*/React__default.createElement(StyledDetailedCardSectionItem, _extends({}, forwardedProps, {
|
|
34
|
+
className: classNames(DetailedCardSectionItem.className, className),
|
|
35
|
+
ref: ref
|
|
36
|
+
}), /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
37
|
+
alignItems: "flex-start",
|
|
38
|
+
className: `${DetailedCardSectionItem.className}__header`
|
|
39
|
+
}, shield ? /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
40
|
+
isLoaded: !isLoading
|
|
41
|
+
}, /*#__PURE__*/React__default.createElement(Shield, {
|
|
42
|
+
variant: shield,
|
|
43
|
+
className: `${DetailedCardSectionItem.className}-header__shield`
|
|
44
|
+
})) : icon ? /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
45
|
+
isLoaded: !isLoading
|
|
46
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
47
|
+
className: `${DetailedCardSectionItem.className}-header__icon`
|
|
48
|
+
}, /*#__PURE__*/React__default.createElement(Icon, _extends({
|
|
49
|
+
icon: icon
|
|
50
|
+
}, iconProps, {
|
|
51
|
+
size: "large"
|
|
52
|
+
})))) : null, description || pill ? /*#__PURE__*/React__default.createElement("div", {
|
|
53
|
+
className: `${DetailedCardSectionItem.className}-header__description`
|
|
54
|
+
}, /*#__PURE__*/React__default.createElement(Skeleton, {
|
|
55
|
+
isLoaded: !isLoading
|
|
56
|
+
}, pill && /*#__PURE__*/React__default.createElement(Pill, _extends({
|
|
57
|
+
className: `${DetailedCardSectionItem.className}-header__pill`
|
|
58
|
+
}, pillProps), pill), typeof description === 'string' ? /*#__PURE__*/React__default.createElement(Text, descriptionProps, description) : description)) : null), children);
|
|
59
|
+
});
|
|
60
|
+
DetailedCardSectionItem.className = CLASSNAME;
|
|
61
|
+
DetailedCardSectionItem.displayName = COMPONENT_NAME;
|
|
62
|
+
|
|
63
|
+
export { DetailedCardSectionItem };
|
|
64
|
+
//# sourceMappingURL=DetailedCardSectionItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DetailedCardSectionItem.js","sources":["../../../src/components/detailed-card-section-item/DetailedCardSectionItem.tsx"],"sourcesContent":["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":["COMPONENT_NAME","CLASSNAME","DetailedCardSectionItem","forwardRef","props","ref","children","className","description","descriptionProps","icon","iconProps","isLoading","pill","pillProps","shield","forwardedProps","_objectWithoutProperties","_excluded","React","createElement","StyledDetailedCardSectionItem","_extends","classNames","Flexbox","alignItems","Skeleton","isLoaded","Shield","variant","Icon","size","Pill","Text","displayName"],"mappings":";;;;;;;;;;;;AAaA,MAAMA,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,CAACC,6BAA6B,EAAAC,QAAA,KACxBN,cAAc,EAAA;IAClBT,SAAS,EAAEgB,UAAU,CAACrB,uBAAuB,CAACK,SAAS,EAAEA,SAAS,CAAE;AACpEF,IAAAA,GAAG,EAAEA,GAAAA;AAAiC,GAAA,CAAA,eAEtCc,cAAA,CAAAC,aAAA,CAACI,OAAO,EAAA;AAACC,IAAAA,UAAU,EAAC,YAAY;AAAClB,IAAAA,SAAS,EAAG,CAAA,EAAEL,uBAAuB,CAACK,SAAU,CAAA,QAAA,CAAA;AAAU,GAAA,EACxFQ,MAAM,gBACLI,cAAA,CAAAC,aAAA,CAACM,QAAQ,EAAA;AAACC,IAAAA,QAAQ,EAAE,CAACf,SAAAA;AAAU,GAAA,eAC7BO,cAAA,CAAAC,aAAA,CAACQ,MAAM,EAAA;AAACC,IAAAA,OAAO,EAAEd,MAAO;AAACR,IAAAA,SAAS,EAAG,CAAA,EAAEL,uBAAuB,CAACK,SAAU,CAAA,eAAA,CAAA;GAAmB,CACpF,CAAC,GACTG,IAAI,gBACNS,cAAA,CAAAC,aAAA,CAACM,QAAQ,EAAA;AAACC,IAAAA,QAAQ,EAAE,CAACf,SAAAA;GACnBO,eAAAA,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKb,IAAAA,SAAS,EAAG,CAAA,EAAEL,uBAAuB,CAACK,SAAU,CAAA,aAAA,CAAA;AAAe,GAAA,eAClEY,cAAA,CAAAC,aAAA,CAACU,IAAI,EAAAR,QAAA,CAAA;AAACZ,IAAAA,IAAI,EAAEA,IAAAA;AAAK,GAAA,EAAKC,SAAS,EAAA;AAAEoB,IAAAA,IAAI,EAAC,OAAA;AAAO,GAAA,CAAE,CAC5C,CACG,CAAC,GACT,IAAI,EACPvB,WAAW,IAAIK,IAAI,gBAClBM,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKb,IAAAA,SAAS,EAAG,CAAA,EAAEL,uBAAuB,CAACK,SAAU,CAAA,oBAAA,CAAA;AAAsB,GAAA,eACzEY,cAAA,CAAAC,aAAA,CAACM,QAAQ,EAAA;AAACC,IAAAA,QAAQ,EAAE,CAACf,SAAAA;GAClBC,EAAAA,IAAI,iBACHM,cAAA,CAAAC,aAAA,CAACY,IAAI,EAAAV,QAAA,CAAA;AAACf,IAAAA,SAAS,EAAG,CAAA,EAAEL,uBAAuB,CAACK,SAAU,CAAA,aAAA,CAAA;AAAe,GAAA,EAAKO,SAAS,CAAA,EAChFD,IACG,CACP,EACA,OAAOL,WAAW,KAAK,QAAQ,gBAAGW,cAAA,CAAAC,aAAA,CAACa,IAAI,EAAKxB,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,CAACgC,WAAW,GAAGlC,cAAc;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Component style.
|
|
5
|
+
*/
|
|
6
|
+
const StyledDetailedCardSectionItem = styled.div`
|
|
7
|
+
padding: 8px 0;
|
|
8
|
+
|
|
9
|
+
.redsift-detailed-card-section-item-header__shield {
|
|
10
|
+
align-items: center;
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 28px;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
padding: 0 4px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.redsift-detailed-card-section-item-header__icon {
|
|
18
|
+
height: 28px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.redsift-detailed-card-section-item-header__pill {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
margin-right: 8px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.redsift-detailed-card-section-item-header__description {
|
|
27
|
+
line-height: 28px;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
export { StyledDetailedCardSectionItem };
|
|
34
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/detailed-card-section-item/styles.ts"],"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"],"names":["StyledDetailedCardSectionItem","styled","div"],"mappings":";;AAGA;AACA;AACA;AACaA,MAAAA,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;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import { TextProps } from '../text/types.js';
|
|
3
|
+
import { PillProps } from '../pill/types.js';
|
|
4
|
+
import { IconProps } from '../icon/types.js';
|
|
5
|
+
import { ShieldVariant } from '../shield/types.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Component props.
|
|
9
|
+
*/
|
|
10
|
+
interface DetailedCardSectionItemProps extends ComponentProps<'div'> {
|
|
11
|
+
/** Description */
|
|
12
|
+
description?: string | ReactElement;
|
|
13
|
+
/** TextProps to forward to the description. */
|
|
14
|
+
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
15
|
+
/**
|
|
16
|
+
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
17
|
+
* Can also be a ReactElement.
|
|
18
|
+
*/
|
|
19
|
+
icon?: IconProps['icon'];
|
|
20
|
+
/** Props to pass to the Icon component. */
|
|
21
|
+
iconProps?: Omit<IconProps, 'ref' | 'icon'>;
|
|
22
|
+
/** Whether the section item can be collapsed or not. */
|
|
23
|
+
isCollapsible?: boolean;
|
|
24
|
+
/** Whether the card is loading or not. */
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
/** Text to display inside a Pill. */
|
|
27
|
+
pill?: string;
|
|
28
|
+
/** Props to pass to the Pill component. */
|
|
29
|
+
pillProps?: Omit<PillProps, 'ref'>;
|
|
30
|
+
/** Shield to display in place of the icon. */
|
|
31
|
+
shield?: ShieldVariant;
|
|
32
|
+
}
|
|
33
|
+
type StyledDetailedCardSectionItemProps = DetailedCardSectionItemProps & {};
|
|
34
|
+
|
|
35
|
+
export { DetailedCardSectionItemProps, StyledDetailedCardSectionItemProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { StyledFlexbox } from './styles.js';
|
|
5
|
+
import { ThemeProvider } from '../theme/context.js';
|
|
6
|
+
import { useTheme } from '../theme/useTheme.js';
|
|
7
|
+
|
|
8
|
+
const _excluded = ["as", "children", "className", "divider", "gap", "theme"];
|
|
9
|
+
const COMPONENT_NAME = 'Flexbox';
|
|
10
|
+
const CLASSNAME = 'redsift-flex-box';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The Flexbox component.
|
|
14
|
+
*/
|
|
15
|
+
const Flexbox = /*#__PURE__*/forwardRef((props, ref) => {
|
|
16
|
+
const {
|
|
17
|
+
as,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
divider,
|
|
21
|
+
gap = '16px',
|
|
22
|
+
theme: propsTheme
|
|
23
|
+
} = props,
|
|
24
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
25
|
+
const theme = useTheme(propsTheme);
|
|
26
|
+
return /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
27
|
+
value: {
|
|
28
|
+
theme
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/React__default.createElement(StyledFlexbox, _extends({
|
|
31
|
+
as: as
|
|
32
|
+
}, forwardedProps, {
|
|
33
|
+
gap: divider ? `${divider.rowGap}px ${divider.colGap}px` : gap,
|
|
34
|
+
className: classNames(Flexbox.className, className),
|
|
35
|
+
ref: ref,
|
|
36
|
+
$divider: divider,
|
|
37
|
+
$theme: theme
|
|
38
|
+
}), children));
|
|
39
|
+
});
|
|
40
|
+
Flexbox.className = CLASSNAME;
|
|
41
|
+
Flexbox.displayName = COMPONENT_NAME;
|
|
42
|
+
|
|
43
|
+
export { Flexbox };
|
|
44
|
+
//# sourceMappingURL=Flexbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flexbox.js","sources":["../../../src/components/flexbox/Flexbox.tsx"],"sourcesContent":["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":["COMPONENT_NAME","CLASSNAME","Flexbox","forwardRef","props","ref","as","children","className","divider","gap","theme","propsTheme","forwardedProps","_objectWithoutProperties","_excluded","useTheme","React","createElement","ThemeProvider","value","StyledFlexbox","_extends","rowGap","colGap","classNames","$divider","$theme","displayName"],"mappings":";;;;;;;;AAOA,MAAMA,cAAc,GAAG,SAAS,CAAA;AAChC,MAAMC,SAAS,GAAG,kBAAkB,CAAA;;AAEpC;AACA;AACA;AACO,MAAMC,OAA2C,gBAAGC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACpF,MAAM;MAAEC,EAAE;MAAEC,QAAQ;MAAEC,SAAS;MAAEC,OAAO;AAAEC,MAAAA,GAAG,GAAG,MAAM;AAAEC,MAAAA,KAAK,EAAEC,UAAAA;AAA8B,KAAC,GAAGR,KAAK;AAAxBS,IAAAA,cAAc,GAAAC,wBAAA,CAAKV,KAAK,EAAAW,SAAA,CAAA,CAAA;AAEtG,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;AAAE,GAAA,eAC9BM,cAAA,CAAAC,aAAA,CAACG,aAAa,EAAAC,QAAA,CAAA;AACZhB,IAAAA,EAAE,EAAEA,EAAAA;AAAG,GAAA,EACHO,cAAc,EAAA;AAClBH,IAAAA,GAAG,EAAED,OAAO,GAAI,CAAA,EAAEA,OAAO,CAACc,MAAO,CAAA,GAAA,EAAKd,OAAO,CAACe,MAAO,CAAA,EAAA,CAAG,GAAGd,GAAI;IAC/DF,SAAS,EAAEiB,UAAU,CAACvB,OAAO,CAACM,SAAS,EAAEA,SAAS,CAAE;AACpDH,IAAAA,GAAG,EAAEA,GAAiC;AACtCqB,IAAAA,QAAQ,EAAEjB,OAAQ;AAClBkB,IAAAA,MAAM,EAAEhB,KAAAA;GAEPJ,CAAAA,EAAAA,QACY,CACF,CAAC,CAAA;AAEpB,CAAC,EAAC;AACFL,OAAO,CAACM,SAAS,GAAGP,SAAS,CAAA;AAC7BC,OAAO,CAAC0B,WAAW,GAAG5B,cAAc;;;;"}
|