@autoguru/overdrive 4.11.2 → 4.11.4
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/Actions/stories.js +0 -5
- package/dist/components/Alert/Alert.css.d.ts +1 -2
- package/dist/components/Alert/Alert.css.d.ts.map +1 -1
- package/dist/components/Alert/Alert.css.js +8 -21
- package/dist/components/Alert/Alert.d.ts +2 -2
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +10 -4
- package/dist/components/Alert/stories.js +0 -10
- package/dist/components/Anchor/Anchor.css.js +0 -3
- package/dist/components/Anchor/Anchor.js +0 -2
- package/dist/components/Anchor/stories.js +0 -9
- package/dist/components/AutoSuggest/AutoSuggest.css.js +0 -3
- package/dist/components/AutoSuggest/AutoSuggest.js +56 -102
- package/dist/components/AutoSuggest/stories.js +1 -31
- package/dist/components/AutoSuggest/useLayoutSuggestionVisible.js +0 -2
- package/dist/components/Badge/Badge.css.js +0 -3
- package/dist/components/Badge/stories.js +0 -12
- package/dist/components/Box/Box.js +53 -57
- package/dist/components/Box/argTypes.d.ts.map +1 -1
- package/dist/components/Box/argTypes.js +0 -3
- package/dist/components/Box/stories.js +0 -5
- package/dist/components/Box/useBoxStyles.css.d.ts.map +1 -1
- package/dist/components/Box/useBoxStyles.css.js +0 -8
- package/dist/components/Box/useBoxStyles.d.ts.map +1 -1
- package/dist/components/BulletList/Bullet.css.d.ts +1 -1
- package/dist/components/BulletList/Bullet.css.js +0 -3
- package/dist/components/BulletList/Bullet.js +0 -6
- package/dist/components/BulletList/BulletList.css.js +0 -3
- package/dist/components/BulletList/stories.js +0 -6
- package/dist/components/BulletText/BulletText.css.js +0 -3
- package/dist/components/BulletText/stories.js +0 -5
- package/dist/components/Button/Button.css.js +0 -3
- package/dist/components/Button/Button.js +0 -11
- package/dist/components/Button/stories.js +0 -6
- package/dist/components/CheckBox/CheckBox.css.js +0 -3
- package/dist/components/CheckBox/stories.js +3 -11
- package/dist/components/ColourInput/ColourInput.css.js +0 -3
- package/dist/components/ColourInput/ColourInput.js +9 -13
- package/dist/components/ColourInput/stories.js +1 -26
- package/dist/components/Columns/Column.css.js +0 -5
- package/dist/components/Columns/Column.d.ts +1 -1
- package/dist/components/Columns/Column.js +10 -14
- package/dist/components/Columns/Columns.css.js +0 -3
- package/dist/components/Columns/Columns.d.ts +1 -1
- package/dist/components/Columns/Columns.js +11 -15
- package/dist/components/Columns/stories.js +0 -6
- package/dist/components/DateInput/DateInput.js +9 -13
- package/dist/components/DateInput/stories.js +1 -28
- package/dist/components/DatePicker/DatePicker.css.js +0 -3
- package/dist/components/DatePicker/DatePicker.js +8 -13
- package/dist/components/DatePicker/stories.js +0 -5
- package/dist/components/DividerLine/DividerLine.css.d.ts +0 -5
- package/dist/components/DividerLine/DividerLine.css.d.ts.map +1 -1
- package/dist/components/DividerLine/DividerLine.css.js +1 -31
- package/dist/components/DividerLine/DividerLine.d.ts +2 -1
- package/dist/components/DividerLine/DividerLine.d.ts.map +1 -1
- package/dist/components/DividerLine/DividerLine.js +2 -1
- package/dist/components/DividerLine/stories.js +0 -9
- package/dist/components/Flyout/Flyout.js +7 -11
- package/dist/components/Flyout/stories.js +1 -9
- package/dist/components/Heading/stories.js +0 -7
- package/dist/components/Icon/Icon.css.js +0 -3
- package/dist/components/Icon/stories.js +0 -11
- package/dist/components/Image/Image.js +3 -7
- package/dist/components/Image/ResponsiveImage.js +6 -10
- package/dist/components/Image/SimpleImage.js +7 -11
- package/dist/components/Image/stories.js +0 -13
- package/dist/components/Inline/Inline.js +0 -6
- package/dist/components/Inline/stories.js +0 -6
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.css.js +0 -3
- package/dist/components/LinearProgressIndicator/stories.js +0 -5
- package/dist/components/LoadingBox/LoadingBox.css.js +0 -3
- package/dist/components/LoadingBox/LoadingBox.js +8 -14
- package/dist/components/LoadingBox/stories.js +0 -5
- package/dist/components/Meta/Meta.css.js +0 -3
- package/dist/components/Meta/stories.js +0 -5
- package/dist/components/MinimalModal/MinimalModal.css.js +0 -3
- package/dist/components/MinimalModal/MinimalModal.js +0 -2
- package/dist/components/MinimalModal/stories.js +0 -11
- package/dist/components/Modal/Modal.css.d.ts.map +1 -1
- package/dist/components/Modal/Modal.css.js +0 -5
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +5 -18
- package/dist/components/Modal/stories.js +0 -5
- package/dist/components/NumberBubble/NumberBubble.css.js +0 -3
- package/dist/components/NumberBubble/NumberBubble.js +5 -9
- package/dist/components/NumberBubble/stories.js +0 -5
- package/dist/components/NumberInput/NumberInput.js +14 -20
- package/dist/components/NumberInput/stories.js +1 -28
- package/dist/components/OrderedList/OrderedList.css.js +0 -3
- package/dist/components/OrderedList/OrderedList.js +0 -4
- package/dist/components/OrderedList/stories.js +0 -5
- package/dist/components/OutsideClick/OutsideClick.js +0 -3
- package/dist/components/OutsideClick/stories.js +0 -6
- package/dist/components/OverdriveProvider/OverdriveProvider.js +0 -1
- package/dist/components/Pagination/Pagination.css.js +0 -3
- package/dist/components/Pagination/Pagination.js +0 -20
- package/dist/components/Pagination/stories.js +0 -25
- package/dist/components/Portal/Portal.js +0 -7
- package/dist/components/Portal/stories.js +0 -9
- package/dist/components/Positioner/Positioner.css.js +0 -3
- package/dist/components/Positioner/Positioner.js +7 -19
- package/dist/components/Positioner/alignment.js +0 -1
- package/dist/components/Positioner/stories.js +1 -13
- package/dist/components/ProgressBar/ProgressBar.css.js +0 -3
- package/dist/components/ProgressBar/stories.js +0 -6
- package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +0 -3
- package/dist/components/ProgressBarGroup/stories.js +0 -5
- package/dist/components/ProgressSpinner/ProgressSpinner.css.js +0 -3
- package/dist/components/ProgressSpinner/stories.js +0 -5
- package/dist/components/Radio/Radio.css.js +0 -3
- package/dist/components/Radio/Radio.js +0 -3
- package/dist/components/Radio/stories.js +8 -17
- package/dist/components/Section/Section.css.js +0 -3
- package/dist/components/Section/stories.js +0 -5
- package/dist/components/SelectInput/SelectInput.css.js +0 -3
- package/dist/components/SelectInput/SelectInput.js +10 -14
- package/dist/components/SelectInput/stories.js +1 -26
- package/dist/components/SimplePagination/SimplePagination.js +0 -4
- package/dist/components/SimplePagination/stories.js +0 -9
- package/dist/components/Stack/Divider.css.js +0 -3
- package/dist/components/Stack/Stack.css.js +0 -3
- package/dist/components/Stack/Stack.js +0 -2
- package/dist/components/Stack/stories.js +0 -11
- package/dist/components/StandardModal/StandardModal.css.js +0 -5
- package/dist/components/StandardModal/StandardModal.js +0 -4
- package/dist/components/StandardModal/stories.js +0 -5
- package/dist/components/StarRating/StarRating.css.js +0 -3
- package/dist/components/StarRating/StarRating.js +0 -12
- package/dist/components/StarRating/stories.js +0 -5
- package/dist/components/Stepper/Stepper.css.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.css.js +1 -5
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +4 -8
- package/dist/components/Stepper/stories.js +4 -12
- package/dist/components/Switch/Switch.css.js +0 -3
- package/dist/components/Switch/Switch.js +0 -1
- package/dist/components/Switch/stories.js +4 -16
- package/dist/components/Table/Table.css.js +0 -3
- package/dist/components/Table/TableCell.css.js +0 -3
- package/dist/components/Table/TableCell.js +0 -1
- package/dist/components/Table/TableHeadCell.css.js +0 -5
- package/dist/components/Table/TableHeadCell.js +0 -6
- package/dist/components/Table/stories.js +0 -7
- package/dist/components/Tabs/Tab.css.js +0 -3
- package/dist/components/Tabs/Tab.js +0 -3
- package/dist/components/Tabs/TabList.css.js +0 -3
- package/dist/components/Tabs/TabList.js +0 -7
- package/dist/components/Tabs/TabPane.css.js +0 -3
- package/dist/components/Tabs/TabPanes.css.js +0 -3
- package/dist/components/Tabs/stories.js +0 -7
- package/dist/components/Text/stories.js +0 -10
- package/dist/components/Text/useTextStyles.css.js +0 -5
- package/dist/components/TextAreaInput/TextAreaInput.js +9 -13
- package/dist/components/TextAreaInput/stories.js +1 -23
- package/dist/components/TextBubble/TextBubble.css.js +0 -3
- package/dist/components/TextBubble/TextBubble.js +5 -13
- package/dist/components/TextBubble/stories.js +0 -5
- package/dist/components/TextContainer/TextContainer.js +0 -2
- package/dist/components/TextContainer/stories.js +0 -5
- package/dist/components/TextInput/TextInput.js +9 -14
- package/dist/components/TextInput/stories.js +1 -38
- package/dist/components/TextLink/TextLink.css.js +0 -3
- package/dist/components/TextLink/TextLink.js +9 -18
- package/dist/components/TextLink/stories.js +0 -6
- package/dist/components/ThemeOverrideProvider/ThemeOverrideProvider.js +0 -3
- package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.js +7 -15
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +5 -4
- package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/components/Toaster/Toast.css.js +0 -3
- package/dist/components/Toaster/Toast.js +0 -27
- package/dist/components/Tooltip/Tooltip.css.js +0 -5
- package/dist/components/Tooltip/Tooltip.js +0 -1
- package/dist/components/Tooltip/stories.js +0 -5
- package/dist/components/VisuallyHidden/VisuallyHidden.css.js +0 -3
- package/dist/components/VisuallyHidden/stories.js +0 -5
- package/dist/components/private/CheckableBase/CheckableBase.css.js +0 -3
- package/dist/components/private/CheckableBase/CheckableBase.js +0 -2
- package/dist/components/private/InputBase/HintText.css.js +0 -3
- package/dist/components/private/InputBase/InputState.css.js +0 -3
- package/dist/components/private/InputBase/NotchedBase.css.js +0 -6
- package/dist/components/private/InputBase/NotchedBase.js +0 -1
- package/dist/components/private/InputBase/withEnhancedInput.css.js +0 -3
- package/dist/components/private/InputBase/withEnhancedInput.js +28 -39
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.css.js +0 -3
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +4 -12
- package/dist/hooks/useMedia/stories.js +0 -1
- package/dist/hooks/useMedia/useMedia.js +0 -4
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +0 -3
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +0 -3
- package/dist/hooks/useResponsiveValue/stories.js +0 -1
- package/dist/reset/globalFonts.css.js +0 -3
- package/dist/reset/globalReset.css.js +0 -3
- package/dist/reset/reset.css.js +0 -5
- package/dist/themes/base/index.d.ts +177 -177
- package/dist/themes/base/tokens.js +0 -3
- package/dist/themes/base/vars.css.js +0 -3
- package/dist/themes/flat_red/index.d.ts +177 -177
- package/dist/themes/flat_red/tokens.js +0 -3
- package/dist/themes/flat_red/vars.css.js +0 -3
- package/dist/themes/helpers.js +0 -2
- package/dist/themes/makeTheme.js +0 -3
- package/dist/themes/neutral/index.d.ts +177 -177
- package/dist/themes/neutral/tokens.js +0 -3
- package/dist/themes/neutral/vars.css.js +0 -3
- package/dist/themes/theme.css.d.ts +177 -177
- package/dist/themes/theme.css.d.ts.map +1 -1
- package/dist/themes/theme.css.js +0 -5
- package/dist/themes/tokens.d.ts +3 -1
- package/dist/themes/tokens.d.ts.map +1 -1
- package/dist/utils/index.js +0 -13
- package/dist/utils/mapTokenToProperty.js +0 -3
- package/dist/utils/resolveResponsiveProps.js +0 -6
- package/dist/utils/responsiveProps.css.js +0 -5
- package/dist/utils/responsiveStyle.d.ts +2 -2
- package/dist/utils/responsiveStyle.d.ts.map +1 -1
- package/dist/utils/responsiveStyle.js +0 -6
- package/package.json +1 -1
- package/readme.md +1 -2
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/components/private/CheckableBase/CheckableBase.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
8
6
|
import { themeContractVars as vars } from "../../../themes/theme.css.js";
|
|
9
7
|
export const root = style({
|
|
@@ -50,5 +48,4 @@ export const disabled = style({
|
|
|
50
48
|
opacity: 0.6,
|
|
51
49
|
pointerEvents: 'none'
|
|
52
50
|
}, "disabled");
|
|
53
|
-
|
|
54
51
|
__vanilla_filescope__.endFileScope();
|
|
@@ -21,13 +21,11 @@ export const CheckableBase = forwardRef((_ref, ref) => {
|
|
|
21
21
|
handleClick,
|
|
22
22
|
handleChange
|
|
23
23
|
} = _ref;
|
|
24
|
-
|
|
25
24
|
const onChange = e => {
|
|
26
25
|
if (typeof handleChange === 'function') {
|
|
27
26
|
handleChange(e.currentTarget.checked);
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
const nakedLabel = ['string', 'number'].includes(typeof label);
|
|
32
30
|
return _jsxs(Box, {
|
|
33
31
|
display: "flex",
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/components/private/InputBase/HintText.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { style } from '@vanilla-extract/css';
|
|
8
6
|
import { themeContractVars as vars } from "../../../themes/theme.css.js";
|
|
9
7
|
export const hintText = style({
|
|
10
8
|
transition: "color 0.2s ".concat(vars.animation.easing.decelerate, " 0s")
|
|
11
9
|
}, "hintText");
|
|
12
|
-
|
|
13
10
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/components/private/InputBase/InputState.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
8
6
|
import { themeContractVars as vars } from "../../../themes/theme.css.js";
|
|
9
7
|
const activeColour = style({
|
|
@@ -104,5 +102,4 @@ export const error = {
|
|
|
104
102
|
}, "error_active_borderColour")
|
|
105
103
|
}
|
|
106
104
|
};
|
|
107
|
-
|
|
108
105
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/components/private/InputBase/NotchedBase.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
8
6
|
import { themeContractVars as vars } from "../../../themes/theme.css.js";
|
|
9
7
|
export const root = style({
|
|
@@ -135,15 +133,12 @@ export const placeholder = styleVariants({
|
|
|
135
133
|
}
|
|
136
134
|
}, "placeholder");
|
|
137
135
|
const active_scaling_factor = 0.7777;
|
|
138
|
-
|
|
139
136
|
const calcPlaceholderTranslate = (notched, prefixed, size) => {
|
|
140
137
|
if (notched) {
|
|
141
138
|
return "calc(".concat(vars.space['2'], " + ").concat(vars.space['2'], "), calc(-0.5 * ").concat(active_scaling_factor, " * ").concat(vars.typography.size['4'].fontSize, ")");
|
|
142
139
|
}
|
|
143
|
-
|
|
144
140
|
return size === 'medium' ? "".concat(prefixed ? "calc(".concat(vars.space['7'], " + ").concat(vars.space['3'], ")") : vars.typography.size['4'].fontSize, ", calc((").concat(vars.space['8'], " - ").concat(vars.typography.size['4'].fontSize, ") / 2)") : "".concat(prefixed ? "calc(".concat(vars.space['2'], " + ").concat(vars.space['5'], " + ").concat(vars.space['2'], ")") : vars.space['2'], ", calc(").concat(vars.space['2'], " + 2px)");
|
|
145
141
|
};
|
|
146
|
-
|
|
147
142
|
export const placeholderPlacement = {
|
|
148
143
|
small: styleVariants({
|
|
149
144
|
default: {
|
|
@@ -170,5 +165,4 @@ export const placeholderPlacement = {
|
|
|
170
165
|
}
|
|
171
166
|
}, "placeholderPlacement_medium")
|
|
172
167
|
};
|
|
173
|
-
|
|
174
168
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/components/private/InputBase/withEnhancedInput.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
8
6
|
import { themeContractVars as vars } from "../../../themes/theme.css.js";
|
|
9
7
|
export const input = {
|
|
@@ -127,5 +125,4 @@ export const iconSize = styleVariants({
|
|
|
127
125
|
margin: "0 calc(".concat(vars.space['3'], " - 1px)")
|
|
128
126
|
}
|
|
129
127
|
}, "iconSize");
|
|
130
|
-
|
|
131
128
|
__vanilla_filescope__.endFileScope();
|
|
@@ -3,11 +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 = ["placeholder", "name", "id", "hintText", "disabled", "className", "isTouched", "isValid", "isLoading", "notch", "reserveHintSpace", "size", "value", "onChange", "onReset", "onMouseLeave", "onMouseEnter", "onBlur", "onFocus", "onKeyDown", "prefixIcon", "suffixIcon", "wrapperRef", "autoFocus", "attach", "borderMerged"];
|
|
6
|
-
|
|
7
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
-
|
|
9
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
-
|
|
11
8
|
import { invariant, wrapEvent } from '@autoguru/utilities';
|
|
12
9
|
import clsx from 'clsx';
|
|
13
10
|
import * as React from 'react';
|
|
@@ -34,35 +31,34 @@ export const withEnhancedInput = function (WrappingComponent) {
|
|
|
34
31
|
};
|
|
35
32
|
return forwardRef((_ref, ref) => {
|
|
36
33
|
let {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
34
|
+
placeholder,
|
|
35
|
+
name,
|
|
36
|
+
id = name,
|
|
37
|
+
hintText,
|
|
38
|
+
disabled = false,
|
|
39
|
+
className,
|
|
40
|
+
isTouched,
|
|
41
|
+
isValid,
|
|
42
|
+
isLoading = false,
|
|
43
|
+
notch = true,
|
|
44
|
+
reserveHintSpace = false,
|
|
45
|
+
size = 'medium',
|
|
46
|
+
value: incomingValue = defaultValue || '',
|
|
47
|
+
onChange: incomingOnChange,
|
|
48
|
+
onReset,
|
|
49
|
+
onMouseLeave,
|
|
50
|
+
onMouseEnter,
|
|
51
|
+
onBlur,
|
|
52
|
+
onFocus,
|
|
53
|
+
onKeyDown,
|
|
54
|
+
prefixIcon,
|
|
55
|
+
suffixIcon,
|
|
56
|
+
wrapperRef,
|
|
57
|
+
autoFocus,
|
|
58
|
+
attach,
|
|
59
|
+
borderMerged
|
|
60
|
+
} = _ref,
|
|
61
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
66
62
|
!!(prefixIcon && !withPrefixIcon) ? process.env.NODE_ENV !== "production" ? invariant(false, 'prefix icon is not supported for this component') : invariant(false) : void 0;
|
|
67
63
|
!!(suffixIcon && !withSuffixIcon) ? process.env.NODE_ENV !== "production" ? invariant(false, 'suffix icon is not supported for this component') : invariant(false) : void 0;
|
|
68
64
|
const [value, onChange] = useInputControlledState(incomingValue, incomingOnChange);
|
|
@@ -87,7 +83,6 @@ export const withEnhancedInput = function (WrappingComponent) {
|
|
|
87
83
|
[styles.inputItselfSize[size].suffixed.any]: Boolean(suffixIcon || isLoading),
|
|
88
84
|
[styles.inputItselfSize[size].suffixed[primitiveType]]: Boolean(suffixIcon || isLoading)
|
|
89
85
|
});
|
|
90
|
-
|
|
91
86
|
const wrappingComponent = _objectSpread({
|
|
92
87
|
validation: {
|
|
93
88
|
isTouched,
|
|
@@ -100,7 +95,6 @@ export const withEnhancedInput = function (WrappingComponent) {
|
|
|
100
95
|
event.preventDefault();
|
|
101
96
|
return false;
|
|
102
97
|
}
|
|
103
|
-
|
|
104
98
|
return true;
|
|
105
99
|
}, onChange),
|
|
106
100
|
onFocus: wrapEvent(() => setActive(true), onFocus),
|
|
@@ -125,7 +119,6 @@ export const withEnhancedInput = function (WrappingComponent) {
|
|
|
125
119
|
isLoading,
|
|
126
120
|
'aria-busy': isLoading || void 0
|
|
127
121
|
}, rest);
|
|
128
|
-
|
|
129
122
|
const onMouseOver = useCallback(() => {
|
|
130
123
|
setIsHovered(true);
|
|
131
124
|
}, []);
|
|
@@ -183,13 +176,11 @@ export const withEnhancedInput = function (WrappingComponent) {
|
|
|
183
176
|
});
|
|
184
177
|
});
|
|
185
178
|
};
|
|
186
|
-
|
|
187
179
|
const stateNodeGetter = styles => (isHovered, isActive) => {
|
|
188
180
|
if (isHovered) return styles.hover;
|
|
189
181
|
if (isActive) return styles.active;
|
|
190
182
|
return styles.default;
|
|
191
183
|
};
|
|
192
|
-
|
|
193
184
|
const derivedColourIntent = (_ref2, styles) => {
|
|
194
185
|
let {
|
|
195
186
|
isTouched,
|
|
@@ -199,12 +190,10 @@ const derivedColourIntent = (_ref2, styles) => {
|
|
|
199
190
|
isActive
|
|
200
191
|
} = _ref2;
|
|
201
192
|
if (disabled) return styles.disabled;
|
|
202
|
-
|
|
203
193
|
if (isTouched === true) {
|
|
204
194
|
const node = stateNodeGetter(isValid ? styles.success : styles.error);
|
|
205
195
|
return node(isHovered, isActive);
|
|
206
196
|
}
|
|
207
|
-
|
|
208
197
|
const node = stateNodeGetter(isActive ? styles.active : styles.natural);
|
|
209
198
|
return node(isHovered, isActive);
|
|
210
199
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/hooks/useAttachedBoxes/useAttachedBoxes.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { style } from '@vanilla-extract/css';
|
|
8
6
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
9
7
|
import { makeResponsiveStyle } from "../../utils/responsiveProps.css.js";
|
|
@@ -25,5 +23,4 @@ export const grid = {
|
|
|
25
23
|
borderBottomLeftRadius: vars.border.radius['1']
|
|
26
24
|
}, "grid_bottomLeft")
|
|
27
25
|
};
|
|
28
|
-
|
|
29
26
|
__vanilla_filescope__.endFileScope();
|
|
@@ -3,11 +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 = ["children", "className"];
|
|
6
|
-
|
|
7
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
-
|
|
9
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
-
|
|
11
8
|
import clsx from 'clsx';
|
|
12
9
|
import * as React from 'react';
|
|
13
10
|
import { Box } from "../../components/index.js";
|
|
@@ -15,7 +12,6 @@ import { getEarliestKnownToken, resolveResponsiveStyle } from "../../utils/resol
|
|
|
15
12
|
import { useMedia } from "../useMedia/index.js";
|
|
16
13
|
import * as styles from "./useAttachedBoxes.css.js";
|
|
17
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
|
|
19
15
|
function useResponsiveValue(responsiveValue) {
|
|
20
16
|
if (!Array.isArray(responsiveValue)) return responsiveValue;
|
|
21
17
|
const activeBP = useMedia(['mobile', 'tablet', 'desktop', 'largeDesktop'], false).reduce((activeBreakPoint, current, index) => {
|
|
@@ -24,7 +20,6 @@ function useResponsiveValue(responsiveValue) {
|
|
|
24
20
|
}, 1);
|
|
25
21
|
return getEarliestKnownToken(responsiveValue, activeBP);
|
|
26
22
|
}
|
|
27
|
-
|
|
28
23
|
export const useAttachedBoxes = _ref => {
|
|
29
24
|
let {
|
|
30
25
|
count,
|
|
@@ -43,18 +38,15 @@ export const useAttachedBoxes = _ref => {
|
|
|
43
38
|
length: count
|
|
44
39
|
}).map((_, index) => _ref2 => {
|
|
45
40
|
let {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
children,
|
|
42
|
+
className
|
|
43
|
+
} = _ref2,
|
|
44
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
51
45
|
isLastItem = index === count - 1;
|
|
52
|
-
|
|
53
46
|
if (isLastItem && decimals) {
|
|
54
47
|
colStart = Math.round(decimals / (1 / columnCount));
|
|
55
48
|
extend = Math.round((1 - decimals) / (1 / columnCount));
|
|
56
49
|
}
|
|
57
|
-
|
|
58
50
|
return _jsx(Box, _objectSpread(_objectSpread({
|
|
59
51
|
backgroundColour: backgroundColour,
|
|
60
52
|
className: clsx(className, {
|
|
@@ -13,7 +13,6 @@ export const useMedia = function (queries) {
|
|
|
13
13
|
const getQueries = useCallback(() => queries.map(media => "(min-width: ".concat(breakpoints[media], ")")), [breakpoints]);
|
|
14
14
|
const matchesInit = useMemo(() => getQueries().map(query => window.matchMedia(query).matches), [getQueries]);
|
|
15
15
|
const [matches, setMatches] = useState(matchesInit);
|
|
16
|
-
|
|
17
16
|
if (isBrowser) {
|
|
18
17
|
useLayoutEffect(() => {
|
|
19
18
|
let isMounted = true;
|
|
@@ -23,12 +22,10 @@ export const useMedia = function (queries) {
|
|
|
23
22
|
if (!isMounted) return;
|
|
24
23
|
setMatches(prevState => {
|
|
25
24
|
const newState = _toConsumableArray(prevState);
|
|
26
|
-
|
|
27
25
|
newState[idx] = e.matches;
|
|
28
26
|
return newState;
|
|
29
27
|
});
|
|
30
28
|
};
|
|
31
|
-
|
|
32
29
|
matcher.addEventListener('change', handler, {
|
|
33
30
|
passive: true
|
|
34
31
|
});
|
|
@@ -40,7 +37,6 @@ export const useMedia = function (queries) {
|
|
|
40
37
|
};
|
|
41
38
|
}, [].concat(_toConsumableArray(queries), [breakpoints]));
|
|
42
39
|
}
|
|
43
|
-
|
|
44
40
|
return matches;
|
|
45
41
|
};
|
|
46
42
|
export default useMedia;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/hooks/useNegativeMargin/useNegativeMarginLeft.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
8
6
|
import { makeResponsiveStyle } from "../../utils/responsiveProps.css.js";
|
|
9
7
|
export const negativeMarginLeft = makeResponsiveStyle(vars.space, value => ({
|
|
10
8
|
marginLeft: "calc(-1 * ".concat(value, ")"),
|
|
11
9
|
width: "calc(100% + ".concat(value, ")")
|
|
12
10
|
}));
|
|
13
|
-
|
|
14
11
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/hooks/useNegativeMargin/useNegativeMarginTop.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
8
6
|
import { makeResponsiveStyle } from "../../utils/responsiveProps.css.js";
|
|
9
7
|
export const negativeMarginTop = makeResponsiveStyle(vars.space, value => ({
|
|
10
8
|
marginTop: "calc(-1 * ".concat(value, ")")
|
|
11
9
|
}));
|
|
12
|
-
|
|
13
10
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/reset/globalFonts.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { globalFontFace } from '@vanilla-extract/css';
|
|
8
6
|
globalFontFace('AvertaStandard', {
|
|
9
7
|
fontStyle: 'normal',
|
|
@@ -23,5 +21,4 @@ globalFontFace('AvertaStandard', {
|
|
|
23
21
|
fontDisplay: 'swap',
|
|
24
22
|
src: "local('Averta Std Bold'), local('AvertaStd-Bold'),url('https://cdn.autoguru.com.au/assets/fonts/avertastd-bold-webfont.woff2') format('woff2'),url('https://cdn.autoguru.com.au/assets/fonts/avertastd-bold-webfont.woff') format('woff')"
|
|
25
23
|
});
|
|
26
|
-
|
|
27
24
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
4
|
__vanilla_filescope__.setFileScope("lib/reset/globalReset.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
5
|
import { globalStyle } from '@vanilla-extract/css';
|
|
8
6
|
globalStyle(':root', {
|
|
9
7
|
boxSizing: 'border-box',
|
|
@@ -26,5 +24,4 @@ globalStyle('body', {
|
|
|
26
24
|
globalStyle('html', {
|
|
27
25
|
overflowX: 'hidden'
|
|
28
26
|
});
|
|
29
|
-
|
|
30
27
|
__vanilla_filescope__.endFileScope();
|
package/dist/reset/reset.css.js
CHANGED
|
@@ -2,13 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
5
|
-
|
|
6
5
|
__vanilla_filescope__.setFileScope("lib/reset/reset.css.ts", "@autoguru/overdrive");
|
|
7
|
-
|
|
8
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
-
|
|
10
7
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
-
|
|
12
8
|
import { style } from '@vanilla-extract/css';
|
|
13
9
|
export const base = {
|
|
14
10
|
fontSize: '100%',
|
|
@@ -110,5 +106,4 @@ export const element = {
|
|
|
110
106
|
th: vAlignMiddle,
|
|
111
107
|
tr: vAlignMiddle
|
|
112
108
|
};
|
|
113
|
-
|
|
114
109
|
__vanilla_filescope__.endFileScope();
|