@autoguru/overdrive 4.44.4-next.0 → 4.44.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 (86) hide show
  1. package/dist/components/Actions/Actions.js +12 -15
  2. package/dist/components/Alert/Alert.js +8 -9
  3. package/dist/components/AutoSuggest/AutoSuggest.js +114 -126
  4. package/dist/components/Badge/Badge.js +8 -9
  5. package/dist/components/BulletList/Bullet.js +4 -5
  6. package/dist/components/BulletList/BulletList.js +4 -5
  7. package/dist/components/BulletText/BulletText.js +44 -47
  8. package/dist/components/Button/Button.js +23 -24
  9. package/dist/components/CheckBox/CheckBox.js +11 -12
  10. package/dist/components/DateTimePicker/CalendarGrid.js +7 -8
  11. package/dist/components/DateTimePicker/DateTimePicker.js +9 -10
  12. package/dist/components/DividerLine/DividerLine.js +16 -19
  13. package/dist/components/DropDown/DropDownOptionsList.js +15 -18
  14. package/dist/components/Flex/flex.js +35 -41
  15. package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.js +12 -13
  16. package/dist/components/HorizontalAutoScroller/useHorizontalAutoScroller.js +7 -8
  17. package/dist/components/Icon/Icon.js +6 -7
  18. package/dist/components/Image/ImageServerProvider.js +17 -21
  19. package/dist/components/Inline/Inline.js +13 -15
  20. package/dist/components/IntentStripe/IntentStripe.js +10 -13
  21. package/dist/components/LinearProgressIndicator/LinearProgressIndicator.js +3 -4
  22. package/dist/components/Meta/Meta.js +18 -21
  23. package/dist/components/Modal/Modal.js +13 -14
  24. package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -1
  25. package/dist/components/NumberBubble/NumberBubble.js +28 -29
  26. package/dist/components/NumberInput/useNumberInputBehaviours.js +8 -9
  27. package/dist/components/OptionGrid/OptionGrid.js +53 -57
  28. package/dist/components/OptionList/OptionListItem.js +4 -5
  29. package/dist/components/OrderedList/OrderedList.js +14 -18
  30. package/dist/components/OutsideClick/OutsideClick.js +4 -5
  31. package/dist/components/OverdriveProvider/FallbackProvider.js +3 -4
  32. package/dist/components/OverdriveProvider/OverdriveProvider.js +8 -9
  33. package/dist/components/Pagination/Bubble.js +8 -9
  34. package/dist/components/Pagination/Pagination.js +56 -63
  35. package/dist/components/Portal/Portal.js +5 -6
  36. package/dist/components/ProgressBar/ProgressBar.js +16 -19
  37. package/dist/components/ProgressBarGroup/ProgressBarGroup.js +7 -8
  38. package/dist/components/ProgressSpinner/ProgressSpinner.js +23 -26
  39. package/dist/components/Radio/Radio.js +6 -7
  40. package/dist/components/Radio/RadioGroup.js +7 -8
  41. package/dist/components/Section/Section.js +12 -15
  42. package/dist/components/SimplePagination/SimplePagination.js +5 -6
  43. package/dist/components/SliderProgress/ProgressStep.js +9 -10
  44. package/dist/components/SliderProgress/SliderProgress.js +25 -28
  45. package/dist/components/Stack/Stack.js +9 -10
  46. package/dist/components/StandardModal/StandardModal.js +11 -12
  47. package/dist/components/StarRating/StarRating.js +32 -36
  48. package/dist/components/Stepper/Stepper.js +45 -50
  49. package/dist/components/Table/Table.js +20 -23
  50. package/dist/components/Table/TableCell.js +8 -9
  51. package/dist/components/Table/TableHeadCell.js +10 -11
  52. package/dist/components/Table/TableRow.js +10 -13
  53. package/dist/components/Table/TableRowGroup.js +8 -11
  54. package/dist/components/Table/context.js +5 -6
  55. package/dist/components/Tabs/Tab.js +6 -7
  56. package/dist/components/Tabs/TabList.js +5 -6
  57. package/dist/components/Tabs/TabPane.js +4 -5
  58. package/dist/components/Tabs/TabPanes.js +18 -21
  59. package/dist/components/Tabs/Tabs.js +7 -8
  60. package/dist/components/TextContainer/TextContainer.js +21 -24
  61. package/dist/components/Toaster/Toast.js +65 -98
  62. package/dist/components/Tooltip/Tooltip.js +10 -11
  63. package/dist/components/Tooltip/useTooltip/useTooltip.js +11 -13
  64. package/dist/components/private/CheckableBase/CheckableBase.js +12 -13
  65. package/dist/components/private/InputBase/HintText.js +7 -8
  66. package/dist/components/private/InputBase/NotchedBase.js +17 -18
  67. package/dist/components/private/InputBase/withEnhancedInput.js +182 -187
  68. package/dist/hooks/useAnimationEvents/useAnimationEvents.js +5 -6
  69. package/dist/hooks/useAttachedBoxes/useAttachedBoxes.js +9 -10
  70. package/dist/hooks/useMedia/useMedia.js +1 -2
  71. package/dist/hooks/useWindowHeightFill/useWindowHeightFill.js +8 -9
  72. package/dist/styles/sprinkles.css.js +9 -18
  73. package/dist/styles/typography.js +28 -31
  74. package/dist/themes/helpers.js +13 -15
  75. package/dist/themes/makeTheme.js +8 -15
  76. package/dist/utils/css.js +1 -2
  77. package/dist/utils/dataAttrs.js +1 -2
  78. package/dist/utils/index.js +3 -9
  79. package/dist/utils/mapTokenToProperty.js +5 -14
  80. package/dist/utils/number.js +1 -2
  81. package/dist/utils/responsiveProps.css.js +1 -2
  82. package/dist/utils/sprinkles.js +1 -2
  83. package/package.json +2 -2
  84. package/dist/components/NumberBubble/NumberBubble.css.d.ts +0 -2
  85. package/dist/components/NumberBubble/NumberBubble.css.d.ts.map +0 -1
  86. package/dist/components/NumberBubble/NumberBubble.css.js +0 -11
