@autoguru/overdrive 4.11.2 → 4.11.3

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 (204) hide show
  1. package/dist/components/Actions/stories.js +0 -5
  2. package/dist/components/Alert/Alert.css.d.ts +1 -2
  3. package/dist/components/Alert/Alert.css.d.ts.map +1 -1
  4. package/dist/components/Alert/Alert.css.js +8 -21
  5. package/dist/components/Alert/Alert.d.ts +2 -2
  6. package/dist/components/Alert/Alert.d.ts.map +1 -1
  7. package/dist/components/Alert/Alert.js +10 -4
  8. package/dist/components/Alert/stories.js +0 -10
  9. package/dist/components/Anchor/Anchor.css.js +0 -3
  10. package/dist/components/Anchor/Anchor.js +0 -2
  11. package/dist/components/Anchor/stories.js +0 -9
  12. package/dist/components/AutoSuggest/AutoSuggest.css.js +0 -3
  13. package/dist/components/AutoSuggest/AutoSuggest.js +56 -102
  14. package/dist/components/AutoSuggest/stories.js +0 -28
  15. package/dist/components/AutoSuggest/useLayoutSuggestionVisible.js +0 -2
  16. package/dist/components/Badge/Badge.css.js +0 -3
  17. package/dist/components/Badge/stories.js +0 -12
  18. package/dist/components/Box/Box.js +53 -57
  19. package/dist/components/Box/argTypes.d.ts.map +1 -1
  20. package/dist/components/Box/argTypes.js +0 -3
  21. package/dist/components/Box/stories.js +0 -5
  22. package/dist/components/Box/useBoxStyles.css.d.ts.map +1 -1
  23. package/dist/components/Box/useBoxStyles.css.js +0 -8
  24. package/dist/components/Box/useBoxStyles.d.ts.map +1 -1
  25. package/dist/components/BulletList/Bullet.css.js +0 -3
  26. package/dist/components/BulletList/Bullet.js +0 -6
  27. package/dist/components/BulletList/BulletList.css.js +0 -3
  28. package/dist/components/BulletList/stories.js +0 -6
  29. package/dist/components/BulletText/BulletText.css.js +0 -3
  30. package/dist/components/BulletText/stories.js +0 -5
  31. package/dist/components/Button/Button.css.js +0 -3
  32. package/dist/components/Button/Button.js +0 -11
  33. package/dist/components/Button/stories.js +0 -6
  34. package/dist/components/CheckBox/CheckBox.css.js +0 -3
  35. package/dist/components/CheckBox/stories.js +3 -11
  36. package/dist/components/ColourInput/ColourInput.css.js +0 -3
  37. package/dist/components/ColourInput/ColourInput.js +9 -13
  38. package/dist/components/ColourInput/stories.js +0 -23
  39. package/dist/components/Columns/Column.css.js +0 -5
  40. package/dist/components/Columns/Column.js +10 -14
  41. package/dist/components/Columns/Columns.css.js +0 -3
  42. package/dist/components/Columns/Columns.js +11 -15
  43. package/dist/components/Columns/stories.js +0 -6
  44. package/dist/components/DateInput/DateInput.js +9 -13
  45. package/dist/components/DateInput/stories.js +0 -25
  46. package/dist/components/DatePicker/DatePicker.css.js +0 -3
  47. package/dist/components/DatePicker/DatePicker.js +8 -13
  48. package/dist/components/DatePicker/stories.js +0 -5
  49. package/dist/components/DividerLine/DividerLine.css.d.ts +0 -5
  50. package/dist/components/DividerLine/DividerLine.css.d.ts.map +1 -1
  51. package/dist/components/DividerLine/DividerLine.css.js +1 -31
  52. package/dist/components/DividerLine/DividerLine.d.ts +2 -1
  53. package/dist/components/DividerLine/DividerLine.d.ts.map +1 -1
  54. package/dist/components/DividerLine/DividerLine.js +2 -1
  55. package/dist/components/DividerLine/stories.js +0 -9
  56. package/dist/components/Flyout/Flyout.js +7 -11
  57. package/dist/components/Flyout/stories.js +0 -6
  58. package/dist/components/Heading/stories.js +0 -7
  59. package/dist/components/Icon/Icon.css.js +0 -3
  60. package/dist/components/Icon/stories.js +0 -11
  61. package/dist/components/Image/Image.js +3 -7
  62. package/dist/components/Image/ResponsiveImage.js +6 -10
  63. package/dist/components/Image/SimpleImage.js +7 -11
  64. package/dist/components/Image/stories.js +0 -13
  65. package/dist/components/Inline/Inline.js +0 -6
  66. package/dist/components/Inline/stories.js +0 -6
  67. package/dist/components/LinearProgressIndicator/LinearProgressIndicator.css.js +0 -3
  68. package/dist/components/LinearProgressIndicator/stories.js +0 -5
  69. package/dist/components/LoadingBox/LoadingBox.css.js +0 -3
  70. package/dist/components/LoadingBox/LoadingBox.js +8 -14
  71. package/dist/components/LoadingBox/stories.js +0 -5
  72. package/dist/components/Meta/Meta.css.js +0 -3
  73. package/dist/components/Meta/stories.js +0 -5
  74. package/dist/components/MinimalModal/MinimalModal.css.js +0 -3
  75. package/dist/components/MinimalModal/MinimalModal.js +0 -2
  76. package/dist/components/MinimalModal/stories.js +0 -11
  77. package/dist/components/Modal/Modal.css.d.ts.map +1 -1
  78. package/dist/components/Modal/Modal.css.js +0 -5
  79. package/dist/components/Modal/Modal.d.ts.map +1 -1
  80. package/dist/components/Modal/Modal.js +5 -18
  81. package/dist/components/Modal/stories.js +0 -5
  82. package/dist/components/NumberBubble/NumberBubble.css.js +0 -3
  83. package/dist/components/NumberBubble/NumberBubble.js +5 -9
  84. package/dist/components/NumberBubble/stories.js +0 -5
  85. package/dist/components/NumberInput/NumberInput.js +14 -20
  86. package/dist/components/NumberInput/stories.js +0 -25
  87. package/dist/components/OrderedList/OrderedList.css.js +0 -3
  88. package/dist/components/OrderedList/OrderedList.js +0 -4
  89. package/dist/components/OrderedList/stories.js +0 -5
  90. package/dist/components/OutsideClick/OutsideClick.js +0 -3
  91. package/dist/components/OutsideClick/stories.js +0 -6
  92. package/dist/components/OverdriveProvider/OverdriveProvider.js +0 -1
  93. package/dist/components/Pagination/Pagination.css.js +0 -3
  94. package/dist/components/Pagination/Pagination.js +0 -20
  95. package/dist/components/Pagination/stories.js +0 -25
  96. package/dist/components/Portal/Portal.js +0 -7
  97. package/dist/components/Portal/stories.js +0 -9
  98. package/dist/components/Positioner/Positioner.css.js +0 -3
  99. package/dist/components/Positioner/Positioner.js +7 -19
  100. package/dist/components/Positioner/alignment.js +0 -1
  101. package/dist/components/Positioner/stories.js +0 -10
  102. package/dist/components/ProgressBar/ProgressBar.css.js +0 -3
  103. package/dist/components/ProgressBar/stories.js +0 -6
  104. package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +0 -3
  105. package/dist/components/ProgressBarGroup/stories.js +0 -5
  106. package/dist/components/ProgressSpinner/ProgressSpinner.css.js +0 -3
  107. package/dist/components/ProgressSpinner/stories.js +0 -5
  108. package/dist/components/Radio/Radio.css.js +0 -3
  109. package/dist/components/Radio/Radio.js +0 -3
  110. package/dist/components/Radio/stories.js +8 -17
  111. package/dist/components/Section/Section.css.js +0 -3
  112. package/dist/components/Section/stories.js +0 -5
  113. package/dist/components/SelectInput/SelectInput.css.js +0 -3
  114. package/dist/components/SelectInput/SelectInput.js +10 -14
  115. package/dist/components/SelectInput/stories.js +0 -23
  116. package/dist/components/SimplePagination/SimplePagination.js +0 -4
  117. package/dist/components/SimplePagination/stories.js +0 -9
  118. package/dist/components/Stack/Divider.css.js +0 -3
  119. package/dist/components/Stack/Stack.css.js +0 -3
  120. package/dist/components/Stack/Stack.js +0 -2
  121. package/dist/components/Stack/stories.js +0 -11
  122. package/dist/components/StandardModal/StandardModal.css.js +0 -5
  123. package/dist/components/StandardModal/StandardModal.js +0 -4
  124. package/dist/components/StandardModal/stories.js +0 -5
  125. package/dist/components/StarRating/StarRating.css.js +0 -3
  126. package/dist/components/StarRating/StarRating.js +0 -12
  127. package/dist/components/StarRating/stories.js +0 -5
  128. package/dist/components/Stepper/Stepper.css.d.ts.map +1 -1
  129. package/dist/components/Stepper/Stepper.css.js +1 -5
  130. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  131. package/dist/components/Stepper/Stepper.js +4 -8
  132. package/dist/components/Stepper/stories.js +4 -12
  133. package/dist/components/Switch/Switch.css.js +0 -3
  134. package/dist/components/Switch/Switch.js +0 -1
  135. package/dist/components/Switch/stories.js +4 -16
  136. package/dist/components/Table/Table.css.js +0 -3
  137. package/dist/components/Table/TableCell.css.js +0 -3
  138. package/dist/components/Table/TableCell.js +0 -1
  139. package/dist/components/Table/TableHeadCell.css.js +0 -5
  140. package/dist/components/Table/TableHeadCell.js +0 -6
  141. package/dist/components/Table/stories.js +0 -7
  142. package/dist/components/Tabs/Tab.css.js +0 -3
  143. package/dist/components/Tabs/Tab.js +0 -3
  144. package/dist/components/Tabs/TabList.css.js +0 -3
  145. package/dist/components/Tabs/TabList.js +0 -7
  146. package/dist/components/Tabs/TabPane.css.js +0 -3
  147. package/dist/components/Tabs/TabPanes.css.js +0 -3
  148. package/dist/components/Tabs/stories.js +0 -7
  149. package/dist/components/Text/stories.js +0 -10
  150. package/dist/components/Text/useTextStyles.css.js +0 -5
  151. package/dist/components/TextAreaInput/TextAreaInput.js +9 -13
  152. package/dist/components/TextAreaInput/stories.js +0 -20
  153. package/dist/components/TextBubble/TextBubble.css.js +0 -3
  154. package/dist/components/TextBubble/TextBubble.js +5 -13
  155. package/dist/components/TextBubble/stories.js +0 -5
  156. package/dist/components/TextContainer/TextContainer.js +0 -2
  157. package/dist/components/TextContainer/stories.js +0 -5
  158. package/dist/components/TextInput/TextInput.js +9 -14
  159. package/dist/components/TextInput/stories.js +0 -35
  160. package/dist/components/TextLink/TextLink.css.js +0 -3
  161. package/dist/components/TextLink/TextLink.js +9 -18
  162. package/dist/components/TextLink/stories.js +0 -6
  163. package/dist/components/ThemeOverrideProvider/ThemeOverrideProvider.js +0 -3
  164. package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.js +7 -15
  165. package/dist/components/Toaster/Toast.css.js +0 -3
  166. package/dist/components/Toaster/Toast.js +0 -27
  167. package/dist/components/Tooltip/Tooltip.css.js +0 -5
  168. package/dist/components/Tooltip/Tooltip.js +0 -1
  169. package/dist/components/Tooltip/stories.js +0 -5
  170. package/dist/components/VisuallyHidden/VisuallyHidden.css.js +0 -3
  171. package/dist/components/VisuallyHidden/stories.js +0 -5
  172. package/dist/components/private/CheckableBase/CheckableBase.css.js +0 -3
  173. package/dist/components/private/CheckableBase/CheckableBase.js +0 -2
  174. package/dist/components/private/InputBase/HintText.css.js +0 -3
  175. package/dist/components/private/InputBase/InputState.css.js +0 -3
  176. package/dist/components/private/InputBase/NotchedBase.css.js +0 -6
  177. package/dist/components/private/InputBase/NotchedBase.js +0 -1
  178. package/dist/components/private/InputBase/withEnhancedInput.css.js +0 -3
  179. package/dist/components/private/InputBase/withEnhancedInput.js +28 -39
  180. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.css.js +0 -3
  181. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +4 -12
  182. package/dist/hooks/useMedia/stories.js +0 -1
  183. package/dist/hooks/useMedia/useMedia.js +0 -4
  184. package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +0 -3
  185. package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +0 -3
  186. package/dist/hooks/useResponsiveValue/stories.js +0 -1
  187. package/dist/reset/globalFonts.css.js +0 -3
  188. package/dist/reset/globalReset.css.js +0 -3
  189. package/dist/reset/reset.css.js +0 -5
  190. package/dist/themes/base/tokens.js +0 -3
  191. package/dist/themes/base/vars.css.js +0 -3
  192. package/dist/themes/flat_red/tokens.js +0 -3
  193. package/dist/themes/flat_red/vars.css.js +0 -3
  194. package/dist/themes/helpers.js +0 -2
  195. package/dist/themes/makeTheme.js +0 -3
  196. package/dist/themes/neutral/tokens.js +0 -3
  197. package/dist/themes/neutral/vars.css.js +0 -3
  198. package/dist/themes/theme.css.js +0 -5
  199. package/dist/utils/index.js +0 -13
  200. package/dist/utils/mapTokenToProperty.js +0 -3
  201. package/dist/utils/resolveResponsiveProps.js +0 -6
  202. package/dist/utils/responsiveProps.css.js +0 -5
  203. package/dist/utils/responsiveStyle.js +0 -6
  204. package/package.json +1 -1
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
-
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
-
7
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
-
9
6
  import { AccountEditIcon, AlertCircleIcon, CalendarIcon, CarIcon, CarMultipleIcon, CheckIcon, CurrencyUsdIcon, PlusIcon, StarIcon } from '@autoguru/icons';
