@autoguru/overdrive 4.45.2 → 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.
Files changed (43) hide show
  1. package/dist/components/DateTimePicker/CalendarButton.js +2 -2
  2. package/dist/components/DateTimePicker/CalendarGrid.js +2 -2
  3. package/dist/components/DateTimePicker/DateTimePicker.css.d.ts +2 -10
  4. package/dist/components/DateTimePicker/DateTimePicker.css.d.ts.map +1 -1
  5. package/dist/components/DateTimePicker/DateTimePicker.css.js +108 -81
  6. package/dist/components/OptionGrid/OptionGrid.css.d.ts +33 -34
  7. package/dist/components/OptionGrid/OptionGrid.css.d.ts.map +1 -1
  8. package/dist/components/OptionGrid/OptionGrid.css.js +208 -146
  9. package/dist/components/OptionGrid/OptionGrid.d.ts +16 -5
  10. package/dist/components/OptionGrid/OptionGrid.d.ts.map +1 -1
  11. package/dist/components/OptionGrid/OptionGrid.js +38 -13
  12. package/dist/components/OptionList/OptionList.css.d.ts +2 -10
  13. package/dist/components/OptionList/OptionList.css.d.ts.map +1 -1
  14. package/dist/components/OptionList/OptionList.css.js +92 -92
  15. package/dist/components/OptionList/OptionList.d.ts +7 -0
  16. package/dist/components/OptionList/OptionList.d.ts.map +1 -1
  17. package/dist/components/OptionList/OptionListItem.js +3 -3
  18. package/dist/components/SearchBar/SearchBar.css.d.ts +7 -12
  19. package/dist/components/SearchBar/SearchBar.css.d.ts.map +1 -1
  20. package/dist/components/SearchBar/SearchBar.css.js +121 -66
  21. package/dist/components/SearchBar/SearchBar.d.ts.map +1 -1
  22. package/dist/components/SearchBar/SearchBar.js +17 -10
  23. package/dist/hooks/useMedia/useMedia.spec.d.ts +2 -0
  24. package/dist/hooks/useMedia/useMedia.spec.d.ts.map +1 -0
  25. package/dist/hooks/useMedia/useMedia.spec.js +288 -0
  26. package/dist/styles/selectors.d.ts +13 -0
  27. package/dist/styles/selectors.d.ts.map +1 -0
  28. package/dist/styles/selectors.js +26 -0
  29. package/dist/utils/css.d.ts +0 -22
  30. package/dist/utils/css.d.ts.map +1 -1
  31. package/dist/utils/css.js +0 -52
  32. package/dist/utils/css.spec.d.ts +2 -0
  33. package/dist/utils/css.spec.d.ts.map +1 -0
  34. package/dist/utils/css.spec.js +66 -0
  35. package/dist/utils/object.spec.d.ts +2 -0
  36. package/dist/utils/object.spec.d.ts.map +1 -0
  37. package/dist/utils/object.spec.js +135 -0
  38. package/dist/utils/responsiveStyle.spec.d.ts +2 -0
  39. package/dist/utils/responsiveStyle.spec.d.ts.map +1 -0
  40. package/dist/utils/responsiveStyle.spec.js +134 -0
  41. package/dist/utils/utils.spec.d.ts.map +1 -1
  42. package/dist/utils/utils.spec.js +342 -0
  43. 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 { styledButton } from "./DateTimePicker.css.js";
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: styledButton(),
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, styledCell, tdStyle, thStyle } from "./DateTimePicker.css.js";
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: styledCell()
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 styledCell: import("@vanilla-extract/recipes").RuntimeFn<{
7
- [x: string]: {
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,QAG9B,CAAC;AAEH,eAAO,MAAM,WAAW,QAOtB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAO5B,CAAC;AAEH,eAAO,MAAM,aAAa,QAMxB,CAAC;AAIH,eAAO,MAAM,UAAU;;;;EA+BrB,CAAC;AAIH,eAAO,MAAM,YAAY;;;;EA+BvB,CAAC;AAEH,eAAO,MAAM,OAAO,QAElB,CAAC;AAEH,eAAO,MAAM,OAAO,QAGlB,CAAC;AAGH,eAAO,MAAM,UAAU,QAGrB,CAAC"}
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 { interactionStyle } from "../../utils/css.js"; // --- Container styles
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
- containerName: queryContainer,
15
- containerType: 'inline-size'
14
+ '@layer': {
15
+ [cssLayerComponent]: {
16
+ containerName: queryContainer,
17
+ containerType: 'inline-size'
18
+ }
19
+ }
16
20
  }, "queryContainerStyle");
17
21
  export const layoutStyle = style({
18
- '@container': {
19
- [`${queryContainer} (min-width: ${breakpoints.tablet})`]: {
20
- display: 'flex',
21
- gap: tokens.space[7]
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
- width: '100%',
27
- '@container': {
28
- [`${queryContainer} (min-width: ${breakpoints.tablet})`]: {
29
- width: 'auto'
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: 'space-between',
37
- marginBottom: tokens.space[2],
38
- padding: `0 ${tokens.space[1]}`
39
- }, "calendarStyle");
48
+ justifyContent: 'spaceBetween',
49
+ mb: '2',
50
+ px: '1'
51
+ })], "calendarStyle");
40
52
 
