@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,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/LinearProgressIndicator/LinearProgressIndicator.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { keyframes, style } from '@vanilla-extract/css';
8
6
  import { themeContractVars as vars } from "../../themes/theme.css.js";
9
7
  export const root = style({
@@ -58,5 +56,4 @@ export const linearProgressBarInner = style({
58
56
  animationIterationCount: 'infinite',
59
57
  animationName: layerTwoAnim
60
58
  }, "linearProgressBarInner");
61
-
62
59
  __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 { LinearProgressIndicator } from "./index.js";
11
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -25,7 +22,5 @@ export default {
25
22
  }
26
23
  }
27
24
  };
28
-
29
25
  const Template = args => _jsx(LinearProgressIndicator, _objectSpread({}, args));
30
-
31
26
  export const standard = Template.bind({});
@@ -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/LoadingBox/LoadingBox.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { keyframes, style } from '@vanilla-extract/css';
8
6
  import { themeContractVars as vars } from "../../themes/theme.css.js";
9
7
  export const root = style({
@@ -26,5 +24,4 @@ export const blinking = style({
26
24
  animationIterationCount: 'infinite',
27
25
  animationName: blinker
28
26
  }, "blinking");
29
-
30
27
  __vanilla_filescope__.endFileScope();
@@ -3,26 +3,22 @@
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", "randomWidth", "blinking", "backgroundColour", "display", "is"];
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 * as styles from "./LoadingBox.css.js";
14
11
  import { jsx as _jsx } from "react/jsx-runtime";
15
12
  export const LoadingBox = _ref => {
16
13
  let {
17
- className = '',
18
- randomWidth = false,
19
- blinking = true,
20
- backgroundColour = 'gray200',
21
- display = 'block',
22
- is = 'span'
23
- } = _ref,
24
- boxStyles = _objectWithoutProperties(_ref, _excluded);
25
-
14
+ className = '',
15
+ randomWidth = false,
16
+ blinking = true,
17
+ backgroundColour = 'gray200',
18
+ display = 'block',
19
+ is = 'span'
20
+ } = _ref,
21
+ boxStyles = _objectWithoutProperties(_ref, _excluded);
26
22
  return _jsx(Box, _objectSpread(_objectSpread({
27
23
  is: is,
28
24
  display: display,
@@ -35,7 +31,5 @@ export const LoadingBox = _ref => {
35
31
  }
36
32
  }));
37
33
  };
38
-
39
34
  const getRandomIntWidth = (max, min) => "".concat(Math.random() * (max - min) + min, "%");
40
-
41
35
  export default LoadingBox;
@@ -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 { boxArgTypes } from "../Box/argTypes.js";
11
8
  import { LoadingBox } from "./index.js";
@@ -28,9 +25,7 @@ export default {
28
25
  },
29
26
  argTypes: boxArgTypes
30
27
  };
31
-
32
28
  const Template = args => _jsx(LoadingBox, _objectSpread({}, args));
33
-
34
29
  const standardProps = {};
35
30
  export const standard = Template.bind(standardProps);
36
31
  standard.args = standardProps;
@@ -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/Meta/Meta.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { styleVariants } from '@vanilla-extract/css';
8
6
  import { themeContractVars as vars } from "../../themes/theme.css.js";
9
7
  export const variant = styleVariants({
@@ -14,5 +12,4 @@ export const variant = styleVariants({
14
12
  color: vars.typography.colour.dark
15
13
  }
16
14
  }, "variant");
17
-
18
15
  __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, CarMultipleIcon, CurrencyUsdIcon, PlusIcon, StarIcon } from '@autoguru/icons';
10
7
  import * as React from 'react';
11
8
  import { Meta } from "./index.js";
@@ -31,9 +28,7 @@ export default {
31
28
  }
32
29
  }
33
30
  };
34
-
35
31
  const Template = args => _jsx(Meta, _objectSpread({}, args));
