@autoguru/overdrive 4.30.0 → 4.31.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,5 +1,5 @@
1
1
  export declare const label: string;
2
- export declare const labelSize: Record<"large" | "standard", string>;
2
+ export declare const labelSize: Record<"small" | "large" | "standard", string>;
3
3
  export declare const colours: {
4
4
  default: Record<"neutral" | "green" | "blue" | "yellow" | "red", string>;
5
5
  inverted: {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,QAIhB,CAAC;AAEH,eAAO,MAAM,SAAS,sCASpB,CAAC;AAGH,eAAO,MAAM,OAAO;;;;;;;;;CA8DnB,CAAC"}
1
+ {"version":3,"file":"Badge.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,QAIhB,CAAC;AAEH,eAAO,MAAM,SAAS,gDAapB,CAAC;AAGH,eAAO,MAAM,OAAO;;;;;;;;;CA8DnB,CAAC"}
@@ -10,6 +10,10 @@ export const label = style({
10
10
  textTransform: 'uppercase'
11
11
  }, "label");
12
12
  export const labelSize = styleVariants({
13
+ small: {
14
+ fontSize: vars.typography.size['1'].fontSize,
15
+ lineHeight: vars.typography.size['1'].fontSize
16
+ },
13
17
  standard: {
14
18
  fontSize: vars.typography.size['2'].fontSize,
15
19
  lineHeight: vars.typography.size['2'].fontSize
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,KAAK;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,SAAS,CAAC;CACrC;AAED,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAoD1C,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAkB,MAAM,OAAO,CAAC;AAK1D,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,KAAK;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,SAAS,CAAC;CACrC;AAcD,eAAO,MAAM,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAmD1C,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -6,6 +6,16 @@ import { Box } from "../Box/index.js";
6
6
  import { useTextStyles } from "../Text/index.js";
7
7
  import * as styles from "./Badge.css.js";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
+ const paddingXMap = {
10
+ 'small': '1',
11
+ 'standard': '1',
12
+ 'large': '4'
13
+ };
14
+ const paddingYMap = {
15
+ 'small': '1',
16
+ 'standard': '1',
17
+ 'large': '4'
18
+ };
9
19
  export const Badge = _ref => {
10
20
  let {
11
21
  label,
@@ -14,7 +24,6 @@ export const Badge = _ref => {
14
24
  size = 'standard',
15
25
  className = ''
16
26
  } = _ref;
17
- const isStandardSize = size === 'standard';
18
27
  const textStyles = useTextStyles({
19
28
  noWrap: true,
20
29
  fontWeight: 'semiBold',
@@ -29,8 +38,8 @@ export const Badge = _ref => {
29
38
  className: [styles.labelSize[size], inverted ? styles.colours.inverted[colour].background : styles.colours.default[colour]],
30
39
  overflow: "hidden",
31
40
  display: "block",
32
- paddingX: isStandardSize ? '1' : '4',
33
- paddingY: isStandardSize ? '1' : '2',
41
+ paddingX: paddingXMap[size],
42
+ paddingY: paddingYMap[size],
34
43
  borderRadius: "1",
35
44
  children: _jsx(Box, {
36
45
  is: "span",
@@ -40,11 +40,16 @@ export const standard = template.bind(standardProps);
40
40
  standard.args = standardProps;
41
41
  export const standardAllColours = templateAllColours.bind(standardProps);
42
42
  standardAllColours.args = standardProps;
43
- const standardLargeProps = _objectSpread(_objectSpread({}, standardProps), {}, {
43
+ const largeProps = _objectSpread(_objectSpread({}, standardProps), {}, {
44
44
  size: 'large'
45
45
  });
46
- export const standardLargeAllColours = templateAllColours.bind(standardLargeProps);
47
- standardLargeAllColours.args = standardLargeProps;
46
+ export const largeAllColours = templateAllColours.bind(largeProps);
47
+ largeAllColours.args = largeProps;
48
+ const smallProps = _objectSpread(_objectSpread({}, standardProps), {}, {
49
+ size: 'small'
50
+ });
51
+ export const smallAllColours = templateAllColours.bind(smallProps);
52
+ smallAllColours.args = smallProps;
48
53
  const invertedProps = _objectSpread(_objectSpread({}, standardProps), {}, {
49
54
  look: 'inverted'
50
55
  });
@@ -52,7 +57,7 @@ export const inverted = template.bind(invertedProps);
52
57
  inverted.args = invertedProps;
53
58
  export const invertedAllColours = templateAllColours.bind(invertedProps);
54
59
  invertedAllColours.args = invertedProps;
55
- const invertedLargeProps = _objectSpread(_objectSpread({}, standardLargeProps), {}, {
60
+ const invertedLargeProps = _objectSpread(_objectSpread({}, largeProps), {}, {
56
61
  look: 'inverted'
57
62
  });
58
63
  export const invertedLargeAllColours = templateAllColours.bind(invertedLargeProps);
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { ComponentProps, FunctionComponent, ReactNode } from 'react';
2
3
  import { Alert } from '../Alert';
3
4
  type MessageType = ReactNode;
@@ -13,7 +14,7 @@ interface ToastFn extends Required<Record<AlertIntent, (message: MessageType, du
13
14
  }
14
15
  export declare const ToastProvider: ({ children }: {
15
16
  children: any;
16
- }) => JSX.Element;
17
+ }) => React.JSX.Element;
17
18
  export declare const useToast: () => ToastFn;
18
19
  declare const Toast: FunctionComponent<MessageConfig & {
19
20
  remove: (id: number) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../lib/components/Toaster/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EACN,cAAc,EAEd,iBAAiB,EACjB,SAAS,EAOT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAOjC,KAAK,WAAW,GAAG,SAAS,CAAC;AAC7B,KAAK,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEpE,UAAU,aAAa;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAID,UAAU,OACT,SAAQ,QAAQ,CACf,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,CACtE;IACD,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AA0ED,eAAO,MAAM,aAAa;;iBAQzB,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,OAwE3B,CAAC;AAEF,QAAA,MAAM,KAAK,EAAE,iBAAiB,CAC7B,aAAa,GAAG;IACf,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,CA2BD,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../lib/components/Toaster/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,cAAc,EAEd,iBAAiB,EACjB,SAAS,EAOT,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAOjC,KAAK,WAAW,GAAG,SAAS,CAAC;AAC7B,KAAK,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEpE,UAAU,aAAa;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACjB;AAID,UAAU,OACT,SAAQ,QAAQ,CACf,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,CACtE;IACD,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AA0ED,eAAO,MAAM,aAAa;;uBAQzB,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,OAwE3B,CAAC;AAEF,QAAA,MAAM,KAAK,EAAE,iBAAiB,CAC7B,aAAa,GAAG;IACf,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,CA2BD,CAAC;AAEF,eAAe,KAAK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoguru/overdrive",
3
- "version": "4.30.0",
3
+ "version": "4.31.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",