@autoguru/overdrive 4.11.2 → 4.11.4

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 (219) 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 +1 -31
  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.d.ts +1 -1
  26. package/dist/components/BulletList/Bullet.css.js +0 -3
  27. package/dist/components/BulletList/Bullet.js +0 -6
  28. package/dist/components/BulletList/BulletList.css.js +0 -3
  29. package/dist/components/BulletList/stories.js +0 -6
  30. package/dist/components/BulletText/BulletText.css.js +0 -3
  31. package/dist/components/BulletText/stories.js +0 -5
  32. package/dist/components/Button/Button.css.js +0 -3
  33. package/dist/components/Button/Button.js +0 -11
  34. package/dist/components/Button/stories.js +0 -6
  35. package/dist/components/CheckBox/CheckBox.css.js +0 -3
  36. package/dist/components/CheckBox/stories.js +3 -11
  37. package/dist/components/ColourInput/ColourInput.css.js +0 -3
  38. package/dist/components/ColourInput/ColourInput.js +9 -13
  39. package/dist/components/ColourInput/stories.js +1 -26
  40. package/dist/components/Columns/Column.css.js +0 -5
  41. package/dist/components/Columns/Column.d.ts +1 -1
  42. package/dist/components/Columns/Column.js +10 -14
  43. package/dist/components/Columns/Columns.css.js +0 -3
  44. package/dist/components/Columns/Columns.d.ts +1 -1
  45. package/dist/components/Columns/Columns.js +11 -15
  46. package/dist/components/Columns/stories.js +0 -6
  47. package/dist/components/DateInput/DateInput.js +9 -13
  48. package/dist/components/DateInput/stories.js +1 -28
  49. package/dist/components/DatePicker/DatePicker.css.js +0 -3
  50. package/dist/components/DatePicker/DatePicker.js +8 -13
  51. package/dist/components/DatePicker/stories.js +0 -5
  52. package/dist/components/DividerLine/DividerLine.css.d.ts +0 -5
  53. package/dist/components/DividerLine/DividerLine.css.d.ts.map +1 -1
  54. package/dist/components/DividerLine/DividerLine.css.js +1 -31
  55. package/dist/components/DividerLine/DividerLine.d.ts +2 -1
  56. package/dist/components/DividerLine/DividerLine.d.ts.map +1 -1
  57. package/dist/components/DividerLine/DividerLine.js +2 -1
  58. package/dist/components/DividerLine/stories.js +0 -9
  59. package/dist/components/Flyout/Flyout.js +7 -11
  60. package/dist/components/Flyout/stories.js +1 -9
  61. package/dist/components/Heading/stories.js +0 -7
  62. package/dist/components/Icon/Icon.css.js +0 -3
  63. package/dist/components/Icon/stories.js +0 -11
  64. package/dist/components/Image/Image.js +3 -7
  65. package/dist/components/Image/ResponsiveImage.js +6 -10
  66. package/dist/components/Image/SimpleImage.js +7 -11
  67. package/dist/components/Image/stories.js +0 -13
  68. package/dist/components/Inline/Inline.js +0 -6
  69. package/dist/components/Inline/stories.js +0 -6
  70. package/dist/components/LinearProgressIndicator/LinearProgressIndicator.css.js +0 -3
  71. package/dist/components/LinearProgressIndicator/stories.js +0 -5
  72. package/dist/components/LoadingBox/LoadingBox.css.js +0 -3
  73. package/dist/components/LoadingBox/LoadingBox.js +8 -14
  74. package/dist/components/LoadingBox/stories.js +0 -5
  75. package/dist/components/Meta/Meta.css.js +0 -3
  76. package/dist/components/Meta/stories.js +0 -5
  77. package/dist/components/MinimalModal/MinimalModal.css.js +0 -3
  78. package/dist/components/MinimalModal/MinimalModal.js +0 -2
  79. package/dist/components/MinimalModal/stories.js +0 -11
  80. package/dist/components/Modal/Modal.css.d.ts.map +1 -1
  81. package/dist/components/Modal/Modal.css.js +0 -5
  82. package/dist/components/Modal/Modal.d.ts.map +1 -1
  83. package/dist/components/Modal/Modal.js +5 -18
  84. package/dist/components/Modal/stories.js +0 -5
  85. package/dist/components/NumberBubble/NumberBubble.css.js +0 -3
  86. package/dist/components/NumberBubble/NumberBubble.js +5 -9
  87. package/dist/components/NumberBubble/stories.js +0 -5
  88. package/dist/components/NumberInput/NumberInput.js +14 -20
  89. package/dist/components/NumberInput/stories.js +1 -28
  90. package/dist/components/OrderedList/OrderedList.css.js +0 -3
  91. package/dist/components/OrderedList/OrderedList.js +0 -4
  92. package/dist/components/OrderedList/stories.js +0 -5
  93. package/dist/components/OutsideClick/OutsideClick.js +0 -3
  94. package/dist/components/OutsideClick/stories.js +0 -6
  95. package/dist/components/OverdriveProvider/OverdriveProvider.js +0 -1
  96. package/dist/components/Pagination/Pagination.css.js +0 -3
  97. package/dist/components/Pagination/Pagination.js +0 -20
  98. package/dist/components/Pagination/stories.js +0 -25
  99. package/dist/components/Portal/Portal.js +0 -7
  100. package/dist/components/Portal/stories.js +0 -9
  101. package/dist/components/Positioner/Positioner.css.js +0 -3
  102. package/dist/components/Positioner/Positioner.js +7 -19
  103. package/dist/components/Positioner/alignment.js +0 -1
  104. package/dist/components/Positioner/stories.js +1 -13
  105. package/dist/components/ProgressBar/ProgressBar.css.js +0 -3
  106. package/dist/components/ProgressBar/stories.js +0 -6
  107. package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +0 -3
  108. package/dist/components/ProgressBarGroup/stories.js +0 -5
  109. package/dist/components/ProgressSpinner/ProgressSpinner.css.js +0 -3
  110. package/dist/components/ProgressSpinner/stories.js +0 -5
  111. package/dist/components/Radio/Radio.css.js +0 -3
  112. package/dist/components/Radio/Radio.js +0 -3
  113. package/dist/components/Radio/stories.js +8 -17
  114. package/dist/components/Section/Section.css.js +0 -3
  115. package/dist/components/Section/stories.js +0 -5
  116. package/dist/components/SelectInput/SelectInput.css.js +0 -3
  117. package/dist/components/SelectInput/SelectInput.js +10 -14
  118. package/dist/components/SelectInput/stories.js +1 -26
  119. package/dist/components/SimplePagination/SimplePagination.js +0 -4
  120. package/dist/components/SimplePagination/stories.js +0 -9
  121. package/dist/components/Stack/Divider.css.js +0 -3
  122. package/dist/components/Stack/Stack.css.js +0 -3
  123. package/dist/components/Stack/Stack.js +0 -2
  124. package/dist/components/Stack/stories.js +0 -11
  125. package/dist/components/StandardModal/StandardModal.css.js +0 -5
  126. package/dist/components/StandardModal/StandardModal.js +0 -4
  127. package/dist/components/StandardModal/stories.js +0 -5
  128. package/dist/components/StarRating/StarRating.css.js +0 -3
  129. package/dist/components/StarRating/StarRating.js +0 -12
  130. package/dist/components/StarRating/stories.js +0 -5
  131. package/dist/components/Stepper/Stepper.css.d.ts.map +1 -1
  132. package/dist/components/Stepper/Stepper.css.js +1 -5
  133. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  134. package/dist/components/Stepper/Stepper.js +4 -8
  135. package/dist/components/Stepper/stories.js +4 -12
  136. package/dist/components/Switch/Switch.css.js +0 -3
  137. package/dist/components/Switch/Switch.js +0 -1
  138. package/dist/components/Switch/stories.js +4 -16
  139. package/dist/components/Table/Table.css.js +0 -3
  140. package/dist/components/Table/TableCell.css.js +0 -3
  141. package/dist/components/Table/TableCell.js +0 -1
  142. package/dist/components/Table/TableHeadCell.css.js +0 -5
  143. package/dist/components/Table/TableHeadCell.js +0 -6
  144. package/dist/components/Table/stories.js +0 -7
  145. package/dist/components/Tabs/Tab.css.js +0 -3
  146. package/dist/components/Tabs/Tab.js +0 -3
  147. package/dist/components/Tabs/TabList.css.js +0 -3
  148. package/dist/components/Tabs/TabList.js +0 -7
  149. package/dist/components/Tabs/TabPane.css.js +0 -3
  150. package/dist/components/Tabs/TabPanes.css.js +0 -3
  151. package/dist/components/Tabs/stories.js +0 -7
  152. package/dist/components/Text/stories.js +0 -10
  153. package/dist/components/Text/useTextStyles.css.js +0 -5
  154. package/dist/components/TextAreaInput/TextAreaInput.js +9 -13
  155. package/dist/components/TextAreaInput/stories.js +1 -23
  156. package/dist/components/TextBubble/TextBubble.css.js +0 -3
  157. package/dist/components/TextBubble/TextBubble.js +5 -13
  158. package/dist/components/TextBubble/stories.js +0 -5
  159. package/dist/components/TextContainer/TextContainer.js +0 -2
  160. package/dist/components/TextContainer/stories.js +0 -5
  161. package/dist/components/TextInput/TextInput.js +9 -14
  162. package/dist/components/TextInput/stories.js +1 -38
  163. package/dist/components/TextLink/TextLink.css.js +0 -3
  164. package/dist/components/TextLink/TextLink.js +9 -18
  165. package/dist/components/TextLink/stories.js +0 -6
  166. package/dist/components/ThemeOverrideProvider/ThemeOverrideProvider.js +0 -3
  167. package/dist/components/ThemeOverrideProvider/useBuildThemeOverrides.js +7 -15
  168. package/dist/components/ThemeProvider/ThemeProvider.d.ts +5 -4
  169. package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
  170. package/dist/components/Toaster/Toast.css.js +0 -3
  171. package/dist/components/Toaster/Toast.js +0 -27
  172. package/dist/components/Tooltip/Tooltip.css.js +0 -5
  173. package/dist/components/Tooltip/Tooltip.js +0 -1
  174. package/dist/components/Tooltip/stories.js +0 -5
  175. package/dist/components/VisuallyHidden/VisuallyHidden.css.js +0 -3
  176. package/dist/components/VisuallyHidden/stories.js +0 -5
  177. package/dist/components/private/CheckableBase/CheckableBase.css.js +0 -3
  178. package/dist/components/private/CheckableBase/CheckableBase.js +0 -2
  179. package/dist/components/private/InputBase/HintText.css.js +0 -3
  180. package/dist/components/private/InputBase/InputState.css.js +0 -3
  181. package/dist/components/private/InputBase/NotchedBase.css.js +0 -6
  182. package/dist/components/private/InputBase/NotchedBase.js +0 -1
  183. package/dist/components/private/InputBase/withEnhancedInput.css.js +0 -3
  184. package/dist/components/private/InputBase/withEnhancedInput.js +28 -39
  185. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.css.js +0 -3
  186. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +4 -12
  187. package/dist/hooks/useMedia/stories.js +0 -1
  188. package/dist/hooks/useMedia/useMedia.js +0 -4
  189. package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +0 -3
  190. package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +0 -3
  191. package/dist/hooks/useResponsiveValue/stories.js +0 -1
  192. package/dist/reset/globalFonts.css.js +0 -3
  193. package/dist/reset/globalReset.css.js +0 -3
  194. package/dist/reset/reset.css.js +0 -5
  195. package/dist/themes/base/index.d.ts +177 -177
  196. package/dist/themes/base/tokens.js +0 -3
  197. package/dist/themes/base/vars.css.js +0 -3
  198. package/dist/themes/flat_red/index.d.ts +177 -177
  199. package/dist/themes/flat_red/tokens.js +0 -3
  200. package/dist/themes/flat_red/vars.css.js +0 -3
  201. package/dist/themes/helpers.js +0 -2
  202. package/dist/themes/makeTheme.js +0 -3
  203. package/dist/themes/neutral/index.d.ts +177 -177
  204. package/dist/themes/neutral/tokens.js +0 -3
  205. package/dist/themes/neutral/vars.css.js +0 -3
  206. package/dist/themes/theme.css.d.ts +177 -177
  207. package/dist/themes/theme.css.d.ts.map +1 -1
  208. package/dist/themes/theme.css.js +0 -5
  209. package/dist/themes/tokens.d.ts +3 -1
  210. package/dist/themes/tokens.d.ts.map +1 -1
  211. package/dist/utils/index.js +0 -13
  212. package/dist/utils/mapTokenToProperty.js +0 -3
  213. package/dist/utils/resolveResponsiveProps.js +0 -6
  214. package/dist/utils/responsiveProps.css.js +0 -5
  215. package/dist/utils/responsiveStyle.d.ts +2 -2
  216. package/dist/utils/responsiveStyle.d.ts.map +1 -1
  217. package/dist/utils/responsiveStyle.js +0 -6
  218. package/package.json +1 -1
  219. package/readme.md +1 -2
