@autoguru/overdrive 4.44.8 → 4.44.9

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.
@@ -1,14 +1,14 @@
1
1
  import type { IconType } from '@autoguru/icons';
2
- import type { FunctionComponent, ReactElement, SVGAttributes } from 'react';
3
- import { ResponsiveProp } from '../../utils/responsiveProps.css';
2
+ import { type FunctionComponent, type ReactElement, type SVGAttributes } from 'react';
3
+ import type { ResponsiveProp } from '../../utils/responsiveProps.css';
4
4
  import { type BoxProps } from '../Box/Box';
5
5
  import * as styles from './Icon.css';
6
- export type IconEl = IconType | ReactElement<SVGAttributes<SVGElement>, 'svg'>;
6
+ export type IconEl = IconType | ReactElement<SVGAttributes<SVGElement>, 'svg'> | null;
7
7
  export interface IconProps {
8
8
  display?: Extract<BoxProps['display'], 'block' | 'inlineBlock' | 'inline-block'>;
9
9
  className?: string;
10
10
  size?: ResponsiveProp<keyof typeof styles.size | string>;
11
- icon: IconEl;
11
+ icon?: IconEl;
12
12
  }
13
13
  export declare const Icon: FunctionComponent<IconProps>;
14
14
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../lib/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO5E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,KAAK,MAAM,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC;AAE/E,MAAM,WAAW,SAAS;IACzB,O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 
3
- import * as React from 'react';
4
- import { cloneElement } from 'react';
3
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
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
+ 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
+ import React, { cloneElement } from 'react';
5
7
  import { useNullCheck } from "../../hooks/useNullCheck/index.js";
6
8
  import { elementStyles } from "../../styles/index.js";
7
9
  import { resolveResponsiveStyle } from "../../utils/resolveResponsiveProps.js";