10
7
  import { action } from '@storybook/addon-actions';
11
8
  import * as React from 'react';
@@ -66,9 +63,7 @@ const argTypes = {
66
63
  }
67
64
  }
68
65
  };
69
-
70
66
  const Template = args => _jsx(TextInput, _objectSpread({}, args));
71
-
72
67
  const sharedProps = {
73
68
  disabled: false,
74
69
  name: 'text',
@@ -86,83 +81,65 @@ const sharedProps = {
86
81
  onBlur: action('onBlur')
87
82
  };
88
83
  const standardProps = sharedProps;
89
-
90
84
  const withAValueProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
91
85
  value: defaultValue,
92
86
  placeholder: defaultPlaceholder
93
87
  });
94
-
95
88
  const withHintTextProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
96
89
  hintText: 'Hint Text',
97
90
  placeholder: defaultPlaceholder
98
91
  });
99
-
100
92
  const withPrefixIconProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
101
93
  prefixIcon: CalendarIcon
102
94
  });
103
-
104
95
  const attachedLeftProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
105
96
  attach: 'LEFT'
106
97
  });
107
-
108
98
  const attachedTopProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
109
99
  attach: 'TOP'
110
100
  });
111
-
112
101
  const attachedRightProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
113
102
  attach: 'RIGHT'
