@strapi/design-system 1.7.0 → 1.7.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/dist/Accordion/Accordion.cjs +4 -4
- package/dist/Accordion/Accordion.js +13 -71
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.js +3 -16
- package/dist/Accordion/AccordionContext.cjs +1 -1
- package/dist/Accordion/AccordionGroup.cjs +4 -4
- package/dist/Accordion/AccordionGroup.js +19 -89
- package/dist/Accordion/AccordionToggle.cjs +6 -6
- package/dist/Accordion/AccordionToggle.js +11 -101
- package/dist/Accordion/index.cjs +1 -1
- package/dist/Accordion/utils.cjs +1 -1
- package/dist/Alert/Alert.cjs +15 -15
- package/dist/Alert/Alert.js +8 -80
- package/dist/Alert/index.cjs +1 -1
- package/dist/Alert/utils.cjs +1 -1
- package/dist/Avatar/Avatar.cjs +5 -5
- package/dist/Avatar/Avatar.js +12 -56
- package/dist/Avatar/AvatarGroup.cjs +3 -3
- package/dist/Avatar/constants.cjs +1 -1
- package/dist/Avatar/index.cjs +1 -1
- package/dist/Badge/Badge.cjs +4 -4
- package/dist/Badge/Badge.js +4 -33
- package/dist/Badge/index.cjs +1 -1
- package/dist/BaseButton/BaseButton.cjs +3 -3
- package/dist/BaseButton/BaseButton.js +8 -32
- package/dist/BaseButton/index.cjs +1 -1
- package/dist/BaseCheckbox/BaseCheckbox.cjs +4 -4
- package/dist/BaseCheckbox/BaseCheckbox.js +19 -62
- package/dist/BaseCheckbox/index.cjs +1 -1
- package/dist/BaseCheckbox/utils.cjs +1 -1
- package/dist/BaseLink/BaseLink.cjs +1 -1
- package/dist/BaseLink/BaseLink.js +1 -17
- package/dist/BaseLink/index.cjs +1 -1
- package/dist/BaseRadio/BaseRadio.cjs +8 -8
- package/dist/BaseRadio/BaseRadio.js +12 -38
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.js +3 -25
- package/dist/BaseRadio/context.cjs +1 -1
- package/dist/BaseRadio/index.cjs +1 -1
- package/dist/BaseRadio/utils.cjs +1 -1
- package/dist/Box/Box.cjs +1 -1
- package/dist/Box/Box.js +47 -173
- package/dist/Box/index.cjs +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs +3 -3
- package/dist/Breadcrumbs/Breadcrumbs.js +10 -43
- package/dist/Breadcrumbs/index.cjs +1 -1
- package/dist/Button/Button.cjs +11 -11
- package/dist/Button/Button.js +7 -54
- package/dist/Button/constants.cjs +1 -1
- package/dist/Button/index.cjs +1 -1
- package/dist/Button/utils.cjs +1 -1
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.js +5 -25
- package/dist/Card/CardAction.cjs +2 -2
- package/dist/Card/CardAsset.cjs +4 -4
- package/dist/Card/CardAsset.js +5 -25
- package/dist/Card/CardBadge.cjs +3 -3
- package/dist/Card/CardBadge.js +2 -8
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.js +1 -10
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.js +5 -10
- package/dist/Card/CardContent.cjs +2 -2
- package/dist/Card/CardContent.js +1 -7
- package/dist/Card/CardContext.cjs +1 -1
- package/dist/Card/CardContext.js +1 -3
- package/dist/Card/CardHeader.cjs +2 -2
- package/dist/Card/CardHeader.js +2 -8
- package/dist/Card/CardTimer.cjs +1 -1
- package/dist/Card/CardTimer.js +1 -19
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.js +3 -17
- package/dist/Card/index.cjs +1 -1
- package/dist/CarouselInput/Carousel.cjs +6 -6
- package/dist/CarouselInput/Carousel.js +51 -42
- package/dist/CarouselInput/CarouselActions.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.js +8 -7
- package/dist/CarouselInput/CarouselImage.cjs +3 -3
- package/dist/CarouselInput/CarouselImage.js +13 -12
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.js +39 -36
- package/dist/CarouselInput/CarouselSlide.cjs +2 -2
- package/dist/CarouselInput/CarouselSlide.js +10 -9
- package/dist/CarouselInput/index.cjs +1 -1
- package/dist/Checkbox/Checkbox.cjs +3 -3
- package/dist/Checkbox/Checkbox.js +37 -32
- package/dist/Checkbox/index.cjs +1 -1
- package/dist/Combobox/Combobox.cjs +9 -9
- package/dist/Combobox/Combobox.js +52 -253
- package/dist/Combobox/ComboboxList.cjs +5 -1
- package/dist/Combobox/ComboboxList.js +6 -5
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/index.cjs +1 -1
- package/dist/DatePicker/DatePicker.cjs +5 -5
- package/dist/DatePicker/DatePicker.js +38 -56
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.js +20 -119
- package/dist/DatePicker/DatePickerTd.cjs +3 -3
- package/dist/DatePicker/DatePickerTd.js +13 -45
- package/dist/DatePicker/DatePickerTh.cjs +4 -4
- package/dist/DatePicker/DatePickerTh.js +9 -33
- package/dist/DatePicker/compareDates.cjs +1 -1
- package/dist/DatePicker/components.cjs +14 -8
- package/dist/DatePicker/components.js +17 -7
- package/dist/DatePicker/index.cjs +1 -1
- package/dist/DatePicker/utils/formatDate.cjs +1 -1
- package/dist/DatePicker/utils/generateWeeks.cjs +1 -1
- package/dist/DatePicker/utils/getDayOfWeek.cjs +1 -1
- package/dist/DatePicker/utils/getMonths.cjs +1 -1
- package/dist/DatePicker/utils/getYears.cjs +1 -1
- package/dist/DatePicker/utils/getYears.js +1 -1
- package/dist/DatePicker/utils/index.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +41 -92
- package/dist/DateTimePicker/index.cjs +1 -1
- package/dist/DateTimePicker/parseDate.cjs +1 -1
- package/dist/Dialog/Dialog.cjs +6 -6
- package/dist/Dialog/Dialog.js +41 -38
- package/dist/Dialog/DialogBody.cjs +2 -2
- package/dist/Dialog/DialogBody.js +19 -15
- package/dist/Dialog/DialogFooter.cjs +3 -3
- package/dist/Dialog/DialogFooter.js +10 -6
- package/dist/Dialog/index.cjs +1 -1
- package/dist/DismissibleLayer/index.cjs +1 -1
- package/dist/DismissibleLayer/index.js +3 -2
- package/dist/Divider/Divider.cjs +2 -2
- package/dist/Divider/Divider.js +11 -10
- package/dist/Divider/index.cjs +1 -1
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +3 -3
- package/dist/EmptyStateLayout/EmptyStateLayout.js +13 -8
- package/dist/EmptyStateLayout/index.cjs +1 -1
- package/dist/EmptyStateLayout/story-assets/Illo.cjs +1 -1
- package/dist/EmptyStateLayout/story-assets/Illo.js +71 -62
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.js +5 -26
- package/dist/Field/FieldAction.cjs +2 -2
- package/dist/Field/FieldAction.js +5 -20
- package/dist/Field/FieldContext.cjs +1 -1
- package/dist/Field/FieldError.cjs +1 -1
- package/dist/Field/FieldError.js +2 -12
- package/dist/Field/FieldHint.cjs +1 -1
- package/dist/Field/FieldHint.js +2 -12
- package/dist/Field/FieldInput.cjs +7 -7
- package/dist/Field/FieldInput.js +19 -86
- package/dist/Field/FieldLabel.cjs +4 -4
- package/dist/Field/FieldLabel.js +7 -32
- package/dist/Field/index.cjs +1 -1
- package/dist/Flex/Flex.cjs +3 -3
- package/dist/Flex/Flex.js +10 -25
- package/dist/Flex/index.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.js +14 -22
- package/dist/FocusTrap/index.cjs +1 -1
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.js +15 -14
- package/dist/Grid/GridContext.cjs +1 -1
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.js +12 -11
- package/dist/Grid/index.cjs +1 -1
- package/dist/Icon/Icon.cjs +4 -4
- package/dist/Icon/Icon.js +6 -21
- package/dist/Icon/index.cjs +1 -1
- package/dist/IconButton/IconButton.cjs +4 -4
- package/dist/IconButton/IconButton.js +28 -81
- package/dist/IconButton/index.cjs +1 -1
- package/dist/JSONInput/JSONInput.cjs +1 -1
- package/dist/JSONInput/JSONInput.js +11 -56
- package/dist/JSONInput/JSONInputContainer.cjs +3 -3
- package/dist/JSONInput/JSONInputContainer.js +7 -14
- package/dist/JSONInput/index.cjs +1 -1
- package/dist/JSONInput/utils/decorationExtension.cjs +1 -1
- package/dist/JSONInput/utils/decorationExtension.js +3 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.js +32 -39
- package/dist/KeyboardNavigable/index.cjs +1 -1
- package/dist/Layout/ActionLayout.cjs +3 -3
- package/dist/Layout/ActionLayout.js +17 -13
- package/dist/Layout/ContentLayout.cjs +1 -1
- package/dist/Layout/ContentLayout.js +8 -7
- package/dist/Layout/GridLayout.cjs +3 -3
- package/dist/Layout/HeaderLayout.cjs +4 -4
- package/dist/Layout/HeaderLayout.js +83 -59
- package/dist/Layout/Layout.cjs +3 -3
- package/dist/Layout/Layout.js +14 -10
- package/dist/Layout/TwoColsLayout.cjs +1 -1
- package/dist/Layout/TwoColsLayout.js +12 -8
- package/dist/Layout/index.cjs +1 -1
- package/dist/Link/Link.cjs +5 -5
- package/dist/Link/Link.js +9 -53
- package/dist/Link/index.cjs +1 -1
- package/dist/LinkButton/LinkButton.cjs +7 -7
- package/dist/LinkButton/LinkButton.js +8 -51
- package/dist/LinkButton/index.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.js +1 -18
- package/dist/LiveRegions/constants.cjs +1 -1
- package/dist/LiveRegions/index.cjs +1 -1
- package/dist/LiveRegions/useNotifyAT.cjs +1 -1
- package/dist/Loader/Loader.cjs +5 -5
- package/dist/Loader/Loader.js +3 -22
- package/dist/Loader/index.cjs +1 -1
- package/dist/Main/Main.cjs +2 -2
- package/dist/Main/Main.js +7 -9
- package/dist/Main/SkipToContent.cjs +2 -2
- package/dist/Main/SkipToContent.js +10 -9
- package/dist/Main/index.cjs +1 -1
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.js +16 -15
- package/dist/MainNav/MainNavContext.cjs +1 -1
- package/dist/MainNav/NavBrand.cjs +6 -6
- package/dist/MainNav/NavBrand.js +37 -21
- package/dist/MainNav/NavCondense.cjs +3 -3
- package/dist/MainNav/NavCondense.js +20 -16
- package/dist/MainNav/NavFooter.cjs +1 -1
- package/dist/MainNav/NavFooter.js +9 -8
- package/dist/MainNav/NavLink.cjs +10 -10
- package/dist/MainNav/NavLink.js +53 -43
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.js +43 -33
- package/dist/MainNav/NavSections.cjs +2 -2
- package/dist/MainNav/NavSections.js +15 -14
- package/dist/MainNav/NavUser.cjs +3 -3
- package/dist/MainNav/NavUser.js +23 -20
- package/dist/MainNav/index.cjs +1 -1
- package/dist/ModalLayout/ModalBody.cjs +2 -2
- package/dist/ModalLayout/ModalBody.js +7 -6
- package/dist/ModalLayout/ModalContext.cjs +1 -1
- package/dist/ModalLayout/ModalFooter.cjs +3 -3
- package/dist/ModalLayout/ModalFooter.js +17 -13
- package/dist/ModalLayout/ModalHeader.cjs +2 -2
- package/dist/ModalLayout/ModalHeader.js +20 -16
- package/dist/ModalLayout/ModalLayout.cjs +4 -4
- package/dist/ModalLayout/ModalLayout.js +24 -23
- package/dist/ModalLayout/index.cjs +1 -1
- package/dist/NumberInput/NumberInput.cjs +6 -6
- package/dist/NumberInput/NumberInput.js +113 -106
- package/dist/NumberInput/index.cjs +1 -1
- package/dist/Pagination/Pagination.cjs +2 -2
- package/dist/Pagination/Pagination.js +16 -15
- package/dist/Pagination/PaginationContext.cjs +1 -1
- package/dist/Pagination/components.cjs +10 -10
- package/dist/Pagination/components.js +58 -47
- package/dist/Pagination/index.cjs +1 -1
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.js +48 -100
- package/dist/Popover/index.cjs +1 -1
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.js +7 -11
- package/dist/Portal/index.cjs +1 -1
- package/dist/ProgressBar/ProgressBar.cjs +2 -2
- package/dist/ProgressBar/ProgressBar.js +19 -18
- package/dist/ProgressBar/index.cjs +1 -1
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.js +16 -12
- package/dist/Radio/index.cjs +1 -1
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.js +6 -29
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.js +4 -28
- package/dist/RawTable/RawTableContext.cjs +1 -1
- package/dist/RawTable/RawTbody.cjs +1 -1
- package/dist/RawTable/RawTbody.js +3 -11
- package/dist/RawTable/RawThead.cjs +1 -1
- package/dist/RawTable/RawThead.js +3 -11
- package/dist/RawTable/RawTr.cjs +1 -1
- package/dist/RawTable/RawTr.js +3 -13
- package/dist/RawTable/focusFocusable.cjs +1 -1
- package/dist/RawTable/index.cjs +1 -1
- package/dist/Searchbar/SearchForm.cjs +1 -1
- package/dist/Searchbar/SearchForm.js +3 -2
- package/dist/Searchbar/Searchbar.cjs +7 -7
- package/dist/Searchbar/Searchbar.js +51 -50
- package/dist/Searchbar/index.cjs +1 -1
- package/dist/Select/MultiSelect.cjs +7 -7
- package/dist/Select/MultiSelect.js +43 -206
- package/dist/Select/MultiSelectNested.cjs +3 -3
- package/dist/Select/MultiSelectNested.js +2 -20
- package/dist/Select/OptGroup.cjs +5 -1
- package/dist/Select/OptGroup.js +5 -0
- package/dist/Select/Option.cjs +5 -1
- package/dist/Select/Option.js +13 -11
- package/dist/Select/Select.cjs +6 -1
- package/dist/Select/Select.js +16 -8
- package/dist/Select/SelectList.cjs +5 -1
- package/dist/Select/SelectList.js +52 -72
- package/dist/Select/SelectParts.cjs +13 -13
- package/dist/Select/SelectParts.js +35 -153
- package/dist/Select/SingleSelect.cjs +1 -1
- package/dist/Select/SingleSelect.js +27 -117
- package/dist/Select/index.cjs +1 -1
- package/dist/SimpleMenu/SimpleMenu.cjs +11 -11
- package/dist/SimpleMenu/SimpleMenu.js +111 -92
- package/dist/SimpleMenu/index.cjs +1 -1
- package/dist/SimpleMenu/utils.cjs +1 -1
- package/dist/Stack/Stack.cjs +3 -3
- package/dist/Stack/Stack.js +7 -28
- package/dist/Stack/index.cjs +1 -1
- package/dist/Status/Status.cjs +7 -7
- package/dist/Status/Status.js +36 -24
- package/dist/Status/index.cjs +1 -1
- package/dist/SubNav/SubNav.cjs +5 -5
- package/dist/SubNav/SubNav.js +9 -9
- package/dist/SubNav/SubNavHeader.cjs +3 -3
- package/dist/SubNav/SubNavHeader.js +57 -47
- package/dist/SubNav/SubNavLink.cjs +5 -5
- package/dist/SubNav/SubNavLink.js +38 -32
- package/dist/SubNav/SubNavLinkSection.cjs +6 -6
- package/dist/SubNav/SubNavLinkSection.js +28 -21
- package/dist/SubNav/SubNavSection.cjs +3 -3
- package/dist/SubNav/SubNavSection.js +46 -39
- package/dist/SubNav/SubNavSectionLabel.cjs +4 -4
- package/dist/SubNav/SubNavSectionLabel.js +28 -25
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.js +14 -13
- package/dist/SubNav/index.cjs +1 -1
- package/dist/Switch/Switch.cjs +5 -5
- package/dist/Switch/Switch.js +33 -26
- package/dist/Switch/index.cjs +1 -1
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.js +17 -13
- package/dist/Table/TFooter.cjs +5 -5
- package/dist/Table/TFooter.js +23 -16
- package/dist/Table/Table.cjs +5 -5
- package/dist/Table/Table.js +28 -24
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.js +7 -6
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.js +8 -7
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.js +6 -5
- package/dist/Table/index.cjs +1 -1
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.js +26 -25
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.js +15 -14
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.js +64 -59
- package/dist/Tabs/TabsContext.cjs +1 -1
- package/dist/Tabs/components.cjs +12 -12
- package/dist/Tabs/index.cjs +1 -1
- package/dist/Tabs/useTabsFocus.cjs +1 -1
- package/dist/Tabs/useTabsFocus.js +1 -1
- package/dist/Tag/Tag.cjs +2 -2
- package/dist/Tag/Tag.js +6 -43
- package/dist/Tag/index.cjs +1 -1
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.js +8 -37
- package/dist/TextButton/index.cjs +1 -1
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.js +10 -41
- package/dist/TextInput/index.cjs +1 -1
- package/dist/Textarea/Textarea.cjs +2 -2
- package/dist/Textarea/Textarea.js +24 -21
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.js +25 -30
- package/dist/Textarea/index.cjs +1 -1
- package/dist/ThemeProvider/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider/ThemeProvider.js +2 -10
- package/dist/ThemeProvider/hooks.cjs +1 -1
- package/dist/ThemeProvider/index.cjs +1 -1
- package/dist/TimePicker/TimePicker.cjs +3 -3
- package/dist/TimePicker/TimePicker.js +8 -30
- package/dist/TimePicker/index.cjs +1 -1
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.js +111 -110
- package/dist/ToggleCheckbox/index.cjs +1 -1
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.js +41 -35
- package/dist/ToggleInput/index.cjs +1 -1
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.js +9 -52
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -1
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -1
- package/dist/Tooltip/index.cjs +1 -1
- package/dist/Tooltip/utils/positionTooltip.cjs +1 -1
- package/dist/Typography/Typography.cjs +8 -8
- package/dist/Typography/Typography.js +6 -21
- package/dist/Typography/constants.cjs +1 -1
- package/dist/Typography/index.cjs +1 -1
- package/dist/Typography/utils.cjs +9 -9
- package/dist/VisuallyHidden/VisuallyHidden.cjs +2 -2
- package/dist/VisuallyHidden/index.cjs +1 -1
- package/dist/helpers/deprecations.cjs +1 -1
- package/dist/helpers/escapeSelector.cjs +1 -1
- package/dist/helpers/getDefaultLocale.cjs +1 -1
- package/dist/helpers/getFocusableNodes.cjs +1 -1
- package/dist/helpers/keyboardKeys.cjs +1 -1
- package/dist/helpers/objects.cjs +1 -1
- package/dist/helpers/setOpacity.cjs +1 -1
- package/dist/helpers/setTabIndexOnFirstItem.cjs +1 -1
- package/dist/helpers/theme.cjs +1 -1
- package/dist/helpers/useElementOnScreen.cjs +4 -1
- package/dist/helpers/useElementOnScreen.js +6 -1
- package/dist/helpers/useId.cjs +4 -1
- package/dist/helpers/useId.js +6 -1
- package/dist/helpers/useIntersection.cjs +4 -1
- package/dist/helpers/useIntersection.js +6 -1
- package/dist/helpers/useLockScroll.cjs +4 -1
- package/dist/helpers/useLockScroll.js +6 -1
- package/dist/helpers/usePrevious.cjs +4 -1
- package/dist/helpers/usePrevious.js +6 -1
- package/dist/helpers/useResizeObserver.cjs +4 -1
- package/dist/helpers/useResizeObserver.js +6 -1
- package/dist/hooks/useComposeRefs.cjs +1 -1
- package/dist/hooks/useControllableState.cjs +1 -1
- package/dist/hooks/useElementOnScreen.cjs +1 -1
- package/dist/hooks/useId.cjs +1 -1
- package/dist/hooks/useIntersection.cjs +1 -1
- package/dist/hooks/useLockScroll.cjs +1 -1
- package/dist/hooks/usePrevious.cjs +1 -1
- package/dist/hooks/useResizeObserver.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +209 -209
- package/dist/themes/common-theme.cjs +1 -1
- package/dist/themes/darkTheme/dark-colors.cjs +1 -1
- package/dist/themes/darkTheme/dark-shadows.cjs +1 -1
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/extendTheme.cjs +2 -2
- package/dist/themes/index.cjs +1 -1
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/light-colors.cjs +1 -1
- package/dist/themes/lightTheme/light-shadows.cjs +1 -1
- package/dist/themes/sizes.cjs +1 -1
- package/dist/themes/sizes.js +4 -4
- package/dist/themes/utils.cjs +5 -5
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +3 -3
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +19 -15
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.js +13 -12
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.js +5 -4
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +16 -15
- package/dist/v2/Breadcrumbs/Divider.cjs +1 -1
- package/dist/v2/Breadcrumbs/Divider.js +6 -5
- package/dist/v2/Breadcrumbs/index.cjs +1 -1
- package/dist/v2/Link/Link.cjs +4 -4
- package/dist/v2/Link/Link.js +10 -39
- package/dist/v2/Link/index.cjs +1 -1
- package/dist/v2/LinkButton/LinkButton.cjs +7 -7
- package/dist/v2/LinkButton/LinkButton.js +11 -49
- package/dist/v2/LinkButton/index.cjs +1 -1
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.js +16 -15
- package/dist/v2/MainNav/MainNavContext.cjs +1 -1
- package/dist/v2/MainNav/NavBrand.cjs +6 -6
- package/dist/v2/MainNav/NavBrand.js +38 -22
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.js +20 -16
- package/dist/v2/MainNav/NavFooter.cjs +1 -1
- package/dist/v2/MainNav/NavFooter.js +9 -8
- package/dist/v2/MainNav/NavLink.cjs +10 -10
- package/dist/v2/MainNav/NavLink.js +55 -45
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.js +43 -33
- package/dist/v2/MainNav/NavSections.cjs +2 -2
- package/dist/v2/MainNav/NavSections.js +15 -14
- package/dist/v2/MainNav/NavUser.cjs +3 -3
- package/dist/v2/MainNav/NavUser.js +22 -19
- package/dist/v2/MainNav/index.cjs +1 -1
- package/dist/v2/Pagination/Pagination.cjs +2 -2
- package/dist/v2/Pagination/Pagination.js +16 -15
- package/dist/v2/Pagination/PaginationContext.cjs +1 -1
- package/dist/v2/Pagination/components.cjs +10 -10
- package/dist/v2/Pagination/components.js +50 -37
- package/dist/v2/Pagination/index.cjs +1 -1
- package/dist/v2/SimpleMenu/Menu.cjs +13 -13
- package/dist/v2/SimpleMenu/Menu.js +15 -155
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +1 -1
- package/dist/v2/SimpleMenu/SimpleMenu.js +17 -31
- package/dist/v2/SimpleMenu/index.cjs +1 -1
- package/dist/v2/SubNav/SubNav.cjs +5 -5
- package/dist/v2/SubNav/SubNav.js +9 -9
- package/dist/v2/SubNav/SubNavHeader.cjs +3 -3
- package/dist/v2/SubNav/SubNavHeader.js +57 -47
- package/dist/v2/SubNav/SubNavLink.cjs +5 -5
- package/dist/v2/SubNav/SubNavLink.js +40 -34
- package/dist/v2/SubNav/SubNavLinkSection.cjs +6 -6
- package/dist/v2/SubNav/SubNavLinkSection.js +28 -21
- package/dist/v2/SubNav/SubNavSection.cjs +3 -3
- package/dist/v2/SubNav/SubNavSection.js +48 -41
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +4 -4
- package/dist/v2/SubNav/SubNavSectionLabel.js +28 -25
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.js +14 -13
- package/dist/v2/SubNav/index.cjs +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.js +1 -1
- package/package.json +16 -19
- package/dist/DismissibleLayer/DismissibleLayer.cjs +0 -1
- package/dist/DismissibleLayer/DismissibleLayer.js +0 -30
- /package/dist/BaseCheckbox/assets/{checkmark-black.cjs → checkmark-black.svg.cjs} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark-black.js → checkmark-black.svg.js} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark.cjs → checkmark.svg.cjs} +0 -0
- /package/dist/BaseCheckbox/assets/{checkmark.js → checkmark.svg.js} +0 -0
- /package/dist/Loader/assets/{loader.cjs → loader.svg.cjs} +0 -0
- /package/dist/Loader/assets/{loader.js → loader.svg.js} +0 -0
- /package/dist/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
- /package/dist/Pagination/assets/{next.js → next.svg.js} +0 -0
- /package/dist/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
- /package/dist/Pagination/assets/{previous.js → previous.svg.js} +0 -0
- /package/dist/v2/Pagination/assets/{next.cjs → next.svg.cjs} +0 -0
- /package/dist/v2/Pagination/assets/{next.js → next.svg.js} +0 -0
- /package/dist/v2/Pagination/assets/{previous.cjs → previous.svg.cjs} +0 -0
- /package/dist/v2/Pagination/assets/{previous.js → previous.svg.js} +0 -0
|
@@ -1,43 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, Children as f } from "react";
|
|
3
|
+
import r from "prop-types";
|
|
3
4
|
import b from "styled-components";
|
|
4
|
-
import { SubNavSectionLabel as
|
|
5
|
-
import {
|
|
6
|
-
import { Box as
|
|
7
|
-
import { Flex as
|
|
8
|
-
import {
|
|
9
|
-
const k = b(
|
|
5
|
+
import { SubNavSectionLabel as v } from "./SubNavSectionLabel.js";
|
|
6
|
+
import { useId as x } from "../hooks/useId.js";
|
|
7
|
+
import { Box as d } from "../Box/Box.js";
|
|
8
|
+
import { Flex as C } from "../Flex/Flex.js";
|
|
9
|
+
import { Badge as S } from "../Badge/Badge.js";
|
|
10
|
+
const k = b(d)`
|
|
10
11
|
svg {
|
|
11
12
|
height: ${4 / 16}rem;
|
|
12
13
|
path {
|
|
13
|
-
fill: ${({ theme:
|
|
14
|
+
fill: ${({ theme: i }) => i.colors.neutral500};
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
|
-
`, p = ({ collapsable:
|
|
17
|
-
const [n,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
`, p = ({ collapsable: i, label: s, badgeLabel: t, children: c, id: m }) => {
|
|
18
|
+
const [n, h] = u(!0), l = x(m);
|
|
19
|
+
return /* @__PURE__ */ a(C, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
20
|
+
/* @__PURE__ */ o(k, { paddingLeft: 6, paddingTop: 1, paddingBottom: 1, paddingRight: 4, children: /* @__PURE__ */ a(d, { position: "relative", paddingRight: t ? 6 : 0, children: [
|
|
21
|
+
/* @__PURE__ */ o(
|
|
22
|
+
v,
|
|
23
|
+
{
|
|
24
|
+
onClick: () => {
|
|
25
|
+
h((e) => !e);
|
|
26
|
+
},
|
|
27
|
+
ariaExpanded: n,
|
|
28
|
+
ariaControls: l,
|
|
29
|
+
collapsable: i,
|
|
30
|
+
label: s
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
t && /* @__PURE__ */ o(
|
|
34
|
+
S,
|
|
35
|
+
{
|
|
36
|
+
backgroundColor: "neutral150",
|
|
37
|
+
textColor: "neutral600",
|
|
38
|
+
position: "absolute",
|
|
39
|
+
right: 0,
|
|
40
|
+
top: "50%",
|
|
41
|
+
transform: "translateY(-50%)",
|
|
42
|
+
children: t
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] }) }),
|
|
46
|
+
(!i || n) && /* @__PURE__ */ o("ol", { id: l, children: f.map(c, (e, g) => /* @__PURE__ */ o("li", { children: e }, g)) })
|
|
47
|
+
] });
|
|
41
48
|
};
|
|
42
49
|
p.defaultProps = {
|
|
43
50
|
badgeLabel: null,
|
|
@@ -46,11 +53,11 @@ p.defaultProps = {
|
|
|
46
53
|
id: void 0
|
|
47
54
|
};
|
|
48
55
|
p.propTypes = {
|
|
49
|
-
badgeLabel:
|
|
50
|
-
children:
|
|
51
|
-
collapsable:
|
|
52
|
-
id:
|
|
53
|
-
label:
|
|
56
|
+
badgeLabel: r.string,
|
|
57
|
+
children: r.node,
|
|
58
|
+
collapsable: r.bool,
|
|
59
|
+
id: r.string,
|
|
60
|
+
label: r.string.isRequired
|
|
54
61
|
};
|
|
55
62
|
export {
|
|
56
63
|
p as SubNavSection
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const p=require("@strapi/icons"),r=require("prop-types"),c=require("styled-components"),x=require("../Flex/Flex.cjs"),i=require("../Box/Box.cjs"),s=require("../Typography/Typography.cjs"),l=c(x.Flex)`
|
|
2
2
|
border: none;
|
|
3
3
|
padding: 0;
|
|
4
4
|
background: transparent;
|
|
5
|
-
`,
|
|
5
|
+
`,g=c.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
|
-
transform: rotateX(${({rotated:
|
|
9
|
-
`,o=({collapsable:
|
|
8
|
+
transform: rotateX(${({rotated:n})=>n?"0deg":"180deg"});
|
|
9
|
+
`,o=({collapsable:n,label:t,onClick:d,ariaExpanded:a,ariaControls:u})=>n?e.jsxs(l,{as:"button",onClick:d,"aria-expanded":a,"aria-controls":u,textAlign:"left",children:[e.jsx(i.Box,{paddingRight:1,children:e.jsx(s.Typography,{variant:"sigma",textColor:"neutral600",children:t})}),n&&e.jsx(g,{rotated:a,children:e.jsx(p.CarretDown,{"aria-hidden":!0})})]}):e.jsx(l,{children:e.jsx(i.Box,{paddingRight:1,children:e.jsx(s.Typography,{variant:"sigma",textColor:"neutral600",children:t})})});o.defaultProps={ariaControls:null,ariaExpanded:null,collapsable:!1,onClick(){}};o.propTypes={ariaControls:r.string,ariaExpanded:r.bool,collapsable:r.bool,label:r.string.isRequired,onClick:r.func};exports.SubNavSectionLabel=o;
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { CarretDown as g } from "@strapi/icons";
|
|
4
|
+
import o from "prop-types";
|
|
4
5
|
import p from "styled-components";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Typography as
|
|
8
|
-
const
|
|
6
|
+
import { Flex as f } from "../Flex/Flex.js";
|
|
7
|
+
import { Box as a } from "../Box/Box.js";
|
|
8
|
+
import { Typography as i } from "../Typography/Typography.js";
|
|
9
|
+
const l = p(f)`
|
|
9
10
|
border: none;
|
|
10
11
|
padding: 0;
|
|
11
12
|
background: transparent;
|
|
12
|
-
`,
|
|
13
|
+
`, u = p.div`
|
|
13
14
|
display: flex;
|
|
14
15
|
align-items: center;
|
|
15
16
|
transform: rotateX(${({ rotated: t }) => t ? "0deg" : "180deg"});
|
|
16
|
-
`,
|
|
17
|
-
|
|
17
|
+
`, d = ({ collapsable: t, label: e, onClick: s, ariaExpanded: n, ariaControls: c }) => t ? /* @__PURE__ */ m(
|
|
18
|
+
l,
|
|
18
19
|
{
|
|
19
20
|
as: "button",
|
|
20
|
-
onClick:
|
|
21
|
-
"aria-expanded":
|
|
21
|
+
onClick: s,
|
|
22
|
+
"aria-expanded": n,
|
|
22
23
|
"aria-controls": c,
|
|
23
|
-
textAlign: "left"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
textAlign: "left",
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r(a, { paddingRight: 1, children: /* @__PURE__ */ r(i, { variant: "sigma", textColor: "neutral600", children: e }) }),
|
|
27
|
+
t && /* @__PURE__ */ r(u, { rotated: n, children: /* @__PURE__ */ r(g, { "aria-hidden": !0 }) })
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(a, { paddingRight: 1, children: /* @__PURE__ */ r(i, { variant: "sigma", textColor: "neutral600", children: e }) }) });
|
|
31
|
+
d.defaultProps = {
|
|
29
32
|
ariaControls: null,
|
|
30
33
|
ariaExpanded: null,
|
|
31
34
|
collapsable: !1,
|
|
32
35
|
onClick() {
|
|
33
36
|
}
|
|
34
37
|
};
|
|
35
|
-
|
|
36
|
-
ariaControls:
|
|
37
|
-
ariaExpanded:
|
|
38
|
-
collapsable:
|
|
39
|
-
label:
|
|
40
|
-
onClick:
|
|
38
|
+
d.propTypes = {
|
|
39
|
+
ariaControls: o.string,
|
|
40
|
+
ariaExpanded: o.bool,
|
|
41
|
+
collapsable: o.bool,
|
|
42
|
+
label: o.string.isRequired,
|
|
43
|
+
onClick: o.func
|
|
41
44
|
};
|
|
42
45
|
export {
|
|
43
|
-
|
|
46
|
+
d as SubNavSectionLabel
|
|
44
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),d=require("prop-types"),l=require("../Box/Box.cjs"),a=require("../Flex/Flex.cjs"),n=({children:t,spacing:i=2,horizontal:r=!1,...o})=>e.jsx(l.Box,{paddingTop:2,paddingBottom:4,children:e.jsx(a.Flex,{as:"ol",gap:i,direction:r?"row":"column",alignItems:r?"center":"stretch",...o,children:u.Children.map(t,(s,c)=>e.jsx("li",{children:s},c))})});n.propTypes={children:d.node.isRequired};exports.SubNavSections=n;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Children as m } from "react";
|
|
3
|
+
import d from "prop-types";
|
|
3
4
|
import { Box as c } from "../Box/Box.js";
|
|
4
5
|
import { Flex as l } from "../Flex/Flex.js";
|
|
5
|
-
const
|
|
6
|
+
const s = ({ children: e, spacing: i = 2, horizontal: o = !1, ...p }) => /* @__PURE__ */ r(c, { paddingTop: 2, paddingBottom: 4, children: /* @__PURE__ */ r(
|
|
6
7
|
l,
|
|
7
8
|
{
|
|
8
9
|
as: "ol",
|
|
9
|
-
gap:
|
|
10
|
-
direction:
|
|
11
|
-
alignItems:
|
|
12
|
-
...
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
));
|
|
16
|
-
|
|
17
|
-
children:
|
|
10
|
+
gap: i,
|
|
11
|
+
direction: o ? "row" : "column",
|
|
12
|
+
alignItems: o ? "center" : "stretch",
|
|
13
|
+
...p,
|
|
14
|
+
children: m.map(e, (t, n) => /* @__PURE__ */ r("li", { children: t }, n))
|
|
15
|
+
}
|
|
16
|
+
) });
|
|
17
|
+
s.propTypes = {
|
|
18
|
+
children: d.node.isRequired
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
s as SubNavSections
|
|
21
22
|
};
|
package/dist/SubNav/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./SubNav.cjs"),u=require("./SubNavHeader.cjs"),S=require("./SubNavLink.cjs"),i=require("./SubNavLinkSection.cjs"),a=require("./SubNavSection.cjs"),n=require("./SubNavSections.cjs");exports.SubNav=e.SubNav;exports.subNavWidth=e.subNavWidth;exports.SubNavHeader=u.SubNavHeader;exports.SubNavLink=S.SubNavLink;exports.SubNavLinkSection=i.SubNavLinkSection;exports.SubNavSection=a.SubNavSection;exports.SubNavSections=n.SubNavSections;
|
package/dist/Switch/Switch.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),h=require("react"),n=require("prop-types"),d=require("styled-components"),p=require("../Flex/Flex.cjs"),f=require("../Box/Box.cjs"),t=d.div`
|
|
2
2
|
background: ${({theme:e})=>e.colors.danger500};
|
|
3
3
|
border: none;
|
|
4
4
|
border-radius: 16px;
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
transition: none;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
`,g=d.button`
|
|
31
31
|
background: transparent;
|
|
32
32
|
padding: 0;
|
|
33
33
|
border: none;
|
|
34
34
|
|
|
35
|
-
&[aria-checked='true'] ${
|
|
35
|
+
&[aria-checked='true'] ${t} {
|
|
36
36
|
background: ${({theme:e})=>e.colors.success500};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
&[aria-checked='true'] ${
|
|
39
|
+
&[aria-checked='true'] ${t}:before {
|
|
40
40
|
transform: translateX(1rem);
|
|
41
41
|
}
|
|
42
|
-
`,
|
|
42
|
+
`,o=h.forwardRef(({label:e,onChange:l,onLabel:i,offLabel:a,selected:s,visibleLabels:c,...u},b)=>r.jsx(g,{ref:b,role:"switch","aria-checked":s,"aria-label":e,onClick:l,visibleLabels:c,type:"button",...u,children:r.jsxs(p.Flex,{children:[r.jsxs(t,{children:[r.jsx("span",{children:i}),r.jsx("span",{children:a})]}),c&&r.jsx(f.Box,{as:"span","aria-hidden":!0,paddingLeft:2,color:s?"success600":"danger600",children:s?i:a})]})}));o.defaultProps={onLabel:"On",offLabel:"Off",visibleLabels:!1};o.propTypes={label:n.string.isRequired,offLabel:n.string,onChange:n.func.isRequired,onLabel:n.string,selected:n.bool.isRequired,visibleLabels:n.bool};o.displayName="Switch";exports.Switch=o;
|
package/dist/Switch/Switch.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import b from "react";
|
|
3
|
+
import r from "prop-types";
|
|
4
|
+
import l from "styled-components";
|
|
5
|
+
import { Flex as h } from "../Flex/Flex.js";
|
|
4
6
|
import { Box as m } from "../Box/Box.js";
|
|
5
|
-
|
|
6
|
-
const n = c.div`
|
|
7
|
+
const n = l.div`
|
|
7
8
|
background: ${({ theme: e }) => e.colors.danger500};
|
|
8
9
|
border: none;
|
|
9
10
|
border-radius: 16px;
|
|
@@ -32,7 +33,7 @@ const n = c.div`
|
|
|
32
33
|
transition: none;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
`,
|
|
36
|
+
`, g = l.button`
|
|
36
37
|
background: transparent;
|
|
37
38
|
padding: 0;
|
|
38
39
|
border: none;
|
|
@@ -44,36 +45,42 @@ const n = c.div`
|
|
|
44
45
|
&[aria-checked='true'] ${n}:before {
|
|
45
46
|
transform: translateX(1rem);
|
|
46
47
|
}
|
|
47
|
-
`,
|
|
48
|
-
({ label: e, onChange:
|
|
49
|
-
|
|
48
|
+
`, i = b.forwardRef(
|
|
49
|
+
({ label: e, onChange: p, onLabel: a, offLabel: s, selected: t, visibleLabels: d, ...u }, f) => /* @__PURE__ */ o(
|
|
50
|
+
g,
|
|
50
51
|
{
|
|
51
|
-
ref:
|
|
52
|
+
ref: f,
|
|
52
53
|
role: "switch",
|
|
53
|
-
"aria-checked":
|
|
54
|
+
"aria-checked": t,
|
|
54
55
|
"aria-label": e,
|
|
55
|
-
onClick:
|
|
56
|
-
visibleLabels:
|
|
56
|
+
onClick: p,
|
|
57
|
+
visibleLabels: d,
|
|
57
58
|
type: "button",
|
|
58
|
-
...u
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
...u,
|
|
60
|
+
children: /* @__PURE__ */ c(h, { children: [
|
|
61
|
+
/* @__PURE__ */ c(n, { children: [
|
|
62
|
+
/* @__PURE__ */ o("span", { children: a }),
|
|
63
|
+
/* @__PURE__ */ o("span", { children: s })
|
|
64
|
+
] }),
|
|
65
|
+
d && /* @__PURE__ */ o(m, { as: "span", "aria-hidden": !0, paddingLeft: 2, color: t ? "success600" : "danger600", children: t ? a : s })
|
|
66
|
+
] })
|
|
67
|
+
}
|
|
61
68
|
)
|
|
62
69
|
);
|
|
63
|
-
|
|
70
|
+
i.defaultProps = {
|
|
64
71
|
onLabel: "On",
|
|
65
72
|
offLabel: "Off",
|
|
66
73
|
visibleLabels: !1
|
|
67
74
|
};
|
|
68
|
-
|
|
69
|
-
label:
|
|
70
|
-
offLabel:
|
|
71
|
-
onChange:
|
|
72
|
-
onLabel:
|
|
73
|
-
selected:
|
|
74
|
-
visibleLabels:
|
|
75
|
+
i.propTypes = {
|
|
76
|
+
label: r.string.isRequired,
|
|
77
|
+
offLabel: r.string,
|
|
78
|
+
onChange: r.func.isRequired,
|
|
79
|
+
onLabel: r.string,
|
|
80
|
+
selected: r.bool.isRequired,
|
|
81
|
+
visibleLabels: r.bool
|
|
75
82
|
};
|
|
76
|
-
|
|
83
|
+
i.displayName = "Switch";
|
|
77
84
|
export {
|
|
78
|
-
|
|
85
|
+
i as Switch
|
|
79
86
|
};
|
package/dist/Switch/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Switch.cjs");exports.Switch=t.Switch;
|
package/dist/Table/Cell.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime");require("react");const o=require("prop-types"),n=require("styled-components"),i=require("../RawTable/RawCell.cjs"),a=require("../Flex/Flex.cjs"),s=n(i.RawTd)`
|
|
2
2
|
vertical-align: middle;
|
|
3
3
|
text-align: left;
|
|
4
4
|
color: ${({theme:e})=>e.colors.neutral600};
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
input {
|
|
11
11
|
vertical-align: sub;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,u=n.span`
|
|
14
14
|
svg {
|
|
15
15
|
height: ${4/16}rem;
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
17
|
+
`,t=({children:e,action:l,...c})=>r.jsx(s,{as:i.RawTh,...c,children:r.jsxs(a.Flex,{children:[e,r.jsx(u,{children:l})]})});t.defaultProps={action:void 0};t.propTypes={action:o.node,children:o.node.isRequired};const d=e=>r.jsx(s,{...e});exports.Td=d;exports.Th=t;
|
package/dist/Table/Cell.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { RawTd as
|
|
6
|
-
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import e from "prop-types";
|
|
4
|
+
import t from "styled-components";
|
|
5
|
+
import { RawTd as a, RawTh as c } from "../RawTable/RawCell.js";
|
|
6
|
+
import { Flex as d } from "../Flex/Flex.js";
|
|
7
|
+
const i = t(a)`
|
|
7
8
|
vertical-align: middle;
|
|
8
9
|
text-align: left;
|
|
9
|
-
color: ${({ theme:
|
|
10
|
+
color: ${({ theme: o }) => o.colors.neutral600};
|
|
10
11
|
outline-offset: -4px;
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -15,20 +16,23 @@ const l = o(p)`
|
|
|
15
16
|
input {
|
|
16
17
|
vertical-align: sub;
|
|
17
18
|
}
|
|
18
|
-
`,
|
|
19
|
+
`, m = t.span`
|
|
19
20
|
svg {
|
|
20
21
|
height: ${4 / 16}rem;
|
|
21
22
|
}
|
|
22
|
-
`, n = ({ children:
|
|
23
|
+
`, n = ({ children: o, action: l, ...p }) => /* @__PURE__ */ r(i, { as: c, ...p, children: /* @__PURE__ */ s(d, { children: [
|
|
24
|
+
o,
|
|
25
|
+
/* @__PURE__ */ r(m, { children: l })
|
|
26
|
+
] }) });
|
|
23
27
|
n.defaultProps = {
|
|
24
28
|
action: void 0
|
|
25
29
|
};
|
|
26
30
|
n.propTypes = {
|
|
27
|
-
action:
|
|
28
|
-
children:
|
|
31
|
+
action: e.node,
|
|
32
|
+
children: e.node.isRequired
|
|
29
33
|
};
|
|
30
|
-
const
|
|
34
|
+
const k = (o) => /* @__PURE__ */ r(i, { ...o });
|
|
31
35
|
export {
|
|
32
|
-
|
|
36
|
+
k as Td,
|
|
33
37
|
n as Th
|
|
34
38
|
};
|
package/dist/Table/TFooter.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const o=require("prop-types"),t=require("styled-components"),i=require("../Box/Box.cjs"),c=require("../Divider/Divider.cjs"),a=require("../Flex/Flex.cjs"),u=require("../Typography/Typography.cjs"),l=t(i.Box)`
|
|
2
2
|
height: ${24/16}rem;
|
|
3
3
|
width: ${24/16}rem;
|
|
4
4
|
border-radius: 50%;
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
svg path {
|
|
15
|
-
fill: ${({theme:
|
|
15
|
+
fill: ${({theme:r})=>r.colors.primary600};
|
|
16
16
|
}
|
|
17
|
-
`,
|
|
18
|
-
border-radius: 0 0 ${({theme:
|
|
17
|
+
`,p=t(i.Box)`
|
|
18
|
+
border-radius: 0 0 ${({theme:r})=>r.borderRadius} ${({theme:r})=>r.borderRadius};
|
|
19
19
|
display: block;
|
|
20
20
|
width: 100%;
|
|
21
21
|
border: none;
|
|
22
|
-
`,
|
|
22
|
+
`,n=({children:r,icon:s,...d})=>e.jsxs("div",{children:[e.jsx(c.Divider,{}),e.jsx(p,{as:"button",background:"primary100",padding:5,...d,children:e.jsxs(a.Flex,{children:[e.jsx(l,{"aria-hidden":!0,background:"primary200",children:s}),e.jsx(i.Box,{paddingLeft:3,children:e.jsx(u.Typography,{variant:"pi",fontWeight:"bold",textColor:"primary600",children:r})})]})})]});n.propTypes={children:o.string.isRequired,icon:o.node.isRequired};exports.TFooter=n;
|
package/dist/Table/TFooter.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
1
|
+
import { jsxs as e, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import d from "styled-components";
|
|
5
|
+
import { Box as o } from "../Box/Box.js";
|
|
6
|
+
import { Divider as m } from "../Divider/Divider.js";
|
|
7
|
+
import { Flex as s } from "../Flex/Flex.js";
|
|
8
|
+
import { Typography as a } from "../Typography/Typography.js";
|
|
9
|
+
const c = d(o)`
|
|
9
10
|
height: ${24 / 16}rem;
|
|
10
11
|
width: ${24 / 16}rem;
|
|
11
12
|
border-radius: 50%;
|
|
@@ -19,18 +20,24 @@ const p = i(t)`
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
svg path {
|
|
22
|
-
fill: ${({ theme:
|
|
23
|
+
fill: ${({ theme: r }) => r.colors.primary600};
|
|
23
24
|
}
|
|
24
|
-
`,
|
|
25
|
-
border-radius: 0 0 ${({ theme:
|
|
25
|
+
`, l = d(o)`
|
|
26
|
+
border-radius: 0 0 ${({ theme: r }) => r.borderRadius} ${({ theme: r }) => r.borderRadius};
|
|
26
27
|
display: block;
|
|
27
28
|
width: 100%;
|
|
28
29
|
border: none;
|
|
29
|
-
`,
|
|
30
|
-
|
|
31
|
-
children:
|
|
32
|
-
|
|
30
|
+
`, h = ({ children: r, icon: n, ...p }) => /* @__PURE__ */ e("div", { children: [
|
|
31
|
+
/* @__PURE__ */ i(m, {}),
|
|
32
|
+
/* @__PURE__ */ i(l, { as: "button", background: "primary100", padding: 5, ...p, children: /* @__PURE__ */ e(s, { children: [
|
|
33
|
+
/* @__PURE__ */ i(c, { "aria-hidden": !0, background: "primary200", children: n }),
|
|
34
|
+
/* @__PURE__ */ i(o, { paddingLeft: 3, children: /* @__PURE__ */ i(a, { variant: "pi", fontWeight: "bold", textColor: "primary600", children: r }) })
|
|
35
|
+
] }) })
|
|
36
|
+
] });
|
|
37
|
+
h.propTypes = {
|
|
38
|
+
children: t.string.isRequired,
|
|
39
|
+
icon: t.node.isRequired
|
|
33
40
|
};
|
|
34
41
|
export {
|
|
35
|
-
|
|
42
|
+
h as TFooter
|
|
36
43
|
};
|
package/dist/Table/Table.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),n=require("prop-types"),a=require("styled-components"),p=require("../RawTable/RawTable.cjs"),l=require("../Box/Box.cjs"),w=a(l.Box)`
|
|
2
2
|
overflow: hidden;
|
|
3
3
|
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
4
|
-
`,
|
|
4
|
+
`,x=a(p.RawTable)`
|
|
5
5
|
width: 100%;
|
|
6
6
|
white-space: nowrap;
|
|
7
|
-
`,
|
|
7
|
+
`,T=a(l.Box)`
|
|
8
8
|
&:before {
|
|
9
9
|
// TODO: make sure to add a token for this weird stuff
|
|
10
10
|
background: linear-gradient(90deg, #c0c0cf 0%, rgba(0, 0, 0, 0) 100%);
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
right: 0;
|
|
30
30
|
top: 0;
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,R=a(l.Box)`
|
|
33
33
|
overflow-x: auto;
|
|
34
|
-
`,
|
|
34
|
+
`,c=({colCount:e,rowCount:d,footer:u,...h})=>{const i=s.useRef(null),[f,o]=s.useState(),b=t=>{const g=t.target.scrollWidth-t.target.clientWidth;if(t.target.scrollLeft===0){o("right");return}if(t.target.scrollLeft===g){o("left");return}t.target.scrollLeft>0&&o("both")};return s.useEffect(()=>{i.current.scrollWidth>i.current.clientWidth&&o("right")},[]),r.jsxs(w,{shadow:"tableShadow",hasRadius:!0,background:"neutral0",children:[r.jsx(T,{overflowing:f,position:"relative",children:r.jsx(R,{ref:i,onScroll:b,paddingLeft:6,paddingRight:6,children:r.jsx(x,{colCount:e,rowCount:d,...h})})}),u]})};c.defaultProps={footer:void 0};c.propTypes={colCount:n.number.isRequired,footer:n.node,rowCount:n.number.isRequired};exports.Table=c;
|