@autoguru/overdrive 4.45.2-next.0 → 4.46.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/DateTimePicker/CalendarButton.js +2 -2
- package/dist/components/DateTimePicker/CalendarGrid.js +2 -2
- package/dist/components/DateTimePicker/DateTimePicker.css.d.ts +2 -10
- package/dist/components/DateTimePicker/DateTimePicker.css.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.css.js +108 -81
- package/dist/components/OptionGrid/OptionGrid.css.d.ts +33 -34
- package/dist/components/OptionGrid/OptionGrid.css.d.ts.map +1 -1
- package/dist/components/OptionGrid/OptionGrid.css.js +208 -146
- package/dist/components/OptionGrid/OptionGrid.d.ts +16 -5
- package/dist/components/OptionGrid/OptionGrid.d.ts.map +1 -1
- package/dist/components/OptionGrid/OptionGrid.js +38 -13
- package/dist/components/OptionList/OptionList.css.d.ts +2 -10
- package/dist/components/OptionList/OptionList.css.d.ts.map +1 -1
- package/dist/components/OptionList/OptionList.css.js +92 -92
- package/dist/components/OptionList/OptionList.d.ts +7 -0
- package/dist/components/OptionList/OptionList.d.ts.map +1 -1
- package/dist/components/OptionList/OptionListItem.js +3 -3
- package/dist/components/SearchBar/SearchBar.css.d.ts +7 -12
- package/dist/components/SearchBar/SearchBar.css.d.ts.map +1 -1
- package/dist/components/SearchBar/SearchBar.css.js +121 -66
- package/dist/components/SearchBar/SearchBar.d.ts.map +1 -1
- package/dist/components/SearchBar/SearchBar.js +17 -10
- package/dist/hooks/useMedia/useMedia.spec.d.ts +2 -0
- package/dist/hooks/useMedia/useMedia.spec.d.ts.map +1 -0
- package/dist/hooks/useMedia/useMedia.spec.js +288 -0
- package/dist/styles/selectors.d.ts +13 -0
- package/dist/styles/selectors.d.ts.map +1 -0
- package/dist/styles/selectors.js +26 -0
- package/dist/utils/css.d.ts +0 -22
- package/dist/utils/css.d.ts.map +1 -1
- package/dist/utils/css.js +0 -52
- package/dist/utils/css.spec.d.ts +2 -0
- package/dist/utils/css.spec.d.ts.map +1 -0
- package/dist/utils/css.spec.js +66 -0
- package/dist/utils/object.spec.d.ts +2 -0
- package/dist/utils/object.spec.d.ts.map +1 -0
- package/dist/utils/object.spec.js +135 -0
- package/dist/utils/responsiveStyle.spec.d.ts +2 -0
- package/dist/utils/responsiveStyle.spec.d.ts.map +1 -0
- package/dist/utils/responsiveStyle.spec.js +134 -0
- package/dist/utils/utils.spec.d.ts.map +1 -1
- package/dist/utils/utils.spec.js +342 -0
- package/package.json +8 -8
|
@@ -5,7 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
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
6
|
import React, { useRef } from 'react';
|
|
7
7
|
import { useButton } from 'react-aria';
|
|
8
|
-
import {
|
|
8
|
+
import { buttonStyle } from "./DateTimePicker.css.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export const CalendarButton = props => {
|
|
11
11
|
const ref = useRef(null);
|
|
@@ -13,7 +13,7 @@ export const CalendarButton = props => {
|
|
|
13
13
|
buttonProps
|
|
14
14
|
} = useButton(props, ref);
|
|
15
15
|
return /*#__PURE__*/_jsx("button", _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
16
|
-
className:
|
|
16
|
+
className: buttonStyle,
|
|
17
17
|
ref: ref,
|
|
18
18
|
children: props.children
|
|
19
19
|
}));
|
|
@@ -10,7 +10,7 @@ import { getWeeksInMonth } from '@internationalized/date';
|
|
|
10
10
|
import React, { useRef } from 'react';
|
|
11
11
|
import { useCalendarCell, useCalendarGrid, useLocale } from 'react-aria';
|
|
12
12
|
import { dataAttrs } from "../../utils/dataAttrs.js";
|
|
13
|
-
import { calendarGridStyle,
|
|
13
|
+
import { calendarGridStyle, cellStyle, tdStyle, thStyle } from "./DateTimePicker.css.js";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const CalendarCell = ({
|
|
16
16
|
state,
|
|
@@ -33,7 +33,7 @@ const CalendarCell = ({
|
|
|
33
33
|
children: /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
34
34
|
ref: ref,
|
|
35
35
|
hidden: isOutsideVisibleRange,
|
|
36
|
-
className:
|
|
36
|
+
className: cellStyle
|
|
37
37
|
}, dataAttrs({
|
|
38
38
|
selected: isSelected,
|
|
39
39
|
disabled: isDisabled,
|
|
@@ -3,16 +3,8 @@ export declare const queryContainerStyle: string;
|
|
|
3
3
|
export declare const layoutStyle: string;
|
|
4
4
|
export declare const calendarGridStyle: string;
|
|
5
5
|
export declare const calendarStyle: string;
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
[x: string]: string | import("@vanilla-extract/css").ComplexStyleRule;
|
|
9
|
-
};
|
|
10
|
-
}>;
|
|
11
|
-
export declare const styledButton: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
12
|
-
[x: string]: {
|
|
13
|
-
[x: string]: string | import("@vanilla-extract/css").ComplexStyleRule;
|
|
14
|
-
};
|
|
15
|
-
}>;
|
|
6
|
+
export declare const cellStyle: string;
|
|
7
|
+
export declare const buttonStyle: string;
|
|
16
8
|
export declare const thStyle: string;
|
|
17
9
|
export declare const tdStyle: string;
|
|
18
10
|
export declare const titleStyle: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.css.d.ts","sourceRoot":"","sources":["../../../lib/components/DateTimePicker/DateTimePicker.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc,QAAoB,CAAC;AAChD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"DateTimePicker.css.d.ts","sourceRoot":"","sources":["../../../lib/components/DateTimePicker/DateTimePicker.css.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc,QAAoB,CAAC;AAChD,eAAO,MAAM,mBAAmB,QAO9B,CAAC;AAEH,eAAO,MAAM,WAAW,QAWtB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAW5B,CAAC;AAEH,eAAO,MAAM,aAAa,QAQxB,CAAC;AAIH,eAAO,MAAM,SAAS,QAmCpB,CAAC;AAIH,eAAO,MAAM,WAAW,QAoCtB,CAAC;AAEH,eAAO,MAAM,OAAO,QAMlB,CAAC;AAEH,eAAO,MAAM,OAAO,QAGlB,CAAC;AAGH,eAAO,MAAM,UAAU,QAGrB,CAAC"}
|
|
@@ -3,111 +3,138 @@
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
4
|
__vanilla_filescope__.setFileScope("lib/components/DateTimePicker/DateTimePicker.css.ts", "@autoguru/overdrive");
|
|
5
5
|
import { createContainer, style } from '@vanilla-extract/css';
|
|
6
|
-
import { recipe } from '@vanilla-extract/recipes';
|
|
7
6
|
import { focusOutlineStyle } from "../../styles/focusOutline.css.js";
|
|
7
|
+
import { cssLayerComponent } from "../../styles/layers.css.js";
|
|
8
|
+
import { selectors } from "../../styles/selectors.js";
|
|
8
9
|
import { sprinkles } from "../../styles/sprinkles.css.js";
|
|
9
|
-
import { overdriveTokens as tokens } from "../../themes/index.js";
|
|
10
10
|
import { breakpoints } from "../../themes/makeTheme.js";
|
|
11
|
-
import {
|
|
11
|
+
import { overdriveTokens as tokens } from "../../themes/theme.css.js"; // === Container styles
|
|
12
12
|
export const queryContainer = createContainer("queryContainer");
|
|
13
13
|
export const queryContainerStyle = style({
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
'@layer': {
|
|
15
|
+
[cssLayerComponent]: {
|
|
16
|
+
containerName: queryContainer,
|
|
17
|
+
containerType: 'inline-size'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
16
20
|
}, "queryContainerStyle");
|
|
17
21
|
export const layoutStyle = style({
|
|
18
|
-
'@
|
|
19
|
-
[
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
'@layer': {
|
|
23
|
+
[cssLayerComponent]: {
|
|
24
|
+
'@container': {
|
|
25
|
+
[`${queryContainer} (min-width: ${breakpoints.tablet})`]: {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
gap: tokens.space[7]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
}
|
|
24
32
|
}, "layoutStyle");
|
|
25
33
|
export const calendarGridStyle = style({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
'@layer': {
|
|
35
|
+
[cssLayerComponent]: {
|
|
36
|
+
width: '100%',
|
|
37
|
+
'@container': {
|
|
38
|
+
[`${queryContainer} (min-width: ${breakpoints.tablet})`]: {
|
|
39
|
+
width: 'auto'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
30
42
|
}
|
|
31
43
|
}
|
|
32
44
|
}, "calendarGridStyle");
|
|
33
|
-
export const calendarStyle = style({
|
|
45
|
+
export const calendarStyle = style([sprinkles({
|
|
34
46
|
alignItems: 'center',
|
|
35
47
|
display: 'flex',
|
|
36
|
-
justifyContent: '
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, "calendarStyle");
|
|
48
|
+
justifyContent: 'spaceBetween',
|
|
49
|
+
mb: '2',
|
|
50
|
+
px: '1'
|
|
51
|
+
})], "calendarStyle");
|
|
40
52
|
|
|
41
|
-
//
|
|
53
|
+
// === Cell styles
|
|
42
54
|
|
|
43
|
-
export const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
export const cellStyle = style([sprinkles({
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
display: 'flex',
|
|
58
|
+
justifyContent: 'center',
|
|
59
|
+
size: '7',
|
|
60
|
+
borderRadius: 'md'
|
|
61
|
+
}), {
|
|
62
|
+
'@layer': {
|
|
63
|
+
[cssLayerComponent]: {
|
|
64
|
+
background: tokens.colours.background.body,
|
|
65
|
+
color: tokens.colours.foreground.body,
|
|
66
|
+
cursor: 'pointer',
|
|
67
|
+
selectors: {
|
|
68
|
+
[selectors.focusVisible]: {
|
|
69
|
+
background: tokens.colours.gamut.gray200
|
|
70
|
+
},
|
|
71
|
+
[selectors.selected]: {
|
|
72
|
+
background: tokens.colours.foreground.body,
|
|
73
|
+
color: tokens.colours.background.body
|
|
74
|
+
},
|
|
75
|
+
[selectors.hoverNotSelected]: {
|
|
76
|
+
background: tokens.colours.gamut.gray200
|
|
77
|
+
},
|
|
78
|
+
[selectors.disabled]: {
|
|
79
|
+
background: tokens.colours.background.body,
|
|
80
|
+
color: tokens.colours.gamut.gray400,
|
|
81
|
+
cursor: 'default'
|
|
82
|
+
}
|
|
83
|
+
}
|
|
65
84
|
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
}), focusOutlineStyle]
|
|
69
|
-
}, "styledCell");
|
|
85
|
+
}
|
|
86
|
+
}, focusOutlineStyle], "cellStyle");
|
|
70
87
|
|
|
71
|
-
//
|
|
88
|
+
// === Button styles
|
|
72
89
|
|
|
73
|
-
export const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
export const buttonStyle = style([sprinkles({
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
borderColour: 'gray',
|
|
93
|
+
borderRadius: 'md',
|
|
94
|
+
borderStyle: 'solid',
|
|
95
|
+
borderWidth: '1',
|
|
96
|
+
display: 'flex',
|
|
97
|
+
justifyContent: 'center',
|
|
98
|
+
padding: 'none',
|
|
99
|
+
size: '7'
|
|
100
|
+
}), {
|
|
101
|
+
'@layer': {
|
|
102
|
+
[cssLayerComponent]: {
|
|
103
|
+
background: tokens.colours.background.body,
|
|
104
|
+
color: tokens.colours.gamut.gray600,
|
|
105
|
+
cursor: 'pointer',
|
|
106
|
+
selectors: {
|
|
107
|
+
[selectors.hoverNotDisabled]: {
|
|
108
|
+
background: tokens.colours.gamut.gray200
|
|
109
|
+
},
|
|
110
|
+
[selectors.focusVisible]: {
|
|
111
|
+
background: tokens.colours.gamut.gray200
|
|
112
|
+
},
|
|
113
|
+
[selectors.disabled]: {
|
|
114
|
+
background: tokens.colours.background.body,
|
|
115
|
+
borderColor: tokens.border.colours.light,
|
|
116
|
+
color: tokens.colours.gamut.gray300,
|
|
117
|
+
cursor: 'not-allowed'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
95
120
|
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
}), focusOutlineStyle]
|
|
99
|
-
}, "styledButton");
|
|
121
|
+
}
|
|
122
|
+
}, focusOutlineStyle], "buttonStyle");
|
|
100
123
|
export const thStyle = style({
|
|
101
|
-
|
|
124
|
+
'@layer': {
|
|
125
|
+
[cssLayerComponent]: {
|
|
126
|
+
color: tokens.colours.gamut.gray600
|
|
127
|
+
}
|
|
128
|
+
}
|
|
102
129
|
}, "thStyle");
|
|
103
|
-
export const tdStyle =
|
|
104
|
-
padding:
|
|
130
|
+
export const tdStyle = sprinkles({
|
|
131
|
+
padding: '1',
|
|
105
132
|
textAlign: 'center'
|
|
106
|
-
}
|
|
133
|
+
});
|
|
107
134
|
|
|
108
|
-
//
|
|
109
|
-
export const titleStyle =
|
|
110
|
-
fontWeight:
|
|
111
|
-
margin:
|
|
112
|
-
}
|
|
135
|
+
// === Heading styles
|
|
136
|
+
export const titleStyle = sprinkles({
|
|
137
|
+
fontWeight: 'bold',
|
|
138
|
+
margin: 'none'
|
|
139
|
+
});
|
|
113
140
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,57 +1,56 @@
|
|
|
1
1
|
import { type RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
import { cssLayerComponent } from '../../styles/layers.css';
|
|
2
3
|
export declare const gridContainer: string;
|
|
3
4
|
export declare const gridContainerStyle: string;
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const gridVariants: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
5
6
|
columns: {
|
|
6
7
|
'1': {};
|
|
7
8
|
'2': {
|
|
8
|
-
'@
|
|
9
|
-
[
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
'@layer': {
|
|
10
|
+
[cssLayerComponent]: {
|
|
11
|
+
'@container': {
|
|
12
|
+
[x: string]: {
|
|
13
|
+
gridTemplateColumns: "repeat(2, 1fr)";
|
|
14
|
+
} | {
|
|
15
|
+
gridTemplateColumns: "repeat(3, 1fr)";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
13
18
|
};
|
|
14
19
|
};
|
|
15
20
|
};
|
|
16
21
|
'3': {
|
|
17
|
-
'@
|
|
18
|
-
[
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
'@layer': {
|
|
23
|
+
[cssLayerComponent]: {
|
|
24
|
+
'@container': {
|
|
25
|
+
[x: string]: {
|
|
26
|
+
gridTemplateColumns: "repeat(2, 1fr)";
|
|
27
|
+
} | {
|
|
28
|
+
gridTemplateColumns: "repeat(3, 1fr)";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
22
31
|
};
|
|
23
32
|
};
|
|
24
33
|
};
|
|
25
34
|
'4': string;
|
|
26
35
|
'5': (string | {
|
|
27
|
-
'@
|
|
28
|
-
[
|
|
29
|
-
|
|
36
|
+
'@layer': {
|
|
37
|
+
[cssLayerComponent]: {
|
|
38
|
+
'@container': {
|
|
39
|
+
[x: string]: {
|
|
40
|
+
gridTemplateColumns: "repeat(5, 1fr)";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
30
43
|
};
|
|
31
44
|
};
|
|
32
45
|
})[];
|
|
33
46
|
};
|
|
34
47
|
}>;
|
|
35
|
-
export type
|
|
36
|
-
export declare const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export type StyledGridItemProps = NonNullable<RecipeVariants<typeof styledGridItem>>;
|
|
42
|
-
export declare const styleIndicator: string;
|
|
43
|
-
export declare const styledCheckbox: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
44
|
-
[x: string]: {
|
|
45
|
-
[x: string]: string | import("@vanilla-extract/css").ComplexStyleRule;
|
|
46
|
-
};
|
|
47
|
-
}>;
|
|
48
|
-
export type StyledCheckboxProps = NonNullable<RecipeVariants<typeof styledCheckbox>>;
|
|
49
|
-
export declare const styledRadioButton: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
50
|
-
[x: string]: {
|
|
51
|
-
[x: string]: string | import("@vanilla-extract/css").ComplexStyleRule;
|
|
52
|
-
};
|
|
53
|
-
}>;
|
|
54
|
-
export type StyledRadioButtonProps = NonNullable<RecipeVariants<typeof styledRadioButton>>;
|
|
48
|
+
export type GridVariants = NonNullable<RecipeVariants<typeof gridVariants>>;
|
|
49
|
+
export declare const gridItemContainerStyle: string;
|
|
50
|
+
export declare const gridItemStyle: string;
|
|
51
|
+
export declare const indicatorStyle: string;
|
|
52
|
+
export declare const checkboxStyle: string;
|
|
53
|
+
export declare const radioButtonStyle: string;
|
|
55
54
|
export declare const labelStyle: string;
|
|
56
55
|
export declare const descriptionStyle: string;
|
|
57
56
|
//# sourceMappingURL=OptionGrid.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionGrid.css.d.ts","sourceRoot":"","sources":["../../../lib/components/OptionGrid/OptionGrid.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"OptionGrid.css.d.ts","sourceRoot":"","sources":["../../../lib/components/OptionGrid/OptionGrid.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAQ5D,eAAO,MAAM,aAAa,QAAoB,CAAC;AAC/C,eAAO,MAAM,kBAAkB,QAO7B,CAAC;AA4BH,eAAO,MAAM,YAAY;;;;;gBAWpB,CAAC,iBAAiB,CAAC;;;;;;;;kBASlB;;;;;gBAKD,CAAC,iBAAiB,CAAC;;;;;;;;kBAUlB;;;;;;gBAQA,CAAC,iBAAiB,CAAC;;;;;;kBAMlB;;;;EASL,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,cAAc,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAY5E,eAAO,MAAM,sBAAsB,QAsBjC,CAAC;AAEH,eAAO,MAAM,aAAa,QA8CxB,CAAC;AAIH,eAAO,MAAM,cAAc,QAOzB,CAAC;AAEH,eAAO,MAAM,aAAa,QAkCxB,CAAC;AA4BH,eAAO,MAAM,gBAAgB,QAkC3B,CAAC;AAIH,eAAO,MAAM,UAAU,QAA+B,CAAC;AACvD,eAAO,MAAM,gBAAgB,QAA+B,CAAC"}
|