@autoguru/overdrive 4.43.6-next.8 → 4.43.6-next.9
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/dist/components/Alert/Alert.js +2 -2
- package/dist/components/Anchor/Anchor.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.js +4 -4
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/Box/Box.js +106 -49
- package/dist/components/Box/newBox/boxStyles.d.ts +456 -1
- package/dist/components/Box/newBox/boxStyles.d.ts.map +1 -1
- package/dist/components/Box/newBox/boxStyles.js +7 -13
- package/dist/components/Box/useBoxStyles.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +6 -6
- package/dist/components/ColourInput/ColourInput.js +2 -2
- package/dist/components/Columns/Column.css.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.js +2 -2
- package/dist/components/DropDown/DropDown.stories.d.ts +1 -1
- package/dist/components/Heading/Heading.stories.d.ts +83 -81
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts +84 -82
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts.map +1 -1
- package/dist/components/MinimalModal/MinimalModal.stories.d.ts +1 -1
- package/dist/components/NumberBubble/NumberBubble.d.ts.map +1 -1
- package/dist/components/NumberBubble/NumberBubble.js +2 -2
- package/dist/components/OptionList/OptionList.d.ts +1 -1
- package/dist/components/ProgressSpinner/ProgressSpinner.js +2 -2
- package/dist/components/StarRating/StarRating.js +2 -2
- package/dist/components/Stepper/Stepper.css.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.css.js +1 -7
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +1 -4
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.js +2 -2
- package/dist/components/TextLink/TextLink.js +3 -3
- package/dist/components/TextLink/TextLink.stories.d.ts +3 -3
- package/dist/components/private/CheckableBase/CheckableBase.d.ts.map +1 -1
- package/dist/components/private/CheckableBase/CheckableBase.js +6 -15
- package/dist/components/private/InputBase/HintText.d.ts.map +1 -1
- package/dist/components/private/InputBase/HintText.js +5 -6
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/styles/index.js +6 -0
- package/dist/styles/reset.css.d.ts +1 -1
- package/dist/styles/reset.css.d.ts.map +1 -1
- package/dist/styles/reset.css.js +4 -3
- package/dist/styles/resetStyles.d.ts +6 -0
- package/dist/styles/resetStyles.d.ts.map +1 -1
- package/dist/styles/resetStyles.js +17 -0
- package/dist/styles/sprinkles.css.d.ts +86 -94
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +67 -35
- package/dist/utils/sprinkles.d.ts +2 -5
- package/dist/utils/sprinkles.d.ts.map +1 -1
- package/dist/utils/sprinkles.js +2 -8
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingBox.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/LoadingBox/LoadingBox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"LoadingBox.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/LoadingBox/LoadingBox.stories.tsx"],"names":[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,CAAC;AAEzC,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
|
|
@@ -26,7 +26,7 @@ declare const _default: {
|
|
|
26
26
|
tablet?: "stretch" | "center" | "flex-end" | "flex-start" | "baseline" | "centre" | "flexEnd" | "flexStart" | undefined;
|
|
27
27
|
desktop?: "stretch" | "center" | "flex-end" | "flex-start" | "baseline" | "centre" | "flexEnd" | "flexStart" | undefined;
|
|
28
28
|
largeDesktop?: "stretch" | "center" | "flex-end" | "flex-start" | "baseline" | "centre" | "flexEnd" | "flexStart" | undefined;
|
|
29
|
-
} | undefined) | import("@vanilla-extract/sprinkles").ResponsiveArray<
|
|
29
|
+
} | undefined) | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2 | 3 | 4, "stretch" | "center" | "flex-end" | "flex-start" | "baseline" | "centre" | "flexEnd" | "flexStart" | null>;
|
|
30
30
|
}>) => React.JSX.Element)[];
|
|
31
31
|
};
|
|
32
32
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberBubble/NumberBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NumberBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberBubble/NumberBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAInE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,MAAM,WAAW,iBAChB,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,cAAc,GAAG,UAAU,GAAG,SAAS,CACvC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CACnD;AAaD,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAoC7D,CAAC"}
|
|
@@ -8,9 +8,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { useMemo } from 'react';
|
|
11
|
+
import { sprinkles } from "../../styles/index.js";
|
|
11
12
|
import { toPrettyBigNumber } from "../../utils/number.js";
|
|
12
13
|
import { Box } from "../Box/Box.js";
|
|
13
|
-
import { boxStyles } from "../Box/newBox/boxStyles.js";
|
|
14
14
|
import { Text } from "../Text/Text.js";
|
|
15
15
|
import * as styles from "./NumberBubble.css.js";
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -43,7 +43,7 @@ export const NumberBubble = _ref => {
|
|
|
43
43
|
children: _jsx(Text, {
|
|
44
44
|
size: "2",
|
|
45
45
|
strong: true,
|
|
46
|
-
className: clsx(styles.bubbleText,
|
|
46
|
+
className: clsx(styles.bubbleText, sprinkles({
|
|
47
47
|
position: 'absolute'
|
|
48
48
|
})),
|
|
49
49
|
colour: textColour,
|
|
@@ -17,8 +17,8 @@ export declare const OptionList: {
|
|
|
17
17
|
(props: WithTestId<OptionListProps>): React.JSX.Element;
|
|
18
18
|
Item: {
|
|
19
19
|
(props: {
|
|
20
|
-
value: string;
|
|
21
20
|
name?: string | undefined;
|
|
21
|
+
value: string;
|
|
22
22
|
id?: string | undefined;
|
|
23
23
|
children?: React.ReactNode;
|
|
24
24
|
autoFocus?: boolean | undefined;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import { componentStyles } from "../../styles/index.js";
|
|
5
6
|
import { Box } from "../Box/Box.js";
|
|
6
|
-
import { boxStyles } from "../Box/newBox/boxStyles.js";
|
|
7
7
|
import * as styles from "./ProgressSpinner.css.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export const ProgressSpinner = _ref => {
|
|
@@ -15,7 +15,7 @@ export const ProgressSpinner = _ref => {
|
|
|
15
15
|
return _jsx(Box, {
|
|
16
16
|
className: [styles.size[size].circular, styles.colours[colour], className],
|
|
17
17
|
children: _jsx("svg", {
|
|
18
|
-
className: clsx(
|
|
18
|
+
className: clsx(componentStyles({
|
|
19
19
|
as: 'svg',
|
|
20
20
|
display: 'block',
|
|
21
21
|
overflow: 'hidden'
|
|
@@ -4,8 +4,8 @@ import { StarHalfIcon, StarIcon } from '@autoguru/icons';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { memo } from 'react';
|
|
7
|
+
import { sprinkles } from "../../styles/index.js";
|
|
7
8
|
import { Box } from "../Box/Box.js";
|
|
8
|
-
import { boxStyles } from "../Box/newBox/boxStyles.js";
|
|
9
9
|
import { Icon } from "../Icon/Icon.js";
|
|
10
10
|
import { Inline } from "../Inline/Inline.js";
|
|
11
11
|
import { Text } from "../Text/Text.js";
|
|
@@ -83,7 +83,7 @@ const Star = _ref2 => {
|
|
|
83
83
|
return _jsx(Icon, {
|
|
84
84
|
icon: star,
|
|
85
85
|
size: starSizeMap.get(size),
|
|
86
|
-
className: clsx(
|
|
86
|
+
className: clsx(sprinkles({
|
|
87
87
|
position: 'relative'
|
|
88
88
|
}), styles.star.default, {
|
|
89
89
|
[styles.star.empty]: starType === EStarType.Empty
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Stepper/Stepper.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,QAAmC,CAAC;AAEzD,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Stepper.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Stepper/Stepper.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,QAAmC,CAAC;AAEzD,eAAO,MAAM,IAAI,QAAY,CAAC;AAE9B,eAAO,MAAM,MAAM,wCAiBjB,CAAC;AAEH,eAAO,MAAM,KAAK,UAQjB,CAAC"}
|
|
@@ -8,13 +8,7 @@ import { overdriveTokens as vars } from "../../themes/theme.css.js";
|
|
|
8
8
|
export const disabled = style({
|
|
9
9
|
cursor: 'not-allowed'
|
|
10
10
|
}, "disabled");
|
|
11
|
-
export const root = style({
|
|
12
|
-
selectors: {
|
|
13
|
-
[`&:not(${disabled}):focus`]: {
|
|
14
|
-
borderColor: vars.colours.intent.information.background.standard
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}, "root");
|
|
11
|
+
export const root = style({}, "root");
|
|
18
12
|
export const handle = styleVariants({
|
|
19
13
|
default: {
|
|
20
14
|
width: vars.space[6],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../lib/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAIA,OAAO,EACN,iBAAiB,EAIjB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../lib/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAIA,OAAO,EACN,iBAAiB,EAIjB,MAAM,OAAO,CAAC;AAWf,MAAM,WAAW,YAAY;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAE/B,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAkDD,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAqHnD,CAAC"}
|
|
@@ -7,7 +7,6 @@ import * as React from 'react';
|
|
|
7
7
|
import { useCallback } from 'react';
|
|
8
8
|
import { addWithSafeDecimal } from "../../utils/number.js";
|
|
9
9
|
import { Box } from "../Box/Box.js";
|
|
10
|
-
import { boxStyles } from "../Box/newBox/boxStyles.js";
|
|
11
10
|
import { Icon } from "../Icon/Icon.js";
|
|
12
11
|
import { Inline } from "../Inline/Inline.js";
|
|
13
12
|
import { Text } from "../Text/Text.js";
|
|
@@ -111,9 +110,7 @@ export const Stepper = _ref3 => {
|
|
|
111
110
|
}
|
|
112
111
|
}, [min, max, onDecrement, onIncrement, onChange]);
|
|
113
112
|
return _jsx(Box, {
|
|
114
|
-
className: clsx(className, styles.root,
|
|
115
|
-
as: 'button'
|
|
116
|
-
}), disabled && styles.disabled),
|
|
113
|
+
className: clsx(className, styles.root, disabled && styles.disabled),
|
|
117
114
|
userSelect: "none",
|
|
118
115
|
"aria-disabled": disabled,
|
|
119
116
|
tabIndex: 0,
|
|
@@ -4,7 +4,7 @@ import { invariant } from '@autoguru/utilities';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { cloneElement, createElement, forwardRef, isValidElement, useContext } from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { componentStyles } from "../../styles/index.js";
|
|
8
8
|
import { Inline } from "../Inline/Inline.js";
|
|
9
9
|
import { Text } from "../Text/Text.js";
|
|
10
10
|
import { useTextStyles } from "../Text/useTextStyles.js";
|
|
@@ -28,8 +28,8 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
28
28
|
const isActive = tabsContext.activeIndex === tabListContext;
|
|
29
29
|
const controlsId = typeof incomingId === 'string' ? incomingId : `${tabsContext.id}-${tabListContext}-tab`;
|
|
30
30
|
const props = {
|
|
31
|
-
className: clsx(
|
|
32
|
-
|
|
31
|
+
className: clsx(componentStyles({
|
|
32
|
+
as: typeof Component === 'string' ? Component : 'button',
|
|
33
33
|
display: 'inlineFlex',
|
|
34
34
|
justifyContent: 'center',
|
|
35
35
|
backgroundColour: 'transparent'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIpC,MAAM,WAAW,eAChB,SAAQ,IAAI,CACX,cAAc,CAAC,OAAO,GAAG,CAAC,EAC1B,cAAc,GAAG,UAAU,GAAG,SAAS,CACvC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;CACnD;AAaD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAmDzD,CAAC"}
|
|
@@ -8,8 +8,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import clsx from 'clsx';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { useMemo } from 'react';
|
|
11
|
+
import { sprinkles } from "../../styles/index.js";
|
|
11
12
|
import { Box } from "../Box/Box.js";
|
|
12
|
-
import { boxStyles } from "../Box/newBox/boxStyles.js";
|
|
13
13
|
import { Text } from "../Text/Text.js";
|
|
14
14
|
import * as styles from "./TextBubble.css.js";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -58,7 +58,7 @@ export const TextBubble = _ref => {
|
|
|
58
58
|
size: "2",
|
|
59
59
|
strong: true,
|
|
60
60
|
noWrap: true,
|
|
61
|
-
className: clsx(styles.bubbleText,
|
|
61
|
+
className: clsx(styles.bubbleText, sprinkles({
|
|
62
62
|
position: 'absolute',
|
|
63
63
|
overflow: 'hidden',
|
|
64
64
|
width: 'full',
|
|
@@ -8,8 +8,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { invariant } from '@autoguru/utilities';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import React, { cloneElement, createElement, forwardRef, isValidElement } from 'react';
|
|
11
|
+
import { componentStyles } from "../../styles/index.js";
|
|
11
12
|
import { Box } from "../Box/Box.js";
|
|
12
|
-
import { useBoxStyles } from "../Box/useBoxStyles.js";
|
|
13
13
|
import { Icon } from "../Icon/Icon.js";
|
|
14
14
|
import { Text } from "../Text/Text.js";
|
|
15
15
|
import * as styles from "./TextLink.css.js";
|
|
@@ -35,8 +35,8 @@ export const TextLink = forwardRef((_ref, ref) => {
|
|
|
35
35
|
size: size,
|
|
36
36
|
fontWeight: fontWeight,
|
|
37
37
|
strong: strong,
|
|
38
|
-
className: clsx(
|
|
39
|
-
|
|
38
|
+
className: clsx(componentStyles({
|
|
39
|
+
as: 'span',
|
|
40
40
|
pointerEvents: 'none',
|
|
41
41
|
position: 'relative',
|
|
42
42
|
paddingRight: icon ? '5' : undefined
|
|
@@ -5,7 +5,6 @@ declare const meta: {
|
|
|
5
5
|
title: string;
|
|
6
6
|
component: React.ForwardRefExoticComponent<Omit<import("./TextLink").Props, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
7
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
8
|
-
key?: React.Key | null | undefined;
|
|
9
8
|
color?: import("../Text/useTextStyles").TextColor | undefined;
|
|
10
9
|
content?: string | undefined | undefined;
|
|
11
10
|
strong?: boolean | undefined;
|
|
@@ -18,13 +17,14 @@ declare const meta: {
|
|
|
18
17
|
translate?: "yes" | "no" | undefined | undefined;
|
|
19
18
|
hidden?: boolean | undefined | undefined;
|
|
20
19
|
style?: React.CSSProperties | undefined;
|
|
20
|
+
key?: React.Key | null | undefined;
|
|
21
21
|
as?: import("../Text/useTextStyles").TextTags | undefined;
|
|
22
|
+
slot?: string | undefined | undefined;
|
|
23
|
+
title?: string | undefined | undefined;
|
|
22
24
|
onAnimationStart?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
|
|
23
25
|
onAnimationEnd?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
|
|
24
26
|
id?: string | undefined | undefined;
|
|
25
27
|
children?: React.ReactNode;
|
|
26
|
-
slot?: string | undefined | undefined;
|
|
27
|
-
title?: string | undefined | undefined;
|
|
28
28
|
className?: string | undefined;
|
|
29
29
|
align?: "left" | "right" | "center" | undefined;
|
|
30
30
|
noWrap?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckableBase.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/CheckableBase/CheckableBase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckableBase.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/CheckableBase/CheckableBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIb,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AASf,MAAM,WAAW,kBAAkB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,KAAK,KAAA,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,aAAa,6FA2FzB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import clsx from 'clsx';
|
|
4
3
|
import React, { forwardRef, useId } from 'react';
|
|
4
|
+
import { elementResetStyles } from "../../../styles/index.js";
|
|
5
5
|
import { Box } from "../../Box/Box.js";
|
|
6
|
-
import { boxStyles } from "../../Box/newBox/boxStyles.js";
|
|
7
6
|
import { Text } from "../../Text/Text.js";
|
|
8
7
|
import { textStyles } from "../../Text/textStyles.js";
|
|
9
8
|
import * as styles from "./CheckableBase.css.js";
|
|
@@ -37,9 +36,7 @@ export const CheckableBase = forwardRef((_ref, ref) => {
|
|
|
37
36
|
paddingRight: label ? '3' : 'none',
|
|
38
37
|
paddingLeft: "none",
|
|
39
38
|
position: "relative",
|
|
40
|
-
className: [styles.root,
|
|
41
|
-
as: 'button'
|
|
42
|
-
}), className, {
|
|
39
|
+
className: [styles.root, elementResetStyles('button'), className, {
|
|
43
40
|
[styles.disabled]: disabled
|
|
44
41
|
}],
|
|
45
42
|
children: [_jsx(Box, {
|
|
@@ -57,9 +54,7 @@ export const CheckableBase = forwardRef((_ref, ref) => {
|
|
|
57
54
|
disabled: disabled,
|
|
58
55
|
type: inputType,
|
|
59
56
|
pointerEvents: disabled ? 'none' : void 0,
|
|
60
|
-
className:
|
|
61
|
-
as: 'button'
|
|
62
|
-
}), styles.nativeInput),
|
|
57
|
+
className: [elementResetStyles('button'), styles.nativeInput],
|
|
63
58
|
onClick: handleClick,
|
|
64
59
|
onChange: onChange
|
|
65
60
|
}), _jsx(Box, {
|
|
@@ -67,22 +62,18 @@ export const CheckableBase = forwardRef((_ref, ref) => {
|
|
|
67
62
|
alignItems: "center",
|
|
68
63
|
justifyContent: "center",
|
|
69
64
|
position: "relative",
|
|
70
|
-
className: [styles.checkable,
|
|
71
|
-
as: 'button'
|
|
72
|
-
})],
|
|
65
|
+
className: [styles.checkable, elementResetStyles('button')],
|
|
73
66
|
children: children
|
|
74
67
|
}), _jsx(Box, {
|
|
75
68
|
as: "label",
|
|
76
69
|
htmlFor: id,
|
|
77
70
|
width: "full",
|
|
78
71
|
pointerEvents: disabled ? 'none' : void 0,
|
|
79
|
-
className:
|
|
80
|
-
as: 'button'
|
|
81
|
-
}), textStyles({
|
|
72
|
+
className: [elementResetStyles('button'), textStyles({
|
|
82
73
|
size: '4'
|
|
83
74
|
}), {
|
|
84
75
|
[styles.label.disabled]: disabled
|
|
85
|
-
}
|
|
76
|
+
}],
|
|
86
77
|
children: nakedLabel ? _jsx(Text, {
|
|
87
78
|
as: "span",
|
|
88
79
|
children: label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HintText.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/HintText.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"HintText.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/HintText.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,CAyBrD,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { componentStyles } from "../../../styles/index.js";
|
|
6
6
|
import { Text } from "../../Text/Text.js";
|
|
7
7
|
import * as styles from "./HintText.css.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -14,17 +14,16 @@ export const HintText = _ref => {
|
|
|
14
14
|
size = 'medium',
|
|
15
15
|
className = ''
|
|
16
16
|
} = _ref;
|
|
17
|
-
const style = boxStyles({
|
|
18
|
-
as: 'p',
|
|
19
|
-
marginTop: '1'
|
|
20
|
-
});
|
|
21
17
|
if (!hintText && !reserveHintSpace) return null;
|
|
22
18
|
const showHintText = !disabled && hintText;
|
|
23
19
|
return _jsx(Text, {
|
|
24
20
|
as: "p",
|
|
25
21
|
size: size === 'large' ? '4' : '2',
|
|
26
22
|
colour: "unset",
|
|
27
|
-
className: clsx(
|
|
23
|
+
className: clsx(componentStyles({
|
|
24
|
+
as: 'p',
|
|
25
|
+
mt: '1'
|
|
26
|
+
}), styles.hintText, className),
|
|
28
27
|
children: showHintText ? hintText : '\u00A0'
|
|
29
28
|
});
|
|
30
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withEnhancedInput.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAEjB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,SAAS,EAGd,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"withEnhancedInput.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,EACb,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAEjB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,SAAS,EAGd,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAMpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,KAAK,YAAY,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAC/E,KAAK,gBAAgB,CAAC,CAAC,SAAS,YAAY,IAAI,IAAI,CACnD,mBAAmB,CAAC,CAAC,CAAC,EACtB,OAAO,GAAG,QAAQ,GAAG,IAAI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zB,aAAa,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC5E;AAED,eAAO,MAAM,iBAAiB,GAC7B,aAAa,SAAS,MAAM,GAAG,EAAE,EACjC,CAAC,SAAS,YAAY,GAAG,gBAAgB,EAEzC,mBAAmB,aAAa,CAAC,qBAAqB,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EACzE,mEAMG,oBAAsE,yHA6PxE,CAAC"}
|
|
@@ -8,9 +8,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import { invariant, wrapEvent } from '@autoguru/utilities';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
10
|
import React, { forwardRef, useCallback, useState } from 'react';
|
|
11
|
+
import { componentStyles, sprinkles } from "../../../styles/index.js";
|
|
11
12
|
import { useInputControlledState } from "../../../utils/index.js";
|
|
12
13
|
import { Box } from "../../Box/Box.js";
|
|
13
|
-
import { useBoxStyles } from "../../Box/useBoxStyles.js";
|
|
14
14
|
import { Icon } from "../../Icon/Icon.js";
|
|
15
15
|
import { ProgressSpinner } from "../../ProgressSpinner/ProgressSpinner.js";
|
|
16
16
|
import { HintText } from "./HintText.js";
|
|
@@ -73,8 +73,8 @@ export const withEnhancedInput = function (WrappingComponent) {
|
|
|
73
73
|
disabled
|
|
74
74
|
}, inputStateStyles);
|
|
75
75
|
const iconSize = size === 'small' ? 'medium' : size;
|
|
76
|
-
const inputItselfClassName = clsx(
|
|
77
|
-
|
|
76
|
+
const inputItselfClassName = clsx(componentStyles({
|
|
77
|
+
as: primitiveType === 'textarea' ? 'textarea' : 'input',
|
|
78
78
|
backgroundColour,
|
|
79
79
|
width: 'full',
|
|
80
80
|
position: 'relative',
|
|
@@ -128,7 +128,7 @@ export const withEnhancedInput = function (WrappingComponent) {
|
|
|
128
128
|
const onMouseOut = useCallback(() => {
|
|
129
129
|
setIsHovered(false);
|
|
130
130
|
}, []);
|
|
131
|
-
const iconStyles =
|
|
131
|
+
const iconStyles = sprinkles({
|
|
132
132
|
pointerEvents: 'none',
|
|
133
133
|
position: 'absolute'
|
|
134
134
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export * from './components';
|
|
|
2
2
|
export * from './hooks';
|
|
3
3
|
export type { Sprinkles as BaseStyleProps, SprinklesLegacyColours as LegacyColourStyleProps, } from './styles/sprinkles.css';
|
|
4
4
|
export { overdriveTokens as tokens } from './themes/theme.css';
|
|
5
|
-
export {
|
|
5
|
+
export { sprinkles as style } from './styles/sprinkles.css';
|
|
6
6
|
export { useId, arrayRingLookup } from './utils/index';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,YAAY,EACX,SAAS,IAAI,cAAc,EAC3B,sBAAsB,IAAI,sBAAsB,GAChD,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,SAAS,IAAI,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,YAAY,EACX,SAAS,IAAI,cAAc,EAC3B,sBAAsB,IAAI,sBAAsB,GAChD,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,SAAS,IAAI,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
export * from "./components/index.js";
|
|
4
4
|
export * from "./hooks/index.js";
|
|
5
5
|
export { overdriveTokens as tokens } from "./themes/theme.css.js";
|
|
6
|
-
export {
|
|
6
|
+
export { sprinkles as style } from "./styles/sprinkles.css.js";
|
|
7
7
|
export { useId, arrayRingLookup } from "./utils/index.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { cssLayerComponent, cssLayerTheme } from './layers.css';
|
|
2
|
+
export { resetVariants, type ResetVariantProps } from './reset.css';
|
|
3
|
+
export { componentStyles, elementResetStyles, resetStyles, } from './resetStyles';
|
|
4
|
+
export { sprinkles, type Sprinkles, type SprinklesLegacyColours, } from './sprinkles.css';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/styles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACN,eAAe,EACf,kBAAkB,EAClB,WAAW,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,SAAS,EACT,KAAK,SAAS,EACd,KAAK,sBAAsB,GAC3B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export { cssLayerComponent, cssLayerTheme } from "./layers.css.js";
|
|
4
|
+
export { resetVariants } from "./reset.css.js";
|
|
5
|
+
export { componentStyles, elementResetStyles, resetStyles } from "./resetStyles.js";
|
|
6
|
+
export { sprinkles } from "./sprinkles.css.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset.css.d.ts","sourceRoot":"","sources":["../../lib/styles/reset.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQlE,eAAO,MAAM,OAAO;;;CAGnB,CAAC;AAUF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"reset.css.d.ts","sourceRoot":"","sources":["../../lib/styles/reset.css.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAQlE,eAAO,MAAM,OAAO;;;CAGnB,CAAC;AAUF,eAAO,MAAM,WAAW,QAOtB,CAAC;AAEH,eAAO,MAAM,SAAS,QASpB,CAAC;AAuHH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,OAAO,CAAC;AAEjD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQxB,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAC1C,cAAc,CAAC,OAAO,aAAa,CAAC,CACpC,CAAC"}
|
package/dist/styles/reset.css.js
CHANGED
|
@@ -20,13 +20,14 @@ const trimmedElement = style({
|
|
|
20
20
|
[cssLayerReset]: _objectSpread({}, trimmed)
|
|
21
21
|
}
|
|
22
22
|
}, "trimmedElement");
|
|
23
|
-
export const
|
|
23
|
+
export const borderReset = style({
|
|
24
24
|
'@layer': {
|
|
25
25
|
[cssLayerReset]: {
|
|
26
|
+
borderStyle: 'solid',
|
|
26
27
|
borderWidth: 0
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
}, "
|
|
30
|
+
}, "borderReset");
|
|
30
31
|
export const container = style({
|
|
31
32
|
'@layer': {
|
|
32
33
|
[cssLayerReset]: {
|
|
@@ -74,7 +75,7 @@ const list = style({
|
|
|
74
75
|
})
|
|
75
76
|
}
|
|
76
77
|
}, "list");
|
|
77
|
-
const fieldset = [trimmedElement,
|
|
78
|
+
const fieldset = [trimmedElement, borderReset, style({
|
|
78
79
|
'@layer': {
|
|
79
80
|
[cssLayerReset]: {
|
|
80
81
|
appearance: 'none'
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import type { ElementType, ReactElement } from 'react';
|
|
2
|
+
import { type Sprinkles } from './sprinkles.css';
|
|
1
3
|
export declare const resetStyles: ({ as: _as }: {
|
|
2
4
|
as: string | undefined;
|
|
3
5
|
}) => string;
|
|
6
|
+
export declare const elementResetStyles: (tag: unknown) => string;
|
|
7
|
+
export declare const componentStyles: ({ as, ...styleProps }: {
|
|
8
|
+
as?: string | ElementType | ReactElement;
|
|
9
|
+
} & Sprinkles) => string;
|
|
4
10
|
//# sourceMappingURL=resetStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resetStyles.d.ts","sourceRoot":"","sources":["../../lib/styles/resetStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resetStyles.d.ts","sourceRoot":"","sources":["../../lib/styles/resetStyles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAM5D,eAAO,MAAM,WAAW,GAAI,aAAa;IAAE,EAAE,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,WAKlE,CAAC;AAOF,eAAO,MAAM,kBAAkB,GAAI,KAAK,OAAO,WAG9C,CAAC;AAOF,eAAO,MAAM,eAAe,GAAI,uBAG7B;IAAE,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,YAAY,CAAA;CAAE,GAAG,SAAS,WACP,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
const _excluded = ["as"];
|
|
5
|
+
import clsx from 'clsx';
|
|
3
6
|
import { element, resetVariants } from "./reset.css.js";
|
|
7
|
+
import { sprinkles } from "./sprinkles.css.js";
|
|
4
8
|
export const resetStyles = _ref => {
|
|
5
9
|
let {
|
|
6
10
|
as: _as
|
|
@@ -10,4 +14,17 @@ export const resetStyles = _ref => {
|
|
|
10
14
|
return resetVariants({
|
|
11
15
|
as
|
|
12
16
|
});
|
|
17
|
+
};
|
|
18
|
+
export const elementResetStyles = tag => {
|
|
19
|
+
if (typeof tag === 'string') return resetStyles({
|
|
20
|
+
as: tag
|
|
21
|
+
});
|
|
22
|
+
return '';
|
|
23
|
+
};
|
|
24
|
+
export const componentStyles = _ref2 => {
|
|
25
|
+
let {
|
|
26
|
+
as
|
|
27
|
+
} = _ref2,
|
|
28
|
+
styleProps = _objectWithoutProperties(_ref2, _excluded);
|
|
29
|
+
return clsx(elementResetStyles(as), sprinkles(styleProps));
|
|
13
30
|
};
|