@algolia/satellite 1.0.0-beta.129 → 1.0.0-beta.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/AnnouncementBadge/AnnouncementBadge.d.ts +2 -2
- package/cjs/AnnouncementBadge/AnnouncementBadge.js +11 -6
- package/cjs/AutoComplete/AutoComplete.d.ts +7 -6
- package/cjs/AutoComplete/AutoComplete.js +131 -120
- package/cjs/AutoComplete/components/AutoCompleteEmptyState.d.ts +4 -4
- package/cjs/AutoComplete/components/AutoCompleteEmptyState.js +16 -13
- package/cjs/AutoComplete/components/DefaultOptionItem.d.ts +1 -1
- package/cjs/AutoComplete/components/DefaultOptionItem.js +20 -16
- package/cjs/AutoComplete/types.d.ts +8 -8
- package/cjs/AutoComplete/utils.d.ts +1 -1
- package/cjs/Avatars/ApplicationAvatar.js +6 -5
- package/cjs/Avatars/UserAvatar.js +19 -20
- package/cjs/Avatars/utils.d.ts +1 -1
- package/cjs/Badge/Badge.d.ts +5 -5
- package/cjs/Badge/Badge.js +21 -12
- package/cjs/Banner/Banner.d.ts +4 -4
- package/cjs/Banner/Banner.js +30 -25
- package/cjs/Banners/Alert/Alert.d.ts +4 -4
- package/cjs/Banners/Alert/Alert.js +29 -23
- package/cjs/Banners/BigBertha/BigBertha.d.ts +2 -2
- package/cjs/Banners/BigBertha/BigBertha.js +11 -9
- package/cjs/Banners/Promote/Promote.d.ts +5 -5
- package/cjs/Banners/Promote/Promote.js +38 -30
- package/cjs/Button/Button.js +23 -17
- package/cjs/Button/ButtonGroup.d.ts +1 -1
- package/cjs/Button/ButtonGroup.js +6 -5
- package/cjs/Button/IconButton.d.ts +2 -2
- package/cjs/Button/IconButton.js +24 -22
- package/cjs/Button/styles.d.ts +1 -1
- package/cjs/Button/types.d.ts +5 -5
- package/cjs/Card/Card.d.ts +3 -3
- package/cjs/Card/Card.js +8 -11
- package/cjs/Card/components/CardHeader.js +8 -4
- package/cjs/Card/components/CardTitle.d.ts +1 -1
- package/cjs/Card/components/CardTitle.js +11 -6
- package/cjs/Checkbox/Checkbox.d.ts +3 -3
- package/cjs/Checkbox/Checkbox.js +33 -30
- package/cjs/ClickAwayContainer/ClickAwayContainer.d.ts +2 -2
- package/cjs/ClickAwayContainer/ClickAwayContainer.js +6 -9
- package/cjs/DatePicker/DatePicker/DatePicker.d.ts +10 -10
- package/cjs/DatePicker/DatePicker/DatePicker.js +79 -62
- package/cjs/DatePicker/DatePicker/datePickerReducer.d.ts +2 -2
- package/cjs/DatePicker/DatePicker/datePickerReducer.js +2 -2
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.d.ts +7 -7
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +82 -68
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +1 -1
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +16 -11
- package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.d.ts +3 -3
- package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +5 -5
- package/cjs/DatePicker/components/Calendar.d.ts +1 -1
- package/cjs/DatePicker/components/Calendar.js +10 -10
- package/cjs/DatePicker/components/Display.d.ts +2 -2
- package/cjs/DatePicker/components/Display.js +6 -5
- package/cjs/DatePicker/components/Footer.d.ts +2 -2
- package/cjs/DatePicker/components/Footer.js +6 -5
- package/cjs/DatePicker/components/FooterActions.d.ts +1 -1
- package/cjs/DatePicker/components/FooterActions.js +15 -12
- package/cjs/DatePicker/components/Modal.d.ts +3 -3
- package/cjs/DatePicker/components/Modal.js +18 -16
- package/cjs/DatePicker/components/NavBar.d.ts +2 -2
- package/cjs/DatePicker/components/NavBar.js +55 -34
- package/cjs/DatePicker/components/SidePanel.d.ts +2 -2
- package/cjs/DatePicker/components/SidePanel.js +9 -7
- package/cjs/Dropdown/Dropdown.d.ts +8 -8
- package/cjs/Dropdown/Dropdown.js +49 -40
- package/cjs/Dropdown/DropdownButton.d.ts +3 -3
- package/cjs/Dropdown/DropdownButton.js +15 -9
- package/cjs/Dropdown/DropdownContext.d.ts +2 -2
- package/cjs/Dropdown/DropdownContext.js +2 -9
- package/cjs/Dropdown/components/DropdownButtonItem.d.ts +1 -1
- package/cjs/Dropdown/components/DropdownButtonItem.js +14 -14
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +4 -4
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +30 -29
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +1 -1
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +6 -7
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +1 -1
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +1 -1
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
- package/cjs/Dropdown/components/DropdownDivider.js +3 -3
- package/cjs/Dropdown/components/DropdownFooterItem.d.ts +2 -2
- package/cjs/Dropdown/components/DropdownFooterItem.js +11 -5
- package/cjs/Dropdown/components/DropdownLinkItem.js +14 -13
- package/cjs/Dropdown/components/DropdownRadioItem.d.ts +2 -2
- package/cjs/Dropdown/components/DropdownRadioItem.js +17 -16
- package/cjs/Dropdown/components/DropdownTitle.d.ts +1 -1
- package/cjs/Dropdown/components/DropdownTitle.js +8 -4
- package/cjs/Dropdown/components/DropdownToggleItem.d.ts +3 -3
- package/cjs/Dropdown/components/DropdownToggleItem.js +16 -16
- package/cjs/Dropdown/useDropdownItemProps.d.ts +3 -3
- package/cjs/Dropzone/Dropzone.d.ts +2 -2
- package/cjs/Dropzone/Dropzone.js +58 -53
- package/cjs/EmptyState/EmptyState.d.ts +1 -1
- package/cjs/EmptyState/EmptyState.js +29 -22
- package/cjs/EmptyState/types.d.ts +7 -7
- package/cjs/Field/Field.d.ts +3 -3
- package/cjs/Field/Field.js +33 -26
- package/cjs/Flag/Flag.d.ts +2 -2
- package/cjs/Flag/Flag.js +45 -40
- package/cjs/Flag/Flags.d.ts +3 -3
- package/cjs/Flag/Flags.js +32 -22
- package/cjs/Flag/types.d.ts +4 -4
- package/cjs/FlexGrid/FlexGrid.d.ts +1 -1
- package/cjs/FlexGrid/FlexGrid.js +15 -9
- package/cjs/FlexGrid/FlexGrid.tailwind.js +2 -2
- package/cjs/HelpUnderline/HelpUnderline.d.ts +1 -1
- package/cjs/HelpUnderline/HelpUnderline.js +9 -7
- package/cjs/Input/Input.d.ts +5 -5
- package/cjs/Input/Input.js +119 -114
- package/cjs/Input/Input.tailwind.js +0 -3
- package/cjs/Insert/Insert.d.ts +2 -2
- package/cjs/Insert/Insert.js +29 -23
- package/cjs/KeyboardKey/KeyboardKey.d.ts +6 -0
- package/cjs/KeyboardKey/KeyboardKey.js +47 -0
- package/cjs/KeyboardKey/KeyboardKey.tailwind.d.ts +5 -0
- package/cjs/KeyboardKey/KeyboardKey.tailwind.js +33 -0
- package/cjs/KeyboardKey/index.d.ts +2 -0
- package/cjs/KeyboardKey/index.js +26 -0
- package/cjs/Link/BaseLink.d.ts +3 -3
- package/cjs/Link/BaseLink.js +7 -7
- package/cjs/Link/ButtonLink.d.ts +1 -1
- package/cjs/Link/ButtonLink.js +9 -5
- package/cjs/Link/IconButtonLink.d.ts +1 -1
- package/cjs/Link/IconButtonLink.js +8 -4
- package/cjs/Link/Link.d.ts +5 -5
- package/cjs/Link/Link.js +16 -15
- package/cjs/Medallion/Medallion.d.ts +2 -2
- package/cjs/Medallion/Medallion.js +8 -7
- package/cjs/Modal/Modal.d.ts +4 -4
- package/cjs/Modal/Modal.js +63 -38
- package/cjs/Modal/components/ModalFooter.d.ts +2 -2
- package/cjs/Modal/components/ModalFooter.js +16 -10
- package/cjs/Modal/components/ModalSection.d.ts +1 -1
- package/cjs/Modal/components/ModalSection.js +6 -5
- package/cjs/Pagination/CompactPagination/CompactPagination.js +38 -36
- package/cjs/Pagination/DotPagination/DotPagination.js +17 -16
- package/cjs/Pagination/Pagination/Pagination.js +53 -47
- package/cjs/ProgressBar/ProgressBar.d.ts +2 -2
- package/cjs/ProgressBar/ProgressBar.js +16 -11
- package/cjs/ProgressSpinner/ProgressSpinner.d.ts +2 -2
- package/cjs/ProgressSpinner/ProgressSpinner.js +21 -11
- package/cjs/RadioGroup/RadioButton.d.ts +3 -3
- package/cjs/RadioGroup/RadioButton.js +8 -8
- package/cjs/RadioGroup/RadioGroup.d.ts +3 -3
- package/cjs/RadioGroup/RadioGroup.js +36 -34
- package/cjs/RangeSlider/RangeSlider.d.ts +3 -3
- package/cjs/RangeSlider/RangeSlider.js +37 -36
- package/cjs/Satellite/Satellite.d.ts +2 -2
- package/cjs/Satellite/Satellite.js +6 -5
- package/cjs/Satellite/SatelliteContext.js +2 -2
- package/cjs/Satellite/SatelliteRouter.d.ts +1 -1
- package/cjs/ScrollIndicator/ScrollIndicator.d.ts +3 -3
- package/cjs/ScrollIndicator/ScrollIndicator.js +13 -16
- package/cjs/Select/Select.d.ts +3 -3
- package/cjs/Select/Select.js +8 -8
- package/cjs/Sidebar/Sidebar.d.ts +4 -4
- package/cjs/Sidebar/Sidebar.js +18 -10
- package/cjs/Sidebar/SidebarContext.d.ts +1 -1
- package/cjs/Sidebar/components/SidebarHeader.d.ts +2 -2
- package/cjs/Sidebar/components/SidebarHeader.js +11 -6
- package/cjs/Sidebar/components/SidebarLink.d.ts +3 -3
- package/cjs/Sidebar/components/SidebarLink.js +32 -22
- package/cjs/Switch/Switch.d.ts +3 -3
- package/cjs/Switch/Switch.js +17 -19
- package/cjs/Switch/SwitchOption.d.ts +1 -1
- package/cjs/Switch/SwitchOption.js +24 -16
- package/cjs/Tables/DataTable/DataTable.d.ts +4 -4
- package/cjs/Tables/DataTable/DataTable.js +59 -58
- package/cjs/Tables/DataTable/components/Body.d.ts +4 -4
- package/cjs/Tables/DataTable/components/Body.js +60 -46
- package/cjs/Tables/DataTable/components/Footer.d.ts +1 -1
- package/cjs/Tables/DataTable/components/Footer.js +6 -6
- package/cjs/Tables/DataTable/components/Header.js +24 -20
- package/cjs/Tables/DataTable/components/HeaderCell.d.ts +3 -3
- package/cjs/Tables/DataTable/components/HeaderCell.js +20 -14
- package/cjs/Tables/DataTable/components/Loader.js +17 -19
- package/cjs/Tables/DataTable/types.d.ts +3 -3
- package/cjs/Tables/DataTable/utils.d.ts +1 -1
- package/cjs/Tables/Table/Table.d.ts +3 -3
- package/cjs/Tables/Table/Table.js +19 -12
- package/cjs/Tables/Table/components/Footer.d.ts +2 -2
- package/cjs/Tables/Table/components/Footer.js +6 -5
- package/cjs/Tabs/ContentTabs.d.ts +1 -1
- package/cjs/Tabs/ContentTabs.js +39 -38
- package/cjs/Tabs/LinkTabs.d.ts +1 -1
- package/cjs/Tabs/LinkTabs.js +16 -16
- package/cjs/Tabs/components/LinkTab.d.ts +3 -3
- package/cjs/Tabs/components/LinkTab.js +18 -12
- package/cjs/Tabs/types.d.ts +6 -6
- package/cjs/Tabs/utils.d.ts +1 -1
- package/cjs/Tag/Tag.d.ts +11 -7
- package/cjs/Tag/Tag.js +33 -28
- package/cjs/TextArea/TextArea.d.ts +3 -3
- package/cjs/TextArea/TextArea.js +8 -8
- package/cjs/TextWrap/TextWrap.js +20 -20
- package/cjs/Toggle/Toggle.d.ts +3 -3
- package/cjs/Toggle/Toggle.js +23 -21
- package/cjs/Tooltip/OverflowTooltipWrapper.d.ts +2 -2
- package/cjs/Tooltip/OverflowTooltipWrapper.js +31 -24
- package/cjs/Tooltip/Tooltip.d.ts +3 -3
- package/cjs/Tooltip/Tooltip.js +8 -8
- package/cjs/Tooltip/TooltipWrapper.d.ts +3 -3
- package/cjs/Tooltip/TooltipWrapper.js +47 -39
- package/cjs/Tooltip/types.d.ts +2 -2
- package/cjs/Typography/Typography.tailwind.js +2 -2
- package/cjs/UserContent/UserContent.js +3 -3
- package/cjs/UserContent/UserContent.tailwind.js +2 -4
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +14 -0
- package/cjs/styles/tailwind.config.js +3 -3
- package/cjs/tailwind-types.d.ts +1 -1
- package/cjs/types.d.ts +3 -3
- package/cjs/utilities/utilities.tailwind.d.ts +2 -0
- package/cjs/utilities/utilities.tailwind.js +32 -0
- package/cjs/utils/genericChangeHandler.d.ts +3 -3
- package/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/cjs/utils/isRenderedChild.d.ts +2 -2
- package/cjs/utils/useForwardedRef.d.ts +2 -2
- package/cjs/utils/useLinkProps.d.ts +2 -2
- package/cjs/utils/useTriggerInputChange.d.ts +2 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +2 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.js +10 -5
- package/esm/AutoComplete/AutoComplete.d.ts +7 -6
- package/esm/AutoComplete/AutoComplete.js +130 -108
- package/esm/AutoComplete/components/AutoCompleteEmptyState.d.ts +4 -4
- package/esm/AutoComplete/components/AutoCompleteEmptyState.js +16 -12
- package/esm/AutoComplete/components/DefaultOptionItem.d.ts +1 -1
- package/esm/AutoComplete/components/DefaultOptionItem.js +21 -15
- package/esm/AutoComplete/types.d.ts +8 -8
- package/esm/AutoComplete/utils.d.ts +1 -1
- package/esm/Avatars/ApplicationAvatar.js +5 -4
- package/esm/Avatars/UserAvatar.js +19 -14
- package/esm/Avatars/utils.d.ts +1 -1
- package/esm/Badge/Badge.d.ts +5 -5
- package/esm/Badge/Badge.js +21 -11
- package/esm/Banner/Banner.d.ts +4 -4
- package/esm/Banner/Banner.js +31 -25
- package/esm/Banners/Alert/Alert.d.ts +4 -4
- package/esm/Banners/Alert/Alert.js +30 -23
- package/esm/Banners/BigBertha/BigBertha.d.ts +2 -2
- package/esm/Banners/BigBertha/BigBertha.js +11 -8
- package/esm/Banners/Promote/Promote.d.ts +5 -5
- package/esm/Banners/Promote/Promote.js +37 -28
- package/esm/Button/Button.js +23 -16
- package/esm/Button/ButtonGroup.d.ts +1 -1
- package/esm/Button/ButtonGroup.js +5 -4
- package/esm/Button/IconButton.d.ts +2 -2
- package/esm/Button/IconButton.js +24 -19
- package/esm/Button/styles.d.ts +1 -1
- package/esm/Button/types.d.ts +5 -5
- package/esm/Card/Card.d.ts +3 -3
- package/esm/Card/Card.js +6 -4
- package/esm/Card/components/CardHeader.js +8 -3
- package/esm/Card/components/CardTitle.d.ts +1 -1
- package/esm/Card/components/CardTitle.js +11 -5
- package/esm/Checkbox/Checkbox.d.ts +3 -3
- package/esm/Checkbox/Checkbox.js +35 -26
- package/esm/ClickAwayContainer/ClickAwayContainer.d.ts +2 -2
- package/esm/ClickAwayContainer/ClickAwayContainer.js +6 -4
- package/esm/DatePicker/DatePicker/DatePicker.d.ts +10 -10
- package/esm/DatePicker/DatePicker/DatePicker.js +82 -58
- package/esm/DatePicker/DatePicker/datePickerReducer.d.ts +2 -2
- package/esm/DatePicker/DatePicker/datePickerReducer.js +2 -2
- package/esm/DatePicker/DateRangePicker/DateRangePicker.d.ts +7 -7
- package/esm/DatePicker/DateRangePicker/DateRangePicker.js +88 -66
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +1 -1
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +17 -10
- package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.d.ts +3 -3
- package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +4 -4
- package/esm/DatePicker/components/Calendar.d.ts +1 -1
- package/esm/DatePicker/components/Calendar.js +11 -5
- package/esm/DatePicker/components/Display.d.ts +2 -2
- package/esm/DatePicker/components/Display.js +5 -4
- package/esm/DatePicker/components/Footer.d.ts +2 -2
- package/esm/DatePicker/components/Footer.js +5 -4
- package/esm/DatePicker/components/FooterActions.d.ts +1 -1
- package/esm/DatePicker/components/FooterActions.js +16 -12
- package/esm/DatePicker/components/Modal.d.ts +3 -3
- package/esm/DatePicker/components/Modal.js +19 -12
- package/esm/DatePicker/components/NavBar.d.ts +2 -2
- package/esm/DatePicker/components/NavBar.js +54 -34
- package/esm/DatePicker/components/SidePanel.d.ts +2 -2
- package/esm/DatePicker/components/SidePanel.js +8 -6
- package/esm/Dropdown/Dropdown.d.ts +8 -8
- package/esm/Dropdown/Dropdown.js +45 -30
- package/esm/Dropdown/DropdownButton.d.ts +3 -3
- package/esm/Dropdown/DropdownButton.js +15 -8
- package/esm/Dropdown/DropdownContext.d.ts +2 -2
- package/esm/Dropdown/DropdownContext.js +2 -2
- package/esm/Dropdown/components/DropdownButtonItem.d.ts +1 -1
- package/esm/Dropdown/components/DropdownButtonItem.js +14 -12
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +4 -4
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +29 -22
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +1 -1
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +5 -4
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +1 -1
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -4
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +1 -1
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -4
- package/esm/Dropdown/components/DropdownDivider.js +2 -2
- package/esm/Dropdown/components/DropdownFooterItem.d.ts +2 -2
- package/esm/Dropdown/components/DropdownFooterItem.js +11 -4
- package/esm/Dropdown/components/DropdownLinkItem.js +14 -11
- package/esm/Dropdown/components/DropdownRadioItem.d.ts +2 -2
- package/esm/Dropdown/components/DropdownRadioItem.js +17 -14
- package/esm/Dropdown/components/DropdownTitle.d.ts +1 -1
- package/esm/Dropdown/components/DropdownTitle.js +8 -3
- package/esm/Dropdown/components/DropdownToggleItem.d.ts +3 -3
- package/esm/Dropdown/components/DropdownToggleItem.js +16 -14
- package/esm/Dropdown/useDropdownItemProps.d.ts +3 -3
- package/esm/Dropzone/Dropzone.d.ts +2 -2
- package/esm/Dropzone/Dropzone.js +58 -47
- package/esm/EmptyState/EmptyState.d.ts +1 -1
- package/esm/EmptyState/EmptyState.js +29 -21
- package/esm/EmptyState/types.d.ts +7 -7
- package/esm/Field/Field.d.ts +3 -3
- package/esm/Field/Field.js +33 -25
- package/esm/Flag/Flag.d.ts +2 -2
- package/esm/Flag/Flag.js +44 -33
- package/esm/Flag/Flags.d.ts +3 -3
- package/esm/Flag/Flags.js +30 -21
- package/esm/Flag/types.d.ts +4 -4
- package/esm/FlexGrid/FlexGrid.d.ts +1 -1
- package/esm/FlexGrid/FlexGrid.js +13 -8
- package/esm/FlexGrid/FlexGrid.tailwind.js +2 -2
- package/esm/HelpUnderline/HelpUnderline.d.ts +1 -1
- package/esm/HelpUnderline/HelpUnderline.js +8 -6
- package/esm/Input/Input.d.ts +5 -5
- package/esm/Input/Input.js +119 -108
- package/esm/Input/Input.tailwind.js +0 -3
- package/esm/Insert/Insert.d.ts +2 -2
- package/esm/Insert/Insert.js +28 -21
- package/esm/KeyboardKey/KeyboardKey.d.ts +6 -0
- package/esm/KeyboardKey/KeyboardKey.js +30 -0
- package/esm/KeyboardKey/KeyboardKey.tailwind.d.ts +5 -0
- package/esm/KeyboardKey/KeyboardKey.tailwind.js +31 -0
- package/esm/KeyboardKey/index.d.ts +2 -0
- package/esm/KeyboardKey/index.js +2 -0
- package/esm/Link/BaseLink.d.ts +3 -3
- package/esm/Link/BaseLink.js +9 -3
- package/esm/Link/ButtonLink.d.ts +1 -1
- package/esm/Link/ButtonLink.js +9 -4
- package/esm/Link/IconButtonLink.d.ts +1 -1
- package/esm/Link/IconButtonLink.js +9 -4
- package/esm/Link/Link.d.ts +5 -5
- package/esm/Link/Link.js +18 -10
- package/esm/Medallion/Medallion.d.ts +2 -2
- package/esm/Medallion/Medallion.js +7 -6
- package/esm/Modal/Modal.d.ts +4 -4
- package/esm/Modal/Modal.js +64 -33
- package/esm/Modal/components/ModalFooter.d.ts +2 -2
- package/esm/Modal/components/ModalFooter.js +16 -9
- package/esm/Modal/components/ModalSection.d.ts +1 -1
- package/esm/Modal/components/ModalSection.js +5 -4
- package/esm/Pagination/CompactPagination/CompactPagination.js +39 -36
- package/esm/Pagination/DotPagination/DotPagination.js +16 -15
- package/esm/Pagination/Pagination/Pagination.js +54 -46
- package/esm/ProgressBar/ProgressBar.d.ts +2 -2
- package/esm/ProgressBar/ProgressBar.js +16 -10
- package/esm/ProgressSpinner/ProgressSpinner.d.ts +2 -2
- package/esm/ProgressSpinner/ProgressSpinner.js +21 -10
- package/esm/RadioGroup/RadioButton.d.ts +3 -3
- package/esm/RadioGroup/RadioButton.js +9 -3
- package/esm/RadioGroup/RadioGroup.d.ts +3 -3
- package/esm/RadioGroup/RadioGroup.js +36 -28
- package/esm/RangeSlider/RangeSlider.d.ts +3 -3
- package/esm/RangeSlider/RangeSlider.js +39 -31
- package/esm/Satellite/Satellite.d.ts +2 -2
- package/esm/Satellite/Satellite.js +5 -4
- package/esm/Satellite/SatelliteContext.js +2 -2
- package/esm/Satellite/SatelliteRouter.d.ts +1 -1
- package/esm/ScrollIndicator/ScrollIndicator.d.ts +3 -3
- package/esm/ScrollIndicator/ScrollIndicator.js +12 -10
- package/esm/Select/Select.d.ts +3 -3
- package/esm/Select/Select.js +8 -3
- package/esm/Sidebar/Sidebar.d.ts +4 -4
- package/esm/Sidebar/Sidebar.js +16 -8
- package/esm/Sidebar/SidebarContext.d.ts +1 -1
- package/esm/Sidebar/components/SidebarHeader.d.ts +2 -2
- package/esm/Sidebar/components/SidebarHeader.js +11 -5
- package/esm/Sidebar/components/SidebarLink.d.ts +3 -3
- package/esm/Sidebar/components/SidebarLink.js +34 -21
- package/esm/Switch/Switch.d.ts +3 -3
- package/esm/Switch/Switch.js +16 -12
- package/esm/Switch/SwitchOption.d.ts +1 -1
- package/esm/Switch/SwitchOption.js +24 -15
- package/esm/Tables/DataTable/DataTable.d.ts +4 -4
- package/esm/Tables/DataTable/DataTable.js +58 -51
- package/esm/Tables/DataTable/components/Body.d.ts +4 -4
- package/esm/Tables/DataTable/components/Body.js +58 -44
- package/esm/Tables/DataTable/components/Footer.d.ts +1 -1
- package/esm/Tables/DataTable/components/Footer.js +5 -5
- package/esm/Tables/DataTable/components/Header.js +22 -18
- package/esm/Tables/DataTable/components/HeaderCell.d.ts +3 -3
- package/esm/Tables/DataTable/components/HeaderCell.js +20 -13
- package/esm/Tables/DataTable/components/Loader.js +16 -13
- package/esm/Tables/DataTable/types.d.ts +3 -3
- package/esm/Tables/DataTable/utils.d.ts +1 -1
- package/esm/Tables/Table/Table.d.ts +3 -3
- package/esm/Tables/Table/Table.js +20 -11
- package/esm/Tables/Table/components/Footer.d.ts +2 -2
- package/esm/Tables/Table/components/Footer.js +5 -4
- package/esm/Tabs/ContentTabs.d.ts +1 -1
- package/esm/Tabs/ContentTabs.js +38 -31
- package/esm/Tabs/LinkTabs.d.ts +1 -1
- package/esm/Tabs/LinkTabs.js +14 -14
- package/esm/Tabs/components/LinkTab.d.ts +3 -3
- package/esm/Tabs/components/LinkTab.js +18 -11
- package/esm/Tabs/types.d.ts +6 -6
- package/esm/Tabs/utils.d.ts +1 -1
- package/esm/Tag/Tag.d.ts +11 -7
- package/esm/Tag/Tag.js +34 -23
- package/esm/TextArea/TextArea.d.ts +3 -3
- package/esm/TextArea/TextArea.js +9 -3
- package/esm/TextWrap/TextWrap.js +22 -17
- package/esm/Toggle/Toggle.d.ts +3 -3
- package/esm/Toggle/Toggle.js +25 -16
- package/esm/Tooltip/OverflowTooltipWrapper.d.ts +2 -2
- package/esm/Tooltip/OverflowTooltipWrapper.js +33 -19
- package/esm/Tooltip/Tooltip.d.ts +3 -3
- package/esm/Tooltip/Tooltip.js +8 -3
- package/esm/Tooltip/TooltipWrapper.d.ts +3 -3
- package/esm/Tooltip/TooltipWrapper.js +48 -33
- package/esm/Tooltip/types.d.ts +2 -2
- package/esm/Typography/Typography.tailwind.js +2 -2
- package/esm/UserContent/UserContent.js +2 -2
- package/esm/UserContent/UserContent.tailwind.js +2 -4
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/styles/tailwind.config.js +3 -3
- package/esm/tailwind-types.d.ts +1 -1
- package/esm/types.d.ts +3 -3
- package/esm/utilities/utilities.tailwind.d.ts +2 -0
- package/esm/utilities/utilities.tailwind.js +27 -0
- package/esm/utils/genericChangeHandler.d.ts +3 -3
- package/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/esm/utils/isRenderedChild.d.ts +2 -2
- package/esm/utils/useForwardedRef.d.ts +2 -2
- package/esm/utils/useForwardedRef.js +1 -1
- package/esm/utils/useLinkProps.d.ts +2 -2
- package/esm/utils/useTriggerInputChange.d.ts +2 -2
- package/package.json +4 -4
- package/satellite.css +37 -4
- package/satellite.min.css +1 -1
@@ -1,13 +1,17 @@
|
|
1
|
-
import
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["size", "text", "variant", "className"];
|
5
5
|
|
6
6
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
7
7
|
|
8
|
-
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
9
|
+
|
10
|
+
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
|
+
|
9
12
|
import cx from "classnames";
|
10
13
|
import stl from "../styles/helpers/satellitePrefixer";
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
11
15
|
var DEFAULT_CLASSNAME = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["capitalize inline-block rounded-full text-white select-none"])));
|
12
16
|
var SIZE_CLASSNAMES = {
|
13
17
|
"default": stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["display-body h-6 leading-md px-2"]))),
|
@@ -23,8 +27,9 @@ export var AnnouncementBadge = function AnnouncementBadge(_ref) {
|
|
23
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
24
28
|
|
25
29
|
var variant = typeof variantProp === "string" ? variantProp : text === "internal" ? "red" : "accent";
|
26
|
-
return /*#__PURE__*/
|
27
|
-
className: cx(DEFAULT_CLASSNAME, variant === "red" ? stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-red-600"]))) : stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["bg-accent-600"]))), SIZE_CLASSNAMES[size], className)
|
28
|
-
|
30
|
+
return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread({}, props), {}, {
|
31
|
+
className: cx(DEFAULT_CLASSNAME, variant === "red" ? stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-red-600"]))) : stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["bg-accent-600"]))), SIZE_CLASSNAMES[size], className),
|
32
|
+
children: text
|
33
|
+
}));
|
29
34
|
};
|
30
35
|
export default AnnouncementBadge;
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import React, { Component } from "react";
|
2
1
|
import { ControllerStateAndHelpers } from "downshift";
|
2
|
+
import { Component } from "react";
|
3
|
+
import type { ChangeEvent, FocusEvent, KeyboardEvent, MouseEvent } from "react";
|
3
4
|
import { FieldState } from "../Field/FieldStateContext";
|
4
|
-
import {
|
5
|
+
import type { AutoCompleteProps, Option } from "./types";
|
5
6
|
interface State {
|
6
7
|
inputFocused: boolean;
|
7
8
|
inputValue: string;
|
@@ -44,13 +45,13 @@ export declare class AutoComplete<T extends Option> extends Component<AutoComple
|
|
44
45
|
componentDidUpdate(prevProps: AutoCompleteProps): void;
|
45
46
|
handleClearClick: () => void;
|
46
47
|
handleFakeInputClick: () => void | null;
|
47
|
-
handleInputBlur: (state: ControllerStateAndHelpers<Option>) => (evt:
|
48
|
-
handleInputChange: (evt:
|
48
|
+
handleInputBlur: (state: ControllerStateAndHelpers<Option>) => (evt: FocusEvent<HTMLInputElement>) => void;
|
49
|
+
handleInputChange: (evt: ChangeEvent<HTMLInputElement>) => void;
|
49
50
|
handleInputContainerRefUpdate: (el: HTMLDivElement | null) => void;
|
50
51
|
updateInputWidth: () => void;
|
51
|
-
handleKeyDown: (state: ControllerStateAndHelpers<Option>) => (evt:
|
52
|
+
handleKeyDown: (state: ControllerStateAndHelpers<Option>) => (evt: KeyboardEvent<any>) => void;
|
52
53
|
handleChange: (option: Option) => void;
|
53
|
-
handleShowAllResults: (evt:
|
54
|
+
handleShowAllResults: (evt: MouseEvent<HTMLButtonElement>) => void;
|
54
55
|
removeValue: (removedOption: Option) => void;
|
55
56
|
renderInput: (results: Option[], autocompleteHelpers: ControllerStateAndHelpers<Option>, fieldState: FieldState) => JSX.Element;
|
56
57
|
renderMenu: (results: Option[], autocompleteHelpers: ControllerStateAndHelpers<Option>) => JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
2
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
@@ -12,9 +11,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
12
11
|
|
13
12
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
14
13
|
|
15
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
14
|
+
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; }
|
16
15
|
|
17
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
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; }
|
18
17
|
|
19
18
|
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); }; }
|
20
19
|
|
@@ -26,23 +25,25 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
26
25
|
|
27
26
|
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; }
|
28
27
|
|
29
|
-
import React, { Component } from "react";
|
30
|
-
import { createPortal } from "react-dom";
|
31
|
-
import { Popper } from "react-popper";
|
32
|
-
import Downshift from "downshift";
|
33
28
|
import cx from "classnames";
|
29
|
+
import Downshift from "downshift";
|
30
|
+
import { Component } from "react";
|
31
|
+
import { createPortal } from "react-dom";
|
34
32
|
import { X } from "react-feather";
|
35
|
-
import
|
36
|
-
import pluralize from "../utils/pluralize";
|
37
|
-
import uniqBy from "../utils/uniqBy";
|
38
|
-
import Card from "../Card";
|
33
|
+
import { Popper } from "react-popper";
|
39
34
|
import Button from "../Button";
|
35
|
+
import Card from "../Card";
|
36
|
+
import { FieldStateContext } from "../Field/FieldStateContext";
|
40
37
|
import ScrollIndicator from "../ScrollIndicator";
|
38
|
+
import stl from "../styles/helpers/satellitePrefixer";
|
41
39
|
import Tag from "../Tag";
|
42
|
-
import
|
43
|
-
import
|
44
|
-
import DefaultOptionItem from "./components/DefaultOptionItem";
|
40
|
+
import pluralize from "../utils/pluralize";
|
41
|
+
import uniqBy from "../utils/uniqBy";
|
45
42
|
import AutoCompleteEmptyState from "./components/AutoCompleteEmptyState";
|
43
|
+
import DefaultOptionItem from "./components/DefaultOptionItem";
|
44
|
+
import { defaultCreateFromInputValue, isAutoCompleteMultiProps } from "./utils";
|
45
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
46
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
46
47
|
|
47
48
|
function optionToString(option) {
|
48
49
|
return option ? option.label : "";
|
@@ -105,7 +106,8 @@ var MENU_POPPER_MODFIERS = [{
|
|
105
106
|
}
|
106
107
|
}];
|
107
108
|
var BACKSPACE_KEY_CODE = 8;
|
108
|
-
|
109
|
+
|
110
|
+
var defaultEmptyState = /*#__PURE__*/_jsx(AutoCompleteEmptyState, {
|
109
111
|
title: "No matches found"
|
110
112
|
});
|
111
113
|
/**
|
@@ -125,6 +127,7 @@ var defaultEmptyState = /*#__PURE__*/React.createElement(AutoCompleteEmptyState,
|
|
125
127
|
* - Style different data
|
126
128
|
*/
|
127
129
|
|
130
|
+
|
128
131
|
export var AutoComplete = /*#__PURE__*/function (_Component) {
|
129
132
|
_inherits(AutoComplete, _Component);
|
130
133
|
|
@@ -373,45 +376,50 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
373
376
|
autoComplete: "off",
|
374
377
|
autoFocus: autoFocus
|
375
378
|
});
|
376
|
-
return /*#__PURE__*/
|
379
|
+
return /*#__PURE__*/_jsxs("div", {
|
377
380
|
className: inputContainerClassName,
|
378
381
|
onClick: _this.handleFakeInputClick,
|
379
|
-
ref: _this.handleInputContainerRefUpdate
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
382
|
+
ref: _this.handleInputContainerRefUpdate,
|
383
|
+
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
384
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["mr-4 flex-shrink-0 ", ""])), disabled ? "text-grey-200" : inputFocused ? "text-accent-600" : "text-grey-500"),
|
385
|
+
size: "1rem"
|
386
|
+
}), /*#__PURE__*/_jsxs("div", {
|
387
|
+
className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex items-center flex-1 ", " ", ""])), !noWrap && "flex-wrap", multiple && "-ml-1"), valuesClassName),
|
388
|
+
children: [multiple && Array.isArray(value) && value.map(function (option) {
|
389
|
+
return renderValueTemplate ? renderValueTemplate({
|
390
|
+
option: option,
|
391
|
+
key: String(option.value),
|
392
|
+
editable: !disabled
|
393
|
+
}) : /*#__PURE__*/_jsx(Tag, {
|
394
|
+
onDelete: disabled ? undefined : function () {
|
395
|
+
return _this.removeValue(option);
|
396
|
+
},
|
397
|
+
className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["m-1 max-w-48 ", ""])), disabled && "opacity-50"),
|
398
|
+
children: option.label
|
399
|
+
}, String(option.value));
|
400
|
+
}), shouldRenderCustomTemplate && renderValueTemplate({
|
401
|
+
option: value,
|
402
|
+
key: String(value),
|
403
|
+
editable: !disabled
|
404
|
+
}), /*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({}, inputProps), {}, {
|
405
|
+
"data-lpignore": true
|
406
|
+
}))]
|
407
|
+
}), (showClearButton || endItem) && /*#__PURE__*/_jsxs("div", {
|
408
|
+
className: cx(showClearButton && endItem && stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["my-2 flex self-end space-x-4"])))),
|
409
|
+
children: [endItem && /*#__PURE__*/_jsx("div", {
|
410
|
+
className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["text-grey-700 my-auto"]))),
|
411
|
+
children: endItem
|
412
|
+
}), showClearButton && /*#__PURE__*/_jsx("button", {
|
413
|
+
type: "button",
|
414
|
+
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["w-6 flex items-center justify-center text-grey-500"]))),
|
415
|
+
onClick: _this.handleClearClick,
|
416
|
+
"aria-label": "Clear input value",
|
417
|
+
children: /*#__PURE__*/_jsx(X, {
|
418
|
+
size: ".75rem"
|
419
|
+
})
|
420
|
+
})]
|
421
|
+
})]
|
422
|
+
});
|
415
423
|
});
|
416
424
|
|
417
425
|
_defineProperty(_assertThisInitialized(_this), "renderMenu", function (results, autocompleteHelpers) {
|
@@ -451,49 +459,59 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
451
459
|
var showResults = results.length > 0;
|
452
460
|
|
453
461
|
if (!isOpen || !showResults && !shouldShowEmptyState && !shouldShowDefaultEmptyState) {
|
454
|
-
return /*#__PURE__*/
|
462
|
+
return /*#__PURE__*/_jsx("ul", _objectSpread(_objectSpread({}, getMenuProps()), {}, {
|
455
463
|
className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["hidden h-0"])))
|
456
464
|
}));
|
457
465
|
}
|
458
466
|
|
459
|
-
return /*#__PURE__*/
|
467
|
+
return /*#__PURE__*/_jsx(Popper, {
|
460
468
|
placement: "bottom-start",
|
461
469
|
strategy: "fixed",
|
462
470
|
referenceElement: (_this$inputContainerR3 = _this.inputContainerRef) !== null && _this$inputContainerR3 !== void 0 ? _this$inputContainerR3 : undefined,
|
463
|
-
modifiers: MENU_POPPER_MODFIERS
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
471
|
+
modifiers: MENU_POPPER_MODFIERS,
|
472
|
+
children: function children(popper) {
|
473
|
+
return /*#__PURE__*/_jsx("div", {
|
474
|
+
className: cx(stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["z-dropdown"]))), menuClassName),
|
475
|
+
style: _objectSpread(_objectSpread({}, popper.style), dropdownStyle),
|
476
|
+
"data-popper-placement": popper.placement,
|
477
|
+
ref: popper.ref,
|
478
|
+
children: /*#__PURE__*/_jsxs(Card, {
|
479
|
+
fullBleed: true,
|
480
|
+
elevation: "300",
|
481
|
+
children: [results.length === 0 ? /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, getMenuProps()), {}, {
|
482
|
+
className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["min-h-10"]))),
|
483
|
+
children: emptyState
|
484
|
+
})) : /*#__PURE__*/_jsx(ScrollIndicator, {
|
485
|
+
className: menuSize === "large" ? stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["max-h-96"]))) : stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["max-h-64"]))),
|
486
|
+
children: /*#__PURE__*/_jsxs("ul", _objectSpread(_objectSpread({}, getMenuProps()), {}, {
|
487
|
+
children: [results.slice(0, showAllResults ? Number.MAX_SAFE_INTEGER : maxResults).map(function (result, index) {
|
488
|
+
return /*#__PURE__*/_jsx("li", _objectSpread(_objectSpread({}, getItemProps({
|
489
|
+
item: result,
|
490
|
+
disabled: result.disabled,
|
491
|
+
className: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n autocomplete-result\n flex items-center min-h-10 px-4 cursor-pointer\n ", "\n ", "\n "])), index === highlightedIndex && "bg-grey-100", result.disabled && "cursor-not-allowed")
|
492
|
+
})), {}, {
|
493
|
+
children: /*#__PURE__*/_jsx(OptionItem, _objectSpread(_objectSpread({}, optionItemProps), {}, {
|
494
|
+
highlighted: index === highlightedIndex,
|
495
|
+
option: result
|
496
|
+
}))
|
497
|
+
}), result.value);
|
498
|
+
}), extraResults > 0 && !showAllResults && /*#__PURE__*/_jsx("li", {
|
499
|
+
className: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["p-2 text-right"]))),
|
500
|
+
children: /*#__PURE__*/_jsxs(Button, {
|
501
|
+
variant: "subtle",
|
502
|
+
size: "small",
|
503
|
+
onMouseDown: _this.handleShowAllResults,
|
504
|
+
children: ["Show ", pluralize(extraResults, "result"), " more"]
|
505
|
+
})
|
506
|
+
})]
|
507
|
+
}))
|
508
|
+
}), menuFooter && /*#__PURE__*/_jsx("footer", {
|
509
|
+
className: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["flex items-center justify-center min-h-12 p-4 bg-grey-100 border-t border-grey-200 text-grey-600"]))),
|
510
|
+
children: menuFooter
|
511
|
+
})]
|
512
|
+
})
|
513
|
+
});
|
514
|
+
}
|
497
515
|
});
|
498
516
|
});
|
499
517
|
|
@@ -513,9 +531,10 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
513
531
|
results.unshift.apply(results, _toConsumableArray(createFromInputValue(options, inputValue)));
|
514
532
|
}
|
515
533
|
|
516
|
-
return /*#__PURE__*/
|
517
|
-
className: className
|
518
|
-
|
534
|
+
return /*#__PURE__*/_jsxs("div", {
|
535
|
+
className: className,
|
536
|
+
children: [_this.renderInput(results, autocompleteHelpers, fieldState), _this.inputContainerRef && /*#__PURE__*/createPortal(_this.renderMenu(results, autocompleteHelpers), document.body)]
|
537
|
+
});
|
519
538
|
});
|
520
539
|
|
521
540
|
return _this;
|
@@ -543,23 +562,26 @@ export var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
543
562
|
var _this2 = this;
|
544
563
|
|
545
564
|
var inputValue = (this.props.inputValue !== undefined ? this.props.inputValue : this.state.inputValue) || "";
|
546
|
-
return /*#__PURE__*/
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
565
|
+
return /*#__PURE__*/_jsx(FieldStateContext.Consumer, {
|
566
|
+
children: function children(fieldState) {
|
567
|
+
return /*#__PURE__*/_jsx(Downshift, {
|
568
|
+
inputValue: inputValue
|
569
|
+
/*
|
570
|
+
* See https://github.com/algolia/AlgoliaWeb/issues/9045
|
571
|
+
* See multi-select example
|
572
|
+
* https://github.com/downshift-js/downshift#examples
|
573
|
+
* https://codesandbox.io/s/github/kentcdodds/downshift-examples/tree/master/?module=/src/ordered-examples/04-multi-select.js&moduleview=1&file=/src/ordered-examples/04-multi-select.js:2482-2509
|
574
|
+
*/
|
575
|
+
,
|
576
|
+
selectedItem: null,
|
577
|
+
onChange: _this2.handleChange,
|
578
|
+
itemToString: optionToString,
|
579
|
+
defaultHighlightedIndex: 0,
|
580
|
+
children: function children(autocompleteHelpers) {
|
581
|
+
return _this2.renderSelect(autocompleteHelpers, fieldState);
|
582
|
+
}
|
583
|
+
});
|
584
|
+
}
|
563
585
|
});
|
564
586
|
}
|
565
587
|
}]);
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import
|
2
|
-
import { IconComponentType } from "../../types";
|
1
|
+
import type { ReactNode } from "react";
|
3
2
|
import { MedallionVariant } from "../../Medallion";
|
3
|
+
import type { IconComponentType } from "../../types";
|
4
4
|
export interface AutoCompleteEmptyStateProps {
|
5
5
|
icon?: IconComponentType;
|
6
6
|
variant?: MedallionVariant;
|
7
7
|
/** Descriptive title for state */
|
8
|
-
title:
|
8
|
+
title: ReactNode;
|
9
9
|
/** Optional description to explain why the screen is empty or define next steps */
|
10
|
-
description?:
|
10
|
+
description?: ReactNode;
|
11
11
|
}
|
12
12
|
export declare const AutoCompleteEmptyState: ({ icon, variant, title, description, }: AutoCompleteEmptyStateProps) => JSX.Element;
|
13
13
|
export default AutoCompleteEmptyState;
|
@@ -2,10 +2,11 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3;
|
4
4
|
|
5
|
-
import React from "react";
|
6
5
|
import { X } from "react-feather";
|
7
|
-
import stl from "../../styles/helpers/satellitePrefixer";
|
8
6
|
import { Medallion } from "../../Medallion";
|
7
|
+
import stl from "../../styles/helpers/satellitePrefixer";
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
export var AutoCompleteEmptyState = function AutoCompleteEmptyState(_ref) {
|
10
11
|
var _ref$icon = _ref.icon,
|
11
12
|
icon = _ref$icon === void 0 ? X : _ref$icon,
|
@@ -13,15 +14,18 @@ export var AutoCompleteEmptyState = function AutoCompleteEmptyState(_ref) {
|
|
13
14
|
variant = _ref$variant === void 0 ? "grey" : _ref$variant,
|
14
15
|
title = _ref.title,
|
15
16
|
description = _ref.description;
|
16
|
-
return /*#__PURE__*/
|
17
|
-
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex flex-col items-center p-6"])))
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
17
|
+
return /*#__PURE__*/_jsxs("div", {
|
18
|
+
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex flex-col items-center p-6"]))),
|
19
|
+
children: [/*#__PURE__*/_jsx(Medallion, {
|
20
|
+
icon: icon,
|
21
|
+
variant: variant
|
22
|
+
}), /*#__PURE__*/_jsx("span", {
|
23
|
+
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["font-semibold pt-4"]))),
|
24
|
+
children: title
|
25
|
+
}), description && /*#__PURE__*/_jsx("p", {
|
26
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["display-caption typo-subdued pt-4"]))),
|
27
|
+
children: description
|
28
|
+
})]
|
29
|
+
});
|
26
30
|
};
|
27
31
|
export default AutoCompleteEmptyState;
|
@@ -2,26 +2,32 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
4
4
|
|
5
|
-
import React from "react";
|
6
5
|
import stl from "../../styles/helpers/satellitePrefixer";
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
+
|
9
|
+
var metadataSpacer = /*#__PURE__*/_jsx("span", {
|
10
|
+
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["px-1"]))),
|
11
|
+
children: "\xB7"
|
12
|
+
});
|
10
13
|
|
11
14
|
var DefaultOptionItem = function DefaultOptionItem(_ref) {
|
12
15
|
var option = _ref.option,
|
13
16
|
multiple = _ref.multiple;
|
14
|
-
return /*#__PURE__*/
|
15
|
-
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate py-2"])))
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
return /*#__PURE__*/_jsxs("div", {
|
18
|
+
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate py-2"]))),
|
19
|
+
children: [/*#__PURE__*/_jsx("span", {
|
20
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["font-semibold text-md text-grey-900"]))),
|
21
|
+
children: option["new"] ? "".concat(multiple ? "Add " : "Use ", " ").concat(option.label) : option.label
|
22
|
+
}), option.metadata && option.metadata.length > 0 && /*#__PURE__*/_jsx("ul", {
|
23
|
+
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex text-grey-600"]))),
|
24
|
+
children: option.metadata.map(function (metadata, idx) {
|
25
|
+
return /*#__PURE__*/_jsxs("li", {
|
26
|
+
children: [metadata, idx !== option.metadata.length - 1 && metadataSpacer]
|
27
|
+
}, metadata);
|
28
|
+
})
|
29
|
+
})]
|
30
|
+
});
|
25
31
|
};
|
26
32
|
|
27
33
|
export default DefaultOptionItem;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
import { IconComponentType } from "../types";
|
1
|
+
import type { ComponentType, FocusEventHandler, ReactNode } from "react";
|
2
|
+
import type { IconComponentType } from "../types";
|
3
3
|
export declare type AutoCompleteVariant = "medium" | "large";
|
4
4
|
export interface AutoCompleteBaseProps {
|
5
5
|
id?: string;
|
@@ -15,8 +15,8 @@ export interface AutoCompleteBaseProps {
|
|
15
15
|
options?: Option[];
|
16
16
|
inputValue?: string;
|
17
17
|
onTextChange?: (text: string) => any;
|
18
|
-
onFocus?:
|
19
|
-
onBlur?:
|
18
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
19
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
20
20
|
creatable?: boolean;
|
21
21
|
clearable?: boolean;
|
22
22
|
selectOnBlur?: boolean;
|
@@ -25,12 +25,12 @@ export interface AutoCompleteBaseProps {
|
|
25
25
|
separatorKeyCodes?: number[];
|
26
26
|
separatorKeys?: string[];
|
27
27
|
renderValueTemplate?: (args: RenderValueTemplateArgs) => JSX.Element;
|
28
|
-
emptyState?:
|
29
|
-
menuFooter?:
|
28
|
+
emptyState?: ReactNode;
|
29
|
+
menuFooter?: ReactNode;
|
30
30
|
optionItemComponent?: OptionItemComponentType;
|
31
31
|
/** Keep the input on a single line */
|
32
32
|
noWrap?: boolean;
|
33
|
-
endItem?:
|
33
|
+
endItem?: ReactNode;
|
34
34
|
/**
|
35
35
|
* `medium` will display about 5 results in the dropdown; use `large` variant to display more
|
36
36
|
* @default "medium"
|
@@ -63,7 +63,7 @@ export interface OptionItemProps {
|
|
63
63
|
inputValue: string;
|
64
64
|
highlighted: boolean;
|
65
65
|
}
|
66
|
-
export declare type OptionItemComponentType =
|
66
|
+
export declare type OptionItemComponentType = ComponentType<OptionItemProps>;
|
67
67
|
export interface OptionRendererParams {
|
68
68
|
multiple: boolean;
|
69
69
|
inputValue: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import type { AutoCompleteMultiProps, AutoCompleteProps, CreateFromInputValue } from "./types";
|
2
2
|
export declare function isAutoCompleteMultiProps(props: AutoCompleteProps): props is AutoCompleteMultiProps;
|
3
3
|
export declare const defaultCreateFromInputValue: CreateFromInputValue;
|
4
4
|
export declare const caseInsensitiveCreateFromInputValue: CreateFromInputValue;
|
@@ -2,10 +2,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3;
|
4
4
|
|
5
|
-
import React from "react";
|
6
5
|
import cx from "classnames";
|
7
6
|
import stl from "../styles/helpers/satellitePrefixer";
|
8
7
|
import { getApplicationInitials, pickApplicationColors } from "./utils";
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
var SIZE_CLASSNAMES = {
|
10
10
|
small: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-4 h-4"]))),
|
11
11
|
medium: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["w-8 h-8"])))
|
@@ -17,11 +17,12 @@ export var ApplicationAvatar = function ApplicationAvatar(_ref) {
|
|
17
17
|
application = _ref.application,
|
18
18
|
_ref$size = _ref.size,
|
19
19
|
size = _ref$size === void 0 ? "medium" : _ref$size;
|
20
|
-
return /*#__PURE__*/
|
20
|
+
return /*#__PURE__*/_jsx("div", {
|
21
21
|
className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["rounded inline-flex 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
|
-
} : {}
|
25
|
-
|
24
|
+
} : {},
|
25
|
+
children: getApplicationInitials(application)
|
26
|
+
});
|
26
27
|
};
|
27
28
|
export default ApplicationAvatar;
|