@algolia/satellite 1.0.0-beta.133 → 1.0.0-beta.136
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/README.md +33 -28
- package/cjs/AnnouncementBadge/AnnouncementBadge.d.ts +6 -2
- package/cjs/AnnouncementBadge/AnnouncementBadge.js +16 -4
- package/cjs/AutoComplete/AutoComplete.d.ts +5 -10
- package/cjs/AutoComplete/AutoComplete.js +28 -50
- package/cjs/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
- package/cjs/AutoComplete/AutoComplete.tailwind.js +10 -13
- package/cjs/AutoComplete/utils.d.ts +2 -1
- package/cjs/AutoComplete/utils.js +22 -2
- package/cjs/Avatars/ApplicationAvatar.js +2 -2
- package/cjs/Avatars/UserAvatar.js +2 -2
- package/cjs/Avatars/utils.js +12 -4
- package/cjs/Badge/Badge.js +2 -2
- package/cjs/Banners/Alert/Alert.d.ts +1 -0
- package/cjs/Banners/Alert/Alert.js +3 -3
- package/cjs/Banners/BigBertha/BigBertha.d.ts +2 -1
- package/cjs/Banners/Promote/Promote.d.ts +1 -0
- package/cjs/Banners/Promote/Promote.js +2 -2
- package/cjs/Button/Button.js +7 -7
- package/cjs/Button/Button.tailwind.d.ts +4 -4
- package/cjs/Button/Button.tailwind.js +11 -14
- package/cjs/Button/ButtonGroup.d.ts +2 -1
- package/cjs/Button/ButtonGroup.js +2 -2
- package/cjs/Button/IconButton.js +3 -3
- package/cjs/Card/Card.js +2 -2
- package/cjs/Card/Card.tailwind.d.ts +4 -4
- package/cjs/Card/Card.tailwind.js +5 -8
- package/cjs/Card/components/CardHeader.js +2 -2
- package/cjs/Card/components/CardTitle.d.ts +4 -2
- package/cjs/Card/components/CardTitle.js +2 -2
- package/cjs/Checkbox/Checkbox.d.ts +2 -2
- package/cjs/Checkbox/Checkbox.js +3 -3
- package/cjs/Checkbox/Checkbox.tailwind.d.ts +5 -5
- package/cjs/Checkbox/Checkbox.tailwind.js +11 -14
- package/cjs/ClickAwayContainer/ClickAwayContainer.d.ts +2 -1
- package/cjs/DatePicker/DatePicker/DatePicker.js +13 -7
- package/cjs/DatePicker/DatePicker.tailwind.d.ts +4 -4
- package/cjs/DatePicker/DatePicker.tailwind.js +32 -27
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +14 -3
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +2 -1
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +1 -1
- package/cjs/DatePicker/components/Calendar.d.ts +2 -1
- package/cjs/DatePicker/components/FooterActions.d.ts +2 -1
- package/cjs/DatePicker/components/FooterActions.js +2 -2
- package/cjs/DatePicker/components/Modal.js +7 -6
- package/cjs/DatePicker/components/NavBar.d.ts +2 -1
- package/cjs/DatePicker/components/NavBar.js +5 -5
- package/cjs/DatePicker/utils.d.ts +2 -0
- package/cjs/DatePicker/utils.js +10 -2
- package/cjs/Dropdown/Dropdown.d.ts +1 -1
- package/cjs/Dropdown/Dropdown.js +7 -6
- package/cjs/Dropdown/DropdownButton.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownButtonItem.js +4 -4
- package/cjs/Dropdown/components/DropdownFooterItem.js +2 -2
- package/cjs/Dropdown/components/DropdownLinkItem.js +3 -4
- package/cjs/Dropdown/components/DropdownTitle.d.ts +4 -2
- package/cjs/Dropdown/components/DropdownTitle.js +2 -2
- package/cjs/Dropdown/components/DropdownToggleItem.js +4 -4
- package/cjs/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/cjs/Dropdown/useDropdownItemProps.js +18 -9
- package/cjs/Dropzone/Dropzone.d.ts +5 -1
- package/cjs/Dropzone/Dropzone.js +16 -7
- package/cjs/EmptyState/EmptyState.js +5 -5
- package/cjs/EmptyState/EmptyState.tailwind.d.ts +4 -4
- package/cjs/EmptyState/EmptyState.tailwind.js +5 -8
- package/cjs/Field/Field.d.ts +1 -0
- package/cjs/Field/Field.js +3 -3
- package/cjs/Flag/Flag.d.ts +1 -0
- package/cjs/Flag/Flag.js +19 -4
- package/cjs/Flag/Flag.tailwind.d.ts +4 -4
- package/cjs/Flag/Flag.tailwind.js +8 -15
- package/cjs/Flag/Flags.d.ts +1 -1
- package/cjs/Flag/Flags.js +5 -4
- package/cjs/Flag/types.d.ts +4 -0
- package/cjs/FlexGrid/FlexGrid.d.ts +2 -1
- package/cjs/FlexGrid/FlexGrid.js +3 -3
- package/cjs/FlexGrid/FlexGrid.tailwind.d.ts +6 -3
- package/cjs/FlexGrid/FlexGrid.tailwind.js +8 -11
- package/cjs/HelpUnderline/HelpUnderline.js +3 -3
- package/cjs/HelpUnderline/HelpUnderline.tailwind.d.ts +4 -4
- package/cjs/HelpUnderline/HelpUnderline.tailwind.js +3 -6
- package/cjs/Input/Input.d.ts +6 -0
- package/cjs/Input/Input.js +17 -6
- package/cjs/Input/Input.tailwind.d.ts +4 -4
- package/cjs/Input/Input.tailwind.js +12 -15
- package/cjs/Insert/Insert.d.ts +1 -0
- package/cjs/InstantSearch/InstantSearch.tailwind.d.ts +4 -5
- package/cjs/InstantSearch/InstantSearch.tailwind.js +34 -32
- package/cjs/KeyboardKey/KeyboardKey.js +5 -4
- package/cjs/KeyboardKey/KeyboardKey.tailwind.d.ts +4 -4
- package/cjs/KeyboardKey/KeyboardKey.tailwind.js +5 -8
- package/cjs/Link/ButtonLink.js +1 -10
- package/cjs/Link/Link.js +2 -2
- package/cjs/Medallion/Medallion.js +3 -2
- package/cjs/Medallion/Medallion.tailwind.d.ts +4 -4
- package/cjs/Medallion/Medallion.tailwind.js +8 -11
- package/cjs/Modal/Modal.d.ts +5 -4
- package/cjs/Modal/Modal.js +19 -11
- package/cjs/Modal/Modal.tailwind.d.ts +4 -4
- package/cjs/Modal/Modal.tailwind.js +9 -18
- package/cjs/Modal/components/ModalFooter.d.ts +4 -2
- package/cjs/Modal/components/ModalFooter.js +2 -2
- package/cjs/Modal/components/ModalSection.js +2 -2
- package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +3 -7
- package/cjs/Pagination/CompactPagination/CompactPagination.js +30 -6
- package/cjs/Pagination/DotPagination/DotPagination.d.ts +5 -4
- package/cjs/Pagination/DotPagination/DotPagination.js +20 -4
- package/cjs/Pagination/Pagination/Pagination.d.ts +1 -1
- package/cjs/Pagination/Pagination/Pagination.js +27 -10
- package/cjs/ProgressBar/ProgressBar.js +3 -3
- package/cjs/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
- package/cjs/ProgressBar/ProgressBar.tailwind.js +7 -10
- package/cjs/ProgressSpinner/ProgressSpinner.js +2 -2
- package/cjs/ProgressSpinner/ProgressSpinner.tailwind.d.ts +5 -5
- package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +4 -7
- package/cjs/RadioGroup/RadioButton.d.ts +1 -1
- package/cjs/RadioGroup/RadioButton.js +2 -2
- package/cjs/RadioGroup/RadioButton.tailwind.d.ts +4 -4
- package/cjs/RadioGroup/RadioButton.tailwind.js +11 -14
- package/cjs/RadioGroup/RadioGroup.d.ts +1 -0
- package/cjs/RadioGroup/RadioGroup.js +1 -1
- package/cjs/RangeSlider/RangeSlider.d.ts +1 -1
- package/cjs/RangeSlider/RangeSlider.js +2 -2
- package/cjs/RangeSlider/RangeSlider.tailwind.d.ts +4 -4
- package/cjs/RangeSlider/RangeSlider.tailwind.js +21 -24
- package/cjs/Satellite/Satellite.d.ts +5 -1
- package/cjs/Satellite/Satellite.js +9 -2
- package/cjs/Satellite/SatelliteContext.d.ts +4 -1
- package/cjs/Satellite/SatelliteContext.js +2 -1
- package/cjs/Satellite/index.d.ts +2 -0
- package/cjs/Satellite/index.js +28 -0
- package/cjs/Satellite/locale.d.ts +29 -0
- package/cjs/Satellite/locale.js +21 -0
- package/cjs/Satellite/useCreatePortal.d.ts +4 -0
- package/cjs/Satellite/useCreatePortal.js +29 -0
- package/cjs/ScrollIndicator/ScrollIndicator.d.ts +2 -1
- package/cjs/ScrollIndicator/ScrollIndicator.js +5 -4
- package/cjs/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
- package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
- package/cjs/Select/Select.js +2 -2
- package/cjs/Select/Select.tailwind.d.ts +5 -5
- package/cjs/Select/Select.tailwind.js +5 -8
- package/cjs/Sidebar/Sidebar.d.ts +33 -12
- package/cjs/Sidebar/Sidebar.js +49 -39
- package/cjs/Sidebar/SidebarButtonLink.d.ts +14 -0
- package/cjs/Sidebar/SidebarButtonLink.js +110 -0
- package/cjs/Sidebar/SidebarContext.d.ts +7 -8
- package/cjs/Sidebar/SidebarContext.js +10 -11
- package/cjs/Sidebar/SidebarHeader.d.ts +6 -0
- package/cjs/Sidebar/SidebarHeader.js +29 -0
- package/cjs/Sidebar/SidebarHeading.d.ts +7 -0
- package/cjs/Sidebar/SidebarHeading.js +37 -0
- package/cjs/Sidebar/SidebarLink.d.ts +8 -0
- package/cjs/Sidebar/SidebarLink.js +58 -0
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +47 -0
- package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
- package/cjs/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +14 -23
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +120 -0
- package/cjs/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
- package/cjs/Sidebar/SidebarLinksGroup/index.js +18 -0
- package/cjs/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
- package/cjs/{tailwind-types.js → Sidebar/SidebarLinksGroup/types.js} +0 -0
- package/cjs/Sidebar/SidebarNav.d.ts +10 -0
- package/cjs/Sidebar/SidebarNav.js +48 -0
- package/cjs/Sidebar/index.d.ts +7 -4
- package/cjs/Sidebar/index.js +61 -21
- package/cjs/Sidebar/types.d.ts +6 -2
- package/cjs/Switch/Switch.js +2 -2
- package/cjs/Switch/Switch.tailwind.d.ts +5 -5
- package/cjs/Switch/Switch.tailwind.js +7 -8
- package/cjs/Switch/SwitchOption.d.ts +2 -1
- package/cjs/Switch/SwitchOption.js +1 -1
- package/cjs/Tables/DataTable/DataTable.d.ts +1 -1
- package/cjs/Tables/DataTable/DataTable.js +24 -7
- package/cjs/Tables/DataTable/DataTable.tailwind.d.ts +4 -4
- package/cjs/Tables/DataTable/DataTable.tailwind.js +3 -6
- package/cjs/Tables/DataTable/components/Body.d.ts +3 -2
- package/cjs/Tables/DataTable/components/Body.js +4 -4
- package/cjs/Tables/DataTable/components/HeaderCell.js +3 -3
- package/cjs/Tables/DataTable/components/Loader.d.ts +1 -1
- package/cjs/Tables/DataTable/components/Loader.js +2 -2
- package/cjs/Tables/Table/Table.js +2 -2
- package/cjs/Tables/Table/Table.tailwind.d.ts +4 -4
- package/cjs/Tables/Table/Table.tailwind.js +3 -6
- package/cjs/Tables/Table/components/Footer.js +2 -2
- package/cjs/Tabs/ContentTabs.js +3 -3
- package/cjs/Tabs/LinkTabs.js +2 -2
- package/cjs/Tabs/Tabs.tailwind.d.ts +4 -4
- package/cjs/Tabs/Tabs.tailwind.js +13 -16
- package/cjs/Tabs/components/LinkTab.js +9 -11
- package/cjs/Tag/Tag.d.ts +5 -4
- package/cjs/Tag/Tag.js +17 -9
- package/cjs/Tag/Tag.tailwind.d.ts +4 -4
- package/cjs/Tag/Tag.tailwind.js +6 -9
- package/cjs/TextArea/TextArea.js +2 -2
- package/cjs/TextArea/TextArea.tailwind.d.ts +4 -4
- package/cjs/TextArea/TextArea.tailwind.js +4 -7
- package/cjs/Toggle/Toggle.d.ts +1 -1
- package/cjs/Toggle/Toggle.js +2 -2
- package/cjs/Toggle/Toggle.tailwind.d.ts +5 -5
- package/cjs/Toggle/Toggle.tailwind.js +19 -22
- package/cjs/Tooltip/OverflowTooltipWrapper.js +8 -7
- package/cjs/Tooltip/Tooltip.d.ts +1 -1
- package/cjs/Tooltip/Tooltip.js +2 -2
- package/cjs/Tooltip/Tooltip.tailwind.d.ts +4 -4
- package/cjs/Tooltip/Tooltip.tailwind.js +19 -18
- package/cjs/Tooltip/TooltipWrapper.d.ts +1 -0
- package/cjs/Tooltip/TooltipWrapper.js +8 -7
- package/cjs/Tooltip/types.d.ts +2 -0
- package/cjs/Typography/Typography.tailwind.d.ts +5 -17
- package/cjs/Typography/Typography.tailwind.js +123 -133
- package/cjs/UserContent/UserContent.js +2 -2
- package/cjs/UserContent/UserContent.tailwind.d.ts +4 -1
- package/cjs/UserContent/UserContent.tailwind.js +12 -10
- package/cjs/index.d.ts +0 -1
- package/cjs/index.js +0 -14
- package/cjs/styles/base.tailwind.d.ts +4 -4
- package/cjs/styles/base.tailwind.js +3 -6
- package/cjs/styles/tailwind.config.d.ts +2 -198
- package/cjs/styles/tailwind.config.js +25 -29
- package/cjs/types.d.ts +7 -0
- package/cjs/utilities/utilities.tailwind.d.ts +4 -1
- package/cjs/utilities/utilities.tailwind.js +4 -6
- package/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/cjs/utils/useLinkProps.d.ts +5 -2
- package/cjs/utils/useLinkProps.js +9 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +6 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.js +14 -3
- package/esm/AutoComplete/AutoComplete.d.ts +5 -10
- package/esm/AutoComplete/AutoComplete.js +26 -47
- package/esm/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
- package/esm/AutoComplete/AutoComplete.tailwind.js +10 -13
- package/esm/AutoComplete/utils.d.ts +2 -1
- package/esm/AutoComplete/utils.js +16 -0
- package/esm/Avatars/ApplicationAvatar.js +2 -2
- package/esm/Avatars/UserAvatar.js +1 -1
- package/esm/Avatars/utils.js +12 -4
- package/esm/Badge/Badge.js +1 -1
- package/esm/Banners/Alert/Alert.d.ts +1 -0
- package/esm/Banners/Alert/Alert.js +2 -2
- package/esm/Banners/BigBertha/BigBertha.d.ts +2 -1
- package/esm/Banners/Promote/Promote.d.ts +1 -0
- package/esm/Banners/Promote/Promote.js +1 -1
- package/esm/Button/Button.js +3 -3
- package/esm/Button/Button.tailwind.d.ts +4 -4
- package/esm/Button/Button.tailwind.js +13 -16
- package/esm/Button/ButtonGroup.d.ts +2 -1
- package/esm/Button/ButtonGroup.js +1 -1
- package/esm/Button/IconButton.js +1 -1
- package/esm/Card/Card.js +1 -1
- package/esm/Card/Card.tailwind.d.ts +4 -4
- package/esm/Card/Card.tailwind.js +6 -9
- package/esm/Card/components/CardHeader.js +1 -1
- package/esm/Card/components/CardTitle.d.ts +4 -2
- package/esm/Card/components/CardTitle.js +1 -1
- package/esm/Checkbox/Checkbox.d.ts +2 -2
- package/esm/Checkbox/Checkbox.js +1 -1
- package/esm/Checkbox/Checkbox.tailwind.d.ts +5 -5
- package/esm/Checkbox/Checkbox.tailwind.js +11 -14
- package/esm/ClickAwayContainer/ClickAwayContainer.d.ts +2 -1
- package/esm/DatePicker/DatePicker/DatePicker.js +12 -7
- package/esm/DatePicker/DatePicker.tailwind.d.ts +4 -4
- package/esm/DatePicker/DatePicker.tailwind.js +32 -28
- package/esm/DatePicker/DateRangePicker/DateRangePicker.js +12 -2
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +2 -1
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +1 -1
- package/esm/DatePicker/components/Calendar.d.ts +2 -1
- package/esm/DatePicker/components/FooterActions.d.ts +2 -1
- package/esm/DatePicker/components/FooterActions.js +2 -2
- package/esm/DatePicker/components/Modal.js +5 -4
- package/esm/DatePicker/components/NavBar.d.ts +2 -1
- package/esm/DatePicker/components/NavBar.js +4 -4
- package/esm/DatePicker/utils.d.ts +2 -0
- package/esm/DatePicker/utils.js +7 -0
- package/esm/Dropdown/Dropdown.d.ts +1 -1
- package/esm/Dropdown/Dropdown.js +5 -4
- package/esm/Dropdown/DropdownButton.d.ts +1 -0
- package/esm/Dropdown/components/DropdownButtonItem.js +3 -3
- package/esm/Dropdown/components/DropdownFooterItem.js +1 -1
- package/esm/Dropdown/components/DropdownLinkItem.js +2 -3
- package/esm/Dropdown/components/DropdownTitle.d.ts +4 -2
- package/esm/Dropdown/components/DropdownTitle.js +1 -1
- package/esm/Dropdown/components/DropdownToggleItem.js +3 -3
- package/esm/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/esm/Dropdown/useDropdownItemProps.js +16 -8
- package/esm/Dropzone/Dropzone.d.ts +5 -1
- package/esm/Dropzone/Dropzone.js +15 -6
- package/esm/EmptyState/EmptyState.js +1 -1
- package/esm/EmptyState/EmptyState.tailwind.d.ts +4 -4
- package/esm/EmptyState/EmptyState.tailwind.js +6 -9
- package/esm/Field/Field.d.ts +1 -0
- package/esm/Field/Field.js +1 -1
- package/esm/Flag/Flag.d.ts +1 -0
- package/esm/Flag/Flag.js +16 -3
- package/esm/Flag/Flag.tailwind.d.ts +4 -4
- package/esm/Flag/Flag.tailwind.js +9 -16
- package/esm/Flag/Flags.d.ts +1 -1
- package/esm/Flag/Flags.js +4 -3
- package/esm/Flag/types.d.ts +4 -0
- package/esm/FlexGrid/FlexGrid.d.ts +2 -1
- package/esm/FlexGrid/FlexGrid.js +1 -1
- package/esm/FlexGrid/FlexGrid.tailwind.d.ts +6 -3
- package/esm/FlexGrid/FlexGrid.tailwind.js +8 -11
- package/esm/HelpUnderline/HelpUnderline.js +1 -1
- package/esm/HelpUnderline/HelpUnderline.tailwind.d.ts +4 -4
- package/esm/HelpUnderline/HelpUnderline.tailwind.js +4 -7
- package/esm/Input/Input.d.ts +6 -0
- package/esm/Input/Input.js +16 -5
- package/esm/Input/Input.tailwind.d.ts +4 -4
- package/esm/Input/Input.tailwind.js +14 -17
- package/esm/Insert/Insert.d.ts +1 -0
- package/esm/InstantSearch/InstantSearch.tailwind.d.ts +4 -5
- package/esm/InstantSearch/InstantSearch.tailwind.js +35 -33
- package/esm/KeyboardKey/KeyboardKey.js +4 -3
- package/esm/KeyboardKey/KeyboardKey.tailwind.d.ts +4 -4
- package/esm/KeyboardKey/KeyboardKey.tailwind.js +6 -9
- package/esm/Link/ButtonLink.js +1 -10
- package/esm/Link/Link.js +1 -1
- package/esm/Medallion/Medallion.js +2 -1
- package/esm/Medallion/Medallion.tailwind.d.ts +4 -4
- package/esm/Medallion/Medallion.tailwind.js +8 -11
- package/esm/Modal/Modal.d.ts +5 -4
- package/esm/Modal/Modal.js +15 -8
- package/esm/Modal/Modal.tailwind.d.ts +4 -4
- package/esm/Modal/Modal.tailwind.js +10 -19
- package/esm/Modal/components/ModalFooter.d.ts +4 -2
- package/esm/Modal/components/ModalFooter.js +1 -1
- package/esm/Modal/components/ModalSection.js +1 -1
- package/esm/Pagination/CompactPagination/CompactPagination.d.ts +3 -7
- package/esm/Pagination/CompactPagination/CompactPagination.js +27 -6
- package/esm/Pagination/DotPagination/DotPagination.d.ts +5 -4
- package/esm/Pagination/DotPagination/DotPagination.js +17 -4
- package/esm/Pagination/Pagination/Pagination.d.ts +1 -1
- package/esm/Pagination/Pagination/Pagination.js +25 -10
- package/esm/ProgressBar/ProgressBar.js +1 -1
- package/esm/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
- package/esm/ProgressBar/ProgressBar.tailwind.js +7 -10
- package/esm/ProgressSpinner/ProgressSpinner.js +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.tailwind.d.ts +5 -5
- package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +5 -8
- package/esm/RadioGroup/RadioButton.d.ts +1 -1
- package/esm/RadioGroup/RadioButton.js +1 -1
- package/esm/RadioGroup/RadioButton.tailwind.d.ts +4 -4
- package/esm/RadioGroup/RadioButton.tailwind.js +13 -16
- package/esm/RadioGroup/RadioGroup.d.ts +1 -0
- package/esm/RadioGroup/RadioGroup.js +1 -1
- package/esm/RangeSlider/RangeSlider.d.ts +1 -1
- package/esm/RangeSlider/RangeSlider.js +1 -1
- package/esm/RangeSlider/RangeSlider.tailwind.d.ts +4 -4
- package/esm/RangeSlider/RangeSlider.tailwind.js +21 -24
- package/esm/Satellite/Satellite.d.ts +5 -1
- package/esm/Satellite/Satellite.js +8 -2
- package/esm/Satellite/SatelliteContext.d.ts +4 -1
- package/esm/Satellite/SatelliteContext.js +2 -1
- package/esm/Satellite/index.d.ts +2 -0
- package/esm/Satellite/index.js +2 -0
- package/esm/Satellite/locale.d.ts +29 -0
- package/esm/Satellite/locale.js +8 -0
- package/esm/Satellite/useCreatePortal.d.ts +4 -0
- package/esm/Satellite/useCreatePortal.js +16 -0
- package/esm/ScrollIndicator/ScrollIndicator.d.ts +2 -1
- package/esm/ScrollIndicator/ScrollIndicator.js +3 -2
- package/esm/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
- package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
- package/esm/Select/Select.js +1 -1
- package/esm/Select/Select.tailwind.d.ts +5 -5
- package/esm/Select/Select.tailwind.js +5 -8
- package/esm/Sidebar/Sidebar.d.ts +33 -12
- package/esm/Sidebar/Sidebar.js +45 -30
- package/esm/Sidebar/SidebarButtonLink.d.ts +14 -0
- package/esm/Sidebar/SidebarButtonLink.js +92 -0
- package/esm/Sidebar/SidebarContext.d.ts +7 -8
- package/esm/Sidebar/SidebarContext.js +9 -8
- package/esm/Sidebar/SidebarHeader.d.ts +6 -0
- package/esm/Sidebar/SidebarHeader.js +15 -0
- package/esm/Sidebar/SidebarHeading.d.ts +7 -0
- package/esm/Sidebar/SidebarHeading.js +22 -0
- package/esm/Sidebar/SidebarLink.d.ts +8 -0
- package/esm/Sidebar/SidebarLink.js +42 -0
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +32 -0
- package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
- package/esm/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +13 -19
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +100 -0
- package/esm/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
- package/esm/Sidebar/SidebarLinksGroup/index.js +2 -0
- package/esm/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
- package/esm/{tailwind-types.js → Sidebar/SidebarLinksGroup/types.js} +0 -0
- package/esm/Sidebar/SidebarNav.d.ts +10 -0
- package/esm/Sidebar/SidebarNav.js +33 -0
- package/esm/Sidebar/index.d.ts +7 -4
- package/esm/Sidebar/index.js +7 -4
- package/esm/Sidebar/types.d.ts +6 -2
- package/esm/Switch/Switch.js +1 -1
- package/esm/Switch/Switch.tailwind.d.ts +5 -5
- package/esm/Switch/Switch.tailwind.js +7 -8
- package/esm/Switch/SwitchOption.d.ts +2 -1
- package/esm/Switch/SwitchOption.js +1 -1
- package/esm/Tables/DataTable/DataTable.d.ts +1 -1
- package/esm/Tables/DataTable/DataTable.js +21 -6
- package/esm/Tables/DataTable/DataTable.tailwind.d.ts +4 -4
- package/esm/Tables/DataTable/DataTable.tailwind.js +4 -7
- package/esm/Tables/DataTable/components/Body.d.ts +3 -2
- package/esm/Tables/DataTable/components/Body.js +4 -4
- package/esm/Tables/DataTable/components/HeaderCell.js +1 -1
- package/esm/Tables/DataTable/components/Loader.d.ts +1 -1
- package/esm/Tables/DataTable/components/Loader.js +2 -2
- package/esm/Tables/Table/Table.js +1 -1
- package/esm/Tables/Table/Table.tailwind.d.ts +4 -4
- package/esm/Tables/Table/Table.tailwind.js +4 -7
- package/esm/Tables/Table/components/Footer.js +1 -1
- package/esm/Tabs/ContentTabs.js +1 -1
- package/esm/Tabs/LinkTabs.js +1 -1
- package/esm/Tabs/Tabs.tailwind.d.ts +4 -4
- package/esm/Tabs/Tabs.tailwind.js +14 -17
- package/esm/Tabs/components/LinkTab.js +8 -10
- package/esm/Tag/Tag.d.ts +5 -4
- package/esm/Tag/Tag.js +14 -7
- package/esm/Tag/Tag.tailwind.d.ts +4 -4
- package/esm/Tag/Tag.tailwind.js +7 -10
- package/esm/TextArea/TextArea.js +1 -1
- package/esm/TextArea/TextArea.tailwind.d.ts +4 -4
- package/esm/TextArea/TextArea.tailwind.js +6 -9
- package/esm/Toggle/Toggle.d.ts +1 -1
- package/esm/Toggle/Toggle.js +1 -1
- package/esm/Toggle/Toggle.tailwind.d.ts +5 -5
- package/esm/Toggle/Toggle.tailwind.js +19 -22
- package/esm/Tooltip/OverflowTooltipWrapper.js +5 -4
- package/esm/Tooltip/Tooltip.d.ts +1 -1
- package/esm/Tooltip/Tooltip.js +1 -1
- package/esm/Tooltip/Tooltip.tailwind.d.ts +4 -4
- package/esm/Tooltip/Tooltip.tailwind.js +20 -19
- package/esm/Tooltip/TooltipWrapper.d.ts +1 -0
- package/esm/Tooltip/TooltipWrapper.js +5 -4
- package/esm/Tooltip/types.d.ts +2 -0
- package/esm/Typography/Typography.tailwind.d.ts +5 -17
- package/esm/Typography/Typography.tailwind.js +124 -134
- package/esm/UserContent/UserContent.js +1 -1
- package/esm/UserContent/UserContent.tailwind.d.ts +4 -1
- package/esm/UserContent/UserContent.tailwind.js +13 -11
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/esm/styles/base.tailwind.d.ts +4 -4
- package/esm/styles/base.tailwind.js +4 -7
- package/esm/styles/tailwind.config.d.ts +2 -198
- package/esm/styles/tailwind.config.js +27 -30
- package/esm/types.d.ts +7 -0
- package/esm/utilities/utilities.tailwind.d.ts +4 -1
- package/esm/utilities/utilities.tailwind.js +4 -6
- package/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/esm/utils/useLinkProps.d.ts +5 -2
- package/esm/utils/useLinkProps.js +9 -2
- package/package.json +9 -12
- package/satellite.min.css +2 -4
- package/scss/colors.scss +1 -0
- package/cjs/Banner/Banner.d.ts +0 -85
- package/cjs/Banner/Banner.js +0 -176
- package/cjs/Banner/index.d.ts +0 -2
- package/cjs/Banner/index.js +0 -32
- package/cjs/Sidebar/Sidebar.tailwind.d.ts +0 -5
- package/cjs/Sidebar/Sidebar.tailwind.js +0 -69
- package/cjs/Sidebar/components/SidebarHeader.d.ts +0 -5
- package/cjs/Sidebar/components/SidebarLink.d.ts +0 -9
- package/cjs/Sidebar/components/SidebarLink.js +0 -98
- package/cjs/tailwind-types.d.ts +0 -52
- package/esm/Banner/Banner.d.ts +0 -85
- package/esm/Banner/Banner.js +0 -161
- package/esm/Banner/index.d.ts +0 -2
- package/esm/Banner/index.js +0 -2
- package/esm/Sidebar/Sidebar.tailwind.d.ts +0 -5
- package/esm/Sidebar/Sidebar.tailwind.js +0 -67
- package/esm/Sidebar/components/SidebarHeader.d.ts +0 -5
- package/esm/Sidebar/components/SidebarLink.d.ts +0 -9
- package/esm/Sidebar/components/SidebarLink.js +0 -78
- package/esm/tailwind-types.d.ts +0 -52
- package/satellite.css +0 -196852
@@ -8,31 +8,25 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
8
8
|
|
9
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
10
10
|
|
11
|
-
|
11
|
+
// @ts-check
|
12
|
+
var colors = require("./colors");
|
12
13
|
|
13
|
-
var
|
14
|
+
var makePurgeCssExtractor = require("./helpers/makePurgeCssExtractor.js");
|
14
15
|
|
15
16
|
var rgba = require("./rgba");
|
16
17
|
|
17
|
-
var colors = require("./colors");
|
18
|
-
|
19
18
|
var zIndexes = require("./zIndexes");
|
20
19
|
|
21
|
-
var makePurgeCssExtractor = require("./helpers/makePurgeCssExtractor.js");
|
22
|
-
|
23
20
|
var prefix = "stl-";
|
24
|
-
|
25
|
-
|
26
|
-
layers: ["utilities"],
|
27
|
-
enabled: NODE_ENV === "production" || NODE_ENV === "storybook",
|
28
|
-
content: [NODE_ENV === "production" ? "./src/**/!(*.test|*.stories).{ts,tsx}" : "./src/**/!(*.test).{ts,tsx,mdx}", "./src/**/*.tailwind.js"],
|
29
|
-
options: {
|
30
|
-
defaultExtractor: makePurgeCssExtractor(prefix)
|
31
|
-
}
|
32
|
-
};
|
21
|
+
/** @type {import('tailwindcss').Config} */
|
22
|
+
|
33
23
|
module.exports = {
|
34
24
|
prefix: prefix,
|
35
|
-
|
25
|
+
content: {
|
26
|
+
files: ["./src/**/*.tailwind.js", "./src/**/!(*.test|*.stories).{ts,tsx}"],
|
27
|
+
extract: makePurgeCssExtractor(prefix)
|
28
|
+
},
|
29
|
+
safelist: ["stl-instantsearch"],
|
36
30
|
theme: {
|
37
31
|
fontFamily: {
|
38
32
|
sans: ["-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Helvetica Neue", "Arial", "Noto Sans", "sans-serif", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"],
|
@@ -85,7 +79,8 @@ module.exports = {
|
|
85
79
|
2: "2px",
|
86
80
|
3: "3px"
|
87
81
|
},
|
88
|
-
boxShadow: function boxShadow(
|
82
|
+
boxShadow: function boxShadow(_ref) {
|
83
|
+
var theme = _ref.theme;
|
89
84
|
return {
|
90
85
|
none: "none",
|
91
86
|
z100: "0px 0px 0px 1px ".concat(theme("colors.shadow.5"), ", 0px 1px 3px 0px ").concat(theme("colors.shadow.15")),
|
@@ -112,6 +107,7 @@ module.exports = {
|
|
112
107
|
accent: colors.nebula,
|
113
108
|
inherit: "inherit",
|
114
109
|
transparent: "transparent",
|
110
|
+
current: "currentColor",
|
115
111
|
shadow: {
|
116
112
|
5: rgba(colors.grey[900], 0.05),
|
117
113
|
10: rgba(colors.grey[900], 0.1),
|
@@ -124,19 +120,24 @@ module.exports = {
|
|
124
120
|
"2px": "2px",
|
125
121
|
128: "32rem"
|
126
122
|
},
|
127
|
-
inset: function inset(
|
123
|
+
inset: function inset(_ref2) {
|
124
|
+
var theme = _ref2.theme;
|
128
125
|
return theme("width");
|
129
126
|
},
|
130
|
-
maxWidth: function maxWidth(
|
127
|
+
maxWidth: function maxWidth(_ref3) {
|
128
|
+
var theme = _ref3.theme;
|
131
129
|
return theme("width");
|
132
130
|
},
|
133
|
-
minWidth: function minWidth(
|
131
|
+
minWidth: function minWidth(_ref4) {
|
132
|
+
var theme = _ref4.theme;
|
134
133
|
return theme("width");
|
135
134
|
},
|
136
|
-
maxHeight: function maxHeight(
|
135
|
+
maxHeight: function maxHeight(_ref5) {
|
136
|
+
var theme = _ref5.theme;
|
137
137
|
return theme("height");
|
138
138
|
},
|
139
|
-
minHeight: function minHeight(
|
139
|
+
minHeight: function minHeight(_ref6) {
|
140
|
+
var theme = _ref6.theme;
|
140
141
|
return theme("height");
|
141
142
|
},
|
142
143
|
zIndex: zIndexes,
|
@@ -144,12 +145,7 @@ module.exports = {
|
|
144
145
|
grab: "grab",
|
145
146
|
help: "help"
|
146
147
|
}
|
147
|
-
}
|
148
|
-
typography: typography.styles
|
149
|
-
},
|
150
|
-
variants: {
|
151
|
-
borderWidth: ["responsive", "first"],
|
152
|
-
visibility: ["responsive", "group-hover"]
|
148
|
+
}
|
153
149
|
},
|
154
|
-
plugins: [require("./base.tailwind"), require("../utilities/utilities.tailwind"),
|
150
|
+
plugins: [require("./base.tailwind"), require("../utilities/utilities.tailwind"), require("../Typography/Typography.tailwind"), require("../FlexGrid/FlexGrid.tailwind"), require("../AutoComplete/AutoComplete.tailwind"), require("../Button/Button.tailwind"), require("../Card/Card.tailwind"), require("../Checkbox/Checkbox.tailwind"), require("../EmptyState/EmptyState.tailwind"), require("../Flag/Flag.tailwind"), require("../HelpUnderline/HelpUnderline.tailwind"), require("../Input/Input.tailwind"), require("../InstantSearch/InstantSearch.tailwind"), require("../KeyboardKey/KeyboardKey.tailwind"), require("../Medallion/Medallion.tailwind"), require("../Modal/Modal.tailwind"), require("../ProgressBar/ProgressBar.tailwind"), require("../ProgressSpinner/ProgressSpinner.tailwind"), require("../RadioGroup/RadioButton.tailwind"), require("../RangeSlider/RangeSlider.tailwind"), require("../ScrollIndicator/ScrollIndicator.tailwind"), require("../Select/Select.tailwind"), require("../Switch/Switch.tailwind"), require("../Tabs/Tabs.tailwind"), require("../Tables/DataTable/DataTable.tailwind"), require("../Tables/Table/Table.tailwind"), require("../Tag/Tag.tailwind"), require("../TextArea/TextArea.tailwind"), require("../Toggle/Toggle.tailwind"), require("../Tooltip/Tooltip.tailwind"), require("../UserContent/UserContent.tailwind"), require("../DatePicker/DatePicker.tailwind")]
|
155
151
|
};
|
package/cjs/types.d.ts
CHANGED
@@ -10,3 +10,10 @@ export declare type ColorVariant = "accent" | "grey" | "green" | "blue" | "orang
|
|
10
10
|
export declare type AtLeastOne<T, U = {
|
11
11
|
[K in keyof T]: Pick<T, K>;
|
12
12
|
}> = Partial<T> & U[keyof U];
|
13
|
+
/**
|
14
|
+
* Makes an optional property required
|
15
|
+
* See https://bobbyhadz.com/blog/typescript-make-property-required
|
16
|
+
*/
|
17
|
+
export declare type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
|
18
|
+
[Property in Key]-?: Type[Property];
|
19
|
+
};
|
@@ -5,11 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
5
5
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
6
6
|
|
7
7
|
// @ts-check
|
8
|
+
var plugin = require("tailwindcss/plugin");
|
8
9
|
|
9
|
-
|
10
|
-
* @type {import('../tailwind-types').TailwindPlugin}
|
11
|
-
*/
|
12
|
-
module.exports = function (_ref) {
|
10
|
+
module.exports = plugin(function (_ref) {
|
13
11
|
var addUtilities = _ref.addUtilities;
|
14
12
|
addUtilities({
|
15
13
|
".no-scrollbar": {
|
@@ -20,7 +18,7 @@ module.exports = function (_ref) {
|
|
20
18
|
// for Chrome, Safari, and Opera
|
21
19
|
"&::-webkit-scrollbar": {
|
22
20
|
display: "none",
|
23
|
-
width:
|
21
|
+
width: "0px"
|
24
22
|
}
|
25
23
|
},
|
26
24
|
".no-search-input-decoration": {
|
@@ -29,4 +27,4 @@ module.exports = function (_ref) {
|
|
29
27
|
})
|
30
28
|
}
|
31
29
|
});
|
32
|
-
};
|
30
|
+
});
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const isCssPropertySupported: <P extends number | "
|
1
|
+
declare const isCssPropertySupported: <P extends number | "filter" | "fill" | "animationName" | "all" | "offset" | "height" | "width" | "left" | "top" | "item" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationPlayState" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "blockSize" | "border" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolation" | "colorInterpolationFilters" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "contain" | "content" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "fillOpacity" | "fillRule" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "floodColor" | "floodOpacity" | "font" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "fontWeight" | "gap" | "grid" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hyphens" | "imageOrientation" | "imageRendering" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lightingColor" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetRotate" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "pointerEvents" | "position" | "quotes" | "resize" | "right" | "rotate" | "rowGap" | "rubyPosition" | "scale" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textAnchor" | "textCombineUpright" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "visibility" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "widows" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
|
2
2
|
export default isCssPropertySupported;
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import type { AnchorHTMLAttributes } from "react";
|
2
|
-
export declare type
|
3
|
-
|
2
|
+
export declare type UseLinkPropsArgs = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "onClick" | "target" | "rel" | "role" | "tabIndex"> & {
|
3
|
+
disabled?: boolean;
|
4
|
+
};
|
5
|
+
export declare type UseLinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "href" | "onClick" | "target" | "rel" | "role" | "tabIndex" | "aria-disabled">;
|
6
|
+
export declare const useLinkProps: (props: UseLinkPropsArgs) => UseLinkProps;
|
4
7
|
export default useLinkProps;
|
@@ -47,11 +47,18 @@ var useLinkProps = function useLinkProps(props) {
|
|
47
47
|
var isExternal = router.isExternalLocation(parsedLocation);
|
48
48
|
var target = (_props$target = props.target) !== null && _props$target !== void 0 ? _props$target : router.shouldOpenInNewTab(parsedLocation) ? "_blank" : undefined;
|
49
49
|
var rel = (_props$rel = props.rel) !== null && _props$rel !== void 0 ? _props$rel : isExternal ? "noopener noreferrer" : undefined;
|
50
|
-
return {
|
50
|
+
return props.disabled ? {
|
51
|
+
role: "link",
|
52
|
+
target: target,
|
53
|
+
tabIndex: -1,
|
54
|
+
"aria-disabled": true
|
55
|
+
} : {
|
51
56
|
target: target,
|
52
57
|
href: href,
|
53
58
|
rel: rel,
|
54
|
-
onClick: onClick
|
59
|
+
onClick: onClick,
|
60
|
+
role: props.role,
|
61
|
+
tabIndex: props.tabIndex
|
55
62
|
};
|
56
63
|
};
|
57
64
|
|
@@ -1,10 +1,14 @@
|
|
1
1
|
import type { FunctionComponent, HTMLAttributes } from "react";
|
2
2
|
export declare type AnnouncementBadgeSizes = "default" | "small";
|
3
|
+
export declare type AnnouncementBadgeTexts = "new" | "beta" | "internal" | "pilot";
|
4
|
+
export declare type AnnouncementBadgeLocale = {
|
5
|
+
[key in AnnouncementBadgeTexts]?: string;
|
6
|
+
};
|
3
7
|
export interface AnnouncementBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
4
8
|
size?: AnnouncementBadgeSizes;
|
5
|
-
text?:
|
9
|
+
text?: AnnouncementBadgeTexts;
|
6
10
|
variant?: "accent" | "red";
|
7
|
-
locale?:
|
11
|
+
locale?: AnnouncementBadgeLocale;
|
8
12
|
children?: never;
|
9
13
|
}
|
10
14
|
export declare const AnnouncementBadge: FunctionComponent<AnnouncementBadgeProps>;
|
@@ -9,9 +9,16 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
9
9
|
|
10
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
11
11
|
|
12
|
-
import cx from "
|
12
|
+
import cx from "clsx";
|
13
|
+
import { useLocale } from "../Satellite";
|
13
14
|
import stl from "../styles/helpers/satellitePrefixer";
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
|
+
var DEFAULT_LOCALE = {
|
17
|
+
beta: "beta",
|
18
|
+
internal: "internal",
|
19
|
+
"new": "new",
|
20
|
+
pilot: "pilot"
|
21
|
+
};
|
15
22
|
var DEFAULT_CLASSNAME = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["capitalize inline-block rounded-full text-white select-none"])));
|
16
23
|
var SIZE_CLASSNAMES = {
|
17
24
|
"default": stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["display-body h-6 leading-md px-2"]))),
|
@@ -24,13 +31,17 @@ export var AnnouncementBadge = function AnnouncementBadge(_ref) {
|
|
24
31
|
text = _ref$text === void 0 ? "new" : _ref$text,
|
25
32
|
variantProp = _ref.variant,
|
26
33
|
className = _ref.className,
|
27
|
-
|
34
|
+
propsLocale = _ref.locale,
|
28
35
|
props = _objectWithoutProperties(_ref, _excluded);
|
29
36
|
|
37
|
+
var contextLocale = useLocale("announcementBadge");
|
38
|
+
|
39
|
+
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_LOCALE), contextLocale), propsLocale);
|
40
|
+
|
30
41
|
var variant = typeof variantProp === "string" ? variantProp : text === "internal" ? "red" : "accent";
|
31
42
|
return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({}, props), {}, {
|
32
43
|
className: cx(DEFAULT_CLASSNAME, variant === "red" ? stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-red-600"]))) : stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["bg-accent-600"]))), SIZE_CLASSNAMES[size], className),
|
33
|
-
children: locale
|
44
|
+
children: locale[text]
|
34
45
|
}));
|
35
46
|
};
|
36
47
|
export default AnnouncementBadge;
|
@@ -10,7 +10,7 @@ interface State {
|
|
10
10
|
showAllResults: boolean;
|
11
11
|
}
|
12
12
|
declare type DefaultOptionProps = OptionItemProps & {
|
13
|
-
|
13
|
+
optionItemPrefix?: AutoCompleteLocale["optionItemPrefix"];
|
14
14
|
};
|
15
15
|
/**
|
16
16
|
* Autocomplete is a search-as-you-type function that matches what a person types, usually the beginning of a word, or a prefix, with a word list. Not to be confused with auto-suggestion that predicts the end of a query.
|
@@ -29,6 +29,7 @@ declare type DefaultOptionProps = OptionItemProps & {
|
|
29
29
|
* - Style different data
|
30
30
|
*/
|
31
31
|
export declare class AutoComplete<T extends Option = Option> extends Component<AutoCompleteProps<T>, State> {
|
32
|
+
static contextType: import("react").Context<import("../Satellite").SatelliteContextType>;
|
32
33
|
static defaultProps: {
|
33
34
|
clearable: boolean;
|
34
35
|
creatable: boolean;
|
@@ -38,15 +39,8 @@ export declare class AutoComplete<T extends Option = Option> extends Component<A
|
|
38
39
|
options: never[];
|
39
40
|
separatorKeyCodes: never[];
|
40
41
|
separatorKeys: never[];
|
41
|
-
optionItemComponent: ({
|
42
|
+
optionItemComponent: ({ optionItemPrefix, ...props }: DefaultOptionProps) => JSX.Element;
|
42
43
|
noWrap: boolean;
|
43
|
-
locale: {
|
44
|
-
clearInputButton: string;
|
45
|
-
emptyStateTitle: string;
|
46
|
-
itemsAvailable: (resultCount: number) => string;
|
47
|
-
showMoreButton: (extraResults: number) => string;
|
48
|
-
optionItemPrefix: (multiple: boolean) => "Add" | "Use";
|
49
|
-
};
|
50
44
|
};
|
51
45
|
state: State;
|
52
46
|
inputContainerRef: HTMLDivElement | null;
|
@@ -62,10 +56,11 @@ export declare class AutoComplete<T extends Option = Option> extends Component<A
|
|
62
56
|
handleChange: (option: T) => void;
|
63
57
|
handleShowAllResults: (evt: MouseEvent<HTMLButtonElement>) => void;
|
64
58
|
removeValue: (removedOption: T) => void;
|
65
|
-
getA11yStatusMessage: (options: A11yStatusMessageOptions<
|
59
|
+
getA11yStatusMessage: (options: A11yStatusMessageOptions<Option>) => any;
|
66
60
|
renderInput: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
|
67
61
|
renderMenu: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>) => JSX.Element;
|
68
62
|
renderSelect: (autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
|
63
|
+
private get locale();
|
69
64
|
render(): JSX.Element;
|
70
65
|
}
|
71
66
|
export default AutoComplete;
|
@@ -12,7 +12,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
12
12
|
|
13
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
14
14
|
|
15
|
-
var _excluded = ["
|
15
|
+
var _excluded = ["optionItemPrefix"];
|
16
16
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
18
18
|
|
@@ -28,7 +28,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
28
28
|
|
29
29
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
30
30
|
|
31
|
-
import cx from "
|
31
|
+
import cx from "clsx";
|
32
32
|
import Downshift from "downshift";
|
33
33
|
import { Component } from "react";
|
34
34
|
import { createPortal } from "react-dom";
|
@@ -37,14 +37,14 @@ import { Popper } from "react-popper";
|
|
37
37
|
import Button from "../Button";
|
38
38
|
import Card from "../Card";
|
39
39
|
import { FieldStateContext } from "../Field/FieldStateContext";
|
40
|
+
import { SatelliteContext } from "../Satellite";
|
40
41
|
import ScrollIndicator from "../ScrollIndicator";
|
41
42
|
import stl from "../styles/helpers/satellitePrefixer";
|
42
43
|
import Tag from "../Tag";
|
43
|
-
import pluralize from "../utils/pluralize";
|
44
44
|
import uniqBy from "../utils/uniqBy";
|
45
45
|
import AutoCompleteEmptyState from "./components/AutoCompleteEmptyState";
|
46
46
|
import DefaultOptionItem from "./components/DefaultOptionItem";
|
47
|
-
import { defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
|
47
|
+
import { DEFAULT_AUTOCOMPLETE_LOCALE, defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
|
48
48
|
import { jsx as _jsx } from "react/jsx-runtime";
|
49
49
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
50
50
|
|
@@ -112,26 +112,19 @@ var BACKSPACE_KEY_CODE = 8;
|
|
112
112
|
|
113
113
|
/** @ignore */
|
114
114
|
var DefaultEmptyState = function DefaultEmptyState(_ref) {
|
115
|
-
var
|
116
|
-
|
117
|
-
var locale = _ref.locale;
|
115
|
+
var emptyStateTitle = _ref.emptyStateTitle;
|
118
116
|
return /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
|
119
|
-
title:
|
117
|
+
title: emptyStateTitle
|
120
118
|
});
|
121
119
|
};
|
122
120
|
|
123
|
-
/** @ignore */
|
124
121
|
var DefaultOption = function DefaultOption(_ref2) {
|
125
|
-
var
|
122
|
+
var optionItemPrefix = _ref2.optionItemPrefix,
|
126
123
|
props = _objectWithoutProperties(_ref2, _excluded);
|
127
124
|
|
128
125
|
return /*#__PURE__*/_jsx(DefaultOptionItem, _objectSpread(_objectSpread({}, props), {}, {
|
129
126
|
locale: {
|
130
|
-
optionItemPrefix:
|
131
|
-
var _locale$optionItemPre, _locale$optionItemPre2;
|
132
|
-
|
133
|
-
return (_locale$optionItemPre = locale === null || locale === void 0 ? void 0 : (_locale$optionItemPre2 = locale.optionItemPrefix) === null || _locale$optionItemPre2 === void 0 ? void 0 : _locale$optionItemPre2.call(locale, multiple)) !== null && _locale$optionItemPre !== void 0 ? _locale$optionItemPre : AutoComplete.defaultProps.locale.optionItemPrefix(multiple);
|
134
|
-
}
|
127
|
+
optionItemPrefix: optionItemPrefix !== null && optionItemPrefix !== void 0 ? optionItemPrefix : DEFAULT_AUTOCOMPLETE_LOCALE.optionItemPrefix
|
135
128
|
}
|
136
129
|
}));
|
137
130
|
};
|
@@ -346,23 +339,17 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
346
339
|
}
|
347
340
|
|
348
341
|
if (!options.resultCount) {
|
349
|
-
|
350
|
-
|
351
|
-
return (_this$props$locale$em = (_this$props$locale = _this.props.locale) === null || _this$props$locale === void 0 ? void 0 : _this$props$locale.emptyStateTitle) !== null && _this$props$locale$em !== void 0 ? _this$props$locale$em : "";
|
342
|
+
return _this.locale.emptyStateTitle;
|
352
343
|
}
|
353
344
|
|
354
345
|
if (options.resultCount > 0) {
|
355
|
-
|
356
|
-
|
357
|
-
return (_this$props$locale$it = (_this$props$locale2 = _this.props.locale) === null || _this$props$locale2 === void 0 ? void 0 : (_this$props$locale2$i = _this$props$locale2.itemsAvailable) === null || _this$props$locale2$i === void 0 ? void 0 : _this$props$locale2$i.call(_this$props$locale2, options.resultCount)) !== null && _this$props$locale$it !== void 0 ? _this$props$locale$it : "";
|
346
|
+
return _this.locale.itemsAvailable(options.resultCount);
|
358
347
|
}
|
359
348
|
|
360
349
|
return "";
|
361
350
|
});
|
362
351
|
|
363
352
|
_defineProperty(_assertThisInitialized(_this), "renderInput", function (results, autocompleteHelpers, fieldState) {
|
364
|
-
var _this$props$locale3;
|
365
|
-
|
366
353
|
var _this$props3 = _this.props,
|
367
354
|
id = _this$props3.id,
|
368
355
|
placeholder = _this$props3.placeholder,
|
@@ -428,7 +415,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
428
415
|
onClick: _this.handleFakeInputClick,
|
429
416
|
ref: _this.handleInputContainerRefUpdate,
|
430
417
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
431
|
-
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["mr-4
|
418
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["mr-4 shrink-0 ", ""])), disabled ? "text-grey-200" : inputFocused ? "text-accent-600" : "text-grey-500"),
|
432
419
|
size: "1rem"
|
433
420
|
}), /*#__PURE__*/_jsxs("div", {
|
434
421
|
className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex items-center flex-1 ", " ", ""])), !noWrap && "flex-wrap", multiple && "-ml-1"), valuesClassName),
|
@@ -460,7 +447,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
460
447
|
type: "button",
|
461
448
|
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["w-6 flex items-center justify-center text-grey-500"]))),
|
462
449
|
onClick: _this.handleClearClick,
|
463
|
-
"aria-label":
|
450
|
+
"aria-label": _this.locale.clearInputButton,
|
464
451
|
children: /*#__PURE__*/_jsx(X, {
|
465
452
|
size: ".75rem"
|
466
453
|
})
|
@@ -479,7 +466,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
479
466
|
isOpen = autocompleteHelpers.isOpen;
|
480
467
|
|
481
468
|
var defaultEmptyState = /*#__PURE__*/_jsx(DefaultEmptyState, {
|
482
|
-
|
469
|
+
emptyStateTitle: _this.locale.emptyStateTitle
|
483
470
|
});
|
484
471
|
|
485
472
|
var _this$props4 = _this.props,
|
@@ -522,8 +509,6 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
522
509
|
referenceElement: (_this$inputContainerR3 = _this.inputContainerRef) !== null && _this$inputContainerR3 !== void 0 ? _this$inputContainerR3 : undefined,
|
523
510
|
modifiers: MENU_POPPER_MODFIERS,
|
524
511
|
children: function children(popper) {
|
525
|
-
var _this$props$locale4, _this$props$locale4$s;
|
526
|
-
|
527
512
|
return /*#__PURE__*/_jsx("div", {
|
528
513
|
className: cx(stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["z-dropdown"]))), menuClassName),
|
529
514
|
style: _objectSpread(_objectSpread({}, popper.style), dropdownStyle),
|
@@ -547,7 +532,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
547
532
|
children: /*#__PURE__*/_jsx(OptionItem, _objectSpread(_objectSpread({}, optionItemProps), {}, {
|
548
533
|
highlighted: index === highlightedIndex,
|
549
534
|
option: result,
|
550
|
-
|
535
|
+
optionItemPrefix: _this.locale.optionItemPrefix
|
551
536
|
}))
|
552
537
|
}), result.value);
|
553
538
|
}), extraResults > 0 && !showAllResults && /*#__PURE__*/_jsx("li", {
|
@@ -556,7 +541,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
556
541
|
variant: "subtle",
|
557
542
|
size: "small",
|
558
543
|
onMouseDown: _this.handleShowAllResults,
|
559
|
-
children:
|
544
|
+
children: _this.locale.showMoreButton(extraResults)
|
560
545
|
})
|
561
546
|
})]
|
562
547
|
}))
|
@@ -571,6 +556,8 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
571
556
|
});
|
572
557
|
|
573
558
|
_defineProperty(_assertThisInitialized(_this), "renderSelect", function (autocompleteHelpers, fieldState) {
|
559
|
+
var _this$context$portalT;
|
560
|
+
|
574
561
|
var _this$props5 = _this.props,
|
575
562
|
className = _this$props5.className,
|
576
563
|
options = _this$props5.options,
|
@@ -588,7 +575,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
588
575
|
|
589
576
|
return /*#__PURE__*/_jsxs("div", {
|
590
577
|
className: className,
|
591
|
-
children: [_this.renderInput(results, autocompleteHelpers, fieldState), _this.inputContainerRef && /*#__PURE__*/createPortal(_this.renderMenu(results, autocompleteHelpers), document.body)]
|
578
|
+
children: [_this.renderInput(results, autocompleteHelpers, fieldState), _this.inputContainerRef && /*#__PURE__*/createPortal(_this.renderMenu(results, autocompleteHelpers), (_this$context$portalT = _this.context["portalTarget"]) !== null && _this$context$portalT !== void 0 ? _this$context$portalT : document.body)]
|
592
579
|
});
|
593
580
|
});
|
594
581
|
|
@@ -611,6 +598,11 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
611
598
|
});
|
612
599
|
}
|
613
600
|
}
|
601
|
+
}, {
|
602
|
+
key: "locale",
|
603
|
+
get: function get() {
|
604
|
+
return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_AUTOCOMPLETE_LOCALE), this.context["locales"]), this.props.locale);
|
605
|
+
}
|
614
606
|
}, {
|
615
607
|
key: "render",
|
616
608
|
value: function render() {
|
@@ -645,6 +637,8 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
645
637
|
return AutoComplete;
|
646
638
|
}(Component);
|
647
639
|
|
640
|
+
_defineProperty(AutoComplete, "contextType", SatelliteContext);
|
641
|
+
|
648
642
|
_defineProperty(AutoComplete, "defaultProps", {
|
649
643
|
clearable: false,
|
650
644
|
creatable: false,
|
@@ -655,22 +649,7 @@ _defineProperty(AutoComplete, "defaultProps", {
|
|
655
649
|
separatorKeyCodes: [],
|
656
650
|
separatorKeys: [],
|
657
651
|
optionItemComponent: DefaultOption,
|
658
|
-
noWrap: false
|
659
|
-
locale: {
|
660
|
-
clearInputButton: "Clear input value",
|
661
|
-
emptyStateTitle: "No matches found",
|
662
|
-
itemsAvailable: function itemsAvailable(resultCount) {
|
663
|
-
return "".concat(pluralize(resultCount, "item is", {
|
664
|
-
plural: "items are"
|
665
|
-
}), " available");
|
666
|
-
},
|
667
|
-
showMoreButton: function showMoreButton(extraResults) {
|
668
|
-
return "Show ".concat(pluralize(extraResults, "result"), " more");
|
669
|
-
},
|
670
|
-
optionItemPrefix: function optionItemPrefix(multiple) {
|
671
|
-
return multiple ? "Add" : "Use";
|
672
|
-
}
|
673
|
-
}
|
652
|
+
noWrap: false
|
674
653
|
});
|
675
654
|
|
676
655
|
export default AutoComplete;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export = autoCompletePlugin;
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
declare const autoCompletePlugin: {
|
3
|
+
handler: import("tailwindcss/types/config").PluginCreator;
|
4
|
+
config?: import("tailwindcss").Config | undefined;
|
5
|
+
};
|
@@ -1,13 +1,11 @@
|
|
1
1
|
import _rgba from "../styles/rgba";
|
2
2
|
import _disabledColor from "../styles/disabledColor";
|
3
|
+
import _plugin from "tailwindcss/plugin";
|
3
4
|
// @ts-check
|
5
|
+
var plugin = _plugin;
|
4
6
|
var disabledColor = _disabledColor;
|
5
7
|
var rgba = _rgba;
|
6
|
-
|
7
|
-
* @type {import('../tailwind-types').TailwindPlugin}
|
8
|
-
*/
|
9
|
-
|
10
|
-
var autoCompletePlugin = function autoCompletePlugin(_ref) {
|
8
|
+
var autoCompletePlugin = plugin(function (_ref) {
|
11
9
|
var addComponents = _ref.addComponents,
|
12
10
|
theme = _ref.theme;
|
13
11
|
addComponents({
|
@@ -30,14 +28,14 @@ var autoCompletePlugin = function autoCompletePlugin(_ref) {
|
|
30
28
|
"&::after": {
|
31
29
|
content: '" "',
|
32
30
|
display: "block",
|
33
|
-
minHeight:
|
31
|
+
minHeight: "30px",
|
34
32
|
// don't ask me why 30
|
35
|
-
fontSize:
|
33
|
+
fontSize: "0px"
|
36
34
|
},
|
37
35
|
"&.autocomplete-large": {
|
38
36
|
minHeight: "3rem",
|
39
37
|
"&::after": {
|
40
|
-
minHeight:
|
38
|
+
minHeight: "38px" // don't ask me why 38
|
41
39
|
|
42
40
|
}
|
43
41
|
}
|
@@ -67,12 +65,12 @@ var autoCompletePlugin = function autoCompletePlugin(_ref) {
|
|
67
65
|
scrollbarWidth: "none",
|
68
66
|
msOverflowStyle: "-ms-autohiding-scrollbar",
|
69
67
|
"&::-webkit-scrollbar": {
|
70
|
-
width:
|
71
|
-
height:
|
68
|
+
width: "0px",
|
69
|
+
height: "0px"
|
72
70
|
}
|
73
71
|
},
|
74
72
|
".autocomplete-input": {
|
75
|
-
flex: 1,
|
73
|
+
flex: "1",
|
76
74
|
backgroundColor: "transparent",
|
77
75
|
caretColor: theme("colors.grey.600"),
|
78
76
|
color: theme("colors.grey.900"),
|
@@ -92,6 +90,5 @@ var autoCompletePlugin = function autoCompletePlugin(_ref) {
|
|
92
90
|
}
|
93
91
|
}
|
94
92
|
});
|
95
|
-
};
|
96
|
-
|
93
|
+
});
|
97
94
|
export default autoCompletePlugin;
|