@algolia/satellite 1.0.0-beta.147 → 1.0.0-beta.149
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 +5 -12
- 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 +14 -34
- package/cjs/Button/Button.tailwind.js +3 -5
- package/cjs/Button/ButtonGroup.js +3 -11
- package/cjs/Button/IconButton.js +13 -36
- 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 +8 -32
- 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.d.ts +3 -3
- package/cjs/Dropdown/DropdownContext.js +0 -6
- package/cjs/Dropdown/components/DropdownButtonItem.js +6 -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.d.ts +3 -3
- 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 +7 -23
- package/cjs/Dropdown/components/DropdownRadioItem.js +5 -20
- package/cjs/Dropdown/components/DropdownTitle.js +1 -14
- package/cjs/Dropdown/components/DropdownToggleItem.js +6 -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.d.ts +1 -0
- package/cjs/Input/Input.js +27 -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 +3 -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 +10 -33
- 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 +4 -29
- 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 +45 -73
- 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 +5 -7
- package/esm/Banners/Promote/Promote.js +8 -10
- package/esm/Button/Button.js +14 -22
- package/esm/Button/Button.tailwind.js +3 -2
- package/esm/Button/ButtonGroup.js +3 -6
- package/esm/Button/IconButton.js +13 -23
- 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 +8 -20
- 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.d.ts +3 -3
- package/esm/Dropdown/DropdownContext.js +0 -2
- package/esm/Dropdown/components/DropdownButtonItem.js +6 -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.d.ts +3 -3
- 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 +7 -13
- package/esm/Dropdown/components/DropdownRadioItem.js +5 -11
- package/esm/Dropdown/components/DropdownTitle.js +1 -7
- package/esm/Dropdown/components/DropdownToggleItem.js +6 -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.d.ts +1 -0
- package/esm/Input/Input.js +27 -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 +3 -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 +9 -19
- 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 +4 -20
- 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 +44 -57
- 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 +2 -2
- package/satellite.min.css +1 -1
- package/scss/colors.scss +16 -16
@@ -1,7 +1,5 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3;
|
4
|
-
|
5
3
|
import cx from "clsx";
|
6
4
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
5
|
import { getApplicationInitials, pickApplicationColors } from "./utils";
|
@@ -10,13 +8,12 @@ var SIZE_CLASSNAMES = {
|
|
10
8
|
small: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-4 h-4"]))),
|
11
9
|
medium: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["w-8 h-8"])))
|
12
10
|
};
|
13
|
-
|
14
11
|
/** The `ApplicationAvatar` is used as a visual representation of an application. */
|
15
12
|
export var ApplicationAvatar = function ApplicationAvatar(_ref) {
|
16
13
|
var className = _ref.className,
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
application = _ref.application,
|
15
|
+
_ref$size = _ref.size,
|
16
|
+
size = _ref$size === void 0 ? "medium" : _ref$size;
|
20
17
|
return /*#__PURE__*/_jsx("div", {
|
21
18
|
role: "img",
|
22
19
|
"aria-label": application.name || "Application's avatar",
|
@@ -1,29 +1,23 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
|
-
|
4
3
|
var _templateObject, _templateObject2, _templateObject3;
|
5
|
-
|
6
4
|
import cx from "clsx";
|
7
5
|
import { useEffect, useState } from "react";
|
8
6
|
import stl from "../styles/helpers/satellitePrefixer";
|
9
7
|
import { getUserBackgroundClassName, getUserInitials } from "./utils";
|
10
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
-
|
13
10
|
/** The `UserAvatar` is used as a visual representation of a user. */
|
14
11
|
export var UserAvatar = function UserAvatar(_ref) {
|
15
12
|
var _user$email;
|
16
|
-
|
17
13
|
var className = _ref.className,
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
user = _ref.user,
|
15
|
+
_ref$size = _ref.size,
|
16
|
+
size = _ref$size === void 0 ? 32 : _ref$size;
|
22
17
|
var _useState = useState(false),
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
19
|
+
imageLoaded = _useState2[0],
|
20
|
+
setImageLoaded = _useState2[1];
|
27
21
|
var initials = getUserInitials(user);
|
28
22
|
useEffect(function () {
|
29
23
|
return setImageLoaded(false);
|
package/esm/Avatars/utils.js
CHANGED
@@ -1,21 +1,14 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28;
|
4
|
-
|
5
3
|
import { remove as removeDiacritics } from "diacritics";
|
6
4
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
5
|
import hashCode from "../utils/hashCode";
|
8
|
-
|
9
6
|
/** APPLICATION */
|
10
|
-
|
11
|
-
/* eslint-disable @algolia/satellite/prefer-accent */
|
12
|
-
stl(
|
13
|
-
stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-grey-300 text-grey-900"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["bg-nebula-300 text-nebula-900"]))), stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["bg-blue-300 text-blue-900"]))), stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["bg-green-300 text-green-900"]))), stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["bg-pink-300 text-pink-900"]))), stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["bg-red-300 text-red-900"]))), stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["bg-orange-300 text-orange-900"])))
|
14
|
-
/* eslint-enable @algolia/satellite/prefer-accent */
|
15
|
-
];
|
7
|
+
|
8
|
+
var APPLICATION_COLORS_CLASSNAMES = [/* eslint-disable @algolia/satellite/prefer-accent */stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["bg-grey-200 text-grey-800"]))), stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["bg-nebula-200 text-nebula-800"]))), stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["bg-blue-200 text-blue-900"]))), stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-green-200 text-green-900"]))), stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["bg-pink-200 text-pink-800"]))), stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["bg-red-200 text-red-800"]))), stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["bg-orange-200 text-orange-900"]))), // Darker variants
|
9
|
+
stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-grey-300 text-grey-900"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["bg-nebula-300 text-nebula-900"]))), stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["bg-blue-300 text-blue-900"]))), stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["bg-green-300 text-green-900"]))), stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["bg-pink-300 text-pink-900"]))), stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["bg-red-300 text-red-900"]))), stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["bg-orange-300 text-orange-900"]))) /* eslint-enable @algolia/satellite/prefer-accent */];
|
16
10
|
export var pickApplicationColors = function pickApplicationColors(applicationId) {
|
17
11
|
var _APPLICATION_COLORS_C;
|
18
|
-
|
19
12
|
return (_APPLICATION_COLORS_C = APPLICATION_COLORS_CLASSNAMES[Math.abs(hashCode(applicationId)) % APPLICATION_COLORS_CLASSNAMES.length]) !== null && _APPLICATION_COLORS_C !== void 0 ? _APPLICATION_COLORS_C : APPLICATION_COLORS_CLASSNAMES[0];
|
20
13
|
};
|
21
14
|
export var getApplicationIdInitial = function getApplicationIdInitial(applicationId) {
|
@@ -23,40 +16,31 @@ export var getApplicationIdInitial = function getApplicationIdInitial(applicatio
|
|
23
16
|
};
|
24
17
|
export var getApplicationInitials = function getApplicationInitials(_ref) {
|
25
18
|
var name = _ref.name,
|
26
|
-
|
27
|
-
|
19
|
+
applicationId = _ref.applicationId;
|
28
20
|
if (!name) {
|
29
21
|
return getApplicationIdInitial(applicationId);
|
30
22
|
}
|
31
|
-
|
32
23
|
var words = removeDiacritics(name.trim()).toLocaleUpperCase().split(/\W+/).filter(function (word) {
|
33
24
|
return word.length >= 1;
|
34
25
|
});
|
35
|
-
|
36
26
|
if (words.length === 0 || words.length === 1 && words[0].length < 2) {
|
37
27
|
return getApplicationIdInitial(applicationId);
|
38
28
|
} else if (words.length === 1) {
|
39
29
|
return words[0].slice(0, 2);
|
40
30
|
}
|
41
|
-
|
42
31
|
return "".concat(words[0][0]).concat(words[1][0]);
|
43
32
|
};
|
33
|
+
|
44
34
|
/** USER */
|
45
35
|
|
46
|
-
var USER_COLORS_CLASSNAMES = [
|
47
|
-
/* eslint-
|
48
|
-
stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["bg-grey-400 text-grey-900"]))), stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["bg-nebula-400 text-grey-900"]))), stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["bg-blue-400 text-grey-900"]))), stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["bg-green-400 text-grey-900"]))), stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["bg-pink-400 text-grey-900"]))), stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["bg-red-400 text-grey-900"]))), stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["bg-orange-400 text-grey-900"]))), // Darker variants
|
49
|
-
stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["bg-grey-700 text-white"]))), stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["bg-nebula-700 text-white"]))), stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["bg-blue-700 text-grey-900"]))), stl(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["bg-green-700 text-grey-900"]))), stl(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["bg-pink-700 text-white"]))), stl(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["bg-red-700 text-white"]))), stl(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["bg-orange-600 text-grey-900"])))
|
50
|
-
/* eslint-enable @algolia/satellite/prefer-accent */
|
51
|
-
];
|
36
|
+
var USER_COLORS_CLASSNAMES = [/* eslint-disable @algolia/satellite/prefer-accent */stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["bg-grey-400 text-grey-900"]))), stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["bg-nebula-400 text-grey-900"]))), stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["bg-blue-400 text-grey-900"]))), stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["bg-green-400 text-grey-900"]))), stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["bg-pink-400 text-grey-900"]))), stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["bg-red-400 text-grey-900"]))), stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["bg-orange-400 text-grey-900"]))), // Darker variants
|
37
|
+
stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["bg-grey-700 text-white"]))), stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["bg-nebula-700 text-white"]))), stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["bg-blue-700 text-grey-900"]))), stl(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["bg-green-700 text-grey-900"]))), stl(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["bg-pink-700 text-white"]))), stl(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["bg-red-700 text-white"]))), stl(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["bg-orange-600 text-grey-900"]))) /* eslint-enable @algolia/satellite/prefer-accent */];
|
52
38
|
export var getUserBackgroundClassName = function getUserBackgroundClassName(email) {
|
53
39
|
var _USER_COLORS_CLASSNAM;
|
54
|
-
|
55
40
|
return (_USER_COLORS_CLASSNAM = USER_COLORS_CLASSNAMES[Math.abs(hashCode(email)) % USER_COLORS_CLASSNAMES.length]) !== null && _USER_COLORS_CLASSNAM !== void 0 ? _USER_COLORS_CLASSNAM : USER_COLORS_CLASSNAMES[0];
|
56
41
|
};
|
57
42
|
export var getUserInitials = function getUserInitials(user) {
|
58
43
|
var _user$email, _user$email$match;
|
59
|
-
|
60
44
|
var words = user.name ? user.name.trim().split(/\s+/) : (_user$email = user.email) === null || _user$email === void 0 ? void 0 : (_user$email$match = _user$email.match(/^(.+)(?:\+.+?)?@.+$/)) === null || _user$email$match === void 0 ? void 0 : _user$email$match[1].split(".");
|
61
45
|
return words ? words.slice(0, 2).map(function (w) {
|
62
46
|
return w.toLocaleLowerCase()[0];
|
package/esm/Badge/Badge.js
CHANGED
@@ -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 = ["children", "value", "icon", "variant", "size", "className"];
|
5
|
-
|
6
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
7
|
-
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
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";
|
@@ -23,19 +19,11 @@ var VARIANT_CLASSNAMES = {
|
|
23
19
|
red: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["bg-red-100 border-red-200 text-red-700"]))),
|
24
20
|
pink: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["bg-pink-100 border-pink-200 text-pink-700"])))
|
25
21
|
};
|
26
|
-
var VALUE_VARIANT_CLASSNAMES = {
|
27
|
-
grey: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["text-grey-600"]))),
|
28
|
-
accent: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["text-accent-600"]))),
|
29
|
-
blue: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["text-blue-800"]))),
|
30
|
-
green: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["text-green-900"]))),
|
31
|
-
orange: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["text-orange-800"]))),
|
32
|
-
red: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["text-red-700"]))),
|
33
|
-
pink: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["text-pink-600"])))
|
34
|
-
};
|
35
22
|
var SIZE_CLASSNAMES = {
|
36
|
-
"default": stl(
|
37
|
-
small: stl(
|
23
|
+
"default": stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["h-6 display-body px-2 space-x-2"]))),
|
24
|
+
small: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["h-4 display-caption px-1 space-x-1"])))
|
38
25
|
};
|
26
|
+
|
39
27
|
/**
|
40
28
|
* Badges are used to inform a user about a status of an item or a process. They can also contain a numeric value. Badges come with a set of colours that are easily identified. Green colour implies success or completion, while orange suggests a warning, on hold, or a problem. Red coloured badges mean error or failure.
|
41
29
|
*
|
@@ -51,18 +39,16 @@ var SIZE_CLASSNAMES = {
|
|
51
39
|
* - To indicate problem with an index
|
52
40
|
* - To display numeric values for multiple items (similar to a "tag cloud")
|
53
41
|
*/
|
54
|
-
|
55
42
|
export var Badge = function Badge(_ref) {
|
56
43
|
var children = _ref.children,
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
44
|
+
value = _ref.value,
|
45
|
+
Icon = _ref.icon,
|
46
|
+
_ref$variant = _ref.variant,
|
47
|
+
variant = _ref$variant === void 0 ? "grey" : _ref$variant,
|
48
|
+
_ref$size = _ref.size,
|
49
|
+
size = _ref$size === void 0 ? "default" : _ref$size,
|
50
|
+
className = _ref.className,
|
51
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
66
52
|
var badgeClassName = cx(BASE_CLASSNAMES, VARIANT_CLASSNAMES[variant], SIZE_CLASSNAMES[size], className);
|
67
53
|
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({}, props), {}, {
|
68
54
|
className: badgeClassName,
|
@@ -71,10 +57,9 @@ export var Badge = function Badge(_ref) {
|
|
71
57
|
size: ".8em"
|
72
58
|
})
|
73
59
|
}), children && /*#__PURE__*/_jsx("span", {
|
74
|
-
className: stl(
|
60
|
+
className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["truncate"]))),
|
75
61
|
children: children
|
76
62
|
}), value && /*#__PURE__*/_jsx("span", {
|
77
|
-
className: VALUE_VARIANT_CLASSNAMES[variant],
|
78
63
|
children: value
|
79
64
|
})]
|
80
65
|
}));
|
@@ -1,14 +1,12 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
|
4
|
-
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
5
3
|
import cx from "clsx";
|
6
4
|
import { AlertCircle, AlertOctagon, AlertTriangle, CheckCircle, X } from "react-feather";
|
7
5
|
import { IconButton } from "../../Button";
|
8
6
|
import stl from "../../styles/helpers/satellitePrefixer";
|
9
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
11
|
-
var BASE_CLASSNAME = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["relative flex text-grey-900 display-body"])));
|
9
|
+
var BASE_CLASSNAME = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["relative flex text-grey-900 display-body border"])));
|
12
10
|
var BACKGROUND_CLASSNAMES = {
|
13
11
|
grey: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["bg-grey-100"]))),
|
14
12
|
accent: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["bg-accent-100"]))),
|
@@ -33,10 +31,11 @@ var ICON_VARIANTS = {
|
|
33
31
|
var ICON_CLASSNAME_VARIANTS = {
|
34
32
|
grey: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["text-grey-600"]))),
|
35
33
|
accent: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["text-accent-600"]))),
|
36
|
-
green: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["text-green-
|
34
|
+
green: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["text-green-700"]))),
|
37
35
|
orange: stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["text-orange-600"]))),
|
38
36
|
red: stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["text-red-600"])))
|
39
37
|
};
|
38
|
+
|
40
39
|
/**
|
41
40
|
* Alerts inform users about important changes or temporally conditions. Use this component if you need to communicate something to users in a prominent way.
|
42
41
|
|
@@ -87,37 +86,36 @@ var ICON_CLASSNAME_VARIANTS = {
|
|
87
86
|
* ## Accessibility
|
88
87
|
* TODO
|
89
88
|
*/
|
90
|
-
|
91
89
|
export var Alert = function Alert(_ref) {
|
92
90
|
var title = _ref.title,
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
var containerClassName = cx(BASE_CLASSNAME, title ? stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["p-4"]))) : stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["py-2 px-3"]))), BACKGROUND_CLASSNAMES[variant], BORDER_CLASSNAMES[variant], usageContext !== "page" && stl(
|
91
|
+
_ref$usageContext = _ref.usageContext,
|
92
|
+
usageContext = _ref$usageContext === void 0 ? "section" : _ref$usageContext,
|
93
|
+
_ref$variant = _ref.variant,
|
94
|
+
variant = _ref$variant === void 0 ? "grey" : _ref$variant,
|
95
|
+
onDismiss = _ref.onDismiss,
|
96
|
+
icon = _ref.icon,
|
97
|
+
className = _ref.className,
|
98
|
+
style = _ref.style,
|
99
|
+
children = _ref.children;
|
100
|
+
var containerClassName = cx(BASE_CLASSNAME, title ? stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["p-4"]))) : stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["py-2 px-3"]))), BACKGROUND_CLASSNAMES[variant], usageContext !== "page" ? BORDER_CLASSNAMES[variant] : stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["border-transparent"]))), usageContext !== "page" && stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["rounded"]))), className);
|
103
101
|
var internalIcon = icon === undefined ? true : icon;
|
104
102
|
var Icon = typeof internalIcon === "boolean" && internalIcon ? ICON_VARIANTS[variant] : internalIcon;
|
105
103
|
return /*#__PURE__*/_jsxs("div", {
|
106
104
|
className: containerClassName,
|
107
105
|
style: style,
|
108
106
|
children: [/*#__PURE__*/_jsx(Icon, {
|
109
|
-
className: cx(stl(
|
107
|
+
className: cx(stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n shrink-0 mr-2\n ", "\n "])), title ? "mt-0.5" : "mt-2px"), ICON_CLASSNAME_VARIANTS[variant]),
|
110
108
|
size: "1rem"
|
111
109
|
}), /*#__PURE__*/_jsxs("div", {
|
112
|
-
className: stl(
|
110
|
+
className: stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["flex flex-1 flex-col ", ""])), onDismiss && "mr-6"),
|
113
111
|
children: [title && /*#__PURE__*/_jsx("h4", {
|
114
|
-
className: stl(
|
112
|
+
className: stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["font-bold text-grey-900 mb-1"]))),
|
115
113
|
children: title
|
116
114
|
}), /*#__PURE__*/_jsx("div", {
|
117
115
|
children: children
|
118
116
|
})]
|
119
117
|
}), onDismiss && /*#__PURE__*/_jsx("span", {
|
120
|
-
className: stl(
|
118
|
+
className: stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["absolute right-1.5 top-1.5"]))),
|
121
119
|
children: /*#__PURE__*/_jsx(IconButton, {
|
122
120
|
icon: X,
|
123
121
|
title: "Close",
|
@@ -1,12 +1,9 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
|
-
var _templateObject, _templateObject2;
|
4
|
-
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
5
3
|
import { AlertCircle } from "react-feather";
|
6
4
|
import stl from "../../styles/helpers/satellitePrefixer";
|
7
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
-
|
10
7
|
/**
|
11
8
|
* Major product wide announcement from Algolia to the users.
|
12
9
|
|
@@ -42,14 +39,15 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
42
39
|
*/
|
43
40
|
export var BigBertha = function BigBertha(_ref) {
|
44
41
|
var icon = _ref.icon,
|
45
|
-
|
42
|
+
children = _ref.children;
|
46
43
|
var InternalIcon = icon || AlertCircle;
|
47
44
|
return /*#__PURE__*/_jsxs("div", {
|
48
45
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex items-center justify-center space-x-4 bg-accent-600 text-white w-full p-4"]))),
|
49
46
|
children: [/*#__PURE__*/_jsx(InternalIcon, {
|
50
|
-
size: "1rem"
|
47
|
+
size: "1rem",
|
48
|
+
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["shrink-0"])))
|
51
49
|
}), /*#__PURE__*/_jsx("span", {
|
52
|
-
className: stl(
|
50
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["display-body"]))),
|
53
51
|
children: children
|
54
52
|
})]
|
55
53
|
});
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
4
|
-
|
5
3
|
import cx from "clsx";
|
6
4
|
import { X } from "react-feather";
|
7
5
|
import { IconButton } from "../../Button";
|
@@ -21,6 +19,7 @@ var ACTIONS_VARIANT_CLASSNAMES = {
|
|
21
19
|
compact: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["mt-1"]))),
|
22
20
|
large: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["mt-3"])))
|
23
21
|
};
|
22
|
+
|
24
23
|
/**
|
25
24
|
* A contextual way of showing our user that a new feature / product is available to them on a higher plan or as an option.
|
26
25
|
|
@@ -55,16 +54,15 @@ var ACTIONS_VARIANT_CLASSNAMES = {
|
|
55
54
|
* ## Accessibility
|
56
55
|
* TODO
|
57
56
|
*/
|
58
|
-
|
59
57
|
export var Promote = function Promote(_ref) {
|
60
58
|
var context = _ref.context,
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
59
|
+
title = _ref.title,
|
60
|
+
_ref$variant = _ref.variant,
|
61
|
+
variant = _ref$variant === void 0 ? "large" : _ref$variant,
|
62
|
+
illustration = _ref.illustration,
|
63
|
+
actions = _ref.actions,
|
64
|
+
children = _ref.children,
|
65
|
+
onDismiss = _ref.onDismiss;
|
68
66
|
return /*#__PURE__*/_jsxs(Card, {
|
69
67
|
className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["relative flex"]))),
|
70
68
|
fullBleed: true,
|
package/esm/Button/Button.js
CHANGED
@@ -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 = ["as", "className", "variant", "size", "startIcon", "endIcon", "loading", "children"];
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
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 ProgressSpinner from "../ProgressSpinner";
|
14
10
|
import stl from "../styles/helpers/satellitePrefixer";
|
@@ -17,6 +13,7 @@ import { isButtonType } from "./types";
|
|
17
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
18
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
19
15
|
var BASE_CLASSNAMES = stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["btn inline-flex justify-center items-center px-4 typo-display-body"])));
|
16
|
+
|
20
17
|
/**
|
21
18
|
* Buttons are used to trigger user actions (like "Add", "Close" or "Save") or navigate users elsewhere through the links. Buttons can contain a combination of a clear label and an icon while links are always text.
|
22
19
|
*
|
@@ -31,36 +28,31 @@ var BASE_CLASSNAMES = stl(_templateObject || (_templateObject = _taggedTemplateL
|
|
31
28
|
* - Use icon-only button for an action that is less critical and doesn't have to drag too much of user attention
|
32
29
|
* - Buttons can take the full width to fill the parent container
|
33
30
|
*/
|
34
|
-
|
35
31
|
export var Button = function Button(props) {
|
36
32
|
var _props$as = props.as,
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
33
|
+
Component = _props$as === void 0 ? "button" : _props$as,
|
34
|
+
className = props.className,
|
35
|
+
_props$variant = props.variant,
|
36
|
+
variant = _props$variant === void 0 ? "neutral" : _props$variant,
|
37
|
+
_props$size = props.size,
|
38
|
+
size = _props$size === void 0 ? "medium" : _props$size,
|
39
|
+
StartIcon = props.startIcon,
|
40
|
+
EndIcon = props.endIcon,
|
41
|
+
_props$loading = props.loading,
|
42
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
43
|
+
children = props.children,
|
44
|
+
cleanedProps = _objectWithoutProperties(props, _excluded);
|
50
45
|
if (loading) {
|
51
46
|
cleanedProps.disabled = true;
|
52
47
|
}
|
53
|
-
|
54
48
|
var buttonClassName = cx(BASE_CLASSNAMES, BUTTON_SIZE_CLASSNAMES[size], BUTTON_VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["btn-disabled"]))), className);
|
55
49
|
var loaderClassNames = stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["absolute ", ""])), (variant === "destructive" || variant === "primary") && "text-white");
|
56
50
|
var iconClassNames = cx(getIconColorClassName(props), loading && stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["invisible"]))));
|
57
51
|
var textClassNames = cx(loading && stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["invisible"]))));
|
58
|
-
|
59
|
-
if (isButtonType(props) && !cleanedProps.hasOwnProperty("type")) {
|
52
|
+
if (isButtonType(props) && !Object.prototype.hasOwnProperty.call(cleanedProps, "type")) {
|
60
53
|
// @ts-ignore
|
61
54
|
cleanedProps.type = "button";
|
62
55
|
}
|
63
|
-
|
64
56
|
return /*#__PURE__*/_jsxs(Component, _objectSpread(_objectSpread({}, cleanedProps), {}, {
|
65
57
|
className: buttonClassName,
|
66
58
|
children: [loading && /*#__PURE__*/_jsx(ProgressSpinner, {
|
@@ -7,7 +7,7 @@ var disabledColor = _disabledColor;
|
|
7
7
|
var rgba = _rgba;
|
8
8
|
var buttonPlugin = plugin(function (_ref) {
|
9
9
|
var addComponents = _ref.addComponents,
|
10
|
-
|
10
|
+
theme = _ref.theme;
|
11
11
|
// Button
|
12
12
|
addComponents({
|
13
13
|
".btn": {
|
@@ -126,8 +126,9 @@ var buttonPlugin = plugin(function (_ref) {
|
|
126
126
|
boxShadow: "none"
|
127
127
|
}
|
128
128
|
}
|
129
|
-
});
|
129
|
+
});
|
130
130
|
|
131
|
+
// Button groups
|
131
132
|
addComponents({
|
132
133
|
".btn-group": {
|
133
134
|
display: "flex",
|
@@ -1,11 +1,8 @@
|
|
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
|
-
|
9
6
|
/**
|
10
7
|
* - Use grouped buttons when there is a close relationship between a number of buttons.
|
11
8
|
* - Group buttons logically into sets based on usage and importance.
|
@@ -13,9 +10,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
10
|
*/
|
14
11
|
export var ButtonGroup = function ButtonGroup(_ref) {
|
15
12
|
var className = _ref.className,
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
_ref$as = _ref.as,
|
14
|
+
Tag = _ref$as === void 0 ? "div" : _ref$as,
|
15
|
+
children = _ref.children;
|
19
16
|
return /*#__PURE__*/_jsx(Tag, {
|
20
17
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["btn-group"]))), className),
|
21
18
|
children: children
|
package/esm/Button/IconButton.js
CHANGED
@@ -2,13 +2,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["as", "className", "variant", "size", "icon", "title", "showTooltip", "loading"];
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
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 ProgressSpinner from "../ProgressSpinner";
|
14
10
|
import stl from "../styles/helpers/satellitePrefixer";
|
@@ -24,38 +20,32 @@ var SIZE_CLASSNAMES = {
|
|
24
20
|
medium: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["h-8 w-8 text-md"]))),
|
25
21
|
large: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["h-10 w-10 text-lg"])))
|
26
22
|
};
|
27
|
-
|
28
23
|
var VARIANT_CLASSNAMES = _objectSpread(_objectSpread({}, BUTTON_VARIANT_CLASSNAMES), {}, {
|
29
24
|
neutral: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["btn-neutral text-grey-600"])))
|
30
25
|
});
|
31
|
-
|
32
26
|
export var IconButton = function IconButton(props) {
|
33
27
|
var _props$as = props.as,
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
28
|
+
Tag = _props$as === void 0 ? "button" : _props$as,
|
29
|
+
className = props.className,
|
30
|
+
_props$variant = props.variant,
|
31
|
+
variant = _props$variant === void 0 ? "neutral" : _props$variant,
|
32
|
+
_props$size = props.size,
|
33
|
+
size = _props$size === void 0 ? "medium" : _props$size,
|
34
|
+
Icon = props.icon,
|
35
|
+
title = props.title,
|
36
|
+
showTooltip = props.showTooltip,
|
37
|
+
_props$loading = props.loading,
|
38
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
39
|
+
cleanedProps = _objectWithoutProperties(props, _excluded);
|
47
40
|
if (loading) {
|
48
41
|
cleanedProps.disabled = true;
|
49
42
|
}
|
50
|
-
|
51
43
|
var iconButtonClassName = cx(BASE_CLASSNAMES, SIZE_CLASSNAMES[size], VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["btn-disabled"]))), className);
|
52
44
|
var loaderClassNames = stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["absolute ", ""])), (variant === "destructive" || variant === "primary") && "text-white");
|
53
|
-
|
54
|
-
if (isButtonType(props) && !cleanedProps.hasOwnProperty("type")) {
|
45
|
+
if (isButtonType(props) && !Object.prototype.hasOwnProperty.call(cleanedProps, "type")) {
|
55
46
|
// @ts-ignore
|
56
47
|
cleanedProps.type = "button";
|
57
48
|
}
|
58
|
-
|
59
49
|
return /*#__PURE__*/_jsx(TooltipWrapper, {
|
60
50
|
delay: 500,
|
61
51
|
show: showTooltip,
|
package/esm/Button/styles.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
|
-
|
3
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
4
|
-
|
5
3
|
import stl from "../styles/helpers/satellitePrefixer";
|
6
4
|
export var BUTTON_SIZE_CLASSNAMES = {
|
7
5
|
small: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["h-6"]))),
|
@@ -21,11 +19,9 @@ export var BUTTON_VARIANT_CLASSNAMES = {
|
|
21
19
|
};
|
22
20
|
export var getIconColorClassName = function getIconColorClassName(_ref) {
|
23
21
|
var disabled = _ref.disabled,
|
24
|
-
|
25
|
-
|
22
|
+
variant = _ref.variant;
|
26
23
|
if (variant === "destructive" || variant === "primary") {
|
27
24
|
return stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["text-white"])));
|
28
25
|
}
|
29
|
-
|
30
26
|
return disabled ? stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["text-grey-300"]))) : stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["text-grey-600"])));
|
31
27
|
};
|
package/esm/Card/Card.js
CHANGED
@@ -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", "as", "elevation", "fullBleed"];
|
5
|
-
|
6
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
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 { createElement, forwardRef } from "react";
|
14
10
|
import stl from "../styles/helpers/satellitePrefixer";
|
@@ -21,17 +17,15 @@ var ELEVATION_CLASSNAMES = {
|
|
21
17
|
"400": stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["card-z400"]))),
|
22
18
|
"500": stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["card-z500"])))
|
23
19
|
};
|
24
|
-
|
25
20
|
/** The `Card` is a useful component for containing content within a page. */
|
26
21
|
export var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
27
22
|
var className = _ref.className,
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
23
|
+
_ref$as = _ref.as,
|
24
|
+
as = _ref$as === void 0 ? "section" : _ref$as,
|
25
|
+
_ref$elevation = _ref.elevation,
|
26
|
+
elevation = _ref$elevation === void 0 ? "100" : _ref$elevation,
|
27
|
+
fullBleed = _ref.fullBleed,
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
35
29
|
return /*#__PURE__*/createElement(as, _objectSpread(_objectSpread({}, props), {}, {
|
36
30
|
ref: ref,
|
37
31
|
className: cx(stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["card ", " display-body"])), fullBleed && "card-fullbleed"), ELEVATION_CLASSNAMES[elevation], className)
|