@strapi/design-system 0.0.0-typescript.0 → 0.0.0-typescript.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/Accordion.cjs +8 -8
- package/dist/Accordion/Accordion.d.ts +48 -0
- package/dist/Accordion/Accordion.js +73 -67
- package/dist/Accordion/AccordionContent.cjs +1 -1
- package/dist/Accordion/AccordionContent.d.ts +3 -0
- package/dist/Accordion/AccordionContent.js +44 -18
- package/dist/Accordion/AccordionContext.cjs +1 -1
- package/dist/Accordion/AccordionContext.d.ts +12 -0
- package/dist/Accordion/AccordionContext.js +10 -4
- package/dist/Accordion/AccordionGroup.cjs +20 -20
- package/dist/Accordion/AccordionGroup.d.ts +8 -0
- package/dist/Accordion/AccordionGroup.js +98 -59
- package/dist/Accordion/AccordionToggle.cjs +6 -6
- package/dist/Accordion/AccordionToggle.d.ts +22 -0
- package/dist/Accordion/AccordionToggle.js +141 -96
- package/dist/Accordion/index.d.ts +4 -0
- package/dist/Accordion/utils.cjs +1 -1
- package/dist/Accordion/utils.d.ts +7 -0
- package/dist/Accordion/utils.js +4 -4
- package/dist/Alert/Alert.cjs +12 -12
- package/dist/Alert/Alert.d.ts +33 -0
- package/dist/Alert/Alert.js +124 -88
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Alert/utils.cjs +1 -1
- package/dist/Alert/utils.d.ts +10 -0
- package/dist/Alert/utils.js +3 -3
- package/dist/Avatar/Avatar.cjs +6 -6
- package/dist/Avatar/Avatar.d.ts +19 -0
- package/dist/Avatar/Avatar.js +65 -60
- package/dist/Avatar/AvatarGroup.d.ts +1 -0
- package/dist/Avatar/constants.d.ts +2 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/Badge/Badge.cjs +4 -4
- package/dist/Badge/Badge.d.ts +13 -0
- package/dist/Badge/Badge.js +65 -37
- package/dist/Badge/index.d.ts +1 -0
- package/dist/BaseButton/BaseButton.cjs +3 -3
- package/dist/BaseButton/BaseButton.d.ts +6 -0
- package/dist/BaseButton/BaseButton.js +68 -30
- package/dist/BaseButton/index.d.ts +1 -0
- package/dist/BaseCheckbox/BaseCheckbox.cjs +6 -6
- package/dist/BaseCheckbox/BaseCheckbox.d.ts +28 -0
- package/dist/BaseCheckbox/BaseCheckbox.js +102 -59
- package/dist/BaseCheckbox/index.d.ts +1 -0
- package/dist/BaseCheckbox/utils.d.ts +7 -0
- package/dist/BaseLink/BaseLink.cjs +2 -2
- package/dist/BaseLink/BaseLink.d.ts +9 -0
- package/dist/BaseLink/BaseLink.js +47 -27
- package/dist/BaseLink/index.d.ts +1 -0
- package/dist/BaseRadio/BaseRadio.cjs +9 -9
- package/dist/BaseRadio/BaseRadio.d.ts +6 -0
- package/dist/BaseRadio/BaseRadio.js +81 -39
- package/dist/BaseRadio/RadioGroup.cjs +1 -1
- package/dist/BaseRadio/RadioGroup.d.ts +12 -0
- package/dist/BaseRadio/RadioGroup.js +59 -28
- package/dist/BaseRadio/context.cjs +1 -1
- package/dist/BaseRadio/context.d.ts +9 -0
- package/dist/BaseRadio/context.js +8 -4
- package/dist/BaseRadio/index.d.ts +2 -0
- package/dist/BaseRadio/utils.cjs +1 -1
- package/dist/BaseRadio/utils.d.ts +4 -0
- package/dist/BaseRadio/utils.js +1 -1
- package/dist/Box/Box.cjs +31 -32
- package/dist/Box/Box.d.ts +97 -0
- package/dist/Box/Box.js +182 -59
- package/dist/Box/index.d.ts +1 -0
- package/dist/Breadcrumbs/Breadcrumbs.cjs +4 -4
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +16 -0
- package/dist/Breadcrumbs/Breadcrumbs.js +75 -39
- package/dist/Breadcrumbs/index.d.ts +1 -0
- package/dist/Button/Button.cjs +15 -15
- package/dist/Button/Button.d.ts +14 -0
- package/dist/Button/Button.js +116 -76
- package/dist/Button/constants.d.ts +13 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Button/utils.cjs +23 -23
- package/dist/Button/utils.d.ts +18 -0
- package/dist/Button/utils.js +15 -15
- package/dist/Card/Card.cjs +1 -1
- package/dist/Card/Card.d.ts +5 -0
- package/dist/Card/Card.js +47 -27
- package/dist/Card/CardAction.cjs +4 -4
- package/dist/Card/CardAction.d.ts +8 -0
- package/dist/Card/CardAction.js +12 -6
- package/dist/Card/CardAsset.cjs +4 -4
- package/dist/Card/CardAsset.d.ts +7 -0
- package/dist/Card/CardAsset.js +56 -25
- package/dist/Card/CardBadge.cjs +3 -3
- package/dist/Card/CardBadge.d.ts +3 -0
- package/dist/Card/CardBadge.js +23 -10
- package/dist/Card/CardBody.cjs +1 -1
- package/dist/Card/CardBody.d.ts +3 -0
- package/dist/Card/CardBody.js +22 -10
- package/dist/Card/CardCheckbox.cjs +1 -1
- package/dist/Card/CardCheckbox.d.ts +3 -0
- package/dist/Card/CardCheckbox.js +26 -13
- package/dist/Card/CardContent.cjs +2 -2
- package/dist/Card/CardContent.d.ts +5 -0
- package/dist/Card/CardContent.js +35 -11
- package/dist/Card/CardContext.cjs +1 -1
- package/dist/Card/CardContext.d.ts +6 -0
- package/dist/Card/CardContext.js +3 -1
- package/dist/Card/CardHeader.cjs +2 -2
- package/dist/Card/CardHeader.d.ts +3 -0
- package/dist/Card/CardHeader.js +22 -10
- package/dist/Card/CardTimer.cjs +2 -2
- package/dist/Card/CardTimer.d.ts +5 -0
- package/dist/Card/CardTimer.js +52 -22
- package/dist/Card/CardTitle.cjs +1 -1
- package/dist/Card/CardTitle.d.ts +5 -0
- package/dist/Card/CardTitle.js +29 -16
- package/dist/Card/index.d.ts +10 -0
- package/dist/CarouselInput/Carousel.cjs +6 -6
- package/dist/CarouselInput/Carousel.d.ts +41 -0
- package/dist/CarouselInput/Carousel.js +107 -77
- package/dist/CarouselInput/CarouselActions.cjs +1 -1
- package/dist/CarouselInput/CarouselActions.d.ts +1 -0
- package/dist/CarouselInput/CarouselActions.js +17 -7
- package/dist/CarouselInput/CarouselImage.cjs +3 -3
- package/dist/CarouselInput/CarouselImage.d.ts +14 -0
- package/dist/CarouselInput/CarouselImage.js +38 -26
- package/dist/CarouselInput/CarouselInput.cjs +1 -1
- package/dist/CarouselInput/CarouselInput.d.ts +52 -0
- package/dist/CarouselInput/CarouselInput.js +83 -49
- package/dist/CarouselInput/CarouselSlide.cjs +2 -2
- package/dist/CarouselInput/CarouselSlide.d.ts +18 -0
- package/dist/CarouselInput/CarouselSlide.js +42 -20
- package/dist/CarouselInput/index.d.ts +5 -0
- package/dist/Checkbox/Checkbox.cjs +2 -2
- package/dist/Checkbox/Checkbox.d.ts +28 -0
- package/dist/Checkbox/Checkbox.js +63 -44
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Combobox/Combobox.cjs +1 -1
- package/dist/Combobox/Combobox.d.ts +99 -0
- package/dist/Combobox/Combobox.js +247 -197
- package/dist/Combobox/ComboboxList.d.ts +13 -0
- package/dist/Combobox/ComboboxOption.cjs +1 -1
- package/dist/Combobox/ComboboxOption.d.ts +2 -0
- package/dist/Combobox/ComboboxOption.js +47 -25
- package/dist/Combobox/components.d.ts +8 -0
- package/dist/Combobox/index.d.ts +2 -0
- package/dist/Combobox/utils.cjs +1 -1
- package/dist/Combobox/utils.d.ts +35 -0
- package/dist/Combobox/utils.js +21 -21
- package/dist/DatePicker/DatePicker.cjs +1 -1
- package/dist/DatePicker/DatePicker.d.ts +56 -0
- package/dist/DatePicker/DatePicker.js +109 -86
- package/dist/DatePicker/DatePickerCalendar.cjs +1 -1
- package/dist/DatePicker/DatePickerCalendar.d.ts +35 -0
- package/dist/DatePicker/DatePickerCalendar.js +1 -1
- package/dist/DatePicker/DatePickerTd.cjs +4 -4
- package/dist/DatePicker/DatePickerTd.d.ts +22 -0
- package/dist/DatePicker/DatePickerTd.js +42 -23
- package/dist/DatePicker/DatePickerTh.cjs +3 -3
- package/dist/DatePicker/DatePickerTh.d.ts +10 -0
- package/dist/DatePicker/DatePickerTh.js +44 -23
- package/dist/DatePicker/compareDates.d.ts +1 -0
- package/dist/DatePicker/components.d.ts +26 -0
- package/dist/DatePicker/index.d.ts +1 -0
- package/dist/DatePicker/utils/formatDate.d.ts +1 -0
- package/dist/DatePicker/utils/generateWeeks.d.ts +1 -0
- package/dist/DatePicker/utils/getDayOfWeek.d.ts +9 -0
- package/dist/DatePicker/utils/getMonths.d.ts +1 -0
- package/dist/DatePicker/utils/getYears.cjs +1 -1
- package/dist/DatePicker/utils/getYears.d.ts +1 -0
- package/dist/DatePicker/utils/getYears.js +7 -6
- package/dist/DatePicker/utils/index.d.ts +5 -0
- package/dist/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/DateTimePicker/DateTimePicker.d.ts +24 -0
- package/dist/DateTimePicker/DateTimePicker.js +124 -91
- package/dist/DateTimePicker/DateTimePickerProps.cjs +1 -1
- package/dist/DateTimePicker/DateTimePickerProps.d.ts +51 -0
- package/dist/DateTimePicker/DateTimePickerProps.js +19 -10
- package/dist/DateTimePicker/__tests__/parseDate.test.d.ts +1 -0
- package/dist/DateTimePicker/index.d.ts +1 -0
- package/dist/DateTimePicker/parseDate.d.ts +1 -0
- package/dist/Dialog/Dialog.cjs +5 -5
- package/dist/Dialog/Dialog.d.ts +25 -0
- package/dist/Dialog/Dialog.js +58 -39
- package/dist/Dialog/DialogBody.d.ts +16 -0
- package/dist/Dialog/DialogFooter.d.ts +18 -0
- package/dist/Dialog/index.d.ts +3 -0
- package/dist/DismissibleLayer/DismissibleLayer.d.ts +19 -0
- package/dist/DismissibleLayer/index.d.ts +1 -0
- package/dist/Divider/Divider.cjs +2 -2
- package/dist/Divider/Divider.d.ts +17 -0
- package/dist/Divider/Divider.js +38 -15
- package/dist/Divider/index.d.ts +1 -0
- package/dist/EmptyStateLayout/EmptyStateLayout.d.ts +25 -0
- package/dist/EmptyStateLayout/index.d.ts +1 -0
- package/dist/EmptyStateLayout/story-assets/Illo.d.ts +1 -0
- package/dist/Field/Field.cjs +1 -1
- package/dist/Field/Field.d.ts +28 -0
- package/dist/Field/Field.js +39 -22
- package/dist/Field/FieldAction.cjs +2 -2
- package/dist/Field/FieldAction.d.ts +12 -0
- package/dist/Field/FieldAction.js +35 -13
- package/dist/Field/FieldContext.d.ts +12 -0
- package/dist/Field/FieldError.d.ts +1 -0
- package/dist/Field/FieldHint.d.ts +1 -0
- package/dist/Field/FieldInput.cjs +6 -6
- package/dist/Field/FieldInput.d.ts +6 -0
- package/dist/Field/FieldInput.js +66 -47
- package/dist/Field/FieldLabel.cjs +3 -3
- package/dist/Field/FieldLabel.d.ts +20 -0
- package/dist/Field/FieldLabel.js +46 -27
- package/dist/Field/index.d.ts +7 -0
- package/dist/Flex/Flex.cjs +5 -5
- package/dist/Flex/Flex.d.ts +14 -0
- package/dist/Flex/Flex.js +29 -17
- package/dist/Flex/index.d.ts +1 -0
- package/dist/FocusTrap/ExampleComponent.d.ts +1 -0
- package/dist/FocusTrap/FocusTrap.cjs +1 -1
- package/dist/FocusTrap/FocusTrap.d.ts +18 -0
- package/dist/FocusTrap/FocusTrap.js +52 -32
- package/dist/FocusTrap/index.d.ts +1 -0
- package/dist/Grid/Grid.cjs +3 -3
- package/dist/Grid/Grid.d.ts +18 -0
- package/dist/Grid/Grid.js +42 -20
- package/dist/Grid/GridContext.d.ts +8 -0
- package/dist/Grid/GridItem.cjs +2 -2
- package/dist/Grid/GridItem.d.ts +22 -0
- package/dist/Grid/GridItem.js +41 -22
- package/dist/Grid/index.d.ts +2 -0
- package/dist/Icon/Icon.cjs +3 -3
- package/dist/Icon/Icon.d.ts +7 -0
- package/dist/Icon/Icon.js +50 -22
- package/dist/Icon/index.d.ts +1 -0
- package/dist/IconButton/IconButton.cjs +4 -4
- package/dist/IconButton/IconButton.d.ts +3 -0
- package/dist/IconButton/IconButton.js +64 -44
- package/dist/IconButton/index.d.ts +1 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.cjs +1 -1
- package/dist/KeyboardNavigable/KeyboardNavigable.d.ts +6 -0
- package/dist/KeyboardNavigable/KeyboardNavigable.js +67 -50
- package/dist/KeyboardNavigable/index.d.ts +1 -0
- package/dist/Layout/ActionLayout.d.ts +17 -0
- package/dist/Layout/ContentLayout.d.ts +9 -0
- package/dist/Layout/GridLayout.d.ts +1 -0
- package/dist/Layout/HeaderLayout.cjs +2 -2
- package/dist/Layout/HeaderLayout.d.ts +24 -0
- package/dist/Layout/HeaderLayout.js +96 -78
- package/dist/Layout/Layout.d.ts +15 -0
- package/dist/Layout/TwoColsLayout.d.ts +11 -0
- package/dist/Layout/index.d.ts +6 -0
- package/dist/Link/Link.cjs +6 -6
- package/dist/Link/Link.d.ts +31 -0
- package/dist/Link/Link.js +55 -36
- package/dist/Link/index.d.ts +1 -0
- package/dist/LinkButton/LinkButton.cjs +10 -10
- package/dist/LinkButton/LinkButton.d.ts +2 -0
- package/dist/LinkButton/LinkButton.js +69 -47
- package/dist/LinkButton/index.d.ts +1 -0
- package/dist/LiveRegions/LiveRegions.cjs +1 -1
- package/dist/LiveRegions/LiveRegions.d.ts +1 -0
- package/dist/LiveRegions/LiveRegions.js +22 -20
- package/dist/LiveRegions/StoryComponent.cjs +1 -1
- package/dist/LiveRegions/StoryComponent.d.ts +3 -0
- package/dist/LiveRegions/StoryComponent.js +18 -15
- package/dist/LiveRegions/constants.d.ts +5 -0
- package/dist/LiveRegions/index.d.ts +1 -0
- package/dist/LiveRegions/useNotifyAT.d.ts +5 -0
- package/dist/Loader/Loader.cjs +4 -4
- package/dist/Loader/Loader.d.ts +2 -0
- package/dist/Loader/Loader.js +47 -25
- package/dist/Loader/index.d.ts +1 -0
- package/dist/Main/Main.cjs +2 -2
- package/dist/Main/Main.d.ts +14 -0
- package/dist/Main/Main.js +35 -15
- package/dist/Main/SkipToContent.d.ts +9 -0
- package/dist/Main/index.d.ts +2 -0
- package/dist/MainNav/MainNav.cjs +2 -2
- package/dist/MainNav/MainNav.d.ts +14 -0
- package/dist/MainNav/MainNav.js +39 -17
- package/dist/MainNav/MainNavContext.d.ts +2 -0
- package/dist/MainNav/NavBrand.d.ts +19 -0
- package/dist/MainNav/NavCondense.cjs +3 -3
- package/dist/MainNav/NavCondense.d.ts +10 -0
- package/dist/MainNav/NavCondense.js +40 -20
- package/dist/MainNav/NavLink.cjs +9 -9
- package/dist/MainNav/NavLink.d.ts +23 -0
- package/dist/MainNav/NavLink.js +72 -53
- package/dist/MainNav/NavSection.cjs +1 -1
- package/dist/MainNav/NavSection.d.ts +12 -0
- package/dist/MainNav/NavSection.js +67 -46
- package/dist/MainNav/NavSections.cjs +1 -1
- package/dist/MainNav/NavSections.d.ts +10 -0
- package/dist/MainNav/NavSections.js +40 -18
- package/dist/MainNav/NavUser.cjs +2 -2
- package/dist/MainNav/NavUser.d.ts +2 -0
- package/dist/MainNav/NavUser.js +51 -31
- package/dist/MainNav/index.d.ts +7 -0
- package/dist/ModalLayout/ModalBody.cjs +2 -2
- package/dist/ModalLayout/ModalBody.d.ts +1 -0
- package/dist/ModalLayout/ModalBody.js +19 -9
- package/dist/ModalLayout/ModalContext.d.ts +2 -0
- package/dist/ModalLayout/ModalFooter.d.ts +17 -0
- package/dist/ModalLayout/ModalHeader.d.ts +15 -0
- package/dist/ModalLayout/ModalLayout.cjs +3 -3
- package/dist/ModalLayout/ModalLayout.d.ts +12 -0
- package/dist/ModalLayout/ModalLayout.js +52 -30
- package/dist/ModalLayout/index.d.ts +4 -0
- package/dist/NumberInput/NumberInput.cjs +6 -6
- package/dist/NumberInput/NumberInput.d.ts +2 -0
- package/dist/NumberInput/NumberInput.js +157 -123
- package/dist/NumberInput/index.d.ts +1 -0
- package/dist/Pagination/Pagination.d.ts +19 -0
- package/dist/Pagination/PaginationContext.d.ts +8 -0
- package/dist/Pagination/components.cjs +7 -7
- package/dist/Pagination/components.d.ts +50 -0
- package/dist/Pagination/components.js +88 -65
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Popover/Popover.cjs +3 -3
- package/dist/Popover/Popover.d.ts +34 -0
- package/dist/Popover/Popover.js +91 -65
- package/dist/Popover/index.d.ts +1 -0
- package/dist/Portal/Portal.cjs +1 -1
- package/dist/Portal/Portal.d.ts +9 -0
- package/dist/Portal/Portal.js +12 -11
- package/dist/Portal/index.d.ts +1 -0
- package/dist/ProgressBar/ProgressBar.cjs +2 -2
- package/dist/ProgressBar/ProgressBar.d.ts +28 -0
- package/dist/ProgressBar/ProgressBar.js +49 -27
- package/dist/ProgressBar/index.d.ts +1 -0
- package/dist/Radio/Radio.cjs +2 -2
- package/dist/Radio/Radio.d.ts +11 -0
- package/dist/Radio/Radio.js +40 -19
- package/dist/Radio/index.d.ts +2 -0
- package/dist/RawTable/RawCell.cjs +1 -1
- package/dist/RawTable/RawCell.d.ts +47 -0
- package/dist/RawTable/RawCell.js +89 -69
- package/dist/RawTable/RawTable.cjs +1 -1
- package/dist/RawTable/RawTable.d.ts +26 -0
- package/dist/RawTable/RawTable.js +66 -46
- package/dist/RawTable/RawTableContext.d.ts +10 -0
- package/dist/RawTable/RawTbody.cjs +1 -1
- package/dist/RawTable/RawTbody.d.ts +10 -0
- package/dist/RawTable/RawTbody.js +30 -11
- package/dist/RawTable/RawThead.cjs +1 -1
- package/dist/RawTable/RawThead.d.ts +10 -0
- package/dist/RawTable/RawThead.js +29 -10
- package/dist/RawTable/RawTr.cjs +1 -1
- package/dist/RawTable/RawTr.d.ts +11 -0
- package/dist/RawTable/RawTr.js +34 -14
- package/dist/RawTable/focusFocusable.d.ts +1 -0
- package/dist/RawTable/index.d.ts +5 -0
- package/dist/Searchbar/SearchForm.cjs +1 -1
- package/dist/Searchbar/SearchForm.d.ts +1 -0
- package/dist/Searchbar/SearchForm.js +16 -5
- package/dist/Searchbar/Searchbar.cjs +7 -7
- package/dist/Searchbar/Searchbar.d.ts +2 -0
- package/dist/Searchbar/Searchbar.js +65 -45
- package/dist/Searchbar/index.d.ts +2 -0
- package/dist/Select/MultiSelectNested.cjs +1 -1
- package/dist/Select/MultiSelectNested.d.ts +10 -0
- package/dist/Select/MultiSelectNested.js +45 -23
- package/dist/Select/OptGroup.cjs +1 -1
- package/dist/Select/OptGroup.d.ts +13 -0
- package/dist/Select/OptGroup.js +35 -15
- package/dist/Select/Option.cjs +7 -7
- package/dist/Select/Option.d.ts +35 -0
- package/dist/Select/Option.js +57 -37
- package/dist/Select/Select.cjs +2 -2
- package/dist/Select/Select.d.ts +72 -0
- package/dist/Select/Select.js +186 -145
- package/dist/Select/SelectButton.cjs +2 -2
- package/dist/Select/SelectButton.d.ts +2 -0
- package/dist/Select/SelectButton.js +53 -33
- package/dist/Select/SelectList.d.ts +25 -0
- package/dist/Select/SelectTags.d.ts +22 -0
- package/dist/Select/components.d.ts +3 -0
- package/dist/Select/constants.d.ts +10 -0
- package/dist/Select/hooks/useButtonRef.d.ts +1 -0
- package/dist/Select/hooks/useListRef.d.ts +1 -0
- package/dist/Select/index.d.ts +5 -0
- package/dist/Select/utils.d.ts +2 -0
- package/dist/SimpleMenu/SimpleMenu.cjs +7 -23
- package/dist/SimpleMenu/SimpleMenu.d.ts +73 -0
- package/dist/SimpleMenu/SimpleMenu.js +154 -152
- package/dist/SimpleMenu/index.d.ts +1 -0
- package/dist/SimpleMenu/utils.d.ts +3 -0
- package/dist/Stack/Stack.cjs +5 -5
- package/dist/Stack/Stack.d.ts +19 -0
- package/dist/Stack/Stack.js +60 -36
- package/dist/Stack/index.d.ts +1 -0
- package/dist/Status/Status.cjs +4 -4
- package/dist/Status/Status.d.ts +24 -0
- package/dist/Status/Status.js +50 -30
- package/dist/Status/index.d.ts +1 -0
- package/dist/SubNav/SubNav.cjs +3 -3
- package/dist/SubNav/SubNav.d.ts +11 -0
- package/dist/SubNav/SubNav.js +37 -15
- package/dist/SubNav/SubNavHeader.cjs +2 -2
- package/dist/SubNav/SubNavHeader.d.ts +40 -0
- package/dist/SubNav/SubNavHeader.js +39 -38
- package/dist/SubNav/SubNavLink.cjs +6 -6
- package/dist/SubNav/SubNavLink.d.ts +25 -0
- package/dist/SubNav/SubNavLink.js +61 -39
- package/dist/SubNav/SubNavLinkSection.d.ts +19 -0
- package/dist/SubNav/SubNavSection.d.ts +27 -0
- package/dist/SubNav/SubNavSectionLabel.d.ts +26 -0
- package/dist/SubNav/SubNavSections.cjs +1 -1
- package/dist/SubNav/SubNavSections.d.ts +10 -0
- package/dist/SubNav/SubNavSections.js +39 -17
- package/dist/SubNav/index.d.ts +6 -0
- package/dist/Switch/Switch.cjs +5 -5
- package/dist/Switch/Switch.d.ts +2 -0
- package/dist/Switch/Switch.js +57 -35
- package/dist/Switch/index.d.ts +1 -0
- package/dist/Table/Cell.cjs +3 -3
- package/dist/Table/Cell.d.ts +17 -0
- package/dist/Table/Cell.js +40 -20
- package/dist/Table/TFooter.cjs +3 -3
- package/dist/Table/TFooter.d.ts +12 -0
- package/dist/Table/TFooter.js +50 -28
- package/dist/Table/Table.cjs +5 -5
- package/dist/Table/Table.d.ts +18 -0
- package/dist/Table/Table.js +55 -35
- package/dist/Table/Tbody.cjs +2 -2
- package/dist/Table/Tbody.d.ts +1 -0
- package/dist/Table/Tbody.js +17 -8
- package/dist/Table/Thead.cjs +2 -2
- package/dist/Table/Thead.d.ts +1 -0
- package/dist/Table/Thead.js +17 -8
- package/dist/Table/Tr.cjs +2 -2
- package/dist/Table/Tr.d.ts +1 -0
- package/dist/Table/Tr.js +17 -8
- package/dist/Table/index.d.ts +6 -0
- package/dist/Tabs/TabGroup.cjs +1 -1
- package/dist/Tabs/TabGroup.d.ts +2 -0
- package/dist/Tabs/TabGroup.js +45 -26
- package/dist/Tabs/TabPanels.cjs +1 -1
- package/dist/Tabs/TabPanels.d.ts +24 -0
- package/dist/Tabs/TabPanels.js +43 -24
- package/dist/Tabs/Tabs.cjs +2 -2
- package/dist/Tabs/Tabs.d.ts +51 -0
- package/dist/Tabs/Tabs.js +112 -94
- package/dist/Tabs/TabsContext.d.ts +2 -0
- package/dist/Tabs/components.d.ts +6 -0
- package/dist/Tabs/index.d.ts +3 -0
- package/dist/Tabs/useTabsFocus.d.ts +1 -0
- package/dist/Tag/Tag.cjs +4 -4
- package/dist/Tag/Tag.d.ts +23 -0
- package/dist/Tag/Tag.js +50 -27
- package/dist/Tag/index.d.ts +1 -0
- package/dist/TextButton/TextButton.cjs +6 -6
- package/dist/TextButton/TextButton.d.ts +16 -0
- package/dist/TextButton/TextButton.js +80 -51
- package/dist/TextButton/index.d.ts +1 -0
- package/dist/TextInput/TextInput.cjs +1 -1
- package/dist/TextInput/TextInput.d.ts +2 -0
- package/dist/TextInput/TextInput.js +69 -49
- package/dist/TextInput/index.d.ts +1 -0
- package/dist/Textarea/Textarea.cjs +3 -3
- package/dist/Textarea/Textarea.d.ts +2 -0
- package/dist/Textarea/Textarea.js +63 -43
- package/dist/Textarea/TextareaInput.cjs +4 -4
- package/dist/Textarea/TextareaInput.d.ts +2 -0
- package/dist/Textarea/TextareaInput.js +49 -30
- package/dist/Textarea/index.d.ts +1 -0
- package/dist/ThemeProvider/ThemeProvider.cjs +2 -2
- package/dist/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/dist/ThemeProvider/ThemeProvider.js +12 -11
- package/dist/ThemeProvider/hooks.d.ts +1 -0
- package/dist/ThemeProvider/index.d.ts +2 -0
- package/dist/TimePicker/TimePicker.cjs +3 -3
- package/dist/TimePicker/TimePicker.d.ts +54 -0
- package/dist/TimePicker/TimePicker.js +92 -64
- package/dist/TimePicker/index.d.ts +1 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.cjs +8 -8
- package/dist/ToggleCheckbox/ToggleCheckbox.d.ts +2 -0
- package/dist/ToggleCheckbox/ToggleCheckbox.js +75 -60
- package/dist/ToggleCheckbox/index.d.ts +1 -0
- package/dist/ToggleInput/ToggleInput.cjs +3 -3
- package/dist/ToggleInput/ToggleInput.d.ts +59 -0
- package/dist/ToggleInput/ToggleInput.js +98 -65
- package/dist/ToggleInput/index.d.ts +1 -0
- package/dist/Tooltip/Tooltip.cjs +2 -2
- package/dist/Tooltip/Tooltip.d.ts +32 -0
- package/dist/Tooltip/Tooltip.js +57 -38
- package/dist/Tooltip/hooks/useTooltipHandlers.d.ts +7 -0
- package/dist/Tooltip/hooks/useTooltipLayout.d.ts +4 -0
- package/dist/Tooltip/index.d.ts +1 -0
- package/dist/Tooltip/utils/positionTooltip.d.ts +7 -0
- package/dist/Typography/Typography.cjs +7 -7
- package/dist/Typography/Typography.d.ts +16 -0
- package/dist/Typography/Typography.js +28 -17
- package/dist/Typography/constants.d.ts +8 -0
- package/dist/Typography/index.d.ts +1 -0
- package/dist/Typography/utils.cjs +2 -2
- package/dist/Typography/utils.d.ts +13 -0
- package/dist/Typography/utils.js +6 -6
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
- package/dist/VisuallyHidden/index.d.ts +1 -0
- package/dist/helpers/arrays.cjs +1 -0
- package/dist/helpers/arrays.d.ts +7 -0
- package/dist/helpers/arrays.js +6 -0
- package/dist/helpers/escapeSelector.d.ts +1 -0
- package/dist/helpers/genId.d.ts +1 -0
- package/dist/helpers/getDefaultLocale.cjs +1 -1
- package/dist/helpers/getDefaultLocale.d.ts +1 -0
- package/dist/helpers/getDefaultLocale.js +1 -1
- package/dist/helpers/getFocusableNodes.d.ts +10 -0
- package/dist/helpers/handleResponsiveValues.cjs +1 -5
- package/dist/helpers/handleResponsiveValues.d.ts +9 -0
- package/dist/helpers/handleResponsiveValues.js +21 -15
- package/dist/helpers/keyboardKeys.d.ts +17 -0
- package/dist/helpers/objects.cjs +1 -0
- package/dist/helpers/objects.d.ts +28 -0
- package/dist/helpers/objects.js +26 -0
- package/dist/helpers/setOpacity.cjs +1 -1
- package/dist/helpers/setOpacity.d.ts +1 -0
- package/dist/helpers/setOpacity.js +1 -1
- package/dist/helpers/setTabIndexOnFirstItem.d.ts +1 -0
- package/dist/helpers/theme.cjs +1 -0
- package/dist/helpers/theme.d.ts +2 -0
- package/dist/helpers/theme.js +7 -0
- package/dist/helpers/useElementOnScreen.d.ts +1 -0
- package/dist/helpers/useId.d.ts +1 -0
- package/dist/helpers/useIntersection.cjs +1 -1
- package/dist/helpers/useIntersection.d.ts +10 -0
- package/dist/helpers/useIntersection.js +8 -8
- package/dist/helpers/useLockScroll.d.ts +2 -0
- package/dist/helpers/usePrevious.d.ts +1 -0
- package/dist/helpers/useResizeObserver.d.ts +2 -0
- package/dist/hooks/useControllableState.cjs +1 -1
- package/dist/hooks/useControllableState.d.ts +16 -0
- package/dist/hooks/useControllableState.js +13 -16
- package/dist/index.d.ts +64 -0
- package/dist/themes/ColorButton.cjs +3 -3
- package/dist/themes/ColorButton.d.ts +6 -0
- package/dist/themes/ColorButton.js +23 -19
- package/dist/themes/common-theme.d.ts +2 -0
- package/dist/themes/darkTheme/dark-colors.d.ts +4 -0
- package/dist/themes/darkTheme/dark-shadows.d.ts +4 -0
- package/dist/themes/darkTheme/index.cjs +1 -1
- package/dist/themes/darkTheme/index.d.ts +2 -0
- package/dist/themes/darkTheme/index.js +18 -8
- package/dist/themes/extendTheme.cjs +4 -4
- package/dist/themes/extendTheme.d.ts +2 -0
- package/dist/themes/extendTheme.js +14 -22
- package/dist/themes/index.d.ts +4 -0
- package/dist/themes/lightTheme/index.cjs +1 -1
- package/dist/themes/lightTheme/index.d.ts +2 -0
- package/dist/themes/lightTheme/index.js +18 -8
- package/dist/themes/lightTheme/light-colors.d.ts +4 -0
- package/dist/themes/lightTheme/light-shadows.d.ts +4 -0
- package/dist/themes/sizes.d.ts +2 -0
- package/dist/themes/utils.d.ts +12 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.cjs +2 -2
- package/dist/v2/Breadcrumbs/Breadcrumbs.d.ts +13 -0
- package/dist/v2/Breadcrumbs/Breadcrumbs.js +43 -23
- package/dist/v2/Breadcrumbs/Crumb.cjs +1 -1
- package/dist/v2/Breadcrumbs/Crumb.d.ts +17 -0
- package/dist/v2/Breadcrumbs/Crumb.js +44 -22
- package/dist/v2/Breadcrumbs/CrumbLink.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbLink.d.ts +16 -0
- package/dist/v2/Breadcrumbs/CrumbLink.js +35 -14
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.cjs +2 -2
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.d.ts +12 -0
- package/dist/v2/Breadcrumbs/CrumbSimpleMenu.js +41 -19
- package/dist/v2/Breadcrumbs/Divider.d.ts +4 -0
- package/dist/v2/Breadcrumbs/index.d.ts +4 -0
- package/dist/v2/Link/Link.cjs +5 -5
- package/dist/v2/Link/Link.d.ts +2 -0
- package/dist/v2/Link/Link.js +64 -42
- package/dist/v2/Link/index.d.ts +1 -0
- package/dist/v2/LinkButton/LinkButton.cjs +10 -10
- package/dist/v2/LinkButton/LinkButton.d.ts +2 -0
- package/dist/v2/LinkButton/LinkButton.js +75 -51
- package/dist/v2/LinkButton/index.d.ts +1 -0
- package/dist/v2/MainNav/MainNav.cjs +2 -2
- package/dist/v2/MainNav/MainNav.d.ts +14 -0
- package/dist/v2/MainNav/MainNav.js +39 -17
- package/dist/v2/MainNav/MainNavContext.d.ts +2 -0
- package/dist/v2/MainNav/NavBrand.cjs +3 -3
- package/dist/v2/MainNav/NavBrand.d.ts +2 -0
- package/dist/v2/MainNav/NavBrand.js +78 -57
- package/dist/v2/MainNav/NavCondense.cjs +3 -3
- package/dist/v2/MainNav/NavCondense.d.ts +10 -0
- package/dist/v2/MainNav/NavCondense.js +40 -20
- package/dist/v2/MainNav/NavLink.cjs +9 -9
- package/dist/v2/MainNav/NavLink.d.ts +2 -0
- package/dist/v2/MainNav/NavLink.js +77 -56
- package/dist/v2/MainNav/NavSection.cjs +1 -1
- package/dist/v2/MainNav/NavSection.d.ts +12 -0
- package/dist/v2/MainNav/NavSection.js +67 -46
- package/dist/v2/MainNav/NavSections.cjs +1 -1
- package/dist/v2/MainNav/NavSections.d.ts +10 -0
- package/dist/v2/MainNav/NavSections.js +40 -18
- package/dist/v2/MainNav/NavUser.cjs +2 -2
- package/dist/v2/MainNav/NavUser.d.ts +2 -0
- package/dist/v2/MainNav/NavUser.js +51 -31
- package/dist/v2/MainNav/index.d.ts +7 -0
- package/dist/v2/Pagination/Pagination.d.ts +19 -0
- package/dist/v2/Pagination/PaginationContext.d.ts +8 -0
- package/dist/v2/Pagination/components.cjs +7 -7
- package/dist/v2/Pagination/components.d.ts +14 -0
- package/dist/v2/Pagination/components.js +89 -65
- package/dist/v2/Pagination/index.d.ts +2 -0
- package/dist/v2/SimpleMenu/SimpleMenu.cjs +7 -21
- package/dist/v2/SimpleMenu/SimpleMenu.d.ts +70 -0
- package/dist/v2/SimpleMenu/SimpleMenu.js +147 -143
- package/dist/v2/SimpleMenu/index.d.ts +1 -0
- package/dist/v2/SimpleMenu/utils.d.ts +3 -0
- package/dist/v2/SubNav/SubNav.cjs +3 -3
- package/dist/v2/SubNav/SubNav.d.ts +11 -0
- package/dist/v2/SubNav/SubNav.js +37 -15
- package/dist/v2/SubNav/SubNavHeader.cjs +2 -2
- package/dist/v2/SubNav/SubNavHeader.d.ts +40 -0
- package/dist/v2/SubNav/SubNavHeader.js +39 -38
- package/dist/v2/SubNav/SubNavLink.cjs +6 -6
- package/dist/v2/SubNav/SubNavLink.d.ts +2 -0
- package/dist/v2/SubNav/SubNavLink.js +64 -42
- package/dist/v2/SubNav/SubNavLinkSection.d.ts +17 -0
- package/dist/v2/SubNav/SubNavSection.d.ts +25 -0
- package/dist/v2/SubNav/SubNavSectionLabel.d.ts +26 -0
- package/dist/v2/SubNav/SubNavSections.cjs +1 -1
- package/dist/v2/SubNav/SubNavSections.d.ts +10 -0
- package/dist/v2/SubNav/SubNavSections.js +39 -17
- package/dist/v2/SubNav/index.d.ts +6 -0
- package/dist/v2/index.d.ts +7 -0
- package/package.json +3 -3
- package/dist/Box/BoxProps.cjs +0 -1
- package/dist/Box/BoxProps.js +0 -51
- package/dist/Flex/FlexProps.cjs +0 -1
- package/dist/Flex/FlexProps.js +0 -41
- package/dist/Typography/TypographyProps.cjs +0 -1
- package/dist/Typography/TypographyProps.js +0 -31
- package/dist/themes/colors.cjs +0 -1
- package/dist/themes/colors.js +0 -49
package/dist/Typography/utils.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SIGMA as
|
|
2
|
-
const $ = ({ ellipsis: n }) => n && `
|
|
1
|
+
import { SIGMA as e, PI as s, OMEGA as t, EPSILON as o, DELTA as l, BETA as f, ALPHA as r } from "./constants.js";
|
|
2
|
+
const $ = ({ ellipsis: n = !1 }) => n && `
|
|
3
3
|
display: block;
|
|
4
4
|
white-space: nowrap;
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
text-overflow: ellipsis;
|
|
7
|
-
`, a = ({ variant: n, theme: i }) => {
|
|
7
|
+
`, a = ({ variant: n = t, theme: i }) => {
|
|
8
8
|
switch (n) {
|
|
9
9
|
case r:
|
|
10
10
|
return `
|
|
@@ -29,17 +29,17 @@ const $ = ({ ellipsis: n }) => n && `
|
|
|
29
29
|
font-size: ${i.fontSizes[3]};
|
|
30
30
|
line-height: ${i.lineHeights[6]};
|
|
31
31
|
`;
|
|
32
|
-
case
|
|
32
|
+
case t:
|
|
33
33
|
return `
|
|
34
34
|
font-size: ${i.fontSizes[2]};
|
|
35
35
|
line-height: ${i.lineHeights[4]};
|
|
36
36
|
`;
|
|
37
|
-
case
|
|
37
|
+
case s:
|
|
38
38
|
return `
|
|
39
39
|
font-size: ${i.fontSizes[1]};
|
|
40
40
|
line-height: ${i.lineHeights[3]};
|
|
41
41
|
`;
|
|
42
|
-
case
|
|
42
|
+
case e:
|
|
43
43
|
return `
|
|
44
44
|
font-weight: ${i.fontWeights.bold};
|
|
45
45
|
font-size: ${i.fontSizes[0]};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VisuallyHidden: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VisuallyHidden';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function e(r){return r&&typeof r=="object"&&Array.isArray(r)}exports.isArray=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const escapeSelector: (selector: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const genId: () => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="en-EN",a=()=>typeof navigator
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="en-EN",a=()=>typeof navigator=="undefined"?e:navigator.language?navigator.language:navigator.userLanguage?navigator.userLanguage:e;exports.getDefaultLocale=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDefaultLocale: () => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const a = "en-EN", e = () => typeof navigator
|
|
1
|
+
const a = "en-EN", e = () => typeof navigator == "undefined" ? a : navigator.language ? navigator.language : navigator.userLanguage ? navigator.userLanguage : a;
|
|
2
2
|
export {
|
|
3
3
|
e as getDefaultLocale
|
|
4
4
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sometimes, we want to retrieve the elements with tabindex=-1, and sometime we don't
|
|
3
|
+
* The includeNegativeTabIndex aims to provide this capability
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
export declare const getFocusableNodes: (node: HTMLElement, includeNegativeTabIndex: boolean) => Element[];
|
|
7
|
+
/**
|
|
8
|
+
* This function filters an array of HTMLElements and returns any of them that have internal keyboard navigation such as input type="text"
|
|
9
|
+
*/
|
|
10
|
+
export declare const getFocusableNodesWithKeyboardNav: (nodes: HTMLElement[]) => HTMLElement[];
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
${a}: ${e.spaces[o]};
|
|
3
|
-
}`),t!==void 0&&(r+=`${e.mediaQueries.mobile}{
|
|
4
|
-
${a}: ${e.spaces[t]};
|
|
5
|
-
}`),r}const c=e.spaces[i]||i;return`${a}: ${c};`};module.exports=l;
|
|
1
|
+
"use strict";const f=(n,s,r)=>{if(!s)return;let $=Array.isArray(s)?s:[];if(!Array.isArray(s)&&typeof s=="object"&&($=[s==null?void 0:s.desktop,s==null?void 0:s.tablet,s==null?void 0:s.mobile]),$.length>0)return $.reduce((t,i,d)=>{if(i)switch(d){case 0:return`${t}${n}: ${r.spaces[i]};`;case 1:return`${t}${r.mediaQueries.tablet}{${n}: ${r.spaces[i]};}`;case 2:return`${t}${r.mediaQueries.mobile}{${n}: ${r.spaces[i]};}`;default:return t}return t},"");const e=r.spaces[s]||s;return`${n}: ${e};`};module.exports=f;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
interface ResponsiveValueObject {
|
|
3
|
+
desktop?: keyof DefaultTheme['spaces'];
|
|
4
|
+
tablet?: keyof DefaultTheme['spaces'];
|
|
5
|
+
mobile?: keyof DefaultTheme['spaces'];
|
|
6
|
+
}
|
|
7
|
+
type ResponsiveValue = ResponsiveValueObject | Array<keyof DefaultTheme['spaces'] | undefined> | keyof DefaultTheme['spaces'];
|
|
8
|
+
declare const handleResponsiveValues: (property: string, value: ResponsiveValue | undefined, theme: DefaultTheme) => string | undefined;
|
|
9
|
+
export default handleResponsiveValues;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
if (!Array.isArray(s) && typeof s == "object" && (e = [s?.desktop, s?.tablet, s?.mobile]), e === void 0)
|
|
1
|
+
const o = (t, s, r) => {
|
|
2
|
+
if (!s)
|
|
4
3
|
return;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
let $ = Array.isArray(s) ? s : [];
|
|
5
|
+
if (!Array.isArray(s) && typeof s == "object" && ($ = [s == null ? void 0 : s.desktop, s == null ? void 0 : s.tablet, s == null ? void 0 : s.mobile]), $.length > 0)
|
|
6
|
+
return $.reduce((n, i, d) => {
|
|
7
|
+
if (i)
|
|
8
|
+
switch (d) {
|
|
9
|
+
case 0:
|
|
10
|
+
return `${n}${t}: ${r.spaces[i]};`;
|
|
11
|
+
case 1:
|
|
12
|
+
return `${n}${r.mediaQueries.tablet}{${t}: ${r.spaces[i]};}`;
|
|
13
|
+
case 2:
|
|
14
|
+
return `${n}${r.mediaQueries.mobile}{${t}: ${r.spaces[i]};}`;
|
|
15
|
+
default:
|
|
16
|
+
return n;
|
|
17
|
+
}
|
|
18
|
+
return n;
|
|
19
|
+
}, "");
|
|
20
|
+
const e = r.spaces[s] || s;
|
|
21
|
+
return `${t}: ${e};`;
|
|
16
22
|
};
|
|
17
23
|
export {
|
|
18
|
-
|
|
24
|
+
o as default
|
|
19
25
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const KeyboardKeys: {
|
|
2
|
+
DOWN: string;
|
|
3
|
+
UP: string;
|
|
4
|
+
RIGHT: string;
|
|
5
|
+
LEFT: string;
|
|
6
|
+
ESCAPE: string;
|
|
7
|
+
ENTER: string;
|
|
8
|
+
SPACE: string;
|
|
9
|
+
TAB: string;
|
|
10
|
+
END: string;
|
|
11
|
+
HOME: string;
|
|
12
|
+
DELETE: string;
|
|
13
|
+
PAGE_UP: string;
|
|
14
|
+
PAGE_DOWN: string;
|
|
15
|
+
BACKSPACE: string;
|
|
16
|
+
CLEAR: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./arrays.cjs");function b(e,i){return typeof e=="string"?!1:i in e}function n(e){return e&&typeof e=="object"&&!Array.isArray(e)}function o(e,...i){if(!i.length)return e;const r=i.shift();if(r==null)return e;const c=n(e)&&n(r),t=f.isArray(e)&&f.isArray(r);if(c||t)for(const s of Object.keys(r)){const u=n(r[s]),y=f.isArray(r[s]);u||y?(e[s]||Object.assign(e,{[s]:u?{}:[]}),o(e[s],r[s])):c?Object.assign(e,{[s]:r[s]}):e.push(r[s])}return o(e,...i)}exports.isKeyOf=b;exports.isObject=n;exports.mergeDeep=o;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare function isKeyOf(o: object | [] | string, s: string | number | symbol): s is keyof typeof o;
|
|
2
|
+
/**
|
|
3
|
+
* @description Simple object check.
|
|
4
|
+
* @export
|
|
5
|
+
* @param item
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export declare function isObject(item: any): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @description Deep merge two objects or arrays.
|
|
11
|
+
* If all parameters have the same structure, ie. are objects or arrays,
|
|
12
|
+
* the function will recursively merge the two structures together while maintaining the structure.
|
|
13
|
+
* If the parameters do not share the same structure, the function will simply return the first parameter.
|
|
14
|
+
* This is also true for when both parameters are the same until a non-shared property is encountered.
|
|
15
|
+
*
|
|
16
|
+
* For example:
|
|
17
|
+
* - `mergeDeep({a: 1, b: 2}, {a: 3, c: 4})` => `{a: 3, b: 2, c: 4}`
|
|
18
|
+
* - `mergeDeep({a: 2}, {a: []})` => `{a: 2}`
|
|
19
|
+
* - `mergeDeep({a: {b: 1}}, {a: {b: 2}})` => `{a: {b: 2}}`
|
|
20
|
+
* - `mergeDeep({a: [0]}, {a: [1, 2]})` => `{a: [0, 1, 2]}`
|
|
21
|
+
* - `mergeDeep({a: [{}, 1]}, {a: [{inserted: 5}, 2]})` => `{a: [{inserted: 5}, 1, 2]}`
|
|
22
|
+
* - `mergeDeep({a: [{kept: 1}, 1]}, {a: [2, {discarded: 5}]})` => `{a: [{kept: 1}, 1, 2]}`
|
|
23
|
+
* @export
|
|
24
|
+
* @param target The object to merge and update with new values from the different source parameters
|
|
25
|
+
* @param ...sources The source objects to merge into the target
|
|
26
|
+
* @returns {Record<string, any>} The new deep merged object
|
|
27
|
+
*/
|
|
28
|
+
export declare function mergeDeep(target: Record<string, any>, ...sources: Record<string, any>[]): Record<string, any>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { isArray as e } from "./arrays.js";
|
|
2
|
+
function j(n, s) {
|
|
3
|
+
return typeof n == "string" ? !1 : s in n;
|
|
4
|
+
}
|
|
5
|
+
function f(n) {
|
|
6
|
+
return n && typeof n == "object" && !Array.isArray(n);
|
|
7
|
+
}
|
|
8
|
+
function u(n, ...s) {
|
|
9
|
+
if (!s.length)
|
|
10
|
+
return n;
|
|
11
|
+
const i = s.shift();
|
|
12
|
+
if (i == null)
|
|
13
|
+
return n;
|
|
14
|
+
const o = f(n) && f(i), b = e(n) && e(i);
|
|
15
|
+
if (o || b)
|
|
16
|
+
for (const r of Object.keys(i)) {
|
|
17
|
+
const c = f(i[r]), t = e(i[r]);
|
|
18
|
+
c || t ? (n[r] || Object.assign(n, { [r]: c ? {} : [] }), u(n[r], i[r])) : o ? Object.assign(n, { [r]: i[r] }) : n.push(i[r]);
|
|
19
|
+
}
|
|
20
|
+
return u(n, ...s);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
j as isKeyOf,
|
|
24
|
+
f as isObject,
|
|
25
|
+
u as mergeDeep
|
|
26
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=(t,e)=>`${t}${Math.floor(e*255).toString(16).padStart(2,0)}`;exports.setOpacity=o;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=(t,e)=>`${t}${Math.floor(e*255).toString(16).padStart(2,"0")}`;exports.setOpacity=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setOpacity: (hex: string, alpha: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const setTabIndexOnFirstItem: (node: HTMLElement, selector: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./objects.cjs");function u(t,e,r){return e&&o.isKeyOf(t,e)?t[e]:r}exports.extractStyleFromTheme=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useElementOnScreen: (options?: IntersectionObserverInit) => (boolean | import("react").RefObject<HTMLElement>)[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useId: (prefix: string, initialId?: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react"),d=require("@radix-ui/react-use-callback-ref"),v=(e,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react"),d=require("@radix-ui/react-use-callback-ref"),v=(e,i,{selectorToWatch:t,skipWhen:r=!1})=>{const n=d.useCallbackRef(i);g.useEffect(()=>{if(r)return;const u={root:e.current,rootMargin:"0px"},a=f=>{f.forEach(s=>{s.isIntersecting&&e.current.scrollHeight>e.current.clientHeight&&n(s)})},c=new IntersectionObserver(a,u),o=e.current.querySelector(t);return o&&c.observe(o),()=>{c.disconnect()}},[r,n,t,e])};exports.useIntersection=v;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO: This should be moved to the `hooks` folder
|
|
3
|
+
*/
|
|
4
|
+
import { MutableRefObject } from 'react';
|
|
5
|
+
interface UseIntersectionOptions {
|
|
6
|
+
selectorToWatch: keyof HTMLElementTagNameMap;
|
|
7
|
+
skipWhen?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const useIntersection: (scrollableAreaRef: MutableRefObject<HTMLElement>, callback: (entry: IntersectionObserverEntry) => void, { selectorToWatch, skipWhen }: UseIntersectionOptions) => void;
|
|
10
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useEffect as m } from "react";
|
|
2
2
|
import { useCallbackRef as p } from "@radix-ui/react-use-callback-ref";
|
|
3
|
-
const E = (t,
|
|
4
|
-
const e = p(
|
|
3
|
+
const E = (t, s, { selectorToWatch: n, skipWhen: r = !1 }) => {
|
|
4
|
+
const e = p(s);
|
|
5
5
|
m(() => {
|
|
6
6
|
if (r)
|
|
7
7
|
return;
|
|
8
|
-
const
|
|
8
|
+
const u = {
|
|
9
9
|
root: t.current,
|
|
10
10
|
rootMargin: "0px"
|
|
11
|
-
},
|
|
12
|
-
g.forEach((
|
|
13
|
-
|
|
11
|
+
}, f = (g) => {
|
|
12
|
+
g.forEach((i) => {
|
|
13
|
+
i.isIntersecting && t.current.scrollHeight > t.current.clientHeight && e(i);
|
|
14
14
|
});
|
|
15
|
-
}, o = new IntersectionObserver(
|
|
16
|
-
return o.observe(
|
|
15
|
+
}, o = new IntersectionObserver(f, u), c = t.current.querySelector(n);
|
|
16
|
+
return c && o.observe(c), () => {
|
|
17
17
|
o.disconnect();
|
|
18
18
|
};
|
|
19
19
|
}, [r, e, n, t]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePrevious: <TValue>(value: TValue) => TValue | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("react"),i=require("@radix-ui/react-use-callback-ref");function g(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const u=g(S);function p({prop:e,defaultProp:o,onChange:n=()=>{}}){const[t,c]=
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("react"),i=require("@radix-ui/react-use-callback-ref");function g(e){if(e&&e.__esModule)return e;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const u=g(S);function p({prop:e,defaultProp:o,onChange:n=()=>{}}){const[t,c]=C({defaultProp:o,onChange:n}),r=e!==void 0,s=typeof e=="function"?e(t):e,d=r?s:t,a=i.useCallbackRef(n),b=u.useCallback(l=>{if(r){const f=typeof l=="function"?l(s):l;f!==s&&(a(f),c(l))}else c(l)},[r,s,c,a]);return[d,b]}function C({defaultProp:e,onChange:o}){const n=u.useState(e),[t]=n,c=u.useRef(t),r=i.useCallbackRef(o);return u.useEffect(()=>{c.current!==t&&(r(t),c.current=t)},[t,c,r]),n}exports.useControllableState=p;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* this is basically stolen from RadixUI but tweaked to allow the following:
|
|
3
|
+
* * prop can be a function
|
|
4
|
+
* * setUncontrolledProp is always called with the nextValue.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @type {<T>(params: UseControllableStateParams<T>) => [T, (nextState: T | SetStateFn<T>) => void]}
|
|
8
|
+
*/
|
|
9
|
+
export interface UseControllableStateParams<TProp> {
|
|
10
|
+
prop?: TProp | undefined;
|
|
11
|
+
defaultProp?: TProp | undefined;
|
|
12
|
+
onChange?: (state?: TProp) => void;
|
|
13
|
+
}
|
|
14
|
+
type SetStateFn<TState> = (prevState: TState) => TState;
|
|
15
|
+
declare function useControllableState<TProp>({ prop, defaultProp, onChange, }: UseControllableStateParams<TProp>): [TProp | undefined, (nextState: TProp | SetStateFn<TProp>) => void];
|
|
16
|
+
export { useControllableState };
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import { useCallbackRef as i } from "@radix-ui/react-use-callback-ref";
|
|
3
|
-
function R({ prop:
|
|
3
|
+
function R({ prop: n, defaultProp: u, onChange: c = () => {
|
|
4
4
|
} }) {
|
|
5
|
-
const [t, e] =
|
|
6
|
-
(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[n, l, e, a]
|
|
14
|
-
);
|
|
15
|
-
return [d, v];
|
|
5
|
+
const [t, e] = m({ defaultProp: u, onChange: c }), o = n !== void 0, l = typeof n == "function" ? n(t) : n, d = o ? l : t, f = i(c), C = r.useCallback((s) => {
|
|
6
|
+
if (o) {
|
|
7
|
+
const a = typeof s == "function" ? s(l) : s;
|
|
8
|
+
a !== l && (f(a), e(s));
|
|
9
|
+
} else
|
|
10
|
+
e(s);
|
|
11
|
+
}, [o, l, e, f]);
|
|
12
|
+
return [d, C];
|
|
16
13
|
}
|
|
17
|
-
function
|
|
18
|
-
const c = r.useState(
|
|
14
|
+
function m({ defaultProp: n, onChange: u }) {
|
|
15
|
+
const c = r.useState(n), [t] = c, e = r.useRef(t), o = i(u);
|
|
19
16
|
return r.useEffect(() => {
|
|
20
|
-
e.current !== t && (
|
|
21
|
-
}, [t, e,
|
|
17
|
+
e.current !== t && (o(t), e.current = t);
|
|
18
|
+
}, [t, e, o]), c;
|
|
22
19
|
}
|
|
23
20
|
export {
|
|
24
21
|
R as useControllableState
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export * from './Accordion';
|
|
2
|
+
export * from './Alert';
|
|
3
|
+
export * from './Avatar';
|
|
4
|
+
export * from './Badge';
|
|
5
|
+
export * from './BaseButton';
|
|
6
|
+
export * from './BaseCheckbox';
|
|
7
|
+
export * from './BaseLink';
|
|
8
|
+
export { BaseRadio } from './BaseRadio';
|
|
9
|
+
export * from './Box';
|
|
10
|
+
export * from './Breadcrumbs';
|
|
11
|
+
export * from './Button';
|
|
12
|
+
export * from './Card';
|
|
13
|
+
export * from './CarouselInput';
|
|
14
|
+
export * from './Checkbox';
|
|
15
|
+
export * from './Combobox';
|
|
16
|
+
export * from './Dialog';
|
|
17
|
+
export * from './DismissibleLayer';
|
|
18
|
+
export * from './DatePicker';
|
|
19
|
+
export * from './DateTimePicker';
|
|
20
|
+
export * from './Divider';
|
|
21
|
+
export * from './EmptyStateLayout';
|
|
22
|
+
export * from './Field';
|
|
23
|
+
export * from './FocusTrap';
|
|
24
|
+
export * from './Grid';
|
|
25
|
+
export * from './Icon';
|
|
26
|
+
export * from './IconButton';
|
|
27
|
+
export * from './KeyboardNavigable';
|
|
28
|
+
export * from './Layout';
|
|
29
|
+
export * from './Link';
|
|
30
|
+
export * from './LinkButton';
|
|
31
|
+
export * from './LiveRegions';
|
|
32
|
+
export * from './Loader';
|
|
33
|
+
export * from './Main';
|
|
34
|
+
export * from './MainNav';
|
|
35
|
+
export * from './ModalLayout';
|
|
36
|
+
export * from './NumberInput';
|
|
37
|
+
export * from './Pagination';
|
|
38
|
+
export * from './Popover';
|
|
39
|
+
export * from './Portal';
|
|
40
|
+
export * from './ProgressBar';
|
|
41
|
+
export * from './Radio';
|
|
42
|
+
export * from './RawTable';
|
|
43
|
+
export * from './Flex';
|
|
44
|
+
export * from './Searchbar';
|
|
45
|
+
export * from './Select';
|
|
46
|
+
export * from './SimpleMenu';
|
|
47
|
+
export * from './Stack';
|
|
48
|
+
export * from './Status';
|
|
49
|
+
export * from './SubNav';
|
|
50
|
+
export * from './Switch';
|
|
51
|
+
export * from './Tabs';
|
|
52
|
+
export * from './Table';
|
|
53
|
+
export * from './Tag';
|
|
54
|
+
export * from './TextButton';
|
|
55
|
+
export * from './TextInput';
|
|
56
|
+
export * from './Textarea';
|
|
57
|
+
export * from './ThemeProvider';
|
|
58
|
+
export * from './TimePicker';
|
|
59
|
+
export * from './ToggleCheckbox';
|
|
60
|
+
export * from './ToggleInput';
|
|
61
|
+
export * from './Tooltip';
|
|
62
|
+
export * from './Typography';
|
|
63
|
+
export * from './VisuallyHidden';
|
|
64
|
+
export * from './themes';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
background: ${({color:
|
|
3
|
-
`,
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),n=require("styled-components"),t=require("../Box/Box.cjs"),u=require("../Typography/Typography.cjs"),d=o=>o&&typeof o=="object"&&"default"in o?o:{default:o},s=d(n),a=s.default(t.Box)`
|
|
2
|
+
background: ${({color:o})=>o};
|
|
3
|
+
`,l=({colorKey:o,color:r})=>e.jsx(a,{color:r,paddingTop:6,paddingLeft:6,hasRadius:!0,shadow:"popupShadow",borderColor:"neutral200",children:e.jsx(t.Box,{background:"neutral0",padding:1,children:e.jsx(u.Typography,{children:o})})});exports.ColorButton=l;
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import n from "styled-components";
|
|
3
|
+
import { Box as d } from "../Box/Box.js";
|
|
4
|
+
import { Typography as p } from "../Typography/Typography.js";
|
|
5
|
+
const a = n(d)`
|
|
6
|
+
background: ${({
|
|
7
|
+
color: o
|
|
8
|
+
}) => o};
|
|
9
|
+
`, c = ({
|
|
10
|
+
colorKey: o,
|
|
11
|
+
color: t
|
|
12
|
+
}) => r(a, {
|
|
13
|
+
color: t,
|
|
10
14
|
paddingTop: 6,
|
|
11
15
|
paddingLeft: 6,
|
|
12
16
|
hasRadius: !0,
|
|
13
17
|
shadow: "popupShadow",
|
|
14
|
-
borderColor: "neutral200"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
18
|
+
borderColor: "neutral200",
|
|
19
|
+
children: r(d, {
|
|
20
|
+
background: "neutral0",
|
|
21
|
+
padding: 1,
|
|
22
|
+
children: r(p, {
|
|
23
|
+
children: o
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
});
|
|
23
27
|
export {
|
|
24
|
-
|
|
28
|
+
c as ColorButton
|
|
25
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";var d=Object.defineProperty;var s=Object.getOwnPropertySymbols;var t=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var c=(r,e,o)=>e in r?d(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,a=(r,e)=>{for(var o in e||(e={}))t.call(e,o)&&c(r,o,e[o]);if(s)for(var o of s(e))m.call(e,o)&&c(r,o,e[o]);return r};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("./dark-colors.cjs"),h=require("./dark-shadows.cjs"),k=require("../common-theme.cjs"),l=a({colors:n.darkColorTokenObject.color,shadows:h.darkShadowTokenObject.shadow},k.commonTheme);exports.darkTheme=l;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var e = Object.getOwnPropertySymbols;
|
|
3
|
+
var d = Object.prototype.hasOwnProperty, h = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var t = (m, o, r) => o in m ? c(m, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : m[o] = r, a = (m, o) => {
|
|
5
|
+
for (var r in o || (o = {}))
|
|
6
|
+
d.call(o, r) && t(m, r, o[r]);
|
|
7
|
+
if (e)
|
|
8
|
+
for (var r of e(o))
|
|
9
|
+
h.call(o, r) && t(m, r, o[r]);
|
|
10
|
+
return m;
|
|
8
11
|
};
|
|
12
|
+
import { darkColorTokenObject as k } from "./dark-colors.js";
|
|
13
|
+
import { darkShadowTokenObject as s } from "./dark-shadows.js";
|
|
14
|
+
import { commonTheme as n } from "../common-theme.js";
|
|
15
|
+
const l = a({
|
|
16
|
+
colors: k.color,
|
|
17
|
+
shadows: s.shadow
|
|
18
|
+
}, n);
|
|
9
19
|
export {
|
|
10
|
-
|
|
20
|
+
l as darkTheme
|
|
11
21
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
${
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../helpers/objects.cjs"),s=require("./lightTheme/index.cjs"),r=t=>`
|
|
2
|
+
${t}
|
|
3
3
|
|
|
4
4
|
The following is an example:
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ The following is an example:
|
|
|
7
7
|
import { lightTheme, extendTheme } from '@strapi/design-system';
|
|
8
8
|
|
|
9
9
|
const myCustomTheme = extendTheme(lightTheme, {
|
|
10
|
-
${Object.keys(
|
|
10
|
+
${Object.keys(s.lightTheme).map(e=>`${e}: /* put the overrides for the ${e} key */,`).join(`
|
|
11
11
|
`)}
|
|
12
12
|
})
|
|
13
|
-
`,
|
|
13
|
+
`,h=(t,e)=>{if(!n.isObject(t)){const o=r("The first argument should be an object and corresponds to the theme you want to extend.");throw new Error(o)}if(!n.isObject(e)){const o=r("The second argument should be an object and corresponds to the keys of the theme you want to override.");throw new Error(o)}return n.mergeDeep(t!=null?t:{},e!=null?e:{})};exports.extendTheme=h;
|