@@ -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 = ["field", "eventHandlers", "validation", "isLoading", "suffixed", "prefixed", "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 { warning } from '@autoguru/utilities';
12
9
  import * as React from 'react';
13
10
  import { Box } from "../Box/index.js";
@@ -15,16 +12,15 @@ import { withEnhancedInput } from "../private/InputBase/index.js";
15
12
  import { jsx as _jsx } from "react/jsx-runtime";
16
13
  export const DateInput = withEnhancedInput(_ref => {
17
14
  let {
18
- field,
19
- eventHandlers,
20
- validation,
21
- isLoading,
22
- suffixed,
23
- prefixed,
24
- size
25
- } = _ref,
26
- rest = _objectWithoutProperties(_ref, _excluded);
27
-
15
+ field,
16
+ eventHandlers,
17
+ validation,
18
+ isLoading,
19
+ suffixed,
20
+ prefixed,
21
+ size
22
+ } = _ref,
23
+ rest = _objectWithoutProperties(_ref, _excluded);
28
24
  process.env.NODE_ENV !== "production" ? warning(field.value !== '', 'Date Input does not support empty values.') : void 0;
29
25
  return _jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
30
26
  is: "input"
@@ -1,18 +1,14 @@
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, CurrencyUsdIcon, PlusIcon, StarIcon } from '@autoguru/icons';
10
7
  import { action } from '@storybook/addon-actions';
11
8
  import isChromatic from 'chromatic/isChromatic';
12
9
  import * as React from 'react';
13
10
  import { DateInput } from "./index.js";
14
11
  import { jsx as _jsx } from "react/jsx-runtime";
15
-
16
12
  const formatDate = function () {
17
13
  let date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
18
14
  const year = date.getFullYear();
@@ -20,15 +16,12 @@ const formatDate = function () {
20
16
  const day = date.getDate().toString().padStart(2, '0');
21
17
  return "".concat(year, "-").concat(month, "-").concat(day);
22
18
  };
23
-
24
19
  const todayStr = formatDate(isChromatic() ? new Date(2019, 5, 1) : new Date());
25
20
  export default {
26
21
  title: 'Components/Inputs/Date',
27
22
  component: DateInput,
28
23
  parameters: {
29
- chromatic: {
30
- delay: 3000
31
- }
24
+ chromatic: {}
32
25
  }
33
26
  };
34
27
  const iconOptions = {
@@ -71,9 +64,7 @@ const argTypes = {
71
64
  }
72
65
  }
73
66
  };
74
-
75
67
  const Template = args => _jsx(DateInput, _objectSpread({}, args));
76
-
77
68
  const sharedProps = {
78
69
  disabled: false,
79
70
  name: 'date',
@@ -91,34 +82,28 @@ const sharedProps = {
91
82
  onBlur: action('onBlur')
92
83
  };
93
84
  const standardProps = sharedProps;
94
-
95
85
  const withAValueProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
96
86
  value: todayStr,
97
87
  placeholder: 'What is your DOB?'
98
88
  });
