@autoguru/overdrive 3.0.0-next.13 → 3.0.0-next.17

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @autoguru/overdrive
2
2
 
3
+ ## 3.0.0-next.17
4
+
5
+ ### Patch Changes
6
+
7
+ - useMedia
8
+
9
+ ## 3.0.0-next.16
10
+
11
+ ### Patch Changes
12
+
13
+ - Portal: Removes memo
14
+
15
+ ## 3.0.0-next.15
16
+
17
+ ### Patch Changes
18
+
19
+ - Portal: Fixes unwrapped version
20
+
21
+ ## 3.0.0-next.14
22
+
23
+ ### Patch Changes
24
+
25
+ - Portal: Makes theme wrapping optional
26
+
3
27
  ## 3.0.0-next.13
4
28
 
5
29
  ### Patch Changes
@@ -12,7 +12,8 @@ function Portal(_ref, ref) {
12
12
 
13
13
  let {
14
14
  children,
15
- container
15
+ container,
16
+ noThemedWrapper
16
17
  } = _ref;
17
18
  const themeClass = (_useTheme = useTheme()) === null || _useTheme === void 0 ? void 0 : _useTheme.themeClass;
18
19
  const [mountNode, setMountNode] = useState(null);
@@ -28,10 +29,11 @@ function Portal(_ref, ref) {
28
29
  void setRef(ref, null);
29
30
  };
30
31
  }, [ref, mountNode]);
31
- return mountNode ? createPortal(_jsx("div", {
32
+ if (!mountNode) return null;
33
+ return noThemedWrapper ? createPortal(children, mountNode) : createPortal(_jsx("div", {
32
34
  className: themeClass,
33
35
  children: children
34
- }), mountNode) : null;
36
+ }), mountNode);
35
37
  }
36
38
 
37
39
  const _Portal = forwardRef(Portal);
@@ -9,6 +9,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
9
9
 
10
10
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
11
11
 
12
+ import { flip, offset, popperGenerator, preventOverflow } from '@popperjs/core';
13
+ import { defaultModifiers } from '@popperjs/core/lib/popper';
12
14
  import * as React from 'react';
13
15
  import { useCallback, useEffect, useRef } from 'react';
14
16
  import { isBrowser, setRef } from "../../utils/index.js";
@@ -16,8 +18,6 @@ import { Box } from "../Box/index.js";
16
18
  import { Portal } from "../Portal/index.js";
17
19
  import * as styles from "./Positioner.css.js";
18
20
  import { EAlignment } from "./alignment.js";
19
- import { flip, offset, popperGenerator, preventOverflow } from '@popperjs/core';
20
- import { defaultModifiers } from '@popperjs/core/lib/popper';
21
21
  import { jsx as _jsx } from "react/jsx-runtime";
22
22
  export { EAlignment } from "./alignment.js";
23
23
  const createPopper = popperGenerator({
@@ -12,11 +12,11 @@ const spinAnim = keyframes({
12
12
  }
13
13
  }, "spinAnim");
14
14
  export const circular = style({
15
+ animationName: spinAnim,
15
16
  transformOrigin: 'center center',
16
17
  animationDuration: '2s',
17
18
  animationTimingFunction: 'linear',
18
- animationIterationCount: 'infinite',
19
- animationName: spinAnim
19
+ animationIterationCount: 'infinite'
20
20
  }, "circular");
21
21
  const stokeAnim = keyframes({
22
22
  '0%': {
@@ -10,7 +10,7 @@ export const useMedia = function useMedia(queries) {
10
10
  breakpoints
11
11
  } = useRuntimeTokens();
12
12
  if (!isBrowser) return queries.map(() => fallbackCase);
13
- const getQueries = useCallback(() => queries.map(media => "(min-width: ".concat(breakpoints[media], "px)")), [breakpoints]);
13
+ const getQueries = useCallback(() => queries.map(media => "(min-width: ".concat(breakpoints[media], ")")), [breakpoints]);
14
14
  const matchesInit = useMemo(() => getQueries().map(query => window.matchMedia(query).matches), [getQueries]);
15
15
  const [matches, setMatches] = useState(matchesInit);
16
16
  useLayoutEffect(() => {
@@ -177,5 +177,10 @@ export const tokens = _objectSpread(_objectSpread({}, baseTokens), {}, {
177
177
  min: 'none',
178
178
  '1': 'none'
179
179
  }
180
- }
180
+ },
181
+ typography: _objectSpread(_objectSpread({}, baseTokens.typography), {}, {
182
+ colour: _objectSpread(_objectSpread({}, baseTokens.typography.colour), {}, {
183
+ primary: colours.red['600']
184
+ })
185
+ })
181
186
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoguru/overdrive",
3
- "version": "3.0.0-next.13",
3
+ "version": "3.0.0-next.17",
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",