@algolia/satellite 1.0.0-beta.147 → 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 +68 -163
- 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.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 +2 -12
- 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 +12 -34
- 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.js +1 -22
- 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 +10 -21
- 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.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 +12 -18
- package/cjs/UserContent/UserContent.js +3 -11
- package/cjs/UserContent/UserContent.tailwind.js +2 -11
- 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 +68 -158
- 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.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 +2 -9
- 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 +12 -22
- 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.js +1 -9
- 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 +10 -12
- 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.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 +12 -15
- package/esm/UserContent/UserContent.js +3 -5
- package/esm/UserContent/UserContent.tailwind.js +2 -7
- 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 +1 -1
- package/satellite.min.css +1 -1
- package/scss/colors.scss +16 -16
@@ -1,45 +1,32 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = exports.DotPagination = void 0;
|
9
|
-
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
11
|
-
|
12
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
13
|
-
|
14
10
|
var _Satellite = require("../../Satellite");
|
15
|
-
|
16
11
|
var _satellitePrefixer = _interopRequireDefault(require("../../styles/helpers/satellitePrefixer"));
|
17
|
-
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
19
|
-
|
20
13
|
var _templateObject, _templateObject2;
|
21
|
-
|
22
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
23
|
-
|
24
15
|
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) { (0, _defineProperty2["default"])(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; }
|
25
|
-
|
26
16
|
var DEFAULT_DOT_PAGINATION_LOCALE = {
|
27
17
|
goToPageText: function goToPageText(pageIdx) {
|
28
18
|
return "Go to page ".concat(pageIdx);
|
29
19
|
}
|
30
20
|
};
|
31
|
-
|
32
21
|
var DotPagination = function DotPagination(_ref) {
|
33
22
|
var currentPage = _ref.currentPage,
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
23
|
+
onChange = _ref.onChange,
|
24
|
+
nbPages = _ref.nbPages,
|
25
|
+
_ref$size = _ref.size,
|
26
|
+
size = _ref$size === void 0 ? "medium" : _ref$size,
|
27
|
+
propsLocale = _ref.locale;
|
39
28
|
var contextLocale = (0, _Satellite.useLocale)("dotPagination");
|
40
|
-
|
41
29
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_DOT_PAGINATION_LOCALE), contextLocale), propsLocale);
|
42
|
-
|
43
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
44
31
|
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["flex"]))),
|
45
32
|
children: new Array(nbPages).fill(undefined).map(function (_, idx) {
|
@@ -56,7 +43,6 @@ var DotPagination = function DotPagination(_ref) {
|
|
56
43
|
})
|
57
44
|
});
|
58
45
|
};
|
59
|
-
|
60
46
|
exports.DotPagination = DotPagination;
|
61
47
|
var _default = DotPagination;
|
62
48
|
exports["default"] = _default;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
@@ -12,9 +11,7 @@ Object.defineProperty(exports, "default", {
|
|
12
11
|
return _DotPagination["default"];
|
13
12
|
}
|
14
13
|
});
|
15
|
-
|
16
14
|
var _DotPagination = _interopRequireWildcard(require("./DotPagination"));
|
17
|
-
|
18
15
|
Object.keys(_DotPagination).forEach(function (key) {
|
19
16
|
if (key === "default" || key === "__esModule") return;
|
20
17
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -26,7 +23,5 @@ Object.keys(_DotPagination).forEach(function (key) {
|
|
26
23
|
}
|
27
24
|
});
|
28
25
|
});
|
29
|
-
|
30
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
31
|
-
|
32
27
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -1,40 +1,24 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
6
|
-
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
8
6
|
value: true
|
9
7
|
});
|
10
8
|
exports["default"] = exports.Pagination = void 0;
|
11
|
-
|
12
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
13
|
-
|
14
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
15
|
-
|
16
11
|
var _reactFeather = require("react-feather");
|
17
|
-
|
18
12
|
var _Button = _interopRequireWildcard(require("../../Button"));
|
19
|
-
|
20
13
|
var _Satellite = require("../../Satellite");
|
21
|
-
|
22
14
|
var _satellitePrefixer = _interopRequireDefault(require("../../styles/helpers/satellitePrefixer"));
|
23
|
-
|
24
15
|
var _range = _interopRequireDefault(require("../../utils/range"));
|
25
|
-
|
26
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
27
|
-
|
28
17
|
var _templateObject;
|
29
|
-
|
30
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
31
|
-
|
32
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
33
|
-
|
34
20
|
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; }
|
35
|
-
|
36
21
|
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) { (0, _defineProperty2["default"])(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; }
|
37
|
-
|
38
22
|
var DEFAULT_PAGINATION_LOCALE = {
|
39
23
|
goToPage: function goToPage(index) {
|
40
24
|
return "Go to page ".concat(index);
|
@@ -43,7 +27,6 @@ var DEFAULT_PAGINATION_LOCALE = {
|
|
43
27
|
goToNextPage: "Go to next page"
|
44
28
|
};
|
45
29
|
var DEFAULT_MAX_BUTTONS = 10;
|
46
|
-
|
47
30
|
var Ellipsis = function Ellipsis() {
|
48
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button["default"], {
|
49
32
|
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["pointer-events-none"]))),
|
@@ -52,12 +35,11 @@ var Ellipsis = function Ellipsis() {
|
|
52
35
|
children: "\u2026"
|
53
36
|
});
|
54
37
|
};
|
55
|
-
|
56
38
|
var Group = function Group(_ref) {
|
57
39
|
var group = _ref.group,
|
58
|
-
|
59
|
-
|
60
|
-
|
40
|
+
currentPage = _ref.currentPage,
|
41
|
+
onChange = _ref.onChange,
|
42
|
+
goToPage = _ref.goToPage;
|
61
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
62
44
|
children: group.map(function (index) {
|
63
45
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button["default"], {
|
@@ -71,6 +53,7 @@ var Group = function Group(_ref) {
|
|
71
53
|
})
|
72
54
|
});
|
73
55
|
};
|
56
|
+
|
74
57
|
/**
|
75
58
|
* Use pagination to help our users to move through an ordered collection of items.
|
76
59
|
*
|
@@ -78,33 +61,26 @@ var Group = function Group(_ref) {
|
|
78
61
|
* - Don't use on list with less than 20 items
|
79
62
|
* - Place the pagination at the bottom of the split item
|
80
63
|
*/
|
81
|
-
|
82
|
-
|
83
64
|
var Pagination = function Pagination(_ref2) {
|
84
65
|
var currentPage = _ref2.currentPage,
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
66
|
+
nbPages = _ref2.nbPages,
|
67
|
+
onChange = _ref2.onChange,
|
68
|
+
_ref2$maxButtons = _ref2.maxButtons,
|
69
|
+
maxButtonsParam = _ref2$maxButtons === void 0 ? DEFAULT_MAX_BUTTONS : _ref2$maxButtons,
|
70
|
+
propsLocale = _ref2.locale;
|
90
71
|
var contextLocale = (0, _Satellite.useLocale)("pagination");
|
91
|
-
|
92
72
|
var locale = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_PAGINATION_LOCALE), contextLocale), propsLocale);
|
93
|
-
|
94
73
|
var padding = Math.floor((Math.min(nbPages, maxButtonsParam) - 1) / 2);
|
95
74
|
var maxButtons = 2 * padding + 1;
|
96
75
|
var currentPageGroupStart = Math.max(1, Math.min(currentPage - padding, nbPages - maxButtons));
|
97
76
|
var currentPageGroupEnd = Math.min(currentPageGroupStart + maxButtons, nbPages);
|
98
77
|
var groups = [[], (0, _range["default"])(currentPageGroupStart, currentPageGroupEnd + 1), []];
|
99
|
-
|
100
78
|
if (currentPageGroupStart > 1) {
|
101
79
|
groups[0].push(1);
|
102
80
|
}
|
103
|
-
|
104
81
|
if (currentPageGroupEnd < nbPages) {
|
105
82
|
groups[2].push(nbPages);
|
106
83
|
}
|
107
|
-
|
108
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.ButtonGroup, {
|
109
85
|
as: "nav",
|
110
86
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button["default"], {
|
@@ -143,7 +119,6 @@ var Pagination = function Pagination(_ref2) {
|
|
143
119
|
})]
|
144
120
|
});
|
145
121
|
};
|
146
|
-
|
147
122
|
exports.Pagination = Pagination;
|
148
123
|
var _default = Pagination;
|
149
124
|
exports["default"] = _default;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
@@ -12,9 +11,7 @@ Object.defineProperty(exports, "default", {
|
|
12
11
|
return _Pagination["default"];
|
13
12
|
}
|
14
13
|
});
|
15
|
-
|
16
14
|
var _Pagination = _interopRequireWildcard(require("./Pagination"));
|
17
|
-
|
18
15
|
Object.keys(_Pagination).forEach(function (key) {
|
19
16
|
if (key === "default" || key === "__esModule") return;
|
20
17
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -26,7 +23,5 @@ Object.keys(_Pagination).forEach(function (key) {
|
|
26
23
|
}
|
27
24
|
});
|
28
25
|
});
|
29
|
-
|
30
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
31
|
-
|
32
27
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
package/cjs/Pagination/index.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
@@ -12,9 +11,7 @@ Object.defineProperty(exports, "default", {
|
|
12
11
|
return _Pagination["default"];
|
13
12
|
}
|
14
13
|
});
|
15
|
-
|
16
14
|
var _Pagination = _interopRequireWildcard(require("./Pagination"));
|
17
|
-
|
18
15
|
Object.keys(_Pagination).forEach(function (key) {
|
19
16
|
if (key === "default" || key === "__esModule") return;
|
20
17
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -26,9 +23,7 @@ Object.keys(_Pagination).forEach(function (key) {
|
|
26
23
|
}
|
27
24
|
});
|
28
25
|
});
|
29
|
-
|
30
26
|
var _DotPagination = require("./DotPagination");
|
31
|
-
|
32
27
|
Object.keys(_DotPagination).forEach(function (key) {
|
33
28
|
if (key === "default" || key === "__esModule") return;
|
34
29
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -40,9 +35,7 @@ Object.keys(_DotPagination).forEach(function (key) {
|
|
40
35
|
}
|
41
36
|
});
|
42
37
|
});
|
43
|
-
|
44
38
|
var _CompactPagination = require("./CompactPagination");
|
45
|
-
|
46
39
|
Object.keys(_CompactPagination).forEach(function (key) {
|
47
40
|
if (key === "default" || key === "__esModule") return;
|
48
41
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -54,7 +47,5 @@ Object.keys(_CompactPagination).forEach(function (key) {
|
|
54
47
|
}
|
55
48
|
});
|
56
49
|
});
|
57
|
-
|
58
50
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
59
|
-
|
60
51
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -1,32 +1,20 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = exports.ProgressBar = void 0;
|
9
|
-
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
11
|
-
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
13
|
-
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
15
|
-
|
16
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
17
|
-
|
18
12
|
var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
|
19
|
-
|
20
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
21
|
-
|
22
14
|
var _templateObject, _templateObject2;
|
23
|
-
|
24
15
|
var _excluded = ["value", "className", "barClassName"];
|
25
|
-
|
26
16
|
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; }
|
27
|
-
|
28
17
|
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) { (0, _defineProperty2["default"])(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; }
|
29
|
-
|
30
18
|
/**
|
31
19
|
* Progress bars visually represent the completion of a task or operation.
|
32
20
|
*
|
@@ -35,9 +23,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
35
23
|
*/
|
36
24
|
var ProgressBar = function ProgressBar(_ref) {
|
37
25
|
var value = _ref.value,
|
38
|
-
|
39
|
-
|
40
|
-
|
26
|
+
className = _ref.className,
|
27
|
+
barClassName = _ref.barClassName,
|
28
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
41
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, props), {}, {
|
42
30
|
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["progress-bar"]))), className),
|
43
31
|
role: "progressbar",
|
@@ -53,7 +41,6 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
53
41
|
})
|
54
42
|
}));
|
55
43
|
};
|
56
|
-
|
57
44
|
exports.ProgressBar = ProgressBar;
|
58
45
|
var _default = ProgressBar;
|
59
46
|
exports["default"] = _default;
|
@@ -2,12 +2,10 @@
|
|
2
2
|
|
3
3
|
// @ts-check
|
4
4
|
var plugin = require("tailwindcss/plugin");
|
5
|
-
|
6
5
|
var rgba = require("../styles/rgba");
|
7
|
-
|
8
6
|
var progressBarPlugin = plugin(function (_ref) {
|
9
7
|
var addComponents = _ref.addComponents,
|
10
|
-
|
8
|
+
theme = _ref.theme;
|
11
9
|
addComponents({
|
12
10
|
".progress-bar": {
|
13
11
|
height: "4px",
|
package/cjs/ProgressBar/index.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
@@ -12,9 +11,7 @@ Object.defineProperty(exports, "default", {
|
|
12
11
|
return _ProgressBar["default"];
|
13
12
|
}
|
14
13
|
});
|
15
|
-
|
16
14
|
var _ProgressBar = _interopRequireWildcard(require("./ProgressBar"));
|
17
|
-
|
18
15
|
Object.keys(_ProgressBar).forEach(function (key) {
|
19
16
|
if (key === "default" || key === "__esModule") return;
|
20
17
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -26,7 +23,5 @@ Object.keys(_ProgressBar).forEach(function (key) {
|
|
26
23
|
}
|
27
24
|
});
|
28
25
|
});
|
29
|
-
|
30
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
31
|
-
|
32
27
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -1,46 +1,35 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = exports.ProgressSpinner = void 0;
|
9
|
-
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
11
|
-
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
13
|
-
|
14
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
15
|
-
|
16
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
17
|
-
|
18
12
|
var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
|
19
|
-
|
20
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
21
|
-
|
22
14
|
var _excluded = ["className", "size", "thickness", "align"];
|
23
|
-
|
24
15
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
25
|
-
|
26
16
|
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; }
|
27
|
-
|
28
17
|
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) { (0, _defineProperty2["default"])(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; }
|
29
|
-
|
30
18
|
var ALIGN_CLASSNAMES = {
|
31
19
|
left: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["mr-auto"]))),
|
32
20
|
center: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["m-auto"]))),
|
33
21
|
right: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["ml-auto"])))
|
34
|
-
};
|
22
|
+
};
|
35
23
|
|
24
|
+
// Took heavy inspiration from https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/CircularProgress/CircularProgress.js
|
36
25
|
var ProgressSpinner = function ProgressSpinner(_ref) {
|
37
26
|
var className = _ref.className,
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
27
|
+
_ref$size = _ref.size,
|
28
|
+
size = _ref$size === void 0 ? 24 : _ref$size,
|
29
|
+
_ref$thickness = _ref.thickness,
|
30
|
+
thickness = _ref$thickness === void 0 ? 2 : _ref$thickness,
|
31
|
+
align = _ref.align,
|
32
|
+
svgProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
44
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", _objectSpread(_objectSpread({}, svgProps), {}, {
|
45
34
|
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["progress-spinner"]))), align && ALIGN_CLASSNAMES[align], className),
|
46
35
|
viewBox: "".concat(size / 2, " ").concat(size / 2, " ").concat(size, " ").concat(size),
|
@@ -60,7 +49,6 @@ var ProgressSpinner = function ProgressSpinner(_ref) {
|
|
60
49
|
})]
|
61
50
|
}));
|
62
51
|
};
|
63
|
-
|
64
52
|
exports.ProgressSpinner = ProgressSpinner;
|
65
53
|
var _default = ProgressSpinner;
|
66
54
|
exports["default"] = _default;
|
@@ -2,14 +2,13 @@
|
|
2
2
|
|
3
3
|
// @ts-check
|
4
4
|
var plugin = require("tailwindcss/plugin");
|
5
|
-
|
6
5
|
var progressSpinnerPlugin = plugin(function (_ref) {
|
7
6
|
var addComponents = _ref.addComponents,
|
8
|
-
|
9
|
-
|
7
|
+
theme = _ref.theme;
|
10
8
|
/**
|
11
9
|
* @param {string} color
|
12
10
|
*/
|
11
|
+
|
13
12
|
addComponents({
|
14
13
|
".progress-spinner": {
|
15
14
|
color: theme("colors.accent.600"),
|
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
@@ -12,9 +11,7 @@ Object.defineProperty(exports, "default", {
|
|
12
11
|
return _ProgressSpinner["default"];
|
13
12
|
}
|
14
13
|
});
|
15
|
-
|
16
14
|
var _ProgressSpinner = _interopRequireWildcard(require("./ProgressSpinner"));
|
17
|
-
|
18
15
|
Object.keys(_ProgressSpinner).forEach(function (key) {
|
19
16
|
if (key === "default" || key === "__esModule") return;
|
20
17
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
@@ -26,7 +23,5 @@ Object.keys(_ProgressSpinner).forEach(function (key) {
|
|
26
23
|
}
|
27
24
|
});
|
28
25
|
});
|
29
|
-
|
30
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
31
|
-
|
32
27
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -1,37 +1,24 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = exports.RadioButton = void 0;
|
9
|
-
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
11
|
-
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
13
|
-
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
15
|
-
|
16
11
|
var _clsx = _interopRequireDefault(require("clsx"));
|
17
|
-
|
18
12
|
var _react = require("react");
|
19
|
-
|
20
13
|
var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
|
21
|
-
|
22
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
23
|
-
|
24
15
|
var _templateObject;
|
25
|
-
|
26
16
|
var _excluded = ["className"];
|
27
|
-
|
28
17
|
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; }
|
29
|
-
|
30
18
|
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) { (0, _defineProperty2["default"])(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; }
|
31
|
-
|
32
19
|
var RadioButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
33
20
|
var className = _ref.className,
|
34
|
-
|
21
|
+
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
35
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("input", _objectSpread(_objectSpread({}, props), {}, {
|
36
23
|
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["radio-button"]))), className),
|
37
24
|
type: "radio",
|
@@ -2,14 +2,11 @@
|
|
2
2
|
|
3
3
|
// @ts-check
|
4
4
|
var plugin = require("tailwindcss/plugin");
|
5
|
-
|
6
5
|
var disabledColor = require("../styles/disabledColor");
|
7
|
-
|
8
6
|
var rgba = require("../styles/rgba");
|
9
|
-
|
10
7
|
var radioButtonPlugin = plugin(function (_ref) {
|
11
8
|
var addComponents = _ref.addComponents,
|
12
|
-
|
9
|
+
theme = _ref.theme;
|
13
10
|
addComponents({
|
14
11
|
".radio-button": {
|
15
12
|
position: "relative",
|
@@ -1,45 +1,31 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports["default"] = exports.RadioGroupItem = exports.RadioGroup = void 0;
|
9
|
-
|
10
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
|
-
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
13
|
-
|
14
10
|
var _react = require("react");
|
15
|
-
|
16
11
|
var _Card = _interopRequireDefault(require("../Card"));
|
17
|
-
|
18
12
|
var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
|
19
|
-
|
20
13
|
var _uniqueId = _interopRequireDefault(require("../utils/uniqueId"));
|
21
|
-
|
22
14
|
var _RadioButton = _interopRequireDefault(require("./RadioButton"));
|
23
|
-
|
24
15
|
var _RadiogroupContext = require("./RadiogroupContext");
|
25
|
-
|
26
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
27
|
-
|
28
17
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
29
|
-
|
30
18
|
var RadioGroupItem = function RadioGroupItem(_ref) {
|
31
19
|
var value = _ref.value,
|
32
|
-
|
33
|
-
|
34
|
-
|
20
|
+
disabled = _ref.disabled,
|
21
|
+
children = _ref.children;
|
35
22
|
var _useRadioGroupContext = (0, _RadiogroupContext.useRadioGroupContext)(),
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
23
|
+
name = _useRadioGroupContext.name,
|
24
|
+
contextDisabled = _useRadioGroupContext.disabled,
|
25
|
+
_onChange = _useRadioGroupContext.onChange,
|
26
|
+
contextValue = _useRadioGroupContext.value,
|
27
|
+
_useRadioGroupContext2 = _useRadioGroupContext.textPosition,
|
28
|
+
textPosition = _useRadioGroupContext2 === void 0 ? "left" : _useRadioGroupContext2;
|
43
29
|
var checked = value === contextValue;
|
44
30
|
disabled = contextDisabled || disabled;
|
45
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
@@ -61,6 +47,7 @@ var RadioGroupItem = function RadioGroupItem(_ref) {
|
|
61
47
|
})]
|
62
48
|
});
|
63
49
|
};
|
50
|
+
|
64
51
|
/**
|
65
52
|
* Use radio buttons when users have to make a single selection from a list of options.
|
66
53
|
*
|
@@ -76,25 +63,20 @@ var RadioGroupItem = function RadioGroupItem(_ref) {
|
|
76
63
|
* - If you need to have an unselected state, just add a radio button with a *None* option.
|
77
64
|
* - Sometimes, you might want to include an *Other* option (Usually followed by a text input if a user needs to provide a specific answer)
|
78
65
|
*/
|
79
|
-
|
80
|
-
|
81
66
|
exports.RadioGroupItem = RadioGroupItem;
|
82
|
-
|
83
67
|
var RadioGroup = function RadioGroup(_ref2) {
|
84
68
|
var className = _ref2.className,
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
69
|
+
name = _ref2.name,
|
70
|
+
value = _ref2.value,
|
71
|
+
disabled = _ref2.disabled,
|
72
|
+
textPosition = _ref2.textPosition,
|
73
|
+
children = _ref2.children,
|
74
|
+
onChange = _ref2.onChange;
|
92
75
|
var _useState = (0, _react.useState)(function () {
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
76
|
+
return (0, _uniqueId["default"])("RadioGroupName-");
|
77
|
+
}),
|
78
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 1),
|
79
|
+
componentDefaultName = _useState2[0];
|
98
80
|
name = name || componentDefaultName;
|
99
81
|
var contextValue = {
|
100
82
|
name: name,
|
@@ -118,7 +100,6 @@ var RadioGroup = function RadioGroup(_ref2) {
|
|
118
100
|
})
|
119
101
|
});
|
120
102
|
};
|
121
|
-
|
122
103
|
exports.RadioGroup = RadioGroup;
|
123
104
|
RadioGroup.Item = RadioGroupItem;
|
124
105
|
var _default = RadioGroup;
|