@autoguru/overdrive 4.33.1 → 4.35.0
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/dist/components/Alert/Alert.js +1 -2
- package/dist/components/Anchor/Anchor.js +3 -4
- package/dist/components/AutoSuggest/AutoSuggest.css.js +3 -3
- package/dist/components/AutoSuggest/AutoSuggest.d.ts.map +1 -1
- package/dist/components/AutoSuggest/AutoSuggest.js +8 -9
- package/dist/components/Box/Box.js +2 -2
- package/dist/components/Box/argTypes.d.ts.map +1 -1
- package/dist/components/Box/argTypes.js +2 -2
- package/dist/components/Box/useBoxStyles.css.d.ts +1 -1
- package/dist/components/Box/useBoxStyles.css.d.ts.map +1 -1
- package/dist/components/Box/useBoxStyles.css.js +5 -11
- package/dist/components/BulletList/Bullet.css.js +3 -3
- package/dist/components/BulletList/Bullet.d.ts.map +1 -1
- package/dist/components/BulletList/Bullet.js +12 -4
- package/dist/components/BulletText/BulletText.js +1 -2
- package/dist/components/Button/Button.css.js +21 -21
- package/dist/components/Button/Button.js +3 -5
- package/dist/components/CheckBox/CheckBox.css.js +3 -3
- package/dist/components/CheckBox/CheckBox.js +1 -2
- package/dist/components/ColourInput/ColourInput.css.js +2 -2
- package/dist/components/ColourInput/ColourInput.js +3 -4
- package/dist/components/Columns/Column.css.js +1 -1
- package/dist/components/Columns/Column.js +2 -2
- package/dist/components/Columns/Columns.js +2 -2
- package/dist/components/DateInput/DateInput.js +2 -2
- package/dist/components/DatePicker/DatePicker.js +3 -4
- package/dist/components/DividerLine/DividerLine.d.ts +1 -1
- package/dist/components/DividerLine/DividerLine.d.ts.map +1 -1
- package/dist/components/DividerLine/DividerLine.js +1 -1
- package/dist/components/DropDown/DropDown.js +3 -5
- package/dist/components/DropDown/DropDownOption.css.js +2 -2
- package/dist/components/DropDown/DropDownOption.js +3 -4
- package/dist/components/EditableText/EditableText.css.js +1 -1
- package/dist/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.js +5 -6
- package/dist/components/FillHeightBox/FillHeightBox.js +2 -2
- package/dist/components/Flyout/Flyout.js +2 -2
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.js +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +5 -7
- package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.js +5 -9
- package/dist/components/Image/Image.js +2 -2
- package/dist/components/Image/ImageServerProvider.js +9 -8
- package/dist/components/Image/ResponsiveImage.js +2 -2
- package/dist/components/Image/SimpleImage.js +2 -2
- package/dist/components/Inline/Inline.js +1 -3
- package/dist/components/LoadingBox/LoadingBox.js +3 -3
- package/dist/components/Meta/Meta.js +2 -3
- package/dist/components/MinimalModal/MinimalModal.js +2 -2
- package/dist/components/Modal/Modal.css.js +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +16 -9
- package/dist/components/NumberBubble/NumberBubble.js +2 -2
- package/dist/components/NumberInput/NumberInput.js +3 -3
- package/dist/components/OrderedList/OrderedList.css.js +1 -1
- package/dist/components/OutsideClick/OutsideClick.js +1 -1
- package/dist/components/Pagination/Pagination.css.js +6 -6
- package/dist/components/Pagination/Pagination.js +1 -2
- package/dist/components/Positioner/Positioner.d.ts.map +1 -1
- package/dist/components/Positioner/Positioner.js +17 -7
- package/dist/components/Positioner/alignment.js +3 -3
- package/dist/components/ProgressBar/ProgressBar.css.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +1 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.js +2 -3
- package/dist/components/Radio/Radio.css.js +4 -4
- package/dist/components/Radio/Radio.js +1 -2
- package/dist/components/ScrollPane/ScrollPane.css.js +3 -3
- package/dist/components/ScrollPane/ScrollPane.js +2 -2
- package/dist/components/SelectInput/SelectInput.css.js +3 -3
- package/dist/components/SelectInput/SelectInput.d.ts +1 -1
- package/dist/components/SelectInput/SelectInput.d.ts.map +1 -1
- package/dist/components/SelectInput/SelectInput.js +5 -5
- package/dist/components/SimplePagination/SimplePagination.js +4 -5
- package/dist/components/SliderProgress/ProgressStep.js +1 -2
- package/dist/components/SliderProgress/SliderProgress.css.js +1 -1
- package/dist/components/SliderProgress/SliderProgress.js +1 -1
- package/dist/components/Stack/Divider.css.js +1 -1
- package/dist/components/Stack/Stack.js +1 -3
- package/dist/components/StandardModal/StandardModal.css.js +8 -8
- package/dist/components/StandardModal/StandardModal.js +4 -5
- package/dist/components/StarRating/StarRating.js +7 -8
- package/dist/components/Stepper/Stepper.css.js +4 -4
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +19 -10
- package/dist/components/StickyBox/StickyBox.css.js +4 -4
- package/dist/components/StickyBox/StickyBox.js +3 -3
- package/dist/components/Switch/Switch.css.js +18 -18
- package/dist/components/Switch/Switch.js +4 -5
- package/dist/components/Table/TableCell.css.js +1 -1
- package/dist/components/Table/TableHeadCell.css.js +5 -5
- package/dist/components/Table/TableHeadCell.js +1 -2
- package/dist/components/Tabs/Tab.css.js +4 -4
- package/dist/components/Tabs/Tab.js +2 -3
- package/dist/components/Tabs/TabList.css.js +1 -1
- package/dist/components/Tabs/TabList.js +1 -2
- package/dist/components/Tabs/TabPane.js +1 -1
- package/dist/components/Text/useTextStyles.css.js +2 -2
- package/dist/components/TextAreaInput/TextAreaInput.js +2 -2
- package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.js +14 -6
- package/dist/components/TextContainer/TextContainer.js +1 -2
- package/dist/components/TextInput/TextInput.js +2 -2
- package/dist/components/TextLink/TextLink.css.js +4 -4
- package/dist/components/TextLink/TextLink.js +3 -4
- package/dist/components/ThemeOverrideProvider/ThemeOverrideDebugger.js +1 -2
- package/dist/components/ThemeOverrideProvider/ThemeOverrideProvider.js +2 -2
- package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.d.ts.map +1 -1
- package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.js +5 -3
- package/dist/components/Toaster/Toast.css.js +1 -1
- package/dist/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/components/Toaster/Toast.js +24 -20
- package/dist/components/Tooltip/Tooltip.css.js +2 -2
- package/dist/components/Tooltip/Tooltip.js +1 -3
- package/dist/components/private/CheckableBase/CheckableBase.css.js +8 -8
- package/dist/components/private/CheckableBase/CheckableBase.js +1 -2
- package/dist/components/private/InputBase/HintText.css.js +1 -1
- package/dist/components/private/InputBase/NotchedBase.css.js +20 -20
- package/dist/components/private/InputBase/NotchedBase.js +1 -2
- package/dist/components/private/InputBase/withEnhancedInput.css.js +16 -16
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +3 -4
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts +1 -1
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts.map +1 -1
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +5 -5
- package/dist/hooks/useMedia/useMedia.js +4 -4
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +2 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +1 -1
- package/dist/hooks/useNullCheck/useNullCheck.js +1 -1
- package/dist/hooks/useWindowHeightFill/useWindowHeightFill.d.ts.map +1 -1
- package/dist/hooks/useWindowHeightFill/useWindowHeightFill.js +4 -3
- package/dist/reset/globalFonts.css.js +3 -3
- package/dist/reset/reset.css.js +2 -2
- package/dist/themes/base/tokens.js +3 -3
- package/dist/themes/flat_red/tokens.js +2 -2
- package/dist/themes/helpers.d.ts.map +1 -1
- package/dist/themes/helpers.js +2 -2
- package/dist/themes/makeTheme.js +3 -3
- package/dist/themes/neutral/tokens.js +3 -3
- package/dist/themes/theme.css.js +2 -2
- package/dist/utils/css.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +6 -5
- package/dist/utils/mapTokenToProperty.js +2 -2
- package/dist/utils/number.js +1 -1
- package/dist/utils/responsiveProps.css.d.ts.map +1 -1
- package/dist/utils/responsiveProps.css.js +2 -2
- package/dist/utils/responsiveStyle.js +3 -3
- package/package.json +118 -26
- package/dist/components/Actions/stories.js +0 -53
- package/dist/components/Alert/stories.js +0 -106
- package/dist/components/Anchor/stories.js +0 -65
- package/dist/components/AutoSuggest/stories.js +0 -213
- package/dist/components/Badge/stories.js +0 -64
- package/dist/components/Box/stories.js +0 -43
- package/dist/components/BulletList/stories.js +0 -72
- package/dist/components/BulletText/stories.js +0 -88
- package/dist/components/Button/stories.js +0 -291
- package/dist/components/CheckBox/stories.js +0 -206
- package/dist/components/ColourInput/stories.js +0 -173
- package/dist/components/Columns/stories.js +0 -209
- package/dist/components/DateInput/stories.js +0 -181
- package/dist/components/DatePicker/stories.js +0 -89
- package/dist/components/DividerLine/stories.js +0 -117
- package/dist/components/DropDown/stories.js +0 -117
- package/dist/components/EditableText/stories.js +0 -84
- package/dist/components/FillHeightBox/stories.js +0 -47
- package/dist/components/Flyout/stories.js +0 -88
- package/dist/components/Heading/stories.js +0 -127
- package/dist/components/HorizontalAutoScroller/stories.js +0 -88
- package/dist/components/Icon/stories.js +0 -62
- package/dist/components/Image/stories.js +0 -183
- package/dist/components/Inline/stories.js +0 -122
- package/dist/components/IntentStripe/stories.js +0 -76
- package/dist/components/LinearProgressIndicator/stories.js +0 -26
- package/dist/components/LoadingBox/stories.js +0 -41
- package/dist/components/Meta/stories.js +0 -45
- package/dist/components/MinimalModal/stories.js +0 -83
- package/dist/components/Modal/stories.js +0 -52
- package/dist/components/NumberBubble/stories.js +0 -23
- package/dist/components/NumberInput/stories.js +0 -218
- package/dist/components/OrderedList/stories.js +0 -58
- package/dist/components/OutsideClick/stories.js +0 -39
- package/dist/components/Pagination/stories.js +0 -112
- package/dist/components/Portal/stories.js +0 -72
- package/dist/components/Positioner/stories.js +0 -124
- package/dist/components/ProgressBar/stories.js +0 -44
- package/dist/components/ProgressBarGroup/stories.js +0 -21
- package/dist/components/ProgressSpinner/stories.js +0 -36
- package/dist/components/Radio/stories.js +0 -215
- package/dist/components/ScrollPane/stories.js +0 -55
- package/dist/components/Section/stories.js +0 -43
- package/dist/components/SelectInput/stories.js +0 -188
- package/dist/components/SimplePagination/stories.js +0 -42
- package/dist/components/SliderProgress/stories.js +0 -44
- package/dist/components/Stack/stories.js +0 -75
- package/dist/components/StandardModal/stories.js +0 -62
- package/dist/components/StarRating/stories.js +0 -50
- package/dist/components/Stepper/stories.js +0 -61
- package/dist/components/StickyBox/stories.js +0 -70
- package/dist/components/Switch/stories.js +0 -42
- package/dist/components/Table/stories.js +0 -302
- package/dist/components/Tabs/stories.js +0 -253
- package/dist/components/Text/stories.js +0 -154
- package/dist/components/TextAreaInput/stories.js +0 -129
- package/dist/components/TextBubble/stories.js +0 -30
- package/dist/components/TextContainer/stories.js +0 -128
- package/dist/components/TextInput/stories.js +0 -260
- package/dist/components/TextLink/stories.js +0 -111
- package/dist/components/Toaster/stories.js +0 -59
- package/dist/components/Tooltip/stories.js +0 -90
- package/dist/components/VisuallyHidden/stories.js +0 -36
- package/dist/hooks/useAttachedBoxes/stories.js +0 -94
- package/dist/hooks/useMedia/stories.js +0 -46
- package/dist/hooks/useResponsiveValue/stories.js +0 -38
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
const _excluded = ["top", "bottom", "noPopShadow", "zIndex", "className", "backgroundColour", "boxShadow", "children"];
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { useEffect, useState } from 'react';
|
|
@@ -28,7 +28,7 @@ export const StickyBox = _ref => {
|
|
|
28
28
|
const [withShadow, setWithShadow] = useState(false);
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
var _containerRef$current;
|
|
31
|
-
if (!((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.parentElement) || !
|
|
31
|
+
if (!((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.parentElement) || !globalThis) return void 0;
|
|
32
32
|
const parentElement = containerRef.current.parentElement;
|
|
33
33
|
const onScroll = () => {
|
|
34
34
|
setWithShadow(parentElement.scrollTop > 3);
|
|
@@ -9,14 +9,14 @@ const handleOffset = '3px';
|
|
|
9
9
|
const borderSize = '1px';
|
|
10
10
|
export const handle = styleVariants({
|
|
11
11
|
disabled: {
|
|
12
|
-
border:
|
|
12
|
+
border: `${borderSize} solid ${vars.colours.intent.primary.background.mild}`
|
|
13
13
|
},
|
|
14
14
|
default: {
|
|
15
|
-
borderSize:
|
|
16
|
-
top:
|
|
17
|
-
left:
|
|
18
|
-
width:
|
|
19
|
-
height:
|
|
15
|
+
borderSize: `${borderSize}`,
|
|
16
|
+
top: `calc(${handleOffset} - ${borderSize})`,
|
|
17
|
+
left: `calc(1.5 * ${handleOffset})`,
|
|
18
|
+
width: `calc(${handleSize} - (2 * ${handleOffset}))`,
|
|
19
|
+
height: `calc(${handleSize} - (2 * ${handleOffset}))`,
|
|
20
20
|
transition: 'transform 0.2s cubic-bezier(0, 0, 0.2, 1) 0s',
|
|
21
21
|
willChange: 'transform',
|
|
22
22
|
selectors: {
|
|
@@ -26,20 +26,20 @@ export const handle = styleVariants({
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
transition: {
|
|
29
|
-
transform:
|
|
29
|
+
transform: `translateX(calc(${handleSize} - (2 * ${handleOffset})))`,
|
|
30
30
|
selectors: {
|
|
31
31
|
'&:hover': {
|
|
32
|
-
transform:
|
|
32
|
+
transform: `translateX(calc(${handleSize} - (2 * ${handleOffset}))) scale(0.9)`
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}, "handle");
|
|
37
37
|
export const toggled = style({
|
|
38
|
-
border:
|
|
38
|
+
border: `${borderSize} solid ${vars.colours.intent.primary.background.strong}`,
|
|
39
39
|
backgroundColor: vars.colours.intent.primary.background.strong
|
|
40
40
|
}, "toggled");
|
|
41
41
|
export const untoggled = style({
|
|
42
|
-
border:
|
|
42
|
+
border: `${borderSize} solid color-mix(in oklch, ${vars.colours.intent.primary.background.standard}, transparent 60%)`,
|
|
43
43
|
backgroundColor: vars.colours.intent.primary.background.mild,
|
|
44
44
|
transition: '0.2s cubic-bezier(0, 0, 0.2, 1) 0s',
|
|
45
45
|
selectors: {
|
|
@@ -54,7 +54,7 @@ export const disabled = styleVariants({
|
|
|
54
54
|
selectors: {
|
|
55
55
|
'&[aria-disabled=true]': {
|
|
56
56
|
cursor: 'not-allowed',
|
|
57
|
-
border:
|
|
57
|
+
border: `${borderSize} solid ${vars.colours.intent.primary.background.mild}`,
|
|
58
58
|
backgroundColor: 'white'
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -63,23 +63,23 @@ export const disabled = styleVariants({
|
|
|
63
63
|
selectors: {
|
|
64
64
|
'&[aria-disabled=true]': {
|
|
65
65
|
cursor: 'not-allowed',
|
|
66
|
-
border:
|
|
66
|
+
border: `${borderSize} solid ${vars.colours.intent.primary.background.mild}`,
|
|
67
67
|
backgroundColor: 'white'
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}, "disabled");
|
|
72
72
|
export const focus = style({
|
|
73
|
-
outline:
|
|
73
|
+
outline: `calc(${handleOffset} - ${borderSize}) solid ${vars.colours.intent.brand.background.standard}`
|
|
74
74
|
}, "focus");
|
|
75
75
|
export const root = style({
|
|
76
|
-
width:
|
|
77
|
-
height:
|
|
78
|
-
top:
|
|
79
|
-
left:
|
|
76
|
+
width: `calc((2 * ${handleSize}) - 2 * ${borderSize})`,
|
|
77
|
+
height: `${handleSize}`,
|
|
78
|
+
top: `calc(${handleOffset} - ${borderSize})`,
|
|
79
|
+
left: `calc(1.5 * ${handleOffset})`,
|
|
80
80
|
transition: 'background-color 0.2s cubic-bezier(0, 0, 0.2, 1) 0s',
|
|
81
81
|
selectors: {
|
|
82
|
-
[
|
|
82
|
+
[`&:not(${disabled.default}):not(${disabled.toggled}):focus`]: {
|
|
83
83
|
borderColor: vars.colours.intent.information.background.standard
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
const _excluded = ["className", "disabled", "toggled", "isSelected", "isDisabled"];
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { useToggleState } from '@react-stately/toggle';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import * as React from 'react';
|
|
@@ -13,8 +13,7 @@ import { useSwitch, useFocusRing, VisuallyHidden } from 'react-aria';
|
|
|
13
13
|
import { Box, useBoxStyles } from "../Box/index.js";
|
|
14
14
|
import { useTextStyles } from "../Text/index.js";
|
|
15
15
|
import * as styles from "./Switch.css.js";
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
17
|
export const Switch = _ref => {
|
|
19
18
|
let {
|
|
20
19
|
className,
|
|
@@ -56,7 +55,7 @@ export const Switch = _ref => {
|
|
|
56
55
|
borderRadius: "pill",
|
|
57
56
|
position: "relative",
|
|
58
57
|
"aria-disabled": inputProps.disabled,
|
|
59
|
-
"aria-label":
|
|
58
|
+
"aria-label": `toggle ${state.isSelected ? 'on' : 'off'}`,
|
|
60
59
|
children: _jsx(Box, {
|
|
61
60
|
borderWidth: "1",
|
|
62
61
|
position: "absolute",
|
|
@@ -15,7 +15,7 @@ export const root = style({
|
|
|
15
15
|
bottom: 0,
|
|
16
16
|
left: '-1000%',
|
|
17
17
|
right: '-1000%',
|
|
18
|
-
transition:
|
|
18
|
+
transition: `background-color 0.2s ${vars.animation.easing.accelerate}`
|
|
19
19
|
},
|
|
20
20
|
selectors: {
|
|
21
21
|
'&:hover:before': {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
5
5
|
__vanilla_filescope__.setFileScope("lib/components/Table/TableHeadCell.css.ts", "@autoguru/overdrive");
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
9
9
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
10
10
|
export const sorterButton = style({
|
|
@@ -13,7 +13,7 @@ export const sorterButton = style({
|
|
|
13
13
|
export const text = style({
|
|
14
14
|
color: vars.typography.colour.muted,
|
|
15
15
|
selectors: {
|
|
16
|
-
[
|
|
16
|
+
[`${sorterButton}:hover &`]: {
|
|
17
17
|
color: vars.typography.colour.dark
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -29,7 +29,7 @@ export const sorter = _objectSpread({
|
|
|
29
29
|
color: vars.typography.colour.muted,
|
|
30
30
|
transitionTimingFunction: vars.animation.easing.standard,
|
|
31
31
|
selectors: {
|
|
32
|
-
[
|
|
32
|
+
[`${sorterButton}:hover &`]: {
|
|
33
33
|
color: vars.typography.colour.dark
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -40,7 +40,7 @@ export const sorter = _objectSpread({
|
|
|
40
40
|
transform: 'translateY(10%) rotateX(0)',
|
|
41
41
|
transitionProperty: 'transform, opacity',
|
|
42
42
|
selectors: {
|
|
43
|
-
[
|
|
43
|
+
[`${sorterButton}:hover &`]: {
|
|
44
44
|
opacity: '0.50',
|
|
45
45
|
transform: 'translateY(0px) rotateX(0)'
|
|
46
46
|
}
|
|
@@ -12,8 +12,7 @@ import { Text } from "../Text/index.js";
|
|
|
12
12
|
import { VisuallyHidden } from "../VisuallyHidden/index.js";
|
|
13
13
|
import * as styles from "./TableHeadCell.css.js";
|
|
14
14
|
import { useTableContext } from "./context.js";
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
const sortToAria = sort => {
|
|
18
17
|
if (sort === 'asc') return 'ascending';
|
|
19
18
|
if (sort === 'desc') return 'descending';
|
|
@@ -8,9 +8,9 @@ const lineBottomHeight = '1px';
|
|
|
8
8
|
const size = '20px';
|
|
9
9
|
export const root = {
|
|
10
10
|
default: style({
|
|
11
|
-
padding:
|
|
12
|
-
transition:
|
|
13
|
-
borderBottom:
|
|
11
|
+
padding: `calc(${vars.space['3']} + ${lineBottomHeight}) 0`,
|
|
12
|
+
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s, background-color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
13
|
+
borderBottom: `calc(${lineBottomHeight} + ${lineBottomHeight}) solid transparent`,
|
|
14
14
|
flex: 'auto',
|
|
15
15
|
':last-of-type': {
|
|
16
16
|
marginRight: 0
|
|
@@ -38,7 +38,7 @@ export const indication = styleVariants({
|
|
|
38
38
|
minWidth: size,
|
|
39
39
|
height: size,
|
|
40
40
|
lineHeight: size,
|
|
41
|
-
transition:
|
|
41
|
+
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s, backgroundColor 0.2s ${vars.animation.easing.decelerate} 0s`
|
|
42
42
|
},
|
|
43
43
|
active: {
|
|
44
44
|
backgroundColor: vars.colours.intent.primary.background.strong
|
|
@@ -10,8 +10,7 @@ import { Text, useTextStyles } from "../Text/index.js";
|
|
|
10
10
|
import * as styles from "./Tab.css.js";
|
|
11
11
|
import { TabListContext } from "./TabList.js";
|
|
12
12
|
import { TabsContext } from "./Tabs.js";
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
14
|
export const Tab = forwardRef((_ref, ref) => {
|
|
16
15
|
let {
|
|
17
16
|
children,
|
|
@@ -28,7 +27,7 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
28
27
|
paddingX: '1',
|
|
29
28
|
borderRadius: 'pill'
|
|
30
29
|
});
|
|
31
|
-
const controlsId = typeof incomingId === 'string' ? incomingId :
|
|
30
|
+
const controlsId = typeof incomingId === 'string' ? incomingId : `${tabsContext.id}-${tabListContext}-tab`;
|
|
32
31
|
const props = {
|
|
33
32
|
className: clsx(useBoxStyles({
|
|
34
33
|
is: typeof Component === 'string' ? Component : 'button',
|
|
@@ -6,7 +6,7 @@ import { style, styleVariants } from '@vanilla-extract/css';
|
|
|
6
6
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
7
7
|
export const root = styleVariants({
|
|
8
8
|
default: {
|
|
9
|
-
boxShadow:
|
|
9
|
+
boxShadow: `inset 0 -1px 0 0 ${vars.border.colours.gray}`
|
|
10
10
|
},
|
|
11
11
|
scroll: {
|
|
12
12
|
display: 'grid',
|
|
@@ -11,8 +11,7 @@ import { Button } from "../Button/index.js";
|
|
|
11
11
|
import { Icon } from "../Icon/index.js";
|
|
12
12
|
import { useTextStyles } from "../Text/index.js";
|
|
13
13
|
import * as styles from "./TabList.css.js";
|
|
14
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
15
|
export const TabListContext = createContext(null);
|
|
17
16
|
export const TabList = _ref => {
|
|
18
17
|
let {
|
|
@@ -20,7 +20,7 @@ export const TabPane = _ref => {
|
|
|
20
20
|
paneIndex,
|
|
21
21
|
renderInactive
|
|
22
22
|
} = tabPanesContext;
|
|
23
|
-
const myId = typeof incomingId === 'string' ? incomingId :
|
|
23
|
+
const myId = typeof incomingId === 'string' ? incomingId : `${tabsContext.id}-${paneIndex}-tab`;
|
|
24
24
|
const isActive = tabsContext.activeIndex === paneIndex;
|
|
25
25
|
return _jsx(Box, {
|
|
26
26
|
display: isActive ? undefined : 'none',
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
5
5
|
__vanilla_filescope__.setFileScope("lib/components/Text/useTextStyles.css.ts", "@autoguru/overdrive");
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
9
9
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
10
10
|
import { mapTokenToProperty } from "../../utils/mapTokenToProperty.js";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
const _excluded = ["field", "eventHandlers", "validation", "isLoading", "suffixed", "prefixed", "size"];
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { Box } from "../Box/index.js";
|
|
10
10
|
import { withEnhancedInput } from "../private/InputBase/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEnE,OAAO,EAAE,GAAG,EAAgB,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,MAAM,WAAW,KAChB,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,cAAc,GAAG,UAAU,GAAG,SAAS,CACvC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CACnD;AAaD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEnE,OAAO,EAAE,GAAG,EAAgB,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,MAAM,WAAW,KAChB,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,cAAc,GAAG,UAAU,GAAG,SAAS,CACvC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CACnD;AAaD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,KAAK,CAoD/C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
const _excluded = ["textColour", "rawNumbers", "label"];
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { useMemo } from 'react';
|
|
@@ -29,13 +29,21 @@ export const TextBubble = _ref => {
|
|
|
29
29
|
const size = label.length;
|
|
30
30
|
switch (size) {
|
|
31
31
|
case 1:
|
|
32
|
-
|
|
32
|
+
{
|
|
33
|
+
return 'SMALL';
|
|
34
|
+
}
|
|
33
35
|
case 2:
|
|
34
|
-
|
|
36
|
+
{
|
|
37
|
+
return 'MEDIUM';
|
|
38
|
+
}
|
|
35
39
|
case 3:
|
|
36
|
-
|
|
40
|
+
{
|
|
41
|
+
return 'LARGE';
|
|
42
|
+
}
|
|
37
43
|
default:
|
|
38
|
-
|
|
44
|
+
{
|
|
45
|
+
return 'X_LARGE';
|
|
46
|
+
}
|
|
39
47
|
}
|
|
40
48
|
}, [label]);
|
|
41
49
|
return _jsx(Box, _objectSpread(_objectSpread({
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Column, Columns } from "../Columns/index.js";
|
|
5
5
|
import { Stack } from "../Stack/index.js";
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
7
|
export const TextContainer = _ref => {
|
|
9
8
|
let {
|
|
10
9
|
heading,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
const _excluded = ["field", "eventHandlers", "validation", "suffixed", "prefixed", "isLoading", "size"];
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { Box } from "../Box/index.js";
|
|
10
10
|
import { withEnhancedInput } from "../private/InputBase/index.js";
|
|
@@ -9,13 +9,13 @@ export const root = style({
|
|
|
9
9
|
transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
10
10
|
transitionDuration: '0.2s',
|
|
11
11
|
transitionProperty: 'box-shadow',
|
|
12
|
-
boxShadow:
|
|
12
|
+
boxShadow: `inset 0 0px 0 0 ${vars.typography.colour.link}`,
|
|
13
13
|
':hover': {
|
|
14
|
-
boxShadow:
|
|
14
|
+
boxShadow: `inset 0 -2px 0 0 ${vars.typography.colour.link}`
|
|
15
15
|
}
|
|
16
16
|
}, "root");
|
|
17
17
|
export const icon = style({
|
|
18
|
-
transition:
|
|
18
|
+
transition: `transform 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
19
19
|
right: 0,
|
|
20
20
|
top: '50%',
|
|
21
21
|
transform: 'translateY(-50%)'
|
|
@@ -23,7 +23,7 @@ export const icon = style({
|
|
|
23
23
|
export const muted = style({
|
|
24
24
|
':hover': {
|
|
25
25
|
color: 'white',
|
|
26
|
-
boxShadow:
|
|
26
|
+
boxShadow: `inset 0 -1.6em 0 0 ${vars.typography.colour.link}`
|
|
27
27
|
}
|
|
28
28
|
}, "muted");
|
|
29
29
|
__vanilla_filescope__.endFileScope();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
5
|
const _excluded = ["is", "children", "className", "strong", "fontWeight", "muted", "size", "icon"];
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { invariant } from '@autoguru/utilities';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import * as React from 'react';
|
|
@@ -13,8 +13,7 @@ import { Box, useBoxStyles } from "../Box/index.js";
|
|
|
13
13
|
import { Icon } from "../Icon/index.js";
|
|
14
14
|
import { Text } from "../Text/index.js";
|
|
15
15
|
import * as styles from "./TextLink.css.js";
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
17
|
export const TextLink = forwardRef((_ref, ref) => {
|
|
19
18
|
var _props$rel;
|
|
20
19
|
let {
|
|
@@ -8,8 +8,7 @@ import { Column, Columns } from "../Columns/index.js";
|
|
|
8
8
|
import { Stack } from "../Stack/index.js";
|
|
9
9
|
import { Text } from "../Text/index.js";
|
|
10
10
|
import { useThemeOverrides } from "./ThemeOverrideProvider.js";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
export const ThemeOverrideDebugger = () => {
|
|
14
13
|
const {
|
|
15
14
|
theme,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { createContext, useContext, useEffect, useMemo } from 'react';
|
|
8
8
|
import { useBuildThemeOverrides } from "./useBuildThemeOverrides.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBuildThemeOverrides.d.ts","sourceRoot":"","sources":["../../../lib/components/ThemeOverrideProvider/useBuildThemeOverrides.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA2C,MAAM,OAAO,CAAC;AAKhF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,UAAU,KACT,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,qBAAqB,CAAC,EAC5C,OAAO,GAAG,UAAU,CACpB;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,KAAK,OAAO,GAAG,IAAI,CAClB,oBAAoB,EAClB,gBAAgB,GAChB,yBAAyB,GACzB,yBAAyB,GACzB,qBAAqB,GACrB,6BAA6B,GAC7B,+BAA+B,GAC/B,gBAAgB,CAClB,CAAC;AAOF,MAAM,WAAW,cAAc;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;
|
|
1
|
+
{"version":3,"file":"useBuildThemeOverrides.d.ts","sourceRoot":"","sources":["../../../lib/components/ThemeOverrideProvider/useBuildThemeOverrides.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA2C,MAAM,OAAO,CAAC;AAKhF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,UAAU,KACT,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,qBAAqB,CAAC,EAC5C,OAAO,GAAG,UAAU,CACpB;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,KAAK,OAAO,GAAG,IAAI,CAClB,oBAAoB,EAClB,gBAAgB,GAChB,yBAAyB,GACzB,yBAAyB,GACzB,qBAAqB,GACrB,6BAA6B,GAC7B,+BAA+B,GAC/B,gBAAgB,CAClB,CAAC;AAOF,MAAM,WAAW,cAAc;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,6BAA6B,CAAC,EAAE,MAAM,CAAC;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAiBD,eAAO,MAAM,sBAAsB,4TAShC,KAAK,KAAG,OA+GV,CAAC"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
5
|
const _excluded = ["primaryColourBorder", "primaryColourForeground", "primaryColourBackgroundStrong", "primaryColourBackgroundMild", "primaryColourBackground"];
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
|
9
9
|
import { useEffect, useMemo, useReducer } from 'react';
|
|
10
10
|
import { tokens } from "../../themes/base/tokens.js";
|
|
@@ -17,7 +17,9 @@ const reducer = (prevState, action) => {
|
|
|
17
17
|
return _objectSpread(_objectSpread({}, prevState), action.payload);
|
|
18
18
|
}
|
|
19
19
|
default:
|
|
20
|
-
|
|
20
|
+
{
|
|
21
|
+
return prevState;
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
24
|
};
|
|
23
25
|
export const useBuildThemeOverrides = _ref => {
|
|
@@ -9,7 +9,7 @@ export const root = style({
|
|
|
9
9
|
justifyItems: 'center',
|
|
10
10
|
top: vars.space['3'],
|
|
11
11
|
left: '50vw',
|
|
12
|
-
transition:
|
|
12
|
+
transition: `translateX .400s ${vars.animation.easing.standard}`,
|
|
13
13
|
transform: 'translateX(-50%)'
|
|
14
14
|
}, "root");
|
|
15
15
|
export const alert = style({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../lib/components/Toaster/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,cAAc,EAEd,iBAAiB,EACjB,SAAS,EAOT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAOjC,KAAK,WAAW,GAAG,SAAS,CAAC;AAC7B,KAAK,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEpE,UAAU,aAAa;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAID,UAAU,OACT,SAAQ,QAAQ,CACf,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,CACtE;IACD,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../lib/components/Toaster/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,cAAc,EAEd,iBAAiB,EACjB,SAAS,EAOT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAOjC,KAAK,WAAW,GAAG,SAAS,CAAC;AAC7B,KAAK,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEpE,UAAU,aAAa;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAID,UAAU,OACT,SAAQ,QAAQ,CACf,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,CACtE;IACD,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AA6ED,eAAO,MAAM,aAAa;;uBAQzB,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,OAwE3B,CAAC;AAEF,QAAA,MAAM,KAAK,EAAE,iBAAiB,CAC7B,aAAa,GAAG;IACf,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,CA2BD,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
-
function ownKeys(
|
|
6
|
-
function _objectSpread(
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
import { invariant } from '@autoguru/utilities';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { createContext, useCallback, useContext, useLayoutEffect, useMemo, useReducer } from 'react';
|
|
@@ -13,34 +13,38 @@ import { Box } from "../Box/index.js";
|
|
|
13
13
|
import { Portal } from "../Portal/index.js";
|
|
14
14
|
import { Stack } from "../Stack/index.js";
|
|
15
15
|
import * as styles from "./Toast.css.js";
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
|
|
18
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
-
var ActionTypes;
|
|
20
|
-
(function (ActionTypes) {
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
+
var ActionTypes = function (ActionTypes) {
|
|
21
18
|
ActionTypes[ActionTypes["ADD"] = 0] = "ADD";
|
|
22
19
|
ActionTypes[ActionTypes["REMOVE"] = 1] = "REMOVE";
|
|
23
|
-
|
|
20
|
+
return ActionTypes;
|
|
21
|
+
}(ActionTypes || {});
|
|
24
22
|
const DEFAULT_DURATION = 5e3;
|
|
25
23
|
let ids = -1;
|
|
26
24
|
const getNewId = () => ++ids;
|
|
27
25
|
const reducer = (state, action) => {
|
|
28
26
|
switch (action.type) {
|
|
29
27
|
case ActionTypes.ADD:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
{
|
|
29
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
30
|
+
toasts: [].concat(_toConsumableArray(state.toasts), [action.config])
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
33
|
case ActionTypes.REMOVE:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
{
|
|
35
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
36
|
+
toasts: state.toasts.filter(_ref => {
|
|
37
|
+
let {
|
|
38
|
+
id
|
|
39
|
+
} = _ref;
|
|
40
|
+
return id !== action.id;
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
42
44
|
default:
|
|
43
|
-
|
|
45
|
+
{
|
|
46
|
+
return state;
|
|
47
|
+
}
|
|
44
48
|
}
|
|
45
49
|
};
|
|
46
50
|
const ToastControllerContext = createContext(null);
|