@algolia/satellite 1.0.0-beta.132 → 1.0.0-beta.135
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 -1
- package/cjs/AnnouncementBadge/AnnouncementBadge.js +15 -2
- package/cjs/AutoComplete/AutoComplete.d.ts +19 -14
- package/cjs/AutoComplete/AutoComplete.js +65 -18
- package/cjs/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
- package/cjs/AutoComplete/AutoComplete.tailwind.js +10 -13
- package/cjs/AutoComplete/components/DefaultOptionItem.d.ts +6 -2
- package/cjs/AutoComplete/components/DefaultOptionItem.js +5 -2
- package/cjs/AutoComplete/types.d.ts +26 -18
- package/cjs/AutoComplete/utils.d.ts +5 -4
- package/cjs/AutoComplete/utils.js +22 -2
- package/cjs/Avatars/ApplicationAvatar.js +1 -1
- package/cjs/Banners/Alert/Alert.d.ts +1 -0
- package/cjs/Banners/Alert/Alert.js +1 -1
- package/cjs/Banners/BigBertha/BigBertha.d.ts +2 -1
- package/cjs/Banners/Promote/Promote.d.ts +1 -0
- package/cjs/Button/Button.js +2 -2
- 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/Card/Card.tailwind.d.ts +4 -4
- package/cjs/Card/Card.tailwind.js +5 -8
- package/cjs/Card/components/CardTitle.d.ts +4 -2
- package/cjs/Checkbox/Checkbox.d.ts +1 -1
- 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.d.ts +5 -11
- package/cjs/DatePicker/DatePicker/DatePicker.js +17 -7
- package/cjs/DatePicker/DatePicker.tailwind.d.ts +4 -4
- package/cjs/DatePicker/DatePicker.tailwind.js +19 -14
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.d.ts +5 -11
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +25 -8
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +3 -0
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +3 -2
- package/cjs/DatePicker/components/Calendar.d.ts +5 -1
- package/cjs/DatePicker/components/Calendar.js +3 -1
- package/cjs/DatePicker/components/Display.d.ts +1 -1
- package/cjs/DatePicker/components/FooterActions.d.ts +3 -0
- package/cjs/DatePicker/components/FooterActions.js +4 -3
- package/cjs/DatePicker/components/Modal.d.ts +2 -2
- package/cjs/DatePicker/components/Modal.js +5 -4
- package/cjs/DatePicker/components/NavBar.d.ts +5 -1
- package/cjs/DatePicker/components/NavBar.js +4 -3
- package/cjs/DatePicker/types.d.ts +17 -0
- package/cjs/{tailwind-types.js → DatePicker/types.js} +0 -0
- 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 +5 -4
- package/cjs/Dropdown/DropdownButton.d.ts +1 -0
- package/cjs/Dropdown/components/DropdownButtonItem.js +2 -2
- package/cjs/Dropdown/components/DropdownLinkItem.js +1 -2
- package/cjs/Dropdown/components/DropdownTitle.d.ts +4 -2
- package/cjs/Dropdown/components/DropdownToggleItem.js +2 -2
- package/cjs/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/cjs/Dropdown/useDropdownItemProps.js +16 -7
- package/cjs/Dropzone/Dropzone.d.ts +5 -1
- package/cjs/Dropzone/Dropzone.js +14 -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/Flag/Flag.d.ts +1 -0
- package/cjs/Flag/Flag.js +17 -2
- 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.tailwind.d.ts +6 -3
- package/cjs/FlexGrid/FlexGrid.tailwind.js +8 -11
- package/cjs/HelpUnderline/HelpUnderline.d.ts +1 -0
- 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 +15 -4
- 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.d.ts +1 -0
- package/cjs/KeyboardKey/KeyboardKey.js +3 -2
- 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/Medallion/Medallion.tailwind.d.ts +4 -4
- package/cjs/Medallion/Medallion.tailwind.js +8 -11
- package/cjs/Modal/Modal.d.ts +5 -2
- package/cjs/Modal/Modal.js +16 -9
- 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/Pagination/CompactPagination/CompactPagination.d.ts +8 -0
- package/cjs/Pagination/CompactPagination/CompactPagination.js +29 -5
- package/cjs/Pagination/DotPagination/DotPagination.d.ts +5 -1
- package/cjs/Pagination/DotPagination/DotPagination.js +21 -2
- package/cjs/Pagination/Pagination/Pagination.d.ts +7 -1
- package/cjs/Pagination/Pagination/Pagination.js +32 -8
- package/cjs/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
- package/cjs/ProgressBar/ProgressBar.tailwind.js +7 -10
- 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.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.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 +4 -1
- package/cjs/ScrollIndicator/ScrollIndicator.js +2 -1
- package/cjs/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
- package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
- package/cjs/Select/Select.tailwind.d.ts +5 -5
- package/cjs/Select/Select.tailwind.js +5 -8
- package/cjs/Sidebar/Sidebar.d.ts +33 -10
- package/cjs/Sidebar/Sidebar.js +48 -38
- 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 +6 -0
- package/cjs/Sidebar/SidebarHeading.js +35 -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/Sidebar/SidebarLinksGroup/types.js +5 -0
- package/cjs/Sidebar/SidebarNav.d.ts +9 -0
- package/cjs/Sidebar/SidebarNav.js +46 -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.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 +11 -1
- package/cjs/Tables/DataTable/DataTable.js +25 -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 +6 -5
- package/cjs/Tables/DataTable/components/Loader.d.ts +3 -1
- package/cjs/Tables/DataTable/components/Loader.js +4 -3
- package/cjs/Tables/Table/Table.tailwind.d.ts +4 -4
- package/cjs/Tables/Table/Table.tailwind.js +3 -6
- package/cjs/Tabs/Tabs.tailwind.d.ts +4 -4
- package/cjs/Tabs/Tabs.tailwind.js +13 -16
- package/cjs/Tabs/components/LinkTab.js +7 -9
- package/cjs/Tag/Tag.d.ts +5 -1
- package/cjs/Tag/Tag.js +15 -6
- package/cjs/Tag/Tag.tailwind.d.ts +4 -4
- package/cjs/Tag/Tag.tailwind.js +6 -9
- 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.tailwind.d.ts +5 -5
- package/cjs/Toggle/Toggle.tailwind.js +19 -22
- package/cjs/Tooltip/OverflowTooltipWrapper.d.ts +1 -0
- package/cjs/Tooltip/OverflowTooltipWrapper.js +6 -4
- package/cjs/Tooltip/Tooltip.d.ts +1 -1
- 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 +5 -4
- 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.tailwind.d.ts +4 -1
- package/cjs/UserContent/UserContent.tailwind.js +11 -9
- 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/pluralize.js +6 -1
- package/cjs/utils/useLinkProps.d.ts +5 -2
- package/cjs/utils/useLinkProps.js +9 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +6 -1
- package/esm/AnnouncementBadge/AnnouncementBadge.js +14 -2
- package/esm/AutoComplete/AutoComplete.d.ts +19 -14
- package/esm/AutoComplete/AutoComplete.js +67 -18
- package/esm/AutoComplete/AutoComplete.tailwind.d.ts +4 -4
- package/esm/AutoComplete/AutoComplete.tailwind.js +10 -13
- package/esm/AutoComplete/components/DefaultOptionItem.d.ts +6 -2
- package/esm/AutoComplete/components/DefaultOptionItem.js +5 -2
- package/esm/AutoComplete/types.d.ts +26 -18
- package/esm/AutoComplete/utils.d.ts +5 -4
- package/esm/AutoComplete/utils.js +16 -0
- package/esm/Avatars/ApplicationAvatar.js +1 -1
- package/esm/Banners/Alert/Alert.d.ts +1 -0
- package/esm/Banners/Alert/Alert.js +1 -1
- package/esm/Banners/BigBertha/BigBertha.d.ts +2 -1
- package/esm/Banners/Promote/Promote.d.ts +1 -0
- package/esm/Button/Button.js +2 -2
- 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/Card/Card.tailwind.d.ts +4 -4
- package/esm/Card/Card.tailwind.js +6 -9
- package/esm/Card/components/CardTitle.d.ts +4 -2
- package/esm/Checkbox/Checkbox.d.ts +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.d.ts +5 -11
- package/esm/DatePicker/DatePicker/DatePicker.js +16 -7
- package/esm/DatePicker/DatePicker.tailwind.d.ts +4 -4
- package/esm/DatePicker/DatePicker.tailwind.js +19 -15
- package/esm/DatePicker/DateRangePicker/DateRangePicker.d.ts +5 -11
- package/esm/DatePicker/DateRangePicker/DateRangePicker.js +23 -7
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +3 -0
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +3 -2
- package/esm/DatePicker/components/Calendar.d.ts +5 -1
- package/esm/DatePicker/components/Calendar.js +3 -1
- package/esm/DatePicker/components/Display.d.ts +1 -1
- package/esm/DatePicker/components/FooterActions.d.ts +3 -0
- package/esm/DatePicker/components/FooterActions.js +4 -3
- package/esm/DatePicker/components/Modal.d.ts +2 -2
- package/esm/DatePicker/components/Modal.js +4 -3
- package/esm/DatePicker/components/NavBar.d.ts +5 -1
- package/esm/DatePicker/components/NavBar.js +4 -3
- package/esm/DatePicker/types.d.ts +17 -0
- package/esm/{tailwind-types.js → DatePicker/types.js} +0 -0
- 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 +4 -3
- package/esm/Dropdown/DropdownButton.d.ts +1 -0
- package/esm/Dropdown/components/DropdownButtonItem.js +2 -2
- package/esm/Dropdown/components/DropdownLinkItem.js +1 -2
- package/esm/Dropdown/components/DropdownTitle.d.ts +4 -2
- package/esm/Dropdown/components/DropdownToggleItem.js +2 -2
- package/esm/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/esm/Dropdown/useDropdownItemProps.js +15 -7
- package/esm/Dropzone/Dropzone.d.ts +5 -1
- package/esm/Dropzone/Dropzone.js +13 -4
- 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/Flag/Flag.d.ts +1 -0
- package/esm/Flag/Flag.js +15 -2
- 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.tailwind.d.ts +6 -3
- package/esm/FlexGrid/FlexGrid.tailwind.js +8 -11
- package/esm/HelpUnderline/HelpUnderline.d.ts +1 -0
- 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 +15 -4
- 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.d.ts +1 -0
- package/esm/KeyboardKey/KeyboardKey.js +3 -2
- 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/Medallion/Medallion.tailwind.d.ts +4 -4
- package/esm/Medallion/Medallion.tailwind.js +8 -11
- package/esm/Modal/Modal.d.ts +5 -2
- package/esm/Modal/Modal.js +14 -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/Pagination/CompactPagination/CompactPagination.d.ts +8 -0
- package/esm/Pagination/CompactPagination/CompactPagination.js +26 -5
- package/esm/Pagination/DotPagination/DotPagination.d.ts +5 -1
- package/esm/Pagination/DotPagination/DotPagination.js +18 -2
- package/esm/Pagination/Pagination/Pagination.d.ts +7 -1
- package/esm/Pagination/Pagination/Pagination.js +30 -8
- package/esm/ProgressBar/ProgressBar.tailwind.d.ts +5 -5
- package/esm/ProgressBar/ProgressBar.tailwind.js +7 -10
- 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.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.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 +4 -1
- package/esm/ScrollIndicator/ScrollIndicator.js +2 -1
- package/esm/ScrollIndicator/ScrollIndicator.tailwind.d.ts +4 -4
- package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +8 -11
- package/esm/Select/Select.tailwind.d.ts +5 -5
- package/esm/Select/Select.tailwind.js +5 -8
- package/esm/Sidebar/Sidebar.d.ts +33 -10
- package/esm/Sidebar/Sidebar.js +44 -29
- 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 +6 -0
- package/esm/Sidebar/SidebarHeading.js +20 -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/Sidebar/SidebarLinksGroup/types.js +1 -0
- package/esm/Sidebar/SidebarNav.d.ts +9 -0
- package/esm/Sidebar/SidebarNav.js +31 -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.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 +11 -1
- package/esm/Tables/DataTable/DataTable.js +22 -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 +6 -5
- package/esm/Tables/DataTable/components/Loader.d.ts +3 -1
- package/esm/Tables/DataTable/components/Loader.js +4 -3
- package/esm/Tables/Table/Table.tailwind.d.ts +4 -4
- package/esm/Tables/Table/Table.tailwind.js +4 -7
- package/esm/Tabs/Tabs.tailwind.d.ts +4 -4
- package/esm/Tabs/Tabs.tailwind.js +14 -17
- package/esm/Tabs/components/LinkTab.js +7 -9
- package/esm/Tag/Tag.d.ts +5 -1
- package/esm/Tag/Tag.js +14 -6
- package/esm/Tag/Tag.tailwind.d.ts +4 -4
- package/esm/Tag/Tag.tailwind.js +7 -10
- 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.tailwind.d.ts +5 -5
- package/esm/Toggle/Toggle.tailwind.js +19 -22
- package/esm/Tooltip/OverflowTooltipWrapper.d.ts +1 -0
- package/esm/Tooltip/OverflowTooltipWrapper.js +6 -3
- package/esm/Tooltip/Tooltip.d.ts +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 +4 -3
- 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.tailwind.d.ts +4 -1
- package/esm/UserContent/UserContent.tailwind.js +12 -10
- 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/pluralize.js +6 -1
- package/esm/utils/useLinkProps.d.ts +5 -2
- package/esm/utils/useLinkProps.js +9 -2
- package/package.json +8 -11
- 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
@@ -1,14 +1,17 @@
|
|
1
|
-
import { ControllerStateAndHelpers } from "downshift";
|
1
|
+
import type { A11yStatusMessageOptions, ControllerStateAndHelpers } from "downshift";
|
2
2
|
import { Component } from "react";
|
3
3
|
import type { ChangeEvent, FocusEvent, KeyboardEvent, MouseEvent } from "react";
|
4
4
|
import { FieldState } from "../Field/FieldStateContext";
|
5
|
-
import type { AutoCompleteProps, Option } from "./types";
|
5
|
+
import type { AutoCompleteLocale, AutoCompleteProps, Option, OptionItemProps } from "./types";
|
6
6
|
interface State {
|
7
7
|
inputFocused: boolean;
|
8
8
|
inputValue: string;
|
9
9
|
inputWidth?: number;
|
10
10
|
showAllResults: boolean;
|
11
11
|
}
|
12
|
+
declare type DefaultOptionProps = OptionItemProps & {
|
13
|
+
optionItemPrefix?: AutoCompleteLocale["optionItemPrefix"];
|
14
|
+
};
|
12
15
|
/**
|
13
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.
|
14
17
|
*
|
@@ -25,37 +28,39 @@ interface State {
|
|
25
28
|
* - Provide matching results quickly
|
26
29
|
* - Style different data
|
27
30
|
*/
|
28
|
-
export declare class AutoComplete<T extends Option> extends Component<AutoCompleteProps
|
31
|
+
export declare class AutoComplete<T extends Option = Option> extends Component<AutoCompleteProps<T>, State> {
|
32
|
+
static contextType: import("react").Context<import("../Satellite").SatelliteContextType>;
|
29
33
|
static defaultProps: {
|
30
34
|
clearable: boolean;
|
31
35
|
creatable: boolean;
|
32
36
|
multiple: boolean;
|
33
37
|
maxResults: number;
|
34
|
-
|
35
|
-
createFromInputValue: import("./types").CreateFromInputValue;
|
38
|
+
createFromInputValue: <T_1 extends Option = Option>(options: T_1[] | undefined, inputValue: string) => Option[];
|
36
39
|
options: never[];
|
37
40
|
separatorKeyCodes: never[];
|
38
41
|
separatorKeys: never[];
|
39
|
-
optionItemComponent:
|
42
|
+
optionItemComponent: ({ optionItemPrefix, ...props }: DefaultOptionProps) => JSX.Element;
|
40
43
|
noWrap: boolean;
|
41
44
|
};
|
42
45
|
state: State;
|
43
46
|
inputContainerRef: HTMLDivElement | null;
|
44
47
|
inputRef: HTMLInputElement | null;
|
45
|
-
componentDidUpdate(prevProps: AutoCompleteProps): void;
|
48
|
+
componentDidUpdate(prevProps: AutoCompleteProps<T>): void;
|
46
49
|
handleClearClick: () => void;
|
47
50
|
handleFakeInputClick: () => void | null;
|
48
|
-
handleInputBlur: (state: ControllerStateAndHelpers<Option>) => (evt: FocusEvent<HTMLInputElement>) => void;
|
51
|
+
handleInputBlur: (state: ControllerStateAndHelpers<T | Option>) => (evt: FocusEvent<HTMLInputElement>) => void;
|
49
52
|
handleInputChange: (evt: ChangeEvent<HTMLInputElement>) => void;
|
50
53
|
handleInputContainerRefUpdate: (el: HTMLDivElement | null) => void;
|
51
54
|
updateInputWidth: () => void;
|
52
|
-
handleKeyDown: (state: ControllerStateAndHelpers<Option>) => (evt: KeyboardEvent<any>) => void;
|
53
|
-
handleChange: (option:
|
55
|
+
handleKeyDown: (state: ControllerStateAndHelpers<T | Option>) => (evt: KeyboardEvent<any>) => void;
|
56
|
+
handleChange: (option: T) => void;
|
54
57
|
handleShowAllResults: (evt: MouseEvent<HTMLButtonElement>) => void;
|
55
|
-
removeValue: (removedOption:
|
56
|
-
|
57
|
-
|
58
|
-
|
58
|
+
removeValue: (removedOption: T) => void;
|
59
|
+
getA11yStatusMessage: (options: A11yStatusMessageOptions<Option>) => any;
|
60
|
+
renderInput: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
|
61
|
+
renderMenu: (results: T[], autocompleteHelpers: ControllerStateAndHelpers<T | Option>) => JSX.Element;
|
62
|
+
renderSelect: (autocompleteHelpers: ControllerStateAndHelpers<T | Option>, fieldState: FieldState) => JSX.Element;
|
63
|
+
private get locale();
|
59
64
|
render(): JSX.Element;
|
60
65
|
}
|
61
66
|
export default AutoComplete;
|
@@ -8,17 +8,20 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
9
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
11
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
11
12
|
|
12
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
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; }
|
15
|
+
var _excluded = ["optionItemPrefix"];
|
17
16
|
|
18
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); }; }
|
19
18
|
|
20
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
21
20
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
22
|
+
|
23
|
+
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; }
|
24
|
+
|
22
25
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
23
26
|
|
24
27
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
@@ -34,14 +37,14 @@ import { Popper } from "react-popper";
|
|
34
37
|
import Button from "../Button";
|
35
38
|
import Card from "../Card";
|
36
39
|
import { FieldStateContext } from "../Field/FieldStateContext";
|
40
|
+
import { SatelliteContext } from "../Satellite";
|
37
41
|
import ScrollIndicator from "../ScrollIndicator";
|
38
42
|
import stl from "../styles/helpers/satellitePrefixer";
|
39
43
|
import Tag from "../Tag";
|
40
|
-
import pluralize from "../utils/pluralize";
|
41
44
|
import uniqBy from "../utils/uniqBy";
|
42
45
|
import AutoCompleteEmptyState from "./components/AutoCompleteEmptyState";
|
43
46
|
import DefaultOptionItem from "./components/DefaultOptionItem";
|
44
|
-
import { defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
|
47
|
+
import { DEFAULT_AUTOCOMPLETE_LOCALE, defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
|
45
48
|
import { jsx as _jsx } from "react/jsx-runtime";
|
46
49
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
47
50
|
|
@@ -107,9 +110,24 @@ var MENU_POPPER_MODFIERS = [{
|
|
107
110
|
}];
|
108
111
|
var BACKSPACE_KEY_CODE = 8;
|
109
112
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
+
/** @ignore */
|
114
|
+
var DefaultEmptyState = function DefaultEmptyState(_ref) {
|
115
|
+
var emptyStateTitle = _ref.emptyStateTitle;
|
116
|
+
return /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
|
117
|
+
title: emptyStateTitle
|
118
|
+
});
|
119
|
+
};
|
120
|
+
|
121
|
+
var DefaultOption = function DefaultOption(_ref2) {
|
122
|
+
var optionItemPrefix = _ref2.optionItemPrefix,
|
123
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
124
|
+
|
125
|
+
return /*#__PURE__*/_jsx(DefaultOptionItem, _objectSpread(_objectSpread({}, props), {}, {
|
126
|
+
locale: {
|
127
|
+
optionItemPrefix: optionItemPrefix !== null && optionItemPrefix !== void 0 ? optionItemPrefix : DEFAULT_AUTOCOMPLETE_LOCALE.optionItemPrefix
|
128
|
+
}
|
129
|
+
}));
|
130
|
+
};
|
113
131
|
/**
|
114
132
|
* 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.
|
115
133
|
*
|
@@ -315,6 +333,22 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
315
333
|
_this.props.onChange(newOptions);
|
316
334
|
});
|
317
335
|
|
336
|
+
_defineProperty(_assertThisInitialized(_this), "getA11yStatusMessage", function (options) {
|
337
|
+
if (!options.isOpen) {
|
338
|
+
return "";
|
339
|
+
}
|
340
|
+
|
341
|
+
if (!options.resultCount) {
|
342
|
+
return _this.locale.emptyStateTitle;
|
343
|
+
}
|
344
|
+
|
345
|
+
if (options.resultCount > 0) {
|
346
|
+
return _this.locale.itemsAvailable(options.resultCount);
|
347
|
+
}
|
348
|
+
|
349
|
+
return "";
|
350
|
+
});
|
351
|
+
|
318
352
|
_defineProperty(_assertThisInitialized(_this), "renderInput", function (results, autocompleteHelpers, fieldState) {
|
319
353
|
var _this$props3 = _this.props,
|
320
354
|
id = _this$props3.id,
|
@@ -381,7 +415,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
381
415
|
onClick: _this.handleFakeInputClick,
|
382
416
|
ref: _this.handleInputContainerRefUpdate,
|
383
417
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
384
|
-
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"),
|
385
419
|
size: "1rem"
|
386
420
|
}), /*#__PURE__*/_jsxs("div", {
|
387
421
|
className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex items-center flex-1 ", " ", ""])), !noWrap && "flex-wrap", multiple && "-ml-1"), valuesClassName),
|
@@ -413,7 +447,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
413
447
|
type: "button",
|
414
448
|
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["w-6 flex items-center justify-center text-grey-500"]))),
|
415
449
|
onClick: _this.handleClearClick,
|
416
|
-
"aria-label":
|
450
|
+
"aria-label": _this.locale.clearInputButton,
|
417
451
|
children: /*#__PURE__*/_jsx(X, {
|
418
452
|
size: ".75rem"
|
419
453
|
})
|
@@ -430,12 +464,17 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
430
464
|
highlightedIndex = autocompleteHelpers.highlightedIndex,
|
431
465
|
inputValue = autocompleteHelpers.inputValue,
|
432
466
|
isOpen = autocompleteHelpers.isOpen;
|
467
|
+
|
468
|
+
var defaultEmptyState = /*#__PURE__*/_jsx(DefaultEmptyState, {
|
469
|
+
emptyStateTitle: _this.locale.emptyStateTitle
|
470
|
+
});
|
471
|
+
|
433
472
|
var _this$props4 = _this.props,
|
434
473
|
menuClassName = _this$props4.menuClassName,
|
435
474
|
menuSize = _this$props4.menuSize,
|
436
|
-
_this$props4$emptySta = _this$props4.emptyState,
|
437
|
-
emptyState = _this$props4$emptySta === void 0 ? AutoComplete.defaultProps.emptyState : _this$props4$emptySta,
|
438
475
|
menuFooter = _this$props4.menuFooter,
|
476
|
+
_this$props4$emptySta = _this$props4.emptyState,
|
477
|
+
emptyState = _this$props4$emptySta === void 0 ? defaultEmptyState : _this$props4$emptySta,
|
439
478
|
_this$props4$maxResul = _this$props4.maxResults,
|
440
479
|
maxResults = _this$props4$maxResul === void 0 ? AutoComplete.defaultProps.maxResults : _this$props4$maxResul,
|
441
480
|
_this$props4$multiple = _this$props4.multiple,
|
@@ -492,16 +531,17 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
492
531
|
})), {}, {
|
493
532
|
children: /*#__PURE__*/_jsx(OptionItem, _objectSpread(_objectSpread({}, optionItemProps), {}, {
|
494
533
|
highlighted: index === highlightedIndex,
|
495
|
-
option: result
|
534
|
+
option: result,
|
535
|
+
optionItemPrefix: _this.locale.optionItemPrefix
|
496
536
|
}))
|
497
537
|
}), result.value);
|
498
538
|
}), extraResults > 0 && !showAllResults && /*#__PURE__*/_jsx("li", {
|
499
539
|
className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["p-2 text-right"]))),
|
500
|
-
children: /*#__PURE__*/
|
540
|
+
children: /*#__PURE__*/_jsx(Button, {
|
501
541
|
variant: "subtle",
|
502
542
|
size: "small",
|
503
543
|
onMouseDown: _this.handleShowAllResults,
|
504
|
-
children:
|
544
|
+
children: _this.locale.showMoreButton(extraResults)
|
505
545
|
})
|
506
546
|
})]
|
507
547
|
}))
|
@@ -516,6 +556,8 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
516
556
|
});
|
517
557
|
|
518
558
|
_defineProperty(_assertThisInitialized(_this), "renderSelect", function (autocompleteHelpers, fieldState) {
|
559
|
+
var _this$context$portalT;
|
560
|
+
|
519
561
|
var _this$props5 = _this.props,
|
520
562
|
className = _this$props5.className,
|
521
563
|
options = _this$props5.options,
|
@@ -533,7 +575,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
533
575
|
|
534
576
|
return /*#__PURE__*/_jsxs("div", {
|
535
577
|
className: className,
|
536
|
-
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)]
|
537
579
|
});
|
538
580
|
});
|
539
581
|
|
@@ -556,6 +598,11 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
556
598
|
});
|
557
599
|
}
|
558
600
|
}
|
601
|
+
}, {
|
602
|
+
key: "locale",
|
603
|
+
get: function get() {
|
604
|
+
return _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_AUTOCOMPLETE_LOCALE), this.context["locales"]), this.props.locale);
|
605
|
+
}
|
559
606
|
}, {
|
560
607
|
key: "render",
|
561
608
|
value: function render() {
|
@@ -574,6 +621,7 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
574
621
|
*/
|
575
622
|
,
|
576
623
|
selectedItem: null,
|
624
|
+
getA11yStatusMessage: _this2.getA11yStatusMessage,
|
577
625
|
onChange: _this2.handleChange,
|
578
626
|
itemToString: optionToString,
|
579
627
|
defaultHighlightedIndex: 0,
|
@@ -589,17 +637,18 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
589
637
|
return AutoComplete;
|
590
638
|
}(Component);
|
591
639
|
|
640
|
+
_defineProperty(AutoComplete, "contextType", SatelliteContext);
|
641
|
+
|
592
642
|
_defineProperty(AutoComplete, "defaultProps", {
|
593
643
|
clearable: false,
|
594
644
|
creatable: false,
|
595
645
|
multiple: false,
|
596
646
|
maxResults: 7,
|
597
|
-
emptyState: defaultEmptyState,
|
598
647
|
createFromInputValue: defaultCreateFromInputValue,
|
599
648
|
options: [],
|
600
649
|
separatorKeyCodes: [],
|
601
650
|
separatorKeys: [],
|
602
|
-
optionItemComponent:
|
651
|
+
optionItemComponent: DefaultOption,
|
603
652
|
noWrap: false
|
604
653
|
});
|
605
654
|
|
@@ -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;
|
@@ -1,3 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { AutoCompleteLocale, OptionItemProps } from "../types";
|
3
|
+
declare type DefaultOptionItemProps = OptionItemProps & {
|
4
|
+
locale?: AutoCompleteLocale;
|
5
|
+
};
|
6
|
+
declare const DefaultOptionItem: ({ option, multiple, locale }: DefaultOptionItemProps) => JSX.Element;
|
3
7
|
export default DefaultOptionItem;
|
@@ -12,13 +12,16 @@ var metadataSpacer = /*#__PURE__*/_jsx("span", {
|
|
12
12
|
});
|
13
13
|
|
14
14
|
var DefaultOptionItem = function DefaultOptionItem(_ref) {
|
15
|
+
var _locale$optionItemPre;
|
16
|
+
|
15
17
|
var option = _ref.option,
|
16
|
-
multiple = _ref.multiple
|
18
|
+
multiple = _ref.multiple,
|
19
|
+
locale = _ref.locale;
|
17
20
|
return /*#__PURE__*/_jsxs("div", {
|
18
21
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate py-2"]))),
|
19
22
|
children: [/*#__PURE__*/_jsx("span", {
|
20
23
|
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["font-semibold text-md text-grey-900"]))),
|
21
|
-
children: option["new"] ? "".concat(
|
24
|
+
children: option["new"] ? "".concat(locale === null || locale === void 0 ? void 0 : (_locale$optionItemPre = locale.optionItemPrefix) === null || _locale$optionItemPre === void 0 ? void 0 : _locale$optionItemPre.call(locale, multiple), " ").concat(option.label) : option.label
|
22
25
|
}), option.metadata && option.metadata.length > 0 && /*#__PURE__*/_jsx("ul", {
|
23
26
|
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex text-grey-600"]))),
|
24
27
|
children: option.metadata.map(function (metadata, idx) {
|
@@ -1,7 +1,14 @@
|
|
1
1
|
import type { ComponentType, FocusEventHandler, ReactNode } from "react";
|
2
2
|
import type { IconComponentType } from "../types";
|
3
3
|
export declare type AutoCompleteVariant = "medium" | "large";
|
4
|
-
export
|
4
|
+
export declare type AutoCompleteLocale = {
|
5
|
+
emptyStateTitle?: string;
|
6
|
+
clearInputButton?: string;
|
7
|
+
itemsAvailable?: (resultCount: number) => string;
|
8
|
+
showMoreButton?: (extraResults: number) => string;
|
9
|
+
optionItemPrefix?: (multiple: boolean) => string;
|
10
|
+
};
|
11
|
+
export interface AutoCompleteBaseProps<T extends Option = Option> {
|
5
12
|
id?: string;
|
6
13
|
icon?: IconComponentType;
|
7
14
|
name?: string;
|
@@ -12,7 +19,7 @@ export interface AutoCompleteBaseProps {
|
|
12
19
|
placeholder?: string;
|
13
20
|
disabled?: boolean;
|
14
21
|
autoFocus?: boolean;
|
15
|
-
options?:
|
22
|
+
options?: T[];
|
16
23
|
inputValue?: string;
|
17
24
|
onTextChange?: (text: string) => any;
|
18
25
|
onFocus?: FocusEventHandler<HTMLInputElement>;
|
@@ -21,13 +28,13 @@ export interface AutoCompleteBaseProps {
|
|
21
28
|
clearable?: boolean;
|
22
29
|
selectOnBlur?: boolean;
|
23
30
|
maxResults?: number;
|
24
|
-
createFromInputValue?: CreateFromInputValue
|
31
|
+
createFromInputValue?: CreateFromInputValue<T>;
|
25
32
|
separatorKeyCodes?: number[];
|
26
33
|
separatorKeys?: string[];
|
27
|
-
renderValueTemplate?: (args: RenderValueTemplateArgs) => JSX.Element;
|
34
|
+
renderValueTemplate?: (args: RenderValueTemplateArgs<T>) => JSX.Element;
|
28
35
|
emptyState?: ReactNode;
|
29
36
|
menuFooter?: ReactNode;
|
30
|
-
optionItemComponent?: OptionItemComponentType
|
37
|
+
optionItemComponent?: OptionItemComponentType<T>;
|
31
38
|
/** Keep the input on a single line */
|
32
39
|
noWrap?: boolean;
|
33
40
|
endItem?: ReactNode;
|
@@ -36,18 +43,19 @@ export interface AutoCompleteBaseProps {
|
|
36
43
|
* @default "medium"
|
37
44
|
*/
|
38
45
|
menuSize?: "medium" | "large";
|
46
|
+
locale?: AutoCompleteLocale;
|
39
47
|
}
|
40
|
-
export interface AutoCompleteSingleProps extends AutoCompleteBaseProps {
|
48
|
+
export interface AutoCompleteSingleProps<T extends Option = Option> extends AutoCompleteBaseProps<T> {
|
41
49
|
multiple?: false;
|
42
|
-
value?:
|
43
|
-
onChange: (option:
|
50
|
+
value?: T;
|
51
|
+
onChange: (option: T | null) => void;
|
44
52
|
}
|
45
|
-
export interface AutoCompleteMultiProps extends AutoCompleteBaseProps {
|
53
|
+
export interface AutoCompleteMultiProps<T extends Option = Option> extends AutoCompleteBaseProps<T> {
|
46
54
|
multiple: true;
|
47
|
-
value?:
|
48
|
-
onChange: (option:
|
55
|
+
value?: T[];
|
56
|
+
onChange: (option: T[] | null) => void;
|
49
57
|
}
|
50
|
-
export declare type AutoCompleteProps = AutoCompleteMultiProps | AutoCompleteSingleProps
|
58
|
+
export declare type AutoCompleteProps<T extends Option = Option> = AutoCompleteMultiProps<T> | AutoCompleteSingleProps<T>;
|
51
59
|
declare type OptionsValue = string | number | boolean;
|
52
60
|
export interface Option {
|
53
61
|
value: OptionsValue;
|
@@ -57,22 +65,22 @@ export interface Option {
|
|
57
65
|
disabled?: boolean;
|
58
66
|
bypassNeedleMatch?: boolean;
|
59
67
|
}
|
60
|
-
export interface OptionItemProps {
|
61
|
-
option:
|
68
|
+
export interface OptionItemProps<T extends Option = Option> {
|
69
|
+
option: T;
|
62
70
|
multiple: boolean;
|
63
71
|
inputValue: string;
|
64
72
|
highlighted: boolean;
|
65
73
|
}
|
66
|
-
export declare type OptionItemComponentType = ComponentType<OptionItemProps
|
74
|
+
export declare type OptionItemComponentType<T extends Option = Option> = ComponentType<OptionItemProps<T>>;
|
67
75
|
export interface OptionRendererParams {
|
68
76
|
multiple: boolean;
|
69
77
|
inputValue: string;
|
70
78
|
highlighted: boolean;
|
71
79
|
}
|
72
|
-
export interface RenderValueTemplateArgs {
|
73
|
-
option:
|
80
|
+
export interface RenderValueTemplateArgs<T extends Option = Option> {
|
81
|
+
option: T;
|
74
82
|
key: string;
|
75
83
|
editable: boolean;
|
76
84
|
}
|
77
|
-
export declare type CreateFromInputValue = (options:
|
85
|
+
export declare type CreateFromInputValue<T extends Option = Option> = (options: T[] | undefined, inputValue: string) => Option[];
|
78
86
|
export {};
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import type { AutoCompleteMultiProps, AutoCompleteProps,
|
2
|
-
export declare function isAutoCompleteMultiProps(props: AutoCompleteProps): props is AutoCompleteMultiProps
|
3
|
-
export declare const defaultCreateFromInputValue:
|
4
|
-
export declare const caseInsensitiveCreateFromInputValue:
|
1
|
+
import type { AutoCompleteLocale, AutoCompleteMultiProps, AutoCompleteProps, Option } from "./types";
|
2
|
+
export declare function isAutoCompleteMultiProps<T extends Option = Option>(props: AutoCompleteProps<T>): props is AutoCompleteMultiProps<T>;
|
3
|
+
export declare const defaultCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
|
4
|
+
export declare const caseInsensitiveCreateFromInputValue: <T extends Option = Option>(options: T[] | undefined, inputValue: string) => Option[];
|
5
|
+
export declare const DEFAULT_AUTOCOMPLETE_LOCALE: Required<AutoCompleteLocale>;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import pluralize from "../utils/pluralize";
|
1
2
|
export function isAutoCompleteMultiProps(props) {
|
2
3
|
return Boolean(props.multiple);
|
3
4
|
}
|
@@ -24,4 +25,19 @@ export var caseInsensitiveCreateFromInputValue = function caseInsensitiveCreateF
|
|
24
25
|
return createFromInputValue(options, inputValue, function (option) {
|
25
26
|
return option.value.toString().toLowerCase() === inputValue.toLowerCase();
|
26
27
|
});
|
28
|
+
};
|
29
|
+
export var DEFAULT_AUTOCOMPLETE_LOCALE = {
|
30
|
+
clearInputButton: "Clear input value",
|
31
|
+
emptyStateTitle: "No matches found",
|
32
|
+
itemsAvailable: function itemsAvailable(count) {
|
33
|
+
return "".concat(pluralize(count, "item is", {
|
34
|
+
plural: "items are"
|
35
|
+
}), " available");
|
36
|
+
},
|
37
|
+
optionItemPrefix: function optionItemPrefix(multiple) {
|
38
|
+
return multiple ? "Add" : "Use";
|
39
|
+
},
|
40
|
+
showMoreButton: function showMoreButton(extraResults) {
|
41
|
+
return "Show ".concat(pluralize(extraResults, "result"), " more");
|
42
|
+
}
|
27
43
|
};
|
@@ -18,7 +18,7 @@ export var ApplicationAvatar = function ApplicationAvatar(_ref) {
|
|
18
18
|
_ref$size = _ref.size,
|
19
19
|
size = _ref$size === void 0 ? "medium" : _ref$size;
|
20
20
|
return /*#__PURE__*/_jsx("div", {
|
21
|
-
className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["rounded inline-flex
|
21
|
+
className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["rounded inline-flex shrink-0 items-center justify-center uppercase"]))), pickApplicationColors(application.applicationId), SIZE_CLASSNAMES[size], className),
|
22
22
|
style: size === "small" ? {
|
23
23
|
fontSize: "8px"
|
24
24
|
} : {},
|
@@ -18,6 +18,7 @@ export interface AlertProps {
|
|
18
18
|
usageContext?: AlertContextType;
|
19
19
|
icon?: IconComponentType;
|
20
20
|
onDismiss?(): void;
|
21
|
+
children: ReactNode;
|
21
22
|
}
|
22
23
|
/**
|
23
24
|
* Alerts inform users about important changes or temporally conditions. Use this component if you need to communicate something to users in a prominent way.
|
@@ -106,7 +106,7 @@ export var Alert = function Alert(_ref) {
|
|
106
106
|
className: containerClassName,
|
107
107
|
style: style,
|
108
108
|
children: [/*#__PURE__*/_jsx(Icon, {
|
109
|
-
className: cx(stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n
|
109
|
+
className: cx(stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n shrink-0 mr-2\n ", "\n "])), title ? "mt-1" : "mt-2px"), ICON_CLASSNAME_VARIANTS[variant]),
|
110
110
|
size: "1rem"
|
111
111
|
}), /*#__PURE__*/_jsxs("div", {
|
112
112
|
className: stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["flex flex-1 flex-col ", ""])), onDismiss && "mr-6"),
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import type { FC } from "react";
|
1
|
+
import type { FC, ReactNode } from "react";
|
2
2
|
import type { IconComponentType } from "../../types";
|
3
3
|
export interface BigBerthaProps {
|
4
4
|
icon?: IconComponentType;
|
5
|
+
children: ReactNode;
|
5
6
|
}
|
6
7
|
/**
|
7
8
|
* Major product wide announcement from Algolia to the users.
|
@@ -17,6 +17,7 @@ export declare type PromoteProps = {
|
|
17
17
|
/** Buttons */
|
18
18
|
actions?: ReactNode;
|
19
19
|
onDismiss?(): void;
|
20
|
+
children: ReactNode;
|
20
21
|
} & (CompactPromoteProps | WidePromoteProps);
|
21
22
|
/**
|
22
23
|
* A contextual way of showing our user that a new feature / product is available to them on a higher plan or as an option.
|
package/esm/Button/Button.js
CHANGED
@@ -68,12 +68,12 @@ export var Button = function Button(props) {
|
|
68
68
|
size: BUTTON_LOADER_ICON_SIZES[size],
|
69
69
|
thickness: 1
|
70
70
|
}), StartIcon && /*#__PURE__*/_jsx(StartIcon, {
|
71
|
-
className: cx(stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["
|
71
|
+
className: cx(stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["shrink-0 pr-2"]))), iconClassNames)
|
72
72
|
}), /*#__PURE__*/_jsx("span", {
|
73
73
|
className: cx(stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["truncate text-center"]))), textClassNames),
|
74
74
|
children: children
|
75
75
|
}), EndIcon && /*#__PURE__*/_jsx(EndIcon, {
|
76
|
-
className: cx(stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["
|
76
|
+
className: cx(stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["shrink-0 pl-2"]))), iconClassNames)
|
77
77
|
})]
|
78
78
|
}));
|
79
79
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export = buttonPlugin;
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
declare const buttonPlugin: {
|
3
|
+
handler: import("tailwindcss/types/config").PluginCreator;
|
4
|
+
config?: import("tailwindcss").Config | undefined;
|
5
|
+
};
|
@@ -1,13 +1,11 @@
|
|
1
|
-
import _disabledColor from "../styles/disabledColor";
|
2
1
|
import _rgba from "../styles/rgba";
|
2
|
+
import _disabledColor from "../styles/disabledColor";
|
3
|
+
import _plugin from "tailwindcss/plugin";
|
3
4
|
// @ts-check
|
4
|
-
var
|
5
|
+
var plugin = _plugin;
|
5
6
|
var disabledColor = _disabledColor;
|
6
|
-
|
7
|
-
|
8
|
-
*/
|
9
|
-
|
10
|
-
var buttonPlugin = function buttonPlugin(_ref) {
|
7
|
+
var rgba = _rgba;
|
8
|
+
var buttonPlugin = plugin(function (_ref) {
|
11
9
|
var addComponents = _ref.addComponents,
|
12
10
|
theme = _ref.theme;
|
13
11
|
// Button
|
@@ -135,24 +133,23 @@ var buttonPlugin = function buttonPlugin(_ref) {
|
|
135
133
|
display: "flex",
|
136
134
|
flexWrap: "nowrap",
|
137
135
|
"& > .btn:not(:first-child):not(:last-child), & > :not(:first-child):not(:last-child) .btn": {
|
138
|
-
borderRadius:
|
136
|
+
borderRadius: "0px"
|
139
137
|
},
|
140
138
|
"& > .btn:first-child, & > :first-child .btn": {
|
141
|
-
borderTopRightRadius:
|
142
|
-
borderBottomRightRadius:
|
139
|
+
borderTopRightRadius: "0px",
|
140
|
+
borderBottomRightRadius: "0px"
|
143
141
|
},
|
144
142
|
"& > .btn:not(:first-child), & > :not(:first-child) .btn": {
|
145
|
-
marginLeft: -
|
143
|
+
marginLeft: "-1px"
|
146
144
|
},
|
147
145
|
"& > .btn:last-child, & > :last-child .btn": {
|
148
|
-
borderTopLeftRadius:
|
149
|
-
borderBottomLeftRadius:
|
146
|
+
borderTopLeftRadius: "0px",
|
147
|
+
borderBottomLeftRadius: "0px"
|
150
148
|
},
|
151
149
|
"& .btn:active, & .btn-active, & .btn:focus": {
|
152
|
-
zIndex: 1
|
150
|
+
zIndex: "1"
|
153
151
|
}
|
154
152
|
}
|
155
153
|
});
|
156
|
-
};
|
157
|
-
|
154
|
+
});
|
158
155
|
export default buttonPlugin;
|