99
-
100
89
  const withHintTextProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
101
90
  hintText: 'Hint Text',
102
91
  placeholder: 'What is your DOB?'
103
92
  });
104
-
105
93
  const withIconProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
106
94
  prefixIcon: CalendarIcon
107
95
  });
108
-
109
96
  const disabledProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
110
97
  value: todayStr,
111
98
  placeholder: 'What is your DOB?',
112
99
  disabled: true
113
100
  });
114
-
115
101
  const validProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
116
102
  value: todayStr,
117
103
  placeholder: 'What is your DOB?',
118
104
  isTouched: true,
119
105
  isValid: true
120
106
  });
121
-
122
107
  const invalidProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
123
108
  value: '2050-10-13',
124
109
  placeholder: 'What is your DOB?',
@@ -126,22 +111,18 @@ const invalidProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
126
111
  isValid: false,
127
112
  hintText: 'Invalid date of birth'
128
113
  });
129
-
130
114
  const noNotchProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
131
115
  placeholder: 'What is your DOB?',
132
116
  notch: false
133
117
  });
134
-
135
118
  const noNotchWithValueProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
136
119
  value: todayStr,
137
120
  placeholder: 'What is your DOB?',
138
121
  notch: false
139
122
  });
140
-
141
123
  const loadingProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
