@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
@@ -1,22 +1,19 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
import _plugin from "tailwindcss/plugin";
|
8
5
|
import _require2 from "lodash";
|
9
6
|
// @ts-check
|
10
7
|
var _require = _require2,
|
11
|
-
|
8
|
+
mapKeys = _require.mapKeys;
|
12
9
|
var plugin = _plugin;
|
13
10
|
var typographyPlugin = plugin(function (_ref) {
|
14
11
|
var theme = _ref.theme,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
var desktop = theme("
|
19
|
-
var mobile = theme("
|
12
|
+
addUtilities = _ref.addUtilities,
|
13
|
+
addComponents = _ref.addComponents,
|
14
|
+
e = _ref.e;
|
15
|
+
var desktop = theme("stlTypography.desktop", {});
|
16
|
+
var mobile = theme("stlTypography.mobile", {});
|
20
17
|
var common = {
|
21
18
|
reversed: {
|
22
19
|
color: theme("colors.white")
|
@@ -33,35 +30,35 @@ var typographyPlugin = plugin(function (_ref) {
|
|
33
30
|
textDecoration: "underline"
|
34
31
|
}
|
35
32
|
}
|
36
|
-
};
|
37
|
-
// Example: `className="typo-m-display-small lg:typo-display-small"`
|
33
|
+
};
|
38
34
|
|
35
|
+
// add utilities for manual typography declaration
|
36
|
+
// Example: `className="typo-m-display-small lg:typo-display-small"`
|
39
37
|
/** @type {any} */
|
40
|
-
|
41
38
|
var utilities = _objectSpread(_objectSpread(_objectSpread({}, mapKeys(common, function (_, key) {
|
42
39
|
return ".typo-".concat(e(key));
|
43
40
|
})), mapKeys(desktop, function (_, key) {
|
44
41
|
return ".typo-".concat(e(key));
|
45
42
|
})), mapKeys(mobile, function (_, key) {
|
46
43
|
return ".typo-m-".concat(e(key));
|
47
|
-
}));
|
48
|
-
// Example: `className="display-small"`
|
49
|
-
|
44
|
+
}));
|
50
45
|
|
46
|
+
// add components for automatic responsive typography
|
47
|
+
// Example: `className="display-small"`
|
51
48
|
var components = _objectSpread(_objectSpread({}, mapKeys(mobile, function (_, key) {
|
52
49
|
return ".".concat(e(key));
|
53
50
|
})), {}, _defineProperty({}, "@media (min-width: ".concat(theme("screens.md"), ")"), _objectSpread({}, mapKeys(desktop, function (_, key) {
|
54
51
|
return ".".concat(e(key));
|
55
|
-
}))));
|
56
|
-
|
52
|
+
}))));
|
57
53
|
|
54
|
+
// register add-ons
|
58
55
|
addUtilities(utilities);
|
59
56
|
addComponents(components);
|
60
57
|
}, {
|
61
58
|
content: [],
|
62
59
|
theme: {
|
63
60
|
// @ts-ignore
|
64
|
-
|
61
|
+
stlTypography: function stlTypography(_ref2) {
|
65
62
|
var theme = _ref2.theme;
|
66
63
|
// Need to transform it to a string because in this context, Tailwind doesn't automagically turn it into a string value
|
67
64
|
// Asked here https://github.com/tailwindlabs/tailwindcss/discussions/8755
|
@@ -1,21 +1,19 @@
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
-
|
4
2
|
var _templateObject;
|
5
|
-
|
6
3
|
import cx from "clsx";
|
7
4
|
import stl from "../styles/helpers/satellitePrefixer";
|
8
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
6
|
export var UserContent = function UserContent(_ref) {
|
10
7
|
var className = _ref.className,
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
content = _ref.content,
|
9
|
+
_ref$styled = _ref.styled,
|
10
|
+
styled = _ref$styled === void 0 ? true : _ref$styled;
|
11
|
+
if (!content) return null;
|
12
|
+
return /*#__PURE__*/_jsx("div", {
|
13
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["", ""])), styled && "usercontent"), className),
|
16
14
|
dangerouslySetInnerHTML: {
|
17
15
|
__html: content
|
18
16
|
}
|
19
|
-
})
|
17
|
+
});
|
20
18
|
};
|
21
19
|
export default UserContent;
|
@@ -1,26 +1,21 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
import _rgba from "../styles/rgba";
|
8
5
|
import _require2 from "../styles/helpers/icons";
|
9
6
|
import _plugin from "tailwindcss/plugin";
|
10
7
|
// @ts-check
|
11
8
|
var plugin = _plugin;
|
12
9
|
var _require = _require2,
|
13
|
-
|
10
|
+
toBG = _require.toBG;
|
14
11
|
var rgba = _rgba;
|
15
12
|
export default plugin(function (_ref) {
|
16
13
|
var addComponents = _ref.addComponents,
|
17
|
-
|
18
|
-
|
14
|
+
theme = _ref.theme;
|
19
15
|
/** @type {any} */
|
20
|
-
var desktop = theme("
|
16
|
+
var desktop = theme("stlTypography.desktop", {});
|
21
17
|
/** @type {any} */
|
22
|
-
|
23
|
-
var mobile = theme("typography.mobile", {});
|
18
|
+
var mobile = theme("stlTypography.mobile", {});
|
24
19
|
addComponents({
|
25
20
|
".usercontent": _defineProperty({
|
26
21
|
"h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, table": {
|
@@ -3,35 +3,36 @@ import _plugin from "tailwindcss/plugin";
|
|
3
3
|
var plugin = _plugin;
|
4
4
|
var basePlugin = plugin(function (_ref) {
|
5
5
|
var addBase = _ref.addBase,
|
6
|
-
|
6
|
+
theme = _ref.theme;
|
7
7
|
// https://polaris.shopify.com/design/typography#font-stack
|
8
8
|
addBase({
|
9
9
|
"html, body": {
|
10
10
|
/* Make type rendering look crisper */
|
11
11
|
"-webkit-font-smoothing": "antialiased",
|
12
12
|
"-moz-osx-font-smoothing": "grayscale",
|
13
|
-
|
14
13
|
/* Disable auto-enlargement of small text in Safari */
|
15
14
|
"text-size-adjust": "100%",
|
16
|
-
|
17
15
|
/* Enable kerning and optional ligatures */
|
18
16
|
"text-rendering": "optimizeLegibility"
|
19
17
|
}
|
20
|
-
});
|
18
|
+
});
|
21
19
|
|
20
|
+
// Accent color
|
22
21
|
addBase({
|
23
22
|
":root": {
|
24
23
|
"accent-color": theme("colors.accent.600")
|
25
24
|
}
|
26
|
-
});
|
25
|
+
});
|
27
26
|
|
27
|
+
// Text selection
|
28
28
|
addBase({
|
29
29
|
"::selection": {
|
30
30
|
background: theme("colors.accent.600"),
|
31
31
|
color: theme("colors.white")
|
32
32
|
}
|
33
|
-
});
|
33
|
+
});
|
34
34
|
|
35
|
+
// Base styles for links
|
35
36
|
addBase({
|
36
37
|
a: {
|
37
38
|
color: theme("colors.accent.600"),
|
package/esm/styles/colors.js
CHANGED
@@ -38,14 +38,14 @@ var colors = {
|
|
38
38
|
100: "#f2f3ff"
|
39
39
|
},
|
40
40
|
xenon: {
|
41
|
-
900: "#
|
42
|
-
800: "#
|
43
|
-
700: "#
|
41
|
+
900: "#000033",
|
42
|
+
800: "#042077",
|
43
|
+
700: "#022eb9",
|
44
44
|
600: "#003dff",
|
45
|
-
500: "#
|
46
|
-
400: "#
|
47
|
-
300: "#
|
48
|
-
200: "#
|
45
|
+
500: "#1e59ff",
|
46
|
+
400: "#457aff",
|
47
|
+
300: "#76a0ff",
|
48
|
+
200: "#bbd1ff",
|
49
49
|
100: "#f2f4ff"
|
50
50
|
},
|
51
51
|
blue: {
|
@@ -3,13 +3,12 @@ import _Color from "color";
|
|
3
3
|
// @ts-check
|
4
4
|
var Color = _Color;
|
5
5
|
var colors = _colors;
|
6
|
+
|
6
7
|
/**
|
7
8
|
* Creates the disabled version of a color by mixing it with white
|
8
9
|
* @param {string} baseColor
|
9
10
|
*/
|
10
|
-
|
11
11
|
function disabledColor(baseColor) {
|
12
12
|
return Color(baseColor).mix(Color(colors.white), 0.6).hex();
|
13
13
|
}
|
14
|
-
|
15
14
|
export default disabledColor;
|
@@ -3,39 +3,36 @@ import _require2 from "react";
|
|
3
3
|
import _Icon from "react-feather";
|
4
4
|
var Icon = _Icon;
|
5
5
|
var _require = _require2,
|
6
|
-
|
6
|
+
createElement = _require.createElement;
|
7
7
|
var _require3 = _require4,
|
8
|
-
|
8
|
+
renderToStaticMarkup = _require3.renderToStaticMarkup;
|
9
|
+
|
9
10
|
/**
|
10
11
|
* Render inline SVG for a Feather icon
|
11
12
|
* @param {string} color
|
12
13
|
*/
|
13
|
-
|
14
14
|
var toSVG = function toSVG(iconName) {
|
15
15
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
16
16
|
return renderToStaticMarkup(createElement(Icon[iconName], props, null));
|
17
17
|
};
|
18
|
+
|
18
19
|
/**
|
19
20
|
* Return Feather icon as SVG background-image value
|
20
21
|
* @param {string} color
|
21
22
|
*/
|
22
|
-
|
23
|
-
|
24
23
|
var toBG = function toBG(iconName) {
|
25
24
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
26
25
|
return "url(\"data:image/svg+xml;utf8,".concat(encodeURIComponent(toSVG(iconName, props)), "\")");
|
27
26
|
};
|
27
|
+
|
28
28
|
/**
|
29
29
|
* Return url encoded image background
|
30
30
|
* @param {string} color
|
31
31
|
*/
|
32
|
-
|
33
|
-
|
34
32
|
var selectIconBG = function selectIconBG(color) {
|
35
33
|
var encodedColor = encodeURIComponent(color);
|
36
34
|
return "url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"".concat(encodedColor, "\" stroke-width=\"2\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M13 7L7 1 1 7M1 17l6 6 6-6\"/></g></svg>')");
|
37
35
|
};
|
38
|
-
|
39
36
|
export default {
|
40
37
|
selectIconBG: selectIconBG,
|
41
38
|
toBG: toBG,
|
@@ -1,24 +1,21 @@
|
|
1
1
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
2
|
-
|
3
2
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
import _prefixTailwindClassName from "./prefixTailwindClassName";
|
8
5
|
// @ts-check
|
9
6
|
var prefixTailwindClassName = _prefixTailwindClassName;
|
7
|
+
|
10
8
|
/**
|
11
9
|
* Regexp lifted and modified from https://tailwindcss.com/docs/optimizing-for-production#writing-purgeable-html because
|
12
10
|
* it does not handle cases like foo\\n
|
13
11
|
*/
|
14
|
-
|
15
12
|
var TAILWIND_REGEXP = /[^<>"'`\s\\]*[^<>"'`\s:\\]/g;
|
13
|
+
|
16
14
|
/**
|
17
15
|
* Creates a PurgeCSS extractor
|
18
16
|
* Prefix is added back if missing (workaround for using the prefix helper 🙃).
|
19
17
|
* @param {string} prefix The prefix used in your Tailwind config
|
20
18
|
*/
|
21
|
-
|
22
19
|
function makePurgeCssExtractor(prefix) {
|
23
20
|
/**
|
24
21
|
* @param {string} content
|
@@ -26,21 +23,16 @@ function makePurgeCssExtractor(prefix) {
|
|
26
23
|
*/
|
27
24
|
var extractor = function extractor(content) {
|
28
25
|
var matches = content.match(TAILWIND_REGEXP);
|
29
|
-
|
30
26
|
if (!matches) {
|
31
27
|
return [];
|
32
28
|
}
|
33
|
-
|
34
29
|
var extractedClassNames = new Set();
|
35
|
-
|
36
30
|
var _iterator = _createForOfIteratorHelper(matches),
|
37
|
-
|
38
|
-
|
31
|
+
_step;
|
39
32
|
try {
|
40
33
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
41
34
|
var className = _step.value;
|
42
35
|
extractedClassNames.add(className);
|
43
|
-
|
44
36
|
if (!className.includes(prefix)) {
|
45
37
|
extractedClassNames.add(prefixTailwindClassName(prefix, className));
|
46
38
|
}
|
@@ -50,11 +42,8 @@ function makePurgeCssExtractor(prefix) {
|
|
50
42
|
} finally {
|
51
43
|
_iterator.f();
|
52
44
|
}
|
53
|
-
|
54
45
|
return Array.from(extractedClassNames);
|
55
46
|
};
|
56
|
-
|
57
47
|
return extractor;
|
58
48
|
}
|
59
|
-
|
60
49
|
export default makePurgeCssExtractor;
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
2
2
|
import _prefixTailwindClassName from "./prefixTailwindClassName";
|
3
3
|
// @ts-check
|
4
|
+
|
4
5
|
var prefixTailwindClassName = _prefixTailwindClassName;
|
5
6
|
var WHITESPACE_REGEXP = /\s+/;
|
6
7
|
/**
|
7
8
|
* Creates a tagged template that generates prefixed tailwind classnames
|
8
9
|
* @param {string} tailwindPrefix
|
9
10
|
*/
|
10
|
-
|
11
11
|
function makeTailwindPrefixer(tailwindPrefix) {
|
12
12
|
/**
|
13
13
|
*
|
@@ -18,22 +18,17 @@ function makeTailwindPrefixer(tailwindPrefix) {
|
|
18
18
|
for (var _len = arguments.length, placeholders = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
19
19
|
placeholders[_key - 1] = arguments[_key];
|
20
20
|
}
|
21
|
-
|
22
21
|
var values = placeholders.filter(Boolean);
|
23
22
|
values.push.apply(values, _toConsumableArray(literals));
|
24
23
|
var splitClassNames = values.join(" ").split(WHITESPACE_REGEXP);
|
25
24
|
var prefixedClassNames = [];
|
26
|
-
|
27
25
|
for (var i = 0; i < splitClassNames.length; i++) {
|
28
26
|
var classname = splitClassNames[i];
|
29
27
|
if (classname.length === 0) continue;
|
30
28
|
prefixedClassNames.push(prefixTailwindClassName(tailwindPrefix, classname));
|
31
29
|
}
|
32
|
-
|
33
30
|
return prefixedClassNames.join(" ");
|
34
31
|
}
|
35
|
-
|
36
32
|
return tailwindPrefixerTag;
|
37
33
|
}
|
38
|
-
|
39
34
|
export default makeTailwindPrefixer;
|
@@ -6,21 +6,21 @@
|
|
6
6
|
* @param {string} classname
|
7
7
|
*/
|
8
8
|
function prefixTailwindClassName(tailwindPrefix, classname) {
|
9
|
-
var searchZone = classname.replace(/-\[[^\]]+\]$/, "");
|
9
|
+
var searchZone = classname.replace(/-\[[^\]]+\]$/, "");
|
10
10
|
|
11
|
-
|
11
|
+
// important marker
|
12
|
+
var prefixInsertIndex = searchZone.lastIndexOf("!");
|
12
13
|
|
14
|
+
// modifier separator
|
13
15
|
if (prefixInsertIndex === -1) {
|
14
16
|
prefixInsertIndex = searchZone.lastIndexOf(":");
|
15
|
-
}
|
16
|
-
|
17
|
+
}
|
17
18
|
|
19
|
+
// container marker
|
18
20
|
if (prefixInsertIndex === -1) {
|
19
21
|
prefixInsertIndex = searchZone.lastIndexOf("@");
|
20
22
|
}
|
21
|
-
|
22
23
|
prefixInsertIndex += 1;
|
23
24
|
return classname.slice(0, prefixInsertIndex) + tailwindPrefix + classname.slice(prefixInsertIndex);
|
24
25
|
}
|
25
|
-
|
26
26
|
export default prefixTailwindClassName;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _makeTailwindPrefixer from "./makeTailwindPrefixer";
|
2
2
|
// @ts-check
|
3
3
|
var makeTailwindPrefixer = _makeTailwindPrefixer;
|
4
|
-
/** Convenience module that exports the preconfigured tagged template for the library */
|
5
4
|
|
5
|
+
/** Convenience module that exports the preconfigured tagged template for the library */
|
6
6
|
var stl = makeTailwindPrefixer("stl-");
|
7
7
|
export default stl;
|
package/esm/styles/rgba.js
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
import _Color from "color";
|
2
2
|
// @ts-check
|
3
3
|
var Color = _Color;
|
4
|
+
|
4
5
|
/**
|
5
6
|
*
|
6
7
|
* @param {string} color
|
7
8
|
* @param {number} alpha
|
8
9
|
* @returns {string}
|
9
10
|
*/
|
10
|
-
|
11
11
|
function rgba(color, alpha) {
|
12
12
|
return Color(color).alpha(alpha).rgb().string();
|
13
13
|
}
|
14
|
-
|
15
14
|
export default rgba;
|
@@ -1,21 +1,19 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
|
3
2
|
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; }
|
4
|
-
|
5
3
|
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; }
|
6
|
-
|
7
4
|
import _zIndexes from "./zIndexes";
|
8
5
|
import _rgba from "./rgba";
|
9
6
|
import _makePurgeCssExtractor from "./helpers/makePurgeCssExtractor.js";
|
10
7
|
import _colors from "./colors";
|
11
8
|
// @ts-check
|
9
|
+
|
12
10
|
var colors = _colors;
|
13
11
|
var makePurgeCssExtractor = _makePurgeCssExtractor;
|
14
12
|
var rgba = _rgba;
|
15
13
|
var zIndexes = _zIndexes;
|
16
14
|
var prefix = "stl-";
|
17
|
-
/** @type {import('tailwindcss').Config} */
|
18
15
|
|
16
|
+
/** @type {import('tailwindcss').Config} */
|
19
17
|
export default {
|
20
18
|
prefix: prefix,
|
21
19
|
content: {
|
@@ -44,8 +42,8 @@ export default {
|
|
44
42
|
"2xl": "1.75rem",
|
45
43
|
// 28px,
|
46
44
|
"3xl": "2.625rem" // 42px,
|
47
|
-
|
48
45
|
},
|
46
|
+
|
49
47
|
lineHeight: {
|
50
48
|
inherit: "inherit",
|
51
49
|
sm: "1rem",
|
@@ -100,7 +98,7 @@ export default {
|
|
100
98
|
100: "1"
|
101
99
|
},
|
102
100
|
colors: _objectSpread(_objectSpread({}, colors), {}, {
|
103
|
-
accent: colors.
|
101
|
+
accent: colors.xenon,
|
104
102
|
inherit: "inherit",
|
105
103
|
transparent: "transparent",
|
106
104
|
current: "currentColor",
|
package/esm/styles/zIndexes.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
// See https://github.com/streamich/react-use/issues/73
|
2
|
-
|
3
2
|
/**
|
4
3
|
* To detect you are in IE (for this case) by checking typeof(Event) which is
|
5
4
|
* 'function' for all except IE where it is 'object'.
|
@@ -19,7 +18,6 @@
|
|
19
18
|
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
20
19
|
return evt;
|
21
20
|
}
|
22
|
-
|
23
21
|
CustomEvent.prototype = window.Event.prototype;
|
24
22
|
window.Event = CustomEvent;
|
25
23
|
})();
|
package/esm/utils/formatters.js
CHANGED
@@ -1,24 +1,21 @@
|
|
1
1
|
var defaultHumanSizes = ["", "K", "M", "B", "T"];
|
2
2
|
export function numberWithCommas(x) {
|
3
3
|
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
4
|
-
|
5
4
|
if (typeof x !== "number") {
|
6
5
|
return x;
|
7
6
|
}
|
8
|
-
|
9
7
|
return (x || 0).toFixed(precision).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
10
8
|
}
|
11
9
|
export function formatHumanNumber(bytes, options) {
|
12
10
|
var _ref = options !== null && options !== void 0 ? options : {},
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
_ref$decimals = _ref.decimals,
|
12
|
+
decimals = _ref$decimals === void 0 ? 2 : _ref$decimals,
|
13
|
+
_ref$sizes = _ref.sizes,
|
14
|
+
sizes = _ref$sizes === void 0 ? defaultHumanSizes : _ref$sizes,
|
15
|
+
_ref$divider = _ref.divider,
|
16
|
+
divider = _ref$divider === void 0 ? 1000 : _ref$divider,
|
17
|
+
_ref$prettyDecimals = _ref.prettyDecimals,
|
18
|
+
prettyDecimals = _ref$prettyDecimals === void 0 ? false : _ref$prettyDecimals;
|
22
19
|
if (bytes === 0) return "0";
|
23
20
|
var i = Math.min(Math.max(0, Math.floor(Math.log(Math.abs(bytes)) / Math.log(divider))), sizes.length - 1);
|
24
21
|
var nb = bytes / Math.pow(divider, i);
|
@@ -26,11 +23,10 @@ export function formatHumanNumber(bytes, options) {
|
|
26
23
|
}
|
27
24
|
export function formatHumanSize(nb, options) {
|
28
25
|
var _ref2 = options !== null && options !== void 0 ? options : {},
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
_ref2$decimals = _ref2.decimals,
|
27
|
+
decimals = _ref2$decimals === void 0 ? 2 : _ref2$decimals,
|
28
|
+
_ref2$prettyDecimals = _ref2.prettyDecimals,
|
29
|
+
prettyDecimals = _ref2$prettyDecimals === void 0 ? false : _ref2$prettyDecimals;
|
34
30
|
return formatHumanNumber(nb, {
|
35
31
|
decimals: decimals,
|
36
32
|
sizes: ["", "K", "M", "G", "T"],
|
@@ -4,7 +4,6 @@ export function genericChangeHandler(ctx, updater) {
|
|
4
4
|
return function (name) {
|
5
5
|
var attribute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "value";
|
6
6
|
var key = "".concat(name, ":").concat(attribute);
|
7
|
-
|
8
7
|
if (!memo[key]) {
|
9
8
|
memo[key] = function (evt) {
|
10
9
|
var newValue = evt.target[attribute];
|
@@ -13,7 +12,6 @@ export function genericChangeHandler(ctx, updater) {
|
|
13
12
|
});
|
14
13
|
};
|
15
14
|
}
|
16
|
-
|
17
15
|
return memo[key];
|
18
16
|
};
|
19
17
|
}
|
package/esm/utils/hashCode.js
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
// https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript?rq=1
|
2
2
|
export var hashCode = function hashCode(value) {
|
3
3
|
var hash = 0;
|
4
|
-
|
5
4
|
if (value.length === 0) {
|
6
5
|
return hash;
|
7
6
|
}
|
8
|
-
|
9
7
|
for (var i = 0; i < value.length; i++) {
|
10
8
|
var _char = value.charCodeAt(i);
|
11
|
-
|
12
9
|
hash = (hash << 5) - hash + _char;
|
13
10
|
hash = hash & hash; // Convert to 32bit integer
|
14
11
|
}
|
@@ -2,10 +2,8 @@ var isCssPropertySupported = function isCssPropertySupported(prop, value) {
|
|
2
2
|
if (typeof document === "undefined") {
|
3
3
|
return false;
|
4
4
|
}
|
5
|
-
|
6
5
|
var div = document.createElement("div");
|
7
6
|
div.style[prop] = value;
|
8
7
|
return div.style[prop] === value;
|
9
8
|
};
|
10
|
-
|
11
9
|
export default isCssPropertySupported;
|
package/esm/utils/onlyText.js
CHANGED
@@ -1,31 +1,25 @@
|
|
1
1
|
import { Children, isValidElement } from "react";
|
2
|
-
|
3
2
|
var hasChildren = function hasChildren(element) {
|
4
3
|
return /*#__PURE__*/isValidElement(element) && Boolean(element.props.children);
|
5
4
|
};
|
6
|
-
|
7
5
|
var childToString = function childToString(child) {
|
8
6
|
if (typeof child === "undefined" || child === null || typeof child === "boolean") {
|
9
7
|
return "";
|
10
8
|
}
|
11
|
-
|
12
9
|
if (JSON.stringify(child) === "{}") {
|
13
10
|
return "";
|
14
11
|
}
|
15
|
-
|
16
12
|
return child.toString();
|
17
|
-
};
|
18
|
-
// @see https://github.com/fernandopasik/react-children-utilities/blob/main/src/lib/onlyText.ts
|
19
|
-
|
13
|
+
};
|
20
14
|
|
15
|
+
// Code stolen from `react-children-utils`
|
16
|
+
// @see https://github.com/fernandopasik/react-children-utilities/blob/main/src/lib/onlyText.ts
|
21
17
|
var onlyText = function onlyText(children) {
|
22
18
|
if (!(children instanceof Array) && ! /*#__PURE__*/isValidElement(children)) {
|
23
19
|
return childToString(children);
|
24
20
|
}
|
25
|
-
|
26
21
|
return Children.toArray(children).reduce(function (text, child) {
|
27
22
|
var newText = "";
|
28
|
-
|
29
23
|
if ( /*#__PURE__*/isValidElement(child) && hasChildren(child)) {
|
30
24
|
newText = onlyText(child.props.children);
|
31
25
|
} else if ( /*#__PURE__*/isValidElement(child) && !hasChildren(child)) {
|
@@ -33,9 +27,7 @@ var onlyText = function onlyText(children) {
|
|
33
27
|
} else {
|
34
28
|
newText = childToString(child);
|
35
29
|
}
|
36
|
-
|
37
30
|
return text.concat(newText);
|
38
31
|
}, "");
|
39
32
|
};
|
40
|
-
|
41
33
|
export default onlyText;
|
package/esm/utils/parseUrl.js
CHANGED