@autoguru/overdrive 4.0.2 → 4.0.3
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/CHANGELOG.md +6 -0
- package/dist/components/Actions/Actions.js +20 -3
- package/dist/components/Actions/index.js +3 -1
- package/dist/components/Alert/Alert.css.js +28 -20
- package/dist/components/Alert/Alert.js +84 -26
- package/dist/components/Alert/index.js +3 -1
- package/dist/components/Anchor/Anchor.css.js +11 -3
- package/dist/components/Anchor/Anchor.js +53 -28
- package/dist/components/Anchor/index.js +3 -1
- package/dist/components/AutoSuggest/AutoSuggest.css.js +84 -76
- package/dist/components/AutoSuggest/AutoSuggest.js +617 -297
- package/dist/components/AutoSuggest/index.js +3 -1
- package/dist/components/AutoSuggest/useLayoutSuggestionVisible.js +29 -31
- package/dist/components/Badge/Badge.css.js +79 -71
- package/dist/components/Badge/Badge.js +43 -28
- package/dist/components/Badge/index.js +3 -1
- package/dist/components/Box/Box.js +122 -53
- package/dist/components/Box/argTypes.js +64 -94
- package/dist/components/Box/index.js +4 -2
- package/dist/components/Box/useBoxStyles.css.js +105 -85
- package/dist/components/Box/useBoxStyles.js +75 -47
- package/dist/components/BulletList/Bullet.css.js +49 -41
- package/dist/components/BulletList/Bullet.js +38 -24
- package/dist/components/BulletList/BulletList.css.js +13 -5
- package/dist/components/BulletList/BulletList.js +23 -10
- package/dist/components/BulletList/context.js +3 -1
- package/dist/components/BulletList/index.js +4 -2
- package/dist/components/BulletText/BulletText.css.js +21 -13
- package/dist/components/BulletText/BulletText.js +56 -15
- package/dist/components/BulletText/index.js +3 -1
- package/dist/components/Button/Button.css.js +151 -143
- package/dist/components/Button/Button.js +112 -72
- package/dist/components/Button/index.js +3 -1
- package/dist/components/CheckBox/CheckBox.css.js +28 -20
- package/dist/components/CheckBox/CheckBox.js +54 -16
- package/dist/components/CheckBox/index.js +3 -1
- package/dist/components/Columns/Column.css.js +36 -26
- package/dist/components/Columns/Column.js +51 -16
- package/dist/components/Columns/Columns.css.js +39 -31
- package/dist/components/Columns/Columns.js +54 -21
- package/dist/components/Columns/index.js +4 -2
- package/dist/components/DateInput/DateInput.js +33 -7
- package/dist/components/DateInput/index.js +3 -1
- package/dist/components/Flyout/Flyout.js +40 -4
- package/dist/components/Flyout/index.js +3 -1
- package/dist/components/Heading/Heading.js +38 -19
- package/dist/components/Heading/index.js +3 -1
- package/dist/components/Icon/Icon.css.js +13 -5
- package/dist/components/Icon/Icon.js +25 -8
- package/dist/components/Icon/index.js +3 -1
- package/dist/components/Inline/Inline.js +71 -30
- package/dist/components/Inline/index.js +3 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.css.js +56 -48
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +31 -7
- package/dist/components/LinearProgressIndicator/index.js +3 -1
- package/dist/components/LoadingBox/LoadingBox.css.js +26 -18
- package/dist/components/LoadingBox/LoadingBox.js +38 -6
- package/dist/components/LoadingBox/index.js +3 -1
- package/dist/components/Meta/Meta.css.js +16 -8
- package/dist/components/Meta/Meta.js +27 -7
- package/dist/components/Meta/index.js +3 -1
- package/dist/components/MinimalModal/MinimalModal.css.js +15 -7
- package/dist/components/MinimalModal/MinimalModal.js +62 -27
- package/dist/components/MinimalModal/index.js +3 -1
- package/dist/components/Modal/Modal.css.js +38 -30
- package/dist/components/Modal/Modal.js +128 -72
- package/dist/components/Modal/index.js +3 -1
- package/dist/components/NumberInput/NumberInput.js +60 -29
- package/dist/components/NumberInput/index.js +3 -1
- package/dist/components/OrderedList/OrderedList.css.js +16 -8
- package/dist/components/OrderedList/OrderedList.js +60 -26
- package/dist/components/OrderedList/index.js +3 -1
- package/dist/components/OutsideClick/OutsideClick.js +40 -35
- package/dist/components/OutsideClick/index.js +3 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.js +34 -18
- package/dist/components/OverdriveProvider/index.js +3 -1
- package/dist/components/Pagination/Bubble.js +41 -19
- package/dist/components/Pagination/Pagination.css.js +28 -20
- package/dist/components/Pagination/Pagination.js +164 -69
- package/dist/components/Pagination/index.js +3 -1
- package/dist/components/Portal/Portal.js +36 -22
- package/dist/components/Portal/index.js +3 -1
- package/dist/components/Positioner/Positioner.css.js +14 -6
- package/dist/components/Positioner/Positioner.js +107 -84
- package/dist/components/Positioner/alignment.js +13 -10
- package/dist/components/Positioner/index.js +4 -2
- package/dist/components/ProgressBar/ProgressBar.css.js +14 -6
- package/dist/components/ProgressBar/ProgressBar.js +29 -11
- package/dist/components/ProgressBar/index.js +3 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +12 -4
- package/dist/components/ProgressBarGroup/ProgressBarGroup.js +42 -14
- package/dist/components/ProgressBarGroup/index.js +3 -1
- package/dist/components/ProgressSpinner/ProgressSpinner.css.js +81 -73
- package/dist/components/ProgressSpinner/ProgressSpinner.js +31 -13
- package/dist/components/ProgressSpinner/index.js +3 -1
- package/dist/components/Radio/Radio.css.js +31 -23
- package/dist/components/Radio/Radio.js +58 -19
- package/dist/components/Radio/RadioGroup.js +32 -7
- package/dist/components/Radio/index.js +4 -2
- package/dist/components/Section/Section.css.js +13 -5
- package/dist/components/Section/Section.js +18 -3
- package/dist/components/Section/index.js +3 -1
- package/dist/components/SelectInput/SelectInput.css.js +19 -11
- package/dist/components/SelectInput/SelectInput.js +59 -11
- package/dist/components/SelectInput/index.js +3 -1
- package/dist/components/SimplePagination/SimplePagination.js +55 -17
- package/dist/components/SimplePagination/index.js +3 -1
- package/dist/components/Stack/Divider.css.js +12 -4
- package/dist/components/Stack/Divider.js +13 -4
- package/dist/components/Stack/Stack.css.js +18 -10
- package/dist/components/Stack/Stack.js +43 -23
- package/dist/components/Stack/index.js +3 -1
- package/dist/components/StandardModal/StandardModal.css.js +69 -57
- package/dist/components/StandardModal/StandardModal.js +123 -50
- package/dist/components/StandardModal/index.js +3 -1
- package/dist/components/StarRating/StarRating.css.js +16 -8
- package/dist/components/StarRating/StarRating.js +89 -46
- package/dist/components/StarRating/index.js +3 -1
- package/dist/components/Stepper/Stepper.css.js +39 -29
- package/dist/components/Stepper/Stepper.js +176 -95
- package/dist/components/Stepper/index.js +3 -1
- package/dist/components/Switch/Switch.css.js +49 -41
- package/dist/components/Switch/Switch.js +62 -27
- package/dist/components/Switch/index.js +3 -1
- package/dist/components/Table/Table.css.js +14 -6
- package/dist/components/Table/Table.js +28 -5
- package/dist/components/Table/TableCell.css.js +28 -20
- package/dist/components/Table/TableCell.js +41 -11
- package/dist/components/Table/TableHeadCell.css.js +61 -50
- package/dist/components/Table/TableHeadCell.js +86 -40
- package/dist/components/Table/TableRow.js +17 -2
- package/dist/components/Table/TableRowGroup.js +15 -2
- package/dist/components/Table/context.js +21 -10
- package/dist/components/Table/index.js +7 -5
- package/dist/components/Tabs/Tab.css.js +43 -35
- package/dist/components/Tabs/Tab.js +80 -50
- package/dist/components/Tabs/TabList.css.js +30 -22
- package/dist/components/Tabs/TabList.js +119 -68
- package/dist/components/Tabs/TabPane.css.js +11 -3
- package/dist/components/Tabs/TabPane.js +32 -15
- package/dist/components/Tabs/TabPanes.css.js +16 -8
- package/dist/components/Tabs/TabPanes.js +22 -5
- package/dist/components/Tabs/Tabs.js +22 -10
- package/dist/components/Tabs/index.js +7 -5
- package/dist/components/Text/Text.js +34 -13
- package/dist/components/Text/index.js +4 -2
- package/dist/components/Text/useTextStyles.css.js +39 -19
- package/dist/components/Text/useTextStyles.js +19 -5
- package/dist/components/TextAreaInput/TextAreaInput.js +34 -7
- package/dist/components/TextAreaInput/index.js +3 -1
- package/dist/components/TextContainer/TextContainer.js +42 -8
- package/dist/components/TextContainer/index.js +3 -1
- package/dist/components/TextInput/TextInput.js +35 -5
- package/dist/components/TextInput/index.js +3 -1
- package/dist/components/TextLink/TextLink.css.js +23 -15
- package/dist/components/TextLink/TextLink.js +63 -25
- package/dist/components/TextLink/index.js +3 -1
- package/dist/components/ThemeProvider/ThemeProvider.js +30 -12
- package/dist/components/ThemeProvider/index.js +3 -1
- package/dist/components/Toaster/Toast.css.js +17 -9
- package/dist/components/Toaster/Toast.js +217 -105
- package/dist/components/Toaster/index.js +3 -1
- package/dist/components/Tooltip/Tooltip.css.js +21 -9
- package/dist/components/Tooltip/Tooltip.js +61 -32
- package/dist/components/Tooltip/index.js +3 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.css.js +13 -5
- package/dist/components/VisuallyHidden/VisuallyHidden.js +19 -3
- package/dist/components/VisuallyHidden/index.js +3 -1
- package/dist/components/index.js +53 -51
- package/dist/components/private/CheckableBase/CheckableBase.css.js +46 -38
- package/dist/components/private/CheckableBase/CheckableBase.js +89 -27
- package/dist/components/private/CheckableBase/index.js +3 -1
- package/dist/components/private/CheckableBase/useCheckableStyles.js +5 -3
- package/dist/components/private/InputBase/HintText.css.js +11 -3
- package/dist/components/private/InputBase/HintText.js +28 -14
- package/dist/components/private/InputBase/InputState.css.js +96 -80
- package/dist/components/private/InputBase/NotchedBase.css.js +78 -83
- package/dist/components/private/InputBase/NotchedBase.js +79 -34
- package/dist/components/private/InputBase/index.js +3 -1
- package/dist/components/private/InputBase/withEnhancedInput.css.d.ts +2 -9
- package/dist/components/private/InputBase/withEnhancedInput.css.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.css.js +5 -6
- package/dist/components/private/InputBase/withEnhancedInput.js +176 -89
- package/dist/hooks/useAttachedBoxes/index.js +3 -1
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.css.js +26 -18
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +71 -46
- package/dist/hooks/useMedia/index.js +3 -1
- package/dist/hooks/useMedia/useMedia.js +37 -31
- package/dist/hooks/useNegativeMargin/useNegativeMargin.js +4 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +13 -5
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.js +5 -3
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +12 -4
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.js +5 -3
- package/dist/hooks/useResponsiveValue/index.js +3 -1
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +14 -14
- package/dist/index.js +7 -5
- package/dist/reset/globalFonts.css.js +20 -12
- package/dist/reset/globalReset.css.js +21 -13
- package/dist/reset/reset.css.js +105 -109
- package/dist/themes/base/index.js +9 -7
- package/dist/themes/base/tokens.js +256 -249
- package/dist/themes/base/vars.css.js +10 -2
- package/dist/themes/flat_red/index.js +10 -8
- package/dist/themes/flat_red/tokens.js +171 -167
- package/dist/themes/flat_red/vars.css.js +10 -2
- package/dist/themes/helpers.js +9 -10
- package/dist/themes/index.js +4 -2
- package/dist/themes/makeTheme.js +29 -18
- package/dist/themes/tokens.js +3 -1
- package/dist/utils/index.js +93 -77
- package/dist/utils/mapTokenToProperty.js +22 -10
- package/dist/utils/resolveResponsiveProps.js +29 -31
- package/dist/utils/responsiveProps.css.js +29 -17
- package/dist/utils/responsiveStyle.js +26 -16
- package/package.json +1 -1
- package/dist/components/Actions/Actions.d.ts +0 -7
- package/dist/components/Actions/Actions.d.ts.map +0 -1
- package/dist/components/Actions/index.d.ts +0 -2
- package/dist/components/Actions/index.d.ts.map +0 -1
- package/dist/components/Alert/Alert.css.d.ts +0 -4
- package/dist/components/Alert/Alert.css.d.ts.map +0 -1
- package/dist/components/Alert/Alert.d.ts +0 -15
- package/dist/components/Alert/Alert.d.ts.map +0 -1
- package/dist/components/Alert/index.d.ts +0 -2
- package/dist/components/Alert/index.d.ts.map +0 -1
- package/dist/components/Anchor/Anchor.css.d.ts +0 -2
- package/dist/components/Anchor/Anchor.css.d.ts.map +0 -1
- package/dist/components/Anchor/Anchor.d.ts +0 -14
- package/dist/components/Anchor/Anchor.d.ts.map +0 -1
- package/dist/components/Anchor/index.d.ts +0 -2
- package/dist/components/Anchor/index.d.ts.map +0 -1
- package/dist/components/AutoSuggest/AutoSuggest.css.d.ts +0 -15
- package/dist/components/AutoSuggest/AutoSuggest.css.d.ts.map +0 -1
- package/dist/components/AutoSuggest/useLayoutSuggestionVisible.d.ts +0 -3
- package/dist/components/AutoSuggest/useLayoutSuggestionVisible.d.ts.map +0 -1
- package/dist/components/Badge/Badge.css.d.ts +0 -13
- package/dist/components/Badge/Badge.css.d.ts.map +0 -1
- package/dist/components/Badge/Badge.d.ts +0 -11
- package/dist/components/Badge/Badge.d.ts.map +0 -1
- package/dist/components/Badge/index.d.ts +0 -2
- package/dist/components/Badge/index.d.ts.map +0 -1
- package/dist/components/Box/Box.d.ts +0 -7
- package/dist/components/Box/Box.d.ts.map +0 -1
- package/dist/components/Box/argTypes.d.ts +0 -7
- package/dist/components/Box/argTypes.d.ts.map +0 -1
- package/dist/components/Box/index.d.ts +0 -4
- package/dist/components/Box/index.d.ts.map +0 -1
- package/dist/components/Box/useBoxStyles.css.d.ts +0 -46
- package/dist/components/Box/useBoxStyles.css.d.ts.map +0 -1
- package/dist/components/Box/useBoxStyles.d.ts +0 -66
- package/dist/components/Box/useBoxStyles.d.ts.map +0 -1
- package/dist/components/BulletList/Bullet.css.d.ts +0 -3
- package/dist/components/BulletList/Bullet.css.d.ts.map +0 -1
- package/dist/components/BulletList/Bullet.d.ts +0 -7
- package/dist/components/BulletList/Bullet.d.ts.map +0 -1
- package/dist/components/BulletList/BulletList.css.d.ts +0 -3
- package/dist/components/BulletList/BulletList.css.d.ts.map +0 -1
- package/dist/components/BulletList/BulletList.d.ts +0 -6
- package/dist/components/BulletList/BulletList.d.ts.map +0 -1
- package/dist/components/BulletList/context.d.ts +0 -5
- package/dist/components/BulletList/context.d.ts.map +0 -1
- package/dist/components/BulletList/index.d.ts +0 -3
- package/dist/components/BulletList/index.d.ts.map +0 -1
- package/dist/components/BulletText/BulletText.css.d.ts +0 -6
- package/dist/components/BulletText/BulletText.css.d.ts.map +0 -1
- package/dist/components/BulletText/BulletText.d.ts +0 -8
- package/dist/components/BulletText/BulletText.d.ts.map +0 -1
- package/dist/components/BulletText/index.d.ts +0 -2
- package/dist/components/BulletText/index.d.ts.map +0 -1
- package/dist/components/Button/Button.css.d.ts +0 -30
- package/dist/components/Button/Button.css.d.ts.map +0 -1
- package/dist/components/Button/Button.d.ts +0 -20
- package/dist/components/Button/Button.d.ts.map +0 -1
- package/dist/components/Button/index.d.ts +0 -2
- package/dist/components/Button/index.d.ts.map +0 -1
- package/dist/components/CheckBox/CheckBox.css.d.ts +0 -3
- package/dist/components/CheckBox/CheckBox.css.d.ts.map +0 -1
- package/dist/components/CheckBox/CheckBox.d.ts +0 -14
- package/dist/components/CheckBox/CheckBox.d.ts.map +0 -1
- package/dist/components/CheckBox/index.d.ts +0 -2
- package/dist/components/CheckBox/index.d.ts.map +0 -1
- package/dist/components/Columns/Column.css.d.ts +0 -3
- package/dist/components/Columns/Column.css.d.ts.map +0 -1
- package/dist/components/Columns/Column.d.ts +0 -15
- package/dist/components/Columns/Column.d.ts.map +0 -1
- package/dist/components/Columns/Columns.css.d.ts +0 -7
- package/dist/components/Columns/Columns.css.d.ts.map +0 -1
- package/dist/components/Columns/Columns.d.ts +0 -25
- package/dist/components/Columns/Columns.d.ts.map +0 -1
- package/dist/components/Columns/index.d.ts +0 -3
- package/dist/components/Columns/index.d.ts.map +0 -1
- package/dist/components/Flyout/Flyout.d.ts +0 -4
- package/dist/components/Flyout/Flyout.d.ts.map +0 -1
- package/dist/components/Flyout/index.d.ts +0 -2
- package/dist/components/Flyout/index.d.ts.map +0 -1
- package/dist/components/Heading/Heading.d.ts +0 -11
- package/dist/components/Heading/Heading.d.ts.map +0 -1
- package/dist/components/Heading/index.d.ts +0 -2
- package/dist/components/Heading/index.d.ts.map +0 -1
- package/dist/components/Icon/Icon.css.d.ts +0 -2
- package/dist/components/Icon/Icon.css.d.ts.map +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -13
- package/dist/components/Icon/Icon.d.ts.map +0 -1
- package/dist/components/Icon/index.d.ts +0 -2
- package/dist/components/Icon/index.d.ts.map +0 -1
- package/dist/components/Inline/Inline.d.ts +0 -13
- package/dist/components/Inline/Inline.d.ts.map +0 -1
- package/dist/components/Inline/index.d.ts +0 -2
- package/dist/components/Inline/index.d.ts.map +0 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.css.d.ts +0 -4
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.css.d.ts.map +0 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.d.ts +0 -6
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.d.ts.map +0 -1
- package/dist/components/LinearProgressIndicator/index.d.ts +0 -2
- package/dist/components/LinearProgressIndicator/index.d.ts.map +0 -1
- package/dist/components/LoadingBox/LoadingBox.css.d.ts +0 -3
- package/dist/components/LoadingBox/LoadingBox.css.d.ts.map +0 -1
- package/dist/components/LoadingBox/LoadingBox.d.ts +0 -9
- package/dist/components/LoadingBox/LoadingBox.d.ts.map +0 -1
- package/dist/components/LoadingBox/index.d.ts +0 -2
- package/dist/components/LoadingBox/index.d.ts.map +0 -1
- package/dist/components/Meta/Meta.css.d.ts +0 -2
- package/dist/components/Meta/Meta.css.d.ts.map +0 -1
- package/dist/components/MinimalModal/MinimalModal.css.d.ts +0 -3
- package/dist/components/MinimalModal/MinimalModal.css.d.ts.map +0 -1
- package/dist/components/MinimalModal/MinimalModal.d.ts +0 -7
- package/dist/components/MinimalModal/MinimalModal.d.ts.map +0 -1
- package/dist/components/MinimalModal/index.d.ts +0 -2
- package/dist/components/MinimalModal/index.d.ts.map +0 -1
- package/dist/components/Modal/Modal.css.d.ts +0 -5
- package/dist/components/Modal/Modal.css.d.ts.map +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -9
- package/dist/components/Modal/Modal.d.ts.map +0 -1
- package/dist/components/Modal/index.d.ts +0 -2
- package/dist/components/Modal/index.d.ts.map +0 -1
- package/dist/components/OrderedList/OrderedList.css.d.ts +0 -2
- package/dist/components/OrderedList/OrderedList.css.d.ts.map +0 -1
- package/dist/components/OrderedList/OrderedList.d.ts +0 -14
- package/dist/components/OrderedList/OrderedList.d.ts.map +0 -1
- package/dist/components/OrderedList/index.d.ts +0 -2
- package/dist/components/OrderedList/index.d.ts.map +0 -1
- package/dist/components/OutsideClick/OutsideClick.d.ts +0 -8
- package/dist/components/OutsideClick/OutsideClick.d.ts.map +0 -1
- package/dist/components/OutsideClick/index.d.ts +0 -2
- package/dist/components/OutsideClick/index.d.ts.map +0 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.d.ts +0 -7
- package/dist/components/OverdriveProvider/OverdriveProvider.d.ts.map +0 -1
- package/dist/components/OverdriveProvider/index.d.ts +0 -2
- package/dist/components/OverdriveProvider/index.d.ts.map +0 -1
- package/dist/components/Pagination/Bubble.d.ts +0 -10
- package/dist/components/Pagination/Bubble.d.ts.map +0 -1
- package/dist/components/Pagination/Pagination.css.d.ts +0 -4
- package/dist/components/Pagination/Pagination.css.d.ts.map +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -16
- package/dist/components/Pagination/Pagination.d.ts.map +0 -1
- package/dist/components/Pagination/index.d.ts +0 -2
- package/dist/components/Pagination/index.d.ts.map +0 -1
- package/dist/components/Portal/Portal.d.ts +0 -10
- package/dist/components/Portal/Portal.d.ts.map +0 -1
- package/dist/components/Portal/index.d.ts +0 -2
- package/dist/components/Portal/index.d.ts.map +0 -1
- package/dist/components/Positioner/Positioner.css.d.ts +0 -2
- package/dist/components/Positioner/Positioner.css.d.ts.map +0 -1
- package/dist/components/Positioner/Positioner.d.ts +0 -12
- package/dist/components/Positioner/Positioner.d.ts.map +0 -1
- package/dist/components/Positioner/alignment.d.ts +0 -11
- package/dist/components/Positioner/alignment.d.ts.map +0 -1
- package/dist/components/Positioner/index.d.ts +0 -3
- package/dist/components/Positioner/index.d.ts.map +0 -1
- package/dist/components/ProgressBar/ProgressBar.css.d.ts +0 -3
- package/dist/components/ProgressBar/ProgressBar.css.d.ts.map +0 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +0 -9
- package/dist/components/ProgressBar/ProgressBar.d.ts.map +0 -1
- package/dist/components/ProgressBar/index.d.ts +0 -2
- package/dist/components/ProgressBar/index.d.ts.map +0 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.css.d.ts +0 -2
- package/dist/components/ProgressBarGroup/ProgressBarGroup.css.d.ts.map +0 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.d.ts +0 -10
- package/dist/components/ProgressBarGroup/ProgressBarGroup.d.ts.map +0 -1
- package/dist/components/ProgressBarGroup/index.d.ts +0 -2
- package/dist/components/ProgressBarGroup/index.d.ts.map +0 -1
- package/dist/components/ProgressSpinner/ProgressSpinner.css.d.ts +0 -9
- package/dist/components/ProgressSpinner/ProgressSpinner.css.d.ts.map +0 -1
- package/dist/components/ProgressSpinner/ProgressSpinner.d.ts +0 -9
- package/dist/components/ProgressSpinner/ProgressSpinner.d.ts.map +0 -1
- package/dist/components/ProgressSpinner/index.d.ts +0 -2
- package/dist/components/ProgressSpinner/index.d.ts.map +0 -1
- package/dist/components/Radio/Radio.css.d.ts +0 -2
- package/dist/components/Radio/Radio.css.d.ts.map +0 -1
- package/dist/components/Radio/Radio.d.ts +0 -10
- package/dist/components/Radio/Radio.d.ts.map +0 -1
- package/dist/components/Radio/RadioGroup.d.ts +0 -19
- package/dist/components/Radio/RadioGroup.d.ts.map +0 -1
- package/dist/components/Radio/index.d.ts +0 -3
- package/dist/components/Radio/index.d.ts.map +0 -1
- package/dist/components/Section/Section.css.d.ts +0 -3
- package/dist/components/Section/Section.css.d.ts.map +0 -1
- package/dist/components/Section/Section.d.ts +0 -8
- package/dist/components/Section/Section.d.ts.map +0 -1
- package/dist/components/Section/index.d.ts +0 -2
- package/dist/components/Section/index.d.ts.map +0 -1
- package/dist/components/SelectInput/SelectInput.css.d.ts +0 -4
- package/dist/components/SelectInput/SelectInput.css.d.ts.map +0 -1
- package/dist/components/SimplePagination/SimplePagination.d.ts +0 -14
- package/dist/components/SimplePagination/SimplePagination.d.ts.map +0 -1
- package/dist/components/SimplePagination/index.d.ts +0 -2
- package/dist/components/SimplePagination/index.d.ts.map +0 -1
- package/dist/components/Stack/Divider.css.d.ts +0 -2
- package/dist/components/Stack/Divider.css.d.ts.map +0 -1
- package/dist/components/Stack/Divider.d.ts +0 -3
- package/dist/components/Stack/Divider.d.ts.map +0 -1
- package/dist/components/Stack/Stack.css.d.ts +0 -5
- package/dist/components/Stack/Stack.css.d.ts.map +0 -1
- package/dist/components/Stack/Stack.d.ts +0 -11
- package/dist/components/Stack/Stack.d.ts.map +0 -1
- package/dist/components/Stack/index.d.ts +0 -2
- package/dist/components/Stack/index.d.ts.map +0 -1
- package/dist/components/StandardModal/StandardModal.css.d.ts +0 -8
- package/dist/components/StandardModal/StandardModal.css.d.ts.map +0 -1
- package/dist/components/StandardModal/StandardModal.d.ts +0 -16
- package/dist/components/StandardModal/StandardModal.d.ts.map +0 -1
- package/dist/components/StandardModal/index.d.ts +0 -2
- package/dist/components/StandardModal/index.d.ts.map +0 -1
- package/dist/components/StarRating/StarRating.css.d.ts +0 -2
- package/dist/components/StarRating/StarRating.css.d.ts.map +0 -1
- package/dist/components/StarRating/StarRating.d.ts +0 -13
- package/dist/components/StarRating/StarRating.d.ts.map +0 -1
- package/dist/components/StarRating/index.d.ts +0 -2
- package/dist/components/StarRating/index.d.ts.map +0 -1
- package/dist/components/Stepper/Stepper.css.d.ts +0 -5
- package/dist/components/Stepper/Stepper.css.d.ts.map +0 -1
- package/dist/components/Stepper/Stepper.d.ts +0 -13
- package/dist/components/Stepper/Stepper.d.ts.map +0 -1
- package/dist/components/Stepper/index.d.ts +0 -2
- package/dist/components/Stepper/index.d.ts.map +0 -1
- package/dist/components/Switch/Switch.css.d.ts +0 -5
- package/dist/components/Switch/Switch.css.d.ts.map +0 -1
- package/dist/components/Switch/Switch.d.ts +0 -9
- package/dist/components/Switch/Switch.d.ts.map +0 -1
- package/dist/components/Switch/index.d.ts +0 -2
- package/dist/components/Switch/index.d.ts.map +0 -1
- package/dist/components/Table/Table.css.d.ts +0 -2
- package/dist/components/Table/Table.css.d.ts.map +0 -1
- package/dist/components/Table/Table.d.ts +0 -9
- package/dist/components/Table/Table.d.ts.map +0 -1
- package/dist/components/Table/TableCell.css.d.ts +0 -2
- package/dist/components/Table/TableCell.css.d.ts.map +0 -1
- package/dist/components/Table/TableCell.d.ts +0 -12
- package/dist/components/Table/TableCell.d.ts.map +0 -1
- package/dist/components/Table/TableHeadCell.css.d.ts +0 -10
- package/dist/components/Table/TableHeadCell.css.d.ts.map +0 -1
- package/dist/components/Table/TableHeadCell.d.ts +0 -14
- package/dist/components/Table/TableHeadCell.d.ts.map +0 -1
- package/dist/components/Table/TableRow.d.ts +0 -8
- package/dist/components/Table/TableRow.d.ts.map +0 -1
- package/dist/components/Table/TableRowGroup.d.ts +0 -7
- package/dist/components/Table/TableRowGroup.d.ts.map +0 -1
- package/dist/components/Table/context.d.ts +0 -9
- package/dist/components/Table/context.d.ts.map +0 -1
- package/dist/components/Table/index.d.ts +0 -6
- package/dist/components/Table/index.d.ts.map +0 -1
- package/dist/components/Tabs/Tab.css.d.ts +0 -7
- package/dist/components/Tabs/Tab.css.d.ts.map +0 -1
- package/dist/components/Tabs/Tab.d.ts +0 -10
- package/dist/components/Tabs/Tab.d.ts.map +0 -1
- package/dist/components/Tabs/TabList.css.d.ts +0 -3
- package/dist/components/Tabs/TabList.css.d.ts.map +0 -1
- package/dist/components/Tabs/TabList.d.ts +0 -9
- package/dist/components/Tabs/TabList.d.ts.map +0 -1
- package/dist/components/Tabs/TabPane.css.d.ts +0 -2
- package/dist/components/Tabs/TabPane.css.d.ts.map +0 -1
- package/dist/components/Tabs/TabPane.d.ts +0 -5
- package/dist/components/Tabs/TabPane.d.ts.map +0 -1
- package/dist/components/Tabs/TabPanes.css.d.ts +0 -2
- package/dist/components/Tabs/TabPanes.css.d.ts.map +0 -1
- package/dist/components/Tabs/TabPanes.d.ts +0 -13
- package/dist/components/Tabs/TabPanes.d.ts.map +0 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -16
- package/dist/components/Tabs/Tabs.d.ts.map +0 -1
- package/dist/components/Tabs/index.d.ts +0 -6
- package/dist/components/Tabs/index.d.ts.map +0 -1
- package/dist/components/Text/Text.d.ts +0 -11
- package/dist/components/Text/Text.d.ts.map +0 -1
- package/dist/components/Text/index.d.ts +0 -4
- package/dist/components/Text/index.d.ts.map +0 -1
- package/dist/components/Text/useTextStyles.css.d.ts +0 -7
- package/dist/components/Text/useTextStyles.css.d.ts.map +0 -1
- package/dist/components/Text/useTextStyles.d.ts +0 -15
- package/dist/components/Text/useTextStyles.d.ts.map +0 -1
- package/dist/components/TextContainer/TextContainer.d.ts +0 -9
- package/dist/components/TextContainer/TextContainer.d.ts.map +0 -1
- package/dist/components/TextContainer/index.d.ts +0 -2
- package/dist/components/TextContainer/index.d.ts.map +0 -1
- package/dist/components/TextLink/TextLink.css.d.ts +0 -3
- package/dist/components/TextLink/TextLink.css.d.ts.map +0 -1
- package/dist/components/TextLink/TextLink.d.ts +0 -14
- package/dist/components/TextLink/TextLink.d.ts.map +0 -1
- package/dist/components/TextLink/index.d.ts +0 -2
- package/dist/components/TextLink/index.d.ts.map +0 -1
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -19
- package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +0 -1
- package/dist/components/ThemeProvider/index.d.ts +0 -2
- package/dist/components/ThemeProvider/index.d.ts.map +0 -1
- package/dist/components/Toaster/Toast.css.d.ts +0 -3
- package/dist/components/Toaster/Toast.css.d.ts.map +0 -1
- package/dist/components/Toaster/Toast.d.ts +0 -13
- package/dist/components/Toaster/Toast.d.ts.map +0 -1
- package/dist/components/Toaster/index.d.ts +0 -2
- package/dist/components/Toaster/index.d.ts.map +0 -1
- package/dist/components/Tooltip/Tooltip.css.d.ts +0 -2
- package/dist/components/Tooltip/Tooltip.css.d.ts.map +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -9
- package/dist/components/Tooltip/Tooltip.d.ts.map +0 -1
- package/dist/components/Tooltip/index.d.ts +0 -2
- package/dist/components/Tooltip/index.d.ts.map +0 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.css.d.ts +0 -2
- package/dist/components/VisuallyHidden/VisuallyHidden.css.d.ts.map +0 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +0 -7
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +0 -1
- package/dist/components/VisuallyHidden/index.d.ts +0 -2
- package/dist/components/VisuallyHidden/index.d.ts.map +0 -1
- package/dist/components/private/CheckableBase/CheckableBase.css.d.ts +0 -7
- package/dist/components/private/CheckableBase/CheckableBase.css.d.ts.map +0 -1
- package/dist/components/private/CheckableBase/CheckableBase.d.ts +0 -16
- package/dist/components/private/CheckableBase/CheckableBase.d.ts.map +0 -1
- package/dist/components/private/CheckableBase/index.d.ts +0 -2
- package/dist/components/private/CheckableBase/index.d.ts.map +0 -1
- package/dist/components/private/CheckableBase/useCheckableStyles.d.ts +0 -4
- package/dist/components/private/CheckableBase/useCheckableStyles.d.ts.map +0 -1
- package/dist/components/private/InputBase/HintText.css.d.ts +0 -2
- package/dist/components/private/InputBase/HintText.css.d.ts.map +0 -1
- package/dist/components/private/InputBase/HintText.d.ts +0 -9
- package/dist/components/private/InputBase/HintText.d.ts.map +0 -1
- package/dist/components/private/InputBase/InputState.css.d.ts +0 -58
- package/dist/components/private/InputBase/InputState.css.d.ts.map +0 -1
- package/dist/components/private/InputBase/NotchedBase.css.d.ts +0 -14
- package/dist/components/private/InputBase/NotchedBase.css.d.ts.map +0 -1
- package/dist/components/private/InputBase/NotchedBase.d.ts +0 -14
- package/dist/components/private/InputBase/NotchedBase.d.ts.map +0 -1
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.css.d.ts +0 -9
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.css.d.ts.map +0 -1
- package/dist/hooks/useNegativeMargin/useNegativeMargin.d.ts +0 -3
- package/dist/hooks/useNegativeMargin/useNegativeMargin.d.ts.map +0 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.d.ts +0 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.d.ts.map +0 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts +0 -4
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts.map +0 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.d.ts +0 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.d.ts.map +0 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts +0 -4
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts.map +0 -1
- package/dist/reset/globalFonts.css.d.ts +0 -2
- package/dist/reset/globalFonts.css.d.ts.map +0 -1
- package/dist/reset/globalReset.css.d.ts +0 -2
- package/dist/reset/globalReset.css.d.ts.map +0 -1
- package/dist/reset/reset.css.d.ts +0 -49
- package/dist/reset/reset.css.d.ts.map +0 -1
- package/dist/themes/base/index.d.ts +0 -8
- package/dist/themes/base/index.d.ts.map +0 -1
- package/dist/themes/base/tokens.d.ts +0 -3
- package/dist/themes/base/tokens.d.ts.map +0 -1
- package/dist/themes/base/vars.css.d.ts +0 -3
- package/dist/themes/base/vars.css.d.ts.map +0 -1
- package/dist/themes/flat_red/index.d.ts +0 -8
- package/dist/themes/flat_red/index.d.ts.map +0 -1
- package/dist/themes/flat_red/tokens.d.ts +0 -3
- package/dist/themes/flat_red/tokens.d.ts.map +0 -1
- package/dist/themes/flat_red/vars.css.d.ts +0 -2
- package/dist/themes/flat_red/vars.css.d.ts.map +0 -1
- package/dist/themes/helpers.d.ts +0 -2
- package/dist/themes/helpers.d.ts.map +0 -1
- package/dist/themes/index.d.ts +0 -3
- package/dist/themes/index.d.ts.map +0 -1
- package/dist/themes/makeTheme.d.ts +0 -12
- package/dist/themes/makeTheme.d.ts.map +0 -1
- package/dist/themes/tokens.d.ts +0 -95
- package/dist/themes/tokens.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -19
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/mapTokenToProperty.d.ts +0 -6
- package/dist/utils/mapTokenToProperty.d.ts.map +0 -1
- package/dist/utils/resolveResponsiveProps.d.ts +0 -7
- package/dist/utils/resolveResponsiveProps.d.ts.map +0 -1
- package/dist/utils/responsiveProps.css.d.ts +0 -5
- package/dist/utils/responsiveProps.css.d.ts.map +0 -1
- package/dist/utils/responsiveStyle.d.ts +0 -4
- package/dist/utils/responsiveStyle.d.ts.map +0 -1
|
@@ -1,18 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import clsx from 'clsx';
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { isValidElement } from 'react';
|
|
4
|
-
import { Box } from
|
|
5
|
-
import { Inline } from
|
|
6
|
-
import { Text } from
|
|
7
|
-
import * as styles from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
import { Box } from "../Box/index.js";
|
|
7
|
+
import { Inline } from "../Inline/index.js";
|
|
8
|
+
import { Text } from "../Text/index.js";
|
|
9
|
+
import * as styles from "./BulletText.css.js";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
export const BulletText = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
variant = 'primary',
|
|
15
|
+
children,
|
|
16
|
+
is: Component = 'div',
|
|
17
|
+
bullet: Bullet = '•'
|
|
18
|
+
} = _ref;
|
|
19
|
+
return _jsxs(Inline, {
|
|
20
|
+
noWrap: true,
|
|
21
|
+
space: "3",
|
|
22
|
+
is: Component,
|
|
23
|
+
alignX: "flexStart",
|
|
24
|
+
alignY: "center",
|
|
25
|
+
children: [isValidElement(Bullet) ? _jsx(Box, {
|
|
26
|
+
position: "relative",
|
|
27
|
+
flexShrink: 0,
|
|
28
|
+
children: Bullet
|
|
29
|
+
}) : _jsx(Box, {
|
|
30
|
+
position: "relative",
|
|
31
|
+
flexShrink: 0,
|
|
32
|
+
display: "flex",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
justifyContent: "center",
|
|
35
|
+
className: clsx(styles.bullet, {
|
|
36
|
+
[styles.primary]: variant === 'primary',
|
|
37
|
+
[styles.secondary]: variant !== 'primary'
|
|
38
|
+
}),
|
|
39
|
+
borderRadius: "pill",
|
|
40
|
+
children: _jsx(Text, {
|
|
41
|
+
className: clsx({
|
|
42
|
+
[styles.primaryText]: variant === 'primary',
|
|
43
|
+
[styles.secondaryText]: variant !== 'primary'
|
|
44
|
+
}),
|
|
45
|
+
is: "span",
|
|
46
|
+
size: "2",
|
|
47
|
+
children: Bullet
|
|
48
|
+
})
|
|
49
|
+
}), _jsx(Box, {
|
|
50
|
+
flexGrow: 1,
|
|
51
|
+
children: _jsx(Text, {
|
|
52
|
+
is: "span",
|
|
53
|
+
size: "4",
|
|
54
|
+
display: "block",
|
|
55
|
+
children: children
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
@@ -1,161 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
|
|
5
|
+
__vanilla_filescope__.setFileScope("lib/components/Button/Button.css.ts", "@autoguru/overdrive");
|
|
6
|
+
|
|
1
7
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from
|
|
8
|
+
import { vars } from "../../themes/base/vars.css.js";
|
|
3
9
|
export const root = style({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
});
|
|
10
|
+
transitionDelay: '0s',
|
|
11
|
+
transitionTimingFunction: vars.animation.easing.standard,
|
|
12
|
+
transitionDuration: '0.1s',
|
|
13
|
+
transitionProperty: 'color, background-color, border-color, box-shadow, transform',
|
|
14
|
+
transform: 'translate3d(0, 0, 1) scale(1)',
|
|
15
|
+
willChange: 'transform'
|
|
16
|
+
}, "root");
|
|
11
17
|
export const body = style({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
18
|
+
display: 'grid',
|
|
19
|
+
gridAutoFlow: 'column dense',
|
|
20
|
+
gridGap: vars.space['1']
|
|
21
|
+
}, "body");
|
|
16
22
|
export const loading = style({
|
|
17
|
-
|
|
18
|
-
});
|
|
23
|
+
cursor: 'not-allowed'
|
|
24
|
+
}, "loading");
|
|
19
25
|
export const enabled = style({
|
|
20
|
-
|
|
21
|
-
});
|
|
26
|
+
cursor: 'pointer'
|
|
27
|
+
}, "enabled");
|
|
22
28
|
export const disabled = style({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
29
|
+
cursor: 'not-allowed',
|
|
30
|
+
opacity: '0.3'
|
|
31
|
+
}, "disabled");
|
|
26
32
|
export const spinner = style({
|
|
27
|
-
|
|
28
|
-
});
|
|
33
|
+
margin: '0 auto'
|
|
34
|
+
}, "spinner");
|
|
29
35
|
const smallHeight = '36px';
|
|
30
36
|
export const size = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
37
|
+
small: styleVariants({
|
|
38
|
+
default: {
|
|
39
|
+
minWidth: vars.space['8'],
|
|
40
|
+
height: smallHeight,
|
|
41
|
+
gridGap: vars.space['1']
|
|
42
|
+
},
|
|
43
|
+
rounded: {
|
|
44
|
+
minWidth: smallHeight
|
|
45
|
+
},
|
|
46
|
+
iconOnly: {
|
|
47
|
+
width: smallHeight
|
|
48
|
+
}
|
|
49
|
+
}, "size_small"),
|
|
50
|
+
medium: styleVariants({
|
|
51
|
+
default: {
|
|
52
|
+
minWidth: vars.space['9'],
|
|
53
|
+
height: vars.space['8'],
|
|
54
|
+
gridGap: vars.space['2']
|
|
55
|
+
},
|
|
56
|
+
rounded: {
|
|
57
|
+
minWidth: vars.space['8']
|
|
58
|
+
},
|
|
59
|
+
iconOnly: {
|
|
60
|
+
width: vars.space['8']
|
|
61
|
+
}
|
|
62
|
+
}, "size_medium")
|
|
57
63
|
};
|
|
58
64
|
export const variant = {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
primary: style({
|
|
66
|
+
color: vars.colours.intent.primary.foreground,
|
|
67
|
+
backgroundColor: vars.colours.intent.primary.background.standard,
|
|
68
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.primary.background.strong, ", ").concat(vars.elevation['2'])
|
|
69
|
+
}, "variant_primary"),
|
|
70
|
+
secondary: style({
|
|
71
|
+
color: vars.colours.intent.secondary.foreground,
|
|
72
|
+
backgroundColor: vars.colours.intent.secondary.background.standard,
|
|
73
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.secondary.foreground, ", ").concat(vars.elevation['2'])
|
|
74
|
+
}, "variant_secondary"),
|
|
75
|
+
danger: style({
|
|
76
|
+
backgroundColor: vars.colours.intent.danger.background.standard,
|
|
77
|
+
color: vars.colours.intent.danger.foreground,
|
|
78
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.danger.background.standard, ", ").concat(vars.elevation['2'])
|
|
79
|
+
}, "variant_danger")
|
|
74
80
|
};
|
|
75
81
|
export const defaultStates = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
82
|
+
primary: style({
|
|
83
|
+
':hover': {
|
|
84
|
+
color: vars.colours.intent.primary.foreground,
|
|
85
|
+
backgroundColor: vars.colours.intent.primary.background.strong,
|
|
86
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.primary.background.strong, ", ").concat(vars.elevation['3'])
|
|
87
|
+
},
|
|
88
|
+
':active': {
|
|
89
|
+
transform: 'scale(0.97)',
|
|
90
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.primary.background.strong, ", ").concat(vars.elevation['1']),
|
|
91
|
+
color: vars.colours.intent.primary.foreground,
|
|
92
|
+
backgroundColor: vars.colours.intent.primary.background.strong
|
|
93
|
+
}
|
|
94
|
+
}, "defaultStates_primary"),
|
|
95
|
+
secondary: style({
|
|
96
|
+
':hover': {
|
|
97
|
+
color: vars.colours.intent.secondary.foreground,
|
|
98
|
+
backgroundColor: vars.colours.intent.secondary.background.strong,
|
|
99
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.secondary.foreground, ", ").concat(vars.elevation['3'])
|
|
100
|
+
},
|
|
101
|
+
':active': {
|
|
102
|
+
transform: 'scale(0.97)',
|
|
103
|
+
color: vars.colours.intent.secondary.foreground,
|
|
104
|
+
backgroundColor: vars.colours.intent.secondary.background.strong,
|
|
105
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.secondary.background.strong, ", ").concat(vars.elevation['1'])
|
|
106
|
+
}
|
|
107
|
+
}, "defaultStates_secondary"),
|
|
108
|
+
danger: style({
|
|
109
|
+
':hover': {
|
|
110
|
+
color: vars.colours.intent.danger.foreground,
|
|
111
|
+
backgroundColor: vars.colours.intent.danger.background.strong,
|
|
112
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.danger.background.strong, ", ").concat(vars.elevation['3'])
|
|
113
|
+
},
|
|
114
|
+
':active': {
|
|
115
|
+
transform: 'scale(0.97)',
|
|
116
|
+
color: vars.colours.intent.danger.foreground,
|
|
117
|
+
backgroundColor: vars.colours.intent.danger.background.strong,
|
|
118
|
+
boxShadow: "inset 0 0 0 1px ".concat(vars.colours.intent.danger.background.strong, ", ").concat(vars.elevation['1'])
|
|
119
|
+
}
|
|
120
|
+
}, "defaultStates_danger")
|
|
115
121
|
};
|
|
116
122
|
export const minimal = {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
defaults: style({
|
|
124
|
+
color: vars.typography.colour.neutral
|
|
125
|
+
}, "minimal_defaults"),
|
|
126
|
+
noneRounded: style({
|
|
127
|
+
minWidth: '50px'
|
|
128
|
+
}, "minimal_noneRounded")
|
|
123
129
|
};
|
|
124
130
|
export const minimalStates = {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
131
|
+
primary: style({
|
|
132
|
+
':hover': {
|
|
133
|
+
color: vars.colours.intent.primary.background.strong,
|
|
134
|
+
backgroundColor: vars.colours.intent.primary.background.mild,
|
|
135
|
+
boxShadow: 'none'
|
|
136
|
+
},
|
|
137
|
+
':active': {
|
|
138
|
+
color: vars.colours.intent.primary.background.strong,
|
|
139
|
+
backgroundColor: vars.colours.intent.primary.background.mild,
|
|
140
|
+
boxShadow: 'none'
|
|
141
|
+
}
|
|
142
|
+
}, "minimalStates_primary"),
|
|
143
|
+
secondary: style({
|
|
144
|
+
':hover': {
|
|
145
|
+
color: vars.typography.colour.secondary,
|
|
146
|
+
backgroundColor: vars.colours.intent.secondary.background.strong,
|
|
147
|
+
boxShadow: 'none'
|
|
148
|
+
},
|
|
149
|
+
':active': {
|
|
150
|
+
color: vars.typography.colour.secondary,
|
|
151
|
+
backgroundColor: vars.colours.intent.secondary.background.strong,
|
|
152
|
+
boxShadow: 'none'
|
|
153
|
+
}
|
|
154
|
+
}, "minimalStates_secondary"),
|
|
155
|
+
danger: style({
|
|
156
|
+
':hover': {
|
|
157
|
+
color: vars.colours.intent.danger.background.strong,
|
|
158
|
+
backgroundColor: vars.colours.intent.danger.background.mild,
|
|
159
|
+
boxShadow: 'none'
|
|
160
|
+
},
|
|
161
|
+
':active': {
|
|
162
|
+
color: vars.colours.intent.danger.background.strong,
|
|
163
|
+
backgroundColor: vars.colours.intent.danger.background.mild,
|
|
164
|
+
boxShadow: 'none'
|
|
165
|
+
}
|
|
166
|
+
}, "minimalStates_danger")
|
|
161
167
|
};
|
|
168
|
+
|
|
169
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -1,82 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
+
|
|
1
9
|
import clsx from 'clsx';
|
|
2
10
|
import * as React from 'react';
|
|
3
|
-
import { cloneElement, createElement, forwardRef, isValidElement, useMemo
|
|
4
|
-
import { Box, useBoxStyles } from
|
|
5
|
-
import { Icon } from
|
|
6
|
-
import { ProgressSpinner } from
|
|
7
|
-
import { useTextStyles } from
|
|
8
|
-
import * as styles from
|
|
11
|
+
import { cloneElement, createElement, forwardRef, isValidElement, useMemo } from 'react';
|
|
12
|
+
import { Box, useBoxStyles } from "../Box/index.js";
|
|
13
|
+
import { Icon } from "../Icon/index.js";
|
|
14
|
+
import { ProgressSpinner } from "../ProgressSpinner/index.js";
|
|
15
|
+
import { useTextStyles } from "../Text/index.js";
|
|
16
|
+
import * as styles from "./Button.css.js";
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
|
|
9
19
|
const getSpinnerColour = (variant, minimal) => minimal || variant === 'secondary' ? 'secondary' : 'light';
|
|
10
|
-
|
|
20
|
+
|
|
21
|
+
const getBorderRadius = rounded => rounded ? 'pill' : '1';
|
|
22
|
+
|
|
11
23
|
const getPadding = (size, loading) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return size === 'small' ? '3' : '4';
|
|
24
|
+
if (loading) return 'none';
|
|
25
|
+
return size === 'small' ? '3' : '4';
|
|
15
26
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}), styles.root, getButtonStates(styles, variant, disabled || isLoading, minimal, rounded), !minimal && styles.variant[variant], getButtonSize(styles, size, rounded, isSingleIconChild && !isLoading), {
|
|
48
|
-
[styles.disabled]: disabled,
|
|
49
|
-
[styles.enabled]: !disabled && !isLoading,
|
|
50
|
-
[styles.loading]: isLoading,
|
|
51
|
-
}, className),
|
|
52
|
-
ref,
|
|
27
|
+
|
|
28
|
+
export const Button = forwardRef((_ref, ref) => {
|
|
29
|
+
var _maybeIconProps$size;
|
|
30
|
+
|
|
31
|
+
let {
|
|
32
|
+
children,
|
|
33
|
+
className = '',
|
|
34
|
+
disabled = false,
|
|
35
|
+
id,
|
|
36
|
+
is: Component = 'button',
|
|
37
|
+
isLoading = false,
|
|
38
|
+
isFullWidth = false,
|
|
39
|
+
minimal = false,
|
|
40
|
+
onClick,
|
|
41
|
+
rounded = false,
|
|
42
|
+
size = 'medium',
|
|
43
|
+
type = 'button',
|
|
44
|
+
variant = 'secondary',
|
|
45
|
+
'aria-label': ariaLabel
|
|
46
|
+
} = _ref;
|
|
47
|
+
const {
|
|
48
|
+
isSingleIconChild,
|
|
49
|
+
props: maybeIconProps
|
|
50
|
+
} = useMemo(() => {
|
|
51
|
+
const maybeIcon = isValidElement(children) && children.type === Icon;
|
|
52
|
+
const maybeProps = children;
|
|
53
|
+
return maybeIcon ? {
|
|
54
|
+
isSingleIconChild: true,
|
|
55
|
+
props: maybeProps.props
|
|
56
|
+
} : {
|
|
57
|
+
isSingleIconChild: false
|
|
53
58
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
}, [children]);
|
|
60
|
+
const props = {
|
|
61
|
+
type: Component === 'button' ? type : undefined,
|
|
62
|
+
id,
|
|
63
|
+
onClick,
|
|
64
|
+
disabled: disabled || isLoading,
|
|
65
|
+
'aria-label': ariaLabel,
|
|
66
|
+
className: clsx(useBoxStyles({
|
|
67
|
+
is: typeof Component === 'string' ? Component : undefined,
|
|
68
|
+
display: 'inlineBlock',
|
|
69
|
+
overflow: 'hidden',
|
|
70
|
+
borderRadius: getBorderRadius(rounded),
|
|
71
|
+
textAlign: 'center',
|
|
72
|
+
borderWidth: 'none',
|
|
73
|
+
paddingY: 'none',
|
|
74
|
+
paddingX: getPadding(size, isLoading),
|
|
75
|
+
width: isFullWidth ? 'full' : void 0
|
|
76
|
+
}), useTextStyles({
|
|
77
|
+
colour: 'white',
|
|
78
|
+
fontWeight: 'semiBold',
|
|
79
|
+
size: size === 'medium' ? '4' : '3'
|
|
80
|
+
}), styles.root, getButtonStates(styles, variant, disabled || isLoading, minimal, rounded), !minimal && styles.variant[variant], getButtonSize(styles, size, rounded, isSingleIconChild && !isLoading), {
|
|
81
|
+
[styles.disabled]: disabled,
|
|
82
|
+
[styles.enabled]: !disabled && !isLoading,
|
|
83
|
+
[styles.loading]: isLoading
|
|
84
|
+
}, className),
|
|
85
|
+
ref
|
|
86
|
+
};
|
|
87
|
+
const child = isLoading ? _jsx(ProgressSpinner, {
|
|
88
|
+
className: styles.spinner,
|
|
89
|
+
colour: getSpinnerColour(variant, minimal)
|
|
90
|
+
}) : _jsx(Box, {
|
|
91
|
+
alignItems: "center",
|
|
92
|
+
justifyContent: "center",
|
|
93
|
+
height: "full",
|
|
94
|
+
className: styles.body,
|
|
95
|
+
children: isSingleIconChild && maybeIconProps ? _jsx(Icon, _objectSpread({
|
|
96
|
+
size: ((_maybeIconProps$size = maybeIconProps.size) !== null && _maybeIconProps$size !== void 0 ? _maybeIconProps$size : size === 'small') ? 'small' : 'medium'
|
|
97
|
+
}, maybeIconProps)) : children
|
|
98
|
+
});
|
|
99
|
+
return isValidElement(Component) ? cloneElement(Component, _objectSpread({
|
|
100
|
+
ref
|
|
101
|
+
}, props), child) : createElement(Component, _objectSpread({
|
|
102
|
+
ref
|
|
103
|
+
}, props), child);
|
|
62
104
|
});
|
|
105
|
+
|
|
63
106
|
const getButtonStates = (buttonStyles, variant, disabled, minimal, rounded) => {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return clsx(styles.minimal.defaults, styles.minimalStates[variant], {
|
|
72
|
-
[styles.minimal.noneRounded]: !rounded,
|
|
73
|
-
});
|
|
74
|
-
return styles.defaultStates[variant];
|
|
107
|
+
if (disabled) return minimal ? clsx(buttonStyles.minimal.defaults, {
|
|
108
|
+
[buttonStyles.minimal.noneRounded]: !rounded
|
|
109
|
+
}) : '';
|
|
110
|
+
if (minimal) return clsx(styles.minimal.defaults, styles.minimalStates[variant], {
|
|
111
|
+
[styles.minimal.noneRounded]: !rounded
|
|
112
|
+
});
|
|
113
|
+
return styles.defaultStates[variant];
|
|
75
114
|
};
|
|
115
|
+
|
|
76
116
|
const getButtonSize = (buttonStyles, size, rounded, iconOnly) => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
117
|
+
const currentSize = buttonStyles.size[size];
|
|
118
|
+
return clsx(currentSize.default, {
|
|
119
|
+
[currentSize.rounded]: rounded,
|
|
120
|
+
[currentSize.iconOnly]: iconOnly
|
|
121
|
+
});
|
|
122
|
+
};
|