@strapi/design-system 0.0.0-599b75fb-test
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/LICENSE +7 -0
- package/dist/Accordion/Accordion.cjs +23 -0
- package/dist/Accordion/Accordion.js +96 -0
- package/dist/Accordion/AccordionContent.cjs +1 -0
- package/dist/Accordion/AccordionContent.js +26 -0
- package/dist/Accordion/AccordionContext.cjs +1 -0
- package/dist/Accordion/AccordionContext.js +12 -0
- package/dist/Accordion/AccordionGroup.cjs +47 -0
- package/dist/Accordion/AccordionGroup.js +130 -0
- package/dist/Accordion/AccordionToggle.cjs +28 -0
- package/dist/Accordion/AccordionToggle.js +143 -0
- package/dist/Accordion/index.cjs +1 -0
- package/dist/Accordion/index.js +11 -0
- package/dist/Accordion/utils.cjs +1 -0
- package/dist/Accordion/utils.js +7 -0
- package/dist/Alert/Alert.cjs +35 -0
- package/dist/Alert/Alert.js +118 -0
- package/dist/Alert/index.cjs +1 -0
- package/dist/Alert/index.js +4 -0
- package/dist/Alert/utils.cjs +1 -0
- package/dist/Alert/utils.js +6 -0
- package/dist/Avatar/Avatar.cjs +18 -0
- package/dist/Avatar/Avatar.js +83 -0
- package/dist/Avatar/AvatarGroup.cjs +5 -0
- package/dist/Avatar/AvatarGroup.js +11 -0
- package/dist/Avatar/constants.cjs +1 -0
- package/dist/Avatar/constants.js +5 -0
- package/dist/Avatar/index.cjs +1 -0
- package/dist/Avatar/index.js +7 -0
- package/dist/Badge/Badge.cjs +4 -0
- package/dist/Badge/Badge.js +43 -0
- package/dist/Badge/index.cjs +1 -0
- package/dist/Badge/index.js +4 -0
- package/dist/BaseButton/BaseButton.cjs +17 -0
- package/dist/BaseButton/BaseButton.js +50 -0
- package/dist/BaseButton/index.cjs +1 -0
- package/dist/BaseButton/index.js +5 -0
- package/dist/BaseCheckbox/BaseCheckbox.cjs +62 -0
- package/dist/BaseCheckbox/BaseCheckbox.js +123 -0
- package/dist/BaseCheckbox/assets/checkmark-black.cjs +1 -0
- package/dist/BaseCheckbox/assets/checkmark-black.js +4 -0
- package/dist/BaseCheckbox/assets/checkmark.cjs +1 -0
- package/dist/BaseCheckbox/assets/checkmark.js +4 -0
- package/dist/BaseCheckbox/index.cjs +1 -0
- package/dist/BaseCheckbox/index.js +4 -0
- package/dist/BaseCheckbox/utils.cjs +1 -0
- package/dist/BaseCheckbox/utils.js +4 -0
- package/dist/BaseLink/BaseLink.cjs +3 -0
- package/dist/BaseLink/BaseLink.js +24 -0
- package/dist/BaseLink/index.cjs +1 -0
- package/dist/BaseLink/index.js +4 -0
- package/dist/BaseRadio/BaseRadio.cjs +31 -0
- package/dist/BaseRadio/BaseRadio.js +84 -0
- package/dist/BaseRadio/RadioGroup.cjs +1 -0
- package/dist/BaseRadio/RadioGroup.js +37 -0
- package/dist/BaseRadio/context.cjs +1 -0
- package/dist/BaseRadio/context.js +10 -0
- package/dist/BaseRadio/index.cjs +1 -0
- package/dist/BaseRadio/index.js +6 -0
- package/dist/BaseRadio/utils.cjs +1 -0
- package/dist/BaseRadio/utils.js +6 -0
- package/dist/Box/Box.cjs +79 -0
- package/dist/Box/Box.js +221 -0
- package/dist/Box/index.cjs +1 -0
- package/dist/Box/index.js +4 -0
- package/dist/Breadcrumbs/Breadcrumbs.cjs +16 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +63 -0
- package/dist/Breadcrumbs/index.cjs +1 -0
- package/dist/Breadcrumbs/index.js +5 -0
- package/dist/Button/Button.cjs +31 -0
- package/dist/Button/Button.js +98 -0
- package/dist/Button/constants.cjs +1 -0
- package/dist/Button/constants.js +14 -0
- package/dist/Button/index.cjs +1 -0
- package/dist/Button/index.js +5 -0
- package/dist/Button/utils.cjs +87 -0
- package/dist/Button/utils.js +112 -0
- package/dist/Card/Card.cjs +1 -0
- package/dist/Card/Card.js +32 -0
- package/dist/Card/CardAction.cjs +6 -0
- package/dist/Card/CardAction.js +20 -0
- package/dist/Card/CardAsset.cjs +19 -0
- package/dist/Card/CardAsset.js +48 -0
- package/dist/Card/CardBadge.cjs +6 -0
- package/dist/Card/CardBadge.js +18 -0
- package/dist/Card/CardBody.cjs +1 -0
- package/dist/Card/CardBody.js +16 -0
- package/dist/Card/CardCheckbox.cjs +1 -0
- package/dist/Card/CardCheckbox.js +19 -0
- package/dist/Card/CardContent.cjs +3 -0
- package/dist/Card/CardContent.js +15 -0
- package/dist/Card/CardContext.cjs +1 -0
- package/dist/Card/CardContext.js +8 -0
- package/dist/Card/CardHeader.cjs +3 -0
- package/dist/Card/CardHeader.js +15 -0
- package/dist/Card/CardTimer.cjs +1 -0
- package/dist/Card/CardTimer.js +25 -0
- package/dist/Card/CardTitle.cjs +1 -0
- package/dist/Card/CardTitle.js +25 -0
- package/dist/Card/index.cjs +1 -0
- package/dist/Card/index.js +23 -0
- package/dist/CarouselInput/Carousel.cjs +14 -0
- package/dist/CarouselInput/Carousel.js +85 -0
- package/dist/CarouselInput/CarouselActions.cjs +1 -0
- package/dist/CarouselInput/CarouselActions.js +18 -0
- package/dist/CarouselInput/CarouselImage.cjs +4 -0
- package/dist/CarouselInput/CarouselImage.js +26 -0
- package/dist/CarouselInput/CarouselInput.cjs +1 -0
- package/dist/CarouselInput/CarouselInput.js +75 -0
- package/dist/CarouselInput/CarouselSlide.cjs +3 -0
- package/dist/CarouselInput/CarouselSlide.js +30 -0
- package/dist/CarouselInput/index.cjs +1 -0
- package/dist/CarouselInput/index.js +12 -0
- package/dist/Checkbox/Checkbox.cjs +7 -0
- package/dist/Checkbox/Checkbox.js +45 -0
- package/dist/Checkbox/index.cjs +1 -0
- package/dist/Checkbox/index.js +4 -0
- package/dist/Combobox/Combobox.cjs +1 -0
- package/dist/Combobox/Combobox.js +287 -0
- package/dist/Combobox/ComboboxList.cjs +1 -0
- package/dist/Combobox/ComboboxList.js +8 -0
- package/dist/Combobox/ComboboxOption.cjs +1 -0
- package/dist/Combobox/ComboboxOption.js +31 -0
- package/dist/Combobox/components.cjs +53 -0
- package/dist/Combobox/components.js +64 -0
- package/dist/Combobox/index.cjs +1 -0
- package/dist/Combobox/index.js +7 -0
- package/dist/Combobox/utils.cjs +1 -0
- package/dist/Combobox/utils.js +78 -0
- package/dist/DatePicker/DatePicker.cjs +8 -0
- package/dist/DatePicker/DatePicker.js +83 -0
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -0
- package/dist/DatePicker/DatePickerCalendar.js +142 -0
- package/dist/DatePicker/DatePickerTd.cjs +19 -0
- package/dist/DatePicker/DatePickerTd.js +61 -0
- package/dist/DatePicker/DatePickerTh.cjs +9 -0
- package/dist/DatePicker/DatePickerTh.js +42 -0
- package/dist/DatePicker/compareDates.cjs +1 -0
- package/dist/DatePicker/compareDates.js +4 -0
- package/dist/DatePicker/components.cjs +33 -0
- package/dist/DatePicker/components.js +43 -0
- package/dist/DatePicker/index.cjs +1 -0
- package/dist/DatePicker/index.js +4 -0
- package/dist/DatePicker/utils/formatDate.cjs +1 -0
- package/dist/DatePicker/utils/formatDate.js +4 -0
- package/dist/DatePicker/utils/generateWeeks.cjs +1 -0
- package/dist/DatePicker/utils/generateWeeks.js +17 -0
- package/dist/DatePicker/utils/getDayOfWeek.cjs +1 -0
- package/dist/DatePicker/utils/getDayOfWeek.js +15 -0
- package/dist/DatePicker/utils/getMonths.cjs +1 -0
- package/dist/DatePicker/utils/getMonths.js +7 -0
- package/dist/DatePicker/utils/getYears.cjs +1 -0
- package/dist/DatePicker/utils/getYears.js +9 -0
- package/dist/DatePicker/utils/index.cjs +1 -0
- package/dist/DatePicker/utils/index.js +12 -0
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -0
- package/dist/DateTimePicker/DateTimePicker.js +107 -0
- package/dist/DateTimePicker/index.cjs +1 -0
- package/dist/DateTimePicker/index.js +4 -0
- package/dist/Dialog/Dialog.cjs +11 -0
- package/dist/Dialog/Dialog.js +56 -0
- package/dist/Dialog/DialogBody.cjs +10 -0
- package/dist/Dialog/DialogBody.js +26 -0
- package/dist/Dialog/DialogFooter.cjs +9 -0
- package/dist/Dialog/DialogFooter.js +26 -0
- package/dist/Dialog/index.cjs +1 -0
- package/dist/Dialog/index.js +8 -0
- package/dist/DismissibleLayer/DismissibleLayer.cjs +1 -0
- package/dist/DismissibleLayer/DismissibleLayer.js +30 -0
- package/dist/DismissibleLayer/index.cjs +1 -0
- package/dist/DismissibleLayer/index.js +4 -0
- package/dist/Divider/Divider.cjs +7 -0
- package/dist/Divider/Divider.js +22 -0
- package/dist/Divider/index.cjs +1 -0
- package/dist/Divider/index.js +4 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +10 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.js +30 -0
- package/dist/EmptyStateLayout/index.cjs +1 -0
- package/dist/EmptyStateLayout/index.js +4 -0
- package/dist/EmptyStateLayout/story-assets/Illo.cjs +1 -0
- package/dist/EmptyStateLayout/story-assets/Illo.js +64 -0
- package/dist/Field/Field.cjs +1 -0
- package/dist/Field/Field.js +33 -0
- package/dist/Field/FieldAction.cjs +4 -0
- package/dist/Field/FieldAction.js +31 -0
- package/dist/Field/FieldContext.cjs +1 -0
- package/dist/Field/FieldContext.js +6 -0
- package/dist/Field/FieldError.cjs +1 -0
- package/dist/Field/FieldError.js +20 -0
- package/dist/Field/FieldHint.cjs +1 -0
- package/dist/Field/FieldHint.js +20 -0
- package/dist/Field/FieldInput.cjs +41 -0
- package/dist/Field/FieldInput.js +130 -0
- package/dist/Field/FieldLabel.cjs +12 -0
- package/dist/Field/FieldLabel.js +50 -0
- package/dist/Field/index.cjs +1 -0
- package/dist/Field/index.js +18 -0
- package/dist/Flex/Flex.cjs +9 -0
- package/dist/Flex/Flex.js +34 -0
- package/dist/Flex/index.cjs +1 -0
- package/dist/Flex/index.js +4 -0
- package/dist/FocusTrap/FocusTrap.cjs +1 -0
- package/dist/FocusTrap/FocusTrap.js +41 -0
- package/dist/FocusTrap/index.cjs +1 -0
- package/dist/FocusTrap/index.js +4 -0
- package/dist/Grid/Grid.cjs +5 -0
- package/dist/Grid/Grid.js +25 -0
- package/dist/Grid/GridContext.cjs +1 -0
- package/dist/Grid/GridContext.js +6 -0
- package/dist/Grid/GridItem.cjs +12 -0
- package/dist/Grid/GridItem.js +33 -0
- package/dist/Grid/index.cjs +1 -0
- package/dist/Grid/index.js +6 -0
- package/dist/Icon/Icon.cjs +6 -0
- package/dist/Icon/Icon.js +30 -0
- package/dist/Icon/index.cjs +1 -0
- package/dist/Icon/index.js +4 -0
- package/dist/IconButton/IconButton.cjs +81 -0
- package/dist/IconButton/IconButton.js +152 -0
- package/dist/IconButton/index.cjs +1 -0
- package/dist/IconButton/index.js +5 -0
- package/dist/JSONInput/JSONInput.cjs +1 -0
- package/dist/JSONInput/JSONInput.js +109 -0
- package/dist/JSONInput/JSONInputContainer.cjs +33 -0
- package/dist/JSONInput/JSONInputContainer.js +46 -0
- package/dist/JSONInput/index.cjs +1 -0
- package/dist/JSONInput/index.js +4 -0
- package/dist/JSONInput/utils/decorationExtension.cjs +1 -0
- package/dist/JSONInput/utils/decorationExtension.js +24 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.js +53 -0
- package/dist/KeyboardNavigable/index.cjs +1 -0
- package/dist/KeyboardNavigable/index.js +4 -0
- package/dist/Layout/ActionLayout.cjs +9 -0
- package/dist/Layout/ActionLayout.js +25 -0
- package/dist/Layout/ContentLayout.cjs +1 -0
- package/dist/Layout/ContentLayout.js +10 -0
- package/dist/Layout/GridLayout.cjs +5 -0
- package/dist/Layout/GridLayout.js +13 -0
- package/dist/Layout/HeaderLayout.cjs +3 -0
- package/dist/Layout/HeaderLayout.js +103 -0
- package/dist/Layout/Layout.cjs +6 -0
- package/dist/Layout/Layout.js +20 -0
- package/dist/Layout/TwoColsLayout.cjs +1 -0
- package/dist/Layout/TwoColsLayout.js +13 -0
- package/dist/Layout/index.cjs +1 -0
- package/dist/Layout/index.js +15 -0
- package/dist/Link/Link.cjs +33 -0
- package/dist/Link/Link.js +88 -0
- package/dist/Link/index.cjs +1 -0
- package/dist/Link/index.js +4 -0
- package/dist/LinkButton/LinkButton.cjs +15 -0
- package/dist/LinkButton/LinkButton.js +72 -0
- package/dist/LinkButton/index.cjs +1 -0
- package/dist/LinkButton/index.js +4 -0
- package/dist/LiveRegions/LiveRegions.cjs +1 -0
- package/dist/LiveRegions/LiveRegions.js +24 -0
- package/dist/LiveRegions/constants.cjs +1 -0
- package/dist/LiveRegions/constants.js +8 -0
- package/dist/LiveRegions/index.cjs +1 -0
- package/dist/LiveRegions/index.js +6 -0
- package/dist/LiveRegions/useNotifyAT.cjs +1 -0
- package/dist/LiveRegions/useNotifyAT.js +17 -0
- package/dist/Loader/Loader.cjs +12 -0
- package/dist/Loader/Loader.js +39 -0
- package/dist/Loader/assets/loader.cjs +1 -0
- package/dist/Loader/assets/loader.js +4 -0
- package/dist/Loader/index.cjs +1 -0
- package/dist/Loader/index.js +4 -0
- package/dist/Main/Main.cjs +6 -0
- package/dist/Main/Main.js +21 -0
- package/dist/Main/SkipToContent.cjs +11 -0
- package/dist/Main/SkipToContent.js +33 -0
- package/dist/Main/index.cjs +1 -0
- package/dist/Main/index.js +6 -0
- package/dist/MainNav/MainNav.cjs +4 -0
- package/dist/MainNav/MainNav.js +32 -0
- package/dist/MainNav/MainNavContext.cjs +1 -0
- package/dist/MainNav/MainNavContext.js +6 -0
- package/dist/MainNav/NavBrand.cjs +12 -0
- package/dist/MainNav/NavBrand.js +33 -0
- package/dist/MainNav/NavCondense.cjs +20 -0
- package/dist/MainNav/NavCondense.js +36 -0
- package/dist/MainNav/NavFooter.cjs +1 -0
- package/dist/MainNav/NavFooter.js +11 -0
- package/dist/MainNav/NavLink.cjs +69 -0
- package/dist/MainNav/NavLink.js +93 -0
- package/dist/MainNav/NavSection.cjs +1 -0
- package/dist/MainNav/NavSection.js +36 -0
- package/dist/MainNav/NavSections.cjs +4 -0
- package/dist/MainNav/NavSections.js +25 -0
- package/dist/MainNav/NavUser.cjs +3 -0
- package/dist/MainNav/NavUser.js +29 -0
- package/dist/MainNav/index.cjs +1 -0
- package/dist/MainNav/index.js +18 -0
- package/dist/ModalLayout/ModalBody.cjs +4 -0
- package/dist/ModalLayout/ModalBody.js +10 -0
- package/dist/ModalLayout/ModalContext.cjs +1 -0
- package/dist/ModalLayout/ModalContext.js +6 -0
- package/dist/ModalLayout/ModalFooter.cjs +8 -0
- package/dist/ModalLayout/ModalFooter.js +24 -0
- package/dist/ModalLayout/ModalHeader.cjs +4 -0
- package/dist/ModalLayout/ModalHeader.js +25 -0
- package/dist/ModalLayout/ModalLayout.cjs +6 -0
- package/dist/ModalLayout/ModalLayout.js +35 -0
- package/dist/ModalLayout/index.cjs +1 -0
- package/dist/ModalLayout/index.js +10 -0
- package/dist/NumberInput/NumberInput.cjs +12 -0
- package/dist/NumberInput/NumberInput.js +172 -0
- package/dist/NumberInput/index.cjs +1 -0
- package/dist/NumberInput/index.js +4 -0
- package/dist/Pagination/Pagination.cjs +5 -0
- package/dist/Pagination/Pagination.js +25 -0
- package/dist/Pagination/PaginationContext.cjs +1 -0
- package/dist/Pagination/PaginationContext.js +6 -0
- package/dist/Pagination/assets/next.cjs +1 -0
- package/dist/Pagination/assets/next.js +4 -0
- package/dist/Pagination/assets/previous.cjs +1 -0
- package/dist/Pagination/assets/previous.js +4 -0
- package/dist/Pagination/components.cjs +36 -0
- package/dist/Pagination/components.js +103 -0
- package/dist/Pagination/index.cjs +1 -0
- package/dist/Pagination/index.js +9 -0
- package/dist/Popover/Popover.cjs +26 -0
- package/dist/Popover/Popover.js +132 -0
- package/dist/Popover/index.cjs +1 -0
- package/dist/Popover/index.js +11 -0
- package/dist/Portal/Portal.cjs +1 -0
- package/dist/Portal/Portal.js +13 -0
- package/dist/Portal/index.cjs +1 -0
- package/dist/Portal/index.js +4 -0
- package/dist/ProgressBar/ProgressBar.cjs +11 -0
- package/dist/ProgressBar/ProgressBar.js +47 -0
- package/dist/ProgressBar/index.cjs +1 -0
- package/dist/ProgressBar/index.js +4 -0
- package/dist/Radio/Radio.cjs +4 -0
- package/dist/Radio/Radio.js +17 -0
- package/dist/Radio/index.cjs +1 -0
- package/dist/Radio/index.js +6 -0
- package/dist/RawTable/RawCell.cjs +1 -0
- package/dist/RawTable/RawCell.js +83 -0
- package/dist/RawTable/RawTable.cjs +1 -0
- package/dist/RawTable/RawTable.js +77 -0
- package/dist/RawTable/RawTableContext.cjs +1 -0
- package/dist/RawTable/RawTableContext.js +12 -0
- package/dist/RawTable/RawTbody.cjs +1 -0
- package/dist/RawTable/RawTbody.js +17 -0
- package/dist/RawTable/RawThead.cjs +1 -0
- package/dist/RawTable/RawThead.js +17 -0
- package/dist/RawTable/RawTr.cjs +1 -0
- package/dist/RawTable/RawTr.js +23 -0
- package/dist/RawTable/focusFocusable.cjs +1 -0
- package/dist/RawTable/focusFocusable.js +7 -0
- package/dist/RawTable/index.cjs +1 -0
- package/dist/RawTable/index.js +13 -0
- package/dist/Searchbar/SearchForm.cjs +1 -0
- package/dist/Searchbar/SearchForm.js +5 -0
- package/dist/Searchbar/Searchbar.cjs +29 -0
- package/dist/Searchbar/Searchbar.js +75 -0
- package/dist/Searchbar/index.cjs +1 -0
- package/dist/Searchbar/index.js +6 -0
- package/dist/Select/MultiSelectNested.cjs +1 -0
- package/dist/Select/MultiSelectNested.js +14 -0
- package/dist/Select/OptGroup.cjs +1 -0
- package/dist/Select/OptGroup.js +24 -0
- package/dist/Select/Option.cjs +45 -0
- package/dist/Select/Option.js +102 -0
- package/dist/Select/Select.cjs +3 -0
- package/dist/Select/Select.js +209 -0
- package/dist/Select/SelectButton.cjs +19 -0
- package/dist/Select/SelectButton.js +69 -0
- package/dist/Select/SelectList.cjs +1 -0
- package/dist/Select/SelectList.js +87 -0
- package/dist/Select/SelectTags.cjs +6 -0
- package/dist/Select/SelectTags.js +38 -0
- package/dist/Select/components.cjs +39 -0
- package/dist/Select/components.js +48 -0
- package/dist/Select/constants.cjs +1 -0
- package/dist/Select/constants.js +8 -0
- package/dist/Select/hooks/useButtonRef.cjs +1 -0
- package/dist/Select/hooks/useButtonRef.js +13 -0
- package/dist/Select/hooks/useListRef.cjs +1 -0
- package/dist/Select/hooks/useListRef.js +18 -0
- package/dist/Select/index.cjs +1 -0
- package/dist/Select/index.js +12 -0
- package/dist/Select/utils.cjs +1 -0
- package/dist/Select/utils.js +17 -0
- package/dist/SimpleMenu/SimpleMenu.cjs +35 -0
- package/dist/SimpleMenu/SimpleMenu.js +179 -0
- package/dist/SimpleMenu/index.cjs +1 -0
- package/dist/SimpleMenu/index.js +5 -0
- package/dist/SimpleMenu/utils.cjs +12 -0
- package/dist/SimpleMenu/utils.js +15 -0
- package/dist/Stack/Stack.cjs +19 -0
- package/dist/Stack/Stack.js +56 -0
- package/dist/Stack/index.cjs +1 -0
- package/dist/Stack/index.js +4 -0
- package/dist/Status/Status.cjs +11 -0
- package/dist/Status/Status.js +48 -0
- package/dist/Status/index.cjs +1 -0
- package/dist/Status/index.js +4 -0
- package/dist/SubNav/SubNav.cjs +10 -0
- package/dist/SubNav/SubNav.js +22 -0
- package/dist/SubNav/SubNavHeader.cjs +4 -0
- package/dist/SubNav/SubNavHeader.js +76 -0
- package/dist/SubNav/SubNavLink.cjs +39 -0
- package/dist/SubNav/SubNavLink.js +75 -0
- package/dist/SubNav/SubNavLinkSection.cjs +19 -0
- package/dist/SubNav/SubNavLinkSection.js +44 -0
- package/dist/SubNav/SubNavSection.cjs +8 -0
- package/dist/SubNav/SubNavSection.js +57 -0
- package/dist/SubNav/SubNavSectionLabel.cjs +9 -0
- package/dist/SubNav/SubNavSectionLabel.js +44 -0
- package/dist/SubNav/SubNavSections.cjs +1 -0
- package/dist/SubNav/SubNavSections.js +21 -0
- package/dist/SubNav/index.cjs +1 -0
- package/dist/SubNav/index.js +15 -0
- package/dist/Switch/Switch.cjs +42 -0
- package/dist/Switch/Switch.js +79 -0
- package/dist/Switch/index.cjs +1 -0
- package/dist/Switch/index.js +4 -0
- package/dist/Table/Cell.cjs +17 -0
- package/dist/Table/Cell.js +34 -0
- package/dist/Table/TFooter.cjs +22 -0
- package/dist/Table/TFooter.js +36 -0
- package/dist/Table/Table.cjs +34 -0
- package/dist/Table/Table.js +66 -0
- package/dist/Table/Tbody.cjs +5 -0
- package/dist/Table/Tbody.js +11 -0
- package/dist/Table/Thead.cjs +3 -0
- package/dist/Table/Thead.js +9 -0
- package/dist/Table/Tr.cjs +20 -0
- package/dist/Table/Tr.js +26 -0
- package/dist/Table/index.cjs +1 -0
- package/dist/Table/index.js +15 -0
- package/dist/Tabs/TabGroup.cjs +1 -0
- package/dist/Tabs/TabGroup.js +39 -0
- package/dist/Tabs/TabPanels.cjs +1 -0
- package/dist/Tabs/TabPanels.js +24 -0
- package/dist/Tabs/Tabs.cjs +5 -0
- package/dist/Tabs/Tabs.js +126 -0
- package/dist/Tabs/TabsContext.cjs +1 -0
- package/dist/Tabs/TabsContext.js +6 -0
- package/dist/Tabs/components.cjs +43 -0
- package/dist/Tabs/components.js +52 -0
- package/dist/Tabs/index.cjs +1 -0
- package/dist/Tabs/index.js +10 -0
- package/dist/Tabs/useTabsFocus.cjs +1 -0
- package/dist/Tabs/useTabsFocus.js +17 -0
- package/dist/Tag/Tag.cjs +14 -0
- package/dist/Tag/Tag.js +60 -0
- package/dist/Tag/index.cjs +1 -0
- package/dist/Tag/index.js +4 -0
- package/dist/TextButton/TextButton.cjs +32 -0
- package/dist/TextButton/TextButton.js +83 -0
- package/dist/TextButton/index.cjs +1 -0
- package/dist/TextButton/index.js +4 -0
- package/dist/TextInput/TextInput.cjs +1 -0
- package/dist/TextInput/TextInput.js +52 -0
- package/dist/TextInput/index.cjs +1 -0
- package/dist/TextInput/index.js +4 -0
- package/dist/Textarea/Textarea.cjs +15 -0
- package/dist/Textarea/Textarea.js +58 -0
- package/dist/Textarea/TextareaInput.cjs +30 -0
- package/dist/Textarea/TextareaInput.js +70 -0
- package/dist/Textarea/index.cjs +1 -0
- package/dist/Textarea/index.js +4 -0
- package/dist/ThemeProvider/ThemeProvider.cjs +173 -0
- package/dist/ThemeProvider/ThemeProvider.js +187 -0
- package/dist/ThemeProvider/hooks.cjs +1 -0
- package/dist/ThemeProvider/hooks.js +5 -0
- package/dist/ThemeProvider/index.cjs +1 -0
- package/dist/ThemeProvider/index.js +6 -0
- package/dist/TimePicker/TimePicker.cjs +10 -0
- package/dist/TimePicker/TimePicker.js +58 -0
- package/dist/TimePicker/index.cjs +1 -0
- package/dist/TimePicker/index.js +4 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +36 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.js +154 -0
- package/dist/ToggleCheckbox/index.cjs +1 -0
- package/dist/ToggleCheckbox/index.js +4 -0
- package/dist/ToggleInput/ToggleInput.cjs +6 -0
- package/dist/ToggleInput/ToggleInput.js +70 -0
- package/dist/ToggleInput/index.cjs +1 -0
- package/dist/ToggleInput/index.js +4 -0
- package/dist/Tooltip/Tooltip.cjs +5 -0
- package/dist/Tooltip/Tooltip.js +69 -0
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +1 -0
- package/dist/Tooltip/hooks/useTooltipHandlers.js +22 -0
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +1 -0
- package/dist/Tooltip/hooks/useTooltipLayout.js +17 -0
- package/dist/Tooltip/index.cjs +1 -0
- package/dist/Tooltip/index.js +4 -0
- package/dist/Tooltip/utils/positionTooltip.cjs +1 -0
- package/dist/Tooltip/utils/positionTooltip.js +27 -0
- package/dist/Typography/Typography.cjs +14 -0
- package/dist/Typography/Typography.js +40 -0
- package/dist/Typography/constants.cjs +1 -0
- package/dist/Typography/constants.js +11 -0
- package/dist/Typography/index.cjs +1 -0
- package/dist/Typography/index.js +4 -0
- package/dist/Typography/utils.cjs +34 -0
- package/dist/Typography/utils.js +59 -0
- package/dist/VisuallyHidden/VisuallyHidden.cjs +10 -0
- package/dist/VisuallyHidden/VisuallyHidden.js +14 -0
- package/dist/VisuallyHidden/index.cjs +1 -0
- package/dist/VisuallyHidden/index.js +4 -0
- package/dist/helpers/arrays.cjs +1 -0
- package/dist/helpers/arrays.js +6 -0
- package/dist/helpers/deprecations.cjs +1 -0
- package/dist/helpers/deprecations.js +13 -0
- package/dist/helpers/escapeSelector.cjs +1 -0
- package/dist/helpers/escapeSelector.js +4 -0
- package/dist/helpers/getDefaultLocale.cjs +1 -0
- package/dist/helpers/getDefaultLocale.js +4 -0
- package/dist/helpers/getFocusableNodes.cjs +1 -0
- package/dist/helpers/getFocusableNodes.js +7 -0
- package/dist/helpers/handleResponsiveValues.cjs +1 -0
- package/dist/helpers/handleResponsiveValues.js +25 -0
- package/dist/helpers/keyboardKeys.cjs +1 -0
- package/dist/helpers/keyboardKeys.js +20 -0
- package/dist/helpers/objects.cjs +1 -0
- package/dist/helpers/objects.js +26 -0
- package/dist/helpers/setOpacity.cjs +1 -0
- package/dist/helpers/setOpacity.js +4 -0
- package/dist/helpers/setTabIndexOnFirstItem.cjs +1 -0
- package/dist/helpers/setTabIndexOnFirstItem.js +7 -0
- package/dist/helpers/theme.cjs +1 -0
- package/dist/helpers/theme.js +7 -0
- package/dist/helpers/useElementOnScreen.cjs +1 -0
- package/dist/helpers/useElementOnScreen.js +6 -0
- package/dist/helpers/useId.cjs +1 -0
- package/dist/helpers/useId.js +6 -0
- package/dist/helpers/useIntersection.cjs +1 -0
- package/dist/helpers/useIntersection.js +6 -0
- package/dist/helpers/useLockScroll.cjs +1 -0
- package/dist/helpers/useLockScroll.js +6 -0
- package/dist/helpers/usePrevious.cjs +1 -0
- package/dist/helpers/usePrevious.js +6 -0
- package/dist/helpers/useResizeObserver.cjs +1 -0
- package/dist/helpers/useResizeObserver.js +6 -0
- package/dist/hooks/useControllableState.cjs +1 -0
- package/dist/hooks/useControllableState.js +22 -0
- package/dist/hooks/useElementOnScreen.cjs +1 -0
- package/dist/hooks/useElementOnScreen.js +15 -0
- package/dist/hooks/useId.cjs +1 -0
- package/dist/hooks/useId.js +13 -0
- package/dist/hooks/useIntersection.cjs +1 -0
- package/dist/hooks/useIntersection.js +23 -0
- package/dist/hooks/useLockScroll.cjs +1 -0
- package/dist/hooks/useLockScroll.js +9 -0
- package/dist/hooks/usePrevious.cjs +1 -0
- package/dist/hooks/usePrevious.js +10 -0
- package/dist/hooks/useResizeObserver.cjs +1 -0
- package/dist/hooks/useResizeObserver.js +16 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +299 -0
- package/dist/themes/common-theme.cjs +1 -0
- package/dist/themes/common-theme.js +21 -0
- package/dist/themes/darkTheme/dark-colors.cjs +1 -0
- package/dist/themes/darkTheme/dark-colors.js +52 -0
- package/dist/themes/darkTheme/dark-shadows.cjs +1 -0
- package/dist/themes/darkTheme/dark-shadows.js +12 -0
- package/dist/themes/darkTheme/index.cjs +1 -0
- package/dist/themes/darkTheme/index.js +11 -0
- package/dist/themes/extendTheme.cjs +13 -0
- package/dist/themes/extendTheme.js +28 -0
- package/dist/themes/index.cjs +1 -0
- package/dist/themes/index.js +12 -0
- package/dist/themes/lightTheme/index.cjs +1 -0
- package/dist/themes/lightTheme/index.js +11 -0
- package/dist/themes/lightTheme/light-colors.cjs +1 -0
- package/dist/themes/lightTheme/light-colors.js +52 -0
- package/dist/themes/lightTheme/light-shadows.cjs +1 -0
- package/dist/themes/lightTheme/light-shadows.js +12 -0
- package/dist/themes/sizes.cjs +1 -0
- package/dist/themes/sizes.js +22 -0
- package/dist/themes/utils.cjs +41 -0
- package/dist/themes/utils.js +46 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +9 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +29 -0
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -0
- package/dist/v2/Breadcrumbs/Crumb.js +26 -0
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +14 -0
- package/dist/v2/Breadcrumbs/CrumbLink.js +29 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +8 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +22 -0
- package/dist/v2/Breadcrumbs/Divider.cjs +1 -0
- package/dist/v2/Breadcrumbs/Divider.js +8 -0
- package/dist/v2/Breadcrumbs/index.cjs +1 -0
- package/dist/v2/Breadcrumbs/index.js +10 -0
- package/dist/v2/Link/Link.cjs +23 -0
- package/dist/v2/Link/Link.js +50 -0
- package/dist/v2/Link/index.cjs +1 -0
- package/dist/v2/Link/index.js +4 -0
- package/dist/v2/LinkButton/LinkButton.cjs +20 -0
- package/dist/v2/LinkButton/LinkButton.js +73 -0
- package/dist/v2/LinkButton/index.cjs +1 -0
- package/dist/v2/LinkButton/index.js +4 -0
- package/dist/v2/MainNav/MainNav.cjs +4 -0
- package/dist/v2/MainNav/MainNav.js +32 -0
- package/dist/v2/MainNav/MainNavContext.cjs +1 -0
- package/dist/v2/MainNav/MainNavContext.js +6 -0
- package/dist/v2/MainNav/NavBrand.cjs +12 -0
- package/dist/v2/MainNav/NavBrand.js +34 -0
- package/dist/v2/MainNav/NavCondense.cjs +20 -0
- package/dist/v2/MainNav/NavCondense.js +36 -0
- package/dist/v2/MainNav/NavFooter.cjs +1 -0
- package/dist/v2/MainNav/NavFooter.js +11 -0
- package/dist/v2/MainNav/NavLink.cjs +69 -0
- package/dist/v2/MainNav/NavLink.js +93 -0
- package/dist/v2/MainNav/NavSection.cjs +1 -0
- package/dist/v2/MainNav/NavSection.js +36 -0
- package/dist/v2/MainNav/NavSections.cjs +4 -0
- package/dist/v2/MainNav/NavSections.js +25 -0
- package/dist/v2/MainNav/NavUser.cjs +3 -0
- package/dist/v2/MainNav/NavUser.js +29 -0
- package/dist/v2/MainNav/index.cjs +1 -0
- package/dist/v2/MainNav/index.js +18 -0
- package/dist/v2/Pagination/Pagination.cjs +5 -0
- package/dist/v2/Pagination/Pagination.js +25 -0
- package/dist/v2/Pagination/PaginationContext.cjs +1 -0
- package/dist/v2/Pagination/PaginationContext.js +6 -0
- package/dist/v2/Pagination/assets/next.cjs +1 -0
- package/dist/v2/Pagination/assets/next.js +4 -0
- package/dist/v2/Pagination/assets/previous.cjs +1 -0
- package/dist/v2/Pagination/assets/previous.js +4 -0
- package/dist/v2/Pagination/components.cjs +36 -0
- package/dist/v2/Pagination/components.js +82 -0
- package/dist/v2/Pagination/index.cjs +1 -0
- package/dist/v2/Pagination/index.js +9 -0
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +33 -0
- package/dist/v2/SimpleMenu/SimpleMenu.js +179 -0
- package/dist/v2/SimpleMenu/index.cjs +1 -0
- package/dist/v2/SimpleMenu/index.js +5 -0
- package/dist/v2/SimpleMenu/utils.cjs +12 -0
- package/dist/v2/SimpleMenu/utils.js +15 -0
- package/dist/v2/SubNav/SubNav.cjs +10 -0
- package/dist/v2/SubNav/SubNav.js +22 -0
- package/dist/v2/SubNav/SubNavHeader.cjs +4 -0
- package/dist/v2/SubNav/SubNavHeader.js +76 -0
- package/dist/v2/SubNav/SubNavLink.cjs +39 -0
- package/dist/v2/SubNav/SubNavLink.js +78 -0
- package/dist/v2/SubNav/SubNavLinkSection.cjs +19 -0
- package/dist/v2/SubNav/SubNavLinkSection.js +43 -0
- package/dist/v2/SubNav/SubNavSection.cjs +8 -0
- package/dist/v2/SubNav/SubNavSection.js +56 -0
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +9 -0
- package/dist/v2/SubNav/SubNavSectionLabel.js +44 -0
- package/dist/v2/SubNav/SubNavSections.cjs +1 -0
- package/dist/v2/SubNav/SubNavSections.js +21 -0
- package/dist/v2/SubNav/index.cjs +1 -0
- package/dist/v2/SubNav/index.js +15 -0
- package/dist/v2/index.cjs +1 -0
- package/dist/v2/index.js +53 -0
- package/package.json +81 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./NumberInput.cjs");exports.NumberInput=e.NumberInput;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("react"),f=require("prop-types"),g=require("styled-components"),m=require("./PaginationContext.cjs"),b=require("../Flex/Flex.cjs"),l=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function y(e){if(e&&e.__esModule)return e;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const n=y(p),o=l(f),s=l(g),P=s.default.nav``,_=s.default(b.Flex)`
|
|
2
|
+
& > * + * {
|
|
3
|
+
margin-left: ${({theme:e})=>e.spaces[1]};
|
|
4
|
+
}
|
|
5
|
+
`,i=({children:e,label:a,activePage:t,pageCount:r})=>{const u=n.useMemo(()=>({activePage:t,pageCount:r}),[t,r]);return n.createElement(m.PaginationContext.Provider,{value:u},n.createElement(P,{"aria-label":a},n.createElement(_,{as:"ul"},n.Children.map(e,(c,d)=>n.createElement("li",{key:d},c)))))};i.defaultProps={label:"pagination"};i.propTypes={activePage:o.default.number.isRequired,children:o.default.node.isRequired,label:o.default.string,pageCount:o.default.number.isRequired};exports.Pagination=i;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import r from "prop-types";
|
|
3
|
+
import i from "styled-components";
|
|
4
|
+
import { PaginationContext as c } from "./PaginationContext.js";
|
|
5
|
+
import { Flex as u } from "../Flex/Flex.js";
|
|
6
|
+
const d = i.nav``, f = i(u)`
|
|
7
|
+
& > * + * {
|
|
8
|
+
margin-left: ${({ theme: t }) => t.spaces[1]};
|
|
9
|
+
}
|
|
10
|
+
`, o = ({ children: t, label: l, activePage: n, pageCount: a }) => {
|
|
11
|
+
const m = e.useMemo(() => ({ activePage: n, pageCount: a }), [n, a]);
|
|
12
|
+
return /* @__PURE__ */ e.createElement(c.Provider, { value: m }, /* @__PURE__ */ e.createElement(d, { "aria-label": l }, /* @__PURE__ */ e.createElement(f, { as: "ul" }, e.Children.map(t, (s, p) => /* @__PURE__ */ e.createElement("li", { key: p }, s)))));
|
|
13
|
+
};
|
|
14
|
+
o.defaultProps = {
|
|
15
|
+
label: "pagination"
|
|
16
|
+
};
|
|
17
|
+
o.propTypes = {
|
|
18
|
+
activePage: r.number.isRequired,
|
|
19
|
+
children: r.node.isRequired,
|
|
20
|
+
label: r.string,
|
|
21
|
+
pageCount: r.number.isRequired
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
o as Pagination
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react"),t=e.createContext({activePage:1,pageCount:1}),n=()=>e.useContext(t);exports.PaginationContext=t;exports.usePagination=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=M;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const M = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
|
|
2
|
+
export {
|
|
3
|
+
M as default
|
|
4
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const I="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=I;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const I = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
|
|
2
|
+
export {
|
|
3
|
+
I as default
|
|
4
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const L=require("react"),g=require("@strapi/icons"),k=require("prop-types"),q=require("react-router-dom"),T=require("styled-components"),u=require("./PaginationContext.cjs"),x=require("../themes/utils.cjs"),E=require("../Typography/Typography.cjs"),l=require("../VisuallyHidden/VisuallyHidden.cjs"),c=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=c(L),o=c(k),s=c(T),v=s.default(E.Typography)`
|
|
2
|
+
line-height: revert;
|
|
3
|
+
`,$={active:!0},p=s.default(q.NavLink).withConfig({shouldForwardProp:(e,t)=>!$[e]&&t(e)})`
|
|
4
|
+
padding: ${({theme:e})=>e.spaces[3]};
|
|
5
|
+
border-radius: ${({theme:e})=>e.borderRadius};
|
|
6
|
+
box-shadow: ${({active:e,theme:t})=>e?t.shadows.filterShadow:void 0};
|
|
7
|
+
text-decoration: none;
|
|
8
|
+
display: flex;
|
|
9
|
+
|
|
10
|
+
${x.buttonFocusStyle}
|
|
11
|
+
`,R=s.default(p)`
|
|
12
|
+
color: ${({theme:e,active:t})=>t?e.colors.primary700:e.colors.neutral800};
|
|
13
|
+
background: ${({theme:e,active:t})=>t?e.colors.neutral0:void 0};
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
17
|
+
}
|
|
18
|
+
`,m=s.default(p)`
|
|
19
|
+
font-size: 0.7rem;
|
|
20
|
+
svg path {
|
|
21
|
+
fill: ${e=>e["aria-disabled"]?e.theme.colors.neutral300:e.theme.colors.neutral600};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:focus,
|
|
25
|
+
&:hover {
|
|
26
|
+
svg path {
|
|
27
|
+
fill: ${e=>e["aria-disabled"]?e.theme.colors.neutral300:e.theme.colors.neutral700};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
${e=>e["aria-disabled"]?`
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
`:void 0}
|
|
34
|
+
`,_=s.default(p)`
|
|
35
|
+
color: ${({theme:e})=>e.colors.neutral800};
|
|
36
|
+
`,f=({children:e,to:t,...i})=>{const{activePage:n}=u.usePagination(),r=n===1;return a.default.createElement(m,{to:r?"#":t,"aria-disabled":r,tabIndex:r?-1:void 0,...i},a.default.createElement(l.VisuallyHidden,null,e),a.default.createElement(g.ChevronLeft,{"aria-hidden":!0}))};f.displayName="PreviousLink";const y=({children:e,to:t,...i})=>{const{activePage:n,pageCount:r}=u.usePagination(),d=n===r;return a.default.createElement(m,{to:d?"#":t,"aria-disabled":d,tabIndex:d?-1:void 0,...i},a.default.createElement(l.VisuallyHidden,null,e),a.default.createElement(g.ChevronRight,{"aria-hidden":!0}))};y.displayName="NextLink";const h=({number:e,children:t,...i})=>{const{activePage:n}=u.usePagination(),r=n===e;return a.default.createElement(R,{...i,active:r},a.default.createElement(l.VisuallyHidden,null,t),a.default.createElement(v,{"aria-hidden":!0,variant:"pi",fontWeight:r?"bold":null},e))};h.displayName="PageLink";const P=({children:e,...t})=>a.default.createElement(_,{...t,as:"div"},a.default.createElement(l.VisuallyHidden,null,e),a.default.createElement(v,{"aria-hidden":!0,variant:"pi"},"\u2026"));h.propTypes={children:o.default.node.isRequired,number:o.default.number.isRequired};const b={children:o.default.node.isRequired,to:o.default.string.isRequired};y.propTypes=b;f.propTypes=b;P.propTypes={children:o.default.node.isRequired};exports.Dots=P;exports.NextLink=y;exports.PageLink=h;exports.PreviousLink=f;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import t from "react";
|
|
2
|
+
import { ChevronLeft as b, ChevronRight as y } from "@strapi/icons";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { NavLink as P } from "react-router-dom";
|
|
5
|
+
import s from "styled-components";
|
|
6
|
+
import { usePagination as c } from "./PaginationContext.js";
|
|
7
|
+
import { buttonFocusStyle as E } from "../themes/utils.js";
|
|
8
|
+
import { Typography as k } from "../Typography/Typography.js";
|
|
9
|
+
import { VisuallyHidden as l } from "../VisuallyHidden/VisuallyHidden.js";
|
|
10
|
+
const u = s(k)`
|
|
11
|
+
line-height: revert;
|
|
12
|
+
`, L = {
|
|
13
|
+
active: !0
|
|
14
|
+
}, p = s(P).withConfig({
|
|
15
|
+
shouldForwardProp: (e, r) => !L[e] && r(e)
|
|
16
|
+
})`
|
|
17
|
+
padding: ${({ theme: e }) => e.spaces[3]};
|
|
18
|
+
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
19
|
+
box-shadow: ${({ active: e, theme: r }) => e ? r.shadows.filterShadow : void 0};
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
display: flex;
|
|
22
|
+
|
|
23
|
+
${E}
|
|
24
|
+
`, $ = s(p)`
|
|
25
|
+
color: ${({ theme: e, active: r }) => r ? e.colors.primary700 : e.colors.neutral800};
|
|
26
|
+
background: ${({ theme: e, active: r }) => r ? e.colors.neutral0 : void 0};
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
30
|
+
}
|
|
31
|
+
`, m = s(p)`
|
|
32
|
+
font-size: 0.7rem;
|
|
33
|
+
svg path {
|
|
34
|
+
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral600};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:focus,
|
|
38
|
+
&:hover {
|
|
39
|
+
svg path {
|
|
40
|
+
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral700};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
${(e) => e["aria-disabled"] ? `
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
` : void 0}
|
|
47
|
+
`, x = s(p)`
|
|
48
|
+
color: ${({ theme: e }) => e.colors.neutral800};
|
|
49
|
+
`, h = ({ children: e, to: r, ...a }) => {
|
|
50
|
+
const { activePage: i } = c(), o = i === 1;
|
|
51
|
+
return /* @__PURE__ */ t.createElement(
|
|
52
|
+
m,
|
|
53
|
+
{
|
|
54
|
+
to: o ? "#" : r,
|
|
55
|
+
"aria-disabled": o,
|
|
56
|
+
tabIndex: o ? -1 : void 0,
|
|
57
|
+
...a
|
|
58
|
+
},
|
|
59
|
+
/* @__PURE__ */ t.createElement(l, null, e),
|
|
60
|
+
/* @__PURE__ */ t.createElement(b, { "aria-hidden": !0 })
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
h.displayName = "PreviousLink";
|
|
64
|
+
const v = ({ children: e, to: r, ...a }) => {
|
|
65
|
+
const { activePage: i, pageCount: o } = c(), d = i === o;
|
|
66
|
+
return /* @__PURE__ */ t.createElement(
|
|
67
|
+
m,
|
|
68
|
+
{
|
|
69
|
+
to: d ? "#" : r,
|
|
70
|
+
"aria-disabled": d,
|
|
71
|
+
tabIndex: d ? -1 : void 0,
|
|
72
|
+
...a
|
|
73
|
+
},
|
|
74
|
+
/* @__PURE__ */ t.createElement(l, null, e),
|
|
75
|
+
/* @__PURE__ */ t.createElement(y, { "aria-hidden": !0 })
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
v.displayName = "NextLink";
|
|
79
|
+
const f = ({ number: e, children: r, ...a }) => {
|
|
80
|
+
const { activePage: i } = c(), o = i === e;
|
|
81
|
+
return /* @__PURE__ */ t.createElement($, { ...a, active: o }, /* @__PURE__ */ t.createElement(l, null, r), /* @__PURE__ */ t.createElement(u, { "aria-hidden": !0, variant: "pi", fontWeight: o ? "bold" : null }, e));
|
|
82
|
+
};
|
|
83
|
+
f.displayName = "PageLink";
|
|
84
|
+
const w = ({ children: e, ...r }) => /* @__PURE__ */ t.createElement(x, { ...r, as: "div" }, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(u, { "aria-hidden": !0, variant: "pi" }, "\u2026"));
|
|
85
|
+
f.propTypes = {
|
|
86
|
+
children: n.node.isRequired,
|
|
87
|
+
number: n.number.isRequired
|
|
88
|
+
};
|
|
89
|
+
const g = {
|
|
90
|
+
children: n.node.isRequired,
|
|
91
|
+
to: n.string.isRequired
|
|
92
|
+
};
|
|
93
|
+
v.propTypes = g;
|
|
94
|
+
h.propTypes = g;
|
|
95
|
+
w.propTypes = {
|
|
96
|
+
children: n.node.isRequired
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
w as Dots,
|
|
100
|
+
v as NextLink,
|
|
101
|
+
f as PageLink,
|
|
102
|
+
h as PreviousLink
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./Pagination.cjs"),e=require("./components.cjs");exports.Pagination=i.Pagination;exports.Dots=e.Dots;exports.NextLink=e.NextLink;exports.PageLink=e.PageLink;exports.PreviousLink=e.PreviousLink;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),w=require("react"),a=require("@floating-ui/react-dom"),y=require("styled-components"),u=require("../Box/Box.cjs"),k=require("../hooks/useIntersection.cjs"),_=require("../Portal/Portal.cjs"),v=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function S(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const l=S(w),f=v(y),O=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],$=f.default(u.Box)`
|
|
2
|
+
box-shadow: ${({theme:e})=>e.shadows.filterShadow};
|
|
3
|
+
z-index: 4;
|
|
4
|
+
border: 1px solid ${({theme:e})=>e.colors.neutral150};
|
|
5
|
+
background: ${({theme:e})=>e.colors.neutral0};
|
|
6
|
+
`,p=({source:e,children:t,spacing:o=0,fullWidth:r=!1,placement:s="bottom-start",centered:i=!1,...c})=>{const[h,g]=l.useState(void 0),{x:m,y:x,reference:d,floating:j,strategy:P}=a.useFloating({strategy:"fixed",placement:i?"bottom":s,middleware:[a.offset({mainAxis:o}),a.shift(),a.flip()],whileElementsMounted:a.autoUpdate});return l.useLayoutEffect(()=>{d(e.current)},[e,d]),l.useLayoutEffect(()=>{r&&g(e.current.offsetWidth)},[r,e]),n.jsx($,{ref:j,style:{left:m,top:x,position:P,width:h||void 0},hasRadius:!0,background:"neutral0",padding:1,...c,children:t})},b=({children:e,intersectionId:t,onReachEnd:o,...r})=>{const s=l.useRef(null);return k.useIntersection(s,o??(()=>{}),{selectorToWatch:`#${t}`,skipWhen:!t||!o}),n.jsxs(q,{ref:s,...r,children:[e,t&&o&&n.jsx(u.Box,{id:t,width:"100%",height:"1px"})]})},q=f.default(u.Box)`
|
|
7
|
+
// 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
|
|
8
|
+
max-height: ${3*5}rem;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
overflow-x: hidden;
|
|
11
|
+
|
|
12
|
+
&::-webkit-scrollbar {
|
|
13
|
+
-webkit-appearance: none;
|
|
14
|
+
width: 4px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&::-webkit-scrollbar-track {
|
|
18
|
+
background: ${({theme:e})=>e.colors.neutral0};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::-webkit-scrollbar-thumb {
|
|
22
|
+
background: ${({theme:e})=>e.colors.neutral150};
|
|
23
|
+
border-radius: ${({theme:e})=>e.borderRadius};
|
|
24
|
+
margin-right: 10px;
|
|
25
|
+
}
|
|
26
|
+
`,E=({children:e,source:t,spacing:o,fullWidth:r,placement:s,centered:i,...c})=>n.jsx(_.Portal,{children:n.jsx(p,{source:t,spacing:o,fullWidth:r,placement:s,centered:i,children:n.jsx(b,{...c,children:e})})});exports.Content=p;exports.POPOVER_PLACEMENTS=O;exports.Popover=E;exports.Scrolling=b;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { jsx as i, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { useFloating as w, offset as k, shift as y, flip as $, autoUpdate as v } from "@floating-ui/react-dom";
|
|
4
|
+
import c from "styled-components";
|
|
5
|
+
import { Box as d } from "../Box/Box.js";
|
|
6
|
+
import { useIntersection as P } from "../hooks/useIntersection.js";
|
|
7
|
+
import { Portal as S } from "../Portal/Portal.js";
|
|
8
|
+
const T = ["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end"], W = c(d)`
|
|
9
|
+
box-shadow: ${({
|
|
10
|
+
theme: t
|
|
11
|
+
}) => t.shadows.filterShadow};
|
|
12
|
+
z-index: 4;
|
|
13
|
+
border: 1px solid ${({
|
|
14
|
+
theme: t
|
|
15
|
+
}) => t.colors.neutral150};
|
|
16
|
+
background: ${({
|
|
17
|
+
theme: t
|
|
18
|
+
}) => t.colors.neutral0};
|
|
19
|
+
`, E = ({
|
|
20
|
+
source: t,
|
|
21
|
+
children: e,
|
|
22
|
+
spacing: o = 0,
|
|
23
|
+
fullWidth: r = !1,
|
|
24
|
+
placement: s = "bottom-start",
|
|
25
|
+
centered: n = !1,
|
|
26
|
+
...l
|
|
27
|
+
}) => {
|
|
28
|
+
const [p, u] = a.useState(void 0), {
|
|
29
|
+
x: h,
|
|
30
|
+
y: m,
|
|
31
|
+
reference: f,
|
|
32
|
+
floating: b,
|
|
33
|
+
strategy: g
|
|
34
|
+
} = w({
|
|
35
|
+
strategy: "fixed",
|
|
36
|
+
placement: n ? "bottom" : s,
|
|
37
|
+
middleware: [k({
|
|
38
|
+
mainAxis: o
|
|
39
|
+
}), y(), $()],
|
|
40
|
+
whileElementsMounted: v
|
|
41
|
+
});
|
|
42
|
+
return a.useLayoutEffect(() => {
|
|
43
|
+
f(t.current);
|
|
44
|
+
}, [t, f]), a.useLayoutEffect(() => {
|
|
45
|
+
r && u(t.current.offsetWidth);
|
|
46
|
+
}, [r, t]), i(W, {
|
|
47
|
+
ref: b,
|
|
48
|
+
style: {
|
|
49
|
+
left: h,
|
|
50
|
+
top: m,
|
|
51
|
+
position: g,
|
|
52
|
+
width: p || void 0
|
|
53
|
+
},
|
|
54
|
+
hasRadius: !0,
|
|
55
|
+
background: "neutral0",
|
|
56
|
+
padding: 1,
|
|
57
|
+
...l,
|
|
58
|
+
children: e
|
|
59
|
+
});
|
|
60
|
+
}, R = ({
|
|
61
|
+
children: t,
|
|
62
|
+
intersectionId: e,
|
|
63
|
+
onReachEnd: o,
|
|
64
|
+
...r
|
|
65
|
+
}) => {
|
|
66
|
+
const s = a.useRef(null);
|
|
67
|
+
return P(s, o ?? (() => {
|
|
68
|
+
}), {
|
|
69
|
+
selectorToWatch: `#${e}`,
|
|
70
|
+
skipWhen: !e || !o
|
|
71
|
+
}), x(L, {
|
|
72
|
+
ref: s,
|
|
73
|
+
...r,
|
|
74
|
+
children: [t, e && o && i(d, {
|
|
75
|
+
id: e,
|
|
76
|
+
width: "100%",
|
|
77
|
+
height: "1px"
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
}, L = c(d)`
|
|
81
|
+
// 16 is base base size, 3 is the factor to get closer to 40px and 5 is the number of elements visible in the list
|
|
82
|
+
max-height: ${3 * 5}rem;
|
|
83
|
+
overflow-y: auto;
|
|
84
|
+
overflow-x: hidden;
|
|
85
|
+
|
|
86
|
+
&::-webkit-scrollbar {
|
|
87
|
+
-webkit-appearance: none;
|
|
88
|
+
width: 4px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&::-webkit-scrollbar-track {
|
|
92
|
+
background: ${({
|
|
93
|
+
theme: t
|
|
94
|
+
}) => t.colors.neutral0};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&::-webkit-scrollbar-thumb {
|
|
98
|
+
background: ${({
|
|
99
|
+
theme: t
|
|
100
|
+
}) => t.colors.neutral150};
|
|
101
|
+
border-radius: ${({
|
|
102
|
+
theme: t
|
|
103
|
+
}) => t.borderRadius};
|
|
104
|
+
margin-right: 10px;
|
|
105
|
+
}
|
|
106
|
+
`, B = ({
|
|
107
|
+
children: t,
|
|
108
|
+
source: e,
|
|
109
|
+
spacing: o,
|
|
110
|
+
fullWidth: r,
|
|
111
|
+
placement: s,
|
|
112
|
+
centered: n,
|
|
113
|
+
...l
|
|
114
|
+
}) => i(S, {
|
|
115
|
+
children: i(E, {
|
|
116
|
+
source: e,
|
|
117
|
+
spacing: o,
|
|
118
|
+
fullWidth: r,
|
|
119
|
+
placement: s,
|
|
120
|
+
centered: n,
|
|
121
|
+
children: i(R, {
|
|
122
|
+
...l,
|
|
123
|
+
children: t
|
|
124
|
+
})
|
|
125
|
+
})
|
|
126
|
+
});
|
|
127
|
+
export {
|
|
128
|
+
E as Content,
|
|
129
|
+
T as POPOVER_PLACEMENTS,
|
|
130
|
+
B as Popover,
|
|
131
|
+
R as Scrolling
|
|
132
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Popover.cjs"),o={Content:e.Content,Scrolling:e.Scrolling};exports.POPOVER_PLACEMENTS=e.POPOVER_PLACEMENTS;exports.Popover=e.Popover;exports.PopoverPrimitives=o;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Content as o, Scrolling as r } from "./Popover.js";
|
|
2
|
+
import { POPOVER_PLACEMENTS as p, Popover as m } from "./Popover.js";
|
|
3
|
+
const e = {
|
|
4
|
+
Content: o,
|
|
5
|
+
Scrolling: r
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
p as POPOVER_PLACEMENTS,
|
|
9
|
+
m as Popover,
|
|
10
|
+
e as PopoverPrimitives
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react"),c=require("react-dom");function a(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const u=a(o),l=({children:e})=>{const t=u.useRef(null),[r,n]=u.useState(!1);return u.useLayoutEffect(()=>(t.current=document.createElement("div"),t.current.setAttribute("data-react-portal","true"),document.body.appendChild(t.current),n(!0),()=>{t.current?.remove()}),[]),!r||!t.current?null:c.createPortal(e,t.current)};exports.Portal=l;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { createPortal as o } from "react-dom";
|
|
3
|
+
const a = ({
|
|
4
|
+
children: r
|
|
5
|
+
}) => {
|
|
6
|
+
const t = e.useRef(null), [u, n] = e.useState(!1);
|
|
7
|
+
return e.useLayoutEffect(() => (t.current = document.createElement("div"), t.current.setAttribute("data-react-portal", "true"), document.body.appendChild(t.current), n(!0), () => {
|
|
8
|
+
t.current?.remove();
|
|
9
|
+
}), []), !u || !t.current ? null : o(r, t.current);
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
a as Portal
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Portal.cjs");exports.Portal=e.Portal;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),d=require("prop-types"),c=require("styled-components"),p=require("../Box/Box.cjs"),r=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},f=r(i),t=r(d),b=r(c),m=b.default(p.Box)`
|
|
2
|
+
&:before {
|
|
3
|
+
background-color: ${({theme:e})=>e.colors.neutral0};
|
|
4
|
+
border-radius: ${({theme:e})=>e.borderRadius};
|
|
5
|
+
bottom: 0;
|
|
6
|
+
content: '';
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
width: ${({value:e})=>`${e}%`};
|
|
10
|
+
}
|
|
11
|
+
`,o=({min:e,max:u,value:a,children:l,size:s,...n})=>f.default.createElement(m,{background:"neutral600",hasRadius:!0,"aria-label":l,"aria-valuemax":u,"aria-valuemin":e,"aria-valuenow":a,height:s==="S"?1:2,position:"relative",role:"progressbar",value:a,width:s==="S"?"78px":"102px",...n});o.defaultProps={min:0,max:100,value:0,size:"M"};o.propTypes={children:t.default.node.isRequired,max:t.default.number,min:t.default.number,size:t.default.oneOf(["S","M"]),value:t.default.number};exports.ProgressBar=o;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import u from "react";
|
|
2
|
+
import e from "prop-types";
|
|
3
|
+
import m from "styled-components";
|
|
4
|
+
import { Box as l } from "../Box/Box.js";
|
|
5
|
+
const p = m(l)`
|
|
6
|
+
&:before {
|
|
7
|
+
background-color: ${({ theme: r }) => r.colors.neutral0};
|
|
8
|
+
border-radius: ${({ theme: r }) => r.borderRadius};
|
|
9
|
+
bottom: 0;
|
|
10
|
+
content: '';
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
width: ${({ value: r }) => `${r}%`};
|
|
14
|
+
}
|
|
15
|
+
`, t = ({ min: r, max: i, value: o, children: s, size: a, ...n }) => /* @__PURE__ */ u.createElement(
|
|
16
|
+
p,
|
|
17
|
+
{
|
|
18
|
+
background: "neutral600",
|
|
19
|
+
hasRadius: !0,
|
|
20
|
+
"aria-label": s,
|
|
21
|
+
"aria-valuemax": i,
|
|
22
|
+
"aria-valuemin": r,
|
|
23
|
+
"aria-valuenow": o,
|
|
24
|
+
height: a === "S" ? 1 : 2,
|
|
25
|
+
position: "relative",
|
|
26
|
+
role: "progressbar",
|
|
27
|
+
value: o,
|
|
28
|
+
width: a === "S" ? "78px" : "102px",
|
|
29
|
+
...n
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
t.defaultProps = {
|
|
33
|
+
min: 0,
|
|
34
|
+
max: 100,
|
|
35
|
+
value: 0,
|
|
36
|
+
size: "M"
|
|
37
|
+
};
|
|
38
|
+
t.propTypes = {
|
|
39
|
+
children: e.node.isRequired,
|
|
40
|
+
max: e.number,
|
|
41
|
+
min: e.number,
|
|
42
|
+
size: e.oneOf(["S", "M"]),
|
|
43
|
+
value: e.number
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
t as ProgressBar
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./ProgressBar.cjs");exports.ProgressBar=r.ProgressBar;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react"),d=require("prop-types"),n=require("styled-components"),u=require("../BaseRadio/BaseRadio.cjs"),c=require("../Box/Box.cjs"),i=require("../Typography/Typography.cjs"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=a(l),o=a(d),p=a(n),y=p.default(i.Typography)`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
`,r=({children:e,...s})=>t.default.createElement(y,{as:"label",textColor:"neutral800"},t.default.createElement(u.BaseRadio,{...s}),t.default.createElement(c.Box,{paddingLeft:2},e));r.propTypes={children:o.default.node.isRequired,value:o.default.any.isRequired};exports.Radio=r;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import r from "prop-types";
|
|
3
|
+
import a from "styled-components";
|
|
4
|
+
import { BaseRadio as i } from "../BaseRadio/BaseRadio.js";
|
|
5
|
+
import { Box as m } from "../Box/Box.js";
|
|
6
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
7
|
+
const l = a(p)`
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
`, n = ({ children: t, ...o }) => /* @__PURE__ */ e.createElement(l, { as: "label", textColor: "neutral800" }, /* @__PURE__ */ e.createElement(i, { ...o }), /* @__PURE__ */ e.createElement(m, { paddingLeft: 2 }, t));
|
|
11
|
+
n.propTypes = {
|
|
12
|
+
children: r.node.isRequired,
|
|
13
|
+
value: r.any.isRequired
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
n as Radio
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./Radio.cjs"),e=require("../BaseRadio/RadioGroup.cjs");exports.Radio=o.Radio;exports.RadioGroup=e.RadioGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react/jsx-runtime"),l=require("react"),F=require("./RawTableContext.cjs"),v=require("../Box/Box.cjs"),s=require("../helpers/getFocusableNodes.cjs"),d=require("../helpers/keyboardKeys.cjs"),w=n=>g.jsx(y,{...n,as:"th"}),y=({coords:n={col:0,row:0},as:h="td",...x})=>{const a=l.useRef(null),{rowIndex:T,colIndex:E,setTableValues:N}=F.useTable(),[c,i]=l.useState(!1),K=e=>{const t=s.getFocusableNodes(a.current,!0);if(t.length===0||t.length===1&&s.getFocusableNodesWithKeyboardNav(t).length===0)return;if(t.length>1&&!t.find(u=>u.tagName!=="BUTTON")){e.preventDefault();const u=t.findIndex(r=>r===document.activeElement);if(e.key===d.KeyboardKeys.RIGHT){const r=t[u+1];r&&(e.stopPropagation(),r.focus())}else if(e.key===d.KeyboardKeys.LEFT){const r=t[u-1];r&&(e.stopPropagation(),r.focus())}return}const o=e.key===d.KeyboardKeys.ENTER;if(o&&!c)i(!0);else if((e.key===d.KeyboardKeys.ESCAPE||o)&&c){if(o&&document.activeElement?.tagName==="A")return;i(!1),a.current.focus()}else c&&e.stopPropagation()},f=T===n.row-1&&E===n.col-1;l.useLayoutEffect(()=>{const e=s.getFocusableNodes(a.current,!0);e.length===0||e.length===1&&s.getFocusableNodesWithKeyboardNav(e).length!==0||e.length>1&&Boolean(e.find(t=>t.tagName!=="BUTTON"))?(a.current.setAttribute("tabIndex",!c&&f?"0":"-1"),e.forEach((t,o)=>{t.setAttribute("tabIndex",c?"0":"-1"),c&&o===0&&t.focus()})):e.forEach(t=>{t.setAttribute("tabIndex",f?"0":"-1")})},[c,f]);const b=l.useCallback(()=>{const e=s.getFocusableNodes(a.current,!0);e.length>=1&&(s.getFocusableNodesWithKeyboardNav(e).length!==0||!e.find(t=>t.tagName!=="BUTTON"))&&i(!0),N({rowIndex:n.row-1,colIndex:n.col-1})},[n,N]);return l.useLayoutEffect(()=>{const e=a.current;return s.getFocusableNodes(e,!0).forEach(o=>{o.addEventListener("focus",b)}),()=>{s.getFocusableNodes(e,!0).forEach(u=>{u.removeEventListener("focus",b)})}},[b]),g.jsx(v.Box,{role:"gridcell",as:h,ref:a,onKeyDown:K,...x})};exports.RawTd=y;exports.RawTh=w;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as y, useState as I, useLayoutEffect as N, useCallback as v } from "react";
|
|
3
|
+
import { useTable as w } from "./RawTableContext.js";
|
|
4
|
+
import { Box as A } from "../Box/Box.js";
|
|
5
|
+
import { getFocusableNodes as u, getFocusableNodesWithKeyboardNav as b } from "../helpers/getFocusableNodes.js";
|
|
6
|
+
import { KeyboardKeys as f } from "../helpers/keyboardKeys.js";
|
|
7
|
+
const D = (n) => g(B, {
|
|
8
|
+
...n,
|
|
9
|
+
as: "th"
|
|
10
|
+
}), B = ({
|
|
11
|
+
coords: n = {
|
|
12
|
+
col: 0,
|
|
13
|
+
row: 0
|
|
14
|
+
},
|
|
15
|
+
as: h = "td",
|
|
16
|
+
...E
|
|
17
|
+
}) => {
|
|
18
|
+
const s = y(null), {
|
|
19
|
+
rowIndex: p,
|
|
20
|
+
colIndex: x,
|
|
21
|
+
setTableValues: m
|
|
22
|
+
} = w(), [r, l] = I(!1), T = (e) => {
|
|
23
|
+
const t = u(s.current, !0);
|
|
24
|
+
if (t.length === 0 || t.length === 1 && b(t).length === 0)
|
|
25
|
+
return;
|
|
26
|
+
if (t.length > 1 && !t.find((a) => a.tagName !== "BUTTON")) {
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
const a = t.findIndex((c) => c === document.activeElement);
|
|
29
|
+
if (e.key === f.RIGHT) {
|
|
30
|
+
const c = t[a + 1];
|
|
31
|
+
c && (e.stopPropagation(), c.focus());
|
|
32
|
+
} else if (e.key === f.LEFT) {
|
|
33
|
+
const c = t[a - 1];
|
|
34
|
+
c && (e.stopPropagation(), c.focus());
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const o = e.key === f.ENTER;
|
|
39
|
+
if (o && !r)
|
|
40
|
+
l(!0);
|
|
41
|
+
else if ((e.key === f.ESCAPE || o) && r) {
|
|
42
|
+
if (o && document.activeElement?.tagName === "A")
|
|
43
|
+
return;
|
|
44
|
+
l(!1), s.current.focus();
|
|
45
|
+
} else
|
|
46
|
+
r && e.stopPropagation();
|
|
47
|
+
}, i = p === n.row - 1 && x === n.col - 1;
|
|
48
|
+
N(() => {
|
|
49
|
+
const e = u(s.current, !0);
|
|
50
|
+
e.length === 0 || e.length === 1 && b(e).length !== 0 || e.length > 1 && Boolean(e.find((t) => t.tagName !== "BUTTON")) ? (s.current.setAttribute("tabIndex", !r && i ? "0" : "-1"), e.forEach((t, o) => {
|
|
51
|
+
t.setAttribute("tabIndex", r ? "0" : "-1"), r && o === 0 && t.focus();
|
|
52
|
+
})) : e.forEach((t) => {
|
|
53
|
+
t.setAttribute("tabIndex", i ? "0" : "-1");
|
|
54
|
+
});
|
|
55
|
+
}, [r, i]);
|
|
56
|
+
const d = v(() => {
|
|
57
|
+
const e = u(s.current, !0);
|
|
58
|
+
e.length >= 1 && (b(e).length !== 0 || !e.find((t) => t.tagName !== "BUTTON")) && l(!0), m({
|
|
59
|
+
rowIndex: n.row - 1,
|
|
60
|
+
colIndex: n.col - 1
|
|
61
|
+
});
|
|
62
|
+
}, [n, m]);
|
|
63
|
+
return N(() => {
|
|
64
|
+
const e = s.current;
|
|
65
|
+
return u(e, !0).forEach((o) => {
|
|
66
|
+
o.addEventListener("focus", d);
|
|
67
|
+
}), () => {
|
|
68
|
+
u(e, !0).forEach((a) => {
|
|
69
|
+
a.removeEventListener("focus", d);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
}, [d]), g(A, {
|
|
73
|
+
role: "gridcell",
|
|
74
|
+
as: h,
|
|
75
|
+
ref: s,
|
|
76
|
+
onKeyDown: T,
|
|
77
|
+
...E
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
B as RawTd,
|
|
82
|
+
D as RawTh
|
|
83
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),r=require("react"),E=require("./focusFocusable.cjs"),P=require("./RawTableContext.cjs"),s=require("../helpers/keyboardKeys.cjs"),j=({colCount:b,rowCount:c,jumpStep:l=3,initialCol:D=0,initialRow:d=0,...k})=>{const f=r.useRef(null),n=r.useRef(!1),[o,t]=r.useState(d),[y,u]=r.useState(D),K=r.useCallback(({colIndex:a,rowIndex:e})=>{u(a),t(e)},[]);r.useEffect(()=>{n.current&&E.focusFocusable(f.current),n.current||(n.current=!0)},[y,o]);const T=a=>{switch(a.key){case s.KeyboardKeys.RIGHT:{a.preventDefault(),u(e=>e<b-1?e+1:e);break}case s.KeyboardKeys.LEFT:{a.preventDefault(),u(e=>e>0?e-1:e);break}case s.KeyboardKeys.UP:{a.preventDefault(),t(e=>e>0?e-1:e);break}case s.KeyboardKeys.DOWN:{a.preventDefault(),t(e=>e<c-1?e+1:e);break}case s.KeyboardKeys.HOME:{a.preventDefault(),a.ctrlKey&&t(0),u(0);break}case s.KeyboardKeys.END:{a.preventDefault(),a.ctrlKey&&t(c-1),u(b-1);break}case s.KeyboardKeys.PAGE_DOWN:{a.preventDefault(),t(e=>e+l<c?e+l:c-1);break}case s.KeyboardKeys.PAGE_UP:{a.preventDefault(),t(e=>e-l>0?e-l:0);break}}},R=r.useMemo(()=>({rowIndex:o,colIndex:y,setTableValues:K}),[y,o,K]);return i.jsx(P.RawTableContext.Provider,{value:R,children:i.jsx("table",{role:"grid",ref:f,"aria-rowcount":c,"aria-colcount":b,onKeyDown:T,...k})})};exports.RawTable=j;
|