142
124
  isLoading: true
143
125
  });
144
-
145
126
  export const standard = Template.bind(standardProps);
146
127
  standard.args = standardProps;
147
128
  standard.argTypes = argTypes;
@@ -172,37 +153,29 @@ invalid.argTypes = argTypes;
172
153
  export const loading = Template.bind(loadingProps);
173
154
  loading.args = loadingProps;
174
155
  loading.argTypes = argTypes;
175
-
176
156
  const smallProps = _objectSpread(_objectSpread({}, standardProps), {}, {
177
157
  size: 'small'
178
158
  });
179
-
180
159
  export const small = Template.bind(smallProps);
181
160
  small.args = smallProps;
182
161
  small.argTypes = argTypes;
183
-
184
162
  const withValueSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
185
163
  size: 'small'
186
164
  });
187
-
188
165
  export const withValueSmall = Template.bind(withValueSmallProps);
189
166
  withValueSmall.args = withValueSmallProps;
190
167
  withValueSmall.argTypes = argTypes;
191
-
192
168
  const withIconSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
193
169
  prefixIcon: CarIcon,
194
170
  size: 'small'
195
171
  });
196
-
197
172
  export const withIconSmall = Template.bind(withIconSmallProps);
198
173
  withIconSmall.args = withIconSmallProps;