114
103
  });
115
-
116
104
  const attachedBottomProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
117
105
  attach: 'BOTTOM'
118
106
  });
119
-
120
107
  const attachedAllProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
121
108
  attach: 'ALL'
122
109
  });
123
-
124
110
  const mergedLeftProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
125
111
  borderMerged: 'LEFT'
126
112
  });
127
-
128
113
  const mergedTopProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
129
114
  borderMerged: 'TOP'
130
115
  });
131
-
132
116
  const mergedRightProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
133
117
  borderMerged: 'RIGHT'
134
118
  });
135
-
136
119
  const mergedBottomProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
137
120
  borderMerged: 'BOTTOM'
138
121
  });
139
-
140
122
  const mergedAllProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
141
123
  borderMerged: 'ALL'
142
124
  });
143
-
144
125
  const withSuffixIconProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
145
126
  suffixIcon: AccountEditIcon
146
127
  });
147
-
148
128
  const withBothIconsProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
149
129
  prefixIcon: CalendarIcon,
150
130
  suffixIcon: AccountEditIcon
151
131
  });
152
-
153
132
  const disabledProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
154
133
  value: defaultValue,
155
134
  placeholder: defaultPlaceholder,
156
135
  disabled: true
157
136
  });
158
-
159
137
  const validProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