@@ -16,6 +18,19 @@ export const Icon = ({
16
18
  }) => {
17
19
  var _icon$props$ariaLabe;
18
20
  useNullCheck(icon, 'Icon component received an empty icon prop.');
21
+ const boxProps = {
22
+ as: 'span',
23
+ display,
24
+ className: [resolveResponsiveStyle(size, styles.size), className],
25
+ odComponent: 'icon'
26
+ };
27
+
28
+ // Handle null/undefined icons by showing fallback without trying to clone
29
+ if (!icon) {
30
+ return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({}, boxProps), {}, {
31
+ children: "\u2B24"
32
+ }));
33
+ }
19
34
  const iconElement = /*#__PURE__*/cloneElement(icon, {
20
35
  className: elementStyles({
21
36
  as: 'svg',
@@ -26,11 +41,7 @@ export const Icon = ({
26
41
  'aria-label': (_icon$props$ariaLabe = icon.props['aria-label']) !== null && _icon$props$ariaLabe !== void 0 ? _icon$props$ariaLabe : undefined,
27
42
  'aria-hidden': icon.props['aria-label'] ? undefined : true
28
43
  });
29
- return /*#__PURE__*/_jsx(Box, {
30
- as: "span",
31
- display: display,
32
- className: [resolveResponsiveStyle(size, styles.size), className],
33
- odComponent: "icon",
34
- children: icon ? iconElement : '⬤'
35
- });
44
+ return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({}, boxProps), {}, {
45
+ children: iconElement
46
+ }));
36
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoguru/overdrive",
3
- "version": "4.44.8",
3
+ "version": "4.44.9",
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",
@@ -59,7 +59,7 @@
59
59
  "devDependencies": {
60
60
  "@autoguru/babel-preset": "3.2.0",
61
61
  "@autoguru/eslint-plugin": "2.0.0",
62
- "@autoguru/icons": "1.8.11",
62
+ "@autoguru/icons": "1.8.12",
63
63
  "@autoguru/tsconfig": "1.3.1",
64
64
  "@autoguru/utilities": "^1.3.3",
65
65
  "@babel/cli": "7.28.0",
@@ -79,25 +79,25 @@
79
79
  "@babel/preset-typescript": "7.27.1",
80
80
  "@babel/runtime-corejs3": "7.28.0",
81
81
  "@changesets/cli": "2.29.5",
82
- "@chromatic-com/storybook": "4.0.1",
82
+ "@chromatic-com/storybook": "4.1.0",
83
83
  "@internationalized/date": "3.8.2",
84
84
  "@octokit/rest": "22.0.0",
85
85
  "@popperjs/core": "2.11.8",
86
86
  "@react-stately/toggle": "3.8.5",
87
- "@storybook/addon-a11y": "9.0.16",
88
- "@storybook/addon-docs": "9.0.16",
89
- "@storybook/addon-links": "9.0.16",
90
- "@storybook/addon-onboarding": "9.0.16",
91
- "@storybook/addon-vitest": "9.0.16",
92
- "@storybook/react-vite": "9.0.16",
87
+ "@storybook/addon-a11y": "9.1.0",
88
+ "@storybook/addon-docs": "9.1.0",
89
+ "@storybook/addon-links": "9.1.0",
90
+ "@storybook/addon-onboarding": "9.1.0",
91
+ "@storybook/addon-vitest": "9.1.0",
92
+ "@storybook/react-vite": "9.1.0",
93
93
  "@testing-library/dom": "^10.4.0",
94
94
  "@testing-library/jest-dom": "6.6.3",
95
95
  "@testing-library/react": "16.3.0",
96
96
  "@testing-library/react-hooks": "8.0.1",
97
97
  "@testing-library/user-event": "14.6.1",
98
- "@types/node": "24.0.13",
99
- "@types/react": "19.1.8",
100
- "@types/react-dom": "19.1.6",
98
+ "@types/node": "24.2.0",
99
+ "@types/react": "19.1.9",
100
+ "@types/react-dom": "19.1.7",
101
101
  "@types/webpack-env": "1.18.8",
102
102
  "@typescript-eslint/utils": "8.35.1",
103
103
  "@vanilla-extract/babel-plugin": "1.2.0",
@@ -114,22 +114,22 @@
114
114
  "babel-plugin-dev-expression": "0.2.3",
115
115
  "babel-plugin-macros": "3.1.0",
116
116
  "browserslist-config-autoguru": "2.5.0",
117
- "chromatic": "13.1.2",
117
+ "chromatic": "13.1.3",
118
118
  "clsx": "2.1.1",
119
119
  "colord": "2.9.3",
120
120
  "concurrently": "9.2.0",
121
- "core-js": "3.44.0",
121
+ "core-js": "3.45.0",
122
122
  "csstype": "3.1.3",
123
123
  "deepmerge": "4.3.1",
124
- "es-toolkit": "1.39.7",
124
+ "es-toolkit": "1.39.8",
125
125
  "eslint": "9.30.1",
126
- "eslint-plugin-storybook": "9.0.16",
126
+ "eslint-plugin-storybook": "9.1.0",
127
127
  "husky": "9.1.7",
128
128
  "intersection-observer": "0.12.2",
129
129
  "jsdom": "26.1.0",
130
- "lint-staged": "16.1.2",
130
+ "lint-staged": "16.1.4",
131
131
  "magic-string": "0.30.17",
132
- "mini-css-extract-plugin": "2.9.2",
132
+ "mini-css-extract-plugin": "2.9.3",
133
133
  "mockdate": "3.0.5",
134
134
  "playwright": "1.53.2",
135
135
  "plop": "4.0.1",
@@ -143,17 +143,17 @@
143
143
  "react-dom": "19.1.0",
144
144
  "react-focus-lock": "2.13.6",
145
145
  "react-intersection-observer": "9.16.0",
146
- "react-keyed-flatten-children": "5.0.0",
146
+ "react-keyed-flatten-children": "5.0.1",
147
147
  "react-stately": "3.39.0",
148
148
  "react-swipeable": "7.0.2",
149
149
  "rollup-plugin-visualizer": "6.0.3",
150
- "storybook": "9.0.16",
150
+ "storybook": "9.1.0",
151
151
  "storybook-addon-tag-badges": "2.0.1",
152
- "typescript": "5.8.3",
152
+ "typescript": "5.9.2",
153
153
  "url-loader": "4.1.1",
154
- "vite": "7.0.4",
154
+ "vite": "7.0.6",
155
155
  "vitest": "3.2.4",
156
- "webpack": "5.100.1"
156
+ "webpack": "5.101.0"
157
157
  },
158
158
  "peerDependencies": {
159
159
  "@autoguru/icons": ">=1.8.8",
@@ -176,7 +176,7 @@
176
176
  "webpack": "*"
177
177
  },
178
178
  "volta": {
179
- "node": "22.17.1",
179
+ "node": "22.18.0",
180
180
  "yarn": "4.9.2"
181
181
  },
182
182
  "packageManager": "yarn@4.9.2"