@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,15 +1,13 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject;
|
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";
|
8
6
|
export var ModalSection = function ModalSection(_ref) {
|
9
7
|
var children = _ref.children,
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
className = _ref.className,
|
9
|
+
_ref$fullBleed = _ref.fullBleed,
|
10
|
+
fullBleed = _ref$fullBleed === void 0 ? false : _ref$fullBleed;
|
13
11
|
return /*#__PURE__*/_jsx("section", {
|
14
12
|
className: cx(fullBleed && stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["-mx-10"]))), className),
|
15
13
|
children: children
|
@@ -23,7 +23,9 @@ export declare type IndeterminateCompactPaginationProps = BaseCompactPaginationP
|
|
23
23
|
nextDisabled?: boolean;
|
24
24
|
};
|
25
25
|
export declare type CompactPaginationProps = DeterminateCompactPaginationProps | IndeterminateCompactPaginationProps;
|
26
|
+
/** @ignore */
|
26
27
|
export declare const isDeterminateCompactPaginationProps: (props: CompactPaginationProps) => props is DeterminateCompactPaginationProps;
|
28
|
+
/** @ignore */
|
27
29
|
export declare const isIndeterminateCompactPaginationProps: (props: CompactPaginationProps) => props is IndeterminateCompactPaginationProps;
|
28
30
|
export declare const CompactPagination: (props: CompactPaginationProps) => JSX.Element;
|
29
31
|
export default CompactPagination;
|
@@ -1,12 +1,8 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
-
|
4
3
|
var _templateObject, _templateObject2;
|
5
|
-
|
6
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; }
|
7
|
-
|
8
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; }
|
9
|
-
|
10
6
|
import { ArrowLeft, ArrowRight, ChevronsLeft, ChevronsRight } from "react-feather";
|
11
7
|
import { IconButton } from "../../Button";
|
12
8
|
import { useLocale } from "../../Satellite";
|
@@ -22,21 +18,21 @@ var DEFAULT_COMPACT_PAGINATION_LOCALE = {
|
|
22
18
|
return typeof nbPages === "number" ? "Page ".concat(page, " of ").concat(nbPages) : "Page ".concat(page, " of many");
|
23
19
|
}
|
24
20
|
};
|
21
|
+
/** @ignore */
|
25
22
|
export var isDeterminateCompactPaginationProps = function isDeterminateCompactPaginationProps(props) {
|
26
23
|
return "nbPages" in props;
|
27
24
|
};
|
25
|
+
|
26
|
+
/** @ignore */
|
28
27
|
export var isIndeterminateCompactPaginationProps = function isIndeterminateCompactPaginationProps(props) {
|
29
28
|
return !isDeterminateCompactPaginationProps(props);
|
30
29
|
};
|
31
30
|
export var CompactPagination = function CompactPagination(props) {
|
32
31
|
var _props$label;
|
33
|
-
|
34
32
|
var contextLocale = useLocale("compactPagination");
|
35
|
-
|
36
33
|
var locale = _objectSpread(_objectSpread({}, DEFAULT_COMPACT_PAGINATION_LOCALE), {}, {
|
37
34
|
contextLocale: contextLocale
|
38
35
|
}, props.locale);
|
39
|
-
|
40
36
|
var labelType = (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : isDeterminateCompactPaginationProps(props) ? "complete" : "compact";
|
41
37
|
var label = labelType === "none" ? null : labelType === "compact" ? "".concat(props.currentPage) : isDeterminateCompactPaginationProps(props) ? locale.label(props.currentPage, props.nbPages) : locale.label(props.currentPage);
|
42
38
|
var isFirstPage = props.currentPage === 1;
|
@@ -1,12 +1,8 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
|
-
|
4
3
|
var _templateObject, _templateObject2;
|
5
|
-
|
6
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; }
|
7
|
-
|
8
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; }
|
9
|
-
|
10
6
|
import { useLocale } from "../../Satellite";
|
11
7
|
import stl from "../../styles/helpers/satellitePrefixer";
|
12
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -17,15 +13,13 @@ var DEFAULT_DOT_PAGINATION_LOCALE = {
|
|
17
13
|
};
|
18
14
|
export var DotPagination = function DotPagination(_ref) {
|
19
15
|
var currentPage = _ref.currentPage,
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
16
|
+
onChange = _ref.onChange,
|
17
|
+
nbPages = _ref.nbPages,
|
18
|
+
_ref$size = _ref.size,
|
19
|
+
size = _ref$size === void 0 ? "medium" : _ref$size,
|
20
|
+
propsLocale = _ref.locale;
|
25
21
|
var contextLocale = useLocale("dotPagination");
|
26
|
-
|
27
22
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_DOT_PAGINATION_LOCALE), contextLocale), propsLocale);
|
28
|
-
|
29
23
|
return /*#__PURE__*/_jsx("ul", {
|
30
24
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex"]))),
|
31
25
|
children: new Array(nbPages).fill(undefined).map(function (_, idx) {
|
@@ -1,12 +1,8 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
-
|
4
3
|
var _templateObject;
|
5
|
-
|
6
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; }
|
7
|
-
|
8
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; }
|
9
|
-
|
10
6
|
import { ArrowLeft, ArrowRight } from "react-feather";
|
11
7
|
import Button, { ButtonGroup } from "../../Button";
|
12
8
|
import { useLocale } from "../../Satellite";
|
@@ -23,7 +19,6 @@ var DEFAULT_PAGINATION_LOCALE = {
|
|
23
19
|
goToNextPage: "Go to next page"
|
24
20
|
};
|
25
21
|
var DEFAULT_MAX_BUTTONS = 10;
|
26
|
-
|
27
22
|
var Ellipsis = function Ellipsis() {
|
28
23
|
return /*#__PURE__*/_jsx(Button, {
|
29
24
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["pointer-events-none"]))),
|
@@ -32,12 +27,11 @@ var Ellipsis = function Ellipsis() {
|
|
32
27
|
children: "\u2026"
|
33
28
|
});
|
34
29
|
};
|
35
|
-
|
36
30
|
var Group = function Group(_ref) {
|
37
31
|
var group = _ref.group,
|
38
|
-
|
39
|
-
|
40
|
-
|
32
|
+
currentPage = _ref.currentPage,
|
33
|
+
onChange = _ref.onChange,
|
34
|
+
goToPage = _ref.goToPage;
|
41
35
|
return /*#__PURE__*/_jsx(_Fragment, {
|
42
36
|
children: group.map(function (index) {
|
43
37
|
return /*#__PURE__*/_jsx(Button, {
|
@@ -51,6 +45,7 @@ var Group = function Group(_ref) {
|
|
51
45
|
})
|
52
46
|
});
|
53
47
|
};
|
48
|
+
|
54
49
|
/**
|
55
50
|
* Use pagination to help our users to move through an ordered collection of items.
|
56
51
|
*
|
@@ -58,33 +53,26 @@ var Group = function Group(_ref) {
|
|
58
53
|
* - Don't use on list with less than 20 items
|
59
54
|
* - Place the pagination at the bottom of the split item
|
60
55
|
*/
|
61
|
-
|
62
|
-
|
63
56
|
export var Pagination = function Pagination(_ref2) {
|
64
57
|
var currentPage = _ref2.currentPage,
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
58
|
+
nbPages = _ref2.nbPages,
|
59
|
+
onChange = _ref2.onChange,
|
60
|
+
_ref2$maxButtons = _ref2.maxButtons,
|
61
|
+
maxButtonsParam = _ref2$maxButtons === void 0 ? DEFAULT_MAX_BUTTONS : _ref2$maxButtons,
|
62
|
+
propsLocale = _ref2.locale;
|
70
63
|
var contextLocale = useLocale("pagination");
|
71
|
-
|
72
64
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_PAGINATION_LOCALE), contextLocale), propsLocale);
|
73
|
-
|
74
65
|
var padding = Math.floor((Math.min(nbPages, maxButtonsParam) - 1) / 2);
|
75
66
|
var maxButtons = 2 * padding + 1;
|
76
67
|
var currentPageGroupStart = Math.max(1, Math.min(currentPage - padding, nbPages - maxButtons));
|
77
68
|
var currentPageGroupEnd = Math.min(currentPageGroupStart + maxButtons, nbPages);
|
78
69
|
var groups = [[], range(currentPageGroupStart, currentPageGroupEnd + 1), []];
|
79
|
-
|
80
70
|
if (currentPageGroupStart > 1) {
|
81
71
|
groups[0].push(1);
|
82
72
|
}
|
83
|
-
|
84
73
|
if (currentPageGroupEnd < nbPages) {
|
85
74
|
groups[2].push(nbPages);
|
86
75
|
}
|
87
|
-
|
88
76
|
return /*#__PURE__*/_jsxs(ButtonGroup, {
|
89
77
|
as: "nav",
|
90
78
|
children: [/*#__PURE__*/_jsx(Button, {
|
@@ -1,19 +1,13 @@
|
|
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, _templateObject2;
|
6
|
-
|
7
5
|
var _excluded = ["value", "className", "barClassName"];
|
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 stl from "../styles/helpers/satellitePrefixer";
|
15
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
|
-
|
17
11
|
/**
|
18
12
|
* Progress bars visually represent the completion of a task or operation.
|
19
13
|
*
|
@@ -22,10 +16,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
16
|
*/
|
23
17
|
export var ProgressBar = function ProgressBar(_ref) {
|
24
18
|
var value = _ref.value,
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
className = _ref.className,
|
20
|
+
barClassName = _ref.barClassName,
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
29
22
|
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
30
23
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["progress-bar"]))), className),
|
31
24
|
role: "progressbar",
|
@@ -2,13 +2,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["className", "size", "thickness", "align"];
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
7
|
-
|
8
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; }
|
9
|
-
|
10
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; }
|
11
|
-
|
12
8
|
import cx from "clsx";
|
13
9
|
import stl from "../styles/helpers/satellitePrefixer";
|
14
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -17,17 +13,17 @@ var ALIGN_CLASSNAMES = {
|
|
17
13
|
left: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["mr-auto"]))),
|
18
14
|
center: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["m-auto"]))),
|
19
15
|
right: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["ml-auto"])))
|
20
|
-
};
|
16
|
+
};
|
21
17
|
|
18
|
+
// Took heavy inspiration from https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/CircularProgress/CircularProgress.js
|
22
19
|
export var ProgressSpinner = function ProgressSpinner(_ref) {
|
23
20
|
var className = _ref.className,
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
21
|
+
_ref$size = _ref.size,
|
22
|
+
size = _ref$size === void 0 ? 24 : _ref$size,
|
23
|
+
_ref$thickness = _ref.thickness,
|
24
|
+
thickness = _ref$thickness === void 0 ? 2 : _ref$thickness,
|
25
|
+
align = _ref.align,
|
26
|
+
svgProps = _objectWithoutProperties(_ref, _excluded);
|
31
27
|
return /*#__PURE__*/_jsxs("svg", _objectSpread(_objectSpread({}, svgProps), {}, {
|
32
28
|
className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["progress-spinner"]))), align && ALIGN_CLASSNAMES[align], className),
|
33
29
|
viewBox: "".concat(size / 2, " ").concat(size / 2, " ").concat(size, " ").concat(size),
|
@@ -3,11 +3,11 @@ import _plugin from "tailwindcss/plugin";
|
|
3
3
|
var plugin = _plugin;
|
4
4
|
var progressSpinnerPlugin = plugin(function (_ref) {
|
5
5
|
var addComponents = _ref.addComponents,
|
6
|
-
|
7
|
-
|
6
|
+
theme = _ref.theme;
|
8
7
|
/**
|
9
8
|
* @param {string} color
|
10
9
|
*/
|
10
|
+
|
11
11
|
addComponents({
|
12
12
|
".progress-spinner": {
|
13
13
|
color: theme("colors.accent.600"),
|
@@ -1,23 +1,17 @@
|
|
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"];
|
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 stl from "../styles/helpers/satellitePrefixer";
|
16
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
17
12
|
export var RadioButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
18
13
|
var className = _ref.className,
|
19
|
-
|
20
|
-
|
14
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
21
15
|
return /*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({}, props), {}, {
|
22
16
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["radio-button"]))), className),
|
23
17
|
type: "radio",
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
-
|
4
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
5
|
-
|
6
4
|
import { useState } from "react";
|
7
5
|
import Card from "../Card";
|
8
6
|
import stl from "../styles/helpers/satellitePrefixer";
|
@@ -13,17 +11,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
12
|
export var RadioGroupItem = function RadioGroupItem(_ref) {
|
15
13
|
var value = _ref.value,
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
disabled = _ref.disabled,
|
15
|
+
children = _ref.children;
|
19
16
|
var _useRadioGroupContext = useRadioGroupContext(),
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
17
|
+
name = _useRadioGroupContext.name,
|
18
|
+
contextDisabled = _useRadioGroupContext.disabled,
|
19
|
+
_onChange = _useRadioGroupContext.onChange,
|
20
|
+
contextValue = _useRadioGroupContext.value,
|
21
|
+
_useRadioGroupContext2 = _useRadioGroupContext.textPosition,
|
22
|
+
textPosition = _useRadioGroupContext2 === void 0 ? "left" : _useRadioGroupContext2;
|
27
23
|
var checked = value === contextValue;
|
28
24
|
disabled = contextDisabled || disabled;
|
29
25
|
return /*#__PURE__*/_jsxs("label", {
|
@@ -45,6 +41,7 @@ export var RadioGroupItem = function RadioGroupItem(_ref) {
|
|
45
41
|
})]
|
46
42
|
});
|
47
43
|
};
|
44
|
+
|
48
45
|
/**
|
49
46
|
* Use radio buttons when users have to make a single selection from a list of options.
|
50
47
|
*
|
@@ -60,22 +57,19 @@ export var RadioGroupItem = function RadioGroupItem(_ref) {
|
|
60
57
|
* - If you need to have an unselected state, just add a radio button with a *None* option.
|
61
58
|
* - Sometimes, you might want to include an *Other* option (Usually followed by a text input if a user needs to provide a specific answer)
|
62
59
|
*/
|
63
|
-
|
64
60
|
export var RadioGroup = function RadioGroup(_ref2) {
|
65
61
|
var className = _ref2.className,
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
62
|
+
name = _ref2.name,
|
63
|
+
value = _ref2.value,
|
64
|
+
disabled = _ref2.disabled,
|
65
|
+
textPosition = _ref2.textPosition,
|
66
|
+
children = _ref2.children,
|
67
|
+
onChange = _ref2.onChange;
|
73
68
|
var _useState = useState(function () {
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
69
|
+
return uniqueId("RadioGroupName-");
|
70
|
+
}),
|
71
|
+
_useState2 = _slicedToArray(_useState, 1),
|
72
|
+
componentDefaultName = _useState2[0];
|
79
73
|
name = name || componentDefaultName;
|
80
74
|
var contextValue = {
|
81
75
|
name: name,
|
@@ -2,10 +2,8 @@ import { createContext, useContext } from "react";
|
|
2
2
|
export var RadioGroupContext = /*#__PURE__*/createContext(null);
|
3
3
|
export var useRadioGroupContext = function useRadioGroupContext() {
|
4
4
|
var contextValue = useContext(RadioGroupContext);
|
5
|
-
|
6
5
|
if (!contextValue) {
|
7
6
|
throw new Error("Invalid usage of useRadioGroupContext outside of RadioGroupContext");
|
8
7
|
}
|
9
|
-
|
10
8
|
return contextValue;
|
11
9
|
};
|
@@ -2,32 +2,27 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
7
|
-
|
8
6
|
var _excluded = ["className", "value", "defaultValue", "min", "max", "disabled", "track1Color", "track2Color"];
|
9
|
-
|
10
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; }
|
11
|
-
|
12
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; }
|
13
|
-
|
14
9
|
import cx from "clsx";
|
15
10
|
import { forwardRef, useEffect, useState } from "react";
|
11
|
+
import colors from "../styles/colors";
|
16
12
|
import stl from "../styles/helpers/satellitePrefixer";
|
17
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
18
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
19
|
-
|
20
15
|
var clamp = function clamp(value, lowerBound, higherBound) {
|
21
16
|
if (value < lowerBound) return lowerBound;
|
22
17
|
if (value > higherBound) return higherBound;
|
23
18
|
return value;
|
24
19
|
};
|
25
|
-
|
26
20
|
var getScaleValues = function getScaleValues(value, min, max) {
|
27
21
|
var maxScale = (value - min) / (max - min);
|
28
22
|
var minScale = 1 - maxScale;
|
29
23
|
return [clamp(maxScale, 0, 1), clamp(minScale, 0, 1)];
|
30
24
|
};
|
25
|
+
|
31
26
|
/**
|
32
27
|
* A range slider is an input field where users select a numeric value within a given range (minimum and maximum values).
|
33
28
|
*
|
@@ -35,62 +30,58 @@ var getScaleValues = function getScaleValues(value, min, max) {
|
|
35
30
|
* - Provide min and max value whenever possible
|
36
31
|
* - Provide text input for better accessibility
|
37
32
|
*/
|
38
|
-
|
39
|
-
|
40
33
|
export var RangeSlider = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
41
34
|
var className = _ref.className,
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
35
|
+
value = _ref.value,
|
36
|
+
defaultValue = _ref.defaultValue,
|
37
|
+
_ref$min = _ref.min,
|
38
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
39
|
+
_ref$max = _ref.max,
|
40
|
+
max = _ref$max === void 0 ? 100 : _ref$max,
|
41
|
+
disabled = _ref.disabled,
|
42
|
+
track1Color = _ref.track1Color,
|
43
|
+
track2Color = _ref.track2Color,
|
44
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
53
45
|
var _useState = useState(function () {
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
46
|
+
return (typeof value !== "undefined" ? value : defaultValue) || 0;
|
47
|
+
}),
|
48
|
+
_useState2 = _slicedToArray(_useState, 2),
|
49
|
+
internalValue = _useState2[0],
|
50
|
+
setInternalValue = _useState2[1];
|
60
51
|
var _getScaleValues = getScaleValues(internalValue, min, max),
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
52
|
+
_getScaleValues2 = _slicedToArray(_getScaleValues, 2),
|
53
|
+
track1 = _getScaleValues2[0],
|
54
|
+
track2 = _getScaleValues2[1];
|
65
55
|
useEffect(function () {
|
66
56
|
if (typeof value !== "undefined" && value !== internalValue) {
|
67
57
|
setInternalValue(value);
|
68
58
|
}
|
69
59
|
}, [internalValue, value]);
|
70
|
-
|
71
60
|
var handleChange = function handleChange(evt) {
|
72
61
|
if (otherProps.onChange) {
|
73
62
|
otherProps.onChange(evt);
|
74
63
|
}
|
75
|
-
|
76
64
|
if (!evt.defaultPrevented) {
|
77
65
|
setInternalValue(evt.currentTarget.valueAsNumber);
|
78
66
|
}
|
79
67
|
};
|
80
|
-
|
68
|
+
var trackColors = {
|
69
|
+
track1: disabled ? colors.grey[200] : track1Color,
|
70
|
+
track2: disabled ? colors.grey[100] : track2Color
|
71
|
+
};
|
81
72
|
return /*#__PURE__*/_jsxs("div", {
|
82
73
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["range-slider ", ""])), disabled && "opacity-70"), className),
|
83
74
|
children: [/*#__PURE__*/_jsx("div", {
|
84
75
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["range-slider-track-1"]))),
|
85
76
|
style: {
|
86
77
|
width: "".concat(track1 * 100, "%"),
|
87
|
-
backgroundColor:
|
78
|
+
backgroundColor: trackColors.track1
|
88
79
|
}
|
89
80
|
}), /*#__PURE__*/_jsx("div", {
|
90
81
|
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["range-slider-track-2"]))),
|
91
82
|
style: {
|
92
83
|
width: "".concat(track2 * 100, "%"),
|
93
|
-
backgroundColor:
|
84
|
+
backgroundColor: trackColors.track2
|
94
85
|
}
|
95
86
|
}), /*#__PURE__*/_jsx("div", {
|
96
87
|
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["range-slider-thumb"]))),
|
@@ -3,10 +3,10 @@ import { router as defaultRouter } from "./SatelliteRouter";
|
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
4
|
export var Satellite = function Satellite(_ref) {
|
5
5
|
var _ref$router = _ref.router,
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
router = _ref$router === void 0 ? defaultRouter : _ref$router,
|
7
|
+
locales = _ref.locales,
|
8
|
+
portalTarget = _ref.portalTarget,
|
9
|
+
children = _ref.children;
|
10
10
|
return /*#__PURE__*/_jsx(SatelliteContext.Provider, {
|
11
11
|
value: {
|
12
12
|
router: router,
|
@@ -1,9 +1,6 @@
|
|
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 { createContext, useContext } from "react";
|
8
5
|
import { router } from "./SatelliteRouter";
|
9
6
|
var DEFAULT_CONTEXT = {
|
@@ -5,19 +5,18 @@ export var DefaultRouter = /*#__PURE__*/function () {
|
|
5
5
|
function DefaultRouter() {
|
6
6
|
_classCallCheck(this, DefaultRouter);
|
7
7
|
}
|
8
|
-
|
9
8
|
_createClass(DefaultRouter, [{
|
10
9
|
key: "push",
|
11
10
|
value: function push(_ref) {
|
12
11
|
var url = _ref.url,
|
13
|
-
|
12
|
+
state = _ref.state;
|
14
13
|
window.history.pushState(state, "", url);
|
15
14
|
}
|
16
15
|
}, {
|
17
16
|
key: "replace",
|
18
17
|
value: function replace(_ref2) {
|
19
18
|
var url = _ref2.url,
|
20
|
-
|
19
|
+
state = _ref2.state;
|
21
20
|
window.history.replaceState(state, "", url);
|
22
21
|
}
|
23
22
|
}, {
|
@@ -36,7 +35,6 @@ export var DefaultRouter = /*#__PURE__*/function () {
|
|
36
35
|
return href;
|
37
36
|
}
|
38
37
|
}]);
|
39
|
-
|
40
38
|
return DefaultRouter;
|
41
39
|
}();
|
42
40
|
export var router = new DefaultRouter();
|
package/esm/Satellite/locale.js
CHANGED
@@ -2,7 +2,6 @@ import { useContext } from "react";
|
|
2
2
|
import SatelliteContext from "./SatelliteContext";
|
3
3
|
export var useLocale = function useLocale(componentKey) {
|
4
4
|
var _useContext = useContext(SatelliteContext),
|
5
|
-
|
6
|
-
|
5
|
+
locales = _useContext.locales;
|
7
6
|
return locales === null || locales === void 0 ? void 0 : locales[componentKey];
|
8
7
|
};
|
@@ -4,9 +4,9 @@ import { useSatelliteContext } from "./SatelliteContext";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
export var useCreatePortal = function useCreatePortal() {
|
6
6
|
var _useSatelliteContext = useSatelliteContext(),
|
7
|
-
|
8
|
-
|
7
|
+
portalTarget = _useSatelliteContext.portalTarget;
|
9
8
|
|
9
|
+
// SSR? Too bad! Abort, abort!
|
10
10
|
if (typeof document === "undefined") return function () {
|
11
11
|
return /*#__PURE__*/_jsx(Fragment, {});
|
12
12
|
};
|