160
138
  value: defaultValue,
161
139
  placeholder: defaultPlaceholder,
162
140
  isTouched: true,
163
141
  isValid: true
164
142
  });
165
-
166
143
  const invalidProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
167
144
  value: 'Bob the builder',
168
145
  placeholder: defaultPlaceholder,
@@ -170,22 +147,18 @@ const invalidProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
170
147
  isValid: false,
171
148
  hintText: 'Cannot be Bob the builder'
172
149
  });
173
-
174
150
  const noNotchProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
175
151
  placeholder: defaultPlaceholder,
176
152
  notch: false
177
153
  });
178
-
179
154
  const noNotchWithValueProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
180
155
  value: defaultValue,
181
156
  placeholder: defaultPlaceholder,
182
157
  notch: false
183
158
  });
184
-
185
159
  const loadingProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
186
160
  isLoading: true
187
161
  });
188
-
189
162
  export const standard = Template.bind(standardProps);
190
163
  standard.args = standardProps;
191
164
  standard.argTypes = argTypes;
@@ -252,37 +225,29 @@ invalid.argTypes = argTypes;
252
225
  export const loading = Template.bind(loadingProps);
253
226
  loading.args = loadingProps;
254
227
  loading.argTypes = argTypes;
255
-
256
228
  const smallProps = _objectSpread(_objectSpread({}, standardProps), {}, {
257
229
  size: 'small'
258
230
  });
