@autoguru/overdrive 4.9.9 → 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.
@@ -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,CA2DrE,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,7 +39,10 @@ const borderRadiusOptions = [
39
39
  'full',
40
40
  'pill',
41
41
  ];
42
- const widthOptions = ['full', 'none'];
42
+ const widthOptions = [
43
+ 'full',
44
+ 'none',
45
+ ];
43
46
  export const boxArgTypes = {
44
47
  boxShadow: {
45
48
  options: boxShadowOptions,
@@ -43,7 +43,7 @@ export const width = styleVariants({
43
43
  },
44
44
  none: {
45
45
  width: void 0,
46
- }
46
+ },
47
47
  });
48
48
  export const height = styleVariants({
49
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;
@@ -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,C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xB,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.9",
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",