@autoguru/overdrive 4.20.0 → 4.21.0

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,4 +1,5 @@
1
1
  export declare const root: string;
2
+ export declare const simpleRoot: string;
2
3
  export declare const content: string;
3
4
  export declare const popped: string;
4
5
  export declare const zIndex: Record<never, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"StickyBox.css.d.ts","sourceRoot":"","sources":["../../../lib/components/StickyBox/StickyBox.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,QAGf,CAAC;AAEH,eAAO,MAAM,OAAO,QAGlB,CAAC;AAEH,eAAO,MAAM,MAAM,QAEjB,CAAC;AAEH,eAAO,MAAM,MAAM,uBAQlB,CAAC;AAEF,eAAO,MAAM,GAAG,uBASf,CAAC;AAEF,eAAO,MAAM,MAAM,uBASlB,CAAC"}
1
+ {"version":3,"file":"StickyBox.css.d.ts","sourceRoot":"","sources":["../../../lib/components/StickyBox/StickyBox.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,QAGf,CAAC;AACH,eAAO,MAAM,UAAU,QAGrB,CAAC;AAEH,eAAO,MAAM,OAAO,QAGlB,CAAC;AAEH,eAAO,MAAM,MAAM,QAEjB,CAAC;AAEH,eAAO,MAAM,MAAM,uBAQlB,CAAC;AAEF,eAAO,MAAM,GAAG,uBASf,CAAC;AAEF,eAAO,MAAM,MAAM,uBASlB,CAAC"}
@@ -9,6 +9,10 @@ export const root = style({
9
9
  position: 'sticky',
10
10
  transition: "box-shadow 0.3s ".concat(vars.animation.easing.standard, " 0s")
11
11
  }, "root");
12
+ export const simpleRoot = style({
13
+ position: 'sticky',
14
+ height: 'fit-content'
15
+ }, "simpleRoot");
12
16
  export const content = style({
13
17
  height: 'fit-content',
14
18
  transition: "transform 0.3s ".concat(vars.animation.easing.standard, " 0s")
@@ -4,6 +4,7 @@ interface Props extends ComponentProps<typeof Box> {
4
4
  top?: 'none' | '1' | '2' | '3' | '5' | '7' | 'subHeader';
5
5
  bottom?: 'none' | '1' | '2' | '3' | 'subHeader';
6
6
  zIndex?: 0 | 1 | 2 | 3 | 99;
7
+ noPopShadow?: boolean;
7
8
  className?: string;
8
9
  }
9
10
  export declare const StickyBox: FunctionComponent<Props>;
@@ -1 +1 @@
1
- {"version":3,"file":"StickyBox.d.ts","sourceRoot":"","sources":["../../../lib/components/StickyBox/StickyBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAI7B,UAAU,KAAM,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC;IACjD,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,WAAW,CAAC;IACzD,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,WAAW,CAAC;IAChD,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,KAAK,CAgD9C,CAAC"}
1
+ {"version":3,"file":"StickyBox.d.ts","sourceRoot":"","sources":["../../../lib/components/StickyBox/StickyBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAI7B,UAAU,KAAM,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC;IACjD,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,WAAW,CAAC;IACzD,MAAM,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,WAAW,CAAC;IAChD,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,KAAK,CA6D9C,CAAC"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
- const _excluded = ["top", "bottom", "zIndex", "className", "backgroundColour", "boxShadow", "children"];
5
+ const _excluded = ["top", "bottom", "noPopShadow", "zIndex", "className", "backgroundColour", "boxShadow", "children"];
6
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; }
7
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; }
8
8
  import clsx from 'clsx';
@@ -16,6 +16,7 @@ export const StickyBox = _ref => {
16
16
  let {
17
17
  top = 'none',
18
18
  bottom = 'none',
19
+ noPopShadow = false,
19
20
  zIndex = 2,
20
21
  className = '',
21
22
  backgroundColour,
@@ -38,7 +39,11 @@ export const StickyBox = _ref => {
38
39
  });
39
40
  return () => parentElement.removeEventListener('scroll', onScroll);
40
41
  }, [(_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.parentElement]);
41
- return _jsx(Box, _objectSpread(_objectSpread({
42
+ return noPopShadow ? _jsx(Box, _objectSpread(_objectSpread({
43
+ className: [className, styles.simpleRoot, styles.top[top], styles.zIndex[zIndex]]
44
+ }, rest), {}, {
45
+ children: children
46
+ })) : _jsx(Box, _objectSpread(_objectSpread({
42
47
  ref: containerRef,
43
48
  overflow: "hidden",
44
49
  className: clsx(className, styles.root, styles.top[top], styles.zIndex[zIndex]),
@@ -61,4 +61,10 @@ const standardProps = {
61
61
  top: 'none'
62
62
  };
63
63
  export const standard = Template.bind(standardProps);
64
- standard.args = standardProps;
64
+ standard.args = standardProps;
65
+ const withNoPopShadowProps = {
66
+ top: 'none',
67
+ noPopShadow: true
68
+ };
69
+ export const withNoPopShadow = Template.bind(withNoPopShadowProps);
70
+ withNoPopShadow.args = withNoPopShadowProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoguru/overdrive",
3
- "version": "4.20.0",
3
+ "version": "4.21.0",
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",