@algolia/satellite 1.0.0-beta.164 → 1.0.0-beta.166
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.d.ts +3 -3
- package/cjs/AnnouncementBadge/AnnouncementBadge.js +4 -6
- package/cjs/AnnouncementBadge/index.js +2 -2
- package/cjs/AutoComplete/AutoComplete.d.ts +3 -49
- package/cjs/AutoComplete/AutoComplete.js +362 -516
- package/cjs/AutoComplete/AutoComplete.tailwind.d.ts +1 -1
- package/cjs/AutoComplete/components/AutoCompleteEmptyState.js +2 -4
- package/cjs/AutoComplete/components/AutocompleteContext.d.ts +5 -0
- package/cjs/AutoComplete/components/AutocompleteContext.js +19 -0
- package/cjs/AutoComplete/components/DefaultOptionItem.d.ts +2 -2
- package/cjs/AutoComplete/components/DefaultOptionItem.js +4 -5
- package/cjs/AutoComplete/index.d.ts +1 -0
- package/cjs/AutoComplete/index.js +14 -2
- package/cjs/AutoComplete/types.d.ts +10 -2
- package/cjs/AutoComplete/utils.d.ts +3 -0
- package/cjs/AutoComplete/utils.js +36 -6
- package/cjs/Avatars/ApplicationAvatar.js +2 -4
- package/cjs/Avatars/UserAvatar.js +4 -6
- package/cjs/Avatars/index.js +2 -2
- package/cjs/Avatars/utils.js +9 -13
- package/cjs/Badge/Badge.d.ts +0 -2
- package/cjs/Badge/Badge.js +6 -7
- package/cjs/Badge/index.js +2 -2
- package/cjs/Banners/Alert/Alert.d.ts +2 -2
- package/cjs/Banners/Alert/Alert.js +4 -5
- package/cjs/Banners/Alert/index.js +2 -2
- package/cjs/Banners/BigBertha/BigBertha.js +2 -4
- package/cjs/Banners/BigBertha/index.js +2 -2
- package/cjs/Banners/Promote/Promote.d.ts +0 -6
- package/cjs/Banners/Promote/Promote.js +2 -10
- package/cjs/Banners/Promote/index.js +2 -2
- package/cjs/Button/Button.js +4 -6
- package/cjs/Button/Button.tailwind.d.ts +1 -1
- package/cjs/Button/Button.tailwind.js +1 -1
- package/cjs/Button/ButtonGroup.d.ts +1 -1
- package/cjs/Button/ButtonGroup.js +2 -4
- package/cjs/Button/IconButton.d.ts +5 -0
- package/cjs/Button/IconButton.js +9 -6
- package/cjs/Button/PolymorphicButton.js +9 -8
- package/cjs/Button/PolymorphicIconButton.d.ts +5 -1
- package/cjs/Button/PolymorphicIconButton.js +14 -13
- package/cjs/Button/index.js +2 -2
- package/cjs/Button/styles.d.ts +1 -1
- package/cjs/Button/styles.js +8 -9
- package/cjs/Button/types.d.ts +3 -2
- package/cjs/Card/Card.d.ts +1 -1
- package/cjs/Card/Card.js +4 -6
- package/cjs/Card/Card.tailwind.d.ts +1 -1
- package/cjs/Card/components/CardHeader.js +4 -6
- package/cjs/Card/components/CardTitle.js +4 -6
- package/cjs/Card/index.js +2 -2
- package/cjs/Checkbox/Checkbox.d.ts +3 -3
- package/cjs/Checkbox/Checkbox.js +6 -8
- package/cjs/Checkbox/Checkbox.tailwind.d.ts +1 -1
- package/cjs/Checkbox/Checkbox.tailwind.js +5 -0
- package/cjs/Checkbox/index.js +2 -2
- package/cjs/ClickAwayContainer/ClickAwayContainer.js +5 -9
- package/cjs/DatePicker/DatePicker/DatePicker.d.ts +1 -1
- package/cjs/DatePicker/DatePicker/DatePicker.js +11 -12
- package/cjs/DatePicker/DatePicker/datePickerReducer.js +8 -11
- package/cjs/DatePicker/DatePicker/index.js +2 -2
- package/cjs/DatePicker/DatePicker.tailwind.d.ts +1 -1
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +5 -7
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +1 -2
- package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +8 -11
- package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +4 -7
- package/cjs/DatePicker/DateRangePicker/index.js +2 -2
- package/cjs/DatePicker/components/Calendar.js +3 -4
- package/cjs/DatePicker/components/Display.js +1 -2
- package/cjs/DatePicker/components/Footer.js +1 -2
- package/cjs/DatePicker/components/FooterActions.js +1 -2
- package/cjs/DatePicker/components/Modal.js +4 -6
- package/cjs/DatePicker/components/NavBar.js +3 -4
- package/cjs/DatePicker/components/SidePanel.js +1 -2
- package/cjs/DatePicker/index.d.ts +0 -1
- package/cjs/DatePicker/index.js +2 -17
- package/cjs/DatePicker/utils.js +3 -5
- package/cjs/Dropdown/Dropdown.js +5 -8
- package/cjs/Dropdown/DropdownButton.js +4 -6
- package/cjs/Dropdown/DropdownContext.js +3 -6
- package/cjs/Dropdown/components/DropdownButtonItem.d.ts +1 -1
- package/cjs/Dropdown/components/DropdownButtonItem.js +6 -7
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +3 -5
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -3
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +3 -5
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +2 -3
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +2 -3
- package/cjs/Dropdown/components/DropdownDivider.js +2 -4
- package/cjs/Dropdown/components/DropdownFooterItem.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownFooterItem.js +4 -6
- package/cjs/Dropdown/components/DropdownLinkItem.js +6 -7
- package/cjs/Dropdown/components/DropdownRadioItem.js +4 -6
- package/cjs/Dropdown/components/DropdownTitle.js +4 -6
- package/cjs/Dropdown/components/DropdownToggleItem.js +6 -7
- package/cjs/Dropdown/index.js +2 -2
- package/cjs/Dropdown/useDropdownItemProps.js +4 -6
- package/cjs/Dropzone/Dropzone.js +6 -8
- package/cjs/Dropzone/index.js +2 -2
- package/cjs/EmptyState/EmptyState.js +26 -28
- package/cjs/EmptyState/EmptyState.tailwind.d.ts +1 -1
- package/cjs/EmptyState/index.js +2 -2
- package/cjs/EmptyState/types.d.ts +8 -23
- package/cjs/Field/Field.d.ts +0 -1
- package/cjs/Field/Field.js +4 -6
- package/cjs/Field/FieldStateContext.js +3 -6
- package/cjs/Field/index.js +2 -2
- package/cjs/Field/useFieldState.js +4 -6
- package/cjs/Flag/Flag.js +5 -7
- package/cjs/Flag/Flag.tailwind.d.ts +1 -1
- package/cjs/Flag/Flags.js +8 -9
- package/cjs/Flag/index.js +2 -2
- package/cjs/FlexGrid/FlexGrid.d.ts +1 -12
- package/cjs/FlexGrid/FlexGrid.js +2 -4
- package/cjs/FlexGrid/FlexGrid.tailwind.d.ts +1 -1
- package/cjs/FlexGrid/FlexGrid.tailwind.js +2 -2
- package/cjs/FlexGrid/index.js +2 -2
- package/cjs/HelpUnderline/HelpUnderline.js +4 -6
- package/cjs/HelpUnderline/HelpUnderline.tailwind.d.ts +1 -1
- package/cjs/HelpUnderline/index.js +2 -2
- package/cjs/Input/Input.d.ts +4 -1
- package/cjs/Input/Input.js +11 -11
- package/cjs/Input/Input.tailwind.d.ts +1 -1
- package/cjs/Input/index.js +2 -2
- package/cjs/Insert/Insert.js +2 -4
- package/cjs/Insert/index.js +2 -2
- package/cjs/InstantSearch/InstantSearch.tailwind.d.ts +1 -1
- package/cjs/KeyboardKey/KeyboardKey.js +2 -3
- package/cjs/KeyboardKey/KeyboardKey.tailwind.d.ts +1 -1
- package/cjs/Link/BaseLink.js +4 -6
- package/cjs/Link/ButtonLink.js +4 -6
- package/cjs/Link/IconButtonLink.js +4 -6
- package/cjs/Link/Link.js +8 -8
- package/cjs/Link/index.js +2 -2
- package/cjs/Medallion/Medallion.d.ts +1 -0
- package/cjs/Medallion/Medallion.js +2 -4
- package/cjs/Medallion/Medallion.tailwind.d.ts +1 -1
- package/cjs/Medallion/index.js +2 -2
- package/cjs/Modal/Modal.js +12 -13
- package/cjs/Modal/Modal.tailwind.d.ts +1 -1
- package/cjs/Modal/components/ModalFooter.js +4 -6
- package/cjs/Modal/components/ModalSection.js +2 -4
- package/cjs/Modal/index.js +2 -2
- package/cjs/Pagination/CompactPagination/CompactPagination.js +6 -10
- package/cjs/Pagination/CompactPagination/index.js +2 -2
- package/cjs/Pagination/DotPagination/DotPagination.js +5 -7
- package/cjs/Pagination/DotPagination/index.js +2 -2
- package/cjs/Pagination/Pagination/Pagination.js +6 -8
- package/cjs/Pagination/Pagination/index.js +2 -2
- package/cjs/Pagination/index.js +2 -2
- package/cjs/Popover/Popover.d.ts +5 -0
- package/cjs/Popover/Popover.js +137 -0
- package/cjs/Popover/index.d.ts +3 -0
- package/cjs/Popover/index.js +36 -0
- package/cjs/Popover/types.d.ts +74 -0
- package/cjs/Popover/types.js +5 -0
- package/cjs/ProgressBar/ProgressBar.d.ts +7 -4
- package/cjs/ProgressBar/ProgressBar.js +29 -22
- package/cjs/ProgressBar/ProgressBar.tailwind.d.ts +1 -1
- package/cjs/ProgressBar/index.js +2 -2
- package/cjs/ProgressSpinner/ProgressSpinner.js +4 -6
- package/cjs/ProgressSpinner/ProgressSpinner.tailwind.d.ts +1 -1
- package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +8 -0
- package/cjs/ProgressSpinner/index.js +2 -2
- package/cjs/RadioGroup/RadioButton.d.ts +1 -1
- package/cjs/RadioGroup/RadioButton.js +4 -6
- package/cjs/RadioGroup/RadioButton.tailwind.d.ts +1 -1
- package/cjs/RadioGroup/RadioButton.tailwind.js +3 -0
- package/cjs/RadioGroup/RadioGroup.d.ts +1 -0
- package/cjs/RadioGroup/RadioGroup.js +3 -6
- package/cjs/RadioGroup/RadiogroupContext.d.ts +1 -4
- package/cjs/RadioGroup/RadiogroupContext.js +3 -5
- package/cjs/RadioGroup/index.js +2 -2
- package/cjs/RangeSlider/RangeSlider.d.ts +2 -0
- package/cjs/RangeSlider/RangeSlider.js +4 -6
- package/cjs/RangeSlider/index.js +2 -2
- package/cjs/Satellite/Satellite.js +5 -7
- package/cjs/Satellite/SatelliteContext.js +5 -8
- package/cjs/Satellite/SatelliteRouter.js +2 -4
- package/cjs/Satellite/index.js +2 -2
- package/cjs/Satellite/locale.d.ts +2 -0
- package/cjs/Satellite/locale.js +2 -3
- package/cjs/Satellite/useCreatePortal.js +2 -3
- package/cjs/ScrollIndicator/ScrollIndicator.js +2 -4
- package/cjs/ScrollIndicator/ScrollIndicator.tailwind.d.ts +1 -1
- package/cjs/ScrollIndicator/index.js +2 -2
- package/cjs/Select/Select.js +4 -6
- package/cjs/Select/Select.tailwind.d.ts +1 -1
- package/cjs/Select/index.js +2 -2
- package/cjs/Separator/Separator.d.ts +1 -0
- package/cjs/Separator/Separator.js +21 -11
- package/cjs/Separator/Separator.tailwind.d.ts +1 -1
- package/cjs/Separator/Separator.tailwind.js +31 -2
- package/cjs/Separator/index.js +2 -2
- package/cjs/Sidebar/Sidebar.d.ts +1 -0
- package/cjs/Sidebar/Sidebar.js +4 -5
- package/cjs/Sidebar/SidebarButtonLink.js +4 -5
- package/cjs/Sidebar/SidebarContext.js +3 -5
- package/cjs/Sidebar/SidebarHeader.d.ts +1 -0
- package/cjs/Sidebar/SidebarHeader.js +2 -3
- package/cjs/Sidebar/SidebarHeading.d.ts +1 -0
- package/cjs/Sidebar/SidebarHeading.js +2 -3
- package/cjs/Sidebar/SidebarLink.js +4 -5
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +1 -0
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +3 -4
- package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +4 -5
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +1 -0
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -8
- package/cjs/Sidebar/SidebarNav.d.ts +1 -0
- package/cjs/Sidebar/SidebarNav.js +2 -3
- package/cjs/Switch/Switch.d.ts +1 -0
- package/cjs/Switch/Switch.js +5 -5
- package/cjs/Switch/Switch.tailwind.d.ts +1 -1
- package/cjs/Switch/SwitchOption.js +5 -7
- package/cjs/Switch/index.js +2 -2
- package/cjs/Switch/utils.js +5 -9
- package/cjs/Tables/DataTable/DataTable.d.ts +8 -1
- package/cjs/Tables/DataTable/DataTable.js +6 -8
- package/cjs/Tables/DataTable/DataTable.tailwind.d.ts +1 -1
- package/cjs/Tables/DataTable/components/Body.js +4 -6
- package/cjs/Tables/DataTable/components/Footer.js +6 -8
- package/cjs/Tables/DataTable/components/Header.js +2 -4
- package/cjs/Tables/DataTable/components/HeaderCell.js +6 -8
- package/cjs/Tables/DataTable/components/Loader.d.ts +1 -0
- package/cjs/Tables/DataTable/components/Loader.js +3 -5
- package/cjs/Tables/DataTable/index.js +2 -2
- package/cjs/Tables/DataTable/types.d.ts +14 -0
- package/cjs/Tables/DataTable/utils.js +4 -7
- package/cjs/Tables/Table/Table.js +4 -6
- package/cjs/Tables/Table/Table.tailwind.d.ts +1 -1
- package/cjs/Tables/Table/components/TableFooter.js +2 -4
- package/cjs/Tables/Table/index.js +2 -2
- package/cjs/Tables/index.js +2 -2
- package/cjs/Tabs/ContentTabs.js +2 -4
- package/cjs/Tabs/LinkTabs.js +3 -6
- package/cjs/Tabs/Tabs.tailwind.d.ts +1 -1
- package/cjs/Tabs/Tabs.tailwind.js +20 -1
- package/cjs/Tabs/components/LinkTab.js +12 -14
- package/cjs/Tabs/index.js +2 -2
- package/cjs/Tabs/types.d.ts +0 -1
- package/cjs/Tabs/utils.js +2 -3
- package/cjs/Tag/Tag.d.ts +7 -17
- package/cjs/Tag/Tag.js +16 -12
- package/cjs/Tag/Tag.tailwind.d.ts +1 -1
- package/cjs/Tag/index.js +2 -2
- package/cjs/TextArea/TextArea.js +4 -6
- package/cjs/TextArea/TextArea.tailwind.d.ts +1 -1
- package/cjs/TextArea/index.js +2 -2
- package/cjs/TextWrap/TextWrap.js +4 -6
- package/cjs/TextWrap/index.js +2 -2
- package/cjs/Toggle/Toggle.d.ts +6 -2
- package/cjs/Toggle/Toggle.js +26 -13
- package/cjs/Toggle/Toggle.tailwind.d.ts +1 -1
- package/cjs/Toggle/Toggle.tailwind.js +18 -6
- package/cjs/Toggle/index.js +2 -2
- package/cjs/Tooltip/OverflowTooltipWrapper.js +4 -5
- package/cjs/Tooltip/Tooltip.d.ts +1 -1
- package/cjs/Tooltip/Tooltip.js +4 -6
- package/cjs/Tooltip/Tooltip.tailwind.d.ts +1 -1
- package/cjs/Tooltip/Tooltip.tailwind.js +1 -91
- package/cjs/Tooltip/TooltipWrapper.d.ts +2 -2
- package/cjs/Tooltip/TooltipWrapper.js +7 -8
- package/cjs/Tooltip/index.js +2 -2
- package/cjs/Tooltip/types.d.ts +15 -15
- package/cjs/Tooltip/utils.js +2 -3
- package/cjs/Typography/Typography.tailwind.d.ts +1 -1
- package/cjs/Typography/Typography.tailwind.js +2 -2
- package/cjs/UserContent/UserContent.d.ts +1 -0
- package/cjs/UserContent/UserContent.js +2 -4
- package/cjs/UserContent/UserContent.tailwind.d.ts +1 -1
- package/cjs/UserContent/UserContent.tailwind.js +2 -2
- package/cjs/styles/base.tailwind.d.ts +1 -1
- package/cjs/styles/helpers/makePurgeCssExtractor.js +1 -1
- package/cjs/styles/tailwind.config.js +3 -3
- package/cjs/styles/zIndexes.d.ts +1 -0
- package/cjs/styles/zIndexes.js +4 -3
- package/cjs/types.d.ts +3 -4
- package/cjs/utilities/overlay.tailwind.d.ts +5 -0
- package/cjs/utilities/overlay.tailwind.js +107 -0
- package/cjs/utilities/utilities.tailwind.d.ts +1 -1
- package/cjs/utils/clamp.d.ts +1 -0
- package/cjs/utils/clamp.js +9 -0
- package/cjs/utils/genericChangeHandler.js +1 -2
- package/cjs/utils/hashCode.js +2 -4
- package/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/cjs/utils/isCssPropertySupported.js +1 -2
- package/cjs/utils/isNil.js +2 -4
- package/cjs/utils/isReactText.js +2 -3
- package/cjs/utils/isRenderedChild.js +1 -2
- package/cjs/utils/matchLocation.js +1 -2
- package/cjs/utils/onlyText.js +1 -2
- package/cjs/utils/parseUrl.js +2 -4
- package/cjs/utils/pluralize.js +1 -2
- package/cjs/utils/prefersReducedMotion.d.ts +6 -0
- package/cjs/utils/prefersReducedMotion.js +13 -0
- package/cjs/utils/range.js +1 -2
- package/cjs/utils/toSentenceCase.js +2 -4
- package/cjs/utils/uniqBy.js +1 -2
- package/cjs/utils/uniqueId.js +1 -2
- package/cjs/utils/useForwardedRef.js +1 -2
- package/cjs/utils/useLinkProps.js +2 -4
- package/cjs/utils/useTriggerInputChange.js +1 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +3 -3
- package/esm/AnnouncementBadge/AnnouncementBadge.js +2 -2
- package/esm/AutoComplete/AutoComplete.d.ts +3 -49
- package/esm/AutoComplete/AutoComplete.js +365 -517
- package/esm/AutoComplete/AutoComplete.tailwind.d.ts +1 -1
- package/esm/AutoComplete/components/AutocompleteContext.d.ts +5 -0
- package/esm/AutoComplete/components/AutocompleteContext.js +13 -0
- package/esm/AutoComplete/components/DefaultOptionItem.d.ts +2 -2
- package/esm/AutoComplete/components/DefaultOptionItem.js +2 -2
- package/esm/AutoComplete/index.d.ts +1 -0
- package/esm/AutoComplete/index.js +1 -0
- package/esm/AutoComplete/types.d.ts +10 -2
- package/esm/AutoComplete/utils.d.ts +3 -0
- package/esm/AutoComplete/utils.js +31 -1
- package/esm/Avatars/UserAvatar.js +2 -2
- package/esm/Avatars/utils.js +2 -2
- package/esm/Badge/Badge.d.ts +0 -2
- package/esm/Badge/Badge.js +4 -3
- package/esm/Banners/Alert/Alert.d.ts +2 -2
- package/esm/Banners/Alert/Alert.js +2 -1
- package/esm/Banners/Promote/Promote.d.ts +0 -6
- package/esm/Banners/Promote/Promote.js +0 -6
- package/esm/Button/Button.js +2 -2
- package/esm/Button/Button.tailwind.d.ts +1 -1
- package/esm/Button/Button.tailwind.js +1 -1
- package/esm/Button/ButtonGroup.d.ts +1 -1
- package/esm/Button/IconButton.d.ts +5 -0
- package/esm/Button/IconButton.js +7 -2
- package/esm/Button/PolymorphicButton.js +6 -4
- package/esm/Button/PolymorphicIconButton.d.ts +5 -1
- package/esm/Button/PolymorphicIconButton.js +13 -11
- package/esm/Button/styles.d.ts +1 -1
- package/esm/Button/styles.js +3 -0
- package/esm/Button/types.d.ts +3 -2
- package/esm/Card/Card.d.ts +1 -1
- package/esm/Card/Card.js +2 -2
- package/esm/Card/Card.tailwind.d.ts +1 -1
- package/esm/Card/components/CardHeader.js +2 -2
- package/esm/Card/components/CardTitle.js +2 -2
- package/esm/Checkbox/Checkbox.d.ts +3 -3
- package/esm/Checkbox/Checkbox.js +4 -4
- package/esm/Checkbox/Checkbox.tailwind.d.ts +1 -1
- package/esm/Checkbox/Checkbox.tailwind.js +5 -0
- package/esm/ClickAwayContainer/ClickAwayContainer.js +1 -1
- package/esm/DatePicker/DatePicker/DatePicker.d.ts +1 -1
- package/esm/DatePicker/DatePicker/DatePicker.js +9 -9
- package/esm/DatePicker/DatePicker/datePickerReducer.js +5 -5
- package/esm/DatePicker/DatePicker.tailwind.d.ts +1 -1
- package/esm/DatePicker/DateRangePicker/DateRangePicker.js +3 -3
- package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +5 -5
- package/esm/DatePicker/components/Calendar.js +2 -2
- package/esm/DatePicker/components/Modal.js +2 -2
- package/esm/DatePicker/components/NavBar.js +2 -2
- package/esm/DatePicker/index.d.ts +0 -1
- package/esm/DatePicker/index.js +0 -1
- package/esm/Dropdown/Dropdown.js +2 -2
- package/esm/Dropdown/DropdownButton.js +2 -2
- package/esm/Dropdown/components/DropdownButtonItem.d.ts +1 -1
- package/esm/Dropdown/components/DropdownButtonItem.js +4 -3
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +1 -1
- package/esm/Dropdown/components/DropdownFooterItem.d.ts +1 -0
- package/esm/Dropdown/components/DropdownFooterItem.js +2 -2
- package/esm/Dropdown/components/DropdownLinkItem.js +4 -3
- package/esm/Dropdown/components/DropdownRadioItem.js +2 -2
- package/esm/Dropdown/components/DropdownTitle.js +2 -2
- package/esm/Dropdown/components/DropdownToggleItem.js +4 -3
- package/esm/Dropdown/useDropdownItemProps.js +2 -2
- package/esm/Dropzone/Dropzone.js +4 -4
- package/esm/EmptyState/EmptyState.js +24 -24
- package/esm/EmptyState/EmptyState.tailwind.d.ts +1 -1
- package/esm/EmptyState/types.d.ts +8 -23
- package/esm/Field/Field.d.ts +0 -1
- package/esm/Flag/Flag.js +3 -3
- package/esm/Flag/Flag.tailwind.d.ts +1 -1
- package/esm/Flag/Flags.js +6 -5
- package/esm/FlexGrid/FlexGrid.d.ts +1 -12
- package/esm/FlexGrid/FlexGrid.tailwind.d.ts +1 -1
- package/esm/FlexGrid/FlexGrid.tailwind.js +2 -2
- package/esm/HelpUnderline/HelpUnderline.js +2 -2
- package/esm/HelpUnderline/HelpUnderline.tailwind.d.ts +1 -1
- package/esm/Input/Input.d.ts +4 -1
- package/esm/Input/Input.js +9 -7
- package/esm/Input/Input.tailwind.d.ts +1 -1
- package/esm/InstantSearch/InstantSearch.tailwind.d.ts +1 -1
- package/esm/KeyboardKey/KeyboardKey.tailwind.d.ts +1 -1
- package/esm/Link/BaseLink.js +2 -2
- package/esm/Link/ButtonLink.js +2 -2
- package/esm/Link/IconButtonLink.js +2 -2
- package/esm/Link/Link.js +6 -4
- package/esm/Medallion/Medallion.d.ts +1 -0
- package/esm/Medallion/Medallion.tailwind.d.ts +1 -1
- package/esm/Modal/Modal.js +8 -7
- package/esm/Modal/Modal.tailwind.d.ts +1 -1
- package/esm/Modal/components/ModalFooter.js +2 -2
- package/esm/Pagination/CompactPagination/CompactPagination.js +2 -2
- package/esm/Pagination/DotPagination/DotPagination.js +3 -3
- package/esm/Pagination/Pagination/Pagination.js +2 -2
- package/esm/Popover/Popover.d.ts +5 -0
- package/esm/Popover/Popover.js +129 -0
- package/esm/Popover/index.d.ts +3 -0
- package/esm/Popover/index.js +3 -0
- package/esm/Popover/types.d.ts +74 -0
- package/esm/Popover/types.js +1 -0
- package/esm/ProgressBar/ProgressBar.d.ts +7 -4
- package/esm/ProgressBar/ProgressBar.js +24 -18
- package/esm/ProgressBar/ProgressBar.tailwind.d.ts +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.js +2 -2
- package/esm/ProgressSpinner/ProgressSpinner.tailwind.d.ts +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +8 -0
- package/esm/RadioGroup/RadioButton.d.ts +1 -1
- package/esm/RadioGroup/RadioButton.js +2 -2
- package/esm/RadioGroup/RadioButton.tailwind.d.ts +1 -1
- package/esm/RadioGroup/RadioButton.tailwind.js +3 -0
- package/esm/RadioGroup/RadioGroup.d.ts +1 -0
- package/esm/RadioGroup/RadiogroupContext.d.ts +1 -4
- package/esm/RangeSlider/RangeSlider.d.ts +2 -0
- package/esm/RangeSlider/RangeSlider.js +2 -2
- package/esm/Satellite/Satellite.js +4 -4
- package/esm/Satellite/SatelliteContext.js +2 -2
- package/esm/Satellite/locale.d.ts +2 -0
- package/esm/ScrollIndicator/ScrollIndicator.tailwind.d.ts +1 -1
- package/esm/Select/Select.js +2 -2
- package/esm/Select/Select.tailwind.d.ts +1 -1
- package/esm/Separator/Separator.d.ts +1 -0
- package/esm/Separator/Separator.js +17 -5
- package/esm/Separator/Separator.tailwind.d.ts +1 -1
- package/esm/Separator/Separator.tailwind.js +31 -2
- package/esm/Sidebar/Sidebar.d.ts +1 -0
- package/esm/Sidebar/Sidebar.js +2 -2
- package/esm/Sidebar/SidebarButtonLink.js +2 -2
- package/esm/Sidebar/SidebarHeader.d.ts +1 -0
- package/esm/Sidebar/SidebarHeading.d.ts +1 -0
- package/esm/Sidebar/SidebarLink.js +2 -2
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +1 -0
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +1 -1
- package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +2 -2
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +1 -0
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +6 -5
- package/esm/Sidebar/SidebarNav.d.ts +1 -0
- package/esm/Switch/Switch.d.ts +1 -0
- package/esm/Switch/Switch.js +3 -1
- package/esm/Switch/Switch.tailwind.d.ts +1 -1
- package/esm/Switch/SwitchOption.js +3 -3
- package/esm/Tables/DataTable/DataTable.d.ts +8 -1
- package/esm/Tables/DataTable/DataTable.js +4 -4
- package/esm/Tables/DataTable/DataTable.tailwind.d.ts +1 -1
- package/esm/Tables/DataTable/components/Body.js +2 -2
- package/esm/Tables/DataTable/components/Footer.js +2 -2
- package/esm/Tables/DataTable/components/HeaderCell.js +4 -4
- package/esm/Tables/DataTable/components/Loader.d.ts +1 -0
- package/esm/Tables/DataTable/components/Loader.js +1 -1
- package/esm/Tables/DataTable/types.d.ts +14 -0
- package/esm/Tables/Table/Table.js +2 -2
- package/esm/Tables/Table/Table.tailwind.d.ts +1 -1
- package/esm/Tabs/Tabs.tailwind.d.ts +1 -1
- package/esm/Tabs/Tabs.tailwind.js +20 -1
- package/esm/Tabs/components/LinkTab.js +10 -10
- package/esm/Tabs/types.d.ts +0 -1
- package/esm/Tag/Tag.d.ts +7 -17
- package/esm/Tag/Tag.js +14 -8
- package/esm/Tag/Tag.tailwind.d.ts +1 -1
- package/esm/TextArea/TextArea.js +2 -2
- package/esm/TextArea/TextArea.tailwind.d.ts +1 -1
- package/esm/TextWrap/TextWrap.js +2 -2
- package/esm/Toggle/Toggle.d.ts +6 -2
- package/esm/Toggle/Toggle.js +24 -9
- package/esm/Toggle/Toggle.tailwind.d.ts +1 -1
- package/esm/Toggle/Toggle.tailwind.js +18 -6
- package/esm/Tooltip/OverflowTooltipWrapper.js +2 -2
- package/esm/Tooltip/Tooltip.d.ts +1 -1
- package/esm/Tooltip/Tooltip.js +2 -2
- package/esm/Tooltip/Tooltip.tailwind.d.ts +1 -1
- package/esm/Tooltip/Tooltip.tailwind.js +1 -90
- package/esm/Tooltip/TooltipWrapper.d.ts +2 -2
- package/esm/Tooltip/TooltipWrapper.js +3 -3
- package/esm/Tooltip/types.d.ts +15 -15
- package/esm/Typography/Typography.tailwind.d.ts +1 -1
- package/esm/Typography/Typography.tailwind.js +2 -2
- package/esm/UserContent/UserContent.d.ts +1 -0
- package/esm/UserContent/UserContent.tailwind.d.ts +1 -1
- package/esm/UserContent/UserContent.tailwind.js +2 -2
- package/esm/styles/base.tailwind.d.ts +1 -1
- package/esm/styles/helpers/makePurgeCssExtractor.js +1 -1
- package/esm/styles/tailwind.config.js +3 -3
- package/esm/styles/zIndexes.d.ts +1 -0
- package/esm/styles/zIndexes.js +4 -3
- package/esm/types.d.ts +3 -4
- package/esm/utilities/overlay.tailwind.d.ts +5 -0
- package/esm/utilities/overlay.tailwind.js +106 -0
- package/esm/utilities/utilities.tailwind.d.ts +1 -1
- package/esm/utils/clamp.d.ts +1 -0
- package/esm/utils/clamp.js +3 -0
- package/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/esm/utils/prefersReducedMotion.d.ts +6 -0
- package/esm/utils/prefersReducedMotion.js +7 -0
- package/package.json +10 -7
- package/satellite.min.css +1 -1
- package/scss/variables.scss +4 -3
@@ -12,7 +12,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
var _templateObject, _templateObject2, _templateObject3;
|
13
13
|
var LINK_HEIGHT_PX = 24;
|
14
14
|
var LINKS_SPACING_PX = 8;
|
15
|
-
var ActiveLinkIndicator = function ActiveLinkIndicator(_ref) {
|
15
|
+
var ActiveLinkIndicator = exports.ActiveLinkIndicator = function ActiveLinkIndicator(_ref) {
|
16
16
|
var className = _ref.className,
|
17
17
|
activeIndex = _ref.activeIndex,
|
18
18
|
linksCount = _ref.linksCount;
|
@@ -26,7 +26,7 @@ var ActiveLinkIndicator = function ActiveLinkIndicator(_ref) {
|
|
26
26
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
27
27
|
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["w-px h-full bg-grey-200"]))),
|
28
28
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
29
|
-
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n w-px bg-accent-500\n transition-transform duration-100 ease-in-out\n ", "\n "])), showIndicator ? "visible" : "hidden"),
|
29
|
+
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n w-px bg-accent-500\n motion-safe:transition-transform motion-safe:duration-100 ease-in-out\n ", "\n "])), showIndicator ? "visible" : "hidden"),
|
30
30
|
style: {
|
31
31
|
height: LINK_HEIGHT_PX,
|
32
32
|
transform: typeof activeIndex === "number" ? "translateY(".concat(activeIndex * (LINK_HEIGHT_PX + LINKS_SPACING_PX), "px)") : undefined
|
@@ -34,5 +34,4 @@ var ActiveLinkIndicator = function ActiveLinkIndicator(_ref) {
|
|
34
34
|
})
|
35
35
|
})
|
36
36
|
});
|
37
|
-
};
|
38
|
-
exports.ActiveLinkIndicator = ActiveLinkIndicator;
|
37
|
+
};
|
@@ -12,9 +12,9 @@ var _satellitePrefixer = _interopRequireDefault(require("../../styles/helpers/sa
|
|
12
12
|
var _useLinkProps = _interopRequireDefault(require("../../utils/useLinkProps"));
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
14
14
|
var _templateObject, _templateObject2, _templateObject3;
|
15
|
-
function ownKeys(
|
16
|
-
function _objectSpread(
|
17
|
-
var SidebarGroupLink = function SidebarGroupLink(props) {
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
17
|
+
var SidebarGroupLink = exports.SidebarGroupLink = function SidebarGroupLink(props) {
|
18
18
|
var label = props.label,
|
19
19
|
active = props.active,
|
20
20
|
id = props.id,
|
@@ -33,5 +33,4 @@ var SidebarGroupLink = function SidebarGroupLink(props) {
|
|
33
33
|
size: "1em"
|
34
34
|
})]
|
35
35
|
}));
|
36
|
-
};
|
37
|
-
exports.SidebarGroupLink = SidebarGroupLink;
|
36
|
+
};
|
@@ -18,12 +18,12 @@ var _ActiveLinkIndicator = require("./ActiveLinkIndicator");
|
|
18
18
|
var _SidebarGroupLink = require("./SidebarGroupLink");
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
20
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
21
|
-
function ownKeys(
|
22
|
-
function _objectSpread(
|
21
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
23
23
|
var isCollapsibleSidebarLinksGroupProps = function isCollapsibleSidebarLinksGroupProps(props) {
|
24
24
|
return "title" in props && "icon" in props;
|
25
25
|
};
|
26
|
-
var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
26
|
+
var SidebarLinksGroup = exports.SidebarLinksGroup = function SidebarLinksGroup(props) {
|
27
27
|
var _useSidebarContext = (0, _SidebarContext.useSidebarContext)(),
|
28
28
|
isLinkActive = _useSidebarContext.isLinkActive;
|
29
29
|
var id = props.id,
|
@@ -44,7 +44,7 @@ var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
|
44
44
|
(0, _react.useEffect)(function () {
|
45
45
|
if (isCollapsibleSidebarLinksGroupProps(props)) {
|
46
46
|
var _props$onGroupToggle;
|
47
|
-
(_props$onGroupToggle = props.onGroupToggle) === null || _props$onGroupToggle === void 0
|
47
|
+
(_props$onGroupToggle = props.onGroupToggle) === null || _props$onGroupToggle === void 0 || _props$onGroupToggle.call(props, isOpen);
|
48
48
|
}
|
49
49
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
50
50
|
}, [isOpen]);
|
@@ -65,12 +65,13 @@ var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
|
65
65
|
"aria-controls": contentId,
|
66
66
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(props.icon, {
|
67
67
|
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["shrink-0 text-grey-500 mr-3"]))),
|
68
|
-
|
68
|
+
width: "1rem",
|
69
|
+
height: "1rem"
|
69
70
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
70
71
|
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["truncate display-subheading uppercase text-grey-800 group-focus:text-accent-500 group-hover:text-accent-500 mr-2"]))),
|
71
72
|
children: props.title
|
72
73
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFeather.ChevronRight, {
|
73
|
-
className: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["shrink-0 text-grey-500 transition-all duration-150 ease-in-out ", ""])), isOpen && "rotate-90"),
|
74
|
+
className: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["shrink-0 text-grey-500 motion-safe:transition-all motion-safe:duration-150 ease-in-out ", ""])), isOpen && "rotate-90"),
|
74
75
|
size: "1rem"
|
75
76
|
})]
|
76
77
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
@@ -93,5 +94,4 @@ var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
|
93
94
|
})]
|
94
95
|
})]
|
95
96
|
});
|
96
|
-
};
|
97
|
-
exports.SidebarLinksGroup = SidebarLinksGroup;
|
97
|
+
};
|
@@ -11,7 +11,7 @@ var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satel
|
|
11
11
|
var _SidebarContext = require("./SidebarContext");
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
13
13
|
var _templateObject;
|
14
|
-
var SidebarNav = function SidebarNav(_ref) {
|
14
|
+
var SidebarNav = exports.SidebarNav = function SidebarNav(_ref) {
|
15
15
|
var id = _ref.id,
|
16
16
|
className = _ref.className,
|
17
17
|
spacingProp = _ref.spacing,
|
@@ -33,5 +33,4 @@ var SidebarNav = function SidebarNav(_ref) {
|
|
33
33
|
})
|
34
34
|
})
|
35
35
|
});
|
36
|
-
};
|
37
|
-
exports.SidebarNav = SidebarNav;
|
36
|
+
};
|
package/cjs/Switch/Switch.d.ts
CHANGED
package/cjs/Switch/Switch.js
CHANGED
@@ -12,11 +12,12 @@ var _react = require("react");
|
|
12
12
|
var _styles = require("../Button/styles");
|
13
13
|
var _RadioGroup = require("../RadioGroup");
|
14
14
|
var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
|
15
|
+
var _prefersReducedMotion = require("../utils/prefersReducedMotion");
|
15
16
|
var _uniqueId = _interopRequireDefault(require("../utils/uniqueId"));
|
16
17
|
var _utils = require("./utils");
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
18
19
|
var _templateObject, _templateObject2;
|
19
|
-
var Switch = function Switch(_ref) {
|
20
|
+
var Switch = exports.Switch = function Switch(_ref) {
|
20
21
|
var className = _ref.className,
|
21
22
|
children = _ref.children,
|
22
23
|
value = _ref.value,
|
@@ -51,12 +52,13 @@ var Switch = function Switch(_ref) {
|
|
51
52
|
}
|
52
53
|
var containerRect = containerRef.current.getBoundingClientRect();
|
53
54
|
var targetRect = targetEl.getBoundingClientRect();
|
55
|
+
var duration = _prefersReducedMotion.prefersReducedMotion ? "0ms" : "200ms";
|
54
56
|
var newValueIndicatorStyle = {
|
55
57
|
width: targetRect.width,
|
56
58
|
transform: "translateX(".concat(targetRect.x - containerRect.x, "px)"),
|
57
59
|
visibility: "visible",
|
58
60
|
transitionProperty: "width, transform",
|
59
|
-
transitionDuration:
|
61
|
+
transitionDuration: duration,
|
60
62
|
transitionTimingFunction: "ease-in-out"
|
61
63
|
};
|
62
64
|
if (newValueIndicatorStyle.transform !== (valueIndicatorStyle === null || valueIndicatorStyle === void 0 ? void 0 : valueIndicatorStyle.transform) || newValueIndicatorStyle.width !== (valueIndicatorStyle === null || valueIndicatorStyle === void 0 ? void 0 : valueIndicatorStyle.width)) {
|
@@ -81,6 +83,4 @@ var Switch = function Switch(_ref) {
|
|
81
83
|
})
|
82
84
|
});
|
83
85
|
};
|
84
|
-
exports
|
85
|
-
var _default = Switch;
|
86
|
-
exports["default"] = _default;
|
86
|
+
var _default = exports["default"] = Switch;
|
@@ -13,9 +13,9 @@ var _OverflowTooltipWrapper = require("../Tooltip/OverflowTooltipWrapper");
|
|
13
13
|
var _utils = require("./utils");
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
15
15
|
var _templateObject, _templateObject2;
|
16
|
-
function ownKeys(
|
17
|
-
function _objectSpread(
|
18
|
-
var SwitchOption = function SwitchOption(_ref) {
|
16
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
18
|
+
var SwitchOption = exports.SwitchOption = function SwitchOption(_ref) {
|
19
19
|
var value = _ref.value,
|
20
20
|
disabled = _ref.disabled,
|
21
21
|
children = _ref.children;
|
@@ -23,7 +23,7 @@ var SwitchOption = function SwitchOption(_ref) {
|
|
23
23
|
var checked = context.value === value;
|
24
24
|
var inputDisabled = context.disabled || disabled;
|
25
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", _objectSpread(_objectSpread({
|
26
|
-
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n inline-flex grow shrink justify-center items-center min-w-16 max-w-48 px-4 z-10\n ", "\n ", "\n "])), inputDisabled ? "cursor-not-allowed opacity-60 rounded bg-grey-100" : "cursor-pointer", !checked && !inputDisabled && "rounded
|
26
|
+
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n inline-flex grow shrink justify-center items-center min-w-16 max-w-48 px-4 z-10 text-grey-600\n ", "\n ", "\n "])), inputDisabled ? "cursor-not-allowed opacity-60 rounded bg-grey-100" : "cursor-pointer hover:text-grey-900", !checked && !inputDisabled && "rounded motion-safe:transition-colors active:bg-accent-200/20 motion-safe:duration-100 ease-linear")
|
27
27
|
}, (0, _utils.buildAnimationProps)(context.name, value)), {}, {
|
28
28
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
29
29
|
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["w-0 h-0 opacity-0"]))),
|
@@ -42,6 +42,4 @@ var SwitchOption = function SwitchOption(_ref) {
|
|
42
42
|
})]
|
43
43
|
}));
|
44
44
|
};
|
45
|
-
exports
|
46
|
-
var _default = SwitchOption;
|
47
|
-
exports["default"] = _default;
|
45
|
+
var _default = exports["default"] = SwitchOption;
|
package/cjs/Switch/index.js
CHANGED
@@ -35,5 +35,5 @@ Object.keys(_SwitchOption).forEach(function (key) {
|
|
35
35
|
}
|
36
36
|
});
|
37
37
|
});
|
38
|
-
function _getRequireWildcardCache(
|
39
|
-
function _interopRequireWildcard(
|
38
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
39
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
package/cjs/Switch/utils.js
CHANGED
@@ -6,17 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.buildAnimationProps = exports.buildAnimationKeyValue = exports.buildAnimationKeySelector = exports.SWITCH_ANIMATION_KEY = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
-
var SWITCH_ANIMATION_KEY = "data-switch-animation-key";
|
10
|
-
exports.
|
11
|
-
var buildAnimationKeyValue = function buildAnimationKeyValue(name, value) {
|
9
|
+
var SWITCH_ANIMATION_KEY = exports.SWITCH_ANIMATION_KEY = "data-switch-animation-key";
|
10
|
+
var buildAnimationKeyValue = exports.buildAnimationKeyValue = function buildAnimationKeyValue(name, value) {
|
12
11
|
return "".concat(name, "-").concat(value);
|
13
12
|
};
|
14
|
-
exports.
|
15
|
-
var buildAnimationKeySelector = function buildAnimationKeySelector(name, value) {
|
13
|
+
var buildAnimationKeySelector = exports.buildAnimationKeySelector = function buildAnimationKeySelector(name, value) {
|
16
14
|
return "[".concat(SWITCH_ANIMATION_KEY, "=\"").concat(buildAnimationKeyValue(name, value), "\"]");
|
17
15
|
};
|
18
|
-
exports.
|
19
|
-
var buildAnimationProps = function buildAnimationProps(name, value) {
|
16
|
+
var buildAnimationProps = exports.buildAnimationProps = function buildAnimationProps(name, value) {
|
20
17
|
return (0, _defineProperty2["default"])({}, SWITCH_ANIMATION_KEY, buildAnimationKeyValue(name, value));
|
21
|
-
};
|
22
|
-
exports.buildAnimationProps = buildAnimationProps;
|
18
|
+
};
|
@@ -12,14 +12,21 @@ export declare type DataTableLocale = {
|
|
12
12
|
errorDescription?: string;
|
13
13
|
};
|
14
14
|
interface BaseDataTableProps<Item> {
|
15
|
+
/** The data which will be passed along to the table for rendering */
|
15
16
|
data: Item[];
|
17
|
+
/** Quite a few cases require you to specify the `itemID` which you can do using this prop */
|
16
18
|
itemId?: GetItemId<Item>;
|
19
|
+
/** The columns define the layout of your table and the respective rows and cells */
|
20
|
+
columns: ColumnDefinition<Item>[];
|
17
21
|
pagination?: PaginationConfiguration;
|
22
|
+
/** the `onChange` is triggered when either sorting or paginating */
|
18
23
|
onChange?(dataConfiguration: DataConfiguration): void;
|
24
|
+
/** Specify the global status of the table */
|
19
25
|
status?: Status;
|
26
|
+
/** Allows for specifying a custom empty state */
|
20
27
|
noDataContent?: ReactNode;
|
28
|
+
/** Allows for specifying a custom error state */
|
21
29
|
errorContent?: ReactNode;
|
22
|
-
columns: ColumnDefinition<Item>[];
|
23
30
|
canHoverRow?(row: Row<Item>): boolean;
|
24
31
|
onRowHoveredChanged?(row: Row<Item> | null): void;
|
25
32
|
sorting?: Sorting[];
|
@@ -25,8 +25,8 @@ var _Loader = _interopRequireDefault(require("./components/Loader"));
|
|
25
25
|
var _utils2 = require("./utils");
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
27
27
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
28
|
-
function ownKeys(
|
29
|
-
function _objectSpread(
|
28
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
29
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
30
30
|
var DEFAULT_DATATABLE_LOCALE = {
|
31
31
|
selectAllButton: "Select all",
|
32
32
|
noDataTitle: "Empty",
|
@@ -62,7 +62,7 @@ var DEFAULT_GET_ITEM_ID = function DEFAULT_GET_ITEM_ID(_, idx) {
|
|
62
62
|
* - If a cell is empty or unavailable, keep the cell empty to reduce noise and help with legibility.
|
63
63
|
* - Truncate long text to make it fit into a cell. However, choose column width wisely based on expected values, and adjust the table accordingly
|
64
64
|
*/
|
65
|
-
var DataTable = function DataTable(_ref) {
|
65
|
+
var DataTable = exports.DataTable = function DataTable(_ref) {
|
66
66
|
var data = _ref.data,
|
67
67
|
itemId = _ref.itemId,
|
68
68
|
columns = _ref.columns,
|
@@ -208,7 +208,7 @@ var DataTable = function DataTable(_ref) {
|
|
208
208
|
};
|
209
209
|
var onRowHoverChange = function onRowHoverChange(row) {
|
210
210
|
setHoveredRowId(row === null || row === void 0 ? void 0 : row.id);
|
211
|
-
onRowHoveredChanged === null || onRowHoveredChanged === void 0
|
211
|
+
onRowHoveredChanged === null || onRowHoveredChanged === void 0 || onRowHoveredChanged(row);
|
212
212
|
};
|
213
213
|
var onToggleSort = function onToggleSort(columnId, direction) {
|
214
214
|
var newSorting = internalSorting.map(function (_ref7) {
|
@@ -217,7 +217,7 @@ var DataTable = function DataTable(_ref) {
|
|
217
217
|
d = _ref8[1];
|
218
218
|
return columnId === colId ? [columnId, direction] : [colId, sortMode === "multi" ? d : "none"];
|
219
219
|
});
|
220
|
-
onChange === null || onChange === void 0
|
220
|
+
onChange === null || onChange === void 0 || onChange({
|
221
221
|
pagination: pagination,
|
222
222
|
sorting: newSorting
|
223
223
|
});
|
@@ -261,6 +261,4 @@ var DataTable = function DataTable(_ref) {
|
|
261
261
|
})]
|
262
262
|
});
|
263
263
|
};
|
264
|
-
exports
|
265
|
-
var _default = DataTable;
|
266
|
-
exports["default"] = _default;
|
264
|
+
var _default = exports["default"] = DataTable;
|
@@ -14,9 +14,9 @@ var _utils = require("../utils");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
15
15
|
var _react = require("react");
|
16
16
|
var _templateObject, _templateObject2, _templateObject3;
|
17
|
-
function ownKeys(
|
18
|
-
function _objectSpread(
|
19
|
-
var Body = function Body(_ref) {
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
19
|
+
var Body = exports.Body = function Body(_ref) {
|
20
20
|
var rows = _ref.rows,
|
21
21
|
columns = _ref.columns,
|
22
22
|
status = _ref.status,
|
@@ -116,6 +116,4 @@ var Body = function Body(_ref) {
|
|
116
116
|
})
|
117
117
|
});
|
118
118
|
};
|
119
|
-
exports
|
120
|
-
var _default = Body;
|
121
|
-
exports["default"] = _default;
|
119
|
+
var _default = exports["default"] = Body;
|
@@ -10,11 +10,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
10
10
|
var _Pagination = _interopRequireWildcard(require("../../../Pagination"));
|
11
11
|
var _utils = require("../utils");
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
13
|
-
function _getRequireWildcardCache(
|
14
|
-
function _interopRequireWildcard(
|
15
|
-
function ownKeys(
|
16
|
-
function _objectSpread(
|
17
|
-
var Footer = function Footer(_ref) {
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
17
|
+
var Footer = exports.Footer = function Footer(_ref) {
|
18
18
|
var pagination = _ref.pagination,
|
19
19
|
onChange = _ref.onChange;
|
20
20
|
return (0, _utils.isDeterminatePagination)(pagination) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Pagination["default"], {
|
@@ -60,6 +60,4 @@ var Footer = function Footer(_ref) {
|
|
60
60
|
})
|
61
61
|
}) : null;
|
62
62
|
};
|
63
|
-
exports
|
64
|
-
var _default = Footer;
|
65
|
-
exports["default"] = _default;
|
63
|
+
var _default = exports["default"] = Footer;
|
@@ -8,7 +8,7 @@ exports["default"] = exports.Header = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
9
9
|
var _HeaderCell = _interopRequireDefault(require("./HeaderCell"));
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
11
|
-
var Header = function Header(_ref) {
|
11
|
+
var Header = exports.Header = function Header(_ref) {
|
12
12
|
var columns = _ref.columns,
|
13
13
|
_ref$sorting = _ref.sorting,
|
14
14
|
sorting = _ref$sorting === void 0 ? [] : _ref$sorting,
|
@@ -36,6 +36,4 @@ var Header = function Header(_ref) {
|
|
36
36
|
})
|
37
37
|
});
|
38
38
|
};
|
39
|
-
exports
|
40
|
-
var _default = Header;
|
41
|
-
exports["default"] = _default;
|
39
|
+
var _default = exports["default"] = Header;
|
@@ -14,10 +14,10 @@ var _satellitePrefixer = _interopRequireDefault(require("../../../styles/helpers
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
15
15
|
var _excluded = ["sortingDirection", "onToggleSort", "column", "disabled", "children"];
|
16
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
17
|
-
function ownKeys(
|
18
|
-
function _objectSpread(
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
19
19
|
var iconClassName = (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["h-4 inline ml-1"])));
|
20
|
-
var HeaderCell = function HeaderCell(_ref) {
|
20
|
+
var HeaderCell = exports.HeaderCell = function HeaderCell(_ref) {
|
21
21
|
var _ref$sortingDirection = _ref.sortingDirection,
|
22
22
|
sortingDirection = _ref$sortingDirection === void 0 ? "none" : _ref$sortingDirection,
|
23
23
|
onToggleSort = _ref.onToggleSort,
|
@@ -44,17 +44,15 @@ var HeaderCell = function HeaderCell(_ref) {
|
|
44
44
|
"aria-sort": sortingDirection === "desc" ? "descending" : sortingDirection === "asc" ? "ascending" : "none",
|
45
45
|
className: className,
|
46
46
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(InternalCellComponent, _objectSpread(_objectSpread({}, sortButtonProps), {}, {
|
47
|
-
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["px-4 py-[14px] inline-flex items-center focus:outline-none focus:text-accent-600"]))), sortButtonProps.className),
|
47
|
+
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["group/cell px-4 py-[14px] inline-flex items-center focus:outline-none focus:text-accent-600"]))), sortButtonProps.className),
|
48
48
|
children: [children, sort ? sortingDirection === "desc" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFeather.ChevronDown, {
|
49
49
|
className: iconClassName
|
50
50
|
}) : sortingDirection === "asc" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFeather.ChevronUp, {
|
51
51
|
className: iconClassName
|
52
52
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFeather.ChevronDown, {
|
53
|
-
className: (0, _clsx["default"])(iconClassName, (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["text-grey-300"]))))
|
53
|
+
className: (0, _clsx["default"])(iconClassName, (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["text-grey-300 invisible group-hover/cell:visible group-focus/cell:visible"]))))
|
54
54
|
}) : null]
|
55
55
|
}))
|
56
56
|
}));
|
57
57
|
};
|
58
|
-
exports
|
59
|
-
var _default = HeaderCell;
|
60
|
-
exports["default"] = _default;
|
58
|
+
var _default = exports["default"] = HeaderCell;
|
@@ -13,7 +13,7 @@ var _ProgressSpinner = _interopRequireDefault(require("../../../ProgressSpinner"
|
|
13
13
|
var _satellitePrefixer = _interopRequireDefault(require("../../../styles/helpers/satellitePrefixer"));
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
15
15
|
var _templateObject;
|
16
|
-
var Loader = function Loader(_ref) {
|
16
|
+
var Loader = exports.Loader = function Loader(_ref) {
|
17
17
|
var className = _ref.className,
|
18
18
|
locale = _ref.locale;
|
19
19
|
var _useState = (0, _react.useState)(false),
|
@@ -34,7 +34,7 @@ var Loader = function Loader(_ref) {
|
|
34
34
|
className: className,
|
35
35
|
children: showLoadMessage ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyState["default"], {
|
36
36
|
usageContext: "result",
|
37
|
-
|
37
|
+
leadIllustration: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
38
38
|
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["flex justify-center"]))),
|
39
39
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressSpinner["default"], {})
|
40
40
|
}),
|
@@ -44,6 +44,4 @@ var Loader = function Loader(_ref) {
|
|
44
44
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressSpinner["default"], {})
|
45
45
|
});
|
46
46
|
};
|
47
|
-
exports
|
48
|
-
var _default = Loader;
|
49
|
-
exports["default"] = _default;
|
47
|
+
var _default = exports["default"] = Loader;
|
@@ -35,5 +35,5 @@ Object.keys(_types).forEach(function (key) {
|
|
35
35
|
}
|
36
36
|
});
|
37
37
|
});
|
38
|
-
function _getRequireWildcardCache(
|
39
|
-
function _interopRequireWildcard(
|
38
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
39
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
@@ -5,18 +5,30 @@ export declare type SortingDirection = "asc" | "desc" | "none";
|
|
5
5
|
export declare type Sorting = [columnId: string, direction: SortingDirection];
|
6
6
|
export declare type GetItemId<Item> = string | ((item: Item, idx: number) => string);
|
7
7
|
export interface Row<Item> {
|
8
|
+
/** The item for the given row */
|
8
9
|
item: Item;
|
10
|
+
/** The row id */
|
9
11
|
id: string;
|
12
|
+
/** Is the row hovered? */
|
10
13
|
hovered: boolean;
|
14
|
+
/** Is the row selected? */
|
11
15
|
selected: boolean;
|
16
|
+
/** Can the row be selected? */
|
12
17
|
selectable: boolean;
|
13
18
|
}
|
14
19
|
export interface CellProps<Item> {
|
20
|
+
/** The value of the given cell */
|
15
21
|
value: any;
|
22
|
+
/**
|
23
|
+
* The row of the cell, which lets you access other keys
|
24
|
+
* Useful for example when you want to calculate a sum of values in a column
|
25
|
+
*/
|
16
26
|
row: Row<Item>;
|
27
|
+
/** The column of the given cell */
|
17
28
|
column: AdvancedColumnDefinition<Item>;
|
18
29
|
}
|
19
30
|
export interface HeaderProps<Item> {
|
31
|
+
/** The column of the given header */
|
20
32
|
column: AdvancedColumnDefinition<Item>;
|
21
33
|
}
|
22
34
|
export interface AdvancedColumnDefinition<Item> {
|
@@ -27,8 +39,10 @@ export interface AdvancedColumnDefinition<Item> {
|
|
27
39
|
sort?: boolean;
|
28
40
|
Header?: ComponentType<HeaderProps<Item>> | string | false;
|
29
41
|
Cell?: ComponentType<CellProps<Item>>;
|
42
|
+
/** @ignore */
|
30
43
|
className?: string;
|
31
44
|
}
|
45
|
+
/** A column can be defined as a `string`, or as an `AdvancedColumnDefinition` in more complex cases */
|
32
46
|
export declare type ColumnDefinition<Item> = string | AdvancedColumnDefinition<Item>;
|
33
47
|
export interface IndeterminatePagination {
|
34
48
|
currentPage: number;
|
@@ -6,18 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.isIndeterminatePagination = exports.isDeterminatePagination = exports.getCellValue = void 0;
|
8
8
|
var _get = _interopRequireDefault(require("lodash/get"));
|
9
|
-
var isDeterminatePagination = function isDeterminatePagination(pagination) {
|
9
|
+
var isDeterminatePagination = exports.isDeterminatePagination = function isDeterminatePagination(pagination) {
|
10
10
|
return pagination !== false && "totalItemsCount" in pagination;
|
11
11
|
};
|
12
|
-
exports.
|
13
|
-
var isIndeterminatePagination = function isIndeterminatePagination(pagination) {
|
12
|
+
var isIndeterminatePagination = exports.isIndeterminatePagination = function isIndeterminatePagination(pagination) {
|
14
13
|
return pagination !== false && !("totalItemsCount" in pagination) && "currentPage" in pagination && typeof pagination.currentPage === "number";
|
15
14
|
};
|
16
|
-
exports.
|
17
|
-
var getCellValue = function getCellValue(column, row) {
|
15
|
+
var getCellValue = exports.getCellValue = function getCellValue(column, row) {
|
18
16
|
if (typeof column.accessor === "string") {
|
19
17
|
return (0, _get["default"])(row.item, column.accessor);
|
20
18
|
}
|
21
19
|
return column.accessor(row.item);
|
22
|
-
};
|
23
|
-
exports.getCellValue = getCellValue;
|
20
|
+
};
|
@@ -14,8 +14,8 @@ var _TableFooter = _interopRequireDefault(require("./components/TableFooter"));
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
15
15
|
var _templateObject, _templateObject2, _templateObject3;
|
16
16
|
var _excluded = ["className", "footer", "smallFooter", "hasActions", "highlight"];
|
17
|
-
function ownKeys(
|
18
|
-
function _objectSpread(
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
19
19
|
/**
|
20
20
|
* Tables are used to structure content in a grid to make it easier to see relationships and to facilitate understanding.
|
21
21
|
*
|
@@ -35,7 +35,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
35
35
|
* - If a cell is empty or unavailable, keep the cell empty to reduce noise and help with legibility.
|
36
36
|
* - Truncate long text to make it fit into a cell. However, choose column width wisely based on expected values, and adjust the table accordingly
|
37
37
|
*/
|
38
|
-
var Table = function Table(_ref) {
|
38
|
+
var Table = exports.Table = function Table(_ref) {
|
39
39
|
var className = _ref.className,
|
40
40
|
footer = _ref.footer,
|
41
41
|
_ref$smallFooter = _ref.smallFooter,
|
@@ -57,6 +57,4 @@ var Table = function Table(_ref) {
|
|
57
57
|
})]
|
58
58
|
});
|
59
59
|
};
|
60
|
-
exports
|
61
|
-
var _default = Table;
|
62
|
-
exports["default"] = _default;
|
60
|
+
var _default = exports["default"] = Table;
|