@strapi/design-system 1.3.0-beta.0 → 1.3.0-beta.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/.eslintrc.js +38 -0
- package/.prettierrc.js +7 -0
- package/.storybook/{main.cjs → main.js} +0 -0
- package/babel.config.js +5 -0
- package/createIndexFiles.js +34 -0
- package/global-setup.js +1 -1
- package/jest.config.js +3 -1
- package/package.json +22 -28
- package/playwright.config.js +4 -2
- package/src/Accordion/Accordion.js +1 -0
- package/src/BaseCheckbox/BaseCheckbox.js +14 -9
- package/src/BaseCheckbox/BaseCheckbox.stories.mdx +1 -1
- package/src/Checkbox/Checkbox.stories.mdx +1 -1
- package/src/DatePicker/__tests__/DatePicker.spec.js +1 -0
- package/src/DateTimePicker/__tests__/DateTimePicker.e2e.js +1 -1
- package/src/DismissibleLayer/DismissibleLayer.js +15 -1
- package/src/DismissibleLayer/__test__/DimissibleLayer.spec.js +4 -2
- package/src/IconButton/IconButton.js +62 -22
- package/src/IconButton/IconButton.stories.mdx +69 -16
- package/src/ModalLayout/__tests__/ModalLayout.spec.js +7 -1
- package/src/Portal/Portal.js +0 -5
- package/src/Status/Status.stories.mdx +9 -4
- package/src/Switch/Switch.stories.mdx +23 -2
- package/webpack.config.js +84 -0
- package/.eslintrc +0 -34
- package/.prettierrc +0 -7
- package/dist/Accordion/Accordion.cjs +0 -23
- package/dist/Accordion/Accordion.js +0 -87
- package/dist/Accordion/AccordionContent.cjs +0 -1
- package/dist/Accordion/AccordionContent.js +0 -23
- package/dist/Accordion/AccordionContext.cjs +0 -1
- package/dist/Accordion/AccordionContext.js +0 -6
- package/dist/Accordion/AccordionGroup.cjs +0 -47
- package/dist/Accordion/AccordionGroup.js +0 -91
- package/dist/Accordion/AccordionToggle.cjs +0 -28
- package/dist/Accordion/AccordionToggle.js +0 -127
- package/dist/Accordion/index.cjs +0 -1
- package/dist/Accordion/index.js +0 -11
- package/dist/Accordion/utils.cjs +0 -1
- package/dist/Accordion/utils.js +0 -7
- package/dist/Alert/Alert.cjs +0 -35
- package/dist/Alert/Alert.js +0 -111
- package/dist/Alert/index.cjs +0 -1
- package/dist/Alert/index.js +0 -4
- package/dist/Alert/utils.cjs +0 -1
- package/dist/Alert/utils.js +0 -6
- package/dist/Avatar/Avatar.cjs +0 -29
- package/dist/Avatar/Avatar.js +0 -79
- package/dist/Avatar/AvatarGroup.cjs +0 -5
- package/dist/Avatar/AvatarGroup.js +0 -11
- package/dist/Avatar/constants.cjs +0 -1
- package/dist/Avatar/constants.js +0 -5
- package/dist/Avatar/index.cjs +0 -1
- package/dist/Avatar/index.js +0 -7
- package/dist/Badge/Badge.cjs +0 -1
- package/dist/Badge/Badge.js +0 -33
- package/dist/Badge/index.cjs +0 -1
- package/dist/Badge/index.js +0 -4
- package/dist/BaseButton/BaseButton.cjs +0 -23
- package/dist/BaseButton/BaseButton.js +0 -45
- package/dist/BaseButton/index.cjs +0 -1
- package/dist/BaseButton/index.js +0 -5
- package/dist/BaseCheckbox/BaseCheckbox.cjs +0 -62
- package/dist/BaseCheckbox/BaseCheckbox.js +0 -104
- package/dist/BaseCheckbox/assets/checkmark-black.cjs +0 -1
- package/dist/BaseCheckbox/assets/checkmark-black.js +0 -4
- package/dist/BaseCheckbox/assets/checkmark.cjs +0 -1
- package/dist/BaseCheckbox/assets/checkmark.js +0 -4
- package/dist/BaseCheckbox/index.cjs +0 -1
- package/dist/BaseCheckbox/index.js +0 -4
- package/dist/BaseCheckbox/utils.cjs +0 -1
- package/dist/BaseCheckbox/utils.js +0 -4
- package/dist/BaseLink/BaseLink.cjs +0 -3
- package/dist/BaseLink/BaseLink.js +0 -31
- package/dist/BaseLink/index.cjs +0 -1
- package/dist/BaseLink/index.js +0 -4
- package/dist/BaseRadio/BaseRadio.cjs +0 -31
- package/dist/BaseRadio/BaseRadio.js +0 -62
- package/dist/BaseRadio/RadioGroup.cjs +0 -1
- package/dist/BaseRadio/RadioGroup.js +0 -32
- package/dist/BaseRadio/context.cjs +0 -1
- package/dist/BaseRadio/context.js +0 -6
- package/dist/BaseRadio/index.cjs +0 -1
- package/dist/BaseRadio/index.js +0 -6
- package/dist/BaseRadio/utils.cjs +0 -1
- package/dist/BaseRadio/utils.js +0 -6
- package/dist/Box/Box.cjs +0 -80
- package/dist/Box/Box.js +0 -95
- package/dist/Box/BoxProps.cjs +0 -1
- package/dist/Box/BoxProps.js +0 -51
- package/dist/Box/index.cjs +0 -1
- package/dist/Box/index.js +0 -4
- package/dist/Breadcrumbs/Breadcrumbs.cjs +0 -16
- package/dist/Breadcrumbs/Breadcrumbs.js +0 -52
- package/dist/Breadcrumbs/index.cjs +0 -1
- package/dist/Breadcrumbs/index.js +0 -5
- package/dist/Button/Button.cjs +0 -43
- package/dist/Button/Button.js +0 -105
- package/dist/Button/constants.cjs +0 -1
- package/dist/Button/constants.js +0 -14
- package/dist/Button/index.cjs +0 -1
- package/dist/Button/index.js +0 -5
- package/dist/Button/utils.cjs +0 -87
- package/dist/Button/utils.js +0 -112
- package/dist/Card/Card.cjs +0 -1
- package/dist/Card/Card.js +0 -32
- package/dist/Card/CardAction.cjs +0 -6
- package/dist/Card/CardAction.js +0 -14
- package/dist/Card/CardAsset.cjs +0 -19
- package/dist/Card/CardAsset.js +0 -42
- package/dist/Card/CardBadge.cjs +0 -6
- package/dist/Card/CardBadge.js +0 -14
- package/dist/Card/CardBody.cjs +0 -1
- package/dist/Card/CardBody.js +0 -15
- package/dist/Card/CardCheckbox.cjs +0 -1
- package/dist/Card/CardCheckbox.js +0 -16
- package/dist/Card/CardContent.cjs +0 -3
- package/dist/Card/CardContent.js +0 -15
- package/dist/Card/CardContext.cjs +0 -1
- package/dist/Card/CardContext.js +0 -6
- package/dist/Card/CardHeader.cjs +0 -4
- package/dist/Card/CardHeader.js +0 -13
- package/dist/Card/CardTimer.cjs +0 -5
- package/dist/Card/CardTimer.js +0 -26
- package/dist/Card/CardTitle.cjs +0 -1
- package/dist/Card/CardTitle.js +0 -23
- package/dist/Card/index.cjs +0 -1
- package/dist/Card/index.js +0 -23
- package/dist/CarouselInput/Carousel.cjs +0 -14
- package/dist/CarouselInput/Carousel.js +0 -131
- package/dist/CarouselInput/CarouselActions.cjs +0 -1
- package/dist/CarouselInput/CarouselActions.js +0 -14
- package/dist/CarouselInput/CarouselImage.cjs +0 -4
- package/dist/CarouselInput/CarouselImage.js +0 -35
- package/dist/CarouselInput/CarouselInput.cjs +0 -1
- package/dist/CarouselInput/CarouselInput.js +0 -79
- package/dist/CarouselInput/CarouselSlide.cjs +0 -3
- package/dist/CarouselInput/CarouselSlide.js +0 -26
- package/dist/CarouselInput/index.cjs +0 -1
- package/dist/CarouselInput/index.js +0 -12
- package/dist/Checkbox/Checkbox.cjs +0 -7
- package/dist/Checkbox/Checkbox.js +0 -64
- package/dist/Checkbox/index.cjs +0 -1
- package/dist/Checkbox/index.js +0 -4
- package/dist/Combobox/Combobox.cjs +0 -1
- package/dist/Combobox/Combobox.js +0 -285
- package/dist/Combobox/ComboboxList.cjs +0 -1
- package/dist/Combobox/ComboboxList.js +0 -15
- package/dist/Combobox/ComboboxOption.cjs +0 -1
- package/dist/Combobox/ComboboxOption.js +0 -30
- package/dist/Combobox/components.cjs +0 -53
- package/dist/Combobox/components.js +0 -64
- package/dist/Combobox/index.cjs +0 -1
- package/dist/Combobox/index.js +0 -7
- package/dist/Combobox/utils.cjs +0 -1
- package/dist/Combobox/utils.js +0 -78
- package/dist/DatePicker/DatePicker.cjs +0 -1
- package/dist/DatePicker/DatePicker.js +0 -104
- package/dist/DatePicker/DatePickerCalendar.cjs +0 -1
- package/dist/DatePicker/DatePickerCalendar.js +0 -102
- package/dist/DatePicker/DatePickerTd.cjs +0 -19
- package/dist/DatePicker/DatePickerTd.js +0 -55
- package/dist/DatePicker/DatePickerTh.cjs +0 -9
- package/dist/DatePicker/DatePickerTh.js +0 -35
- package/dist/DatePicker/compareDates.cjs +0 -1
- package/dist/DatePicker/compareDates.js +0 -4
- package/dist/DatePicker/components.cjs +0 -31
- package/dist/DatePicker/components.js +0 -41
- package/dist/DatePicker/index.cjs +0 -1
- package/dist/DatePicker/index.js +0 -4
- package/dist/DatePicker/utils/formatDate.cjs +0 -1
- package/dist/DatePicker/utils/formatDate.js +0 -4
- package/dist/DatePicker/utils/generateWeeks.cjs +0 -1
- package/dist/DatePicker/utils/generateWeeks.js +0 -17
- package/dist/DatePicker/utils/getDayOfWeek.cjs +0 -1
- package/dist/DatePicker/utils/getDayOfWeek.js +0 -15
- package/dist/DatePicker/utils/getMonths.cjs +0 -1
- package/dist/DatePicker/utils/getMonths.js +0 -7
- package/dist/DatePicker/utils/getYears.cjs +0 -1
- package/dist/DatePicker/utils/getYears.js +0 -9
- package/dist/DatePicker/utils/index.cjs +0 -1
- package/dist/DatePicker/utils/index.js +0 -12
- package/dist/DateTimePicker/DateTimePicker.cjs +0 -1
- package/dist/DateTimePicker/DateTimePicker.js +0 -108
- package/dist/DateTimePicker/DateTimePickerProps.cjs +0 -1
- package/dist/DateTimePicker/DateTimePickerProps.js +0 -42
- package/dist/DateTimePicker/__tests__/parseDate.test.cjs +0 -1
- package/dist/DateTimePicker/__tests__/parseDate.test.js +0 -8
- package/dist/DateTimePicker/index.cjs +0 -1
- package/dist/DateTimePicker/index.js +0 -4
- package/dist/DateTimePicker/parseDate.cjs +0 -1
- package/dist/DateTimePicker/parseDate.js +0 -7
- package/dist/Dialog/Dialog.cjs +0 -14
- package/dist/Dialog/Dialog.js +0 -66
- package/dist/Dialog/DialogBody.cjs +0 -10
- package/dist/Dialog/DialogBody.js +0 -32
- package/dist/Dialog/DialogFooter.cjs +0 -9
- package/dist/Dialog/DialogFooter.js +0 -31
- package/dist/Dialog/index.cjs +0 -1
- package/dist/Dialog/index.js +0 -8
- package/dist/DismissibleLayer/DismissibleLayer.cjs +0 -1
- package/dist/DismissibleLayer/DismissibleLayer.js +0 -37
- package/dist/DismissibleLayer/index.cjs +0 -1
- package/dist/DismissibleLayer/index.js +0 -4
- package/dist/Divider/Divider.cjs +0 -5
- package/dist/Divider/Divider.js +0 -24
- package/dist/Divider/index.cjs +0 -1
- package/dist/Divider/index.js +0 -4
- package/dist/EmptyStateLayout/EmptyStateLayout.cjs +0 -10
- package/dist/EmptyStateLayout/EmptyStateLayout.js +0 -44
- package/dist/EmptyStateLayout/index.cjs +0 -1
- package/dist/EmptyStateLayout/index.js +0 -4
- package/dist/EmptyStateLayout/story-assets/Illo.cjs +0 -1
- package/dist/EmptyStateLayout/story-assets/Illo.js +0 -49
- package/dist/Field/Field.cjs +0 -1
- package/dist/Field/Field.js +0 -28
- package/dist/Field/FieldAction.cjs +0 -10
- package/dist/Field/FieldAction.js +0 -24
- package/dist/Field/FieldContext.cjs +0 -1
- package/dist/Field/FieldContext.js +0 -6
- package/dist/Field/FieldError.cjs +0 -1
- package/dist/Field/FieldError.js +0 -16
- package/dist/Field/FieldHint.cjs +0 -1
- package/dist/Field/FieldHint.js +0 -15
- package/dist/Field/FieldInput.cjs +0 -43
- package/dist/Field/FieldInput.js +0 -105
- package/dist/Field/FieldLabel.cjs +0 -9
- package/dist/Field/FieldLabel.js +0 -44
- package/dist/Field/index.cjs +0 -1
- package/dist/Field/index.js +0 -18
- package/dist/Flex/Flex.cjs +0 -9
- package/dist/Flex/Flex.js +0 -22
- package/dist/Flex/FlexProps.cjs +0 -1
- package/dist/Flex/FlexProps.js +0 -40
- package/dist/Flex/index.cjs +0 -1
- package/dist/Flex/index.js +0 -4
- package/dist/FocusTrap/ExampleComponent.cjs +0 -1
- package/dist/FocusTrap/ExampleComponent.js +0 -70
- package/dist/FocusTrap/FocusTrap.cjs +0 -1
- package/dist/FocusTrap/FocusTrap.js +0 -48
- package/dist/FocusTrap/index.cjs +0 -1
- package/dist/FocusTrap/index.js +0 -4
- package/dist/Grid/Grid.cjs +0 -5
- package/dist/Grid/Grid.js +0 -28
- package/dist/Grid/GridContext.cjs +0 -1
- package/dist/Grid/GridContext.js +0 -6
- package/dist/Grid/GridItem.cjs +0 -12
- package/dist/Grid/GridItem.js +0 -41
- package/dist/Grid/index.cjs +0 -1
- package/dist/Grid/index.js +0 -6
- package/dist/Icon/Icon.cjs +0 -6
- package/dist/Icon/Icon.js +0 -26
- package/dist/Icon/index.cjs +0 -1
- package/dist/Icon/index.js +0 -4
- package/dist/IconButton/IconButton.cjs +0 -86
- package/dist/IconButton/IconButton.js +0 -129
- package/dist/IconButton/index.cjs +0 -1
- package/dist/IconButton/index.js +0 -5
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +0 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.js +0 -58
- package/dist/KeyboardNavigable/index.cjs +0 -1
- package/dist/KeyboardNavigable/index.js +0 -4
- package/dist/Layout/ActionLayout.cjs +0 -9
- package/dist/Layout/ActionLayout.js +0 -37
- package/dist/Layout/ContentLayout.cjs +0 -1
- package/dist/Layout/ContentLayout.js +0 -13
- package/dist/Layout/GridLayout.cjs +0 -5
- package/dist/Layout/GridLayout.js +0 -13
- package/dist/Layout/HeaderLayout.cjs +0 -8
- package/dist/Layout/HeaderLayout.js +0 -132
- package/dist/Layout/Layout.cjs +0 -6
- package/dist/Layout/Layout.js +0 -24
- package/dist/Layout/TwoColsLayout.cjs +0 -1
- package/dist/Layout/TwoColsLayout.js +0 -29
- package/dist/Layout/index.cjs +0 -1
- package/dist/Layout/index.js +0 -15
- package/dist/Link/Link.cjs +0 -33
- package/dist/Link/Link.js +0 -87
- package/dist/Link/index.cjs +0 -1
- package/dist/Link/index.js +0 -4
- package/dist/LinkButton/LinkButton.cjs +0 -32
- package/dist/LinkButton/LinkButton.js +0 -99
- package/dist/LinkButton/index.cjs +0 -1
- package/dist/LinkButton/index.js +0 -4
- package/dist/LiveRegions/LiveRegions.cjs +0 -1
- package/dist/LiveRegions/LiveRegions.js +0 -22
- package/dist/LiveRegions/StoryComponent.cjs +0 -1
- package/dist/LiveRegions/StoryComponent.js +0 -18
- package/dist/LiveRegions/constants.cjs +0 -1
- package/dist/LiveRegions/constants.js +0 -8
- package/dist/LiveRegions/index.cjs +0 -1
- package/dist/LiveRegions/index.js +0 -4
- package/dist/LiveRegions/useNotifyAT.cjs +0 -1
- package/dist/LiveRegions/useNotifyAT.js +0 -17
- package/dist/Loader/Loader.cjs +0 -12
- package/dist/Loader/Loader.js +0 -37
- package/dist/Loader/assets/loader.cjs +0 -1
- package/dist/Loader/assets/loader.js +0 -4
- package/dist/Loader/index.cjs +0 -1
- package/dist/Loader/index.js +0 -4
- package/dist/Main/Main.cjs +0 -6
- package/dist/Main/Main.js +0 -26
- package/dist/Main/SkipToContent.cjs +0 -12
- package/dist/Main/SkipToContent.js +0 -29
- package/dist/Main/index.cjs +0 -1
- package/dist/Main/index.js +0 -6
- package/dist/MainNav/MainNav.cjs +0 -9
- package/dist/MainNav/MainNav.js +0 -30
- package/dist/MainNav/MainNavContext.cjs +0 -1
- package/dist/MainNav/MainNavContext.js +0 -6
- package/dist/MainNav/NavBrand.cjs +0 -12
- package/dist/MainNav/NavBrand.js +0 -67
- package/dist/MainNav/NavCondense.cjs +0 -20
- package/dist/MainNav/NavCondense.js +0 -45
- package/dist/MainNav/NavLink.cjs +0 -69
- package/dist/MainNav/NavLink.js +0 -119
- package/dist/MainNav/NavSection.cjs +0 -1
- package/dist/MainNav/NavSection.js +0 -49
- package/dist/MainNav/NavSections.cjs +0 -1
- package/dist/MainNav/NavSections.js +0 -21
- package/dist/MainNav/NavUser.cjs +0 -7
- package/dist/MainNav/NavUser.js +0 -54
- package/dist/MainNav/index.cjs +0 -1
- package/dist/MainNav/index.js +0 -16
- package/dist/ModalLayout/ModalBody.cjs +0 -4
- package/dist/ModalLayout/ModalBody.js +0 -13
- package/dist/ModalLayout/ModalContext.cjs +0 -1
- package/dist/ModalLayout/ModalContext.js +0 -6
- package/dist/ModalLayout/ModalFooter.cjs +0 -8
- package/dist/ModalLayout/ModalFooter.js +0 -32
- package/dist/ModalLayout/ModalHeader.cjs +0 -4
- package/dist/ModalLayout/ModalHeader.js +0 -37
- package/dist/ModalLayout/ModalLayout.cjs +0 -12
- package/dist/ModalLayout/ModalLayout.js +0 -42
- package/dist/ModalLayout/index.cjs +0 -1
- package/dist/ModalLayout/index.js +0 -10
- package/dist/NumberInput/NumberInput.cjs +0 -12
- package/dist/NumberInput/NumberInput.js +0 -179
- package/dist/NumberInput/index.cjs +0 -1
- package/dist/NumberInput/index.js +0 -4
- package/dist/Pagination/Pagination.cjs +0 -5
- package/dist/Pagination/Pagination.js +0 -30
- package/dist/Pagination/PaginationContext.cjs +0 -1
- package/dist/Pagination/PaginationContext.js +0 -6
- package/dist/Pagination/assets/next.cjs +0 -1
- package/dist/Pagination/assets/next.js +0 -4
- package/dist/Pagination/assets/previous.cjs +0 -1
- package/dist/Pagination/assets/previous.js +0 -4
- package/dist/Pagination/components.cjs +0 -36
- package/dist/Pagination/components.js +0 -111
- package/dist/Pagination/index.cjs +0 -1
- package/dist/Pagination/index.js +0 -9
- package/dist/Popover/Popover.cjs +0 -26
- package/dist/Popover/Popover.js +0 -122
- package/dist/Popover/index.cjs +0 -1
- package/dist/Popover/index.js +0 -5
- package/dist/Portal/Portal.cjs +0 -1
- package/dist/Portal/Portal.js +0 -15
- package/dist/Portal/index.cjs +0 -1
- package/dist/Portal/index.js +0 -4
- package/dist/ProgressBar/ProgressBar.cjs +0 -21
- package/dist/ProgressBar/ProgressBar.js +0 -58
- package/dist/ProgressBar/index.cjs +0 -1
- package/dist/ProgressBar/index.js +0 -4
- package/dist/Radio/Radio.cjs +0 -4
- package/dist/Radio/Radio.js +0 -24
- package/dist/Radio/index.cjs +0 -1
- package/dist/Radio/index.js +0 -6
- package/dist/RawTable/RawCell.cjs +0 -1
- package/dist/RawTable/RawCell.js +0 -80
- package/dist/RawTable/RawTable.cjs +0 -1
- package/dist/RawTable/RawTable.js +0 -73
- package/dist/RawTable/RawTableContext.cjs +0 -1
- package/dist/RawTable/RawTableContext.js +0 -12
- package/dist/RawTable/RawTbody.cjs +0 -1
- package/dist/RawTable/RawTbody.js +0 -16
- package/dist/RawTable/RawThead.cjs +0 -1
- package/dist/RawTable/RawThead.js +0 -14
- package/dist/RawTable/RawTr.cjs +0 -1
- package/dist/RawTable/RawTr.js +0 -19
- package/dist/RawTable/focusFocusable.cjs +0 -1
- package/dist/RawTable/focusFocusable.js +0 -7
- package/dist/RawTable/index.cjs +0 -1
- package/dist/RawTable/index.js +0 -13
- package/dist/Searchbar/SearchForm.cjs +0 -1
- package/dist/Searchbar/SearchForm.js +0 -8
- package/dist/Searchbar/Searchbar.cjs +0 -29
- package/dist/Searchbar/Searchbar.js +0 -79
- package/dist/Searchbar/index.cjs +0 -1
- package/dist/Searchbar/index.js +0 -6
- package/dist/Select/MultiSelectNested.cjs +0 -1
- package/dist/Select/MultiSelectNested.js +0 -26
- package/dist/Select/OptGroup.cjs +0 -1
- package/dist/Select/OptGroup.js +0 -20
- package/dist/Select/Option.cjs +0 -49
- package/dist/Select/Option.js +0 -104
- package/dist/Select/Select.cjs +0 -3
- package/dist/Select/Select.js +0 -232
- package/dist/Select/SelectButton.cjs +0 -19
- package/dist/Select/SelectButton.js +0 -64
- package/dist/Select/SelectList.cjs +0 -1
- package/dist/Select/SelectList.js +0 -81
- package/dist/Select/SelectTags.cjs +0 -8
- package/dist/Select/SelectTags.js +0 -36
- package/dist/Select/components.cjs +0 -39
- package/dist/Select/components.js +0 -48
- package/dist/Select/constants.cjs +0 -1
- package/dist/Select/constants.js +0 -8
- package/dist/Select/hooks/useButtonRef.cjs +0 -1
- package/dist/Select/hooks/useButtonRef.js +0 -13
- package/dist/Select/hooks/useListRef.cjs +0 -1
- package/dist/Select/hooks/useListRef.js +0 -18
- package/dist/Select/index.cjs +0 -1
- package/dist/Select/index.js +0 -12
- package/dist/Select/utils.cjs +0 -1
- package/dist/Select/utils.js +0 -17
- package/dist/SimpleMenu/SimpleMenu.cjs +0 -19
- package/dist/SimpleMenu/SimpleMenu.js +0 -164
- package/dist/SimpleMenu/index.cjs +0 -1
- package/dist/SimpleMenu/index.js +0 -5
- package/dist/SimpleMenu/utils.cjs +0 -12
- package/dist/SimpleMenu/utils.js +0 -15
- package/dist/Stack/Stack.cjs +0 -19
- package/dist/Stack/Stack.js +0 -55
- package/dist/Stack/index.cjs +0 -1
- package/dist/Stack/index.js +0 -4
- package/dist/Status/Status.cjs +0 -11
- package/dist/Status/Status.js +0 -46
- package/dist/Status/index.cjs +0 -1
- package/dist/Status/index.js +0 -4
- package/dist/SubNav/SubNav.cjs +0 -10
- package/dist/SubNav/SubNav.js +0 -26
- package/dist/SubNav/SubNavHeader.cjs +0 -4
- package/dist/SubNav/SubNavHeader.js +0 -98
- package/dist/SubNav/SubNavLink.cjs +0 -39
- package/dist/SubNav/SubNavLink.js +0 -80
- package/dist/SubNav/SubNavLinkSection.cjs +0 -19
- package/dist/SubNav/SubNavLinkSection.js +0 -68
- package/dist/SubNav/SubNavSection.cjs +0 -8
- package/dist/SubNav/SubNavSection.js +0 -63
- package/dist/SubNav/SubNavSectionLabel.cjs +0 -9
- package/dist/SubNav/SubNavSectionLabel.js +0 -53
- package/dist/SubNav/SubNavSections.cjs +0 -1
- package/dist/SubNav/SubNavSections.js +0 -20
- package/dist/SubNav/index.cjs +0 -1
- package/dist/SubNav/index.js +0 -15
- package/dist/Switch/Switch.cjs +0 -42
- package/dist/Switch/Switch.js +0 -80
- package/dist/Switch/index.cjs +0 -1
- package/dist/Switch/index.js +0 -4
- package/dist/Table/Cell.cjs +0 -17
- package/dist/Table/Cell.js +0 -39
- package/dist/Table/TFooter.cjs +0 -22
- package/dist/Table/TFooter.js +0 -50
- package/dist/Table/Table.cjs +0 -36
- package/dist/Table/Table.js +0 -80
- package/dist/Table/Tbody.cjs +0 -5
- package/dist/Table/Tbody.js +0 -13
- package/dist/Table/Thead.cjs +0 -3
- package/dist/Table/Thead.js +0 -11
- package/dist/Table/Tr.cjs +0 -20
- package/dist/Table/Tr.js +0 -28
- package/dist/Table/index.cjs +0 -1
- package/dist/Table/index.js +0 -15
- package/dist/Tabs/TabGroup.cjs +0 -1
- package/dist/Tabs/TabGroup.js +0 -36
- package/dist/Tabs/TabPanels.cjs +0 -1
- package/dist/Tabs/TabPanels.js +0 -32
- package/dist/Tabs/Tabs.cjs +0 -5
- package/dist/Tabs/Tabs.js +0 -134
- package/dist/Tabs/TabsContext.cjs +0 -1
- package/dist/Tabs/TabsContext.js +0 -6
- package/dist/Tabs/components.cjs +0 -43
- package/dist/Tabs/components.js +0 -52
- package/dist/Tabs/index.cjs +0 -1
- package/dist/Tabs/index.js +0 -10
- package/dist/Tabs/useTabsFocus.cjs +0 -1
- package/dist/Tabs/useTabsFocus.js +0 -16
- package/dist/Tag/Tag.cjs +0 -14
- package/dist/Tag/Tag.js +0 -60
- package/dist/Tag/index.cjs +0 -1
- package/dist/Tag/index.js +0 -4
- package/dist/TextButton/TextButton.cjs +0 -32
- package/dist/TextButton/TextButton.js +0 -82
- package/dist/TextButton/index.cjs +0 -1
- package/dist/TextButton/index.js +0 -4
- package/dist/TextInput/TextInput.cjs +0 -1
- package/dist/TextInput/TextInput.js +0 -69
- package/dist/TextInput/index.cjs +0 -1
- package/dist/TextInput/index.js +0 -4
- package/dist/Textarea/Textarea.cjs +0 -15
- package/dist/Textarea/Textarea.js +0 -74
- package/dist/Textarea/TextareaInput.cjs +0 -30
- package/dist/Textarea/TextareaInput.js +0 -68
- package/dist/Textarea/index.cjs +0 -1
- package/dist/Textarea/index.js +0 -4
- package/dist/ThemeProvider/ThemeProvider.cjs +0 -173
- package/dist/ThemeProvider/ThemeProvider.js +0 -186
- package/dist/ThemeProvider/hooks.cjs +0 -1
- package/dist/ThemeProvider/hooks.js +0 -5
- package/dist/ThemeProvider/index.cjs +0 -1
- package/dist/ThemeProvider/index.js +0 -6
- package/dist/TimePicker/TimePicker.cjs +0 -12
- package/dist/TimePicker/TimePicker.js +0 -104
- package/dist/TimePicker/index.cjs +0 -1
- package/dist/TimePicker/index.js +0 -4
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +0 -36
- package/dist/ToggleCheckbox/ToggleCheckbox.js +0 -119
- package/dist/ToggleCheckbox/index.cjs +0 -1
- package/dist/ToggleCheckbox/index.js +0 -4
- package/dist/ToggleInput/ToggleInput.cjs +0 -6
- package/dist/ToggleInput/ToggleInput.js +0 -90
- package/dist/ToggleInput/index.cjs +0 -1
- package/dist/ToggleInput/index.js +0 -4
- package/dist/Tooltip/Tooltip.cjs +0 -6
- package/dist/Tooltip/Tooltip.js +0 -60
- package/dist/Tooltip/hooks/useTooltipHandlers.cjs +0 -1
- package/dist/Tooltip/hooks/useTooltipHandlers.js +0 -22
- package/dist/Tooltip/hooks/useTooltipLayout.cjs +0 -1
- package/dist/Tooltip/hooks/useTooltipLayout.js +0 -14
- package/dist/Tooltip/index.cjs +0 -1
- package/dist/Tooltip/index.js +0 -4
- package/dist/Tooltip/utils/positionTooltip.cjs +0 -1
- package/dist/Tooltip/utils/positionTooltip.js +0 -27
- package/dist/Typography/Typography.cjs +0 -10
- package/dist/Typography/Typography.js +0 -23
- package/dist/Typography/TypographyProps.cjs +0 -1
- package/dist/Typography/TypographyProps.js +0 -31
- package/dist/Typography/constants.cjs +0 -1
- package/dist/Typography/constants.js +0 -11
- package/dist/Typography/index.cjs +0 -1
- package/dist/Typography/index.js +0 -4
- package/dist/Typography/utils.cjs +0 -34
- package/dist/Typography/utils.js +0 -59
- package/dist/VisuallyHidden/VisuallyHidden.cjs +0 -10
- package/dist/VisuallyHidden/VisuallyHidden.js +0 -14
- package/dist/VisuallyHidden/index.cjs +0 -1
- package/dist/VisuallyHidden/index.js +0 -4
- package/dist/helpers/escapeSelector.cjs +0 -1
- package/dist/helpers/escapeSelector.js +0 -4
- package/dist/helpers/genId.cjs +0 -1
- package/dist/helpers/genId.js +0 -5
- package/dist/helpers/getDefaultLocale.cjs +0 -1
- package/dist/helpers/getDefaultLocale.js +0 -4
- package/dist/helpers/getFocusableNodes.cjs +0 -1
- package/dist/helpers/getFocusableNodes.js +0 -7
- package/dist/helpers/handleResponsiveValues.cjs +0 -5
- package/dist/helpers/handleResponsiveValues.js +0 -19
- package/dist/helpers/keyboardKeys.cjs +0 -1
- package/dist/helpers/keyboardKeys.js +0 -20
- package/dist/helpers/setOpacity.cjs +0 -1
- package/dist/helpers/setOpacity.js +0 -4
- package/dist/helpers/setTabIndexOnFirstItem.cjs +0 -1
- package/dist/helpers/setTabIndexOnFirstItem.js +0 -7
- package/dist/helpers/useElementOnScreen.cjs +0 -1
- package/dist/helpers/useElementOnScreen.js +0 -15
- package/dist/helpers/useId.cjs +0 -1
- package/dist/helpers/useId.js +0 -6
- package/dist/helpers/useIntersection.cjs +0 -1
- package/dist/helpers/useIntersection.js +0 -21
- package/dist/helpers/useLockScroll.cjs +0 -1
- package/dist/helpers/useLockScroll.js +0 -9
- package/dist/helpers/usePrevious.cjs +0 -1
- package/dist/helpers/usePrevious.js +0 -10
- package/dist/helpers/useResizeObserver.cjs +0 -1
- package/dist/helpers/useResizeObserver.js +0 -14
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -290
- package/dist/themes/ColorButton.cjs +0 -3
- package/dist/themes/ColorButton.js +0 -25
- package/dist/themes/colors.cjs +0 -1
- package/dist/themes/colors.js +0 -49
- package/dist/themes/common-theme.cjs +0 -1
- package/dist/themes/common-theme.js +0 -21
- package/dist/themes/darkTheme/dark-colors.cjs +0 -1
- package/dist/themes/darkTheme/dark-colors.js +0 -52
- package/dist/themes/darkTheme/dark-shadows.cjs +0 -1
- package/dist/themes/darkTheme/dark-shadows.js +0 -12
- package/dist/themes/darkTheme/index.cjs +0 -1
- package/dist/themes/darkTheme/index.js +0 -11
- package/dist/themes/extendTheme.cjs +0 -13
- package/dist/themes/extendTheme.js +0 -36
- package/dist/themes/index.cjs +0 -1
- package/dist/themes/index.js +0 -12
- package/dist/themes/lightTheme/index.cjs +0 -1
- package/dist/themes/lightTheme/index.js +0 -11
- package/dist/themes/lightTheme/light-colors.cjs +0 -1
- package/dist/themes/lightTheme/light-colors.js +0 -52
- package/dist/themes/lightTheme/light-shadows.cjs +0 -1
- package/dist/themes/lightTheme/light-shadows.js +0 -12
- package/dist/themes/sizes.cjs +0 -1
- package/dist/themes/sizes.js +0 -13
- package/dist/themes/utils.cjs +0 -41
- package/dist/themes/utils.js +0 -46
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +0 -9
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +0 -38
- package/dist/v2/Breadcrumbs/Crumb.cjs +0 -1
- package/dist/v2/Breadcrumbs/Crumb.js +0 -27
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +0 -14
- package/dist/v2/Breadcrumbs/CrumbLink.js +0 -31
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +0 -8
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +0 -28
- package/dist/v2/Breadcrumbs/Divider.cjs +0 -1
- package/dist/v2/Breadcrumbs/Divider.js +0 -15
- package/dist/v2/Breadcrumbs/index.cjs +0 -1
- package/dist/v2/Breadcrumbs/index.js +0 -10
- package/dist/v2/Link/Link.cjs +0 -23
- package/dist/v2/Link/Link.js +0 -69
- package/dist/v2/Link/index.cjs +0 -1
- package/dist/v2/Link/index.js +0 -4
- package/dist/v2/LinkButton/LinkButton.cjs +0 -33
- package/dist/v2/LinkButton/LinkButton.js +0 -95
- package/dist/v2/LinkButton/index.cjs +0 -1
- package/dist/v2/LinkButton/index.js +0 -4
- package/dist/v2/MainNav/MainNav.cjs +0 -9
- package/dist/v2/MainNav/MainNav.js +0 -30
- package/dist/v2/MainNav/MainNavContext.cjs +0 -1
- package/dist/v2/MainNav/MainNavContext.js +0 -6
- package/dist/v2/MainNav/NavBrand.cjs +0 -12
- package/dist/v2/MainNav/NavBrand.js +0 -68
- package/dist/v2/MainNav/NavCondense.cjs +0 -20
- package/dist/v2/MainNav/NavCondense.js +0 -45
- package/dist/v2/MainNav/NavLink.cjs +0 -69
- package/dist/v2/MainNav/NavLink.js +0 -122
- package/dist/v2/MainNav/NavSection.cjs +0 -1
- package/dist/v2/MainNav/NavSection.js +0 -49
- package/dist/v2/MainNav/NavSections.cjs +0 -1
- package/dist/v2/MainNav/NavSections.js +0 -21
- package/dist/v2/MainNav/NavUser.cjs +0 -7
- package/dist/v2/MainNav/NavUser.js +0 -54
- package/dist/v2/MainNav/index.cjs +0 -1
- package/dist/v2/MainNav/index.js +0 -16
- package/dist/v2/Pagination/Pagination.cjs +0 -5
- package/dist/v2/Pagination/Pagination.js +0 -30
- package/dist/v2/Pagination/PaginationContext.cjs +0 -1
- package/dist/v2/Pagination/PaginationContext.js +0 -6
- package/dist/v2/Pagination/assets/next.cjs +0 -1
- package/dist/v2/Pagination/assets/next.js +0 -4
- package/dist/v2/Pagination/assets/previous.cjs +0 -1
- package/dist/v2/Pagination/assets/previous.js +0 -4
- package/dist/v2/Pagination/components.cjs +0 -36
- package/dist/v2/Pagination/components.js +0 -111
- package/dist/v2/Pagination/index.cjs +0 -1
- package/dist/v2/Pagination/index.js +0 -9
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +0 -19
- package/dist/v2/SimpleMenu/SimpleMenu.js +0 -164
- package/dist/v2/SimpleMenu/index.cjs +0 -1
- package/dist/v2/SimpleMenu/index.js +0 -5
- package/dist/v2/SimpleMenu/utils.cjs +0 -12
- package/dist/v2/SimpleMenu/utils.js +0 -15
- package/dist/v2/SubNav/SubNav.cjs +0 -10
- package/dist/v2/SubNav/SubNav.js +0 -26
- package/dist/v2/SubNav/SubNavHeader.cjs +0 -4
- package/dist/v2/SubNav/SubNavHeader.js +0 -98
- package/dist/v2/SubNav/SubNavLink.cjs +0 -39
- package/dist/v2/SubNav/SubNavLink.js +0 -83
- package/dist/v2/SubNav/SubNavLinkSection.cjs +0 -19
- package/dist/v2/SubNav/SubNavLinkSection.js +0 -68
- package/dist/v2/SubNav/SubNavSection.cjs +0 -8
- package/dist/v2/SubNav/SubNavSection.js +0 -63
- package/dist/v2/SubNav/SubNavSectionLabel.cjs +0 -9
- package/dist/v2/SubNav/SubNavSectionLabel.js +0 -53
- package/dist/v2/SubNav/SubNavSections.cjs +0 -1
- package/dist/v2/SubNav/SubNavSections.js +0 -20
- package/dist/v2/SubNav/index.cjs +0 -1
- package/dist/v2/SubNav/index.js +0 -15
- package/dist/v2/index.cjs +0 -1
- package/dist/v2/index.js +0 -51
- package/vite.config.js +0 -35
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import t, { useState as j, useRef as x } from "react";
|
|
2
|
-
import e from "prop-types";
|
|
3
|
-
import E from "@strapi/icons/CarretDown";
|
|
4
|
-
import H from "styled-components";
|
|
5
|
-
import { sizes as M } from "../themes/sizes.js";
|
|
6
|
-
import { NumberParser as W, NumberFormatter as X } from "@internationalized/number";
|
|
7
|
-
import { Field as Y } from "../Field/Field.js";
|
|
8
|
-
import { FieldLabel as G } from "../Field/FieldLabel.js";
|
|
9
|
-
import { FieldInput as J } from "../Field/FieldInput.js";
|
|
10
|
-
import { FieldHint as Q } from "../Field/FieldHint.js";
|
|
11
|
-
import { FieldError as Z } from "../Field/FieldError.js";
|
|
12
|
-
import "../Field/FieldContext.js";
|
|
13
|
-
import "../Field/FieldAction.js";
|
|
14
|
-
import { Stack as C } from "../Stack/Stack.js";
|
|
15
|
-
import { Icon as w } from "../Icon/Icon.js";
|
|
16
|
-
import { useId as ee } from "../helpers/useId.js";
|
|
17
|
-
import { KeyboardKeys as I } from "../helpers/keyboardKeys.js";
|
|
18
|
-
import { getDefaultLocale as F } from "../helpers/getDefaultLocale.js";
|
|
19
|
-
const A = H.button`
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 1rem;
|
|
22
|
-
align-items: ${({ reverse: i }) => i ? "flex-end" : "flex-start"};
|
|
23
|
-
transform: translateY(${({ reverse: i }) => i ? "-2px" : "2px"});
|
|
24
|
-
cursor: ${({ disabled: i }) => i ? "not-allowed" : void 0};
|
|
25
|
-
svg {
|
|
26
|
-
display: block;
|
|
27
|
-
height: ${4 / 16}rem;
|
|
28
|
-
transform: ${({ reverse: i }) => i ? "rotateX(180deg)" : void 0};
|
|
29
|
-
}
|
|
30
|
-
`, V = "", g = t.forwardRef(
|
|
31
|
-
({
|
|
32
|
-
size: i,
|
|
33
|
-
startAction: h,
|
|
34
|
-
name: D,
|
|
35
|
-
hint: S,
|
|
36
|
-
error: k,
|
|
37
|
-
label: v,
|
|
38
|
-
labelAction: R,
|
|
39
|
-
locale: P,
|
|
40
|
-
id: O,
|
|
41
|
-
onValueChange: s,
|
|
42
|
-
value: a,
|
|
43
|
-
step: r,
|
|
44
|
-
required: $,
|
|
45
|
-
disabled: d,
|
|
46
|
-
...q
|
|
47
|
-
}, K) => {
|
|
48
|
-
const [m, o] = j(a == null ? V : String(a)), L = ee("numberinput", O), T = P || F(), f = x(new W(T)), p = x(new X(F(), { maximumFractionDigits: 20 })), z = (n) => {
|
|
49
|
-
const l = n.target.value;
|
|
50
|
-
if (f.current.isValidPartialNumber(l)) {
|
|
51
|
-
const u = l === "" ? void 0 : f.current.parse(l);
|
|
52
|
-
u === void 0 || isNaN(u) ? s(void 0) : s(u), o(n.target.value);
|
|
53
|
-
}
|
|
54
|
-
}, N = (n) => {
|
|
55
|
-
if (m === void 0) {
|
|
56
|
-
s(r), o(String(r));
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
if (isNaN(m)) {
|
|
60
|
-
const l = f.current.parse(m), c = (isNaN(l) ? 0 : l) + r, b = p.current.format(c);
|
|
61
|
-
s(c), o(n ? String(c) : b);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
s(a + r), o(String(a + r));
|
|
65
|
-
}, y = (n) => {
|
|
66
|
-
if (m === void 0) {
|
|
67
|
-
s(-r), o(String(-r));
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (isNaN(m)) {
|
|
71
|
-
const l = f.current.parse(m), c = (isNaN(l) ? 0 : l) - r, b = p.current.format(c);
|
|
72
|
-
s(c), o(n ? String(c) : b);
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
s(a - r), o(String(a - r));
|
|
76
|
-
}, B = (n) => {
|
|
77
|
-
if (!d)
|
|
78
|
-
switch (n.key) {
|
|
79
|
-
case I.DOWN: {
|
|
80
|
-
n.preventDefault(), y(!0);
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
case I.UP: {
|
|
84
|
-
n.preventDefault(), N(!0);
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}, U = () => {
|
|
89
|
-
o(m ?? V);
|
|
90
|
-
}, _ = () => {
|
|
91
|
-
o(a === void 0 ? void 0 : p.current.format(a));
|
|
92
|
-
};
|
|
93
|
-
return /* @__PURE__ */ t.createElement(Y, {
|
|
94
|
-
name: D,
|
|
95
|
-
hint: S,
|
|
96
|
-
error: k,
|
|
97
|
-
id: L
|
|
98
|
-
}, /* @__PURE__ */ t.createElement(C, {
|
|
99
|
-
spacing: 1
|
|
100
|
-
}, v && /* @__PURE__ */ t.createElement(G, {
|
|
101
|
-
required: $,
|
|
102
|
-
action: R
|
|
103
|
-
}, v), /* @__PURE__ */ t.createElement(J, {
|
|
104
|
-
ref: K,
|
|
105
|
-
startAction: h,
|
|
106
|
-
disabled: d,
|
|
107
|
-
type: "text",
|
|
108
|
-
inputmode: "decimal",
|
|
109
|
-
onChange: z,
|
|
110
|
-
onKeyDown: B,
|
|
111
|
-
onBlur: _,
|
|
112
|
-
onFocus: U,
|
|
113
|
-
value: m ?? "",
|
|
114
|
-
size: i,
|
|
115
|
-
endAction: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(A, {
|
|
116
|
-
disabled: d,
|
|
117
|
-
"aria-hidden": !0,
|
|
118
|
-
reverse: !0,
|
|
119
|
-
onClick: () => {
|
|
120
|
-
N();
|
|
121
|
-
},
|
|
122
|
-
tabIndex: -1,
|
|
123
|
-
type: "button",
|
|
124
|
-
"data-testid": "ArrowUp"
|
|
125
|
-
}, /* @__PURE__ */ t.createElement(w, {
|
|
126
|
-
as: E,
|
|
127
|
-
color: "neutral500"
|
|
128
|
-
})), /* @__PURE__ */ t.createElement(A, {
|
|
129
|
-
disabled: d,
|
|
130
|
-
"aria-hidden": !0,
|
|
131
|
-
onClick: () => {
|
|
132
|
-
y();
|
|
133
|
-
},
|
|
134
|
-
tabIndex: -1,
|
|
135
|
-
type: "button",
|
|
136
|
-
"data-testid": "ArrowDown"
|
|
137
|
-
}, /* @__PURE__ */ t.createElement(w, {
|
|
138
|
-
as: E,
|
|
139
|
-
color: "neutral500"
|
|
140
|
-
}))),
|
|
141
|
-
...q
|
|
142
|
-
}), /* @__PURE__ */ t.createElement(Q, null), /* @__PURE__ */ t.createElement(Z, null)));
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
g.displayName = "NumberInput";
|
|
146
|
-
g.defaultProps = {
|
|
147
|
-
"aria-label": void 0,
|
|
148
|
-
disabled: !1,
|
|
149
|
-
error: void 0,
|
|
150
|
-
hint: void 0,
|
|
151
|
-
id: void 0,
|
|
152
|
-
label: void 0,
|
|
153
|
-
labelAction: void 0,
|
|
154
|
-
required: !1,
|
|
155
|
-
size: "M",
|
|
156
|
-
startAction: void 0,
|
|
157
|
-
step: 1,
|
|
158
|
-
value: void 0
|
|
159
|
-
};
|
|
160
|
-
g.propTypes = {
|
|
161
|
-
"aria-label": e.string,
|
|
162
|
-
disabled: e.bool,
|
|
163
|
-
error: e.string,
|
|
164
|
-
hint: e.oneOfType([e.string, e.node, e.arrayOf(e.node)]),
|
|
165
|
-
id: e.string,
|
|
166
|
-
label: e.string,
|
|
167
|
-
labelAction: e.element,
|
|
168
|
-
locale: e.string,
|
|
169
|
-
name: e.string.isRequired,
|
|
170
|
-
onValueChange: e.func.isRequired,
|
|
171
|
-
required: e.bool,
|
|
172
|
-
size: e.oneOf(Object.keys(M.input)),
|
|
173
|
-
startAction: e.element,
|
|
174
|
-
step: e.number,
|
|
175
|
-
value: e.number
|
|
176
|
-
};
|
|
177
|
-
export {
|
|
178
|
-
g as NumberInput
|
|
179
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./NumberInput.cjs");exports.NumberInput=e.NumberInput;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),p=require("styled-components"),f=require("prop-types"),g=require("../Flex/Flex.cjs"),P=require("./PaginationContext.cjs"),n=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=n(r),i=n(p),a=n(f),y=i.default.nav``,m=i.default(g.Flex)`
|
|
2
|
-
& > * + * {
|
|
3
|
-
margin-left: ${({theme:e})=>e.spaces[1]};
|
|
4
|
-
}
|
|
5
|
-
`,l=({children:e,label:o,activePage:u,pageCount:s})=>t.default.createElement(P.PaginationContext.Provider,{value:{activePage:u,pageCount:s}},t.default.createElement(y,{"aria-label":o},t.default.createElement(m,{as:"ul"},r.Children.map(e,(c,d)=>t.default.createElement("li",{key:d},c)))));l.defaultProps={label:"pagination"};l.propTypes={activePage:a.default.number.isRequired,children:a.default.node.isRequired,label:a.default.string,pageCount:a.default.number.isRequired};exports.Pagination=l;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import e, { Children as s } from "react";
|
|
2
|
-
import a from "styled-components";
|
|
3
|
-
import r from "prop-types";
|
|
4
|
-
import { Flex as u } from "../Flex/Flex.js";
|
|
5
|
-
import { PaginationContext as c } from "./PaginationContext.js";
|
|
6
|
-
const d = a.nav``, g = a(u)`
|
|
7
|
-
& > * + * {
|
|
8
|
-
margin-left: ${({ theme: t }) => t.spaces[1]};
|
|
9
|
-
}
|
|
10
|
-
`, i = ({ children: t, label: n, activePage: o, pageCount: l }) => /* @__PURE__ */ e.createElement(c.Provider, {
|
|
11
|
-
value: { activePage: o, pageCount: l }
|
|
12
|
-
}, /* @__PURE__ */ e.createElement(d, {
|
|
13
|
-
"aria-label": n
|
|
14
|
-
}, /* @__PURE__ */ e.createElement(g, {
|
|
15
|
-
as: "ul"
|
|
16
|
-
}, s.map(t, (m, p) => /* @__PURE__ */ e.createElement("li", {
|
|
17
|
-
key: p
|
|
18
|
-
}, m)))));
|
|
19
|
-
i.defaultProps = {
|
|
20
|
-
label: "pagination"
|
|
21
|
-
};
|
|
22
|
-
i.propTypes = {
|
|
23
|
-
activePage: r.number.isRequired,
|
|
24
|
-
children: r.node.isRequired,
|
|
25
|
-
label: r.string,
|
|
26
|
-
pageCount: r.number.isRequired
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
i as Pagination
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=M;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const M = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0tMC4wMDAxOTU1MDMgMS4xNzVMMy44MTY0NyA1TC0wLjAwMDE5NTUwMyA4LjgyNUwxLjE3NDggMTBMNi4xNzQ4IDVMMS4xNzQ4IDBMLTAuMDAwMTk1NTAzIDEuMTc1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
|
|
2
|
-
export {
|
|
3
|
-
M as default
|
|
4
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const I="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";module.exports=I;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const I = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMCIgdmlld0JveD0iMCAwIDcgMTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02LjE3NSA4LjgyNUwyLjM1ODMzIDVMNi4xNzUgMS4xNzVMNSAwTDAgNUw1IDEwTDYuMTc1IDguODI1WiIgZmlsbD0iIzhFOEVBOSIvPgo8L3N2Zz4K";
|
|
2
|
-
export {
|
|
3
|
-
I as default
|
|
4
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("react"),L=require("styled-components"),q=require("prop-types"),k=require("@strapi/icons/ChevronLeft"),T=require("@strapi/icons/ChevronRight"),_=require("react-router-dom"),d=require("../VisuallyHidden/VisuallyHidden.cjs"),c=require("./PaginationContext.cjs"),x=require("../Typography/Typography.cjs"),E=require("../themes/utils.cjs"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},a=s(b),l=s(L),i=s(q),R=s(k),$=s(T),g=l.default(x.Typography)`
|
|
2
|
-
line-height: revert;
|
|
3
|
-
`,C={active:!0},p=l.default(_.NavLink).withConfig({shouldForwardProp:(e,t)=>!C[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
|
-
${E.buttonFocusStyle}
|
|
11
|
-
`,w=l.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
|
-
`,v=l.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
|
-
`,H=l.default(p)`
|
|
35
|
-
color: ${({theme:e})=>e.colors.neutral800};
|
|
36
|
-
`,f=({children:e,to:t,...n})=>{const{activePage:o}=c.usePagination(),r=o===1;return a.default.createElement(v,{to:r?"#":t,"aria-disabled":r,tabIndex:r?-1:void 0,...n},a.default.createElement(d.VisuallyHidden,null,e),a.default.createElement(R.default,{"aria-hidden":!0}))};f.displayName="PreviousLink";const h=({children:e,to:t,...n})=>{const{activePage:o,pageCount:r}=c.usePagination(),u=o===r;return a.default.createElement(v,{to:u?"#":t,"aria-disabled":u,tabIndex:u?-1:void 0,...n},a.default.createElement(d.VisuallyHidden,null,e),a.default.createElement($.default,{"aria-hidden":!0}))};h.displayName="NextLink";const y=({number:e,children:t,...n})=>{const{activePage:o}=c.usePagination(),r=o===e;return a.default.createElement(w,{...n,active:r},a.default.createElement(d.VisuallyHidden,null,t),a.default.createElement(g,{"aria-hidden":!0,variant:"pi",fontWeight:r?"bold":null},e))};y.displayName="PageLink";const m=({children:e,...t})=>a.default.createElement(H,{...t,as:"div"},a.default.createElement(d.VisuallyHidden,null,e),a.default.createElement(g,{"aria-hidden":!0,variant:"pi"},"\u2026"));y.propTypes={children:i.default.node.isRequired,number:i.default.number.isRequired};const P={children:i.default.node.isRequired,to:i.default.string.isRequired};h.propTypes=P;f.propTypes=P;m.propTypes={children:i.default.node.isRequired};exports.Dots=m;exports.NextLink=h;exports.PageLink=y;exports.PreviousLink=f;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import s from "styled-components";
|
|
3
|
-
import n from "prop-types";
|
|
4
|
-
import b from "@strapi/icons/ChevronLeft";
|
|
5
|
-
import y from "@strapi/icons/ChevronRight";
|
|
6
|
-
import { NavLink as P } from "react-router-dom";
|
|
7
|
-
import { VisuallyHidden as l } from "../VisuallyHidden/VisuallyHidden.js";
|
|
8
|
-
import { usePagination as c } from "./PaginationContext.js";
|
|
9
|
-
import { Typography as E } from "../Typography/Typography.js";
|
|
10
|
-
import { buttonFocusStyle as k } from "../themes/utils.js";
|
|
11
|
-
const m = s(E)`
|
|
12
|
-
line-height: revert;
|
|
13
|
-
`, L = {
|
|
14
|
-
active: !0
|
|
15
|
-
}, p = s(P).withConfig({
|
|
16
|
-
shouldForwardProp: (e, r) => !L[e] && r(e)
|
|
17
|
-
})`
|
|
18
|
-
padding: ${({ theme: e }) => e.spaces[3]};
|
|
19
|
-
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
20
|
-
box-shadow: ${({ active: e, theme: r }) => e ? r.shadows.filterShadow : void 0};
|
|
21
|
-
text-decoration: none;
|
|
22
|
-
display: flex;
|
|
23
|
-
|
|
24
|
-
${k}
|
|
25
|
-
`, $ = s(p)`
|
|
26
|
-
color: ${({ theme: e, active: r }) => r ? e.colors.primary700 : e.colors.neutral800};
|
|
27
|
-
background: ${({ theme: e, active: r }) => r ? e.colors.neutral0 : void 0};
|
|
28
|
-
|
|
29
|
-
&:hover {
|
|
30
|
-
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
31
|
-
}
|
|
32
|
-
`, u = s(p)`
|
|
33
|
-
font-size: 0.7rem;
|
|
34
|
-
svg path {
|
|
35
|
-
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral600};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&:focus,
|
|
39
|
-
&:hover {
|
|
40
|
-
svg path {
|
|
41
|
-
fill: ${(e) => e["aria-disabled"] ? e.theme.colors.neutral300 : e.theme.colors.neutral700};
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
${(e) => e["aria-disabled"] ? `
|
|
46
|
-
pointer-events: none;
|
|
47
|
-
` : void 0}
|
|
48
|
-
`, x = s(p)`
|
|
49
|
-
color: ${({ theme: e }) => e.colors.neutral800};
|
|
50
|
-
`, h = ({ children: e, to: r, ...i }) => {
|
|
51
|
-
const { activePage: a } = c(), o = a === 1;
|
|
52
|
-
return /* @__PURE__ */ t.createElement(u, {
|
|
53
|
-
to: o ? "#" : r,
|
|
54
|
-
"aria-disabled": o,
|
|
55
|
-
tabIndex: o ? -1 : void 0,
|
|
56
|
-
...i
|
|
57
|
-
}, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(b, {
|
|
58
|
-
"aria-hidden": !0
|
|
59
|
-
}));
|
|
60
|
-
};
|
|
61
|
-
h.displayName = "PreviousLink";
|
|
62
|
-
const v = ({ children: e, to: r, ...i }) => {
|
|
63
|
-
const { activePage: a, pageCount: o } = c(), d = a === o;
|
|
64
|
-
return /* @__PURE__ */ t.createElement(u, {
|
|
65
|
-
to: d ? "#" : r,
|
|
66
|
-
"aria-disabled": d,
|
|
67
|
-
tabIndex: d ? -1 : void 0,
|
|
68
|
-
...i
|
|
69
|
-
}, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(y, {
|
|
70
|
-
"aria-hidden": !0
|
|
71
|
-
}));
|
|
72
|
-
};
|
|
73
|
-
v.displayName = "NextLink";
|
|
74
|
-
const f = ({ number: e, children: r, ...i }) => {
|
|
75
|
-
const { activePage: a } = c(), o = a === e;
|
|
76
|
-
return /* @__PURE__ */ t.createElement($, {
|
|
77
|
-
...i,
|
|
78
|
-
active: o
|
|
79
|
-
}, /* @__PURE__ */ t.createElement(l, null, r), /* @__PURE__ */ t.createElement(m, {
|
|
80
|
-
"aria-hidden": !0,
|
|
81
|
-
variant: "pi",
|
|
82
|
-
fontWeight: o ? "bold" : null
|
|
83
|
-
}, e));
|
|
84
|
-
};
|
|
85
|
-
f.displayName = "PageLink";
|
|
86
|
-
const w = ({ children: e, ...r }) => /* @__PURE__ */ t.createElement(x, {
|
|
87
|
-
...r,
|
|
88
|
-
as: "div"
|
|
89
|
-
}, /* @__PURE__ */ t.createElement(l, null, e), /* @__PURE__ */ t.createElement(m, {
|
|
90
|
-
"aria-hidden": !0,
|
|
91
|
-
variant: "pi"
|
|
92
|
-
}, "\u2026"));
|
|
93
|
-
f.propTypes = {
|
|
94
|
-
children: n.node.isRequired,
|
|
95
|
-
number: n.number.isRequired
|
|
96
|
-
};
|
|
97
|
-
const g = {
|
|
98
|
-
children: n.node.isRequired,
|
|
99
|
-
to: n.string.isRequired
|
|
100
|
-
};
|
|
101
|
-
v.propTypes = g;
|
|
102
|
-
h.propTypes = g;
|
|
103
|
-
w.propTypes = {
|
|
104
|
-
children: n.node.isRequired
|
|
105
|
-
};
|
|
106
|
-
export {
|
|
107
|
-
w as Dots,
|
|
108
|
-
v as NextLink,
|
|
109
|
-
f as PageLink,
|
|
110
|
-
h as PreviousLink
|
|
111
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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;
|
package/dist/Pagination/index.js
DELETED
package/dist/Popover/Popover.cjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("react"),j=require("prop-types"),S=require("styled-components"),a=require("@floating-ui/react-dom"),u=require("../Box/Box.cjs"),T=require("../Portal/Portal.cjs"),$=require("../helpers/useIntersection.cjs"),b=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function M(e){if(e&&e.__esModule)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const o=M(q),t=b(j),m=b(S),h=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],B=m.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
|
-
`,W=m.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
|
-
`,c=({source:e,children:n,spacing:r,fullWidth:s,placement:y,onReachEnd:i,intersectionId:l,centered:v,...x})=>{const f=o.useRef(null),[p,w]=o.useState(void 0),{x:E,y:_,reference:O,floating:k,strategy:R}=a.useFloating({strategy:"fixed",placement:v?"bottom":y,middleware:[a.offset({mainAxis:r}),a.shift(),a.flip()],whileElementsMounted:a.autoUpdate});return o.useLayoutEffect(()=>{O(e.current)},[e]),o.useLayoutEffect(()=>{s&&w(e.current.offsetWidth)},[s]),$.useIntersection(f,i,{selectorToWatch:`#${l}`,skipWhen:!l||!i}),o.createElement(B,{ref:k,style:{left:E,top:_,position:R,width:p||void 0},hasRadius:!0,background:"neutral0",padding:1},o.createElement(W,{ref:f,...x},n,l&&i&&o.createElement(u.Box,{id:l,width:"100%",height:"1px"})))},d=e=>o.createElement(T.Portal,null,o.createElement(c,{...e})),g={fullWidth:!1,intersectionId:void 0,onReachEnd:void 0,centered:!1,placement:"bottom-start"},P={centered:t.default.bool,children:t.default.node.isRequired,fullWidth:t.default.bool,intersectionId:t.default.string,onReachEnd:t.default.func,placement:t.default.oneOf(h),source:t.default.shape({current:(typeof Element>"u"?t.default.any:t.default.instanceOf(Element)).isRequired}).isRequired,spacing:t.default.number};c.propTypes=P;c.defaultProps=g;d.propTypes=P;d.defaultProps=g;exports.POPOVER_PLACEMENTS=h;exports.Popover=d;
|
package/dist/Popover/Popover.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import t from "prop-types";
|
|
3
|
-
import d from "styled-components";
|
|
4
|
-
import { useFloating as R, offset as $, shift as W, flip as T, autoUpdate as O } from "@floating-ui/react-dom";
|
|
5
|
-
import { Box as s } from "../Box/Box.js";
|
|
6
|
-
import { Portal as S } from "../Portal/Portal.js";
|
|
7
|
-
import { useIntersection as q } from "../helpers/useIntersection.js";
|
|
8
|
-
const L = [
|
|
9
|
-
"top",
|
|
10
|
-
"top-start",
|
|
11
|
-
"top-end",
|
|
12
|
-
"right",
|
|
13
|
-
"right-start",
|
|
14
|
-
"right-end",
|
|
15
|
-
"bottom",
|
|
16
|
-
"bottom-start",
|
|
17
|
-
"bottom-end",
|
|
18
|
-
"left",
|
|
19
|
-
"left-start",
|
|
20
|
-
"left-end"
|
|
21
|
-
], z = d(s)`
|
|
22
|
-
box-shadow: ${({ theme: e }) => e.shadows.filterShadow};
|
|
23
|
-
z-index: 4;
|
|
24
|
-
border: 1px solid ${({ theme: e }) => e.colors.neutral150};
|
|
25
|
-
background: ${({ theme: e }) => e.colors.neutral0};
|
|
26
|
-
`, A = d(s)`
|
|
27
|
-
// 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
|
|
28
|
-
max-height: ${3 * 5}rem;
|
|
29
|
-
overflow-y: auto;
|
|
30
|
-
overflow-x: hidden;
|
|
31
|
-
|
|
32
|
-
&::-webkit-scrollbar {
|
|
33
|
-
-webkit-appearance: none;
|
|
34
|
-
width: 4px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&::-webkit-scrollbar-track {
|
|
38
|
-
background: ${({ theme: e }) => e.colors.neutral0};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&::-webkit-scrollbar-thumb {
|
|
42
|
-
background: ${({ theme: e }) => e.colors.neutral150};
|
|
43
|
-
border-radius: ${({ theme: e }) => e.borderRadius};
|
|
44
|
-
margin-right: 10px;
|
|
45
|
-
}
|
|
46
|
-
`, a = ({
|
|
47
|
-
source: e,
|
|
48
|
-
children: m,
|
|
49
|
-
spacing: h,
|
|
50
|
-
fullWidth: i,
|
|
51
|
-
placement: b,
|
|
52
|
-
onReachEnd: n,
|
|
53
|
-
intersectionId: r,
|
|
54
|
-
centered: g,
|
|
55
|
-
...w
|
|
56
|
-
}) => {
|
|
57
|
-
const l = o.useRef(null), [p, v] = o.useState(void 0), { x, y, reference: E, floating: P, strategy: k } = R({
|
|
58
|
-
strategy: "fixed",
|
|
59
|
-
placement: g ? "bottom" : b,
|
|
60
|
-
middleware: [
|
|
61
|
-
$({
|
|
62
|
-
mainAxis: h
|
|
63
|
-
}),
|
|
64
|
-
W(),
|
|
65
|
-
T()
|
|
66
|
-
],
|
|
67
|
-
whileElementsMounted: O
|
|
68
|
-
});
|
|
69
|
-
return o.useLayoutEffect(() => {
|
|
70
|
-
E(e.current);
|
|
71
|
-
}, [e]), o.useLayoutEffect(() => {
|
|
72
|
-
i && v(e.current.offsetWidth);
|
|
73
|
-
}, [i]), q(l, n, {
|
|
74
|
-
selectorToWatch: `#${r}`,
|
|
75
|
-
skipWhen: !r || !n
|
|
76
|
-
}), /* @__PURE__ */ o.createElement(z, {
|
|
77
|
-
ref: P,
|
|
78
|
-
style: {
|
|
79
|
-
left: x,
|
|
80
|
-
top: y,
|
|
81
|
-
position: k,
|
|
82
|
-
width: p || void 0
|
|
83
|
-
},
|
|
84
|
-
hasRadius: !0,
|
|
85
|
-
background: "neutral0",
|
|
86
|
-
padding: 1
|
|
87
|
-
}, /* @__PURE__ */ o.createElement(A, {
|
|
88
|
-
ref: l,
|
|
89
|
-
...w
|
|
90
|
-
}, m, r && n && /* @__PURE__ */ o.createElement(s, {
|
|
91
|
-
id: r,
|
|
92
|
-
width: "100%",
|
|
93
|
-
height: "1px"
|
|
94
|
-
})));
|
|
95
|
-
}, c = (e) => /* @__PURE__ */ o.createElement(S, null, /* @__PURE__ */ o.createElement(a, {
|
|
96
|
-
...e
|
|
97
|
-
})), f = {
|
|
98
|
-
fullWidth: !1,
|
|
99
|
-
intersectionId: void 0,
|
|
100
|
-
onReachEnd: void 0,
|
|
101
|
-
centered: !1,
|
|
102
|
-
placement: "bottom-start"
|
|
103
|
-
}, u = {
|
|
104
|
-
centered: t.bool,
|
|
105
|
-
children: t.node.isRequired,
|
|
106
|
-
fullWidth: t.bool,
|
|
107
|
-
intersectionId: t.string,
|
|
108
|
-
onReachEnd: t.func,
|
|
109
|
-
placement: t.oneOf(L),
|
|
110
|
-
source: t.shape({
|
|
111
|
-
current: (typeof Element > "u" ? t.any : t.instanceOf(Element)).isRequired
|
|
112
|
-
}).isRequired,
|
|
113
|
-
spacing: t.number
|
|
114
|
-
};
|
|
115
|
-
a.propTypes = u;
|
|
116
|
-
a.defaultProps = f;
|
|
117
|
-
c.propTypes = u;
|
|
118
|
-
c.defaultProps = f;
|
|
119
|
-
export {
|
|
120
|
-
L as POPOVER_PLACEMENTS,
|
|
121
|
-
c as Popover
|
|
122
|
-
};
|
package/dist/Popover/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Popover.cjs");exports.POPOVER_PLACEMENTS=e.POPOVER_PLACEMENTS;exports.Popover=e.Popover;
|
package/dist/Popover/index.js
DELETED
package/dist/Portal/Portal.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),c=require("react-dom"),a=require("prop-types"),s=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},l=s(a),u=({children:e})=>{const t=r.useRef(null),[o,n]=r.useState(!1);return r.useLayoutEffect(()=>(t.current=document.createElement("div"),t.current.setAttribute("data-react-portal","true"),document.body.appendChild(t.current),n(!0),()=>{t.current?.remove()}),[]),!o||!t.current?null:c.createPortal(e,t.current)};u.propTypes={children:l.default.node.isRequired};exports.Portal=u;
|
package/dist/Portal/Portal.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useRef as u, useState as n, useLayoutEffect as c } from "react";
|
|
2
|
-
import { createPortal as a } from "react-dom";
|
|
3
|
-
import d from "prop-types";
|
|
4
|
-
const p = ({ children: r }) => {
|
|
5
|
-
const e = u(null), [t, o] = n(!1);
|
|
6
|
-
return c(() => (e.current = document.createElement("div"), e.current.setAttribute("data-react-portal", "true"), document.body.appendChild(e.current), o(!0), () => {
|
|
7
|
-
e.current?.remove();
|
|
8
|
-
}), []), !t || !e.current ? null : a(r, e.current);
|
|
9
|
-
};
|
|
10
|
-
p.propTypes = {
|
|
11
|
-
children: d.node.isRequired
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
p as Portal
|
|
15
|
-
};
|
package/dist/Portal/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Portal.cjs");exports.Portal=e.Portal;
|
package/dist/Portal/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),b=require("prop-types"),m=require("styled-components"),a=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},d=a(f),r=a(b),i=a(m),n=i.default.div`
|
|
2
|
-
background: ${({theme:e})=>e.colors.neutral600};
|
|
3
|
-
border-radius: ${({theme:e})=>e.borderRadius};
|
|
4
|
-
position: relative;
|
|
5
|
-
|
|
6
|
-
width: 78px;
|
|
7
|
-
height: ${({theme:e})=>e.spaces[1]};
|
|
8
|
-
|
|
9
|
-
&:before {
|
|
10
|
-
content: '';
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 0;
|
|
13
|
-
bottom: 0;
|
|
14
|
-
border-radius: ${({theme:e})=>e.borderRadius};
|
|
15
|
-
width: ${({value:e})=>`${e}%`};
|
|
16
|
-
background: ${({theme:e})=>e.colors.neutral150};
|
|
17
|
-
}
|
|
18
|
-
`,g=i.default(n)`
|
|
19
|
-
width: 102px;
|
|
20
|
-
height: ${({theme:e})=>e.spaces[2]};
|
|
21
|
-
`,o=({min:e,max:c,value:t,children:s,size:p,...u})=>{const l={role:"progressbar","aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":c};return p==="M"?d.default.createElement(g,{...l,value:t,"aria-label":s,...u}):d.default.createElement(n,{...l,value:t,"aria-label":s,...u})};o.defaultProps={min:0,max:100,value:0,size:"M"};o.propTypes={children:r.default.node.isRequired,max:r.default.number,min:r.default.number,size:r.default.oneOf(["S","M"]),value:r.default.number};exports.ProgressBar=o;
|