@algolia/satellite 1.0.0-beta.164 → 1.0.0-beta.165
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 +347 -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 +1 -1
- 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 +4 -6
- package/cjs/Badge/index.js +2 -2
- package/cjs/Banners/Alert/Alert.d.ts +2 -2
- package/cjs/Banners/Alert/Alert.js +2 -4
- 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 +5 -6
- package/cjs/Button/PolymorphicIconButton.d.ts +5 -1
- package/cjs/Button/PolymorphicIconButton.js +12 -12
- 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 +4 -6
- 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 +4 -6
- package/cjs/Dropdown/components/DropdownRadioItem.js +4 -6
- package/cjs/Dropdown/components/DropdownTitle.js +4 -6
- package/cjs/Dropdown/components/DropdownToggleItem.js +4 -6
- 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 +8 -10
- 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.d.ts +2 -2
- package/cjs/Link/Link.js +4 -6
- 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.js +6 -7
- 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 +6 -7
- 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 +2 -3
- 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/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 +12 -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 +350 -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 +1 -1
- 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 +2 -2
- package/esm/Banners/Alert/Alert.d.ts +2 -2
- 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 +2 -2
- package/esm/Button/PolymorphicIconButton.d.ts +5 -1
- package/esm/Button/PolymorphicIconButton.js +11 -10
- 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 +2 -2
- 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 +2 -2
- package/esm/Dropdown/components/DropdownRadioItem.js +2 -2
- package/esm/Dropdown/components/DropdownTitle.js +2 -2
- package/esm/Dropdown/components/DropdownToggleItem.js +2 -2
- 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 +6 -6
- 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.d.ts +2 -2
- package/esm/Link/Link.js +2 -2
- 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.js +4 -3
- 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 +4 -4
- 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 +2 -3
- 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/isCssPropertySupported.d.ts +1 -1
- package/esm/utils/prefersReducedMotion.d.ts +6 -0
- package/esm/utils/prefersReducedMotion.js +6 -0
- package/package.json +9 -7
- package/satellite.min.css +1 -1
- package/scss/variables.scss +4 -3
@@ -0,0 +1,13 @@
|
|
1
|
+
import { createContext, useContext } from "react";
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
var AutocompleteContext = /*#__PURE__*/createContext(false);
|
4
|
+
export var AutocompleteProvider = function AutocompleteProvider(_ref) {
|
5
|
+
var children = _ref.children;
|
6
|
+
return /*#__PURE__*/_jsx(AutocompleteContext.Provider, {
|
7
|
+
value: true,
|
8
|
+
children: children
|
9
|
+
});
|
10
|
+
};
|
11
|
+
export var useIsInsideAutocomplete = function useIsInsideAutocomplete() {
|
12
|
+
return useContext(AutocompleteContext);
|
13
|
+
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { VFC } from "react";
|
2
2
|
import type { AutoCompleteLocale, OptionItemProps } from "../types";
|
3
|
-
declare type DefaultOptionItemProps = OptionItemProps & {
|
3
|
+
export declare type DefaultOptionItemProps = OptionItemProps & {
|
4
4
|
locale?: AutoCompleteLocale;
|
5
5
|
};
|
6
|
-
declare const DefaultOptionItem: VFC<DefaultOptionItemProps>;
|
6
|
+
export declare const DefaultOptionItem: VFC<DefaultOptionItemProps>;
|
7
7
|
export default DefaultOptionItem;
|
@@ -7,7 +7,7 @@ var metadataSpacer = /*#__PURE__*/_jsx("span", {
|
|
7
7
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["px-1"]))),
|
8
8
|
children: "\xB7"
|
9
9
|
});
|
10
|
-
var DefaultOptionItem = function DefaultOptionItem(_ref) {
|
10
|
+
export var DefaultOptionItem = function DefaultOptionItem(_ref) {
|
11
11
|
var _locale$optionItemPre;
|
12
12
|
var option = _ref.option,
|
13
13
|
multiple = _ref.multiple,
|
@@ -16,7 +16,7 @@ var DefaultOptionItem = function DefaultOptionItem(_ref) {
|
|
16
16
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate py-2"]))),
|
17
17
|
children: [/*#__PURE__*/_jsx("span", {
|
18
18
|
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["font-semibold text-md text-grey-900"]))),
|
19
|
-
children: option["new"] ? "".concat(locale === null || locale === void 0
|
19
|
+
children: option["new"] ? "".concat(locale === null || locale === void 0 || (_locale$optionItemPre = locale.optionItemPrefix) === null || _locale$optionItemPre === void 0 ? void 0 : _locale$optionItemPre.call(locale, multiple), " ").concat(option.label) : option.label
|
20
20
|
}), option.metadata && option.metadata.length > 0 && /*#__PURE__*/_jsx("ul", {
|
21
21
|
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex text-grey-600"]))),
|
22
22
|
children: option.metadata.map(function (metadata, idx) {
|
@@ -4,6 +4,7 @@ export declare type AutoCompleteVariant = "medium" | "large";
|
|
4
4
|
export declare type AutoCompleteLocale = {
|
5
5
|
emptyStateTitle?: string;
|
6
6
|
clearInputButton?: string;
|
7
|
+
selectionMessage?: (optionName: string, option: Option | null) => string;
|
7
8
|
itemsAvailable?: (resultCount: number) => string;
|
8
9
|
showMoreButton?: (extraResults: number) => string;
|
9
10
|
optionItemPrefix?: (multiple: boolean) => string;
|
@@ -78,7 +79,6 @@ export interface OptionRendererParams {
|
|
78
79
|
}
|
79
80
|
export interface RenderValueTemplateArgs<T extends Option = Option> {
|
80
81
|
option: T;
|
81
|
-
key: string;
|
82
82
|
editable: boolean;
|
83
83
|
}
|
84
84
|
export declare type CreateFromInputValue<T extends Option = Option> = (options: T[] | undefined, inputValue: string) => Option[];
|
@@ -3,3 +3,6 @@ export declare function isAutoCompleteMultiProps<T extends Option = Option>(prop
|
|
3
3
|
export declare const defaultCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
|
4
4
|
export declare const caseInsensitiveCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
|
5
5
|
export declare const DEFAULT_AUTOCOMPLETE_LOCALE: Required<AutoCompleteLocale>;
|
6
|
+
export declare const optionToString: (option: Option | null) => string;
|
7
|
+
export declare function filter<T extends Option = Option>(options: T[], selectedItems: T[], itemValue: string): T[];
|
8
|
+
export declare function inputValueFromProps<T extends Option = Option>(props: AutoCompleteProps<T>): string;
|
@@ -27,6 +27,9 @@ export var caseInsensitiveCreateFromInputValue = function caseInsensitiveCreateF
|
|
27
27
|
export var DEFAULT_AUTOCOMPLETE_LOCALE = {
|
28
28
|
clearInputButton: "Clear input value",
|
29
29
|
emptyStateTitle: "No matches found",
|
30
|
+
selectionMessage: function selectionMessage(optionName, option) {
|
31
|
+
return option ? "".concat(optionName, " has been selected.") : "";
|
32
|
+
},
|
30
33
|
itemsAvailable: function itemsAvailable(count) {
|
31
34
|
return "".concat(pluralize(count, "item is", {
|
32
35
|
plural: "items are"
|
@@ -38,4 +41,31 @@ export var DEFAULT_AUTOCOMPLETE_LOCALE = {
|
|
38
41
|
showMoreButton: function showMoreButton(extraResults) {
|
39
42
|
return "Show ".concat(pluralize(extraResults, "result"), " more");
|
40
43
|
}
|
41
|
-
};
|
44
|
+
};
|
45
|
+
export var optionToString = function optionToString(option) {
|
46
|
+
var _option$label;
|
47
|
+
return (_option$label = option === null || option === void 0 ? void 0 : option.label) !== null && _option$label !== void 0 ? _option$label : "";
|
48
|
+
};
|
49
|
+
function needlesMatch(needles, option) {
|
50
|
+
var labels = (option.metadata || []).concat(option.label);
|
51
|
+
return needles.every(function (needle) {
|
52
|
+
return labels.some(function (label) {
|
53
|
+
return String(label || "").trim().toLowerCase().includes(needle);
|
54
|
+
});
|
55
|
+
});
|
56
|
+
}
|
57
|
+
export function filter(options, selectedItems, itemValue) {
|
58
|
+
var needles = itemValue.toLowerCase().trim().split(/\s+/);
|
59
|
+
return options.filter(function (option) {
|
60
|
+
return !selectedItems.some(function (_ref) {
|
61
|
+
var value = _ref.value;
|
62
|
+
return value === option.value;
|
63
|
+
}) && (option.bypassNeedleMatch || needlesMatch(needles, option));
|
64
|
+
});
|
65
|
+
}
|
66
|
+
export function inputValueFromProps(props) {
|
67
|
+
if (props.inputValue !== undefined) {
|
68
|
+
return props.inputValue;
|
69
|
+
}
|
70
|
+
return !isAutoCompleteMultiProps(props) && props.value ? optionToString(props.value) : "";
|
71
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
4
|
-
function ownKeys(
|
5
|
-
function _objectSpread(
|
4
|
+
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; }
|
5
|
+
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) { _defineProperty(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; }
|
6
6
|
import { AvatarFallback, Image as AvatarImage, Root as AvatarRoot } from "@radix-ui/react-avatar";
|
7
7
|
import cx from "clsx";
|
8
8
|
import { useLocale } from "../Satellite";
|
package/esm/Avatars/utils.js
CHANGED
@@ -40,8 +40,8 @@ export var getUserBackgroundClassName = function getUserBackgroundClassName(emai
|
|
40
40
|
return (_USER_COLORS_CLASSNAM = USER_COLORS_CLASSNAMES[Math.abs(hashCode(email)) % USER_COLORS_CLASSNAMES.length]) !== null && _USER_COLORS_CLASSNAM !== void 0 ? _USER_COLORS_CLASSNAM : USER_COLORS_CLASSNAMES[0];
|
41
41
|
};
|
42
42
|
export var getUserInitials = function getUserInitials(user) {
|
43
|
-
var _user$email
|
44
|
-
var words = user.name ? user.name.trim().split(/\s+/) : (_user$email = user.email) === null || _user$email === void 0
|
43
|
+
var _user$email;
|
44
|
+
var words = user.name ? user.name.trim().split(/\s+/) : (_user$email = user.email) === null || _user$email === void 0 || (_user$email = _user$email.match(/^(.+)(?:\+.+?)?@.+$/)) === null || _user$email === void 0 ? void 0 : _user$email[1].split(".");
|
45
45
|
return words ? words.slice(0, 2).map(function (w) {
|
46
46
|
return w.toLocaleLowerCase()[0];
|
47
47
|
}).join("") : "??";
|
package/esm/Badge/Badge.d.ts
CHANGED
@@ -3,9 +3,7 @@ import type { AtLeastOne, ColorVariant, IconComponentType } from "../types";
|
|
3
3
|
export declare type BadgeSizes = "small" | "medium" | "large";
|
4
4
|
export declare type BadgeVariants = ColorVariant | "pink";
|
5
5
|
interface BaseBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
6
|
-
/** @default "grey" */
|
7
6
|
variant?: BadgeVariants;
|
8
|
-
/** @default "default" */
|
9
7
|
size?: BadgeSizes;
|
10
8
|
}
|
11
9
|
declare type BadgeContentProps = {
|
package/esm/Badge/Badge.js
CHANGED
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["children", "value", "icon", "variant", "size", "className"];
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
6
|
-
function ownKeys(
|
7
|
-
function _objectSpread(
|
6
|
+
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; }
|
7
|
+
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) { _defineProperty(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; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import { forwardRef } from "react";
|
10
10
|
import stl from "../styles/helpers/satellitePrefixer";
|
@@ -9,11 +9,11 @@ export interface AlertProps {
|
|
9
9
|
style?: CSSProperties;
|
10
10
|
/** Descriptive title for `Alert` */
|
11
11
|
title?: ReactNode;
|
12
|
-
/** @default
|
12
|
+
/** @default grey */
|
13
13
|
variant?: AlertColorVariant;
|
14
14
|
/**
|
15
15
|
* Usage context description
|
16
|
-
* @default
|
16
|
+
* @default section
|
17
17
|
*/
|
18
18
|
usageContext?: AlertContextType;
|
19
19
|
icon?: IconComponentType;
|
package/esm/Button/Button.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
function ownKeys(
|
3
|
-
function _objectSpread(
|
2
|
+
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; }
|
3
|
+
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) { _defineProperty(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; }
|
4
4
|
import { forwardRef } from "react";
|
5
5
|
import { PolymorphicButton } from "./PolymorphicButton";
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -1,5 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { type PolymorphicIconButtonProps } from "./PolymorphicIconButton";
|
3
3
|
export declare type IconButtonProps = Omit<PolymorphicIconButtonProps<"button">, "as" | "ref">;
|
4
|
+
/**
|
5
|
+
* IconButtons are useful in situations where you are limited on space or the action is self-explanatory with just an icon.
|
6
|
+
*
|
7
|
+
* Please refer to the `Button` guidelines.
|
8
|
+
*/
|
4
9
|
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
5
10
|
export default IconButton;
|
package/esm/Button/IconButton.js
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
function ownKeys(
|
3
|
-
function _objectSpread(
|
2
|
+
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; }
|
3
|
+
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) { _defineProperty(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; }
|
4
4
|
import { forwardRef } from "react";
|
5
5
|
import { PolymorphicIconButton } from "./PolymorphicIconButton";
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
/**
|
8
|
+
* IconButtons are useful in situations where you are limited on space or the action is self-explanatory with just an icon.
|
9
|
+
*
|
10
|
+
* Please refer to the `Button` guidelines.
|
11
|
+
*/
|
7
12
|
export var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
8
13
|
return /*#__PURE__*/_jsx(PolymorphicIconButton, _objectSpread(_objectSpread({}, props), {}, {
|
9
14
|
as: "button",
|
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["as", "className", "variant", "size", "startIcon", "endIcon", "loading", "children"];
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
6
|
-
function ownKeys(
|
7
|
-
function _objectSpread(
|
6
|
+
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; }
|
7
|
+
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) { _defineProperty(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; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import React, { forwardRef } from "react";
|
10
10
|
import ProgressSpinner from "../ProgressSpinner";
|
@@ -3,14 +3,18 @@ import type { TooltipWrapperBaseProps } from "../Tooltip/types";
|
|
3
3
|
import type { IconComponentType } from "../types";
|
4
4
|
import type { ButtonSize, ButtonVariant, PolymorphicComponentPropWithRef } from "./types";
|
5
5
|
export interface IconButtonBaseProps {
|
6
|
+
/** @default neutral */
|
6
7
|
variant?: ButtonVariant;
|
8
|
+
/** @default medium */
|
7
9
|
size?: ButtonSize;
|
10
|
+
/** @default false */
|
8
11
|
disabled?: boolean;
|
9
12
|
icon: IconComponentType;
|
10
13
|
title: string;
|
11
14
|
showTooltip?: boolean;
|
12
|
-
/** @default
|
15
|
+
/** @default top */
|
13
16
|
tooltipSide?: TooltipWrapperBaseProps["side"];
|
17
|
+
/** @default false */
|
14
18
|
loading?: boolean;
|
15
19
|
}
|
16
20
|
export declare type PolymorphicIconButtonProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, IconButtonBaseProps>;
|
@@ -2,9 +2,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["as", "className", "variant", "size", "icon", "title", "showTooltip", "tooltipSide", "loading"];
|
5
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
6
|
-
function ownKeys(
|
7
|
-
function _objectSpread(
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
6
|
+
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; }
|
7
|
+
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) { _defineProperty(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; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import { forwardRef } from "react";
|
10
10
|
import ProgressSpinner from "../ProgressSpinner";
|
@@ -17,12 +17,13 @@ import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
18
18
|
var BASE_CLASSNAMES = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["btn inline-flex items-center justify-center"])));
|
19
19
|
var SIZE_CLASSNAMES = {
|
20
|
-
small: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["h-6 w-6 text-mobile md:text-sm"]))),
|
21
|
-
medium: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["h-8 w-8 text-md"]))),
|
22
|
-
large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["h-10 w-10 text-lg"])))
|
20
|
+
small: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["max-h-6 max-w-6 min-h-6 min-w-6 text-mobile md:text-sm"]))),
|
21
|
+
medium: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["max-h-8 max-w-8 min-h-8 min-w-8 text-md"]))),
|
22
|
+
large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["max-h-10 max-w-10 min-h-10 min-w-10 text-lg"])))
|
23
23
|
};
|
24
24
|
var VARIANT_CLASSNAMES = _objectSpread(_objectSpread({}, BUTTON_VARIANT_CLASSNAMES), {}, {
|
25
|
-
neutral: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["btn-neutral text-grey-600"])))
|
25
|
+
neutral: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["btn-neutral text-grey-600"]))),
|
26
|
+
subtle: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["btn-subtle text-grey-600"])))
|
26
27
|
});
|
27
28
|
/**
|
28
29
|
* `PolymorphicIconButton` is intended for internal use
|
@@ -48,8 +49,8 @@ export var PolymorphicIconButton = /*#__PURE__*/forwardRef(function (props, ref)
|
|
48
49
|
// @ts-expect-error
|
49
50
|
cleanedProps.disabled = true;
|
50
51
|
}
|
51
|
-
var iconButtonClassName = cx(BASE_CLASSNAMES, SIZE_CLASSNAMES[size], VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(
|
52
|
-
var loaderClassNames = stl(
|
52
|
+
var iconButtonClassName = cx(BASE_CLASSNAMES, SIZE_CLASSNAMES[size], VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["btn-disabled"]))), className);
|
53
|
+
var loaderClassNames = stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["absolute ", ""])), (variant === "destructive" || variant === "primary") && "text-white");
|
53
54
|
if (isButtonType(props) && !Object.prototype.hasOwnProperty.call(cleanedProps, "type")) {
|
54
55
|
// @ts-ignore
|
55
56
|
cleanedProps.type = "button";
|
@@ -69,7 +70,7 @@ export var PolymorphicIconButton = /*#__PURE__*/forwardRef(function (props, ref)
|
|
69
70
|
size: BUTTON_LOADER_ICON_SIZES[size],
|
70
71
|
thickness: 1
|
71
72
|
}), /*#__PURE__*/_jsx(Icon, {
|
72
|
-
className: cx(loading && stl(
|
73
|
+
className: cx(loading && stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["invisible"])))),
|
73
74
|
size: "1em"
|
74
75
|
})]
|
75
76
|
})
|
package/esm/Button/styles.d.ts
CHANGED
@@ -2,4 +2,4 @@ import type { ButtonBaseProps, ButtonSize, ButtonVariant } from "./types";
|
|
2
2
|
export declare const BUTTON_SIZE_CLASSNAMES: Record<ButtonSize, string>;
|
3
3
|
export declare const BUTTON_LOADER_ICON_SIZES: Record<ButtonSize, number>;
|
4
4
|
export declare const BUTTON_VARIANT_CLASSNAMES: Record<ButtonVariant, string>;
|
5
|
-
export declare const getIconColorClassName: ({ disabled, variant }: Pick<ButtonBaseProps, "disabled" | "variant">) => string;
|
5
|
+
export declare const getIconColorClassName: ({ disabled, variant }: Pick<ButtonBaseProps, "disabled" | "variant">) => string | null;
|
package/esm/Button/styles.js
CHANGED
@@ -23,5 +23,8 @@ export var getIconColorClassName = function getIconColorClassName(_ref) {
|
|
23
23
|
if (variant === "destructive" || variant === "primary") {
|
24
24
|
return stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["text-white"])));
|
25
25
|
}
|
26
|
+
if (variant === "subtle" && !disabled) {
|
27
|
+
return null;
|
28
|
+
}
|
26
29
|
return disabled ? stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["text-grey-300"]))) : stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["text-grey-600"])));
|
27
30
|
};
|
package/esm/Button/types.d.ts
CHANGED
@@ -3,9 +3,9 @@ import type { IconComponentType } from "../types";
|
|
3
3
|
export declare type ButtonVariant = "subtle" | "neutral" | "primary" | "destructive";
|
4
4
|
export declare type ButtonSize = "small" | "medium" | "large";
|
5
5
|
export interface ButtonBaseProps {
|
6
|
-
/** @default
|
6
|
+
/** @default neutral */
|
7
7
|
variant?: ButtonVariant;
|
8
|
-
/** @default
|
8
|
+
/** @default medium */
|
9
9
|
size?: ButtonSize;
|
10
10
|
/** Left aligned icon */
|
11
11
|
startIcon?: IconComponentType;
|
@@ -13,6 +13,7 @@ export interface ButtonBaseProps {
|
|
13
13
|
endIcon?: IconComponentType;
|
14
14
|
/** @ignore */
|
15
15
|
children: ReactNode;
|
16
|
+
/** @default false */
|
16
17
|
loading?: boolean;
|
17
18
|
/** @ignore */
|
18
19
|
disabled?: boolean;
|
package/esm/Card/Card.d.ts
CHANGED
package/esm/Card/Card.js
CHANGED
@@ -3,8 +3,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["className", "as", "elevation", "fullBleed"];
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
6
|
-
function ownKeys(
|
7
|
-
function _objectSpread(
|
6
|
+
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; }
|
7
|
+
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) { _defineProperty(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; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import { createElement, forwardRef } from "react";
|
10
10
|
import stl from "../styles/helpers/satellitePrefixer";
|
@@ -3,8 +3,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
4
|
var _templateObject;
|
5
5
|
var _excluded = ["className", "children"];
|
6
|
-
function ownKeys(
|
7
|
-
function _objectSpread(
|
6
|
+
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; }
|
7
|
+
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) { _defineProperty(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; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import stl from "../../styles/helpers/satellitePrefixer";
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -3,8 +3,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
4
|
var _templateObject;
|
5
5
|
var _excluded = ["className", "children"];
|
6
|
-
function ownKeys(
|
7
|
-
function _objectSpread(
|
6
|
+
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; }
|
7
|
+
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) { _defineProperty(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; }
|
8
8
|
import cx from "clsx";
|
9
9
|
import stl from "../../styles/helpers/satellitePrefixer";
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -2,13 +2,13 @@ import type { HTMLAttributes, InputHTMLAttributes } from "react";
|
|
2
2
|
declare type CheckboxCustomProps = {
|
3
3
|
/**
|
4
4
|
* `Checkbox` text position
|
5
|
-
* @default
|
5
|
+
* @default right
|
6
6
|
*/
|
7
7
|
textPosition?: "left" | "right";
|
8
8
|
indeterminate?: boolean;
|
9
9
|
/**
|
10
10
|
* Color of the `Checkbox`
|
11
|
-
* @default
|
11
|
+
* @default accent.600
|
12
12
|
*/
|
13
13
|
checkedColor?: string;
|
14
14
|
};
|
@@ -20,5 +20,5 @@ export declare type CheckboxProps = CheckboxInputProps & CheckboxCustomProps;
|
|
20
20
|
* - A checkbox control has two primary states: selected and unselected. If required, there's an additional visual state for indeterminate (usually for a parent checkbox, when some children checkboxes are selected, but not all of them)
|
21
21
|
* - Checkboxes require the use of a button to apply the settings once they are selected
|
22
22
|
*/
|
23
|
-
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLInputElement>, "onChange"> & Pick<InputHTMLAttributes<HTMLInputElement>, "
|
23
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLInputElement>, "onChange"> & Pick<InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "onChange" | "autoFocus" | "disabled" | "checked" | "required"> & CheckboxCustomProps & import("react").RefAttributes<HTMLInputElement>>;
|
24
24
|
export default Checkbox;
|
package/esm/Checkbox/Checkbox.js
CHANGED
@@ -4,8 +4,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
5
5
|
var _excluded = ["children", "className", "textPosition", "indeterminate", "defaultChecked", "checkedColor", "checked", "disabled"];
|
6
6
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
7
|
-
function ownKeys(
|
8
|
-
function _objectSpread(
|
7
|
+
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; }
|
8
|
+
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) { _defineProperty(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; }
|
9
9
|
import cx from "clsx";
|
10
10
|
import { forwardRef, useMemo, useState } from "react";
|
11
11
|
import { Check, Minus } from "react-feather";
|
@@ -61,9 +61,9 @@ export var Checkbox = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
61
61
|
}
|
62
62
|
};
|
63
63
|
return /*#__PURE__*/_jsxs("div", {
|
64
|
-
className: cx(stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["group inline-flex items-center ", ""])), textPosition === "left" && "flex-row-reverse"), className),
|
64
|
+
className: cx(stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["group/checkbox inline-flex items-center ", ""])), textPosition === "left" && "flex-row-reverse"), className),
|
65
65
|
children: [/*#__PURE__*/_jsxs("span", {
|
66
|
-
className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n checkbox\n ", "\n ", "\n ", "\n
|
66
|
+
className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n checkbox\n ", "\n ", "\n ", "\n "])), indeterminate && "checkbox-indeterminate", isChecked && "checkbox-checked", disabled && "checkbox-disabled"), STATUS_CLASSNAMES[status]),
|
67
67
|
style: {
|
68
68
|
color: checkedColor
|
69
69
|
},
|
@@ -33,6 +33,11 @@ var checkboxPlugin = plugin(function (_ref) {
|
|
33
33
|
opacity: "0"
|
34
34
|
}
|
35
35
|
},
|
36
|
+
".group\\/checkbox:hover": {
|
37
|
+
"& > .checkbox:not(.checkbox-disabled, .checkbox-checked, .checkbox-indeterminate, :has(input:focus))": {
|
38
|
+
borderColor: theme("colors.grey.600")
|
39
|
+
}
|
40
|
+
},
|
36
41
|
".checkbox-invalid:not(.checkbox-disabled)": {
|
37
42
|
color: theme("colors.red.700"),
|
38
43
|
background: theme("colors.red.100"),
|
@@ -58,7 +58,7 @@ export var ClickAwayContainer = function ClickAwayContainer(_ref) {
|
|
58
58
|
return el.contains(evt.target);
|
59
59
|
});
|
60
60
|
if (!isEventInside) {
|
61
|
-
onClickAway === null || onClickAway === void 0
|
61
|
+
onClickAway === null || onClickAway === void 0 || onClickAway(evt);
|
62
62
|
}
|
63
63
|
}, [elementsSet, onClickAway]);
|
64
64
|
useClickAway(fakeElementRef, handleClickAway, AWAY_EVENTS);
|