@autoguru/overdrive 4.9.7 → 4.10.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.
@@ -2,7 +2,7 @@ import clsx from 'clsx';
2
2
  import * as React from 'react';
3
3
  import { forwardRef } from 'react';
4
4
  import { useBoxStyles } from './useBoxStyles';
5
- export const Box = forwardRef(({ is: Component = 'div', padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, display, width, height, position, overflow, userSelect, textAlign, pointerEvents, borderColour, borderColourX, borderColourY, borderColourTop, borderColourRight, borderColourBottom, borderColourLeft, borderWidth, borderWidthX, borderWidthY, borderWidthTop, borderWidthRight, borderWidthBottom, borderWidthLeft, boxShadow, borderRadius, backgroundColour, opacity, className = '', alignItems, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, children, ...allOtherProps }, ref) => {
5
+ export const Box = forwardRef(({ is: Component = 'div', padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, display, width = 'none', height, position, overflow, userSelect, textAlign, pointerEvents, borderColour, borderColourX, borderColourY, borderColourTop, borderColourRight, borderColourBottom, borderColourLeft, borderWidth, borderWidthX, borderWidthY, borderWidthTop, borderWidthRight, borderWidthBottom, borderWidthLeft, boxShadow, borderRadius, backgroundColour, opacity, className = '', alignItems, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, children, ...allOtherProps }, ref) => {
6
6
  const cls = useBoxStyles({
7
7
  is: Component,
8
8
  alignItems,
@@ -1 +1 @@
1
- {"version":3,"file":"argTypes.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/argTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,CAWrD,CAAC;AAgCF,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,CAoDrE,CAAC"}
1
+ {"version":3,"file":"argTypes.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/argTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,CAWrD,CAAC;AAmCF,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,CA2DrE,CAAC"}
@@ -39,6 +39,10 @@ const borderRadiusOptions = [
39
39
  'full',
40
40
  'pill',
41
41
  ];
42
+ const widthOptions = [
43
+ 'full',
44
+ 'none',
45
+ ];
42
46
  export const boxArgTypes = {
43
47
  boxShadow: {
44
48
  options: boxShadowOptions,
@@ -53,7 +57,7 @@ export const boxArgTypes = {
53
57
  },
54
58
  },
55
59
  alignItems: {
56
- options: ['flexStart', 'center', 'flexEnd'],
60
+ options: ['flexStart', 'center', 'flexEnd', 'stretch'],
57
61
  control: {
58
62
  type: 'select',
59
63
  },
@@ -82,6 +86,13 @@ export const boxArgTypes = {
82
86
  none: 'none',
83
87
  },
84
88
  },
89
+ width: {
90
+ options: widthOptions,
91
+ defaultValue: null,
92
+ control: {
93
+ type: 'select',
94
+ },
95
+ },
85
96
  ...scaledProps.reduce((argTypes, prop) => {
86
97
  argTypes[prop] = {
87
98
  options: scaleOptions,
@@ -28,7 +28,7 @@ export declare const border: {
28
28
  };
29
29
  export declare const borderRadius: Record<string | number, any>;
30
30
  export declare const backgroundColours: Record<"red900" | "red800" | "red700" | "red600" | "red500" | "red400" | "red300" | "red200" | "red100" | "gray900" | "gray800" | "gray700" | "gray600" | "gray500" | "gray400" | "gray300" | "gray200" | "gray100" | "green900" | "green800" | "green700" | "green600" | "green500" | "green400" | "green300" | "green200" | "green100" | "blue900" | "blue800" | "blue700" | "blue600" | "blue500" | "blue400" | "blue300" | "blue200" | "blue100" | "yellow900" | "yellow800" | "yellow700" | "yellow600" | "yellow500" | "yellow400" | "yellow300" | "yellow200" | "yellow100" | "white" | "transparent", string>;
31
- export declare const width: Record<"full", string>;
31
+ export declare const width: Record<"none" | "full", string>;
32
32
  export declare const height: Record<"full", string>;
33
33
  export declare const position: Record<"fixed" | "absolute" | "relative", string>;
34
34
  export declare const textAlign: Record<"left" | "right" | "center", string>;
@@ -1 +1 @@
1
- {"version":3,"file":"useBoxStyles.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Box/useBoxStyles.css.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC;AAEF,eAAO,MAAM,SAAS,8BAAmD,CAAC;AAE1E,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAwBlB,CAAC;AAEF,eAAO,MAAM,YAAY,8BAGxB,CAAC;AAEF,eAAO,MAAM,iBAAiB,ulBAQ7B,CAAC;AAEF,eAAO,MAAM,KAAK,wBAIhB,CAAC;AAEH,eAAO,MAAM,MAAM,wBAIjB,CAAC;AAEH,eAAO,MAAM,QAAQ,mDASpB,CAAC;AAEF,eAAO,MAAM,SAAS,6CASrB,CAAC;AAEF,eAAO,MAAM,QAAQ,0DAUpB,CAAC;AAEF,eAAO,MAAM,OA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MAAM,cAAc,8BAS1B,CAAC;AAEF,eAAO,MAAM,aAAa,wBAExB,CAAC"}
@@ -41,6 +41,9 @@ export const width = styleVariants({
41
41
  full: {
42
42
  width: '100%',
43
43
  },
44
+ none: {
45
+ width: void 0,
46
+ },
44
47
  });
45
48
  export const height = styleVariants({
46
49
  full: {
@@ -0,0 +1,10 @@
1
+ import { style } from '@vanilla-extract/css';
2
+ import { Tokens } from '../../themes/tokens';
3
+ declare type Colours = keyof Tokens['colours']['intent'];
4
+ export declare const colours: Record<Colours, ReturnType<typeof style>>;
5
+ export declare const size: {
6
+ horizontal: Record<never, string>;
7
+ vertical: Record<never, string>;
8
+ };
9
+ export {};
10
+ //# sourceMappingURL=DividerLine.css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DividerLine.css.d.ts","sourceRoot":"","sources":["../../../lib/components/DividerLine/DividerLine.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAiB,MAAM,sBAAsB,CAAC;AAG5D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,aAAK,OAAO,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC;AACjD,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAyB7D,CAAC;AAIF,eAAO,MAAM,IAAI;;;CAiBhB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { style, styleVariants } from '@vanilla-extract/css';
2
+ import { themeContractVars as vars } from '../../themes/theme.css';
3
+ export const colours = {
4
+ primary: style({
5
+ backgroundColor: vars.colours.intent.primary.background.standard,
6
+ }),
7
+ secondary: style({
8
+ backgroundColor: vars.colours.intent.secondary.background.standard,
9
+ }),
10
+ danger: style({
11
+ backgroundColor: vars.colours.intent.danger.background.standard,
12
+ }),
13
+ information: style({
14
+ backgroundColor: vars.colours.intent.information.background.standard,
15
+ }),
16
+ warning: style({
17
+ backgroundColor: vars.colours.intent.warning.background.standard,
18
+ }),
19
+ success: style({
20
+ backgroundColor: vars.colours.intent.success.background.standard,
21
+ }),
22
+ neutral: style({
23
+ backgroundColor: vars.colours.intent.neutral.background.mild,
24
+ }),
25
+ shine: style({
26
+ backgroundColor: vars.colours.intent.shine.foreground,
27
+ }),
28
+ };
29
+ const sizes = [1, 2, 3];
30
+ export const size = {
31
+ horizontal: styleVariants(sizes.reduce((sizes, size) => {
32
+ sizes[size] = {
33
+ height: size,
34
+ };
35
+ return sizes;
36
+ }, {})),
37
+ vertical: styleVariants(sizes.reduce((sizes, size) => {
38
+ sizes[size] = {
39
+ width: size,
40
+ };
41
+ return sizes;
42
+ }, {})),
43
+ };
@@ -0,0 +1,13 @@
1
+ import { ComponentProps, FunctionComponent } from 'react';
2
+ import { Box } from '../';
3
+ import * as styles from './DividerLine.css';
4
+ interface Props {
5
+ isVertical?: boolean;
6
+ className?: string;
7
+ space: ComponentProps<typeof Box>['marginY'];
8
+ colour?: keyof typeof styles.colours;
9
+ size?: keyof typeof styles.size['horizontal'];
10
+ }
11
+ export declare const DividerLine: FunctionComponent<Props>;
12
+ export {};
13
+ //# sourceMappingURL=DividerLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DividerLine.d.ts","sourceRoot":"","sources":["../../../lib/components/DividerLine/DividerLine.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAE5C,UAAU,KAAK;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,KAAK,CAehD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import clsx from 'clsx';
2
+ import * as React from 'react';
3
+ import { Box } from '../';
4
+ import * as styles from './DividerLine.css';
5
+ export const DividerLine = ({ className = '', isVertical = false, space = '3', colour = 'primary', size = 1, }) => (React.createElement(Box, { className: clsx(className, styles.colours[colour], {
6
+ [styles.size.horizontal[size]]: !isVertical,
7
+ [styles.size.vertical[size]]: isVertical,
8
+ }), marginY: isVertical ? void 0 : space, marginX: isVertical ? space : void 0 }));
@@ -0,0 +1,2 @@
1
+ export { DividerLine } from './DividerLine';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/DividerLine/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1 @@
1
+ export { DividerLine } from './DividerLine';
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
+
5
+ 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
+ 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
+ import * as React from 'react';
10
+ import { Box } from "../Box/index.js";
11
+ import { Heading } from "../Heading/index.js";
12
+ import { Inline } from "../Inline/index.js";
13
+ import { DividerLine } from "./index.js";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { Fragment as _Fragment } from "react/jsx-runtime";
17
+ const spacingOptions = {
18
+ none: 'none',
19
+ 1: '1',
20
+ 2: '2',
21
+ 3: '3',
22
+ 4: '4',
23
+ 5: '5',
24
+ 6: '6',
25
+ 7: '7',
26
+ 8: '8',
27
+ 9: '9'
28
+ };
29
+ const sizeOptions = [1, 2, 3];
30
+ const colours = ['primary', 'secondary', 'danger', 'information', 'warning', 'success', 'neutral', 'shine'];
31
+ export default {
32
+ title: 'Components/DividerLine',
33
+ component: DividerLine,
34
+ argTypes: {
35
+ space: {
36
+ options: spacingOptions,
37
+ defaultValue: 1,
38
+ control: {
39
+ type: 'select'
40
+ }
41
+ },
42
+ colour: {
43
+ options: colours,
44
+ defaultValue: 1,
45
+ control: {
46
+ type: 'select'
47
+ }
48
+ },
49
+ size: {
50
+ options: sizeOptions,
51
+ defaultValue: 1,
52
+ control: {
53
+ type: 'select'
54
+ }
55
+ }
56
+ },
57
+ decorators: [story => _jsx("div", {
58
+ style: {
59
+ display: 'grid',
60
+ gridAutoFlow: 'row dense',
61
+ gridGap: '10px'
62
+ },
63
+ children: _jsx("div", {
64
+ style: {
65
+ display: 'grid',
66
+ gap: '10px',
67
+ gridTemplateColumns: 'repeat(auto-fit, minmax(10px, max-content))'
68
+ },
69
+ children: story()
70
+ })
71
+ })]
72
+ };
73
+
74
+ const template = args => _jsxs(Box, {
75
+ children: [_jsx(Heading, {
76
+ is: "h2",
77
+ size: "7",
78
+ children: "Title 1"
79
+ }), _jsx(DividerLine, _objectSpread({}, args)), _jsx(Heading, {
80
+ is: "h2",
81
+ size: "7",
82
+ children: "Title 1"
83
+ })]
84
+ });
85
+
86
+ const verticalTemplate = args => _jsxs(Inline, {
87
+ alignY: "stretch",
88
+ children: [_jsx(Heading, {
89
+ is: "h2",
90
+ size: "7",
91
+ children: "Title 1"
92
+ }), _jsx(DividerLine, _objectSpread({}, args)), _jsx(Heading, {
93
+ is: "h2",
94
+ size: "7",
95
+ children: "Title 1"
96
+ })]
97
+ });
98
+
99
+ const templateAllColours = args => _jsx(Box, {
100
+ children: colours.map(colour => _jsxs(_Fragment, {
101
+ children: [_jsx(Heading, {
102
+ is: "h2",
103
+ size: "7",
104
+ children: "Title"
105
+ }), _jsx(DividerLine, _objectSpread(_objectSpread({}, args), {}, {
106
+ colour: colour
107
+ }))]
108
+ }))
109
+ });
110
+
111
+ const standardProps = {
112
+ space: '5',
113
+ size: 3,
114
+ colour: 'primary'
115
+ };
116
+ export const standard = template.bind(standardProps);
117
+ standard.args = standardProps;
118
+
119
+ const verticalProps = _objectSpread(_objectSpread({}, standardProps), {}, {
120
+ isVertical: true
121
+ });
122
+
123
+ export const vertical = verticalTemplate.bind(verticalProps);
124
+ vertical.args = verticalProps;
125
+ export const standardAllColours = templateAllColours.bind(standardProps);
126
+ standardAllColours.args = standardProps;
@@ -1,7 +1,7 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
2
  import type { BoxStyleProps } from '../Box';
3
3
  import * as styles from './Stack.css';
4
- export interface Props extends Pick<BoxStyleProps, 'is' | 'width'> {
4
+ export interface Props extends Pick<BoxStyleProps, 'is' | 'width' | 'alignItems'> {
5
5
  space?: keyof typeof styles.child.spaces;
6
6
  className?: string;
7
7
  dividers?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../lib/components/Stack/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAI5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,KAAM,SAAQ,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,OAAO,CAAC;IACjE,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAClC;AAOD,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAsC1C,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../lib/components/Stack/Stack.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAI5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,KAChB,SAAQ,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1D,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;CAClC;AAOD,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CA0C1C,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -8,7 +8,7 @@ const supportedListTypes = [
8
8
  'ul',
9
9
  'ol',
10
10
  ];
11
- export const Stack = ({ space = '2', children, is = 'div', width, dividers = false, className = '', }) => {
11
+ export const Stack = ({ space = '2', children, is = 'div', alignItems, width, dividers = false, className = '', }) => {
12
12
  const items = flattenChildren(children);
13
13
  if (items.length < 2) {
14
14
  return React.createElement(React.Fragment, null, items);
@@ -16,7 +16,7 @@ export const Stack = ({ space = '2', children, is = 'div', width, dividers = fal
16
16
  let listItem = 'div';
17
17
  if (typeof is === 'string')
18
18
  listItem = supportedListTypes.includes(is) ? 'li' : 'div';
19
- return (React.createElement(Box, { is: is, className: className, width: width }, Children.map(items, (child, idx) => (React.createElement(Box, { is: listItem, className: [
19
+ return (React.createElement(Box, { is: is, className: className, width: width }, Children.map(items, (child, idx) => (React.createElement(Box, { is: listItem, display: alignItems ? 'flex' : void 0, flexDirection: "column", alignItems: alignItems, className: [
20
20
  styles.child.default,
21
21
  dividers ? undefined : styles.child.spaces[space],
22
22
  ] },
@@ -7,6 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
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
 
9
9
  import * as React from 'react';
10
+ import { boxArgTypes } from "../Box/argTypes.js";
10
11
  import { Text } from "../Text/index.js";
11
12
  import { Stack } from "./index.js";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -23,7 +24,6 @@ const spacingOptions = {
23
24
  8: '8',
24
25
  9: '9'
25
26
  };
26
- const widthOptions = ['full', null];
27
27
  export default {
28
28
  title: 'Foundation/Layout/Stack',
29
29
  component: Stack,
@@ -35,13 +35,8 @@ export default {
35
35
  type: 'select'
36
36
  }
37
37
  },
38
- width: {
39
- options: widthOptions,
40
- defaultValue: null,
41
- control: {
42
- type: 'select'
43
- }
44
- }
38
+ width: boxArgTypes.width,
39
+ alignItems: boxArgTypes.alignItems
45
40
  }
46
41
  };
47
42
 
@@ -78,4 +73,14 @@ const withDividersProps = _objectSpread(_objectSpread({}, standardProps), {}, {
78
73
  });
79
74
 
80
75
  export const withDividers = Template.bind(withDividersProps);
81
- withDividers.args = withDividersProps;
76
+ withDividers.args = withDividersProps;
77
+
78
+ const withAlignmentProps = _objectSpread(_objectSpread({}, standardProps), {}, {
79
+ is: 'div',
80
+ dividers: true,
81
+ space: '3',
82
+ alignItems: 'center'
83
+ });
84
+
85
+ export const withAlignment = Template.bind(withAlignmentProps);
86
+ withAlignment.args = withAlignmentProps;
@@ -53,4 +53,5 @@ export * from './Image';
53
53
  export * from './NumberBubble';
54
54
  export * from './TextBubble';
55
55
  export * from './ColourInput';
56
+ export * from './DividerLine';
56
57
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAA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cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -53,3 +53,4 @@ export * from './Image';
53
53
  export * from './NumberBubble';
54
54
  export * from './TextBubble';
55
55
  export * from './ColourInput';
56
+ export * from './DividerLine';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoguru/overdrive",
3
- "version": "4.9.7",
3
+ "version": "4.10.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",
@@ -45,7 +45,7 @@
45
45
  "@types/react-dom": "^18.0.6",
46
46
  "clsx": "1.1.1",
47
47
  "colord": "2.9.2",
48
- "csstype": "3.1.0",
48
+ "csstype": "3.1.1",
49
49
  "deepmerge": "^4.2.2",
50
50
  "eslint-plugin-jest": "26.2.2",
51
51
  "react": "^18.1.0",