@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
@@ -1,14 +1,10 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
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
|
-
import { uniqueId } from "lodash";
|
7
|
+
import uniqueId from "lodash/uniqueId";
|
12
8
|
import { useEffect, useMemo, useState } from "react";
|
13
9
|
import { ChevronRight } from "react-feather";
|
14
10
|
import usePrevious from "react-use/lib/usePrevious";
|
@@ -18,18 +14,15 @@ import { ActiveLinkIndicator } from "./ActiveLinkIndicator";
|
|
18
14
|
import { SidebarGroupLink } from "./SidebarGroupLink";
|
19
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
20
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
21
|
-
|
22
17
|
var isCollapsibleSidebarLinksGroupProps = function isCollapsibleSidebarLinksGroupProps(props) {
|
23
18
|
return "title" in props && "icon" in props;
|
24
19
|
};
|
25
|
-
|
26
20
|
export var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
27
21
|
var _useSidebarContext = useSidebarContext(),
|
28
|
-
|
29
|
-
|
22
|
+
isLinkActive = _useSidebarContext.isLinkActive;
|
30
23
|
var id = props.id,
|
31
|
-
|
32
|
-
|
24
|
+
className = props.className,
|
25
|
+
links = props.links;
|
33
26
|
var contentId = useMemo(function () {
|
34
27
|
return uniqueId("links-group-");
|
35
28
|
}, []);
|
@@ -38,19 +31,16 @@ export var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
|
38
31
|
});
|
39
32
|
var previousActiveLinkIndex = usePrevious(activeLinkIndex);
|
40
33
|
var hasMatchingLink = activeLinkIndex >= 0;
|
41
|
-
|
42
34
|
var _useState = useState(!isCollapsibleSidebarLinksGroupProps(props) || hasMatchingLink || props.initialIsOpen !== false),
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
35
|
+
_useState2 = _slicedToArray(_useState, 2),
|
36
|
+
isOpen = _useState2[0],
|
37
|
+
setIsOpen = _useState2[1];
|
47
38
|
useEffect(function () {
|
48
39
|
if (isCollapsibleSidebarLinksGroupProps(props)) {
|
49
40
|
var _props$onGroupToggle;
|
50
|
-
|
51
41
|
(_props$onGroupToggle = props.onGroupToggle) === null || _props$onGroupToggle === void 0 ? void 0 : _props$onGroupToggle.call(props, isOpen);
|
52
|
-
}
|
53
|
-
|
42
|
+
}
|
43
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
54
44
|
}, [isOpen]);
|
55
45
|
useEffect(function () {
|
56
46
|
if (!isOpen && activeLinkIndex >= 0 && typeof previousActiveLinkIndex === "number" && activeLinkIndex !== previousActiveLinkIndex) {
|
@@ -1,21 +1,17 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject;
|
4
|
-
|
5
3
|
import { Children } from "react";
|
6
4
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
5
|
import { useSidebarContext } from "./SidebarContext";
|
8
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
7
|
export var SidebarNav = function SidebarNav(_ref) {
|
10
8
|
var id = _ref.id,
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
className = _ref.className,
|
10
|
+
spacingProp = _ref.spacing,
|
11
|
+
label = _ref.label,
|
12
|
+
children = _ref.children;
|
16
13
|
var _useSidebarContext = useSidebarContext(),
|
17
|
-
|
18
|
-
|
14
|
+
variant = _useSidebarContext.variant;
|
19
15
|
var spacing = typeof spacingProp === "string" ? spacingProp : variant === "primary" ? "small" : "large";
|
20
16
|
return /*#__PURE__*/_jsx("nav", {
|
21
17
|
id: id,
|
package/esm/Switch/Switch.js
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
|
-
|
4
3
|
var _templateObject, _templateObject2;
|
5
|
-
|
6
4
|
import cx from "clsx";
|
7
5
|
import { useLayoutEffect, useRef, useState } from "react";
|
8
6
|
import { BUTTON_SIZE_CLASSNAMES } from "../Button/styles";
|
@@ -14,43 +12,37 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
13
|
export var Switch = function Switch(_ref) {
|
16
14
|
var className = _ref.className,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
15
|
+
children = _ref.children,
|
16
|
+
value = _ref.value,
|
17
|
+
onChange = _ref.onChange,
|
18
|
+
disabled = _ref.disabled,
|
19
|
+
name = _ref.name,
|
20
|
+
_ref$size = _ref.size,
|
21
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
25
22
|
var _useState = useState(function () {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
23
|
+
return uniqueId("SwitchName-");
|
24
|
+
}),
|
25
|
+
_useState2 = _slicedToArray(_useState, 1),
|
26
|
+
componentDefaultName = _useState2[0];
|
31
27
|
var radioName = name !== null && name !== void 0 ? name : componentDefaultName;
|
32
28
|
var containerRef = useRef(null);
|
33
29
|
var valueIndicatorRef = useRef(null);
|
34
|
-
|
35
30
|
var _useState3 = useState(),
|
36
|
-
|
37
|
-
|
38
|
-
|
31
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
32
|
+
valueIndicatorStyle = _useState4[0],
|
33
|
+
setValueIndicatorStyle = _useState4[1];
|
34
|
+
|
39
35
|
/**
|
40
36
|
* Positionning might be affected by different changes (changes in options order/number/label size, widget size etc),
|
41
37
|
* so we want to recompute things on every render. To avoid infinite loops, we check if the style
|
42
38
|
* actually changed before applying it.
|
43
39
|
*/
|
44
40
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
45
|
-
|
46
|
-
|
47
41
|
useLayoutEffect(function () {
|
48
42
|
var targetEl = document.querySelector(buildAnimationKeySelector(radioName, value));
|
49
|
-
|
50
43
|
if (!targetEl || !valueIndicatorRef.current || !containerRef.current) {
|
51
44
|
return setValueIndicatorStyle(undefined);
|
52
45
|
}
|
53
|
-
|
54
46
|
var containerRect = containerRef.current.getBoundingClientRect();
|
55
47
|
var targetRect = targetEl.getBoundingClientRect();
|
56
48
|
var newValueIndicatorStyle = {
|
@@ -61,7 +53,6 @@ export var Switch = function Switch(_ref) {
|
|
61
53
|
transitionDuration: "200ms",
|
62
54
|
transitionTimingFunction: "ease-in-out"
|
63
55
|
};
|
64
|
-
|
65
56
|
if (newValueIndicatorStyle.transform !== (valueIndicatorStyle === null || valueIndicatorStyle === void 0 ? void 0 : valueIndicatorStyle.transform) || newValueIndicatorStyle.width !== (valueIndicatorStyle === null || valueIndicatorStyle === void 0 ? void 0 : valueIndicatorStyle.width)) {
|
66
57
|
setValueIndicatorStyle(newValueIndicatorStyle);
|
67
58
|
}
|
@@ -3,7 +3,7 @@ import _plugin from "tailwindcss/plugin";
|
|
3
3
|
var plugin = _plugin;
|
4
4
|
var switchPlugin = plugin(function (_ref) {
|
5
5
|
var addComponents = _ref.addComponents,
|
6
|
-
|
6
|
+
theme = _ref.theme;
|
7
7
|
addComponents({
|
8
8
|
".switch": {
|
9
9
|
// this + position relative helps create a new stack context (helps with z-index)
|
@@ -1,12 +1,8 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
-
|
4
3
|
var _templateObject, _templateObject2;
|
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 { useRadioGroupContext } from "../RadioGroup";
|
11
7
|
import stl from "../styles/helpers/satellitePrefixer";
|
12
8
|
import { OverflowTooltipWrapper } from "../Tooltip/OverflowTooltipWrapper";
|
@@ -15,8 +11,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
16
12
|
export var SwitchOption = function SwitchOption(_ref) {
|
17
13
|
var value = _ref.value,
|
18
|
-
|
19
|
-
|
14
|
+
disabled = _ref.disabled,
|
15
|
+
children = _ref.children;
|
20
16
|
var context = useRadioGroupContext();
|
21
17
|
var checked = context.value === value;
|
22
18
|
var inputDisabled = context.disabled || disabled;
|
@@ -2,13 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
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 compact from "lodash/compact";
|
13
9
|
import get from "lodash/get";
|
14
10
|
import { useEffect, useState } from "react";
|
@@ -34,10 +30,10 @@ var DEFAULT_DATATABLE_LOCALE = {
|
|
34
30
|
errorTitle: "Error",
|
35
31
|
errorDescription: "An error occurred while loading data."
|
36
32
|
};
|
37
|
-
|
38
33
|
var DEFAULT_GET_ITEM_ID = function DEFAULT_GET_ITEM_ID(_, idx) {
|
39
34
|
return String(idx);
|
40
35
|
};
|
36
|
+
|
41
37
|
/**
|
42
38
|
* Tables are used to structure content in a grid to make it easier to see relationships and to facilitate understanding.
|
43
39
|
*
|
@@ -57,50 +53,42 @@ var DEFAULT_GET_ITEM_ID = function DEFAULT_GET_ITEM_ID(_, idx) {
|
|
57
53
|
* - If a cell is empty or unavailable, keep the cell empty to reduce noise and help with legibility.
|
58
54
|
* - Truncate long text to make it fit into a cell. However, choose column width wisely based on expected values, and adjust the table accordingly
|
59
55
|
*/
|
60
|
-
|
61
|
-
|
62
56
|
export var DataTable = function DataTable(_ref) {
|
63
57
|
var data = _ref.data,
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
58
|
+
itemId = _ref.itemId,
|
59
|
+
columns = _ref.columns,
|
60
|
+
onChange = _ref.onChange,
|
61
|
+
_ref$status = _ref.status,
|
62
|
+
status = _ref$status === void 0 ? "success" : _ref$status,
|
63
|
+
noDataContent = _ref.noDataContent,
|
64
|
+
errorContent = _ref.errorContent,
|
65
|
+
_ref$sorting = _ref.sorting,
|
66
|
+
sorting = _ref$sorting === void 0 ? [] : _ref$sorting,
|
67
|
+
_ref$pagination = _ref.pagination,
|
68
|
+
pagination = _ref$pagination === void 0 ? false : _ref$pagination,
|
69
|
+
_ref$selectMode = _ref.selectMode,
|
70
|
+
selectMode = _ref$selectMode === void 0 ? "none" : _ref$selectMode,
|
71
|
+
selection = _ref.selection,
|
72
|
+
onSelectionChange = _ref.onSelectionChange,
|
73
|
+
canSelectItem = _ref.canSelectItem,
|
74
|
+
canHoverRow = _ref.canHoverRow,
|
75
|
+
onRowHoveredChanged = _ref.onRowHoveredChanged,
|
76
|
+
propsLocale = _ref.locale;
|
83
77
|
var contextLocale = useLocale("dataTable");
|
84
|
-
|
85
78
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_DATATABLE_LOCALE), contextLocale), propsLocale);
|
86
|
-
|
87
79
|
if (process.env.NODE_ENV !== "production") {
|
88
80
|
var _selection$length;
|
89
|
-
|
90
81
|
if (itemId === undefined && (sorting.length > 0 || selectMode !== "none")) {
|
91
82
|
console.warn("You did not provide a custom `itemId` function, but you have defined `sorting` and/or `selectMode`. This can lead to unexpected results.");
|
92
83
|
}
|
93
|
-
|
94
84
|
if (selectMode === "single" && ((_selection$length = selection === null || selection === void 0 ? void 0 : selection.length) !== null && _selection$length !== void 0 ? _selection$length : 0) > 1) {
|
95
85
|
console.warn("You can only have one selected item at a time in single `selectMode`.");
|
96
86
|
}
|
97
87
|
}
|
98
|
-
|
99
88
|
var _useState = useState(),
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
89
|
+
_useState2 = _slicedToArray(_useState, 2),
|
90
|
+
hoveredRowId = _useState2[0],
|
91
|
+
setHoveredRowId = _useState2[1];
|
104
92
|
useEffect(function () {
|
105
93
|
// Reset hovered row when data changes to avoid inconsistent state
|
106
94
|
setHoveredRowId(undefined);
|
@@ -145,7 +133,8 @@ export var DataTable = function DataTable(_ref) {
|
|
145
133
|
var isChecked = selectionLength === dataLength;
|
146
134
|
var isIndeterminate = selectionLength > 0 && selectionLength !== dataLength;
|
147
135
|
return /*#__PURE__*/_jsx(Checkbox, {
|
148
|
-
"aria-label": locale.selectAllButton
|
136
|
+
"aria-label": locale.selectAllButton
|
137
|
+
// Small hack to position the checkbox in the center of the header
|
149
138
|
,
|
150
139
|
className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["absolute mb-2.5"]))),
|
151
140
|
checked: isChecked,
|
@@ -169,7 +158,6 @@ export var DataTable = function DataTable(_ref) {
|
|
169
158
|
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["w-3"])))
|
170
159
|
}].concat(_toConsumableArray(columns.map(function (c) {
|
171
160
|
var _c$Header;
|
172
|
-
|
173
161
|
return typeof c === "string" ? {
|
174
162
|
id: c,
|
175
163
|
accessor: c,
|
@@ -181,7 +169,6 @@ export var DataTable = function DataTable(_ref) {
|
|
181
169
|
var getItemIdInternal = itemId || DEFAULT_GET_ITEM_ID;
|
182
170
|
var rows = data.map(function (item, index) {
|
183
171
|
var _ref4;
|
184
|
-
|
185
172
|
var id = typeof getItemIdInternal === "string" ? String(get(item, getItemIdInternal, DEFAULT_GET_ITEM_ID(item, index))) : getItemIdInternal(item, index);
|
186
173
|
var hovered = hoveredRowId === id;
|
187
174
|
var sanitizedSelection = (_ref4 = selectMode === "single" ? selection === null || selection === void 0 ? void 0 : selection.slice(0, 1) : selectMode === "none" ? [] : selection) !== null && _ref4 !== void 0 ? _ref4 : [];
|
@@ -197,32 +184,26 @@ export var DataTable = function DataTable(_ref) {
|
|
197
184
|
});
|
198
185
|
var internalSorting = computedColumns.map(function (c) {
|
199
186
|
var _sorting$find$, _sorting$find;
|
200
|
-
|
201
187
|
return [c.id, c.sort ? (_sorting$find$ = (_sorting$find = sorting.find(function (_ref5) {
|
202
188
|
var _ref6 = _slicedToArray(_ref5, 1),
|
203
|
-
|
204
|
-
|
189
|
+
columnId = _ref6[0];
|
205
190
|
return columnId === c.id;
|
206
191
|
})) === null || _sorting$find === void 0 ? void 0 : _sorting$find[1]) !== null && _sorting$find$ !== void 0 ? _sorting$find$ : "desc" : "none"];
|
207
192
|
});
|
208
|
-
|
209
193
|
var shouldRenderPagination = function shouldRenderPagination() {
|
210
194
|
if (isDeterminatePagination(pagination)) return pagination && pagination.totalItemsCount > 0;
|
211
195
|
if (isIndeterminatePagination(pagination)) return pagination && data.length > 0;
|
212
196
|
return false;
|
213
197
|
};
|
214
|
-
|
215
198
|
var onRowHoverChange = function onRowHoverChange(row) {
|
216
199
|
setHoveredRowId(row === null || row === void 0 ? void 0 : row.id);
|
217
200
|
onRowHoveredChanged === null || onRowHoveredChanged === void 0 ? void 0 : onRowHoveredChanged(row);
|
218
201
|
};
|
219
|
-
|
220
202
|
var onToggleSort = function onToggleSort(columnId, direction) {
|
221
203
|
var newSorting = internalSorting.map(function (_ref7) {
|
222
204
|
var _ref8 = _slicedToArray(_ref7, 2),
|
223
|
-
|
224
|
-
|
225
|
-
|
205
|
+
colId = _ref8[0],
|
206
|
+
d = _ref8[1];
|
226
207
|
return columnId === colId ? [columnId, direction] : [colId, d];
|
227
208
|
});
|
228
209
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
@@ -230,11 +211,9 @@ export var DataTable = function DataTable(_ref) {
|
|
230
211
|
sorting: newSorting
|
231
212
|
});
|
232
213
|
};
|
233
|
-
|
234
214
|
var handlePaginationChange = function handlePaginationChange(dataConfiguration) {
|
235
215
|
return onChange === null || onChange === void 0 ? void 0 : onChange(dataConfiguration);
|
236
216
|
};
|
237
|
-
|
238
217
|
return /*#__PURE__*/_jsxs("div", {
|
239
218
|
className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["relative"]))),
|
240
219
|
children: [status === "loading" && /*#__PURE__*/_jsx("div", {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import _plugin from "tailwindcss/plugin";
|
2
2
|
// purgecss whitelist: th, td, tr
|
3
|
+
|
3
4
|
var plugin = _plugin;
|
4
5
|
var datatablePlugin = plugin(function (_ref) {
|
5
6
|
var addComponents = _ref.addComponents,
|
6
|
-
|
7
|
+
theme = _ref.theme;
|
7
8
|
addComponents({
|
8
9
|
".datatable": {
|
9
10
|
th: {
|
@@ -1,13 +1,9 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3;
|
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 EmptyState from "../../../EmptyState";
|
12
8
|
import stl from "../../../styles/helpers/satellitePrefixer";
|
13
9
|
import { getCellValue } from "../utils";
|
@@ -15,21 +11,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
11
|
import { createElement as _createElement } from "react";
|
16
12
|
export var Body = function Body(_ref) {
|
17
13
|
var rows = _ref.rows,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
14
|
+
columns = _ref.columns,
|
15
|
+
status = _ref.status,
|
16
|
+
noDataContent = _ref.noDataContent,
|
17
|
+
errorContent = _ref.errorContent,
|
18
|
+
selectMode = _ref.selectMode,
|
19
|
+
_ref$selection = _ref.selection,
|
20
|
+
selection = _ref$selection === void 0 ? [] : _ref$selection,
|
21
|
+
onSelectionChange = _ref.onSelectionChange,
|
22
|
+
onRowHoverChange = _ref.onRowHoverChange,
|
23
|
+
_ref$canHoverRow = _ref.canHoverRow,
|
24
|
+
canHoverRow = _ref$canHoverRow === void 0 ? function () {
|
25
|
+
return true;
|
26
|
+
} : _ref$canHoverRow,
|
27
|
+
locale = _ref.locale;
|
33
28
|
var handleRowSelection = function handleRowSelection(row) {
|
34
29
|
if (!onSelectionChange) return;
|
35
30
|
var rowId = row.id;
|
@@ -39,7 +34,6 @@ export var Body = function Body(_ref) {
|
|
39
34
|
}) : selectMode === "multi" ? [].concat(_toConsumableArray(selection), [rowId]) : [rowId];
|
40
35
|
onSelectionChange(newSelection);
|
41
36
|
};
|
42
|
-
|
43
37
|
var additionalRowProps = function additionalRowProps(row) {
|
44
38
|
return _objectSpread(_objectSpread({}, canHoverRow(row) ? {
|
45
39
|
onMouseEnter: function onMouseEnter() {
|
@@ -57,7 +51,6 @@ export var Body = function Body(_ref) {
|
|
57
51
|
}
|
58
52
|
});
|
59
53
|
};
|
60
|
-
|
61
54
|
if (status === "error") {
|
62
55
|
return /*#__PURE__*/_jsx("tbody", {
|
63
56
|
children: /*#__PURE__*/_jsx("tr", {
|
@@ -76,7 +69,6 @@ export var Body = function Body(_ref) {
|
|
76
69
|
})
|
77
70
|
});
|
78
71
|
}
|
79
|
-
|
80
72
|
if (rows.length === 0 && status !== "loading") {
|
81
73
|
return /*#__PURE__*/_jsx("tbody", {
|
82
74
|
children: /*#__PURE__*/_jsx("tr", {
|
@@ -95,7 +87,6 @@ export var Body = function Body(_ref) {
|
|
95
87
|
})
|
96
88
|
});
|
97
89
|
}
|
98
|
-
|
99
90
|
return /*#__PURE__*/_jsx("tbody", {
|
100
91
|
children: rows.map(function (row, rowIndex) {
|
101
92
|
return /*#__PURE__*/_createElement("tr", _objectSpread(_objectSpread({}, additionalRowProps(row)), {}, {
|
@@ -1,15 +1,12 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
import Pagination, { CompactPagination } from "../../../Pagination";
|
8
5
|
import { isDeterminatePagination, isIndeterminatePagination } from "../utils";
|
9
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
7
|
export var Footer = function Footer(_ref) {
|
11
8
|
var pagination = _ref.pagination,
|
12
|
-
|
9
|
+
onChange = _ref.onChange;
|
13
10
|
return isDeterminatePagination(pagination) ? /*#__PURE__*/_jsx(Pagination, {
|
14
11
|
nbPages: Math.ceil(pagination.totalItemsCount / pagination.itemsPerPage),
|
15
12
|
currentPage: pagination.currentPage,
|
@@ -18,11 +15,9 @@ export var Footer = function Footer(_ref) {
|
|
18
15
|
function onChange(_x) {
|
19
16
|
return _onChange.apply(this, arguments);
|
20
17
|
}
|
21
|
-
|
22
18
|
onChange.toString = function () {
|
23
19
|
return _onChange.toString();
|
24
20
|
};
|
25
|
-
|
26
21
|
return onChange;
|
27
22
|
}(function (page) {
|
28
23
|
return onChange({
|
@@ -41,11 +36,9 @@ export var Footer = function Footer(_ref) {
|
|
41
36
|
function onChange(_x2) {
|
42
37
|
return _onChange2.apply(this, arguments);
|
43
38
|
}
|
44
|
-
|
45
39
|
onChange.toString = function () {
|
46
40
|
return _onChange2.toString();
|
47
41
|
};
|
48
|
-
|
49
42
|
return onChange;
|
50
43
|
}(function (page) {
|
51
44
|
return onChange({
|
@@ -3,18 +3,17 @@ import HeaderCell from "./HeaderCell";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
4
|
export var Header = function Header(_ref) {
|
5
5
|
var columns = _ref.columns,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
_ref$sorting = _ref.sorting,
|
7
|
+
sorting = _ref$sorting === void 0 ? [] : _ref$sorting,
|
8
|
+
onToggleSort = _ref.onToggleSort,
|
9
|
+
disabled = _ref.disabled;
|
10
10
|
return /*#__PURE__*/_jsx("thead", {
|
11
11
|
children: /*#__PURE__*/_jsx("tr", {
|
12
12
|
children: columns.map(function (column) {
|
13
13
|
var Header = column.Header;
|
14
14
|
var sortingDirection = sorting.find(function (_ref2) {
|
15
15
|
var _ref3 = _slicedToArray(_ref2, 1),
|
16
|
-
|
17
|
-
|
16
|
+
colId = _ref3[0];
|
18
17
|
return colId === column.id;
|
19
18
|
}) || [null];
|
20
19
|
return /*#__PURE__*/_jsx(HeaderCell, {
|
@@ -2,13 +2,9 @@ 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 = ["sortingDirection", "onToggleSort", "column", "disabled", "children"];
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
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 cx from "clsx";
|
13
9
|
import { ChevronDown, ChevronUp } from "react-feather";
|
14
10
|
import stl from "../../../styles/helpers/satellitePrefixer";
|
@@ -17,24 +13,21 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
13
|
var iconClassName = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["h-4 inline ml-1"])));
|
18
14
|
export var HeaderCell = function HeaderCell(_ref) {
|
19
15
|
var _ref$sortingDirection = _ref.sortingDirection,
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
16
|
+
sortingDirection = _ref$sortingDirection === void 0 ? "none" : _ref$sortingDirection,
|
17
|
+
onToggleSort = _ref.onToggleSort,
|
18
|
+
_ref$column = _ref.column,
|
19
|
+
id = _ref$column.id,
|
20
|
+
className = _ref$column.className,
|
21
|
+
_ref$column$sort = _ref$column.sort,
|
22
|
+
sort = _ref$column$sort === void 0 ? false : _ref$column$sort,
|
23
|
+
disabled = _ref.disabled,
|
24
|
+
children = _ref.children,
|
25
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
31
26
|
var InternalCellComponent = sort && !disabled ? "button" : "span";
|
32
|
-
|
33
27
|
var handleSorting = function handleSorting() {
|
34
28
|
if (disabled) return;
|
35
29
|
onToggleSort(id, sortingDirection === "desc" ? "asc" : sortingDirection === "asc" ? "none" : "desc");
|
36
30
|
};
|
37
|
-
|
38
31
|
var sortButtonProps = sort ? {
|
39
32
|
onClick: function onClick() {
|
40
33
|
return handleSorting();
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
|
-
|
4
3
|
var _templateObject;
|
5
|
-
|
6
4
|
import { useEffect, useState } from "react";
|
7
5
|
import EmptyState from "../../../EmptyState";
|
8
6
|
import ProgressSpinner from "../../../ProgressSpinner";
|
@@ -10,13 +8,11 @@ import stl from "../../../styles/helpers/satellitePrefixer";
|
|
10
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
9
|
export var Loader = function Loader(_ref) {
|
12
10
|
var className = _ref.className,
|
13
|
-
|
14
|
-
|
11
|
+
locale = _ref.locale;
|
15
12
|
var _useState = useState(false),
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
_useState2 = _slicedToArray(_useState, 2),
|
14
|
+
showLoadMessage = _useState2[0],
|
15
|
+
setShowLoadMessage = _useState2[1];
|
20
16
|
useEffect(function () {
|
21
17
|
// See https://github.com/algolia/AlgoliaWeb/blob/develop/_client/src/common/components/AsyncWrapper/AsyncWrapper.tsx#L56
|
22
18
|
var loadTimer = setTimeout(function () {
|