@autoguru/overdrive 4.34.0 → 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 * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
5
5
|
__vanilla_filescope__.setFileScope("lib/components/Tooltip/Tooltip.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 } from '@vanilla-extract/css';
|
|
9
9
|
import { responsiveStyle } from "../../utils/responsiveStyle.js";
|
|
10
10
|
export const root = style(_objectSpread({
|
|
@@ -7,9 +7,7 @@ import { Positioner } from "../Positioner/index.js";
|
|
|
7
7
|
import { EAlignment } from "../Positioner/alignment.js";
|
|
8
8
|
import { Text } from "../Text/index.js";
|
|
9
9
|
import * as styles from "./Tooltip.css.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
11
|
const sizeMap = {
|
|
14
12
|
medium: '2',
|
|
15
13
|
large: '3'
|
|
@@ -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 = style({
|
|
8
8
|
cursor: 'pointer',
|
|
9
|
-
transition:
|
|
9
|
+
transition: `background-color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
10
10
|
':hover': {
|
|
11
11
|
backgroundColor: vars.colours.background.body
|
|
12
12
|
}
|
|
@@ -29,17 +29,17 @@ export const nativeInput = styleVariants({
|
|
|
29
29
|
}
|
|
30
30
|
}, "nativeInput");
|
|
31
31
|
export const checkable = style({
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
34
|
-
marginTop:
|
|
35
|
-
marginBottom:
|
|
32
|
+
width: `calc(${vars.space['4']} + (${vars.space[3]} * 2))`,
|
|
33
|
+
height: `calc(${vars.space['4']} + (${vars.space[3]} * 2))`,
|
|
34
|
+
marginTop: `calc(-1*${vars.space['3']})`,
|
|
35
|
+
marginBottom: `calc(-1*${vars.space['3']})`
|
|
36
36
|
}, "checkable");
|
|
37
37
|
export const checkableItem = style({
|
|
38
38
|
selectors: {
|
|
39
|
-
[
|
|
40
|
-
boxShadow:
|
|
39
|
+
[`${nativeInput.default}:focus:checked ~${checkable} &`]: {
|
|
40
|
+
boxShadow: `0 0 0 2px ${vars.colours.intent.primary.background.strong}`
|
|
41
41
|
},
|
|
42
|
-
[
|
|
42
|
+
[`${nativeInput.default}:focus:not(:checked) ~${checkable} >&`]: {
|
|
43
43
|
borderColor: vars.colours.intent.primary.background.strong
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -6,8 +6,7 @@ import { forwardRef } from 'react';
|
|
|
6
6
|
import { Box, useBoxStyles } from "../../Box/index.js";
|
|
7
7
|
import { Text, useTextStyles } from "../../Text/index.js";
|
|
8
8
|
import * as styles from "./CheckableBase.css.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
10
|
export const CheckableBase = forwardRef((_ref, ref) => {
|
|
12
11
|
let {
|
|
13
12
|
className = '',
|
|
@@ -5,6 +5,6 @@ __vanilla_filescope__.setFileScope("lib/components/private/InputBase/HintText.cs
|
|
|
5
5
|
import { style } from '@vanilla-extract/css';
|
|
6
6
|
import { themeContractVars as vars } from "../../../themes/theme.css.js";
|
|
7
7
|
export const hintText = style({
|
|
8
|
-
transition:
|
|
8
|
+
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s`
|
|
9
9
|
}, "hintText");
|
|
10
10
|
__vanilla_filescope__.endFileScope();
|
|
@@ -6,14 +6,14 @@ import { style, styleVariants } from '@vanilla-extract/css';
|
|
|
6
6
|
import { themeContractVars as vars } from "../../../themes/theme.css.js";
|
|
7
7
|
const active_scaling_factor = 0.7777;
|
|
8
8
|
export const root = style({
|
|
9
|
-
transition:
|
|
9
|
+
transition: `fill 0.2s ${vars.animation.easing.decelerate} 0s`
|
|
10
10
|
}, "root");
|
|
11
11
|
const defaultBorderWidth = '1px';
|
|
12
12
|
const borderRegionDefaults = style({
|
|
13
13
|
borderWidth: defaultBorderWidth,
|
|
14
14
|
borderStyle: 'solid',
|
|
15
15
|
display: 'inline-flex',
|
|
16
|
-
transition:
|
|
16
|
+
transition: `border-color 0.2s ${vars.animation.easing.decelerate} 0s`
|
|
17
17
|
}, "borderRegionDefaults");
|
|
18
18
|
const borderVisualDefaults = style({
|
|
19
19
|
borderRadius: vars.border.radius['1'],
|
|
@@ -21,7 +21,7 @@ const borderVisualDefaults = style({
|
|
|
21
21
|
}, "borderVisualDefaults");
|
|
22
22
|
export const notchGapPlaceholder = style({
|
|
23
23
|
visibility: 'hidden',
|
|
24
|
-
fontSize:
|
|
24
|
+
fontSize: `calc(${vars.typography.size['4'].fontSize} * ${active_scaling_factor})`
|
|
25
25
|
}, "notchGapPlaceholder");
|
|
26
26
|
export const borders = {
|
|
27
27
|
root: {
|
|
@@ -39,10 +39,10 @@ export const borders = {
|
|
|
39
39
|
leading: [borderRegionDefaults, style({
|
|
40
40
|
width: vars.space['2'],
|
|
41
41
|
borderRight: 'none',
|
|
42
|
-
borderRadius:
|
|
42
|
+
borderRadius: `${vars.border.radius['1']} 0 0 ${vars.border.radius['1']}`
|
|
43
43
|
}, "borders_leading")],
|
|
44
44
|
middle: [borderRegionDefaults, style({
|
|
45
|
-
transition:
|
|
45
|
+
transition: `width 0.15s ${vars.animation.easing.decelerate}, border-color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
46
46
|
borderTopWidth: 0,
|
|
47
47
|
borderRightWidth: 0,
|
|
48
48
|
borderLeftWidth: 0
|
|
@@ -50,25 +50,25 @@ export const borders = {
|
|
|
50
50
|
trailing: [borderRegionDefaults, style({
|
|
51
51
|
flexGrow: 1,
|
|
52
52
|
borderLeft: 'none',
|
|
53
|
-
borderRadius:
|
|
53
|
+
borderRadius: `0 ${vars.border.radius['1']} ${vars.border.radius['1']} 0`
|
|
54
54
|
}, "borders_trailing")]
|
|
55
55
|
};
|
|
56
56
|
export const bordersAttach = {
|
|
57
57
|
complete: styleVariants({
|
|
58
58
|
NONE: {
|
|
59
|
-
borderRadius:
|
|
59
|
+
borderRadius: `${vars.border.radius['1']}`
|
|
60
60
|
},
|
|
61
61
|
LEFT: {
|
|
62
|
-
borderRadius:
|
|
62
|
+
borderRadius: `0 ${vars.border.radius['1']} ${vars.border.radius['1']} 0`
|
|
63
63
|
},
|
|
64
64
|
TOP: {
|
|
65
|
-
borderRadius:
|
|
65
|
+
borderRadius: `0 0 ${vars.border.radius['1']} ${vars.border.radius['1']}`
|
|
66
66
|
},
|
|
67
67
|
RIGHT: {
|
|
68
|
-
borderRadius:
|
|
68
|
+
borderRadius: `${vars.border.radius['1']} 0 0 ${vars.border.radius['1']}`
|
|
69
69
|
},
|
|
70
70
|
BOTTOM: {
|
|
71
|
-
borderRadius:
|
|
71
|
+
borderRadius: `${vars.border.radius['1']} ${vars.border.radius['1']} 0 0`
|
|
72
72
|
},
|
|
73
73
|
ALL: {
|
|
74
74
|
borderRadius: 0
|
|
@@ -130,7 +130,7 @@ export const placeholder = styleVariants({
|
|
|
130
130
|
lineHeight: 1,
|
|
131
131
|
top: 0,
|
|
132
132
|
left: 0,
|
|
133
|
-
transition:
|
|
133
|
+
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s, transform 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
134
134
|
transformOrigin: 'top left'
|
|
135
135
|
},
|
|
136
136
|
mutedLabelStyles: {
|
|
@@ -139,33 +139,33 @@ export const placeholder = styleVariants({
|
|
|
139
139
|
}, "placeholder");
|
|
140
140
|
const calcPlaceholderTranslate = (notched, prefixed, size) => {
|
|
141
141
|
if (notched) {
|
|
142
|
-
return
|
|
142
|
+
return `calc(${vars.space['2']} + ${vars.space['2']}), calc(-0.5 * ${active_scaling_factor} * ${vars.typography.size['4'].fontSize})`;
|
|
143
143
|
}
|
|
144
|
-
return size === 'medium' ?
|
|
144
|
+
return size === 'medium' ? `${prefixed ? `calc(${vars.space['7']} + ${vars.space['3']})` : vars.typography.size['4'].fontSize}, calc((${vars.space['8']} - ${vars.typography.size['4'].fontSize}) / 2)` : `${prefixed ? `calc(${vars.space['2']} + ${vars.space['5']} + ${vars.space['2']})` : vars.space['2']}, calc(${vars.space['2']} + 2px)`;
|
|
145
145
|
};
|
|
146
146
|
export const placeholderPlacement = {
|
|
147
147
|
small: styleVariants({
|
|
148
148
|
default: {
|
|
149
|
-
transform:
|
|
149
|
+
transform: `translate(${calcPlaceholderTranslate(false, false, 'small')}) scale(1)`
|
|
150
150
|
},
|
|
151
151
|
defaultPrefixed: {
|
|
152
|
-
transform:
|
|
152
|
+
transform: `translate(${calcPlaceholderTranslate(false, true, 'small')}) scale(1)`
|
|
153
153
|
},
|
|
154
154
|
shifted: {
|
|
155
155
|
zIndex: 2,
|
|
156
|
-
transform:
|
|
156
|
+
transform: `translate(${calcPlaceholderTranslate(true, false, 'small')}) scale(${active_scaling_factor})`
|
|
157
157
|
}
|
|
158
158
|
}, "placeholderPlacement_small"),
|
|
159
159
|
medium: styleVariants({
|
|
160
160
|
default: {
|
|
161
|
-
transform:
|
|
161
|
+
transform: `translate(${calcPlaceholderTranslate(false, false, 'medium')}) scale(1)`
|
|
162
162
|
},
|
|
163
163
|
defaultPrefixed: {
|
|
164
|
-
transform:
|
|
164
|
+
transform: `translate(${calcPlaceholderTranslate(false, true, 'medium')}) scale(1)`
|
|
165
165
|
},
|
|
166
166
|
shifted: {
|
|
167
167
|
zIndex: 2,
|
|
168
|
-
transform:
|
|
168
|
+
transform: `translate(${calcPlaceholderTranslate(true, false, 'medium')}) scale(${active_scaling_factor})`
|
|
169
169
|
}
|
|
170
170
|
}, "placeholderPlacement_medium")
|
|
171
171
|
};
|
|
@@ -6,8 +6,7 @@ import { useRef } from 'react';
|
|
|
6
6
|
import { Box } from "../../Box/index.js";
|
|
7
7
|
import { useTextStyles } from "../../Text/index.js";
|
|
8
8
|
import * as styles from "./NotchedBase.css.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
10
|
export const NotchedBase = _ref => {
|
|
12
11
|
let {
|
|
13
12
|
id,
|
|
@@ -38,14 +38,14 @@ export const inputWrapperSize = {
|
|
|
38
38
|
small: {
|
|
39
39
|
root: styleVariants({
|
|
40
40
|
textarea: {
|
|
41
|
-
paddingTop:
|
|
41
|
+
paddingTop: `${vars.space['2']}`
|
|
42
42
|
}
|
|
43
43
|
}, "inputWrapperSize_small_root")
|
|
44
44
|
},
|
|
45
45
|
medium: {
|
|
46
46
|
root: styleVariants({
|
|
47
47
|
textarea: {
|
|
48
|
-
paddingTop:
|
|
48
|
+
paddingTop: `${vars.space['2']}`
|
|
49
49
|
}
|
|
50
50
|
}, "inputWrapperSize_medium_root")
|
|
51
51
|
}
|
|
@@ -56,27 +56,27 @@ export const inputItselfSize = {
|
|
|
56
56
|
any: {
|
|
57
57
|
fontSize: vars.typography.size['3'].fontSize,
|
|
58
58
|
lineHeight: vars.typography.size['3'].lineHeight,
|
|
59
|
-
padding:
|
|
60
|
-
minHeight:
|
|
59
|
+
padding: `${vars.space['2']}`,
|
|
60
|
+
minHeight: `calc(${vars.typography.size['3'].lineHeight} + (2* ${vars.space['2']}))`
|
|
61
61
|
},
|
|
62
62
|
textarea: {
|
|
63
|
-
padding:
|
|
63
|
+
padding: `0 ${vars.space['2']} ${vars.space['2']}`
|
|
64
64
|
}
|
|
65
65
|
}, "inputItselfSize_small_root"),
|
|
66
66
|
prefixed: styleVariants({
|
|
67
67
|
any: {
|
|
68
|
-
paddingLeft:
|
|
68
|
+
paddingLeft: `calc(${vars.space['2']} + ${vars.space['4']} + ${vars.space['2']})`
|
|
69
69
|
},
|
|
70
70
|
textarea: {
|
|
71
|
-
paddingLeft:
|
|
71
|
+
paddingLeft: `calc(${vars.space['2']} + ${vars.space['5']} + ${vars.space['2']})`
|
|
72
72
|
}
|
|
73
73
|
}, "inputItselfSize_small_prefixed"),
|
|
74
74
|
suffixed: styleVariants({
|
|
75
75
|
any: {
|
|
76
|
-
paddingRight:
|
|
76
|
+
paddingRight: `calc(${vars.space['2']} + ${vars.space['4']} + ${vars.space['2']})`
|
|
77
77
|
},
|
|
78
78
|
textarea: {
|
|
79
|
-
paddingRight:
|
|
79
|
+
paddingRight: `calc(${vars.space['2']} + ${vars.space['5']} + ${vars.space['2']})`
|
|
80
80
|
}
|
|
81
81
|
}, "inputItselfSize_small_suffixed")
|
|
82
82
|
},
|
|
@@ -86,20 +86,20 @@ export const inputItselfSize = {
|
|
|
86
86
|
fontSize: vars.typography.size['4'].fontSize,
|
|
87
87
|
lineHeight: vars.typography.size['4'].lineHeight,
|
|
88
88
|
height: vars.space['8'],
|
|
89
|
-
padding:
|
|
89
|
+
padding: `calc(((${vars.space['8']} - ${vars.typography.size['4'].fontSize}) / 2) - 3px) calc(${vars.space['4']} - 1px)`
|
|
90
90
|
},
|
|
91
91
|
textarea: {
|
|
92
|
-
padding:
|
|
92
|
+
padding: `${vars.space['1']} calc(${vars.space['4']} - 1px) calc(((${vars.space['8']} - ${vars.typography.size['4'].fontSize}) / 2) - 3px)`
|
|
93
93
|
}
|
|
94
94
|
}, "inputItselfSize_medium_root"),
|
|
95
95
|
prefixed: styleVariants({
|
|
96
96
|
any: {
|
|
97
|
-
paddingLeft:
|
|
97
|
+
paddingLeft: `calc((${vars.space['3']} - 1px) + (${vars.space['4']} - 1px) + ${vars.space[4]})`
|
|
98
98
|
}
|
|
99
99
|
}, "inputItselfSize_medium_prefixed"),
|
|
100
100
|
suffixed: styleVariants({
|
|
101
101
|
any: {
|
|
102
|
-
paddingRight:
|
|
102
|
+
paddingRight: `calc((${vars.space['3']} - 1px) + (${vars.space['4']} - 1px) + ${vars.space[4]})`
|
|
103
103
|
}
|
|
104
104
|
}, "inputItselfSize_medium_suffixed")
|
|
105
105
|
}
|
|
@@ -108,7 +108,7 @@ export const iconRoot = style({
|
|
|
108
108
|
zIndex: 1,
|
|
109
109
|
top: '50%',
|
|
110
110
|
transform: 'translate(0, -50%)',
|
|
111
|
-
transition:
|
|
111
|
+
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s`
|
|
112
112
|
}, "iconRoot");
|
|
113
113
|
export const prefixIcon = style({
|
|
114
114
|
left: 0
|
|
@@ -118,10 +118,10 @@ export const suffixIcon = style({
|
|
|
118
118
|
}, "suffixIcon");
|
|
119
119
|
export const iconSize = styleVariants({
|
|
120
120
|
small: {
|
|
121
|
-
margin:
|
|
121
|
+
margin: `0 ${vars.space['2']}`
|
|
122
122
|
},
|
|
123
123
|
medium: {
|
|
124
|
-
margin:
|
|
124
|
+
margin: `0 calc(${vars.space['3']} - 1px)`
|
|
125
125
|
}
|
|
126
126
|
}, "iconSize");
|
|
127
127
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withEnhancedInput.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,KAAK,MAAM,OAAO,C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AW,CACvC,CAAC;AAEH,UAAU,oBAAoB,CAAC,SAAS,GAAG,MAAM;IAChD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC5E;AAED,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withEnhancedInput.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,iBAAiB,EAEjB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,GAAG,EAGH,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,GAAG,EAAgB,MAAM,WAAW,CAAC;AAM9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAGlD,MAAM,WAAW,aAAa,CAAC,oBAAoB;IAClD,QAAQ,CAAC,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IACvD,YAAY,CAAC,EAAE,iBAAiB,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aAAa,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACnD,KAAK,EAAE,IAAI,CACV,0BAA0B,EAC1B,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CACjD,GAAG;QACH,GAAG,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;KAC5C,CAAC;IACF,SAAS,CAAC,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACnB,GAAG,aAAa,GAChB,IAAI,CACH,cAAc,CAAC,OAAO,WAAW,CAAC,EAClC,QAAQ,GAAG,cAAc,GAAG,WAAW,CACvC,CAAC;AAEH,UAAU,oBAAoB,CAAC,SAAS,GAAG,MAAM;IAChD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC5E;AAED,eAAO,MAAM,iBAAiB,sQAa1B,oBAAoB,+JA4PtB,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 = ["placeholder", "name", "id", "hintText", "disabled", "className", "isTouched", "isValid", "isLoading", "notch", "reserveHintSpace", "size", "backgroundColour", "value", "onChange", "onReset", "onMouseLeave", "onMouseEnter", "onBlur", "onFocus", "onKeyDown", "prefixIcon", "suffixIcon", "wrapperRef", "autoFocus", "attach", "borderMerged"];
|
|
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, wrapEvent } from '@autoguru/utilities';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import * as React from 'react';
|
|
@@ -17,8 +17,7 @@ import { HintText } from "./HintText.js";
|
|
|
17
17
|
import * as inputStateStyles from "./InputState.css.js";
|
|
18
18
|
import { NotchedBase } from "./NotchedBase.js";
|
|
19
19
|
import * as styles from "./withEnhancedInput.css.js";
|
|
20
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
21
|
export const withEnhancedInput = function (WrappingComponent) {
|
|
23
22
|
let {
|
|
24
23
|
primitiveType = 'text',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, FunctionComponent } from 'react';
|
|
2
|
-
import { Box } from '../../components';
|
|
2
|
+
import { Box } from '../../components/Box';
|
|
3
3
|
import { ResponsiveProp } from '../../utils/responsiveProps.css';
|
|
4
4
|
import * as styles from './useAttachedBoxes.css';
|
|
5
5
|
interface Props extends Pick<ComponentProps<typeof Box>, 'backgroundColour'> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAttachedBoxes.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useAttachedBoxes/useAttachedBoxes.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useAttachedBoxes.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useAttachedBoxes/useAttachedBoxes.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAEjD,UAAU,KAAM,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,kBAAkB,CAAC;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,KAAK,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,cAAc,CAAC,CAAC;AAiBzE,KAAK,OAAO,GAAG;IACd,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,EAAE;IAC5C,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;CAC1C,CAAC;AACF,eAAO,MAAM,gBAAgB,wEAK1B,KAAK,YAyDP,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -3,11 +3,11 @@
|
|
|
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
|
-
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
|
-
import { Box } from "../../components/index.js";
|
|
10
|
+
import { Box } from "../../components/Box/index.js";
|
|
11
11
|
import { getEarliestKnownToken, resolveResponsiveStyle } from "../../utils/resolveResponsiveProps.js";
|
|
12
12
|
import { useMedia } from "../useMedia/index.js";
|
|
13
13
|
import * as styles from "./useAttachedBoxes.css.js";
|
|
@@ -56,13 +56,13 @@ export const useAttachedBoxes = _ref => {
|
|
|
56
56
|
[styles.grid.bottomRight]: isLastItem
|
|
57
57
|
}),
|
|
58
58
|
style: isLastItem && decimals ? {
|
|
59
|
-
gridColumn:
|
|
59
|
+
gridColumn: `${colStart}/${colStart + 1 + extend}`
|
|
60
60
|
} : void 0
|
|
61
61
|
}, rest), {}, {
|
|
62
62
|
children: children
|
|
63
63
|
}));
|
|
64
64
|
}), clsx(styles.grid.default, resolveResponsiveStyle(gap, styles.grid.gaps)), {
|
|
65
|
-
gridTemplateColumns:
|
|
65
|
+
gridTemplateColumns: `repeat(${columnCount}, 1fr)`
|
|
66
66
|
}];
|
|
67
67
|
};
|
|
68
68
|
export default useAttachedBoxes;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
4
|
import { useCallback, useLayoutEffect, useMemo, useState } from 'react';
|
|
5
|
-
import { useRuntimeTokens } from "../../index.js";
|
|
5
|
+
import { useRuntimeTokens } from "../../components/ThemeProvider/index.js";
|
|
6
6
|
import { isBrowser } from "../../utils/index.js";
|
|
7
7
|
export const useMedia = function (queries) {
|
|
8
8
|
let fallbackCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -10,13 +10,13 @@ export const useMedia = function (queries) {
|
|
|
10
10
|
breakpoints
|
|
11
11
|
} = useRuntimeTokens();
|
|
12
12
|
if (!isBrowser) return queries.map(() => fallbackCase);
|
|
13
|
-
const getQueries = useCallback(() => queries.map(media =>
|
|
14
|
-
const matchesInit = useMemo(() => getQueries().map(query =>
|
|
13
|
+
const getQueries = useCallback(() => queries.map(media => `(min-width: ${breakpoints[media]})`), [breakpoints]);
|
|
14
|
+
const matchesInit = useMemo(() => getQueries().map(query => globalThis.matchMedia(query).matches), [getQueries]);
|
|
15
15
|
const [matches, setMatches] = useState(matchesInit);
|
|
16
16
|
if (isBrowser) {
|
|
17
17
|
useLayoutEffect(() => {
|
|
18
18
|
let isMounted = true;
|
|
19
|
-
const matchers = getQueries().map(query =>
|
|
19
|
+
const matchers = getQueries().map(query => globalThis.matchMedia(query));
|
|
20
20
|
const removeHandlersFn = matchers.map((matcher, idx) => {
|
|
21
21
|
const handler = e => {
|
|
22
22
|
if (!isMounted) return;
|
|
@@ -5,7 +5,7 @@ __vanilla_filescope__.setFileScope("lib/hooks/useNegativeMargin/useNegativeMargi
|
|
|
5
5
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
6
6
|
import { makeResponsiveStyle } from "../../utils/responsiveProps.css.js";
|
|
7
7
|
export const negativeMarginLeft = makeResponsiveStyle(vars.space, value => ({
|
|
8
|
-
marginLeft:
|
|
9
|
-
width:
|
|
8
|
+
marginLeft: `calc(-1 * ${value})`,
|
|
9
|
+
width: `calc(100% + ${value})`
|
|
10
10
|
}));
|
|
11
11
|
__vanilla_filescope__.endFileScope();
|
|
@@ -5,6 +5,6 @@ __vanilla_filescope__.setFileScope("lib/hooks/useNegativeMargin/useNegativeMargi
|
|
|
5
5
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
6
6
|
import { makeResponsiveStyle } from "../../utils/responsiveProps.css.js";
|
|
7
7
|
export const negativeMarginTop = makeResponsiveStyle(vars.space, value => ({
|
|
8
|
-
marginTop:
|
|
8
|
+
marginTop: `calc(-1 * ${value})`
|
|
9
9
|
}));
|
|
10
10
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWindowHeightFill.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useWindowHeightFill/useWindowHeightFill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqC,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useWindowHeightFill.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useWindowHeightFill/useWindowHeightFill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqC,MAAM,OAAO,CAAC;AAIrE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,MAAM,WAAW,wBAAwB;IACxC,SAAS,CAAC,EAAE,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACxC,kBAAkB,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,mBAAmB,iGAO7B,wBAAwB,KAAG,MAiE7B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useLayoutEffect, useRef, useState } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useTheme } from "../../components/ThemeProvider/index.js";
|
|
5
5
|
import { themeContractVars } from "../../themes/theme.css.js";
|
|
6
6
|
import { getThemeTokenValue } from "../../utils/css.js";
|
|
7
|
+
import { useResponsiveValue } from "../useResponsiveValue/index.js";
|
|
7
8
|
export const useWindowHeightFill = _ref => {
|
|
8
9
|
var _window2, _document2;
|
|
9
10
|
let {
|
|
@@ -18,7 +19,7 @@ export const useWindowHeightFill = _ref => {
|
|
|
18
19
|
const {
|
|
19
20
|
themeClass
|
|
20
21
|
} = useTheme();
|
|
21
|
-
const [containerHeight, setContainerHeight] = useState(
|
|
22
|
+
const [containerHeight, setContainerHeight] = useState(`${serverVhFallback}vh`);
|
|
22
23
|
const containerHeightRef = useRef(containerHeight);
|
|
23
24
|
useLayoutEffect(() => {
|
|
24
25
|
var _window, _document;
|
|
@@ -26,7 +27,7 @@ export const useWindowHeightFill = _ref => {
|
|
|
26
27
|
const resize = () => {
|
|
27
28
|
const gap = getThemeTokenValue(themeClass, themeContractVars.space[bottomGap]) || '0px';
|
|
28
29
|
const availableHeight = Math.min(maxHeight !== null && maxHeight !== void 0 ? maxHeight : Number.POSITIVE_INFINITY, window.innerHeight - containerRef.current.getBoundingClientRect().top);
|
|
29
|
-
const newHeight = gap ?
|
|
30
|
+
const newHeight = gap ? `calc(${availableHeight}px - ${gap})` : `${availableHeight}px`;
|
|
30
31
|
if (containerHeightRef.current !== newHeight) {
|
|
31
32
|
setContainerHeight(newHeight);
|
|
32
33
|
containerHeightRef.current = newHeight;
|
|
@@ -7,18 +7,18 @@ globalFontFace('AvertaStandard', {
|
|
|
7
7
|
fontStyle: 'normal',
|
|
8
8
|
fontWeight: 400,
|
|
9
9
|
fontDisplay: 'swap',
|
|
10
|
-
src:
|
|
10
|
+
src: `local('Averta Std Regular'), local('AvertaStd-Regular'),url('https://cdn.autoguru.com.au/assets/fonts/avertastd-regular-webfont.woff2') format('woff2'),url('https://cdn.autoguru.com.au/assets/fonts/avertastd-regular-webfont.woff') format('woff')`
|
|
11
11
|
});
|
|
12
12
|
globalFontFace('AvertaStandard', {
|
|
13
13
|
fontStyle: 'normal',
|
|
14
14
|
fontWeight: 500,
|
|
15
15
|
fontDisplay: 'swap',
|
|
16
|
-
src:
|
|
16
|
+
src: `local('Averta Std Semibold'), local('AvertaStd-Semibold'),url('https://cdn.autoguru.com.au/assets/fonts/avertastd-semibold-webfont.woff2') format('woff2'),url('https://cdn.autoguru.com.au/assets/fonts/avertastd-semibold-webfont.woff') format('woff')`
|
|
17
17
|
});
|
|
18
18
|
globalFontFace('AvertaStandard', {
|
|
19
19
|
fontStyle: 'normal',
|
|
20
20
|
fontWeight: 700,
|
|
21
21
|
fontDisplay: 'swap',
|
|
22
|
-
src:
|
|
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')`
|
|
23
23
|
});
|
|
24
24
|
__vanilla_filescope__.endFileScope();
|
package/dist/reset/reset.css.js
CHANGED
|
@@ -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/reset/reset.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 } from '@vanilla-extract/css';
|
|
9
9
|
export const base = {
|
|
10
10
|
fontSize: '100%',
|
|
@@ -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 { buildColourGamut } from "../makeTheme.js";
|
|
7
7
|
const baseThemeColours = {
|
|
8
8
|
black: {
|
|
@@ -218,7 +218,7 @@ export const tokens = {
|
|
|
218
218
|
},
|
|
219
219
|
radius: {
|
|
220
220
|
none: 'none',
|
|
221
|
-
pill:
|
|
221
|
+
pill: `${1e9}px`,
|
|
222
222
|
full: '50%',
|
|
223
223
|
'1': '4px',
|
|
224
224
|
min: '2px'
|
|
@@ -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 deepmerge from 'deepmerge';
|
|
7
7
|
import { tokens as baseTokens } from "../base/tokens.js";
|
|
8
8
|
import { buildColourGamut } from "../makeTheme.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../lib/themes/helpers.ts"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,YAAY,iEAMtB,iBAAiB,KAAG,MAiBtB,CAAC;AAEF,KAAK,UAAU,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC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