@autoguru/overdrive 4.42.0-next.1 → 4.43.0-next.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/Actions/Actions.d.ts +4 -3
- package/dist/components/Actions/Actions.d.ts.map +1 -1
- package/dist/components/Actions/Actions.js +5 -9
- package/dist/components/Actions/Actions.stories.d.ts +1 -1
- package/dist/components/Alert/Alert.d.ts +1 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +13 -17
- package/dist/components/Anchor/Anchor.js +3 -3
- package/dist/components/AutoSuggest/AutoSuggest.js +2 -2
- package/dist/components/Box/Box.d.ts +6 -9
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/Box.js +12 -117
- package/dist/components/Box/Box.stories.d.ts +3 -20
- package/dist/components/Box/Box.stories.d.ts.map +1 -1
- package/dist/components/Box/argTypes.d.ts.map +1 -1
- package/dist/components/Box/argTypes.js +1 -1
- package/dist/components/Box/boxStyles.d.ts +5 -0
- package/dist/components/Box/boxStyles.d.ts.map +1 -0
- package/dist/components/Box/boxStyles.js +32 -0
- package/dist/components/Box/index.d.ts +3 -3
- package/dist/components/Box/index.d.ts.map +1 -1
- package/dist/components/Box/index.js +3 -2
- package/dist/components/Box/useBox.d.ts +22 -0
- package/dist/components/Box/useBox.d.ts.map +1 -0
- package/dist/components/Box/useBox.js +42 -0
- package/dist/components/BulletText/BulletText.d.ts +4 -5
- package/dist/components/BulletText/BulletText.d.ts.map +1 -1
- package/dist/components/BulletText/BulletText.js +6 -8
- package/dist/components/BulletText/BulletText.stories.d.ts +1 -1
- package/dist/components/BulletText/BulletText.stories.d.ts.map +1 -1
- package/dist/components/Button/Button.js +4 -4
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/ColourInput/ColourInput.js +4 -4
- package/dist/components/Columns/Column.d.ts +13 -14
- package/dist/components/Columns/Column.d.ts.map +1 -1
- package/dist/components/Columns/Column.js +23 -37
- package/dist/components/Columns/Columns.css.d.ts +18 -6
- package/dist/components/Columns/Columns.css.d.ts.map +1 -1
- package/dist/components/Columns/Columns.css.js +46 -34
- package/dist/components/Columns/Columns.d.ts +13 -24
- package/dist/components/Columns/Columns.d.ts.map +1 -1
- package/dist/components/Columns/Columns.js +31 -40
- package/dist/components/Columns/Columns.stories.d.ts +7 -904
- package/dist/components/Columns/Columns.stories.d.ts.map +1 -1
- package/dist/components/Columns/index.d.ts +2 -2
- package/dist/components/Columns/index.d.ts.map +1 -1
- package/dist/components/Columns/index.js +2 -2
- package/dist/components/DateInput/DateInput.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +3 -3
- package/dist/components/DividerLine/DividerLine.js +2 -2
- package/dist/components/DropDown/DropDown.stories.d.ts +5 -5
- package/dist/components/DropDown/DropDown.stories.d.ts.map +1 -1
- package/dist/components/DropDown/DropDownOption.js +2 -2
- package/dist/components/DropDown/DropDownOptionsList.js +2 -1
- package/dist/components/EditableText/EditableText.d.ts +2 -2
- package/dist/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.js +2 -2
- package/dist/components/EditableText/EditableText.stories.d.ts +1 -1
- package/dist/components/EditableText/EditableText.stories.d.ts.map +1 -1
- package/dist/components/FillHeightBox/FillHeightBox.stories.d.ts +1 -1
- package/dist/components/Flyout/Flyout.stories.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts +4 -4
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.js +10 -12
- package/dist/components/Heading/Heading.stories.d.ts +1 -8
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts +12 -0
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.css.js +33 -0
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +5 -4
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +46 -35
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/Inline/Inline.d.ts +13 -13
- package/dist/components/Inline/Inline.d.ts.map +1 -1
- package/dist/components/Inline/Inline.js +54 -55
- package/dist/components/Inline/Inline.stories.d.ts +3 -32
- package/dist/components/Inline/Inline.stories.d.ts.map +1 -1
- package/dist/components/Inline/index.d.ts +1 -1
- package/dist/components/Inline/index.d.ts.map +1 -1
- package/dist/components/Inline/index.js +1 -1
- package/dist/components/IntentStripe/IntentStripe.d.ts +1 -2
- package/dist/components/IntentStripe/IntentStripe.d.ts.map +1 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.d.ts.map +1 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +1 -0
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts +394 -431
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts.map +1 -1
- package/dist/components/Meta/Meta.js +1 -1
- package/dist/components/MinimalModal/MinimalModal.css.d.ts +1 -1
- package/dist/components/MinimalModal/MinimalModal.stories.d.ts +6 -1
- package/dist/components/MinimalModal/MinimalModal.stories.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -1
- package/dist/components/NumberBubble/NumberBubble.js +3 -3
- package/dist/components/OptionGrid/OptionGrid.css.js +1 -1
- package/dist/components/OptionList/OptionList.d.ts +2 -2
- package/dist/components/OptionList/OptionListItem.js +1 -1
- package/dist/components/Pagination/Bubble.js +1 -1
- package/dist/components/Pagination/Pagination.js +3 -3
- package/dist/components/ProgressSpinner/ProgressSpinner.js +3 -3
- package/dist/components/ScrollPane/ScrollPane.d.ts +3 -3
- package/dist/components/ScrollPane/ScrollPane.d.ts.map +1 -1
- package/dist/components/ScrollPane/ScrollPane.js +1 -2
- package/dist/components/ScrollPane/ScrollPane.stories.d.ts +1 -1
- package/dist/components/ScrollPane/ScrollPane.stories.d.ts.map +1 -1
- package/dist/components/Section/Section.d.ts +4 -5
- package/dist/components/Section/Section.d.ts.map +1 -1
- package/dist/components/Section/Section.js +18 -13
- package/dist/components/Section/Section.stories.d.ts +1 -1
- package/dist/components/SimplePagination/SimplePagination.js +1 -1
- package/dist/components/SliderProgress/ProgressStep.js +2 -1
- package/dist/components/SliderProgress/SliderProgress.js +2 -1
- package/dist/components/SliderProgress/SliderProgress.stories.d.ts +1 -1
- package/dist/components/Stack/Divider.css.d.ts +1 -1
- package/dist/components/Stack/Divider.css.d.ts.map +1 -1
- package/dist/components/Stack/Divider.css.js +8 -3
- package/dist/components/Stack/Stack.d.ts +8 -9
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +50 -35
- package/dist/components/Stack/Stack.stories.d.ts +2 -17
- package/dist/components/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/components/StandardModal/StandardModal.js +2 -2
- package/dist/components/StarRating/StarRating.d.ts.map +1 -1
- package/dist/components/StarRating/StarRating.js +3 -2
- package/dist/components/Stepper/Stepper.css.d.ts +1 -2
- package/dist/components/Stepper/Stepper.css.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.css.js +7 -12
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +15 -30
- package/dist/components/Table/TableCell.d.ts.map +1 -1
- package/dist/components/Table/TableCell.js +2 -2
- package/dist/components/Table/TableHeadCell.d.ts +1 -1
- package/dist/components/Table/TableHeadCell.d.ts.map +1 -1
- package/dist/components/Table/TableHeadCell.js +4 -2
- package/dist/components/Tabs/Tab.js +5 -5
- package/dist/components/Text/Text.d.ts +4 -2
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +2 -5
- package/dist/components/Text/Text.stories.d.ts.map +1 -1
- package/dist/components/Text/useTextStyles.css.d.ts +1 -1
- package/dist/components/Text/useTextStyles.css.d.ts.map +1 -1
- package/dist/components/Text/useTextStyles.css.js +5 -1
- package/dist/components/Text/useTextStyles.d.ts +4 -5
- package/dist/components/Text/useTextStyles.d.ts.map +1 -1
- package/dist/components/Text/useTextStyles.js +3 -4
- package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.js +7 -6
- package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.js +3 -3
- package/dist/components/TextContainer/TextContainer.d.ts +0 -1
- package/dist/components/TextContainer/TextContainer.d.ts.map +1 -1
- package/dist/components/TextContainer/TextContainer.js +13 -25
- package/dist/components/TextContainer/TextContainer.stories.d.ts +3 -6
- package/dist/components/TextContainer/TextContainer.stories.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.d.ts +2 -2
- package/dist/components/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.js +8 -8
- package/dist/components/TextLink/TextLink.stories.d.ts +27 -22
- package/dist/components/TextLink/TextLink.stories.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +5 -4
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +9 -3
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +1 -5
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts.map +1 -1
- package/dist/components/private/CheckableBase/CheckableBase.d.ts.map +1 -1
- package/dist/components/private/CheckableBase/CheckableBase.js +10 -10
- package/dist/components/private/InputBase/HintText.js +5 -5
- package/dist/components/private/InputBase/withEnhancedInput.d.ts +3 -3
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +4 -4
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useDeepCompareMemo/index.d.ts +2 -0
- package/dist/hooks/useDeepCompareMemo/index.d.ts.map +1 -0
- package/dist/hooks/useDeepCompareMemo/index.js +13 -0
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts +1 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.d.ts.map +1 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts +1 -2
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.d.ts.map +1 -1
- package/dist/reset/globalReset.css.js +30 -13
- package/dist/reset/reset.css.d.ts.map +1 -1
- package/dist/reset/reset.css.js +94 -37
- package/dist/stories/helpers/index.d.ts +1 -1
- package/dist/stories/helpers/index.d.ts.map +1 -1
- package/dist/stories/helpers/sprinkles.css.d.ts +1 -1
- package/dist/stories/helpers/stack.css.d.ts.map +1 -0
- package/dist/styles/layers.css.d.ts +2 -0
- package/dist/styles/layers.css.d.ts.map +1 -1
- package/dist/styles/layers.css.js +2 -0
- package/dist/styles/sprinkles.css.d.ts +405 -71
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +193 -19
- package/dist/styles/vars.css.d.ts +2 -0
- package/dist/styles/vars.css.d.ts.map +1 -0
- package/dist/styles/vars.css.js +7 -0
- package/dist/test/vitest.setup.d.ts +2 -0
- package/dist/test/vitest.setup.d.ts.map +1 -0
- package/dist/themes/makeTheme.d.ts +1 -0
- package/dist/themes/makeTheme.d.ts.map +1 -1
- package/dist/themes/makeTheme.js +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/sprinkles.d.ts +11 -0
- package/dist/utils/sprinkles.d.ts.map +1 -0
- package/dist/utils/sprinkles.js +34 -0
- package/package.json +26 -23
- package/dist/components/Box/useBoxStyles.css.d.ts +0 -48
- package/dist/components/Box/useBoxStyles.css.d.ts.map +0 -1
- package/dist/components/Box/useBoxStyles.css.js +0 -141
- package/dist/components/Box/useBoxStyles.d.ts +0 -69
- package/dist/components/Box/useBoxStyles.d.ts.map +0 -1
- package/dist/components/Box/useBoxStyles.js +0 -80
- package/dist/components/Columns/Column.css.d.ts +0 -3
- package/dist/components/Columns/Column.css.d.ts.map +0 -1
- package/dist/components/Columns/Column.css.js +0 -35
- package/dist/components/Stack/Divider.d.ts +0 -3
- package/dist/components/Stack/Divider.d.ts.map +0 -1
- package/dist/components/Stack/Divider.js +0 -14
- package/dist/components/Stack/Stack.css.d.ts +0 -5
- package/dist/components/Stack/Stack.css.d.ts.map +0 -1
- package/dist/components/Stack/Stack.css.js +0 -18
- package/dist/styles/stack.css.d.ts.map +0 -1
- package/dist/styles/stack.css.js +0 -44
- package/dist/test/vitest-setup.d.ts +0 -2
- package/dist/test/vitest-setup.d.ts.map +0 -1
- /package/dist/{styles → stories/helpers}/stack.css.d.ts +0 -0
- /package/dist/test/{vitest-setup.js → vitest.setup.js} +0 -0
|
@@ -9,6 +9,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
9
|
import { createSprinkles, defineProperties } from '@vanilla-extract/sprinkles';
|
|
10
10
|
import { breakpoints } from "../themes/makeTheme.js";
|
|
11
11
|
import { overdriveTokens as tokens } from "../themes/theme.css.js";
|
|
12
|
+
import { cssLayerUtil } from "./layers.css.js";
|
|
13
|
+
import { gapVar } from "./vars.css.js";
|
|
12
14
|
const {
|
|
13
15
|
space
|
|
14
16
|
} = tokens;
|
|
@@ -16,7 +18,109 @@ const {
|
|
|
16
18
|
none
|
|
17
19
|
} = space,
|
|
18
20
|
spaceWithoutNone = _objectWithoutProperties(space, ["none"]);
|
|
19
|
-
const
|
|
21
|
+
const fontSizes = Object.entries(tokens.typography.size).reduce((sizes, _ref) => {
|
|
22
|
+
let [scale, fontSize] = _ref;
|
|
23
|
+
sizes[scale] = fontSize;
|
|
24
|
+
return sizes;
|
|
25
|
+
}, {});
|
|
26
|
+
const lineHeights = Object.entries(tokens.typography.size).reduce((sizes, _ref2) => {
|
|
27
|
+
let [scale, lineHeight] = _ref2;
|
|
28
|
+
sizes[scale] = lineHeight;
|
|
29
|
+
return sizes;
|
|
30
|
+
}, {});
|
|
31
|
+
const intentForegroundColours = Object.entries(tokens.colours.intent).reduce((acc, _ref3) => {
|
|
32
|
+
let [intent, {
|
|
33
|
+
foreground
|
|
34
|
+
}] = _ref3;
|
|
35
|
+
acc[intent] = foreground;
|
|
36
|
+
return acc;
|
|
37
|
+
}, {});
|
|
38
|
+
const intentBackgroundColoursStandard = Object.entries(tokens.colours.intent).reduce((acc, _ref4) => {
|
|
39
|
+
let [intent, {
|
|
40
|
+
background
|
|
41
|
+
}] = _ref4;
|
|
42
|
+
acc[intent] = background.standard;
|
|
43
|
+
return acc;
|
|
44
|
+
}, {});
|
|
45
|
+
const borderColors = _objectSpread({
|
|
46
|
+
default: tokens.color.interactive.border,
|
|
47
|
+
muted: tokens.color.interactive.borderMuted,
|
|
48
|
+
disabled: tokens.color.interactive.borderDisabled
|
|
49
|
+
}, tokens.color.surface);
|
|
50
|
+
const gapSizesWithVar = Object.entries(space).reduce((acc, _ref5) => {
|
|
51
|
+
let [key, value] = _ref5;
|
|
52
|
+
acc[key] = {
|
|
53
|
+
vars: {
|
|
54
|
+
[gapVar]: value
|
|
55
|
+
},
|
|
56
|
+
gap: value
|
|
57
|
+
};
|
|
58
|
+
return acc;
|
|
59
|
+
}, {});
|
|
60
|
+
const baseProperties = defineProperties({
|
|
61
|
+
'@layer': cssLayerUtil,
|
|
62
|
+
properties: {
|
|
63
|
+
borderRadius: tokens.border.radius,
|
|
64
|
+
borderBottomColor: borderColors,
|
|
65
|
+
borderLeftColor: borderColors,
|
|
66
|
+
borderRightColor: borderColors,
|
|
67
|
+
borderTopColor: borderColors,
|
|
68
|
+
borderLeftWidth: tokens.border.width,
|
|
69
|
+
borderBottomWidth: tokens.border.width,
|
|
70
|
+
borderRightWidth: tokens.border.width,
|
|
71
|
+
borderTopWidth: tokens.border.width,
|
|
72
|
+
borderLeftStyle: ['none', 'solid'],
|
|
73
|
+
borderBottomStyle: ['none', 'solid'],
|
|
74
|
+
borderRightStyle: ['none', 'solid'],
|
|
75
|
+
borderTopStyle: ['none', 'solid'],
|
|
76
|
+
color: tokens.color.content,
|
|
77
|
+
backgroundColor: _objectSpread(_objectSpread({}, tokens.color.surface), {}, {
|
|
78
|
+
transparent: 'transparent'
|
|
79
|
+
}),
|
|
80
|
+
opacity: ['1', '0'],
|
|
81
|
+
fontSize: fontSizes,
|
|
82
|
+
lineHeight: lineHeights,
|
|
83
|
+
fontWeight: tokens.typography.fontWeight,
|
|
84
|
+
boxShadow: tokens.elevation,
|
|
85
|
+
pointerEvents: ['auto', 'none'],
|
|
86
|
+
userSelect: ['auto', 'text', 'none']
|
|
87
|
+
},
|
|
88
|
+
shorthands: {
|
|
89
|
+
text: ['fontSize', 'lineHeight'],
|
|
90
|
+
bg: ['backgroundColor'],
|
|
91
|
+
fg: ['color'],
|
|
92
|
+
borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
|
|
93
|
+
borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
|
|
94
|
+
borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth']
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export const sprinkles = createSprinkles(baseProperties);
|
|
98
|
+
const legacyColourProperties = defineProperties({
|
|
99
|
+
'@layer': cssLayerUtil,
|
|
100
|
+
properties: {
|
|
101
|
+
backgroundColor: _objectSpread(_objectSpread(_objectSpread({}, intentBackgroundColoursStandard), tokens.colours.gamut), {}, {
|
|
102
|
+
transparent: 'transparent'
|
|
103
|
+
}),
|
|
104
|
+
borderBottomColor: tokens.border.colours,
|
|
105
|
+
borderLeftColor: tokens.border.colours,
|
|
106
|
+
borderRightColor: tokens.border.colours,
|
|
107
|
+
borderTopColor: tokens.border.colours,
|
|
108
|
+
color: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, intentForegroundColours), tokens.colours.foreground), tokens.colours.gamut), {}, {
|
|
109
|
+
unset: 'unset'
|
|
110
|
+
})
|
|
111
|
+
},
|
|
112
|
+
shorthands: {
|
|
113
|
+
backgroundColour: ['backgroundColor'],
|
|
114
|
+
borderBottomColour: ['borderBottomColor'],
|
|
115
|
+
borderLeftColour: ['borderLeftColor'],
|
|
116
|
+
borderRightColour: ['borderRightColor'],
|
|
117
|
+
borderTopColour: ['borderTopColor'],
|
|
118
|
+
borderColour: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
|
|
119
|
+
colour: ['color']
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export const sprinklesLegacyColours = createSprinkles(legacyColourProperties);
|
|
123
|
+
export const responsiveConditions = {
|
|
20
124
|
mobile: {},
|
|
21
125
|
tablet: {
|
|
22
126
|
'@media': `screen and (min-width: ${breakpoints.tablet})`
|
|
@@ -28,39 +132,109 @@ const responsiveConditions = {
|
|
|
28
132
|
'@media': `screen and (min-width: ${breakpoints.largeDesktop})`
|
|
29
133
|
}
|
|
30
134
|
};
|
|
135
|
+
export const totalGridColumns = 12;
|
|
31
136
|
const responsiveProperties = defineProperties({
|
|
32
|
-
|
|
137
|
+
'@layer': cssLayerUtil,
|
|
138
|
+
conditions: responsiveConditions,
|
|
33
139
|
defaultCondition: 'mobile',
|
|
140
|
+
responsiveArray: ['mobile', 'tablet', 'desktop', 'largeDesktop'],
|
|
34
141
|
properties: {
|
|
35
|
-
display: ['none', 'block', 'flex', 'grid', 'inline-block', 'inline-flex'],
|
|
36
|
-
|
|
142
|
+
display: ['none', 'block', 'contents', 'flex', 'grid', 'inline', 'inline-block', 'inline-flex'],
|
|
143
|
+
overflow: ['auto', 'hidden', 'visible'],
|
|
144
|
+
overflowX: ['auto', 'scroll', 'hidden'],
|
|
145
|
+
overflowY: ['auto', 'scroll', 'hidden'],
|
|
146
|
+
position: ['static', 'relative', 'absolute', 'fixed', 'sticky'],
|
|
147
|
+
textAlign: ['left', 'center', 'right'],
|
|
148
|
+
height: _objectSpread(_objectSpread({}, spaceWithoutNone), {}, {
|
|
149
|
+
'fit-content': 'fit-content',
|
|
150
|
+
'max-content': 'max-content',
|
|
151
|
+
'min-content': 'max-content',
|
|
152
|
+
full: '100%',
|
|
153
|
+
auto: 'auto'
|
|
154
|
+
}),
|
|
155
|
+
width: _objectSpread(_objectSpread({}, spaceWithoutNone), {}, {
|
|
156
|
+
'fit-content': 'fit-content',
|
|
157
|
+
'max-content': 'max-content',
|
|
158
|
+
'min-content': 'min-content',
|
|
159
|
+
full: '100%',
|
|
160
|
+
auto: 'auto'
|
|
161
|
+
}),
|
|
162
|
+
maxWidth: ['fit-content', 'max-content'],
|
|
163
|
+
minWidth: ['auto', 'fit-content'],
|
|
164
|
+
gap: gapSizesWithVar,
|
|
165
|
+
columnGap: space,
|
|
166
|
+
rowGap: space,
|
|
167
|
+
alignItems: ['flex-start', 'center', 'flex-end', 'baseline', 'stretch'],
|
|
168
|
+
justifyContent: ['flex-start', 'center', 'flex-end', 'space-around', 'space-between', 'space-evenly', 'stretch'],
|
|
169
|
+
alignContent: ['flex-start', 'center', 'flex-end', 'space-around', 'space-between', 'space-evenly', 'stretch'],
|
|
170
|
+
alignSelf: ['flex-start', 'center', 'flex-end', 'stretch'],
|
|
171
|
+
justifySelf: ['flex-start', 'center', 'flex-end'],
|
|
172
|
+
flexDirection: ['row', 'column', 'row-reverse', 'column-reverse'],
|
|
37
173
|
flexGrow: [0, 1],
|
|
38
174
|
flexShrink: [0, 1],
|
|
39
175
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
40
|
-
|
|
176
|
+
order: [0, 1, 2, 3, 4],
|
|
177
|
+
gridAutoColumns: ['auto', '1fr', 'min-content', 'max-content'],
|
|
178
|
+
gridAutoRows: ['auto', '1fr'],
|
|
179
|
+
gridAutoFlow: ['row', 'column', 'row dense', 'column dense'],
|
|
41
180
|
gridTemplateColumns: {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'3': 'repeat(3, 1fr)',
|
|
45
|
-
'4': 'repeat(4, 1fr)',
|
|
46
|
-
'5': 'repeat(5, 1fr)'
|
|
181
|
+
auto: 'auto',
|
|
182
|
+
none: 'none'
|
|
47
183
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
184
|
+
gridTemplateRows: {
|
|
185
|
+
auto: 'auto',
|
|
186
|
+
none: 'none'
|
|
187
|
+
},
|
|
188
|
+
gridColumn: {
|
|
189
|
+
'1/2': `span ${totalGridColumns / 2}`,
|
|
190
|
+
'1/3': `span ${totalGridColumns / 3}`,
|
|
191
|
+
'2/3': `span ${totalGridColumns / 3 * 2}`,
|
|
192
|
+
'1/4': `span ${totalGridColumns / 4}`,
|
|
193
|
+
'3/4': `span ${totalGridColumns / 4 * 3}`,
|
|
194
|
+
'1/6': `span ${totalGridColumns / 6}`,
|
|
195
|
+
'2/6': `span ${totalGridColumns / 6 * 2}`,
|
|
196
|
+
'3/6': `span ${totalGridColumns / 6 * 3}`,
|
|
197
|
+
'4/6': `span ${totalGridColumns / 6 * 4}`,
|
|
198
|
+
full: `span ${totalGridColumns}`,
|
|
199
|
+
auto: 'auto'
|
|
200
|
+
},
|
|
201
|
+
paddingBottom: tokens.space,
|
|
202
|
+
paddingLeft: tokens.space,
|
|
203
|
+
paddingRight: tokens.space,
|
|
204
|
+
paddingTop: tokens.space,
|
|
205
|
+
marginBottom: tokens.space,
|
|
206
|
+
marginLeft: _objectSpread(_objectSpread({}, tokens.space), {}, {
|
|
53
207
|
auto: 'auto'
|
|
54
208
|
}),
|
|
55
|
-
|
|
56
|
-
'100%': '100%',
|
|
209
|
+
marginRight: _objectSpread(_objectSpread({}, tokens.space), {}, {
|
|
57
210
|
auto: 'auto'
|
|
58
|
-
})
|
|
211
|
+
}),
|
|
212
|
+
marginTop: tokens.space
|
|
59
213
|
},
|
|
60
214
|
shorthands: {
|
|
61
215
|
gridColumns: ['gridTemplateColumns'],
|
|
62
216
|
placeItems: ['justifyContent', 'alignItems'],
|
|
63
|
-
size: ['width', 'height']
|
|
217
|
+
size: ['width', 'height'],
|
|
218
|
+
padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
|
|
219
|
+
p: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
|
|
220
|
+
paddingX: ['paddingLeft', 'paddingRight'],
|
|
221
|
+
px: ['paddingLeft', 'paddingRight'],
|
|
222
|
+
paddingY: ['paddingTop', 'paddingBottom'],
|
|
223
|
+
py: ['paddingTop', 'paddingBottom'],
|
|
224
|
+
pt: ['paddingTop'],
|
|
225
|
+
pr: ['paddingRight'],
|
|
226
|
+
pb: ['paddingBottom'],
|
|
227
|
+
pl: ['paddingLeft'],
|
|
228
|
+
margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
|
|
229
|
+
m: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
|
|
230
|
+
marginX: ['marginLeft', 'marginRight'],
|
|
231
|
+
mx: ['marginLeft', 'marginRight'],
|
|
232
|
+
marginY: ['marginTop', 'marginBottom'],
|
|
233
|
+
my: ['marginTop', 'marginBottom'],
|
|
234
|
+
mt: ['marginTop'],
|
|
235
|
+
mr: ['marginRight'],
|
|
236
|
+
mb: ['marginBottom'],
|
|
237
|
+
ml: ['marginLeft']
|
|
64
238
|
}
|
|
65
239
|
});
|
|
66
240
|
export const sprinklesResponsive = createSprinkles(responsiveProperties);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vars.css.d.ts","sourceRoot":"","sources":["../../lib/styles/vars.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,oFAAgC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
+
__vanilla_filescope__.setFileScope("lib/styles/vars.css.ts", "@autoguru/overdrive");
|
|
5
|
+
import { createGlobalVar } from '@vanilla-extract/css';
|
|
6
|
+
export const gapVar = createGlobalVar('od-var-gap');
|
|
7
|
+
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.setup.d.ts","sourceRoot":"","sources":["../../lib/test/vitest.setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BreakPoints, ColourMap, FlattenedColours, ThemeTokens } from '.';
|
|
2
2
|
export declare const breakpoints: BreakPoints;
|
|
3
|
+
export declare const mediaQuery: Record<import("./types").DeviceSize, string>;
|
|
3
4
|
export declare const themeTokensWithLayer: (tokens: ThemeTokens) => {
|
|
4
5
|
mode: string;
|
|
5
6
|
body: import("./helpers").TokensFromContract<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeTheme.d.ts","sourceRoot":"","sources":["../../lib/themes/makeTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"makeTheme.d.ts","sourceRoot":"","sources":["../../lib/themes/makeTheme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAE/E,eAAO,MAAM,WAAW,EAAE,WAKzB,CAAC;AAEF,eAAO,MAAM,UAAU,8CAGtB,CAAC;AAKF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGtD,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAC7B,qBAAoB,WAAyB;;CAG5C,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,GAAI,SAAS,SAAS,KAAG,gBAepD,CAAC"}
|
package/dist/themes/makeTheme.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
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
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
|
+
import { mapValues } from 'es-toolkit';
|
|
6
7
|
import { cssLayerTheme } from "../styles/layers.css.js";
|
|
7
8
|
export const breakpoints = {
|
|
8
9
|
mobile: '0px',
|
|
@@ -10,6 +11,7 @@ export const breakpoints = {
|
|
|
10
11
|
desktop: '1024px',
|
|
11
12
|
largeDesktop: '1920px'
|
|
12
13
|
};
|
|
14
|
+
export const mediaQuery = mapValues(breakpoints, breakpoint => `screen and (min-width: ${breakpoint})`);
|
|
13
15
|
export const themeTokensWithLayer = tokens => _objectSpread({
|
|
14
16
|
'@layer': cssLayerTheme
|
|
15
17
|
}, tokens);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IAItB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IAItB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAKD,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,GAAG,MAAM,CAAC"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Ref, RefCallback } from 'react';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
+
import type { SprinklesResponsive } from 'styles/sprinkles.css';
|
|
3
4
|
export declare const isBrowser: boolean;
|
|
4
5
|
export declare const isomorphicLayoutEffect: typeof useEffect;
|
|
5
6
|
export declare const useUncontrolledState: <T extends unknown>(value: T, onChange?: (value: T) => void) => [T, (value: T) => void];
|
|
@@ -14,7 +15,7 @@ export declare const ownerWindow: (node?: Node) => Window;
|
|
|
14
15
|
export declare const useEventCallback: <T extends Function>(fn: T) => (...args: any[]) => undefined;
|
|
15
16
|
export declare const animate: <T extends HTMLElement>(element: T, property: keyof T, to: number, duration?: number) => (() => void) | void;
|
|
16
17
|
export type Alignment = 'left' | 'right' | 'center';
|
|
17
|
-
export declare const alignmentToFlexAlignment: (align: Alignment) => "
|
|
18
|
+
export declare const alignmentToFlexAlignment: (align: Alignment) => SprinklesResponsive["justifyContent"];
|
|
18
19
|
export declare const arrayRingLookup: <T extends ArrayLike<unknown>>(collection: T) => (index: any) => unknown;
|
|
19
20
|
export declare const noop: () => void;
|
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAa,MAAM,OAAO,CAAC;AACzD,OAAO,EAEN,SAAS,EAIT,MAAM,OAAO,CAAC;AAEf,eAAO,MAAM,SAAS,SAAgC,CAAC;AAEvD,eAAO,MAAM,sBAAsB,kBAA0C,CAAC;AAG9E,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,OAAO,EACrD,OAAO,CAAC,EACR,WAAW,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAC3B,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAMxB,CAAC;AAGF,eAAO,MAAM,uBAAuB,GAAI,CAAC,EAAE,CAAC,EAC3C,eAAe,CAAC,EAChB,mBAAmB,CAAC,KAClB,CAAC,CAAC,EAAE,CAAC,CAWP,CAAC;AAaF,eAAO,MAAM,KAAK,GAAI,cAAc,MAAM,KAAG,MAAM,GAAG,IAkBrD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,SAM9C,CAAC;AAOF,wBAAgB,SAAS,CAAC,CAAC,EAC1B,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,GACpC,WAAW,CAAC,CAAC,CAAC,CAUhB;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,OAAO,IAAI,OACF,CAAC;AAE3D,eAAO,MAAM,QAAQ,GAAI,MAAC,EAAE,cAAW,WAII,CAAC;AAE5C,eAAO,MAAM,aAAa,GAAI,OAAO,IAAI,KAAG,QACZ,CAAC;AAEjC,eAAO,MAAM,WAAW,GAAI,OAAO,IAAI,KAAG,MACC,CAAC;AAU5C,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,QAAQ,EAAE,IAAI,CAAC,kCAOzD,CAAC;AAMF,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,WAAW,EAC5C,SAAS,CAAC,EACV,UAAU,MAAM,CAAC,EACjB,IAAI,MAAM,EACV,iBAAc,KACZ,CAAC,MAAM,IAAI,CAAC,GAAG,IA8BjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AACpD,eAAO,MAAM,wBAAwB,GAAI,OAAO,SAAS,KAK3C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAa,MAAM,OAAO,CAAC;AACzD,OAAO,EAEN,SAAS,EAIT,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,eAAO,MAAM,SAAS,SAAgC,CAAC;AAEvD,eAAO,MAAM,sBAAsB,kBAA0C,CAAC;AAG9E,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,OAAO,EACrD,OAAO,CAAC,EACR,WAAW,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAC3B,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAMxB,CAAC;AAGF,eAAO,MAAM,uBAAuB,GAAI,CAAC,EAAE,CAAC,EAC3C,eAAe,CAAC,EAChB,mBAAmB,CAAC,KAClB,CAAC,CAAC,EAAE,CAAC,CAWP,CAAC;AAaF,eAAO,MAAM,KAAK,GAAI,cAAc,MAAM,KAAG,MAAM,GAAG,IAkBrD,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,SAM9C,CAAC;AAOF,wBAAgB,SAAS,CAAC,CAAC,EAC1B,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,GACpC,WAAW,CAAC,CAAC,CAAC,CAUhB;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,OAAO,KAAG,OAAO,IAAI,OACF,CAAC;AAE3D,eAAO,MAAM,QAAQ,GAAI,MAAC,EAAE,cAAW,WAII,CAAC;AAE5C,eAAO,MAAM,aAAa,GAAI,OAAO,IAAI,KAAG,QACZ,CAAC;AAEjC,eAAO,MAAM,WAAW,GAAI,OAAO,IAAI,KAAG,MACC,CAAC;AAU5C,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,QAAQ,EAAE,IAAI,CAAC,kCAOzD,CAAC;AAMF,eAAO,MAAM,OAAO,GAAI,CAAC,SAAS,WAAW,EAC5C,SAAS,CAAC,EACV,UAAU,MAAM,CAAC,EACjB,IAAI,MAAM,EACV,iBAAc,KACZ,CAAC,MAAM,IAAI,CAAC,GAAG,IA8BjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AACpD,eAAO,MAAM,wBAAwB,GAAI,OAAO,SAAS,KAK3C,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAYpD,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,SAAS,CAAC,OAAO,CAAC,EAC3D,YAAY,CAAC,MAGL,UAAK,YACb,CAAC;AAEF,eAAO,MAAM,IAAI,YAAW,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -98,8 +98,8 @@ export const animate = function (element, property, to) {
|
|
|
98
98
|
};
|
|
99
99
|
export const alignmentToFlexAlignment = align => ({
|
|
100
100
|
center: 'center',
|
|
101
|
-
left: '
|
|
102
|
-
right: '
|
|
101
|
+
left: 'flex-start',
|
|
102
|
+
right: 'flex-end'
|
|
103
103
|
})[align];
|
|
104
104
|
export const arrayRingLookup = collection => {
|
|
105
105
|
const len = collection.length;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Sprinkles, type SprinklesLegacyColours, type SprinklesResponsive } from '../styles/sprinkles.css';
|
|
2
|
+
export declare const isSprinklesProperty: (key: string) => boolean;
|
|
3
|
+
export declare const isSprinklesLegacyColourProperty: (key: string) => boolean;
|
|
4
|
+
export declare const isSprinklesResponsiveProperty: (key: string) => boolean;
|
|
5
|
+
export declare const filterSprinklesProps: <T extends object>(props: T) => {
|
|
6
|
+
sprinklesProps: Sprinkles;
|
|
7
|
+
sprinklesResponsiveProps: SprinklesResponsive;
|
|
8
|
+
sprinklesLegacyColourProps: SprinklesLegacyColours;
|
|
9
|
+
};
|
|
10
|
+
export declare const filterNonSprinklesProps: <T extends object>(props: T) => { [K in keyof T]: T[K]; };
|
|
11
|
+
//# sourceMappingURL=sprinkles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sprinkles.d.ts","sourceRoot":"","sources":["../../lib/utils/sprinkles.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,SAAS,EAEd,KAAK,sBAAsB,EAE3B,KAAK,mBAAmB,EACxB,MAAM,yBAAyB,CAAC;AAKjC,eAAO,MAAM,mBAAmB,GAAI,KAAK,MAAM,YAE9C,CAAC;AAKF,eAAO,MAAM,+BAA+B,GAAI,KAAK,MAAM,YAI1D,CAAC;AAKF,eAAO,MAAM,6BAA6B,GAAI,KAAK,MAAM,YAExD,CAAC;AAQF,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,MAAM,EAAE,OAAO,CAAC;oBAatC,SAAS;8BACC,mBAAmB;gCACjB,sBAAsB;CAEzD,CAAC;AAQH,eAAO,MAAM,uBAAuB,GAAI,CAAC,SAAS,MAAM,EAAE,OAAO,CAAC,QAe9D,CAAC,qBAEH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { sprinkles, sprinklesLegacyColours, sprinklesResponsive } from "../styles/sprinkles.css.js";
|
|
4
|
+
export const isSprinklesProperty = key => {
|
|
5
|
+
return sprinkles.properties.has(key);
|
|
6
|
+
};
|
|
7
|
+
export const isSprinklesLegacyColourProperty = key => {
|
|
8
|
+
return sprinklesLegacyColours.properties.has(key);
|
|
9
|
+
};
|
|
10
|
+
export const isSprinklesResponsiveProperty = key => {
|
|
11
|
+
return sprinklesResponsive.properties.has(key);
|
|
12
|
+
};
|
|
13
|
+
export const filterSprinklesProps = props => Object.entries(props).reduce((acc, _ref) => {
|
|
14
|
+
let [key, value] = _ref;
|
|
15
|
+
if (isSprinklesProperty(key)) {
|
|
16
|
+
acc.sprinklesProps[key] = value;
|
|
17
|
+
} else if (isSprinklesResponsiveProperty(key)) {
|
|
18
|
+
acc.sprinklesResponsiveProps[key] = value;
|
|
19
|
+
} else if (isSprinklesLegacyColourProperty(key)) {
|
|
20
|
+
acc.sprinklesLegacyColourProps[key] = value;
|
|
21
|
+
}
|
|
22
|
+
return acc;
|
|
23
|
+
}, {
|
|
24
|
+
sprinklesProps: {},
|
|
25
|
+
sprinklesResponsiveProps: {},
|
|
26
|
+
sprinklesLegacyColourProps: {}
|
|
27
|
+
});
|
|
28
|
+
export const filterNonSprinklesProps = props => Object.entries(props).reduce((acc, _ref2) => {
|
|
29
|
+
let [key, value] = _ref2;
|
|
30
|
+
if (!(isSprinklesProperty(key) || isSprinklesResponsiveProperty(key) || isSprinklesLegacyColourProperty(key))) {
|
|
31
|
+
acc[key] = value;
|
|
32
|
+
}
|
|
33
|
+
return acc;
|
|
34
|
+
}, {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autoguru/overdrive",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.43.0-next.0",
|
|
4
4
|
"description": "Overdrive is a product component library, and design system for AutoGuru.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,12 +46,13 @@
|
|
|
46
46
|
"lint:eslint": "eslint \"lib/**/*.+(ts|tsx)\" --fix --quiet",
|
|
47
47
|
"lint": "yarn run lint:eslint && yarn run lint:tsc",
|
|
48
48
|
"release": "changeset publish",
|
|
49
|
-
"start": "
|
|
49
|
+
"start": "yarn storybook",
|
|
50
50
|
"storybook:extract": "npx sb extract",
|
|
51
51
|
"storybook": "storybook dev -p 6006",
|
|
52
52
|
"storybook:build": "storybook build",
|
|
53
|
-
"test": "vitest",
|
|
54
|
-
"test:ci": "yarn vitest run --no-cache --coverage",
|
|
53
|
+
"test": "vitest --project=specs",
|
|
54
|
+
"test:ci": "yarn vitest run --no-cache --coverage --project=specs",
|
|
55
|
+
"test:a11y": "vitest run --coverage --project=storybook",
|
|
55
56
|
"typeEmit": "tsc -d --declarationDir dist --emitDeclarationOnly",
|
|
56
57
|
"watch": "tsc --watch",
|
|
57
58
|
"prepare": "husky"
|
|
@@ -69,25 +70,25 @@
|
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@autoguru/babel-preset": "^3.2.0",
|
|
71
72
|
"@autoguru/eslint-plugin": "2.0.0",
|
|
72
|
-
"@autoguru/icons": "1.8.
|
|
73
|
+
"@autoguru/icons": "1.8.10",
|
|
73
74
|
"@autoguru/tsconfig": "^1.3.1",
|
|
74
75
|
"@autoguru/utilities": "^1.3.3",
|
|
75
|
-
"@babel/cli": "7.27.
|
|
76
|
-
"@babel/core": "7.
|
|
76
|
+
"@babel/cli": "7.27.1",
|
|
77
|
+
"@babel/core": "7.27.1",
|
|
77
78
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
78
|
-
"@babel/plugin-proposal-export-default-from": "
|
|
79
|
+
"@babel/plugin-proposal-export-default-from": "7.27.1",
|
|
79
80
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
80
81
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
81
82
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
82
83
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
83
|
-
"@babel/plugin-transform-classes": "
|
|
84
|
-
"@babel/plugin-transform-runtime": "
|
|
85
|
-
"@babel/plugin-transform-spread": "
|
|
86
|
-
"@babel/plugin-transform-strict-mode": "
|
|
87
|
-
"@babel/preset-env": "
|
|
88
|
-
"@babel/preset-react": "
|
|
89
|
-
"@babel/preset-typescript": "7.27.
|
|
90
|
-
"@babel/runtime-corejs3": "7.27.
|
|
84
|
+
"@babel/plugin-transform-classes": "7.27.1",
|
|
85
|
+
"@babel/plugin-transform-runtime": "7.27.1",
|
|
86
|
+
"@babel/plugin-transform-spread": "7.27.1",
|
|
87
|
+
"@babel/plugin-transform-strict-mode": "7.27.1",
|
|
88
|
+
"@babel/preset-env": "7.27.1",
|
|
89
|
+
"@babel/preset-react": "7.27.1",
|
|
90
|
+
"@babel/preset-typescript": "7.27.1",
|
|
91
|
+
"@babel/runtime-corejs3": "7.27.1",
|
|
91
92
|
"@changesets/cli": "2.29.2",
|
|
92
93
|
"@chromatic-com/storybook": "^3.2.6",
|
|
93
94
|
"@internationalized/date": "^3.7.0",
|
|
@@ -97,10 +98,10 @@
|
|
|
97
98
|
"@storybook/addon-a11y": "8.6.12",
|
|
98
99
|
"@storybook/addon-actions": "8.6.12",
|
|
99
100
|
"@storybook/addon-essentials": "8.6.12",
|
|
100
|
-
"@storybook/addon-interactions": "8.6.12",
|
|
101
101
|
"@storybook/addon-links": "8.6.12",
|
|
102
102
|
"@storybook/addon-onboarding": "8.6.12",
|
|
103
103
|
"@storybook/blocks": "8.6.12",
|
|
104
|
+
"@storybook/experimental-addon-test": "^8.6.12",
|
|
104
105
|
"@storybook/manager-api": "8.6.12",
|
|
105
106
|
"@storybook/react": "8.6.12",
|
|
106
107
|
"@storybook/react-vite": "8.6.12",
|
|
@@ -121,7 +122,8 @@
|
|
|
121
122
|
"@vanilla-extract/sprinkles": "^1.6.3",
|
|
122
123
|
"@vanilla-extract/vite-plugin": "^5.0.1",
|
|
123
124
|
"@vanilla-extract/webpack-plugin": "^2.3.18",
|
|
124
|
-
"@vitest/
|
|
125
|
+
"@vitest/browser": "3.1.2",
|
|
126
|
+
"@vitest/coverage-v8": "3.1.2",
|
|
125
127
|
"@vitest/eslint-plugin": "1.1.43",
|
|
126
128
|
"babel-plugin-add-import-extension": "^1.6.0",
|
|
127
129
|
"babel-plugin-dev-expression": "^0.2.3",
|
|
@@ -135,7 +137,7 @@
|
|
|
135
137
|
"csstype": "^3.1.3",
|
|
136
138
|
"deepmerge": "^4.3.1",
|
|
137
139
|
"es-toolkit": "1.35.0",
|
|
138
|
-
"eslint": "9.
|
|
140
|
+
"eslint": "9.26.0",
|
|
139
141
|
"eslint-plugin-storybook": "0.12.0",
|
|
140
142
|
"husky": "^9.1.7",
|
|
141
143
|
"intersection-observer": "^0.12.2",
|
|
@@ -144,6 +146,7 @@
|
|
|
144
146
|
"magic-string": "^0.30.17",
|
|
145
147
|
"mini-css-extract-plugin": "^2.9.2",
|
|
146
148
|
"mockdate": "^3.0.5",
|
|
149
|
+
"playwright": "^1.52.0",
|
|
147
150
|
"plop": "^4.0.1",
|
|
148
151
|
"postcss": "^8.5.3",
|
|
149
152
|
"prettier": "^3.5.3",
|
|
@@ -163,9 +166,9 @@
|
|
|
163
166
|
"storybook-addon-tag-badges": "^1.4.0",
|
|
164
167
|
"typescript": "5.8.3",
|
|
165
168
|
"url-loader": "^4.1.1",
|
|
166
|
-
"vite": "6.3.
|
|
167
|
-
"vitest": "^3.1.
|
|
168
|
-
"webpack": "5.99.
|
|
169
|
+
"vite": "6.3.3",
|
|
170
|
+
"vitest": "^3.1.2",
|
|
171
|
+
"webpack": "5.99.7"
|
|
169
172
|
},
|
|
170
173
|
"peerDependencies": {
|
|
171
174
|
"@autoguru/icons": ">=1.8.8",
|
|
@@ -191,4 +194,4 @@
|
|
|
191
194
|
"yarn": "4.9.1"
|
|
192
195
|
},
|
|
193
196
|
"packageManager": "yarn@4.9.1"
|
|
194
|
-
}
|
|
197
|
+
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare const padding: {
|
|
2
|
-
top: Record<string | number, any>;
|
|
3
|
-
right: Record<string | number, any>;
|
|
4
|
-
bottom: Record<string | number, any>;
|
|
5
|
-
left: Record<string | number, any>;
|
|
6
|
-
};
|
|
7
|
-
export declare const margin: {
|
|
8
|
-
top: Record<string | number, any>;
|
|
9
|
-
right: Record<string | number, any>;
|
|
10
|
-
bottom: Record<string | number, any>;
|
|
11
|
-
left: Record<string | number, any>;
|
|
12
|
-
};
|
|
13
|
-
export declare const boxShadow: Record<string | number, any>;
|
|
14
|
-
export declare const border: {
|
|
15
|
-
style: string;
|
|
16
|
-
colour: {
|
|
17
|
-
top: Record<"gray" | "success" | "danger" | "warning" | "light" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "dark", string>;
|
|
18
|
-
right: Record<"gray" | "success" | "danger" | "warning" | "light" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "dark", string>;
|
|
19
|
-
bottom: Record<"gray" | "success" | "danger" | "warning" | "light" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "dark", string>;
|
|
20
|
-
left: Record<"gray" | "success" | "danger" | "warning" | "light" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "dark", string>;
|
|
21
|
-
};
|
|
22
|
-
width: {
|
|
23
|
-
top: Record<string | number, any>;
|
|
24
|
-
right: Record<string | number, any>;
|
|
25
|
-
bottom: Record<string | number, any>;
|
|
26
|
-
left: Record<string | number, any>;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare const borderRadius: Record<string | number, any>;
|
|
30
|
-
export declare const backgroundColours: Record<"white" | "black900" | "black800" | "black700" | "black600" | "black500" | "black400" | "black300" | "black200" | "black100" | "gray900" | "gray800" | "gray700" | "gray600" | "gray500" | "gray400" | "gray300" | "gray200" | "gray100" | "green900" | "green800" | "green700" | "green600" | "green500" | "green400" | "green300" | "green200" | "green100" | "blue900" | "blue800" | "blue700" | "blue600" | "blue500" | "blue400" | "blue300" | "blue200" | "blue100" | "yellow900" | "yellow800" | "yellow700" | "yellow600" | "yellow500" | "yellow400" | "yellow300" | "yellow200" | "yellow100" | "red900" | "red800" | "red700" | "red600" | "red500" | "red400" | "red300" | "red200" | "red100" | "success" | "danger" | "warning" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "transparent", string>;
|
|
31
|
-
export declare const colours: Record<"success" | "danger" | "warning" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information", string>;
|
|
32
|
-
export declare const width: Record<"none" | "full", string>;
|
|
33
|
-
export declare const height: Record<"full", string>;
|
|
34
|
-
export declare const position: Record<"fixed" | "absolute" | "relative", string>;
|
|
35
|
-
export declare const textAlign: Record<"left" | "right" | "center", string>;
|
|
36
|
-
export declare const overflow: Record<"auto" | "hidden" | "visible" | "scroll", string>;
|
|
37
|
-
export declare const display: Record<"none" | "flex" | "grid" | "block" | "contents" | "inline" | "inlineFlex" | "inlineBlock", string>;
|
|
38
|
-
export declare const opacity: Record<0 | 1, string>;
|
|
39
|
-
export declare const userSelect: Record<"none", string>;
|
|
40
|
-
export declare const order: Record<string | number, any>;
|
|
41
|
-
export declare const alignItems: Record<string | number, any>;
|
|
42
|
-
export declare const flexDirection: Record<string | number, any>;
|
|
43
|
-
export declare const flexGrow: Record<0 | 1, string>;
|
|
44
|
-
export declare const flexShrink: Record<0, string>;
|
|
45
|
-
export declare const flexWrap: Record<"nowrap" | "wrap", string>;
|
|
46
|
-
export declare const justifyContent: Record<string | number, any>;
|
|
47
|
-
export declare const pointerEvents: Record<"none", string>;
|
|
48
|
-
//# sourceMappingURL=useBoxStyles.css.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBoxStyles.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/useBoxStyles.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC;AAEF,eAAO,MAAM,SAAS,8BAAmD,CAAC;AAwC1E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAsBlB,CAAC;AAEF,eAAO,MAAM,YAAY,8BAGxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,yzBAE7B,CAAC;AAEF,eAAO,MAAM,OAAO,4HAEnB,CAAC;AAEF,eAAO,MAAM,KAAK,iCAOhB,CAAC;AAEH,eAAO,MAAM,MAAM,wBAIjB,CAAC;AAEH,eAAO,MAAM,QAAQ,mDASpB,CAAC;AAEF,eAAO,MAAM,SAAS,6CASrB,CAAC;AAEF,eAAO,MAAM,QAAQ,0DAUpB,CAAC;AAEF,eAAO,MAAM,OAAO,2GAcnB,CAAC;AAEF,eAAO,MAAM,OAAO,uBAGlB,CAAC;AAEH,eAAO,MAAM,UAAU,wBAErB,CAAC;AAIH,eAAO,MAAM,KAAK,8BAOjB,CAAC;AAEF,eAAO,MAAM,UAAU,8BAOtB,CAAC;AAEF,eAAO,MAAM,aAAa,8BAQzB,CAAC;AAEF,eAAO,MAAM,QAAQ,uBAQpB,CAAC;AAEF,eAAO,MAAM,UAAU,mBAOtB,CAAC;AAEF,eAAO,MAAM,QAAQ,mCAQpB,CAAC;AAEF,eAAO,MAAM,cAAc,8BAS1B,CAAC;AAEF,eAAO,MAAM,aAAa,wBAExB,CAAC"}
|