@@ -21,18 +21,11 @@ export const mediaQuery = mapValues(breakpoints, breakpoint => `screen and (min-
21
21
  export const themeTokensWithLayer = tokens => _objectSpread({
22
22
  '@layer': cssLayerTheme
23
23
  }, tokens);
24
- export const makeRuntimeTokens = function () {
25
- let runtimeBreakpoints = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : breakpoints;
26
- return {
27
- breakpoints: runtimeBreakpoints
28
- };
29
- };
30
- export const buildColourGamut = colours => Object.entries(colours).reduce((result, _ref) => {
31
- let [name, colourGrades] = _ref;
32
- return _objectSpread(_objectSpread({}, result), Object.entries(colourGrades).reduce((grades, _ref2) => {
33
- let [colourGradeName, colour] = _ref2;
34
- return _objectSpread(_objectSpread({}, grades), {}, {
35
- [`${name}${colourGradeName}`]: colour
36
- });
37
- }, {}));
38
- }, {});
24
+ export const makeRuntimeTokens = (runtimeBreakpoints = breakpoints) => ({
25
+ breakpoints: runtimeBreakpoints
26
+ });
27
+ export const buildColourGamut = colours => Object.entries(colours).reduce((result, [name, colourGrades]) => _objectSpread(_objectSpread({}, result), Object.entries(colourGrades).reduce((grades, [colourGradeName, colour]) => {
28
+ return _objectSpread(_objectSpread({}, grades), {}, {
29
+ [`${name}${colourGradeName}`]: colour
30
+ });
31
+ }, {})), {});
package/dist/utils/css.js CHANGED
@@ -57,8 +57,7 @@ export const interactionStyle = selectors => {
57
57
  };
58
58
 
59
59
  // Add selectors for each interaction state that has styles
60
- Object.entries(interactionStyles).forEach(_ref => {
61
- let [state, stateStyles] = _ref;
60
+ Object.entries(interactionStyles).forEach(([state, stateStyles]) => {
62
61
  if (state in rules && stateStyles) {
63
62
  if (state === 'checked') state = 'selected';
64
63
  styles.selectors[rules[state]] = stateStyles;
@@ -4,8 +4,7 @@
4
4
  * Consistent mapping of props to data attributes
5
5
  */
6
6
  export function dataAttrs(attrs) {
7
- return Object.entries(attrs).reduce((acc, _ref) => {
8
- let [key, value] = _ref;
7
+ return Object.entries(attrs).reduce((acc, [key, value]) => {
9
8
  if (value !== false && value !== undefined) {
10
9
  acc[`data-${key.replaceAll(/([A-Z])/g, '-$1').toLowerCase()}`] = typeof value === 'boolean' ? '' : value;
11
10
  }
@@ -70,10 +70,7 @@ export function mergeRefs(refs) {
70
70
  };
71
71
  }
72
72
  export const isHtmlElement = element => element instanceof Element || element instanceof Document;
73
- export const hex2rgba = function (c) {
74
- let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '1';
75
- return `rgb(${c.slice(1).match(/../g).map(x => Number(`0x${x}`))},${alpha})`;
76
- };
73
+ export const hex2rgba = (c, alpha = '1') => `rgb(${c.slice(1).match(/../g).map(x => Number(`0x${x}`))},${alpha})`;
77
74
  export const ownerDocument = node => (node === null || node === void 0 ? void 0 : node.ownerDocument) || document;
78
75
  export const ownerWindow = node => {
79
76
  var _ownerDocument;
@@ -93,15 +90,12 @@ export const useEventCallback = fn => {
93
90
  isomorphicLayoutEffect(() => {
94
91
  ref.current = fn;
95
92
  });
96
- return useCallback(function () {
97
- return void ref.current.apply(ref, arguments);
98
- }, []);
93
+ return useCallback((...args) => void ref.current.apply(ref, args), []);
99
94
  };
100
95
 
101
96
  // Taken from https://gist.github.com/gre/1650294
102
97
  const easeInOutCubic = t => t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
103
- export const animate = function (element, property, to) {
104
- let duration = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 600;
98
+ export const animate = (element, property, to, duration = 600) => {
105
99
  let start = null;
106
100
  // @ts-expect-error Type 'T[keyof T]' is not assignable to type 'number'
107
101
  const from = element[property];
@@ -3,17 +3,8 @@
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- export const mapTokenToProperty = function (record, property) {
7
- let omitKeys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
8
- return Object.entries(record).filter(_ref => {
9
- let [key] = _ref;
10
- return !omitKeys.includes(key);
11
- }).reduce((result, _ref2) => {
12
- let [key, value] = _ref2;
13
- return _objectSpread(_objectSpread({}, result), {}, {
14
- [key]: _objectSpread({}, typeof property === 'function' ? property(value) : {
15
- [property]: value
16
- })
17
- });
18
- }, {});
19
- };
6
+ export const mapTokenToProperty = (record, property, omitKeys = []) => Object.entries(record).filter(([key]) => !omitKeys.includes(key)).reduce((result, [key, value]) => _objectSpread(_objectSpread({}, result), {}, {
7
+ [key]: _objectSpread({}, typeof property === 'function' ? property(value) : {
8
+ [property]: value
9
+ })
10
+ }), {});
@@ -19,8 +19,7 @@ export const bigNumFormatter = num => {
19
19
  };
20
20
  }
21
21
  };
22
- export const toPrettyBigNumber = function (number) {
23
- let fractionDigits = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
22
+ export const toPrettyBigNumber = (number, fractionDigits = 1) => {
24
23
  const formatChunks = bigNumFormatter(number);
25
24
  const value = Number.isInteger(formatChunks.value) ? formatChunks.value : formatChunks.value.toFixed(fractionDigits);
26
25
  return `${value}${formatChunks.descriptor}`;
@@ -8,8 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  import { style } from '@vanilla-extract/css';
9
9
  import { breakpoints } from "../themes/makeTheme.js";
10
10
  import { responsiveStyle } from "./responsiveStyle.js"; // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
11
- export const makeResponsiveStyle = (tokens, property) => Object.entries(tokens || {}).reduce((results, _ref) => {
12
- let [key, value] = _ref;
11
+ export const makeResponsiveStyle = (tokens, property) => Object.entries(tokens || {}).reduce((results, [key, value]) => {
13
12
  const breakpointsKeys = Object.keys(breakpoints);
14
13
  return _objectSpread(_objectSpread({}, results), {}, {
15
14
  [key]: breakpointsKeys.reduce((bpList, bp) => {
@@ -14,8 +14,7 @@ export const isSprinklesProperty = key => {
14
14
  * @param props - Object containing all props to be filtered
15
15
  * @returns Object containing only non-sprinkles props
16
16
  */
17
- export const filterNonSprinklesProps = props => Object.entries(props).reduce((acc, _ref) => {
18
- let [key, value] = _ref;
17
+ export const filterNonSprinklesProps = props => Object.entries(props).reduce((acc, [key, value]) => {
19
18
  if (!isSprinklesProperty(key)) {
20
19
  acc[key] = value;
21
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoguru/overdrive",
3
- "version": "4.44.4-next.0",
3
+ "version": "4.44.4",
4
4
  "description": "Overdrive is a product component library, and design system for AutoGuru.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -113,7 +113,7 @@
113
113
  "babel-plugin-add-import-extension": "1.6.0",
114
114
  "babel-plugin-dev-expression": "0.2.3",
115
115
  "babel-plugin-macros": "3.1.0",
116
- "browserslist-config-autoguru": "2.4.4",
116
+ "browserslist-config-autoguru": "2.5.0",
117
117
  "chromatic": "13.1.2",
118
118
  "clsx": "2.1.1",
119
119
  "colord": "2.9.3",
@@ -1,2 +0,0 @@
1
- export declare const bubbleText: string;
2
- //# sourceMappingURL=NumberBubble.css.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberBubble.css.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberBubble/NumberBubble.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,QAIrB,CAAC"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
4
- __vanilla_filescope__.setFileScope("lib/components/NumberBubble/NumberBubble.css.ts", "@autoguru/overdrive");
5
- import { style } from '@vanilla-extract/css';
6
- export const bubbleText = style({
7
- top: '50%',
8
- left: '50%',
9
- transform: 'translate(-50%, -50%)'
10
- }, "bubbleText");
11
- __vanilla_filescope__.endFileScope();