@algolia/satellite 1.0.0-beta.146 → 1.0.0-beta.148
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.js +7 -24
- package/cjs/AnnouncementBadge/index.js +0 -5
- package/cjs/AutoComplete/AutoComplete.js +72 -167
- package/cjs/AutoComplete/AutoComplete.tailwind.js +2 -5
- package/cjs/AutoComplete/components/AutoCompleteEmptyState.js +5 -14
- package/cjs/AutoComplete/components/DefaultOptionItem.js +2 -11
- package/cjs/AutoComplete/index.js +0 -11
- package/cjs/AutoComplete/utils.js +0 -8
- package/cjs/Avatars/ApplicationAvatar.js +3 -13
- package/cjs/Avatars/UserAvatar.js +6 -20
- package/cjs/Avatars/index.js +0 -7
- package/cjs/Avatars/utils.js +6 -37
- package/cjs/Badge/Badge.js +13 -36
- package/cjs/Badge/index.js +0 -5
- package/cjs/Banners/Alert/Alert.js +18 -28
- package/cjs/Banners/Alert/index.js +0 -5
- package/cjs/Banners/BigBertha/BigBertha.js +1 -9
- package/cjs/Banners/BigBertha/index.js +0 -5
- package/cjs/Banners/Promote/Promote.js +8 -19
- package/cjs/Banners/Promote/index.js +0 -5
- package/cjs/Banners/index.js +0 -6
- package/cjs/Button/Button.js +13 -33
- package/cjs/Button/Button.tailwind.js +3 -5
- package/cjs/Button/ButtonGroup.d.ts +2 -1
- package/cjs/Button/ButtonGroup.js +3 -11
- package/cjs/Button/IconButton.js +12 -35
- package/cjs/Button/index.js +0 -11
- package/cjs/Button/styles.js +1 -10
- package/cjs/Button/types.js +0 -1
- package/cjs/Card/Card.js +6 -21
- package/cjs/Card/Card.tailwind.js +1 -2
- package/cjs/Card/components/CardHeader.js +1 -14
- package/cjs/Card/components/CardTitle.js +2 -15
- package/cjs/Card/index.js +0 -9
- package/cjs/Checkbox/Checkbox.js +14 -38
- package/cjs/Checkbox/Checkbox.tailwind.js +1 -3
- package/cjs/Checkbox/index.js +0 -5
- package/cjs/ClickAwayContainer/ClickAwayContainer.js +11 -23
- package/cjs/ClickAwayContainer/index.js +0 -2
- package/cjs/DatePicker/DatePicker/DatePicker.js +13 -46
- package/cjs/DatePicker/DatePicker/datePickerReducer.js +0 -15
- package/cjs/DatePicker/DatePicker/index.js +0 -7
- package/cjs/DatePicker/DatePicker.tailwind.js +3 -13
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.js +29 -72
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -14
- package/cjs/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -28
- package/cjs/DatePicker/DateRangePicker/dateRangePickerTimeRange.js +0 -6
- package/cjs/DatePicker/DateRangePicker/index.js +0 -9
- package/cjs/DatePicker/components/Calendar.js +5 -16
- package/cjs/DatePicker/components/Display.js +3 -9
- package/cjs/DatePicker/components/Footer.js +0 -7
- package/cjs/DatePicker/components/FooterActions.js +3 -11
- package/cjs/DatePicker/components/Modal.js +17 -39
- package/cjs/DatePicker/components/NavBar.js +37 -47
- package/cjs/DatePicker/components/SidePanel.js +0 -7
- package/cjs/DatePicker/components/index.js +0 -7
- package/cjs/DatePicker/index.js +0 -9
- package/cjs/DatePicker/utils.js +0 -4
- package/cjs/Dropdown/Dropdown.js +23 -58
- package/cjs/Dropdown/DropdownButton.js +3 -20
- package/cjs/Dropdown/DropdownContext.js +0 -6
- package/cjs/Dropdown/components/DropdownButtonItem.js +5 -21
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -25
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -6
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -6
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -16
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -15
- package/cjs/Dropdown/components/DropdownCollapsibleItem/index.js +0 -9
- package/cjs/Dropdown/components/DropdownDivider.js +0 -7
- package/cjs/Dropdown/components/DropdownFooterItem.js +2 -15
- package/cjs/Dropdown/components/DropdownLinkItem.js +6 -23
- package/cjs/Dropdown/components/DropdownRadioItem.js +4 -20
- package/cjs/Dropdown/components/DropdownTitle.js +1 -14
- package/cjs/Dropdown/components/DropdownToggleItem.js +5 -22
- package/cjs/Dropdown/index.js +0 -27
- package/cjs/Dropdown/useDropdownItemProps.js +1 -14
- package/cjs/Dropzone/Dropzone.js +27 -62
- package/cjs/Dropzone/index.js +0 -5
- package/cjs/EmptyState/EmptyState.js +12 -23
- package/cjs/EmptyState/EmptyState.tailwind.js +0 -1
- package/cjs/EmptyState/index.js +0 -7
- package/cjs/Field/Field.js +8 -21
- package/cjs/Field/FieldStateContext.js +0 -2
- package/cjs/Field/index.js +0 -9
- package/cjs/Field/useFieldState.js +0 -7
- package/cjs/Flag/Flag.js +17 -40
- package/cjs/Flag/Flag.tailwind.js +0 -1
- package/cjs/Flag/Flags.js +4 -19
- package/cjs/Flag/index.js +0 -9
- package/cjs/FlexGrid/FlexGrid.js +13 -24
- package/cjs/FlexGrid/FlexGrid.tailwind.js +4 -11
- package/cjs/FlexGrid/index.js +0 -5
- package/cjs/HelpUnderline/HelpUnderline.js +5 -14
- package/cjs/HelpUnderline/HelpUnderline.tailwind.js +1 -2
- package/cjs/HelpUnderline/index.js +0 -5
- package/cjs/Input/Input.js +26 -70
- package/cjs/Input/Input.tailwind.js +1 -4
- package/cjs/Input/index.js +0 -5
- package/cjs/Insert/Insert.js +7 -17
- package/cjs/Insert/index.js +0 -5
- package/cjs/InstantSearch/InstantSearch.tailwind.js +4 -10
- package/cjs/KeyboardKey/KeyboardKey.js +1 -12
- package/cjs/KeyboardKey/KeyboardKey.tailwind.js +1 -2
- package/cjs/KeyboardKey/index.js +0 -2
- package/cjs/Link/BaseLink.js +2 -12
- package/cjs/Link/ButtonLink.js +3 -17
- package/cjs/Link/IconButtonLink.js +2 -13
- package/cjs/Link/Link.js +6 -23
- package/cjs/Link/index.js +0 -11
- package/cjs/Medallion/Medallion.js +5 -14
- package/cjs/Medallion/Medallion.tailwind.js +3 -6
- package/cjs/Medallion/index.js +0 -7
- package/cjs/Modal/Modal.js +21 -57
- package/cjs/Modal/Modal.tailwind.js +3 -3
- package/cjs/Modal/components/ModalFooter.js +2 -16
- package/cjs/Modal/components/ModalSection.js +3 -11
- package/cjs/Modal/index.js +0 -9
- package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
- package/cjs/Pagination/CompactPagination/CompactPagination.js +2 -20
- package/cjs/Pagination/CompactPagination/index.js +0 -5
- package/cjs/Pagination/DotPagination/DotPagination.js +5 -19
- package/cjs/Pagination/DotPagination/index.js +0 -5
- package/cjs/Pagination/Pagination/Pagination.js +9 -34
- package/cjs/Pagination/Pagination/index.js +0 -5
- package/cjs/Pagination/index.js +0 -9
- package/cjs/ProgressBar/ProgressBar.js +3 -16
- package/cjs/ProgressBar/ProgressBar.tailwind.js +1 -3
- package/cjs/ProgressBar/index.js +0 -5
- package/cjs/ProgressSpinner/ProgressSpinner.js +8 -20
- package/cjs/ProgressSpinner/ProgressSpinner.tailwind.js +2 -3
- package/cjs/ProgressSpinner/index.js +0 -5
- package/cjs/RadioGroup/RadioButton.js +1 -14
- package/cjs/RadioGroup/RadioButton.tailwind.js +1 -4
- package/cjs/RadioGroup/RadioGroup.js +19 -38
- package/cjs/RadioGroup/RadiogroupContext.js +0 -6
- package/cjs/RadioGroup/index.js +0 -9
- package/cjs/RangeSlider/RangeSlider.js +26 -43
- package/cjs/RangeSlider/RangeSlider.tailwind.js +1 -3
- package/cjs/RangeSlider/index.js +0 -5
- package/cjs/Satellite/Satellite.js +4 -10
- package/cjs/Satellite/SatelliteContext.js +0 -9
- package/cjs/Satellite/SatelliteRouter.js +2 -9
- package/cjs/Satellite/index.js +0 -13
- package/cjs/Satellite/locale.js +1 -7
- package/cjs/Satellite/useCreatePortal.js +2 -8
- package/cjs/ScrollIndicator/ScrollIndicator.js +18 -41
- package/cjs/ScrollIndicator/ScrollIndicator.tailwind.js +1 -3
- package/cjs/ScrollIndicator/index.js +0 -5
- package/cjs/Select/Select.js +4 -17
- package/cjs/Select/Select.tailwind.js +2 -5
- package/cjs/Select/index.js +0 -5
- package/cjs/Sidebar/Sidebar.js +11 -30
- package/cjs/Sidebar/SidebarButtonLink.js +10 -30
- package/cjs/Sidebar/SidebarContext.js +0 -6
- package/cjs/Sidebar/SidebarHeader.js +1 -9
- package/cjs/Sidebar/SidebarHeading.js +3 -14
- package/cjs/Sidebar/SidebarLink.js +5 -20
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -11
- package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -14
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -31
- package/cjs/Sidebar/SidebarLinksGroup/index.js +0 -2
- package/cjs/Sidebar/SidebarNav.js +5 -16
- package/cjs/Sidebar/index.js +0 -17
- package/cjs/Switch/Switch.js +15 -36
- package/cjs/Switch/Switch.tailwind.js +1 -2
- package/cjs/Switch/SwitchOption.js +2 -15
- package/cjs/Switch/index.js +0 -7
- package/cjs/Switch/utils.js +0 -9
- package/cjs/Tables/DataTable/DataTable.js +28 -70
- package/cjs/Tables/DataTable/DataTable.tailwind.js +2 -2
- package/cjs/Tables/DataTable/components/Body.js +14 -33
- package/cjs/Tables/DataTable/components/Footer.js +1 -17
- package/cjs/Tables/DataTable/components/Header.js +5 -12
- package/cjs/Tables/DataTable/components/HeaderCell.js +10 -27
- package/cjs/Tables/DataTable/components/Loader.js +4 -17
- package/cjs/Tables/DataTable/components/index.js +0 -10
- package/cjs/Tables/DataTable/index.js +0 -7
- package/cjs/Tables/DataTable/utils.js +0 -9
- package/cjs/Tables/Table/Table.js +7 -21
- package/cjs/Tables/Table/Table.tailwind.js +1 -2
- package/cjs/Tables/Table/components/TableFooter.js +2 -10
- package/cjs/Tables/Table/index.js +0 -7
- package/cjs/Tables/index.js +0 -7
- package/cjs/Tabs/ContentTabs.js +28 -62
- package/cjs/Tabs/LinkTabs.js +5 -18
- package/cjs/Tabs/Tabs.tailwind.js +1 -2
- package/cjs/Tabs/components/LinkTab.js +2 -27
- package/cjs/Tabs/index.js +0 -9
- package/cjs/Tabs/utils.js +0 -5
- package/cjs/Tag/Tag.js +7 -26
- package/cjs/Tag/Tag.tailwind.js +1 -2
- package/cjs/Tag/index.js +0 -5
- package/cjs/TextArea/TextArea.js +1 -14
- package/cjs/TextArea/TextArea.tailwind.js +1 -4
- package/cjs/TextArea/index.js +0 -5
- package/cjs/TextWrap/TextWrap.d.ts +1 -0
- package/cjs/TextWrap/TextWrap.js +3 -18
- package/cjs/TextWrap/index.js +0 -5
- package/cjs/Toggle/Toggle.js +6 -27
- package/cjs/Toggle/Toggle.tailwind.js +1 -3
- package/cjs/Toggle/index.js +0 -5
- package/cjs/Tooltip/OverflowTooltipWrapper.js +33 -62
- package/cjs/Tooltip/Tooltip.js +4 -17
- package/cjs/Tooltip/Tooltip.tailwind.js +3 -5
- package/cjs/Tooltip/TooltipWrapper.js +43 -71
- package/cjs/Tooltip/index.js +0 -9
- package/cjs/Typography/Typography.tailwind.js +15 -21
- package/cjs/UserContent/UserContent.js +7 -16
- package/cjs/UserContent/UserContent.tailwind.js +4 -13
- package/cjs/index.js +0 -89
- package/cjs/styles/base.tailwind.js +7 -7
- package/cjs/styles/colors.js +7 -7
- package/cjs/styles/disabledColor.js +1 -4
- package/cjs/styles/helpers/icons.js +5 -11
- package/cjs/styles/helpers/makePurgeCssExtractor.js +3 -15
- package/cjs/styles/helpers/makeTailwindPrefixer.js +1 -9
- package/cjs/styles/helpers/prefixTailwindClassName.js +6 -6
- package/cjs/styles/helpers/satellitePrefixer.js +1 -2
- package/cjs/styles/rgba.js +1 -3
- package/cjs/styles/tailwind.config.js +4 -11
- package/cjs/styles/zIndexes.js +1 -0
- package/cjs/utilities/utilities.tailwind.js +0 -3
- package/cjs/utils/event-polyfill.js +0 -2
- package/cjs/utils/formatters.js +12 -19
- package/cjs/utils/genericChangeHandler.js +0 -6
- package/cjs/utils/hashCode.js +0 -5
- package/cjs/utils/index.js +0 -7
- package/cjs/utils/isCssPropertySupported.js +0 -3
- package/cjs/utils/isNil.js +0 -2
- package/cjs/utils/isRenderedChild.js +0 -2
- package/cjs/utils/matchLocation.js +0 -4
- package/cjs/utils/onlyText.js +3 -12
- package/cjs/utils/parseUrl.js +2 -4
- package/cjs/utils/pluralize.js +2 -7
- package/cjs/utils/range.js +0 -2
- package/cjs/utils/toSentenceCase.js +0 -4
- package/cjs/utils/uniqBy.js +0 -4
- package/cjs/utils/uniqueId.js +0 -2
- package/cjs/utils/useForwardedRef.js +0 -6
- package/cjs/utils/useLinkProps.js +1 -13
- package/cjs/utils/useTriggerInputChange.js +2 -4
- package/esm/AnnouncementBadge/AnnouncementBadge.js +7 -14
- package/esm/AutoComplete/AutoComplete.js +72 -162
- package/esm/AutoComplete/AutoComplete.tailwind.js +2 -2
- package/esm/AutoComplete/components/AutoCompleteEmptyState.js +5 -7
- package/esm/AutoComplete/components/DefaultOptionItem.js +2 -8
- package/esm/AutoComplete/utils.js +0 -2
- package/esm/Avatars/ApplicationAvatar.js +3 -6
- package/esm/Avatars/UserAvatar.js +6 -12
- package/esm/Avatars/utils.js +7 -23
- package/esm/Badge/Badge.js +13 -28
- package/esm/Banners/Alert/Alert.js +18 -20
- package/esm/Banners/BigBertha/BigBertha.js +1 -4
- package/esm/Banners/Promote/Promote.js +8 -10
- package/esm/Button/Button.js +13 -21
- package/esm/Button/Button.tailwind.js +3 -2
- package/esm/Button/ButtonGroup.d.ts +2 -1
- package/esm/Button/ButtonGroup.js +3 -6
- package/esm/Button/IconButton.js +12 -22
- package/esm/Button/styles.js +1 -5
- package/esm/Card/Card.js +6 -12
- package/esm/Card/Card.tailwind.js +1 -1
- package/esm/Card/components/CardHeader.js +1 -7
- package/esm/Card/components/CardTitle.js +2 -8
- package/esm/Checkbox/Checkbox.js +14 -28
- package/esm/Checkbox/Checkbox.tailwind.js +1 -1
- package/esm/ClickAwayContainer/ClickAwayContainer.js +11 -13
- package/esm/DatePicker/DatePicker/DatePicker.js +13 -31
- package/esm/DatePicker/DatePicker/datePickerReducer.js +0 -9
- package/esm/DatePicker/DatePicker.tailwind.js +3 -10
- package/esm/DatePicker/DateRangePicker/DateRangePicker.js +29 -55
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.js +4 -8
- package/esm/DatePicker/DateRangePicker/dateRangePickerReducer.js +2 -16
- package/esm/DatePicker/components/Calendar.js +5 -10
- package/esm/DatePicker/components/Display.js +3 -5
- package/esm/DatePicker/components/Footer.js +0 -4
- package/esm/DatePicker/components/FooterActions.js +3 -7
- package/esm/DatePicker/components/Modal.js +17 -27
- package/esm/DatePicker/components/NavBar.js +37 -36
- package/esm/DatePicker/components/SidePanel.js +0 -4
- package/esm/Dropdown/Dropdown.js +23 -34
- package/esm/Dropdown/DropdownButton.js +3 -11
- package/esm/Dropdown/DropdownContext.js +0 -2
- package/esm/Dropdown/components/DropdownButtonItem.js +5 -12
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.js +10 -15
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.js +2 -2
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.js +0 -2
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.js +6 -9
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.js +6 -9
- package/esm/Dropdown/components/DropdownDivider.js +0 -2
- package/esm/Dropdown/components/DropdownFooterItem.js +2 -8
- package/esm/Dropdown/components/DropdownLinkItem.js +6 -13
- package/esm/Dropdown/components/DropdownRadioItem.js +4 -11
- package/esm/Dropdown/components/DropdownTitle.js +1 -7
- package/esm/Dropdown/components/DropdownToggleItem.js +5 -12
- package/esm/Dropdown/useDropdownItemProps.js +1 -7
- package/esm/Dropzone/Dropzone.js +27 -45
- package/esm/EmptyState/EmptyState.js +12 -16
- package/esm/Field/Field.js +8 -11
- package/esm/Flag/Flag.js +17 -25
- package/esm/Flag/Flags.js +4 -9
- package/esm/FlexGrid/FlexGrid.js +13 -15
- package/esm/FlexGrid/FlexGrid.tailwind.js +4 -9
- package/esm/HelpUnderline/HelpUnderline.js +5 -7
- package/esm/HelpUnderline/HelpUnderline.tailwind.js +1 -1
- package/esm/Input/Input.js +26 -54
- package/esm/Input/Input.tailwind.js +1 -1
- package/esm/Insert/Insert.js +7 -11
- package/esm/InstantSearch/InstantSearch.tailwind.js +4 -4
- package/esm/KeyboardKey/KeyboardKey.js +1 -3
- package/esm/KeyboardKey/KeyboardKey.tailwind.js +1 -1
- package/esm/Link/BaseLink.js +2 -6
- package/esm/Link/ButtonLink.js +3 -9
- package/esm/Link/IconButtonLink.js +2 -6
- package/esm/Link/Link.js +6 -14
- package/esm/Medallion/Medallion.js +5 -7
- package/esm/Medallion/Medallion.tailwind.js +3 -2
- package/esm/Modal/Modal.js +21 -38
- package/esm/Modal/Modal.tailwind.js +3 -2
- package/esm/Modal/components/ModalFooter.js +2 -8
- package/esm/Modal/components/ModalSection.js +3 -5
- package/esm/Pagination/CompactPagination/CompactPagination.d.ts +2 -0
- package/esm/Pagination/CompactPagination/CompactPagination.js +3 -7
- package/esm/Pagination/DotPagination/DotPagination.js +5 -11
- package/esm/Pagination/Pagination/Pagination.js +9 -21
- package/esm/ProgressBar/ProgressBar.js +3 -10
- package/esm/ProgressBar/ProgressBar.tailwind.js +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.js +8 -12
- package/esm/ProgressSpinner/ProgressSpinner.tailwind.js +2 -2
- package/esm/RadioGroup/RadioButton.js +1 -7
- package/esm/RadioGroup/RadioButton.tailwind.js +1 -1
- package/esm/RadioGroup/RadioGroup.js +19 -25
- package/esm/RadioGroup/RadiogroupContext.js +0 -2
- package/esm/RangeSlider/RangeSlider.js +26 -35
- package/esm/RangeSlider/RangeSlider.tailwind.js +1 -1
- package/esm/Satellite/Satellite.js +4 -4
- package/esm/Satellite/SatelliteContext.js +0 -3
- package/esm/Satellite/SatelliteRouter.js +2 -4
- package/esm/Satellite/locale.js +1 -2
- package/esm/Satellite/useCreatePortal.js +2 -2
- package/esm/ScrollIndicator/ScrollIndicator.js +18 -31
- package/esm/ScrollIndicator/ScrollIndicator.tailwind.js +1 -1
- package/esm/Select/Select.js +4 -9
- package/esm/Select/Select.tailwind.js +2 -2
- package/esm/Sidebar/Sidebar.js +11 -17
- package/esm/Sidebar/SidebarButtonLink.js +10 -20
- package/esm/Sidebar/SidebarContext.js +0 -2
- package/esm/Sidebar/SidebarHeader.js +1 -3
- package/esm/Sidebar/SidebarHeading.js +3 -7
- package/esm/Sidebar/SidebarLink.js +5 -11
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +2 -4
- package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +3 -7
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +8 -18
- package/esm/Sidebar/SidebarNav.js +5 -9
- package/esm/Switch/Switch.js +15 -24
- package/esm/Switch/Switch.tailwind.js +1 -1
- package/esm/Switch/SwitchOption.js +2 -6
- package/esm/Tables/DataTable/DataTable.js +28 -49
- package/esm/Tables/DataTable/DataTable.tailwind.js +2 -1
- package/esm/Tables/DataTable/components/Body.js +14 -23
- package/esm/Tables/DataTable/components/Footer.js +1 -8
- package/esm/Tables/DataTable/components/Header.js +5 -6
- package/esm/Tables/DataTable/components/HeaderCell.js +10 -17
- package/esm/Tables/DataTable/components/Loader.js +4 -8
- package/esm/Tables/DataTable/utils.js +0 -1
- package/esm/Tables/Table/Table.js +7 -14
- package/esm/Tables/Table/Table.tailwind.js +1 -1
- package/esm/Tables/Table/components/TableFooter.js +2 -4
- package/esm/Tabs/ContentTabs.js +28 -51
- package/esm/Tabs/LinkTabs.js +5 -7
- package/esm/Tabs/Tabs.tailwind.js +1 -1
- package/esm/Tabs/components/LinkTab.js +2 -18
- package/esm/Tabs/utils.js +0 -2
- package/esm/Tag/Tag.js +7 -16
- package/esm/Tag/Tag.tailwind.js +1 -1
- package/esm/TextArea/TextArea.js +1 -7
- package/esm/TextArea/TextArea.tailwind.js +1 -1
- package/esm/TextWrap/TextWrap.d.ts +1 -0
- package/esm/TextWrap/TextWrap.js +3 -11
- package/esm/Toggle/Toggle.js +6 -19
- package/esm/Toggle/Toggle.tailwind.js +1 -1
- package/esm/Tooltip/OverflowTooltipWrapper.js +33 -46
- package/esm/Tooltip/Tooltip.js +4 -9
- package/esm/Tooltip/Tooltip.tailwind.js +3 -4
- package/esm/Tooltip/TooltipWrapper.js +43 -56
- package/esm/Typography/Typography.tailwind.js +15 -18
- package/esm/UserContent/UserContent.js +7 -9
- package/esm/UserContent/UserContent.tailwind.js +4 -9
- package/esm/styles/base.tailwind.js +7 -6
- package/esm/styles/colors.js +7 -7
- package/esm/styles/disabledColor.js +1 -2
- package/esm/styles/helpers/icons.js +5 -8
- package/esm/styles/helpers/makePurgeCssExtractor.js +3 -14
- package/esm/styles/helpers/makeTailwindPrefixer.js +1 -6
- package/esm/styles/helpers/prefixTailwindClassName.js +6 -6
- package/esm/styles/helpers/satellitePrefixer.js +1 -1
- package/esm/styles/rgba.js +1 -2
- package/esm/styles/tailwind.config.js +4 -6
- package/esm/styles/zIndexes.js +1 -0
- package/esm/utils/event-polyfill.js +0 -2
- package/esm/utils/formatters.js +12 -16
- package/esm/utils/genericChangeHandler.js +0 -2
- package/esm/utils/hashCode.js +0 -3
- package/esm/utils/isCssPropertySupported.js +0 -2
- package/esm/utils/isRenderedChild.js +0 -1
- package/esm/utils/matchLocation.js +0 -2
- package/esm/utils/onlyText.js +3 -11
- package/esm/utils/parseUrl.js +2 -2
- package/esm/utils/pluralize.js +2 -5
- package/esm/utils/toSentenceCase.js +1 -1
- package/esm/utils/uniqBy.js +0 -2
- package/esm/utils/useForwardedRef.js +0 -3
- package/esm/utils/useLinkProps.js +1 -7
- package/esm/utils/useTriggerInputChange.js +2 -3
- package/package.json +2 -2
- package/satellite.min.css +1 -1
- package/scss/colors.scss +16 -16
package/esm/Input/Input.js
CHANGED
@@ -3,13 +3,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
5
5
|
var _excluded = ["className", "style", "startIcon", "endItem", "disabled", "readOnly", "clearable", "type", "variant", "locale"];
|
6
|
-
|
7
6
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
8
|
-
|
9
7
|
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; }
|
10
|
-
|
11
8
|
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; }
|
12
|
-
|
13
9
|
import cx from "clsx";
|
14
10
|
import { forwardRef, Fragment, useEffect, useState } from "react";
|
15
11
|
import { Check, ChevronDown, ChevronUp, Search, X } from "react-feather";
|
@@ -37,25 +33,23 @@ var VARIANT_CLASSNAMES = {
|
|
37
33
|
medium: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["input-medium"]))),
|
38
34
|
large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["input-large"])))
|
39
35
|
};
|
40
|
-
|
41
36
|
var SearchIcon = function SearchIcon(props) {
|
42
37
|
return /*#__PURE__*/_jsx(Search, _objectSpread(_objectSpread({}, props), {}, {
|
43
38
|
role: "img",
|
44
39
|
"aria-label": "Search Icon"
|
45
40
|
}));
|
46
41
|
};
|
47
|
-
|
48
42
|
var InvalidIcon = function InvalidIcon() {
|
49
43
|
return /*#__PURE__*/_jsx(X, {
|
50
44
|
className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["mr-4 h-4 w-4 text-white bg-red-700 p-px rounded-full"])))
|
51
45
|
});
|
52
46
|
};
|
53
|
-
|
54
47
|
var ValidatedIcon = function ValidatedIcon() {
|
55
48
|
return /*#__PURE__*/_jsx(Check, {
|
56
|
-
className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["mr-4 h-4 w-4 text-white bg-accent-
|
49
|
+
className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["mr-4 h-4 w-4 text-white bg-accent-600 p-px rounded-full"])))
|
57
50
|
});
|
58
51
|
};
|
52
|
+
|
59
53
|
/**
|
60
54
|
* Use text fields to help users enter, select, and search for text. Text fields are normally found within a form but can also be part of a modal, search, or card
|
61
55
|
*
|
@@ -63,51 +57,40 @@ var ValidatedIcon = function ValidatedIcon() {
|
|
63
57
|
* #### Number input
|
64
58
|
* - **Stepper (optional)**: consider using a stepper (number control) to let users increase or decrease the value of the input. This is an optional part of the number field so only use based on what you think will help the user
|
65
59
|
*/
|
66
|
-
|
67
|
-
|
68
60
|
export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
69
61
|
var className = _ref.className,
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
62
|
+
style = _ref.style,
|
63
|
+
startIcon = _ref.startIcon,
|
64
|
+
endItem = _ref.endItem,
|
65
|
+
disabled = _ref.disabled,
|
66
|
+
readOnly = _ref.readOnly,
|
67
|
+
clearableProp = _ref.clearable,
|
68
|
+
_ref$type = _ref.type,
|
69
|
+
type = _ref$type === void 0 ? "text" : _ref$type,
|
70
|
+
_ref$variant = _ref.variant,
|
71
|
+
variant = _ref$variant === void 0 ? "medium" : _ref$variant,
|
72
|
+
propsLocale = _ref.locale,
|
73
|
+
inputProps = _objectWithoutProperties(_ref, _excluded);
|
83
74
|
var contextLocale = useLocale("input");
|
84
|
-
|
85
75
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_INPUT_LOCALE), contextLocale), propsLocale);
|
86
|
-
|
87
76
|
var _useState = useState(false),
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
77
|
+
_useState2 = _slicedToArray(_useState, 2),
|
78
|
+
focused = _useState2[0],
|
79
|
+
setFocused = _useState2[1];
|
92
80
|
var _useForwardedRef = useForwardedRef(externalRef),
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
81
|
+
_useForwardedRef2 = _slicedToArray(_useForwardedRef, 2),
|
82
|
+
inputRefCallback = _useForwardedRef2[0],
|
83
|
+
inputRef = _useForwardedRef2[1];
|
97
84
|
var triggerInputChange = useTriggerInputChange(inputRef);
|
98
|
-
|
99
85
|
var _useFieldState = useFieldState(),
|
100
|
-
|
101
|
-
|
86
|
+
status = _useFieldState.status;
|
102
87
|
var isControlled = ("value" in inputProps);
|
103
|
-
|
104
88
|
var _useState3 = useState(function () {
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
89
|
+
return isControlled ? inputProps.value : inputProps.defaultValue;
|
90
|
+
}),
|
91
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
92
|
+
internalValue = _useState4[0],
|
93
|
+
setInternalValue = _useState4[1];
|
111
94
|
var isValueEmpty = typeof internalValue !== "number" && !(internalValue !== null && internalValue !== void 0 && internalValue.length);
|
112
95
|
useEffect(function () {
|
113
96
|
if (isControlled) {
|
@@ -122,7 +105,6 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
122
105
|
style: style,
|
123
106
|
onClick: function onClick() {
|
124
107
|
var _inputRef$current;
|
125
|
-
|
126
108
|
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
127
109
|
},
|
128
110
|
children: [Icon && /*#__PURE__*/_jsx(Icon, {
|
@@ -137,22 +119,18 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
137
119
|
disabled: disabled,
|
138
120
|
onChange: function onChange(evt) {
|
139
121
|
var _inputProps$onChange;
|
140
|
-
|
141
122
|
(_inputProps$onChange = inputProps.onChange) === null || _inputProps$onChange === void 0 ? void 0 : _inputProps$onChange.call(inputProps, evt);
|
142
|
-
|
143
123
|
if (!isControlled) {
|
144
124
|
setInternalValue(evt.target.value);
|
145
125
|
}
|
146
126
|
},
|
147
127
|
onFocus: function onFocus(evt) {
|
148
128
|
var _inputProps$onFocus;
|
149
|
-
|
150
129
|
setFocused(true);
|
151
130
|
(_inputProps$onFocus = inputProps.onFocus) === null || _inputProps$onFocus === void 0 ? void 0 : _inputProps$onFocus.call(inputProps, evt);
|
152
131
|
},
|
153
132
|
onBlur: function onBlur(evt) {
|
154
133
|
var _inputProps$onBlur;
|
155
|
-
|
156
134
|
setFocused(false);
|
157
135
|
(_inputProps$onBlur = inputProps.onBlur) === null || _inputProps$onBlur === void 0 ? void 0 : _inputProps$onBlur.call(inputProps, evt);
|
158
136
|
}
|
@@ -181,15 +159,12 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
181
159
|
"aria-label": locale.increment,
|
182
160
|
onClick: function onClick() {
|
183
161
|
var _inputRef$current$val, _inputRef$current2;
|
184
|
-
|
185
162
|
var step = inputProps.step ? parseFloat(String(inputProps.step)) : 1;
|
186
163
|
var max = isNil(inputProps.max) ? Number.MAX_SAFE_INTEGER : parseFloat(String(inputProps.max));
|
187
164
|
var currentValue = parseFloat((_inputRef$current$val = (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.value) !== null && _inputRef$current$val !== void 0 ? _inputRef$current$val : "0");
|
188
|
-
|
189
165
|
if (Number.isNaN(currentValue)) {
|
190
166
|
currentValue = 0;
|
191
167
|
}
|
192
|
-
|
193
168
|
if (currentValue + step <= max) {
|
194
169
|
triggerInputChange(String(currentValue + step));
|
195
170
|
} else {
|
@@ -207,15 +182,12 @@ export var Input = /*#__PURE__*/forwardRef(function (_ref, externalRef) {
|
|
207
182
|
"aria-label": locale.decrement,
|
208
183
|
onClick: function onClick() {
|
209
184
|
var _inputRef$current$val2, _inputRef$current3;
|
210
|
-
|
211
185
|
var step = inputProps.step ? parseFloat(String(inputProps.step)) : 1;
|
212
186
|
var min = isNil(inputProps.min) ? Number.MIN_SAFE_INTEGER : parseFloat(String(inputProps.min));
|
213
187
|
var currentValue = parseFloat((_inputRef$current$val2 = (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.value) !== null && _inputRef$current$val2 !== void 0 ? _inputRef$current$val2 : "0");
|
214
|
-
|
215
188
|
if (Number.isNaN(currentValue)) {
|
216
189
|
currentValue = 0;
|
217
190
|
}
|
218
|
-
|
219
191
|
if (currentValue - step >= min) {
|
220
192
|
triggerInputChange(String(currentValue - step));
|
221
193
|
} else {
|
package/esm/Insert/Insert.js
CHANGED
@@ -1,13 +1,10 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
4
|
-
|
5
3
|
import Badge from "../Badge";
|
6
4
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
5
|
import onlyText from "../utils/onlyText";
|
8
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
-
|
11
8
|
/**
|
12
9
|
* Put more emphasis on side content.
|
13
10
|
|
@@ -41,8 +38,8 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
41
38
|
*/
|
42
39
|
export var Insert = function Insert(_ref) {
|
43
40
|
var title = _ref.title,
|
44
|
-
|
45
|
-
|
41
|
+
contexts = _ref.contexts,
|
42
|
+
children = _ref.children;
|
46
43
|
return /*#__PURE__*/_jsxs("aside", {
|
47
44
|
"aria-label": onlyText(title),
|
48
45
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["inline-flex flex-col self-start p-4 bg-grey-100 rounded"]))),
|
@@ -50,12 +47,11 @@ export var Insert = function Insert(_ref) {
|
|
50
47
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["block space-x-2 mb-4"]))),
|
51
48
|
children: contexts.map(function (context, idx) {
|
52
49
|
var _ref2 = typeof context === "string" ? {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
50
|
+
label: context
|
51
|
+
} : context,
|
52
|
+
label = _ref2.label,
|
53
|
+
_ref2$variant = _ref2.variant,
|
54
|
+
variant = _ref2$variant === void 0 ? "grey" : _ref2$variant;
|
59
55
|
return /*#__PURE__*/_jsx(Badge, {
|
60
56
|
variant: variant,
|
61
57
|
children: label
|
@@ -7,13 +7,13 @@ import _plugin from "tailwindcss/plugin";
|
|
7
7
|
var plugin = _plugin;
|
8
8
|
var disabledColor = _disabledColor;
|
9
9
|
var _require = _require2,
|
10
|
-
|
11
|
-
|
10
|
+
toBG = _require.toBG,
|
11
|
+
selectIconBG = _require.selectIconBG;
|
12
12
|
var rgba = _rgba;
|
13
13
|
export default plugin(function (_ref) {
|
14
14
|
var addComponents = _ref.addComponents,
|
15
|
-
|
16
|
-
|
15
|
+
prefix = _ref.prefix,
|
16
|
+
theme = _ref.theme;
|
17
17
|
addComponents(_defineProperty({}, prefix(".instantsearch"), {
|
18
18
|
// SearchBox widget
|
19
19
|
// ----------------------------------------
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject;
|
4
|
-
|
5
3
|
import cx from "clsx";
|
6
4
|
import { createElement } from "react";
|
7
5
|
import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp, CornerDownLeft } from "react-feather";
|
@@ -17,7 +15,7 @@ var KEY_MAPPINGS = {
|
|
17
15
|
};
|
18
16
|
export var KeyboardKey = function KeyboardKey(_ref) {
|
19
17
|
var className = _ref.className,
|
20
|
-
|
18
|
+
value = _ref.value;
|
21
19
|
var mappedValue = KEY_MAPPINGS[value];
|
22
20
|
var displayed = !mappedValue ? value : typeof mappedValue === "string" ? mappedValue : /*#__PURE__*/createElement(mappedValue, {
|
23
21
|
"aria-label": value,
|
@@ -3,7 +3,7 @@ import _plugin from "tailwindcss/plugin";
|
|
3
3
|
var plugin = _plugin;
|
4
4
|
var keyboardKeyPlugin = plugin(function (_ref) {
|
5
5
|
var addComponents = _ref.addComponents,
|
6
|
-
|
6
|
+
theme = _ref.theme;
|
7
7
|
addComponents({
|
8
8
|
".keyboard-key": {
|
9
9
|
borderRadius: theme("borderRadius.DEFAULT"),
|
package/esm/Link/BaseLink.js
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
var _excluded = ["href", "onClick"];
|
4
|
-
|
5
4
|
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; }
|
6
|
-
|
7
5
|
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; }
|
8
|
-
|
9
6
|
import { forwardRef } from "react";
|
10
7
|
import useLinkProps from "../utils/useLinkProps";
|
11
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
9
|
export var BaseLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
13
10
|
var href = _ref.href,
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
onClick = _ref.onClick,
|
12
|
+
anchorProps = _objectWithoutProperties(_ref, _excluded);
|
17
13
|
var linkProps = useLinkProps(_objectSpread(_objectSpread({}, anchorProps), {}, {
|
18
14
|
href: href,
|
19
15
|
onClick: onClick
|
package/esm/Link/ButtonLink.js
CHANGED
@@ -1,30 +1,24 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
var _excluded = ["endIcon", "href", "onClick"];
|
4
|
-
|
5
4
|
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; }
|
6
|
-
|
7
5
|
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; }
|
8
|
-
|
9
6
|
import { ExternalLink } from "react-feather";
|
10
7
|
import Button from "../Button/Button";
|
11
8
|
import useLinkProps from "../utils/useLinkProps";
|
12
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
10
|
export var ButtonLink = function ButtonLink(_ref) {
|
14
11
|
var EndIcon = _ref.endIcon,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
href = _ref.href,
|
13
|
+
onClick = _ref.onClick,
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
19
15
|
var linkProps = useLinkProps(_objectSpread(_objectSpread({}, props), {}, {
|
20
16
|
href: href,
|
21
17
|
onClick: onClick
|
22
18
|
}));
|
23
|
-
|
24
19
|
if (linkProps.target === "_blank" && EndIcon === undefined) {
|
25
20
|
EndIcon = ExternalLink;
|
26
21
|
}
|
27
|
-
|
28
22
|
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({}, props), linkProps), {}, {
|
29
23
|
endIcon: EndIcon,
|
30
24
|
as: "a"
|
@@ -1,19 +1,15 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
var _excluded = ["href", "onClick"];
|
4
|
-
|
5
4
|
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; }
|
6
|
-
|
7
5
|
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; }
|
8
|
-
|
9
6
|
import IconButton from "../Button/IconButton";
|
10
7
|
import useLinkProps from "../utils/useLinkProps";
|
11
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
9
|
export var IconButtonLink = function IconButtonLink(_ref) {
|
13
10
|
var href = _ref.href,
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
onClick = _ref.onClick,
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
17
13
|
var linkProps = useLinkProps(_objectSpread(_objectSpread({}, props), {}, {
|
18
14
|
href: href,
|
19
15
|
onClick: onClick
|
package/esm/Link/Link.js
CHANGED
@@ -1,15 +1,10 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3;
|
6
|
-
|
7
5
|
var _excluded = ["className", "children", "startIcon", "endIcon", "href", "onClick"];
|
8
|
-
|
9
6
|
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; }
|
10
|
-
|
11
7
|
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; }
|
12
|
-
|
13
8
|
import cx from "clsx";
|
14
9
|
import { forwardRef } from "react";
|
15
10
|
import { ExternalLink } from "react-feather";
|
@@ -19,23 +14,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
20
15
|
export var Link = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
21
16
|
var className = _ref.className,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
17
|
+
children = _ref.children,
|
18
|
+
StartIcon = _ref.startIcon,
|
19
|
+
EndIcon = _ref.endIcon,
|
20
|
+
href = _ref.href,
|
21
|
+
onClick = _ref.onClick,
|
22
|
+
anchorProps = _objectWithoutProperties(_ref, _excluded);
|
29
23
|
var linkProps = useLinkProps(_objectSpread(_objectSpread({}, anchorProps), {}, {
|
30
24
|
href: href,
|
31
25
|
onClick: onClick
|
32
26
|
}));
|
33
27
|
var isExternalLink = linkProps.target === "_blank" && EndIcon === undefined;
|
34
|
-
|
35
28
|
if (isExternalLink) {
|
36
29
|
EndIcon = ExternalLink;
|
37
30
|
}
|
38
|
-
|
39
31
|
return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread(_objectSpread({}, anchorProps), linkProps), {}, {
|
40
32
|
ref: ref,
|
41
33
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["typo-link inline-flex items-center"]))), className),
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
4
|
-
|
5
3
|
import cx from "clsx";
|
6
4
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -18,11 +16,11 @@ var VARIANT_CLASSNAMES = {
|
|
18
16
|
};
|
19
17
|
export var Medallion = function Medallion(_ref) {
|
20
18
|
var Icon = _ref.icon,
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
_ref$variant = _ref.variant,
|
20
|
+
variant = _ref$variant === void 0 ? "accent" : _ref$variant,
|
21
|
+
_ref$size = _ref.size,
|
22
|
+
size = _ref$size === void 0 ? "default" : _ref$size,
|
23
|
+
className = _ref.className;
|
26
24
|
var medallionClassName = VARIANT_CLASSNAMES[variant];
|
27
25
|
return /*#__PURE__*/_jsx("div", {
|
28
26
|
className: cx(stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["medallion inline-flex items-center justify-center rounded-full ", ""])), size === "large" && "medallion-large"), medallionClassName, className),
|
@@ -6,7 +6,7 @@ var plugin = _plugin;
|
|
6
6
|
var rgba = _rgba;
|
7
7
|
var medallionPlugin = plugin(function (_ref) {
|
8
8
|
var addComponents = _ref.addComponents,
|
9
|
-
|
9
|
+
theme = _ref.theme;
|
10
10
|
var colors = ["grey", "pink", "accent", "blue", "green", "orange", "red", "white"];
|
11
11
|
addComponents({
|
12
12
|
".medallion": {
|
@@ -17,8 +17,9 @@ var medallionPlugin = plugin(function (_ref) {
|
|
17
17
|
height: "72px",
|
18
18
|
width: "72px"
|
19
19
|
}
|
20
|
-
});
|
20
|
+
});
|
21
21
|
|
22
|
+
// Variants
|
22
23
|
colors.map(function (color) {
|
23
24
|
return addComponents(_defineProperty({}, ".medallion-".concat(color), {
|
24
25
|
backgroundImage: color === "white" ? "linear-gradient(to bottom, ".concat(theme("colors.white"), " 0%, ").concat(theme("colors.grey.100"), " 100%)") : "linear-gradient(to bottom, ".concat(theme("colors.".concat(color, ".100")), " 0%, ").concat(theme("colors.".concat(color, ".200")), " 100%)"),
|
package/esm/Modal/Modal.js
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
|
-
|
5
4
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
6
|
-
|
7
5
|
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; }
|
8
|
-
|
9
6
|
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; }
|
10
|
-
|
11
7
|
import cx from "clsx";
|
12
8
|
import { useEffect, useMemo, useRef, useState } from "react";
|
13
9
|
import { X } from "react-feather";
|
@@ -26,11 +22,9 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
22
|
var DEFAULT_MODAL_LOCALE = {
|
27
23
|
dismissText: "Dismiss"
|
28
24
|
};
|
29
|
-
|
30
25
|
var ModalAnimation = function ModalAnimation(props) {
|
31
26
|
return (
|
32
27
|
/*#__PURE__*/
|
33
|
-
|
34
28
|
/* eslint-disable-next-line @algolia/satellite/invalid-classnames */
|
35
29
|
_jsx(CSSTransition, _objectSpread(_objectSpread({}, props), {}, {
|
36
30
|
classNames: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["satellite-modal"]))),
|
@@ -40,46 +34,41 @@ var ModalAnimation = function ModalAnimation(props) {
|
|
40
34
|
}))
|
41
35
|
);
|
42
36
|
};
|
43
|
-
|
44
37
|
var ModalNoAnimation = function ModalNoAnimation(props) {
|
45
38
|
return props["in"] ? /*#__PURE__*/_jsx(_Fragment, {
|
46
39
|
children: props.children
|
47
40
|
}) : null;
|
48
41
|
};
|
49
|
-
|
50
42
|
var SIZE_CLASSNAMES = {
|
51
43
|
medium: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["modal-dialog-medium"]))),
|
52
44
|
large: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["modal-dialog-large"])))
|
53
45
|
};
|
54
46
|
export var Modal = function Modal(_ref) {
|
55
47
|
var title = _ref.title,
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
48
|
+
className = _ref.className,
|
49
|
+
children = _ref.children,
|
50
|
+
_ref$open = _ref.open,
|
51
|
+
open = _ref$open === void 0 ? true : _ref$open,
|
52
|
+
_ref$fullBleed = _ref.fullBleed,
|
53
|
+
fullBleed = _ref$fullBleed === void 0 ? false : _ref$fullBleed,
|
54
|
+
_ref$onDismiss = _ref.onDismiss,
|
55
|
+
onDismiss = _ref$onDismiss === void 0 ? function () {} : _ref$onDismiss,
|
56
|
+
_ref$animate = _ref.animate,
|
57
|
+
animate = _ref$animate === void 0 ? true : _ref$animate,
|
58
|
+
_ref$hideCloseIcon = _ref.hideCloseIcon,
|
59
|
+
hideCloseIcon = _ref$hideCloseIcon === void 0 ? false : _ref$hideCloseIcon,
|
60
|
+
_ref$size = _ref.size,
|
61
|
+
size = _ref$size === void 0 ? "medium" : _ref$size,
|
62
|
+
_ref$centerY = _ref.centerY,
|
63
|
+
centerY = _ref$centerY === void 0 ? false : _ref$centerY,
|
64
|
+
propsLocale = _ref.locale;
|
73
65
|
var createPortal = useCreatePortal();
|
74
66
|
var contextLocale = useLocale("modal");
|
75
|
-
|
76
67
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_MODAL_LOCALE), contextLocale), propsLocale);
|
77
|
-
|
78
68
|
var _useState = useState(null),
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
69
|
+
_useState2 = _slicedToArray(_useState, 2),
|
70
|
+
modalWrapperRef = _useState2[0],
|
71
|
+
setModalWrapperRef = _useState2[1];
|
83
72
|
var dialogRef = useRef(null);
|
84
73
|
var mouseDownTargetRef = useRef(null);
|
85
74
|
var ModalContainer = animate ? ModalAnimation : ModalNoAnimation;
|
@@ -92,24 +81,20 @@ export var Modal = function Modal(_ref) {
|
|
92
81
|
});
|
93
82
|
useEffect(function () {
|
94
83
|
if (!modalWrapperRef) return;
|
95
|
-
|
96
84
|
var onMouseUp = function onMouseUp(evt) {
|
97
85
|
if (evt.target === mouseDownTargetRef.current && dialogRef.current && !dialogRef.current.contains(evt.target)) {
|
98
86
|
onDismiss();
|
99
87
|
}
|
100
|
-
|
101
88
|
mouseDownTargetRef.current = null;
|
102
89
|
};
|
103
|
-
|
104
90
|
var onMouseDown = function onMouseDown(evt) {
|
105
91
|
return mouseDownTargetRef.current = evt.target;
|
106
92
|
};
|
93
|
+
|
107
94
|
/**
|
108
95
|
* We use native event handlers to avoid React event bubbling behaviour with element rendered in a portal.
|
109
96
|
* (otherwise, the modal gets dismissed when clicking on an AutoComplete menu item)
|
110
97
|
*/
|
111
|
-
|
112
|
-
|
113
98
|
modalWrapperRef.addEventListener("mouseup", onMouseUp);
|
114
99
|
modalWrapperRef.addEventListener("mousedown", onMouseDown);
|
115
100
|
return function () {
|
@@ -117,7 +102,6 @@ export var Modal = function Modal(_ref) {
|
|
117
102
|
modalWrapperRef.removeEventListener("mousedown", onMouseDown);
|
118
103
|
};
|
119
104
|
}, [modalWrapperRef, onDismiss]);
|
120
|
-
|
121
105
|
var modalAccessibilityProps = _objectSpread({
|
122
106
|
role: "dialog"
|
123
107
|
}, title ? {
|
@@ -125,7 +109,6 @@ export var Modal = function Modal(_ref) {
|
|
125
109
|
} : {
|
126
110
|
"aria-label": "Modal"
|
127
111
|
});
|
128
|
-
|
129
112
|
return createPortal( /*#__PURE__*/_jsx(ModalContainer, {
|
130
113
|
"in": open,
|
131
114
|
children: /*#__PURE__*/_jsxs("div", {
|
@@ -3,7 +3,7 @@ import _plugin from "tailwindcss/plugin";
|
|
3
3
|
var plugin = _plugin;
|
4
4
|
var modalPlugin = plugin(function (_ref) {
|
5
5
|
var addComponents = _ref.addComponents,
|
6
|
-
|
6
|
+
theme = _ref.theme;
|
7
7
|
var transitionEasing = "cubic-bezier(0.6, -0.28, 0.735, 0.045)";
|
8
8
|
var transitionDuration = 200;
|
9
9
|
addComponents({
|
@@ -17,8 +17,9 @@ var modalPlugin = plugin(function (_ref) {
|
|
17
17
|
".modal-dialog-large": {
|
18
18
|
maxWidth: "920px"
|
19
19
|
}
|
20
|
-
});
|
20
|
+
});
|
21
21
|
|
22
|
+
// Animation
|
22
23
|
addComponents({
|
23
24
|
".satellite-modal-appear .modal-container, .satellite-modal-enter .modal-container": {
|
24
25
|
opacity: "0.1",
|
@@ -1,24 +1,18 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
-
|
5
4
|
var _templateObject;
|
6
|
-
|
7
5
|
var _excluded = ["className", "children"];
|
8
|
-
|
9
6
|
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; }
|
10
|
-
|
11
7
|
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; }
|
12
|
-
|
13
8
|
import cx from "clsx";
|
14
9
|
import FlexGrid from "../../FlexGrid";
|
15
10
|
import stl from "../../styles/helpers/satellitePrefixer";
|
16
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
17
12
|
export var ModalFooter = function ModalFooter(_ref) {
|
18
13
|
var className = _ref.className,
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
children = _ref.children,
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
22
16
|
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
23
17
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["mt-8"]))), className),
|
24
18
|
children: /*#__PURE__*/_jsx(FlexGrid, {
|