199
174
  withIconSmall.argTypes = argTypes;
200
-
201
175
  const loadingSmallProps = _objectSpread(_objectSpread({}, withAValueProps), {}, {
202
176
  isLoading: true,
203
177
  size: 'small'
204
178
  });
205
-
206
179
  export const loadingSmall = Template.bind(loadingSmallProps);
207
180
  loadingSmall.args = loadingSmallProps;
208
181
  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/DatePicker/DatePicker.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { style, styleVariants } from '@vanilla-extract/css';
8
6
  export const input = style({
9
7
  top: 0,
@@ -40,5 +38,4 @@ export const spinner = style({
40
38
  left: '50%',
41
39
  transform: 'translate(-50%, -50%)'
42
40
  }, "spinner");
43
-
44
41
  __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 = ["className", "icon", "size", "disabled", "isLoading", "onChange"];
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 { CalendarIcon } from '@autoguru/icons';
12
9
  import clsx from 'clsx';
13
10
  import * as React from 'react';
@@ -21,21 +18,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
21
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
22
19
  export const DatePicker = _ref => {
23
20
  let {
24
- className = '',
25
- icon = CalendarIcon,
26
- size = 'medium',
27
- disabled = false,
28
- isLoading = false,
29
- onChange
30
- } = _ref,
31
- inputProps = _objectWithoutProperties(_ref, _excluded);
32
-
21
+ className = '',
22
+ icon = CalendarIcon,
23
+ size = 'medium',
24
+ disabled = false,
25
+ isLoading = false,
26
+ onChange
27
+ } = _ref,
28
+ inputProps = _objectWithoutProperties(_ref, _excluded);
33
29
  const onChangeEvent = event => {
34
30
  if (typeof onChange === 'function') {
35
31
  onChange(event.currentTarget.value);
36
32
  }
37
33
  };
38
-
39
34
  return _jsxs(Box, {
40
35
  position: "relative",
41
36
  overflow: "hidden",
@@ -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, MagnifyIcon, PlusIcon, StarIcon } from '@autoguru/icons';
10
7
  import * as React from 'react';
11
8
  import { DatePicker } from "./index.js";
@@ -43,9 +40,7 @@ export default {
43
40
  }
44
41
  }
45
42
  };
46
-
47
43
  const Template = args => _jsx(DatePicker, _objectSpread({}, args));
48
-
49
44
  const standardProps = {
50
45
  isLoading: false,
51
46
  disabled: false
@@ -1,10 +1,5 @@
1
- import { style } from '@vanilla-extract/css';
2
- import { Tokens } from '../../themes/tokens';
3
- declare type Colours = keyof Tokens['colours']['intent'];
4
- export declare const colours: Record<Colours, ReturnType<typeof style>>;
5
1
  export declare const size: {
6
2
  horizontal: Record<string | number, string>;
7
3
  vertical: Record<string | number, string>;
8
4
  };
9
- export {};
10
5
  //# sourceMappingURL=DividerLine.css.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DividerLine.css.d.ts","sourceRoot":"","sources":["../../../lib/components/DividerLine/DividerLine.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AAG9E,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,aAAK,OAAO,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;AACjD,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAyB7D,CAAC;AAKF,eAAO,MAAM,IAAI;;;CAiBhB,CAAC"}
1
+ {"version":3,"file":"DividerLine.css.d.ts","sourceRoot":"","sources":["../../../lib/components/DividerLine/DividerLine.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;CAiBhB,CAAC"}
@@ -1,37 +1,8 @@
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/DividerLine/DividerLine.css.ts", "@autoguru/overdrive");
6
-
7
- import { style, styleVariants } from '@vanilla-extract/css';
8
- import { themeContractVars as vars } from "../../themes/theme.css.js";
9
- export const colours = {
10
- primary: style({
11
- backgroundColor: vars.colours.intent.primary.background.standard
12
- }, "colours_primary"),
13
- secondary: style({
14
- backgroundColor: vars.colours.intent.secondary.background.standard
15
- }, "colours_secondary"),
16
- danger: style({
17
- backgroundColor: vars.colours.intent.danger.background.standard
18
- }, "colours_danger"),
19
- information: style({
20
- backgroundColor: vars.colours.intent.information.background.standard
21
- }, "colours_information"),
22
- warning: style({
23
- backgroundColor: vars.colours.intent.warning.background.standard
24
- }, "colours_warning"),
25
- success: style({
26
- backgroundColor: vars.colours.intent.success.background.standard
27
- }, "colours_success"),
28
- neutral: style({
29
- backgroundColor: vars.colours.intent.neutral.background.mild
30
- }, "colours_neutral"),
31
- shine: style({
32
- backgroundColor: vars.colours.intent.shine.foreground
33
- }, "colours_shine")
34
- };
5
+ import { styleVariants } from '@vanilla-extract/css';
35
6
  const sizes = [1, 2, 3];
36
7
  export const size = {
37
8
  horizontal: styleVariants(sizes.reduce((sizes, size) => {
@@ -47,5 +18,4 @@ export const size = {
47
18
  return sizes;
48
19
  }, {}), "size_vertical")
49
20
  };
50
-
51
21
  __vanilla_filescope__.endFileScope();
@@ -1,11 +1,12 @@
1
1
  import { ComponentProps, FunctionComponent } from 'react';
2
2
  import { Box } from '../';
3
+ import { Tokens } from '../../themes/tokens';
3
4
  import * as styles from './DividerLine.css';
4
5
  interface Props {
5
6
  isVertical?: boolean;
6
7
  className?: string;
7
8
  space: ComponentProps<typeof Box>['marginY'];
8
- colour?: keyof typeof styles.colours;
9
+ colour?: keyof Tokens['colours']['intent'];
9
10
  size?: keyof typeof styles.size['horizontal'];
10
11
  }
11
12
  export declare const DividerLine: FunctionComponent<Props>;
@@ -1 +1 @@
1
- {"version":3,"file":"DividerLine.d.ts","sourceRoot":"","sources":["../../../lib/components/DividerLine/DividerLine.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,UAAU,KAAK;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,KAAK,CAehD,CAAC"}
1
+ {"version":3,"file":"DividerLine.d.ts","sourceRoot":"","sources":["../../../lib/components/DividerLine/DividerLine.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,UAAU,KAAK;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,KAAK,CAgBhD,CAAC"}
@@ -14,7 +14,8 @@ export const DividerLine = _ref => {
14
14
  size = 1
15
15
  } = _ref;
16
16
  return _jsx(Box, {
17
- className: clsx(className, styles.colours[colour], {
17
+ backgroundColour: colour,
18
+ className: clsx(className, {
18
19
  [styles.size.horizontal[size]]: !isVertical,
19
20
  [styles.size.vertical[size]]: isVertical
20
21
  }),
@@ -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 { Heading } from "../Heading/index.js";
@@ -70,7 +67,6 @@ export default {
70
67
  })
71
68
  })]
72
69
  };
73
-
74
70
  const template = args => _jsxs(Box, {
75
71
  children: [_jsx(Heading, {
76
72
  is: "h2",
@@ -82,7 +78,6 @@ const template = args => _jsxs(Box, {
82
78
  children: "Title 1"
83
79
  })]
84
80
  });
85
-
86
81
  const verticalTemplate = args => _jsxs(Inline, {
87
82
  alignY: "stretch",
88
83
  children: [_jsx(Heading, {
@@ -95,7 +90,6 @@ const verticalTemplate = args => _jsxs(Inline, {
95
90
  children: "Title 1"
96
91
  })]
97
92
  });
98
-
99
93
  const templateAllColours = args => _jsx(Box, {
100
94
  children: colours.map(colour => _jsxs(_Fragment, {
101
95
  children: [_jsx(Heading, {
@@ -107,7 +101,6 @@ const templateAllColours = args => _jsx(Box, {
107
101
  }))]
108
102
  }))
109
103
  });
110
-
111
104
  const standardProps = {
112
105
  space: '5',
113
106
  size: 3,
@@ -115,11 +108,9 @@ const standardProps = {
115
108
  };
116
109
  export const standard = template.bind(standardProps);
117
110
  standard.args = standardProps;
118
-
119
111
  const verticalProps = _objectSpread(_objectSpread({}, standardProps), {}, {
120
112
  isVertical: true
121
113
  });
122
-
123
114
  export const vertical = verticalTemplate.bind(verticalProps);
124
115
  vertical.args = verticalProps;
125
116
  export const standardAllColours = templateAllColours.bind(standardProps);
@@ -3,25 +3,21 @@
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  const _excluded = ["children", "triggerRef", "isOpen", "alignment", "triggerOffset"];
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 * as React from 'react';
12
9
  import { Box } from "../Box/index.js";
13
10
  import { Positioner } from "../Positioner/index.js";
14
11
  import { jsx as _jsx } from "react/jsx-runtime";
15
12
  export const Flyout = _ref => {
16
13
  let {
17
- children,
18
- triggerRef,
19
- isOpen,
20
- alignment,
21
- triggerOffset
22
- } = _ref,
23
- rest = _objectWithoutProperties(_ref, _excluded);
24
-
14
+ children,
15
+ triggerRef,
16
+ isOpen,
17
+ alignment,
18
+ triggerOffset
19
+ } = _ref,
20
+ rest = _objectWithoutProperties(_ref, _excluded);
25
21
  return _jsx(Positioner, _objectSpread(_objectSpread({
26
22
  triggerRef: triggerRef,
27
23
  isOpen: isOpen,
@@ -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 { useRef } from 'react';
11
8
  import { Box } from "../Box/index.js";
@@ -35,9 +32,7 @@ export default {
35
32
  }
36
33
  },
37
34
  parameters: {
38
- chromatic: {
39
- delay: 3000
40
- }
35
+ chromatic: {}
41
36
  }
42
37
  };
43
38
  const sharedProps = {
@@ -45,7 +40,6 @@ const sharedProps = {
45
40
  isOpen: false,
46
41
  triggerOffset: 12
47
42
  };
48
-
49
43
  const Template = _ref => {
50
44
  let args = Object.assign({}, _ref);
51
45
  const triggerRef = useRef(null);
@@ -84,11 +78,9 @@ const Template = _ref => {
84
78
  }))]
85
79
  });
86
80
  };
87
-
88
81
  const openProps = _objectSpread(_objectSpread({}, sharedProps), {}, {
89
82
  isOpen: true
90
83
  });
91
-
92
84
  export const Open = Template.bind(openProps);
93
85
  Open.args = openProps;
94
86
  export const Closed = Template.bind(sharedProps);
@@ -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 { Heading } from "./index.js";
11
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -85,7 +82,6 @@ export default {
85
82
  }
86
83
  }
87
84
  };
88
-
89
85
  const Template = args => _jsx("div", {
90
86
  style: {
91
87
  maxWidth: '350px',
@@ -93,7 +89,6 @@ const Template = args => _jsx("div", {
93
89
  },
94
90
  children: _jsx(Heading, _objectSpread({}, args))
95
91
  });
96
-
97
92
  const AllTypesTemplate = args => _jsx("div", {
98
93
  style: {
99
94
  maxWidth: '350px',
@@ -103,7 +98,6 @@ const AllTypesTemplate = args => _jsx("div", {
103
98
  is: is
104
99
  }), is))
105
100
  });
106
-
107
101
  const AllColoursTemplate = args => _jsx("div", {
108
102
  style: {
109
103
  maxWidth: '350px',
@@ -118,7 +112,6 @@ const AllColoursTemplate = args => _jsx("div", {
118
112
  }), index)
119
113
  }, index))
120
114
  });
121
-
122
115
  const standardProps = {
123
116
  is: 'h1',
124
117
  children: 'I am a heading'
@@ -1,14 +1,11 @@
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/Icon/Icon.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { themeContractVars as vars } from "../../themes/theme.css.js";
8
6
  import { makeResponsiveStyle } from "../../utils/responsiveProps.css.js";
9
7
  export const size = makeResponsiveStyle(vars.icon.size, value => ({
10
8
  width: value,
11
9
  height: value
12
10
  }));
13
-
14
11
  __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 { AccountEditIcon, AlertCircleIcon, CalendarIcon, CarIcon, CarMultipleIcon, CheckIcon, CurrencyUsdIcon, MagnifyIcon, PlusIcon, StarIcon } from '@autoguru/icons';
10
7
  import * as React from 'react';
11
8
  import { Icon } from "./index.js";
@@ -41,32 +38,24 @@ export default {
41
38
  }
42
39
  }
43
40
  };
44
-
45
41
  const template = args => _jsx(Icon, _objectSpread({}, args));
46
-
47
42
  const standardProps = {
48
43
  icon: CalendarIcon
49
44
  };
50
45
  export const standard = template.bind(standardProps);
51
46
  standard.args = standardProps;
52
-
53
47
  const responsiveProps = _objectSpread(_objectSpread({}, standardProps), {}, {
54
48
  size: ['small', 'medium', 'large']
55
49
  });
56
-
57
50
  export const responsive = template.bind(responsiveProps);
58
51
  responsive.args = responsiveProps;
59
-
60
52
  const mediumProps = _objectSpread(_objectSpread({}, standardProps), {}, {
61
53
  size: 'medium'
62
54
  });
63
-
64
55
  export const medium = template.bind(mediumProps);
65
56
  medium.args = mediumProps;
66
-
67
57
  const largeProps = _objectSpread(_objectSpread({}, standardProps), {}, {
68
58
  size: 'large'
69
59
  });
70
-
71
60
  export const large = template.bind(largeProps);
72
61
  large.args = largeProps;
@@ -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 = ["unoptimised"];
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 * as React from 'react';
12
9
  import { useImageServer } from "./ImageServerProvider.js";
13
10
  import { ResponsiveImage } from "./ResponsiveImage.js";
@@ -15,10 +12,9 @@ import { SimpleImage } from "./SimpleImage.js";
15
12
  import { jsx as _jsx } from "react/jsx-runtime";
16
13
  export const Image = _ref => {
17
14
  let {
18
- unoptimised = false
19
- } = _ref,
20
- props = _objectWithoutProperties(_ref, _excluded);
21
-
15
+ unoptimised = false
16
+ } = _ref,
17
+ props = _objectWithoutProperties(_ref, _excluded);
22
18
  return useImageServer() && !unoptimised ? _jsx(ResponsiveImage, _objectSpread({}, props)) : _jsx(SimpleImage, _objectSpread({}, props));
23
19
  };
24
20
  export default Image;
@@ -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 = ["imageWidth", "sizes", "quality", "src"];
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 * as React from 'react';
13
10
  import { useMemo } from 'react';
@@ -17,13 +14,12 @@ import { SimpleImage } from "./SimpleImage.js";
17
14
  import { jsx as _jsx } from "react/jsx-runtime";
18
15
  export const ResponsiveImage = _ref => {
19
16
  let {
20
- imageWidth: imageWidthList,
21
- sizes: sizesList = '100vw',
22
- quality = 70,
23
- src: incomingSrc
24
- } = _ref,
25
- imgProps = _objectWithoutProperties(_ref, _excluded);
26
-
17
+ imageWidth: imageWidthList,
18
+ sizes: sizesList = '100vw',
19
+ quality = 70,
20
+ src: incomingSrc
21
+ } = _ref,
22
+ imgProps = _objectWithoutProperties(_ref, _excluded);
27
23
  !(quality > 0 && quality <= 100) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Image must be a number between 1 and 100.') : invariant(false) : void 0;
28
24
  const imageWidth = useResponsiveValue(imageWidthList);
29
25
  const sizes = useResponsiveValue(sizesList);