259
-
260
231
  export const small = Template.bind(smallProps);
261
232
  small.args = smallProps;
262
233
  small.argTypes = argTypes;
263
-
264
234
  const withValueSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
265
235
  size: 'small'
266
236
  });
267
-
268
237
  export const withValueSmall = Template.bind(withValueSmallProps);
269
238
  withValueSmall.args = withValueSmallProps;
270
239
  withValueSmall.argTypes = argTypes;
271
-
272
240
  const withIconSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
273
241
  prefixIcon: CarIcon,
274
242
  size: 'small'
275
243
  });
276
-
277
244
  export const withIconSmall = Template.bind(withIconSmallProps);
278
245
  withIconSmall.args = withIconSmallProps;
279
246
  withIconSmall.argTypes = argTypes;
280
-
281
247
  const loadingSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
282
248
  isLoading: true,
283
249
  size: 'small'
284
250
  });
285
-
286
251
  export const loadingSmall = Template.bind(loadingSmallProps);
287
252
  loadingSmall.args = loadingSmallProps;
288
253
  loadingSmall.argTypes = argTypes;
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
4
-
5
4
  __vanilla_filescope__.setFileScope("lib/components/TextLink/TextLink.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { style } from '@vanilla-extract/css';
8
6
  import { themeContractVars as vars } from "../../themes/theme.css.js";
9
7
  export const root = style({
@@ -22,5 +20,4 @@ export const muted = style({
22
20
  boxShadow: "inset 0 -1.6em 0 0 ".concat(vars.typography.colour.link)
23
21
  }
24
22
  }, "muted");
25
-
26
23
  __vanilla_filescope__.endFileScope();
@@ -3,11 +3,8 @@
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  const _excluded = ["is", "children", "className", "strong", "fontWeight", "muted", "size"];
6
-
7
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
-
9
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
-
11
8
  import { invariant } from '@autoguru/utilities';
12
9
  import clsx from 'clsx';
13
10
  import * as React from 'react';
@@ -18,20 +15,17 @@ import * as styles from "./TextLink.css.js";
18
15
  import { jsx as _jsx } from "react/jsx-runtime";
19
16
  export const TextLink = forwardRef((_ref, ref) => {
20
17
  var _props$rel;
21
-
22
18
  let {
23
- is: Component,
24
- children,
25
- className,
26
- strong,
27
- fontWeight = 'semiBold',
28
- muted = false,
29
- size
30
- } = _ref,
31
- props = _objectWithoutProperties(_ref, _excluded);
32
-
19
+ is: Component,
20
+ children,
21
+ className,
22
+ strong,
23
+ fontWeight = 'semiBold',
24
+ muted = false,
25
+ size
26
+ } = _ref,
27
+ props = _objectWithoutProperties(_ref, _excluded);
33
28
  !!(Component !== undefined && props.href !== undefined) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You cannot have both href and as defined.') : invariant(false) : void 0;
34
-
35
29
  const body = _jsx(Text, {
36
30
  is: "span",
37
31
  colour: muted ? 'muted' : 'link',
@@ -46,13 +40,11 @@ export const TextLink = forwardRef((_ref, ref) => {
46
40
  }),
47
41
  children: children
48
42
  });
49
-
50
43
  const allProps = _objectSpread(_objectSpread({
51
44
  rel: (_props$rel = props.rel) !== null && _props$rel !== void 0 ? _props$rel : 'noopener noreferrer'
52
45
  }, props), {}, {
53
46
  ref
54
47
  });
55
-
56
48
  if (Component === undefined) {
57
49
  return _jsx(Box, _objectSpread(_objectSpread({
58
50
  is: "a",
@@ -61,7 +53,6 @@ export const TextLink = forwardRef((_ref, ref) => {
61
53
  children: body
62
54
  }));
63
55
  }
64
-
65
56
  return isValidElement(Component) ? cloneElement(Component, allProps, body) : createElement(Component, allProps, body);
66
57
  });
67
58
  export default TextLink;
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
-
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
-
7
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
-
9
6
  import * as React from 'react';
10
7
  import { Box } from "../Box/index.js";
11
8
  import { Text } from "../Text/index.js";
@@ -71,20 +68,17 @@ export default {
71
68
  }
72
69
  }
73
70
  };
74
-
75
71
  const Template = args => _jsx(Box, {
76
72
  children: _jsx(TextLink, _objectSpread(_objectSpread({}, args), {}, {
77
73
  children: "Hello"
78
74
  }))
79
75
  });
80
-
81
76
  const InsideParagraphTemplate = args => _jsxs(Text, {
82
77
  is: "p",
83
78
  children: ["Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad,", ' ', _jsx(TextLink, _objectSpread(_objectSpread({}, args), {}, {
84
79
  children: "Hello"
85
80
  })), " autem consectetur consequuntur eius fugiat illo ipsum nobis numquam, officiis placeat quia, quidem reprehenderit rerum temporibus veniam vero."]
86
81
  });
87
-
88
82
  const standardProps = {
89
83
  muted: false,
90
84
  size: '4',
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
-
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
-
7
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
-
9
6
  import * as React from 'react';
10
7
  import { createContext, useContext, useMemo } from 'react';
11
8
  import { useBuildThemeOverrides } from "./useBuildThemeOverrides.js";
@@ -3,28 +3,22 @@
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
5
  const _excluded = ["primaryColourBorder", "primaryColourForeground", "primaryColourBackgroundStrong", "primaryColourBackgroundMild", "primaryColourBackground"];
6
-
7
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8
-
9
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
-
11
8
  import { assignInlineVars } from '@vanilla-extract/dynamic';
12
9
  import { useMemo, useReducer } from 'react';
13
10
  import { shadedColour } from "../../themes/helpers.js";
14
11
  import { themeContractVars } from "../../themes/theme.css.js";
15
-
16
12
  const reducer = (prevState, action) => {
17
13
  switch (action.type) {
18
14
  case 'SET_THEME_VALUES':
19
15
  {
20
16
  return _objectSpread(_objectSpread({}, prevState), action.payload);
21
17
  }
22
-
23
18
  default:
24
19
  return prevState;
25
20
  }
26
21
  };
27
-
28
22
  export const useBuildThemeOverrides = _ref => {
29
23
  let {
30
24
  primaryColourBackground: incomingPrimaryColourBackground,
@@ -41,16 +35,14 @@ export const useBuildThemeOverrides = _ref => {
41
35
  primaryColourBackgroundMild: incomingPrimaryColourBackgroundMild,
42
36
  primaryColourBackgroundStrong: incomingPrimaryColourBackgroundStrong
43
37
  });
44
-
45
38
  const {
46
- primaryColourBorder,
47
- primaryColourForeground,
48
- primaryColourBackgroundStrong,
49
- primaryColourBackgroundMild,
50
- primaryColourBackground
51
- } = _ref2,
52
- extraColours = _objectWithoutProperties(_ref2, _excluded);
53
-
39
+ primaryColourBorder,
40
+ primaryColourForeground,
41
+ primaryColourBackgroundStrong,
42
+ primaryColourBackgroundMild,
43
+ primaryColourBackground
44
+ } = _ref2,
45
+ extraColours = _objectWithoutProperties(_ref2, _excluded);
54
46
  const overrideStyles = useMemo(() => {
55
47
  const mildPrimary = primaryColourBackgroundMild || shadedColour({
56
48
  colour: primaryColourBackground,
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
4
-
5
4
  __vanilla_filescope__.setFileScope("lib/components/Toaster/Toast.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { style } from '@vanilla-extract/css';
8
6
  import { themeContractVars as vars } from "../../themes/theme.css.js";
9
7
  export const root = style({
@@ -17,5 +15,4 @@ export const root = style({
17
15
  export const alert = style({
18
16
  pointerEvents: 'initial'
19
17
  }, "alert");
20
-
21
18
  __vanilla_filescope__.endFileScope();
@@ -2,11 +2,8 @@
2
2
 
3
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
-
6
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
-
8
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
9
-
10
7
  import { invariant } from '@autoguru/utilities';
11
8
  import * as React from 'react';
12
9
  import { createContext, useCallback, useContext, useLayoutEffect, useMemo, useReducer } from 'react';
@@ -20,24 +17,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
20
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
18
  import { Fragment as _Fragment } from "react/jsx-runtime";
22
19
  var ActionTypes;
23
-
24
20
  (function (ActionTypes) {
25
21
  ActionTypes[ActionTypes["ADD"] = 0] = "ADD";
26
22
  ActionTypes[ActionTypes["REMOVE"] = 1] = "REMOVE";
27
23
  })(ActionTypes || (ActionTypes = {}));
28
-
29
24
  const DEFAULT_DURATION = 5e3;
30
25
  let ids = -1;
31
-
32
26
  const getNewId = () => ++ids;
33
-
34
27
  const reducer = (state, action) => {
35
28
  switch (action.type) {
36
29
  case ActionTypes.ADD:
37
30
  return _objectSpread(_objectSpread({}, state), {}, {
38
31
  toasts: [].concat(_toConsumableArray(state.toasts), [action.config])
39
32
  });
40
-
41
33
  case ActionTypes.REMOVE:
42
34
  return _objectSpread(_objectSpread({}, state), {}, {
43
35
  toasts: state.toasts.filter(_ref => {
@@ -47,14 +39,11 @@ const reducer = (state, action) => {
47
39
  return id !== action.id;
48
40
  })
49
41
  });
50
-
51
42
  default:
52
43
  return state;
53
44
  }
54
45
  };
55
-
56
46
  const ToastControllerContext = createContext(null);
57
-
58
47
  const InternalToastProvider = _ref2 => {
59
48
  let {
60
49
  children
@@ -97,19 +86,16 @@ const InternalToastProvider = _ref2 => {
97
86
  })]
98
87
  });
99
88
  };
100
-
101
89
  export const ToastProvider = _ref3 => {
102
90
  let {
103
91
  children
104
92
  } = _ref3;
105
93
  const currentContext = useContext(ToastControllerContext);
106
-
107
94
  if (currentContext !== null) {
108
95
  return _jsx(_Fragment, {
109
96
  children: children
110
97
  });
111
98
  }
112
-
113
99
  return _jsx(InternalToastProvider, {
114
100
  children: children
115
101
  });
@@ -126,7 +112,6 @@ export const useToast = () => {
126
112
  intent: 'information'
127
113
  });
128
114
  };
129
-
130
115
  fn.primary = function (message) {
131
116
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
132
117
  return void addToast({
@@ -135,7 +120,6 @@ export const useToast = () => {
135
120
  intent: 'primary'
136
121
  });
137
122
  };
138
-
139
123
  fn.secondary = function (message) {
140
124
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
141
125
  return void addToast({
@@ -144,7 +128,6 @@ export const useToast = () => {
144
128
  intent: 'secondary'
145
129
  });
146
130
  };
147
-
148
131
  fn.shine = function (message) {
149
132
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
150
133
  return void addToast({
@@ -153,7 +136,6 @@ export const useToast = () => {
153
136
  intent: 'shine'
154
137
  });
155
138
  };
156
-
157
139
  fn.success = function (message) {
158
140
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
159
141
  return void addToast({
@@ -162,7 +144,6 @@ export const useToast = () => {
162
144
  intent: 'success'
163
145
  });
164
146
  };
165
-
166
147
  fn.neutral = function (message) {
167
148
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
168
149
  return void addToast({
@@ -171,7 +152,6 @@ export const useToast = () => {
171
152
  intent: 'neutral'
172
153
  });
173
154
  };
174
-
175
155
  fn.danger = function (message) {
176
156
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
177
157
  return void addToast({
@@ -180,7 +160,6 @@ export const useToast = () => {
180
160
  intent: 'danger'
181
161
  });
182
162
  };
183
-
184
163
  fn.information = function (message) {
185
164
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
186
165
  return void addToast({
@@ -189,7 +168,6 @@ export const useToast = () => {
189
168
  intent: 'information'
190
169
  });
191
170
  };
192
-
193
171
  fn.warning = function (message) {
194
172
  let duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DURATION;
195
173
  return void addToast({
@@ -198,11 +176,9 @@ export const useToast = () => {
198
176
  intent: 'warning'
199
177
  });
200
178
  };
201
-
202
179
  return fn;
203
180
  }, [addToast]);
204
181
  };
205
-
206
182
  const Toast = _ref4 => {
207
183
  let {
208
184
  remove,
@@ -214,7 +190,6 @@ const Toast = _ref4 => {
214
190
  const dismiss = useCallback(() => {
215
191
  remove(id);
216
192
  }, [id, remove]);
217
-
218
193
  if (isBrowser) {
219
194
  useLayoutEffect(() => {
220
195
  const timeout = setTimeout(() => {
@@ -225,7 +200,6 @@ const Toast = _ref4 => {
225
200
  };
226
201
  }, [dismiss]);
227
202
  }
228
-
229
203
  return _jsx(Alert, {
230
204
  dismissible: true,
231
205
  intent: intent,
@@ -234,5 +208,4 @@ const Toast = _ref4 => {
234
208
  children: message
235
209
  });
236
210
  };
237
-
238
211
  export default Toast;
@@ -2,13 +2,9 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
5
-
6
5
  __vanilla_filescope__.setFileScope("lib/components/Tooltip/Tooltip.css.ts", "@autoguru/overdrive");
7
-
8
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
-
10
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
-
12
8
  import { style } from '@vanilla-extract/css';
13
9
  import { responsiveStyle } from "../../utils/responsiveStyle.js";
14
10
  export const root = style(_objectSpread({
@@ -18,5 +14,4 @@ export const root = style(_objectSpread({
18
14
  maxWidth: '450px'
19
15
  }
20
16
  })), "root");
21
-
22
17
  __vanilla_filescope__.endFileScope();
@@ -30,7 +30,6 @@ export const Tooltip = _ref => {
30
30
  if (leaveTimer.current) {
31
31
  clearTimeout(leaveTimer.current);
32
32
  }
33
-
34
33
  setIsOpen(true);
35
34
  }, [setIsOpen]);
36
35
  const leaveHandler = useCallback(() => {
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
-
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
-
7
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
-
9
6
  import * as React from 'react';
10
7
  import { EAlignment } from "../Positioner/alignment.js";
11
8
  import { Tooltip } from "./index.js";
@@ -51,7 +48,6 @@ export default {
51
48
  }
52
49
  }
53
50
  };
54
-
55
51
  const Template = args => _jsx(Tooltip, _objectSpread(_objectSpread({}, args), {}, {
56
52
  children: _jsx("div", {
57
53
  style: {
@@ -60,7 +56,6 @@ const Template = args => _jsx(Tooltip, _objectSpread(_objectSpread({}, args), {}
60
56
  children: "Im the tooltip trigger"
61
57
  })
62
58
  }));
63
-
64
59
  const standardProps = {
65
60
  label: 'Im the tooltip body',
66
61
  closeAfter: null
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
4
-
5
4
  __vanilla_filescope__.setFileScope("lib/components/VisuallyHidden/VisuallyHidden.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { style } from '@vanilla-extract/css';
8
6
  export const root = style({
9
7
  clip: 'rect(1px, 1px, 1px, 1px)',
@@ -11,5 +9,4 @@ export const root = style({
11
9
  whiteSpace: 'nowrap',
12
10
  width: 1
13
11
  }, "root");
14
-
15
12
  __vanilla_filescope__.endFileScope();
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
-
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
-
7
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
-
9
6
  import * as React from 'react';
10
7
  import { Text } from "../Text/index.js";
11
8
  import { VisuallyHidden } from "./index.js";
@@ -23,7 +20,6 @@ export default {
23
20
  }
24
21
  }
25
22
  };
26
-
27
23
  const Template = args => _jsxs(_Fragment, {
28
24
  children: [_jsx(Text, {
29
25
  children: "Bellow text is invisible"
@@ -33,7 +29,6 @@ const Template = args => _jsxs(_Fragment, {
33
29
  })
34
30
  }))]
35
31
  });
36
-
37
32
  const standardProps = {
38
33
  is: 'div'
39
34
  };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
4
-
5
4
  __vanilla_filescope__.setFileScope("lib/components/private/CheckableBase/CheckableBase.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { style, styleVariants } from '@vanilla-extract/css';
8
6
  import { themeContractVars as vars } from "../../../themes/theme.css.js";
9
7
  export const root = style({
@@ -50,5 +48,4 @@ export const disabled = style({
50
48
  opacity: 0.6,
51
49
  pointerEvents: 'none'
52
50
  }, "disabled");
53
-
54
51
  __vanilla_filescope__.endFileScope();
@@ -21,13 +21,11 @@ export const CheckableBase = forwardRef((_ref, ref) => {
21
21
  handleClick,
22
22
  handleChange
23
23
  } = _ref;
24
-
25
24
  const onChange = e => {
26
25
  if (typeof handleChange === 'function') {
27
26
  handleChange(e.currentTarget.checked);
28
27
  }
29
28
  };
30
-
31
29
  const nakedLabel = ['string', 'number'].includes(typeof label);
32
30
  return _jsxs(Box, {
33
31
  display: "flex",