41
- // -- Cell styles
53
+ // === Cell styles
42
54
 
43
- export const styledCell = recipe({
44
- base: [{
45
- alignItems: 'center',
46
- backgroundColor: tokens.colours.background.body,
47
- borderRadius: tokens.border.radius['md'],
48
- color: tokens.colours.foreground.body,
49
- cursor: 'pointer',
50
- display: 'inline-flex',
51
- fontSize: 'md',
52
- justifyContent: 'center'
53
- }, interactionStyle({
54
- hoverNotSelected: {
55
- backgroundColor: tokens.colours.gamut.gray200
56
- },
57
- selected: {
58
- backgroundColor: tokens.colours.foreground.body,
59
- color: tokens.colours.background.body
60
- },
61
- disabled: {
62
- backgroundColor: tokens.colours.background.body,
63
- color: tokens.colours.gamut.gray400,
64
- cursor: 'default'
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
- }), sprinkles({
67
- size: '7'
68
- }), focusOutlineStyle]
69
- }, "styledCell");
85
+ }
86
+ }, focusOutlineStyle], "cellStyle");
70
87
 
71
- // -- Button styles
88
+ // === Button styles
72
89
 
73
- export const styledButton = recipe({
74
- base: [{
75
- alignItems: 'center',
76
- backgroundColor: tokens.colours.background.body,
77
- borderColor: tokens.border.colours.gray,
78
- borderRadius: tokens.border.radius['md'],
79
- borderStyle: 'solid',
80
- borderWidth: tokens.border.width[1],
81
- color: tokens.colours.gamut.gray600,
82
- cursor: 'pointer',
83
- display: 'flex',
84
- justifyContent: 'center',
85
- padding: 0
86
- }, interactionStyle({
87
- hover: {
88
- backgroundColor: tokens.colours.gamut.gray200
89
- },
90
- disabled: {
91
- backgroundColor: tokens.colours.background.body,
92
- borderColor: tokens.border.colours.light,
93
- color: tokens.colours.gamut.gray300,
94
- cursor: 'not-allowed'
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
- }), sprinkles({
97
- size: '7'
98
- }), focusOutlineStyle]
99
- }, "styledButton");
121
+ }
122
+ }, focusOutlineStyle], "buttonStyle");
100
123
  export const thStyle = style({
101
- color: tokens.colours.gamut.gray600
124
+ '@layer': {
125
+ [cssLayerComponent]: {
126
+ color: tokens.colours.gamut.gray600
127
+ }
128
+ }
102
129
  }, "thStyle");
103
- export const tdStyle = style({
104
- padding: tokens.space[1],
130
+ export const tdStyle = sprinkles({
131
+ padding: '1',
105
132
  textAlign: 'center'
106
- }, "tdStyle");
133
+ });
107
134
 
108
- // -- Heading styles
109
- export const titleStyle = style({
110
- fontWeight: tokens.typography.fontWeight.bold,
111
- margin: 0
112
- }, "titleStyle");
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 styledGrid: import("@vanilla-extract/recipes").RuntimeFn<{
5
+ export declare const gridVariants: import("@vanilla-extract/recipes").RuntimeFn<{
5
6
  columns: {
6
7
  '1': {};
7
8
  '2': {
8
- '@container': {
9
- [x: string]: {
10
- gridTemplateColumns: "repeat(2, 1fr)";
11
- } | {
12
- gridTemplateColumns: "repeat(3, 1fr)";
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
- '@container': {
18
- [x: string]: {
19
- gridTemplateColumns: "repeat(2, 1fr)";
20
- } | {
21
- gridTemplateColumns: "repeat(3, 1fr)";
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
- '@container': {
28
- [x: string]: {
29
- gridTemplateColumns: "repeat(5, 1fr)";
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 StyledGridProps = NonNullable<RecipeVariants<typeof styledGrid>>;
36
- export declare const styledGridItem: import("@vanilla-extract/recipes").RuntimeFn<{
37
- [x: string]: {
38
- [x: string]: string | import("@vanilla-extract/css").ComplexStyleRule;
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;AASvE,eAAO,MAAM,aAAa,QAAoB,CAAC;AAC/C,eAAO,MAAM,kBAAkB,QAG7B,CAAC;AAuBH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CrB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;AAO7E,eAAO,MAAM,cAAc;;;;EAkDzB,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAC5C,cAAc,CAAC,OAAO,cAAc,CAAC,CACrC,CAAC;AAGF,eAAO,MAAM,cAAc,QAGzB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;EAiCzB,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAC5C,cAAc,CAAC,OAAO,cAAc,CAAC,CACrC,CAAC;AAwBF,eAAO,MAAM,iBAAiB;;;;EAgC5B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAC/C,cAAc,CAAC,OAAO,iBAAiB,CAAC,CACxC,CAAC;AAIF,eAAO,MAAM,UAAU,QAErB,CAAC;AAEH,eAAO,MAAM,gBAAgB,QAE3B,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"}