@algolia/satellite 1.0.0-beta.147 → 1.0.0-beta.149
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/cjs/AnnouncementBadge/AnnouncementBadge.js +7 -24
- package/cjs/AnnouncementBadge/index.js +0 -5
- package/cjs/AutoComplete/AutoComplete.js +68 -163
- package/cjs/AutoComplete/AutoComplete.tailwind.js +2 -5
- package/cjs/AutoComplete/components/AutoCompleteEmptyState.js +5 -14
- package/cjs/AutoComplete/components/DefaultOptionItem.js +2 -11
- package/cjs/AutoComplete/index.js +0 -11
- package/cjs/AutoComplete/utils.js +0 -8
- package/cjs/Avatars/ApplicationAvatar.js +3 -13
- package/cjs/Avatars/UserAvatar.js +6 -20
- package/cjs/Avatars/index.js +0 -7
- package/cjs/Avatars/utils.js +6 -37
- package/cjs/Badge/Badge.js +13 -36
- package/cjs/Badge/index.js +0 -5
- package/cjs/Banners/Alert/Alert.js +18 -28
- package/cjs/Banners/Alert/index.js +0 -5
- package/cjs/Banners/BigBertha/BigBertha.js +5 -12
- package/cjs/Banners/BigBertha/index.js +0 -5
- package/cjs/Banners/Promote/Promote.js +8 -19
- package/cjs/Banners/Promote/index.js +0 -5
- package/cjs/Banners/index.js +0 -6
- package/cjs/Button/Button.js +14 -34
- package/cjs/Button/Button.tailwind.js +3 -5
- package/cjs/Button/ButtonGroup.js +3 -11
- package/cjs/Button/IconButton.js +13 -36
- package/cjs/Button/index.js +0 -11
- package/cjs/Button/styles.js +1 -10
- package/cjs/Button/types.js +0 -1
- package/cjs/Card/Card.js +6 -21
- package/cjs/Card/Card.tailwind.js +1 -2
- package/cjs/Card/components/CardHeader.js +1 -14
- package/cjs/Card/components/CardTitle.js +2 -15
- package/cjs/Card/index.js +0 -9
- package/cjs/Checkbox/Checkbox.js +14 -38
- package/cjs/Checkbox/Checkbox.tailwind.js +1 -3
- package/cjs/Checkbox/index.js +0 -5
- package/cjs/ClickAwayContainer/ClickAwayContainer.js +11 -23
- package/cjs/ClickAwayContainer/index.js +0 -2
- package/cjs/DatePicker/DatePicker/DatePicker.js +13 -46
- package/cjs/DatePicker/DatePicker/datePickerReducer.js +0 -15
- package/cjs/DatePicker/DatePicker/index.js +0 -7
- package/cjs/DatePicker/DatePicker.tailwind.js +2 -12
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +29 -72
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -14
- package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +8 -32
- package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +0 -6
- package/cjs/DatePicker/DateRangePicker/index.js +0 -9
- package/cjs/DatePicker/components/Calendar.js +5 -16
- package/cjs/DatePicker/components/Display.js +3 -9
- package/cjs/DatePicker/components/Footer.js +0 -7
- package/cjs/DatePicker/components/FooterActions.js +3 -11
- package/cjs/DatePicker/components/Modal.js +17 -39
- package/cjs/DatePicker/components/NavBar.js +12 -34
- package/cjs/DatePicker/components/SidePanel.js +0 -7
- package/cjs/DatePicker/components/index.js +0 -7
- package/cjs/DatePicker/index.js +0 -9
- package/cjs/DatePicker/utils.js +0 -4
- package/cjs/Dropdown/Dropdown.js +23 -58
- package/cjs/Dropdown/DropdownButton.js +3 -20
- package/cjs/Dropdown/DropdownContext.d.ts +3 -3
- package/cjs/Dropdown/DropdownContext.js +0 -6
- package/cjs/Dropdown/components/DropdownButtonItem.js +6 -21
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -25
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -6
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +3 -3
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -6
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -16
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -15
- package/cjs/Dropdown/components/DropdownCollapsibleItem/index.js +0 -9
- package/cjs/Dropdown/components/DropdownDivider.js +0 -7
- package/cjs/Dropdown/components/DropdownFooterItem.js +2 -15
- package/cjs/Dropdown/components/DropdownLinkItem.js +7 -23
- package/cjs/Dropdown/components/DropdownRadioItem.js +5 -20
- package/cjs/Dropdown/components/DropdownTitle.js +1 -14
- package/cjs/Dropdown/components/DropdownToggleItem.js +6 -22
- package/cjs/Dropdown/index.js +0 -27
- package/cjs/Dropdown/useDropdownItemProps.js +1 -14
- package/cjs/Dropzone/Dropzone.js +27 -62
- package/cjs/Dropzone/index.js +0 -5
- package/cjs/EmptyState/EmptyState.js +12 -23
- package/cjs/EmptyState/EmptyState.tailwind.js +0 -1
- package/cjs/EmptyState/index.js +0 -7
- package/cjs/Field/Field.js +8 -21
- package/cjs/Field/FieldStateContext.js +0 -2
- package/cjs/Field/index.js +0 -9
- package/cjs/Field/useFieldState.js +0 -7
- package/cjs/Flag/Flag.js +17 -40
- package/cjs/Flag/Flag.tailwind.js +0 -1
- package/cjs/Flag/Flags.js +4 -19
- package/cjs/Flag/index.js +0 -9
- package/cjs/FlexGrid/FlexGrid.js +13 -24
- package/cjs/FlexGrid/FlexGrid.tailwind.js +4 -11
- package/cjs/FlexGrid/index.js +0 -5
- package/cjs/HelpUnderline/HelpUnderline.js +5 -14
- package/cjs/HelpUnderline/HelpUnderline.tailwind.js +1 -2
- package/cjs/HelpUnderline/index.js +0 -5
- package/cjs/Input/Input.d.ts +1 -0
- package/cjs/Input/Input.js +27 -70
- package/cjs/Input/Input.tailwind.js +1 -4
- package/cjs/Input/index.js +0 -5
- package/cjs/Insert/Insert.js +7 -17
- package/cjs/Insert/index.js +0 -5
- package/cjs/InstantSearch/InstantSearch.tailwind.js +4 -10
- package/cjs/KeyboardKey/KeyboardKey.js +1 -12
- package/cjs/KeyboardKey/KeyboardKey.tailwind.js +1 -2
- package/cjs/KeyboardKey/index.js +0 -2
- package/cjs/Link/BaseLink.js +2 -12
- package/cjs/Link/ButtonLink.js +3 -17
- package/cjs/Link/IconButtonLink.js +2 -13
- package/cjs/Link/Link.js +6 -23
- package/cjs/Link/index.js +0 -11
- package/cjs/Medallion/Medallion.js +5 -14
- package/cjs/Medallion/Medallion.tailwind.js +3 -6
- package/cjs/Medallion/index.js +0 -7
- package/cjs/Modal/Modal.js +21 -57
- package/cjs/Modal/Modal.tailwind.js +3 -3
- package/cjs/Modal/components/ModalFooter.js +2 -16
- package/cjs/Modal/components/ModalSection.js +3 -11
- package/cjs/Modal/index.js +0 -9
- package/cjs/Pagination/CompactPagination/CompactPagination.js +1 -22
- package/cjs/Pagination/CompactPagination/index.js +0 -5
- package/cjs/Pagination/DotPagination/DotPagination.js +5 -19
- package/cjs/Pagination/DotPagination/index.js +0 -5
- package/cjs/Pagination/Pagination/Pagination.js +9 -34
- package/cjs/Pagination/Pagination/index.js +0 -5
- package/cjs/Pagination/index.js +0 -9
- package/cjs/ProgressBar/ProgressBar.js +3 -16
- package/cjs/ProgressBar/ProgressBar.tailwind.js +1 -3
- package/cjs/ProgressBar/index.js +0 -5
- package/cjs/ProgressSpinner/ProgressSpinner.js +8 -20
- package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +2 -3
- package/cjs/ProgressSpinner/index.js +0 -5
- package/cjs/RadioGroup/RadioButton.js +1 -14
- package/cjs/RadioGroup/RadioButton.tailwind.js +1 -4
- package/cjs/RadioGroup/RadioGroup.js +19 -38
- package/cjs/RadioGroup/RadiogroupContext.js +0 -6
- package/cjs/RadioGroup/index.js +0 -9
- package/cjs/RangeSlider/RangeSlider.js +26 -43
- package/cjs/RangeSlider/RangeSlider.tailwind.js +1 -3
- package/cjs/RangeSlider/index.js +0 -5
- package/cjs/Satellite/Satellite.js +4 -10
- package/cjs/Satellite/SatelliteContext.js +0 -9
- package/cjs/Satellite/SatelliteRouter.js +2 -9
- package/cjs/Satellite/index.js +0 -13
- package/cjs/Satellite/locale.js +1 -7
- package/cjs/Satellite/useCreatePortal.js +3 -8
- package/cjs/ScrollIndicator/ScrollIndicator.js +18 -41
- package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +1 -3
- package/cjs/ScrollIndicator/index.js +0 -5
- package/cjs/Select/Select.js +4 -17
- package/cjs/Select/Select.tailwind.js +2 -5
- package/cjs/Select/index.js +0 -5
- package/cjs/Sidebar/Sidebar.js +11 -30
- package/cjs/Sidebar/SidebarButtonLink.js +10 -30
- package/cjs/Sidebar/SidebarContext.js +0 -6
- package/cjs/Sidebar/SidebarHeader.js +1 -9
- package/cjs/Sidebar/SidebarHeading.js +3 -14
- package/cjs/Sidebar/SidebarLink.js +5 -20
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -11
- package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -14
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +10 -33
- package/cjs/Sidebar/SidebarLinksGroup/index.js +0 -2
- package/cjs/Sidebar/SidebarNav.js +5 -16
- package/cjs/Sidebar/index.js +0 -17
- package/cjs/Switch/Switch.js +15 -36
- package/cjs/Switch/Switch.tailwind.js +1 -2
- package/cjs/Switch/SwitchOption.js +2 -15
- package/cjs/Switch/index.js +0 -7
- package/cjs/Switch/utils.js +0 -9
- package/cjs/Tables/DataTable/DataTable.js +28 -70
- package/cjs/Tables/DataTable/DataTable.tailwind.js +2 -2
- package/cjs/Tables/DataTable/components/Body.js +14 -33
- package/cjs/Tables/DataTable/components/Footer.js +1 -17
- package/cjs/Tables/DataTable/components/Header.js +5 -12
- package/cjs/Tables/DataTable/components/HeaderCell.js +10 -27
- package/cjs/Tables/DataTable/components/Loader.js +4 -17
- package/cjs/Tables/DataTable/components/index.js +0 -10
- package/cjs/Tables/DataTable/index.js +0 -7
- package/cjs/Tables/DataTable/utils.js +0 -9
- package/cjs/Tables/Table/Table.js +7 -21
- package/cjs/Tables/Table/Table.tailwind.js +1 -2
- package/cjs/Tables/Table/components/TableFooter.js +2 -10
- package/cjs/Tables/Table/index.js +0 -7
- package/cjs/Tables/index.js +0 -7
- package/cjs/Tabs/ContentTabs.js +10 -21
- package/cjs/Tabs/LinkTabs.js +5 -18
- package/cjs/Tabs/Tabs.tailwind.js +1 -2
- package/cjs/Tabs/components/LinkTab.js +4 -29
- package/cjs/Tabs/index.js +0 -9
- package/cjs/Tabs/utils.js +0 -5
- package/cjs/Tag/Tag.js +7 -26
- package/cjs/Tag/Tag.tailwind.js +1 -2
- package/cjs/Tag/index.js +0 -5
- package/cjs/TextArea/TextArea.js +1 -14
- package/cjs/TextArea/TextArea.tailwind.js +1 -4
- package/cjs/TextArea/index.js +0 -5
- package/cjs/TextWrap/TextWrap.js +3 -18
- package/cjs/TextWrap/index.js +0 -5
- package/cjs/Toggle/Toggle.js +6 -27
- package/cjs/Toggle/Toggle.tailwind.js +1 -3
- package/cjs/Toggle/index.js +0 -5
- package/cjs/Tooltip/OverflowTooltipWrapper.js +33 -62
- package/cjs/Tooltip/Tooltip.js +4 -17
- package/cjs/Tooltip/Tooltip.tailwind.js +3 -5
- package/cjs/Tooltip/TooltipWrapper.js +45 -73
- package/cjs/Tooltip/index.js +0 -9
- package/cjs/Typography/Typography.tailwind.js +12 -18
- package/cjs/UserContent/UserContent.js +3 -11
- package/cjs/UserContent/UserContent.tailwind.js +2 -11
- package/cjs/index.js +0 -89
- package/cjs/styles/base.tailwind.js +7 -7
- package/cjs/styles/colors.js +7 -7
- package/cjs/styles/disabledColor.js +1 -4
- package/cjs/styles/helpers/icons.js +5 -11
- package/cjs/styles/helpers/makePurgeCssExtractor.js +3 -15
- package/cjs/styles/helpers/makeTailwindPrefixer.js +1 -9
- package/cjs/styles/helpers/prefixTailwindClassName.js +6 -6
- package/cjs/styles/helpers/satellitePrefixer.js +1 -2
- package/cjs/styles/rgba.js +1 -3
- package/cjs/styles/tailwind.config.js +4 -11
- package/cjs/styles/zIndexes.js +1 -0
- package/cjs/utilities/utilities.tailwind.js +0 -3
- package/cjs/utils/event-polyfill.js +0 -2
- package/cjs/utils/formatters.js +12 -19
- package/cjs/utils/genericChangeHandler.js +0 -6
- package/cjs/utils/hashCode.js +0 -5
- package/cjs/utils/index.js +0 -7
- package/cjs/utils/isCssPropertySupported.js +0 -3
- package/cjs/utils/isNil.js +0 -2
- package/cjs/utils/isRenderedChild.js +0 -2
- package/cjs/utils/matchLocation.js +0 -4
- package/cjs/utils/onlyText.js +3 -12
- package/cjs/utils/parseUrl.js +2 -4
- package/cjs/utils/pluralize.js +2 -7
- package/cjs/utils/range.js +0 -2
- package/cjs/utils/toSentenceCase.js +0 -4
- package/cjs/utils/uniqBy.js +0 -4
- package/cjs/utils/uniqueId.js +0 -2
- package/cjs/utils/useForwardedRef.js +0 -6
- package/cjs/utils/useLinkProps.js +1 -13
- package/cjs/utils/useTriggerInputChange.js +2 -4
- package/esm/AnnouncementBadge/AnnouncementBadge.js +7 -14
- package/esm/AutoComplete/AutoComplete.js +68 -158
- package/esm/AutoComplete/AutoComplete.tailwind.js +2 -2
- package/esm/AutoComplete/components/AutoCompleteEmptyState.js +5 -7
- package/esm/AutoComplete/components/DefaultOptionItem.js +2 -8
- package/esm/AutoComplete/utils.js +0 -2
- package/esm/Avatars/ApplicationAvatar.js +3 -6
- package/esm/Avatars/UserAvatar.js +6 -12
- package/esm/Avatars/utils.js +7 -23
- package/esm/Badge/Badge.js +13 -28
- package/esm/Banners/Alert/Alert.js +18 -20
- package/esm/Banners/BigBertha/BigBertha.js +5 -7
- package/esm/Banners/Promote/Promote.js +8 -10
- package/esm/Button/Button.js +14 -22
- package/esm/Button/Button.tailwind.js +3 -2
- package/esm/Button/ButtonGroup.js +3 -6
- package/esm/Button/IconButton.js +13 -23
- package/esm/Button/styles.js +1 -5
- package/esm/Card/Card.js +6 -12
- package/esm/Card/Card.tailwind.js +1 -1
- package/esm/Card/components/CardHeader.js +1 -7
- package/esm/Card/components/CardTitle.js +2 -8
- package/esm/Checkbox/Checkbox.js +14 -28
- package/esm/Checkbox/Checkbox.tailwind.js +1 -1
- package/esm/ClickAwayContainer/ClickAwayContainer.js +11 -13
- package/esm/DatePicker/DatePicker/DatePicker.js +13 -31
- package/esm/DatePicker/DatePicker/datePickerReducer.js +0 -9
- package/esm/DatePicker/DatePicker.tailwind.js +2 -9
- package/esm/DatePicker/DateRangePicker/DateRangePicker.js +29 -55
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -8
- package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +8 -20
- package/esm/DatePicker/components/Calendar.js +5 -10
- package/esm/DatePicker/components/Display.js +3 -5
- package/esm/DatePicker/components/Footer.js +0 -4
- package/esm/DatePicker/components/FooterActions.js +3 -7
- package/esm/DatePicker/components/Modal.js +17 -27
- package/esm/DatePicker/components/NavBar.js +12 -22
- package/esm/DatePicker/components/SidePanel.js +0 -4
- package/esm/Dropdown/Dropdown.js +23 -34
- package/esm/Dropdown/DropdownButton.js +3 -11
- package/esm/Dropdown/DropdownContext.d.ts +3 -3
- package/esm/Dropdown/DropdownContext.js +0 -2
- package/esm/Dropdown/components/DropdownButtonItem.js +6 -12
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -15
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -2
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +3 -3
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -2
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
- package/esm/Dropdown/components/DropdownDivider.js +0 -2
- package/esm/Dropdown/components/DropdownFooterItem.js +2 -8
- package/esm/Dropdown/components/DropdownLinkItem.js +7 -13
- package/esm/Dropdown/components/DropdownRadioItem.js +5 -11
- package/esm/Dropdown/components/DropdownTitle.js +1 -7
- package/esm/Dropdown/components/DropdownToggleItem.js +6 -12
- package/esm/Dropdown/useDropdownItemProps.js +1 -7
- package/esm/Dropzone/Dropzone.js +27 -45
- package/esm/EmptyState/EmptyState.js +12 -16
- package/esm/Field/Field.js +8 -11
- package/esm/Flag/Flag.js +17 -25
- package/esm/Flag/Flags.js +4 -9
- package/esm/FlexGrid/FlexGrid.js +13 -15
- package/esm/FlexGrid/FlexGrid.tailwind.js +4 -9
- package/esm/HelpUnderline/HelpUnderline.js +5 -7
- package/esm/HelpUnderline/HelpUnderline.tailwind.js +1 -1
- package/esm/Input/Input.d.ts +1 -0
- package/esm/Input/Input.js +27 -54
- package/esm/Input/Input.tailwind.js +1 -1
- package/esm/Insert/Insert.js +7 -11
- package/esm/InstantSearch/InstantSearch.tailwind.js +4 -4
- package/esm/KeyboardKey/KeyboardKey.js +1 -3
- package/esm/KeyboardKey/KeyboardKey.tailwind.js +1 -1
- package/esm/Link/BaseLink.js +2 -6
- package/esm/Link/ButtonLink.js +3 -9
- package/esm/Link/IconButtonLink.js +2 -6
- package/esm/Link/Link.js +6 -14
- package/esm/Medallion/Medallion.js +5 -7
- package/esm/Medallion/Medallion.tailwind.js +3 -2
- package/esm/Modal/Modal.js +21 -38
- package/esm/Modal/Modal.tailwind.js +3 -2
- package/esm/Modal/components/ModalFooter.js +2 -8
- package/esm/Modal/components/ModalSection.js +3 -5
- package/esm/Pagination/CompactPagination/CompactPagination.js +1 -9
- package/esm/Pagination/DotPagination/DotPagination.js +5 -11
- package/esm/Pagination/Pagination/Pagination.js +9 -21
- package/esm/ProgressBar/ProgressBar.js +3 -10
- package/esm/ProgressBar/ProgressBar.tailwind.js +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.js +8 -12
- package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +2 -2
- package/esm/RadioGroup/RadioButton.js +1 -7
- package/esm/RadioGroup/RadioButton.tailwind.js +1 -1
- package/esm/RadioGroup/RadioGroup.js +19 -25
- package/esm/RadioGroup/RadiogroupContext.js +0 -2
- package/esm/RangeSlider/RangeSlider.js +26 -35
- package/esm/RangeSlider/RangeSlider.tailwind.js +1 -1
- package/esm/Satellite/Satellite.js +4 -4
- package/esm/Satellite/SatelliteContext.js +0 -3
- package/esm/Satellite/SatelliteRouter.js +2 -4
- package/esm/Satellite/locale.js +1 -2
- package/esm/Satellite/useCreatePortal.js +3 -2
- package/esm/ScrollIndicator/ScrollIndicator.js +18 -31
- package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +1 -1
- package/esm/Select/Select.js +4 -9
- package/esm/Select/Select.tailwind.js +2 -2
- package/esm/Sidebar/Sidebar.js +11 -17
- package/esm/Sidebar/SidebarButtonLink.js +10 -20
- package/esm/Sidebar/SidebarContext.js +0 -2
- package/esm/Sidebar/SidebarHeader.js +1 -3
- package/esm/Sidebar/SidebarHeading.js +3 -7
- package/esm/Sidebar/SidebarLink.js +5 -11
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -4
- package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -7
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +9 -19
- package/esm/Sidebar/SidebarNav.js +5 -9
- package/esm/Switch/Switch.js +15 -24
- package/esm/Switch/Switch.tailwind.js +1 -1
- package/esm/Switch/SwitchOption.js +2 -6
- package/esm/Tables/DataTable/DataTable.js +28 -49
- package/esm/Tables/DataTable/DataTable.tailwind.js +2 -1
- package/esm/Tables/DataTable/components/Body.js +14 -23
- package/esm/Tables/DataTable/components/Footer.js +1 -8
- package/esm/Tables/DataTable/components/Header.js +5 -6
- package/esm/Tables/DataTable/components/HeaderCell.js +10 -17
- package/esm/Tables/DataTable/components/Loader.js +4 -8
- package/esm/Tables/DataTable/utils.js +0 -1
- package/esm/Tables/Table/Table.js +7 -14
- package/esm/Tables/Table/Table.tailwind.js +1 -1
- package/esm/Tables/Table/components/TableFooter.js +2 -4
- package/esm/Tabs/ContentTabs.js +10 -12
- package/esm/Tabs/LinkTabs.js +5 -7
- package/esm/Tabs/Tabs.tailwind.js +1 -1
- package/esm/Tabs/components/LinkTab.js +4 -20
- package/esm/Tabs/utils.js +0 -2
- package/esm/Tag/Tag.js +7 -16
- package/esm/Tag/Tag.tailwind.js +1 -1
- package/esm/TextArea/TextArea.js +1 -7
- package/esm/TextArea/TextArea.tailwind.js +1 -1
- package/esm/TextWrap/TextWrap.js +3 -11
- package/esm/Toggle/Toggle.js +6 -19
- package/esm/Toggle/Toggle.tailwind.js +1 -1
- package/esm/Tooltip/OverflowTooltipWrapper.js +33 -46
- package/esm/Tooltip/Tooltip.js +4 -9
- package/esm/Tooltip/Tooltip.tailwind.js +3 -4
- package/esm/Tooltip/TooltipWrapper.js +44 -57
- package/esm/Typography/Typography.tailwind.js +12 -15
- package/esm/UserContent/UserContent.js +3 -5
- package/esm/UserContent/UserContent.tailwind.js +2 -7
- package/esm/styles/base.tailwind.js +7 -6
- package/esm/styles/colors.js +7 -7
- package/esm/styles/disabledColor.js +1 -2
- package/esm/styles/helpers/icons.js +5 -8
- package/esm/styles/helpers/makePurgeCssExtractor.js +3 -14
- package/esm/styles/helpers/makeTailwindPrefixer.js +1 -6
- package/esm/styles/helpers/prefixTailwindClassName.js +6 -6
- package/esm/styles/helpers/satellitePrefixer.js +1 -1
- package/esm/styles/rgba.js +1 -2
- package/esm/styles/tailwind.config.js +4 -6
- package/esm/styles/zIndexes.js +1 -0
- package/esm/utils/event-polyfill.js +0 -2
- package/esm/utils/formatters.js +12 -16
- package/esm/utils/genericChangeHandler.js +0 -2
- package/esm/utils/hashCode.js +0 -3
- package/esm/utils/isCssPropertySupported.js +0 -2
- package/esm/utils/isRenderedChild.js +0 -1
- package/esm/utils/matchLocation.js +0 -2
- package/esm/utils/onlyText.js +3 -11
- package/esm/utils/parseUrl.js +2 -2
- package/esm/utils/pluralize.js +2 -5
- package/esm/utils/toSentenceCase.js +1 -1
- package/esm/utils/uniqBy.js +0 -2
- package/esm/utils/useForwardedRef.js +0 -3
- package/esm/utils/useLinkProps.js +1 -7
- package/esm/utils/useTriggerInputChange.js +2 -3
- package/package.json +2 -2
- package/satellite.min.css +1 -1
- package/scss/colors.scss +16 -16
package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js
CHANGED
@@ -2,10 +2,8 @@ import { createContext, useContext } from "react";
|
|
2
2
|
export var DropdownCollapsibleItemsGroupContext = /*#__PURE__*/createContext(null);
|
3
3
|
export var useDropdownCollapsibleItemsGroup = function useDropdownCollapsibleItemsGroup() {
|
4
4
|
var context = useContext(DropdownCollapsibleItemsGroupContext);
|
5
|
-
|
6
5
|
if (!context) {
|
7
6
|
throw new Error("useDropdownCollapsibleItemsGroupContext used outside DropdownCollapsibleItemsGroupContext");
|
8
7
|
}
|
9
|
-
|
10
8
|
return context;
|
11
9
|
};
|
package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js
CHANGED
@@ -3,21 +3,18 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import { useState } from "react";
|
4
4
|
import { DropdownCollapsibleItemsGroup } from "./DropdownCollapsibleItemsGroup";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
-
|
7
6
|
/**
|
8
7
|
* Multiple collapsible item can be open at a given time
|
9
8
|
*/
|
10
9
|
export var DropdownCollapsibleItemsMultiGroup = function DropdownCollapsibleItemsMultiGroup(_ref) {
|
11
10
|
var initialExpandedItems = _ref.initialExpandedItems,
|
12
|
-
|
13
|
-
|
11
|
+
children = _ref.children;
|
14
12
|
var _useState = useState(function () {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
return initialExpandedItems !== null && initialExpandedItems !== void 0 ? initialExpandedItems : [];
|
14
|
+
}),
|
15
|
+
_useState2 = _slicedToArray(_useState, 2),
|
16
|
+
expandedItems = _useState2[0],
|
17
|
+
setExpandedItems = _useState2[1];
|
21
18
|
return /*#__PURE__*/_jsx(DropdownCollapsibleItemsGroup, {
|
22
19
|
expandedItems: expandedItems,
|
23
20
|
onItemClick: function onItemClick(name) {
|
package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js
CHANGED
@@ -2,21 +2,18 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useState } from "react";
|
3
3
|
import { DropdownCollapsibleItemsGroup } from "./DropdownCollapsibleItemsGroup";
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
-
|
6
5
|
/**
|
7
6
|
* Only one collapsible item can be open at a given time (unless you manually override)
|
8
7
|
*/
|
9
8
|
export var DropdownCollapsibleItemsSingleGroup = function DropdownCollapsibleItemsSingleGroup(_ref) {
|
10
9
|
var initialExpandedItem = _ref.initialExpandedItem,
|
11
|
-
|
12
|
-
|
10
|
+
children = _ref.children;
|
13
11
|
var _useState = useState(function () {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
return initialExpandedItem ? [initialExpandedItem] : [];
|
13
|
+
}),
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
15
|
+
expandedItems = _useState2[0],
|
16
|
+
setExpandedItems = _useState2[1];
|
20
17
|
return /*#__PURE__*/_jsx(DropdownCollapsibleItemsGroup, {
|
21
18
|
expandedItems: expandedItems,
|
22
19
|
onItemClick: function onItemClick(name) {
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject;
|
4
|
-
|
5
3
|
import stl from "../../styles/helpers/satellitePrefixer";
|
6
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
5
|
export var DropdownDivider = function DropdownDivider() {
|
@@ -1,23 +1,17 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
-
|
5
4
|
var _templateObject;
|
6
|
-
|
7
5
|
var _excluded = ["children", "className"];
|
8
|
-
|
9
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
10
|
-
|
11
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
|
13
8
|
import cx from "clsx";
|
14
9
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
11
|
export var DropdownFooterItem = function DropdownFooterItem(_ref) {
|
17
12
|
var children = _ref.children,
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
className = _ref.className,
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
21
15
|
if (!children) return null;
|
22
16
|
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
|
23
17
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex bg-grey-100 -mb-1 items-center justify-between px-4 py-3 border-t border-grey-200"]))), className)
|
@@ -1,15 +1,10 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3;
|
6
|
-
|
7
5
|
var _excluded = ["toggle", "disabled", "startIcon", "className", "children"];
|
8
|
-
|
9
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
10
|
-
|
11
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
|
13
8
|
import cx from "clsx";
|
14
9
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
10
|
import useLinkProps from "../../utils/useLinkProps";
|
@@ -19,15 +14,14 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
14
|
export var DropdownLinkItem = function DropdownLinkItem(props) {
|
20
15
|
var dropdownItemProps = useDropdownItemProps(props);
|
21
16
|
var linkProps = useLinkProps(_objectSpread(_objectSpread({}, props), dropdownItemProps));
|
22
|
-
|
17
|
+
// `toggle` and `disabled` is destructured here because we don't want them passed to the `a`
|
23
18
|
var _props$dropdownItemPr = _objectSpread(_objectSpread(_objectSpread({}, props), dropdownItemProps), linkProps),
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
19
|
+
toggle = _props$dropdownItemPr.toggle,
|
20
|
+
disabled = _props$dropdownItemPr.disabled,
|
21
|
+
StartIcon = _props$dropdownItemPr.startIcon,
|
22
|
+
className = _props$dropdownItemPr.className,
|
23
|
+
children = _props$dropdownItemPr.children,
|
24
|
+
mergedProps = _objectWithoutProperties(_props$dropdownItemPr, _excluded);
|
31
25
|
return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread({
|
32
26
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex items-center"]))), className)
|
33
27
|
}, mergedProps), {}, {
|
@@ -1,15 +1,10 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3;
|
6
|
-
|
7
5
|
var _excluded = ["className", "toggle", "children"];
|
8
|
-
|
9
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
10
|
-
|
11
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
|
13
8
|
import { RadioButton } from "../../RadioGroup";
|
14
9
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
10
|
import useDropdownItemProps from "../useDropdownItemProps";
|
@@ -17,13 +12,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
18
13
|
export var DropdownRadioItem = function DropdownRadioItem(props) {
|
19
14
|
var dropdownItemProps = useDropdownItemProps(props);
|
20
|
-
|
15
|
+
// `toggle` is destructured here because we don't want it passed to the `RadioButton`
|
21
16
|
var _props$dropdownItemPr = _objectSpread(_objectSpread({}, props), dropdownItemProps),
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
17
|
+
className = _props$dropdownItemPr.className,
|
18
|
+
toggle = _props$dropdownItemPr.toggle,
|
19
|
+
children = _props$dropdownItemPr.children,
|
20
|
+
radioProps = _objectWithoutProperties(_props$dropdownItemPr, _excluded);
|
27
21
|
return /*#__PURE__*/_jsx("label", {
|
28
22
|
className: className,
|
29
23
|
children: /*#__PURE__*/_jsxs("div", {
|
@@ -1,22 +1,16 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
-
|
5
4
|
var _templateObject;
|
6
|
-
|
7
5
|
var _excluded = ["className"];
|
8
|
-
|
9
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
10
|
-
|
11
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
|
13
8
|
import cx from "clsx";
|
14
9
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
11
|
export var DropdownTitle = function DropdownTitle(_ref) {
|
17
12
|
var className = _ref.className,
|
18
|
-
|
19
|
-
|
13
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
20
14
|
return /*#__PURE__*/_jsx("h4", _objectSpread(_objectSpread({}, props), {}, {
|
21
15
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex items-center h-10 px-4\n border-grey-100 border-b border-t first:border-t-0\n display-subheading"]))), className)
|
22
16
|
}));
|
@@ -1,15 +1,10 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
6
|
-
|
7
5
|
var _excluded = ["className", "toggle", "startIcon", "children"];
|
8
|
-
|
9
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
10
|
-
|
11
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
-
|
13
8
|
import cx from "clsx";
|
14
9
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
10
|
import { Toggle } from "../../Toggle";
|
@@ -18,14 +13,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
19
14
|
export var DropdownToggleItem = function DropdownToggleItem(props) {
|
20
15
|
var dropdownItemProps = useDropdownItemProps(props);
|
21
|
-
|
16
|
+
// `toggle` is destructured here because we don't want it passed to the `Toggle`
|
22
17
|
var _props$dropdownItemPr = _objectSpread(_objectSpread({}, props), dropdownItemProps),
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
18
|
+
className = _props$dropdownItemPr.className,
|
19
|
+
toggle = _props$dropdownItemPr.toggle,
|
20
|
+
StartIcon = _props$dropdownItemPr.startIcon,
|
21
|
+
children = _props$dropdownItemPr.children,
|
22
|
+
toggleProps = _objectWithoutProperties(_props$dropdownItemPr, _excluded);
|
29
23
|
return /*#__PURE__*/_jsxs("label", {
|
30
24
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex items-center"]))), className),
|
31
25
|
children: [StartIcon && /*#__PURE__*/_jsx(StartIcon, {
|
@@ -1,19 +1,14 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
-
|
4
3
|
var _templateObject;
|
5
|
-
|
6
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
7
|
-
|
8
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
9
|
-
|
10
6
|
import cx from "clsx";
|
11
7
|
import stl from "../styles/helpers/satellitePrefixer";
|
12
8
|
import { useDropdownContext } from "./DropdownContext";
|
13
9
|
export var useDropdownItemProps = function useDropdownItemProps(props) {
|
14
10
|
var _useDropdownContext = useDropdownContext(),
|
15
|
-
|
16
|
-
|
11
|
+
showMenu = _useDropdownContext.showMenu;
|
17
12
|
var className = cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex items-center\n min-h-10 px-4 text-left\n focus:no-underline hover:no-underline\n ", "\n "])), props.disabled ? "text-grey-300 cursor-not-allowed" : "text-inherit hover:bg-grey-100 focus:bg-grey-100 focus:outline-none cursor-pointer"), props.className);
|
18
13
|
var disabledProps = props.disabled ? {
|
19
14
|
disabled: true,
|
@@ -27,7 +22,6 @@ export var useDropdownItemProps = function useDropdownItemProps(props) {
|
|
27
22
|
if (props.onClick) {
|
28
23
|
props.onClick(evt);
|
29
24
|
}
|
30
|
-
|
31
25
|
if (!evt.defaultPrevented && props.toggle) {
|
32
26
|
showMenu(false);
|
33
27
|
}
|
package/esm/Dropzone/Dropzone.js
CHANGED
@@ -4,13 +4,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
5
5
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
6
6
|
var _excluded = ["id", "placeholder", "disabled", "multiple", "clearable", "onChange", "className", "locale"];
|
7
|
-
|
8
7
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
9
|
-
|
10
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
|
-
|
12
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
13
|
-
|
14
10
|
import cx from "clsx";
|
15
11
|
import { Fragment, useCallback, useMemo, useState } from "react";
|
16
12
|
import { useDropzone } from "react-dropzone";
|
@@ -23,7 +19,6 @@ import { formatHumanSize } from "../utils/formatters";
|
|
23
19
|
import { uniqueId } from "../utils/uniqueId";
|
24
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
25
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
26
|
-
|
27
22
|
var DropzoneFileItem = function DropzoneFileItem(_ref) {
|
28
23
|
var file = _ref.file;
|
29
24
|
return /*#__PURE__*/_jsxs("span", {
|
@@ -31,7 +26,6 @@ var DropzoneFileItem = function DropzoneFileItem(_ref) {
|
|
31
26
|
children: [file.name, " - ", formatHumanSize(file.size)]
|
32
27
|
});
|
33
28
|
};
|
34
|
-
|
35
29
|
var STATUS_CLASSNAMES = {
|
36
30
|
"default": "",
|
37
31
|
invalid: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["input-invalid"]))),
|
@@ -40,72 +34,60 @@ var STATUS_CLASSNAMES = {
|
|
40
34
|
var DEFAULT_DROPZONE_LOCALE = {
|
41
35
|
clearInput: "Clear input"
|
42
36
|
};
|
43
|
-
|
44
37
|
var InvalidIcon = function InvalidIcon() {
|
45
38
|
return /*#__PURE__*/_jsx(X, {
|
46
39
|
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["mr-4 h-4 w-4 text-white bg-red-700 p-px rounded-full"])))
|
47
40
|
});
|
48
41
|
};
|
49
|
-
|
50
42
|
var ValidatedIcon = function ValidatedIcon() {
|
51
43
|
return /*#__PURE__*/_jsx(Check, {
|
52
|
-
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["mr-4 h-4 w-4 text-white bg-accent-
|
44
|
+
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["mr-4 h-4 w-4 text-white bg-accent-600 p-px rounded-full"])))
|
53
45
|
});
|
54
46
|
};
|
55
|
-
|
56
47
|
export var Dropzone = function Dropzone(_ref2) {
|
57
48
|
var id = _ref2.id,
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
49
|
+
placeholder = _ref2.placeholder,
|
50
|
+
disabled = _ref2.disabled,
|
51
|
+
_ref2$multiple = _ref2.multiple,
|
52
|
+
multiple = _ref2$multiple === void 0 ? false : _ref2$multiple,
|
53
|
+
_ref2$clearable = _ref2.clearable,
|
54
|
+
clearable = _ref2$clearable === void 0 ? false : _ref2$clearable,
|
55
|
+
onChange = _ref2.onChange,
|
56
|
+
className = _ref2.className,
|
57
|
+
propsLocale = _ref2.locale,
|
58
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
69
59
|
var contextLocale = useLocale("dropzone");
|
70
|
-
|
71
60
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_DROPZONE_LOCALE), contextLocale), propsLocale);
|
72
|
-
|
73
61
|
var _useState = useState([]),
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
62
|
+
_useState2 = _slicedToArray(_useState, 2),
|
63
|
+
files = _useState2[0],
|
64
|
+
setFiles = _useState2[1];
|
78
65
|
var _useState3 = useState(false),
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
66
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
67
|
+
focused = _useState4[0],
|
68
|
+
setFocused = _useState4[1];
|
83
69
|
var _useFieldState = useFieldState(),
|
84
|
-
|
85
|
-
|
70
|
+
status = _useFieldState.status;
|
86
71
|
var onDrop = useCallback(function (acceptedFiles, fileRejections) {
|
87
72
|
var updatedFiles = multiple ? [].concat(_toConsumableArray(files), _toConsumableArray(acceptedFiles)) : acceptedFiles;
|
88
73
|
setFiles(updatedFiles);
|
89
74
|
onChange === null || onChange === void 0 ? void 0 : onChange(updatedFiles, fileRejections);
|
90
75
|
}, [multiple, files, onChange]);
|
91
|
-
|
92
76
|
var handleClear = function handleClear(evt) {
|
93
77
|
evt.stopPropagation();
|
94
78
|
setFiles([]);
|
95
79
|
onChange === null || onChange === void 0 ? void 0 : onChange([], []);
|
96
80
|
};
|
97
|
-
|
98
81
|
var _useDropzone = useDropzone(_objectSpread(_objectSpread({
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
82
|
+
disabled: disabled,
|
83
|
+
multiple: multiple
|
84
|
+
}, props), {}, {
|
85
|
+
onDrop: onDrop
|
86
|
+
})),
|
87
|
+
getRootProps = _useDropzone.getRootProps,
|
88
|
+
getInputProps = _useDropzone.getInputProps,
|
89
|
+
isDragActive = _useDropzone.isDragActive,
|
90
|
+
isDragReject = _useDropzone.isDragReject;
|
109
91
|
var dropzoneId = useMemo(function () {
|
110
92
|
return id !== null && id !== void 0 ? id : uniqueId("dropzone");
|
111
93
|
}, [id]);
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
4
|
-
|
5
3
|
import cx from "clsx";
|
6
4
|
import FlexGrid from "../FlexGrid";
|
7
5
|
import stl from "../styles/helpers/satellitePrefixer";
|
@@ -44,20 +42,19 @@ var ACTIONS_CONTEXT_CLASSNAMES = {
|
|
44
42
|
feature: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["mt-3"]))),
|
45
43
|
page: stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["mt-6 md:flex-row"])))
|
46
44
|
};
|
47
|
-
|
48
45
|
var renderEmptyState = function renderEmptyState(_ref) {
|
49
46
|
var title = _ref.title,
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
47
|
+
description = _ref.description,
|
48
|
+
actions = _ref.actions,
|
49
|
+
actionsDirection = _ref.actionsDirection,
|
50
|
+
medallion = _ref.medallion,
|
51
|
+
illustration = _ref.illustration,
|
52
|
+
_ref$usageContext = _ref.usageContext,
|
53
|
+
usageContext = _ref$usageContext === void 0 ? "feature" : _ref$usageContext,
|
54
|
+
_ref$width = _ref.width,
|
55
|
+
width = _ref$width === void 0 ? "medium" : _ref$width,
|
56
|
+
_ref$centered = _ref.centered,
|
57
|
+
centered = _ref$centered === void 0 ? false : _ref$centered;
|
61
58
|
var containerClassNames = cx(stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["flex items-center"]))), CONTAINER_CONTEXT_CLASSNAMES[usageContext][width], centered ? stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["justify-center text-center lg:flex-col"]))) : stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["justify-between flex-col lg:flex-row"]))));
|
62
59
|
var titleClassNames = cx(stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["text-grey-900"]))), TITLE_CONTEXT_CLASSNAMES[usageContext]);
|
63
60
|
var descriptionClassNames = cx(stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["text-grey-600"]))), DESCRIPTION_CONTEXT_CLASSNAMES[usageContext]);
|
@@ -89,6 +86,7 @@ var renderEmptyState = function renderEmptyState(_ref) {
|
|
89
86
|
})]
|
90
87
|
});
|
91
88
|
};
|
89
|
+
|
92
90
|
/**
|
93
91
|
* Empty states are used when a list, table, chart or page has no items or data to show. This is an opportunity to provide explanation or guidance to help users progress. This can also be shown when a features hasn't been enable.
|
94
92
|
*
|
@@ -113,8 +111,6 @@ var renderEmptyState = function renderEmptyState(_ref) {
|
|
113
111
|
* - Use illustrations thoughtfully
|
114
112
|
* - Use only one primary call-to-action button
|
115
113
|
*/
|
116
|
-
|
117
|
-
|
118
114
|
export var EmptyState = function EmptyState(props) {
|
119
115
|
return renderEmptyState(props);
|
120
116
|
};
|
package/esm/Field/Field.js
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
4
|
-
|
5
3
|
import cx from "clsx";
|
6
4
|
import { AlertCircle } from "react-feather";
|
7
5
|
import stl from "../styles/helpers/satellitePrefixer";
|
8
6
|
import FieldStateContext, { DEFAULT_STATE } from "./FieldStateContext";
|
9
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
11
|
-
|
12
9
|
/**
|
13
10
|
* Use text fields to help users enter, select, and search for text. Text fields are normally found within a form but can also be part of a modal, search, or card
|
14
11
|
*
|
@@ -45,14 +42,14 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
45
42
|
*/
|
46
43
|
export var Field = function Field(_ref) {
|
47
44
|
var className = _ref.className,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
45
|
+
label = _ref.label,
|
46
|
+
labelFor = _ref.labelFor,
|
47
|
+
description = _ref.description,
|
48
|
+
_ref$state = _ref.state,
|
49
|
+
state = _ref$state === void 0 ? DEFAULT_STATE : _ref$state,
|
50
|
+
_ref$inline = _ref.inline,
|
51
|
+
inline = _ref$inline === void 0 ? false : _ref$inline,
|
52
|
+
children = _ref.children;
|
56
53
|
return /*#__PURE__*/_jsx(FieldStateContext.Provider, {
|
57
54
|
value: state,
|
58
55
|
children: /*#__PURE__*/_jsxs("div", {
|
package/esm/Flag/Flag.js
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
|
6
|
-
|
7
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
8
|
-
|
9
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
10
|
-
|
11
7
|
import cx from "clsx";
|
12
8
|
import { useEffect, useRef, useState } from "react";
|
13
9
|
import { Check, X } from "react-feather";
|
@@ -24,40 +20,37 @@ var DEFAULT_FLAG_LOCALE = {
|
|
24
20
|
var VARIANT_CLASSNAMES = {
|
25
21
|
grey: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["bg-grey-500"]))),
|
26
22
|
accent: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["bg-accent-500"]))),
|
27
|
-
blue: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["bg-blue-
|
28
|
-
green: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-green-
|
23
|
+
blue: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["bg-blue-600"]))),
|
24
|
+
green: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-green-600"]))),
|
29
25
|
orange: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["bg-orange-500"]))),
|
30
26
|
red: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["bg-red-500"])))
|
31
27
|
};
|
32
28
|
var VARIANT_SPINNER_CLASSNAMES = {
|
33
29
|
grey: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["border-grey-500"]))),
|
34
30
|
accent: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["border-accent-500"]))),
|
35
|
-
blue: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border-blue-
|
36
|
-
green: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["border-green-
|
31
|
+
blue: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["border-blue-600"]))),
|
32
|
+
green: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["border-green-600"]))),
|
37
33
|
orange: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["border-orange-500"]))),
|
38
34
|
red: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["border-red-500"])))
|
39
35
|
};
|
40
36
|
export var Flag = function Flag(_ref) {
|
41
37
|
var onDismiss = _ref.onDismiss,
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
38
|
+
title = _ref.title,
|
39
|
+
_ref$icon = _ref.icon,
|
40
|
+
Icon = _ref$icon === void 0 ? Check : _ref$icon,
|
41
|
+
_ref$loading = _ref.loading,
|
42
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
43
|
+
_ref$variant = _ref.variant,
|
44
|
+
variant = _ref$variant === void 0 ? "accent" : _ref$variant,
|
45
|
+
autoDismissAfter = _ref.autoDismissAfter,
|
46
|
+
propsLocale = _ref.locale,
|
47
|
+
children = _ref.children;
|
52
48
|
var contextLocale = useLocale("flag");
|
53
|
-
|
54
49
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_FLAG_LOCALE), contextLocale), propsLocale);
|
55
|
-
|
56
50
|
var _useState = useState(false),
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
52
|
+
hovered = _useState2[0],
|
53
|
+
setHovered = _useState2[1];
|
61
54
|
var onDismissRef = useRef();
|
62
55
|
onDismissRef.current = onDismiss;
|
63
56
|
var hasTitle = title !== undefined;
|
@@ -65,7 +58,6 @@ export var Flag = function Flag(_ref) {
|
|
65
58
|
if (!autoDismissAfter || hovered) return;
|
66
59
|
var timer = setTimeout(function () {
|
67
60
|
var _onDismissRef$current;
|
68
|
-
|
69
61
|
(_onDismissRef$current = onDismissRef.current) === null || _onDismissRef$current === void 0 ? void 0 : _onDismissRef$current.call(onDismissRef);
|
70
62
|
}, autoDismissAfter);
|
71
63
|
return function () {
|
package/esm/Flag/Flags.js
CHANGED
@@ -2,19 +2,16 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["content", "id"];
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
7
|
-
|
8
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
9
|
-
|
10
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
11
|
-
|
12
8
|
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
13
9
|
import { useCreatePortal } from "../Satellite";
|
14
10
|
import stl from "../styles/helpers/satellitePrefixer";
|
15
11
|
import Flag from "./Flag";
|
16
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
17
13
|
var TRANSITION_TIMEOUT = 500;
|
14
|
+
|
18
15
|
/**
|
19
16
|
* Use flags for messages containing confirmations, alerts, and acknowledgments that require minimal user interaction. These event-driven messages appear at the bottom of the screen and overlay any content.
|
20
17
|
* For critical messaging about loss of data or functionality, please use banners.
|
@@ -52,19 +49,17 @@ var TRANSITION_TIMEOUT = 500;
|
|
52
49
|
*
|
53
50
|
* When there are multiple flags, they will stack on top of one another with the most recent flag on top. When a user dismisses a flag, any older flags 'below' will come to the top. Careful consideration should be taken to take into account the ordering and priority of flags in the stack. Never use dismissible and non-dismissible flags in a stack as flags that automatically dismiss can do so and not be visible to the user.
|
54
51
|
*/
|
55
|
-
|
56
52
|
export var Flags = function Flags(_ref) {
|
57
53
|
var _ref$notifications = _ref.notifications,
|
58
|
-
|
54
|
+
notifications = _ref$notifications === void 0 ? [] : _ref$notifications;
|
59
55
|
var createPortal = useCreatePortal();
|
60
56
|
return createPortal( /*#__PURE__*/_jsx(TransitionGroup, {
|
61
57
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["z-notification bottom-0 right-0 fixed flex flex-col items-end p-4"]))),
|
62
58
|
component: "ul",
|
63
59
|
children: notifications.map(function (_ref2) {
|
64
60
|
var content = _ref2.content,
|
65
|
-
|
66
|
-
|
67
|
-
|
61
|
+
id = _ref2.id,
|
62
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
68
63
|
return /*#__PURE__*/_jsx(CSSTransition, {
|
69
64
|
classNames: {
|
70
65
|
enter: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["flags_item-enter"]))),
|