36
-
37
32
  const standardProps = {
38
33
  variant: 'primary',
39
34
  icon: CalendarIcon,
@@ -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/MinimalModal/MinimalModal.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { style } from '@vanilla-extract/css';
8
6
  export const container = style({
9
7
  outline: '0'
@@ -14,5 +12,4 @@ export const content = style({
14
12
  webkitOverflowScrolling: 'touch',
15
13
  '-webkit-overflow-scrolling': 'touch'
16
14
  }, "content");
17
-
18
15
  __vanilla_filescope__.endFileScope();
@@ -24,7 +24,6 @@ export const MinimalModal = _ref => {
24
24
  if (locked.current || event.target !== event.currentTarget) return;
25
25
  if (typeof onRequestClose === 'function') onRequestClose('backdrop');
26
26
  });
27
-
28
27
  if (isBrowser) {
29
28
  useLayoutEffect(() => {
30
29
  document.body.style.overflow = isOpen ? 'hidden' : '';
@@ -33,7 +32,6 @@ export const MinimalModal = _ref => {
33
32
  };
34
33
  }, [isOpen]);
35
34
  }
36
-
37
35
  return _jsx(Modal, {
38
36
  isOpen: isOpen,
39
37
  onRequestClose: onRequestClose,
@@ -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 { action } from '@storybook/addon-actions';
10
7
  import * as React from 'react';
11
8
  import { Box } from "../Box/index.js";
@@ -31,7 +28,6 @@ export default {
31
28
  }
32
29
  }
33
30
  };
34
-
35
31
  const Template = args => _jsxs(_Fragment, {
36
32
  children: [_jsx(MinimalModal, _objectSpread(_objectSpread({}, args), {}, {
37
33
  children: _jsxs(Box, {
@@ -60,7 +56,6 @@ const Template = args => _jsxs(_Fragment, {
60
56
  children: "Nulla condimentum iaculis nisi, quis lobortis ligula. Nulla tempus semper velit, id ullamcorper orci molestie vel. Sed maximus nisi ac risus malesuada, quis varius purus interdum. Donec volutpat dolor in euismod hendrerit. Integer posuere tortor sit amet turpis viverra euismod. Mauris scelerisque ex diam, eget sodales erat accumsan vel. Etiam interdum odio a tortor fermentum, molestie interdum tellus bibendum. Vivamus vitae pulvinar ante. Aenean convallis aliquam velit congue ultricies. Aenean vel blandit erat. Mauris quis auctor nibh. Morbi dui ipsum, lobortis non nisi vitae, convallis pulvinar nunc."
61
57
  })]
62
58
  });
63
-
64
59
  const standardProps = {
65
60
  isOpen: true,
66
61
  onRequestClose: action('onChange')
@@ -68,27 +63,21 @@ const standardProps = {
68
63
  export const Standard = Template.bind(standardProps);
69
64
  Standard.args = standardProps;
70
65
  Standard.argTypes = argTypes;
71
-
72
66
  const pinnedToTopProps = _objectSpread(_objectSpread({}, standardProps), {}, {
73
67
  alignItems: 'flexStart'
74
68
  });
75
-
76
69
  export const PinnedToTop = Template.bind(pinnedToTopProps);
77
70
  PinnedToTop.args = pinnedToTopProps;
78
71
  PinnedToTop.argTypes = argTypes;
79
-
80
72
  const pinnedToTopCentreProps = _objectSpread(_objectSpread({}, standardProps), {}, {
81
73
  alignItems: 'center'
82
74
  });
83
-
84
75
  export const pinnedToTopCentre = Template.bind(pinnedToTopCentreProps);
85
76
  pinnedToTopCentre.args = pinnedToTopCentreProps;
86
77
  pinnedToTopCentre.argTypes = argTypes;
87
-
88
78
  const pinnedToTopBottomProps = _objectSpread(_objectSpread({}, standardProps), {}, {
89
79
  alignItems: 'flexEnd'
90
80
  });
91
-
92
81
  export const pinnedToTopBottom = Template.bind(pinnedToTopBottomProps);
93
82
  pinnedToTopBottom.args = pinnedToTopBottomProps;
94
83
  pinnedToTopBottom.argTypes = argTypes;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Modal/Modal.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,UAAU,QAErB,CAAC;AAEH,eAAO,MAAM,KAAK,QAOhB,CAAC;AAEH,eAAO,MAAM,QAAQ,sCAenB,CAAC"}
1
+ {"version":3,"file":"Modal.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Modal/Modal.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,UAAU,QAErB,CAAC;AAEH,eAAO,MAAM,KAAK,QAOhB,CAAC;AAEH,eAAO,MAAM,QAAQ,sCAanB,CAAC"}
@@ -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/Modal/Modal.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({
@@ -31,14 +29,11 @@ export const backdrop = styleVariants({
31
29
  bottom: 0,
32
30
  left: 0,
33
31
  zIndex: 999,
34
- backgroundColor: vars.colours.intent.neutral.background.standard,
35
32
  opacity: 0.75,
36
33
  backdropFilter: 'blur(5px)'
37
34
  },
38
35
  invisible: {
39
- backgroundColor: 'transparent',
40
36
  backdropFilter: 'none'
41
37
  }
42
38
  }, "backdrop");
43
-
44
39
  __vanilla_filescope__.endFileScope();
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../lib/components/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AASzD,MAAM,WAAW,KAAK;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;CAChE;AAqDD,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAoE1C,CAAC;AAEF,eAAO,MAAM,SAAS,wIAmBpB,CAAC;AAEH,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../lib/components/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AASzD,MAAM,WAAW,KAAK;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC;CAChE;AAqDD,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAuE1C,CAAC;AAEF,eAAO,MAAM,SAAS,wIAmBpB,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -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 = ["onRequestClose", "isOpen"];
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 { useEffect, useReducer } from 'react';
@@ -18,7 +15,6 @@ import { Portal } from "../Portal/index.js";
18
15
  import * as styles from "./Modal.css.js";
19
16
  import { jsx as _jsx } from "react/jsx-runtime";
20
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
-
22
18
  const reducer = (prevState, action) => {
23
19
  switch (action) {
24
20
  case 'OPEN_MODAL':
@@ -30,12 +26,10 @@ const reducer = (prevState, action) => {
30
26
  {
31
27
  return 'OPENING';
32
28
  }
33
-
34
29
  default:
35
30
  return prevState;
36
31
  }
37
32
  }
38
-
39
33
  case 'CLOSE_MODAL':
40
34
  {
41
35
  switch (prevState) {
@@ -44,12 +38,10 @@ const reducer = (prevState, action) => {
44
38
  {
45
39
  return 'CLOSING';
46
40
  }
47
-
48
41
  default:
49
42
  return prevState;
50
43
  }
51
44
  }
52
-
53
45
  case 'ANIMATION_COMPLETE':
54
46
  {
55
47
  switch (prevState) {
@@ -57,22 +49,18 @@ const reducer = (prevState, action) => {
57
49
  {
58
50
  return 'CLOSED';
59
51
  }
60
-
61
52
  case 'OPENING':
62
53
  {
63
54
  return 'OPEN';
64
55
  }
65
-
66
56
  default:
67
57
  return prevState;
68
58
  }
69
59
  }
70
-
71
60
  default:
72
61
  return prevState;
73
62
  }
74
63
  };
75
-
76
64
  export const Modal = _ref => {
77
65
  let {
78
66
  isOpen,
@@ -95,7 +83,6 @@ export const Modal = _ref => {
95
83
  }, 300);
96
84
  return () => clearTimeout(timer);
97
85
  }
98
-
99
86
  return undefined;
100
87
  }, [state]);
101
88
  return _jsx(Portal, {
@@ -110,6 +97,7 @@ export const Modal = _ref => {
110
97
  position: "fixed",
111
98
  pointerEvents: state === 'CLOSING' ? 'none' : undefined,
112
99
  opacity: state === 'OPEN' ? undefined : 0,
100
+ backgroundColour: hideBackdrop ? 'transparent' : 'neutral',
113
101
  className: [styles.backdrop.root, styles.transition, hideBackdrop && styles.backdrop.invisible],
114
102
  onClick: handleBackdropClick
115
103
  }), _jsx(Box, {
@@ -125,11 +113,10 @@ export const Modal = _ref => {
125
113
  };
126
114
  export const withModal = WrappedComponent => _ref2 => {
127
115
  let {
128
- onRequestClose,
129
- isOpen
130
- } = _ref2,
131
- rest = _objectWithoutProperties(_ref2, _excluded);
132
-
116
+ onRequestClose,
117
+ isOpen
118
+ } = _ref2,
119
+ rest = _objectWithoutProperties(_ref2, _excluded);
133
120
  process.env.NODE_ENV !== "production" ? warning(false, 'Using withModal is now an anti-pattern. Use <Modal /> instead') : void 0;
134
121
  return _jsx(Modal, {
135
122
  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 { action } from '@storybook/addon-actions';
10
7
  import * as React from 'react';
11
8
  import { Box } from "../Box/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(Modal, _objectSpread(_objectSpread({}, args), {}, {
29
25
  children: _jsx(Box, {
@@ -48,7 +44,6 @@ const Template = args => _jsxs(_Fragment, {
48
44
  children: "Nunc ac congue lacus, ac vulputate lectus. Suspendisse vel malesuada tellus. In nec fringilla elit. Cras vitae metus et leo convallis consectetur. Cras quis congue sapien, vitae aliquet ante. Integer sed lorem pretium, vestibulum arcu eu, imperdiet mauris. Nam blandit pharetra feugiat. Maecenas eget ante metus. Vivamus pretium ipsum justo, a faucibus ex dictum non. Vestibulum et dui diam."
49
45
  })]
50
46
  });
51
-
52
47
  const standardProps = {
53
48
  isOpen: true,
54
49
  onRequestClose: action('onRequestClose')
@@ -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/NumberBubble/NumberBubble.css.ts", "@autoguru/overdrive");
6
-
7
5
  import { style } from '@vanilla-extract/css';
8
6
  export const bubbleText = style({
9
7
  top: '50%',
10
8
  left: '50%',
11
9
  transform: 'translate(-50%, -50%)'
12
10
  }, "bubbleText");
13
-
14
11
  __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 = ["value", "textColour", "rawNumbers"];
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 clsx from 'clsx';
12
9
  import * as React from 'react';
13
10
  import { useMemo } from 'react';
@@ -24,12 +21,11 @@ const valuePaddingMap = {
24
21
  };
25
22
  export const NumberBubble = _ref => {
26
23
  let {
27
- value,
28
- textColour = 'white',
29
- rawNumbers = false
30
- } = _ref,
31
- boxProps = _objectWithoutProperties(_ref, _excluded);
32
-
24
+ value,
25
+ textColour = 'white',
26
+ rawNumbers = false
27
+ } = _ref,
28
+ boxProps = _objectWithoutProperties(_ref, _excluded);
33
29
  const size = useMemo(() => {
34
30
  if (value > 9 && value < 100) return 'MEDIUM';
35
31
  if (value > 99 && value < 9999) return 'LARGE';
@@ -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 { NumberBubble } from "./index.js";
11
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -13,9 +10,7 @@ export default {
13
10
  title: 'Foundation/Typography/NumberBubble',
14
11
  component: NumberBubble
15
12
  };
16
-
17
13
  const template = args => _jsx(NumberBubble, _objectSpread({}, args));
18
-
19
14
  const standardProps = {
20
15
  value: 0
21
16
  };
@@ -3,12 +3,9 @@
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  const _excluded = ["ref"],
6
- _excluded2 = ["field", "eventHandlers", "validation", "isLoading", "suffixed", "prefixed", "preventMouseWheel", "size"];
7
-
6
+ _excluded2 = ["field", "eventHandlers", "validation", "isLoading", "suffixed", "prefixed", "preventMouseWheel", "size"];
8
7
  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
8
  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
9
  import * as React from 'react';
13
10
  import { useCallback, useEffect, useRef } from 'react';
14
11
  import { Box } from "../Box/index.js";
@@ -18,20 +15,19 @@ const isEdge = typeof navigator !== 'undefined' && /edge/i.test(navigator.userAg
18
15
  const type = isEdge ? 'text' : 'number';
19
16
  export const NumberInput = withEnhancedInput(_ref => {
20
17
  let {
21
- field: {
22
- ref
23
- },
24
- eventHandlers,
25
- validation,
26
- isLoading,
27
- suffixed,
28
- prefixed,
29
- preventMouseWheel = false,
30
- size
31
- } = _ref,
32
- incomingFieldProps = _objectWithoutProperties(_ref.field, _excluded),
33
- rest = _objectWithoutProperties(_ref, _excluded2);
34
-
18
+ field: {
19
+ ref
20
+ },
21
+ eventHandlers,
22
+ validation,
23
+ isLoading,
24
+ suffixed,
25
+ prefixed,
26
+ preventMouseWheel = false,
27
+ size
28
+ } = _ref,
29
+ incomingFieldProps = _objectWithoutProperties(_ref.field, _excluded),
30
+ rest = _objectWithoutProperties(_ref, _excluded2);
35
31
  const inputRef = useRef(ref === null || ref === void 0 ? void 0 : ref.current);
36
32
  const preventWheel = useCallback(e => {
37
33
  e.preventDefault();
@@ -41,7 +37,6 @@ export const NumberInput = withEnhancedInput(_ref => {
41
37
  let mouseWheelListener;
42
38
  let onWheelListener;
43
39
  let wheelListener;
44
-
45
40
  if (preventMouseWheel && inputRef !== null && inputRef !== void 0 && inputRef.current) {
46
41
  mouseWheelListener = inputRef.current.addEventListener('mousewheel', preventWheel, {
47
42
  passive: false
@@ -53,7 +48,6 @@ export const NumberInput = withEnhancedInput(_ref => {
53
48
  passive: false
54
49
  });
55
50
  }
56
-
57
51
  return () => {
58
52
  if (mouseWheelListener) inputRef.current.removeEventListener('mousewheel', mouseWheelListener);
59
53
  if (onWheelListener) inputRef.current.removeEventListener('onwheel', onWheelListener);