@autoguru/overdrive 4.43.8-next.1 → 4.43.9-next.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.
- package/dist/components/Actions/Actions.d.ts +3 -3
- package/dist/components/Actions/Actions.d.ts.map +1 -1
- package/dist/components/Actions/Actions.js +1 -2
- package/dist/components/Alert/Alert.d.ts +3 -3
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Anchor/Anchor.d.ts +3 -4
- package/dist/components/Anchor/Anchor.d.ts.map +1 -1
- package/dist/components/Anchor/Anchor.js +17 -19
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Box/Box.d.ts.map +1 -1
- package/dist/components/BulletText/BulletText.d.ts.map +1 -1
- package/dist/components/BulletText/BulletText.js +6 -7
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/ColourInput/ColourInput.d.ts.map +1 -1
- package/dist/components/ColourInput/ColourInput.js +4 -5
- package/dist/components/Columns/Columns.d.ts +3 -3
- package/dist/components/Columns/Columns.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.d.ts +2 -2
- package/dist/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/components/EditableText/EditableText.js +6 -4
- package/dist/components/Flyout/Flyout.d.ts +2 -2
- package/dist/components/Flyout/Flyout.d.ts.map +1 -1
- package/dist/components/Flyout/Flyout.js +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -2
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.js +2 -3
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts +2 -2
- package/dist/components/HorizontalAutoScroller/HorizontalAutoScroller.d.ts.map +1 -1
- package/dist/components/Inline/Inline.d.ts +6 -9
- package/dist/components/Inline/Inline.d.ts.map +1 -1
- package/dist/components/Inline/Inline.js +45 -52
- package/dist/components/OrderedList/OrderedList.css.d.ts +1 -0
- package/dist/components/OrderedList/OrderedList.css.d.ts.map +1 -1
- package/dist/components/OrderedList/OrderedList.css.js +8 -1
- package/dist/components/OrderedList/OrderedList.d.ts +4 -4
- package/dist/components/OrderedList/OrderedList.d.ts.map +1 -1
- package/dist/components/OrderedList/OrderedList.js +4 -6
- package/dist/components/Section/Section.d.ts +3 -3
- package/dist/components/Section/Section.d.ts.map +1 -1
- package/dist/components/Section/Section.js +2 -3
- package/dist/components/SelectInput/SelectInput.js +2 -2
- package/dist/components/Stack/Stack.d.ts +10 -6
- package/dist/components/Stack/Stack.d.ts.map +1 -1
- package/dist/components/Stack/Stack.js +27 -27
- package/dist/components/Tabs/Tab.d.ts +3 -3
- package/dist/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.js +1 -1
- package/dist/components/Text/Text.d.ts +5 -3
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.d.ts +5 -5
- package/dist/components/TextBubble/TextBubble.d.ts.map +1 -1
- package/dist/components/TextBubble/TextBubble.js +1 -2
- package/dist/components/TextLink/TextLink.css.d.ts +1 -0
- package/dist/components/TextLink/TextLink.css.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.css.js +5 -0
- package/dist/components/TextLink/TextLink.d.ts +8 -7
- package/dist/components/TextLink/TextLink.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.js +14 -14
- package/dist/components/private/InputBase/withEnhancedInput.d.ts +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.d.ts +11 -7
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +11 -7
- package/package.json +2 -2
- package/dist/components/Anchor/Anchor.css.d.ts +0 -2
- package/dist/components/Anchor/Anchor.css.d.ts.map +0 -1
- package/dist/components/Anchor/Anchor.css.js +0 -10
- package/dist/components/Stack/Divider.d.ts +0 -3
- package/dist/components/Stack/Divider.d.ts.map +0 -1
- package/dist/components/Stack/Divider.js +0 -13
|
@@ -1,71 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { Children, isValidElement } from 'react';
|
|
3
|
+
import React, { Children, isValidElement, useMemo } from 'react';
|
|
5
4
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
6
|
-
import { useNegativeMarginLeft, useNegativeMarginTop } from "../../hooks/useNegativeMargin/useNegativeMargin.js";
|
|
7
5
|
import { Box } from "../Box/Box.js";
|
|
6
|
+
import { LIST_MAP } from "../Stack/Stack.js";
|
|
8
7
|
import { Text } from "../Text/Text.js";
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
11
|
-
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const Divider = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children
|
|
12
|
+
} = _ref;
|
|
13
|
+
if (!children) return null;
|
|
14
|
+
if (typeof children === 'boolean') return _jsx(Text, {
|
|
15
|
+
"aria-hidden": true,
|
|
16
|
+
children: "\u2022"
|
|
17
|
+
});
|
|
18
|
+
if (isValidElement(children)) return _jsx("div", {
|
|
19
|
+
"aria-hidden": true,
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
return _jsx(Text, {
|
|
23
|
+
"aria-hidden": true,
|
|
24
|
+
children: children
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export const Inline = _ref2 => {
|
|
12
28
|
let {
|
|
13
29
|
as = 'div',
|
|
14
|
-
children,
|
|
15
|
-
space = '2',
|
|
16
|
-
alignY = 'center',
|
|
17
30
|
alignX,
|
|
18
|
-
|
|
31
|
+
alignY = 'center',
|
|
32
|
+
children,
|
|
19
33
|
dividers,
|
|
34
|
+
noWrap,
|
|
35
|
+
space = '2',
|
|
20
36
|
width
|
|
21
|
-
} =
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (items.length < 2) {
|
|
26
|
-
return _jsx(_Fragment, {
|
|
27
|
-
children: items
|
|
28
|
-
});
|
|
37
|
+
} = _ref2;
|
|
38
|
+
const items = useMemo(() => flattenChildren(children), [children]);
|
|
39
|
+
if (items.length === 0) {
|
|
40
|
+
return null;
|
|
29
41
|
}
|
|
30
|
-
const
|
|
31
|
-
let listItem = 'div';
|
|
32
|
-
if (typeof as === 'string') listItem = supportedListTypes.includes(as) ? 'li' : 'div';
|
|
42
|
+
const childEl = typeof as === 'string' && as in LIST_MAP ? LIST_MAP[as] : 'div';
|
|
33
43
|
return _jsx(Box, {
|
|
44
|
+
alignItems: alignY,
|
|
34
45
|
as: as,
|
|
35
|
-
width: width,
|
|
36
|
-
position: "relative",
|
|
37
46
|
display: "flex",
|
|
38
|
-
alignItems: alignY,
|
|
39
|
-
justifyContent: alignX,
|
|
40
47
|
flexDirection: "row",
|
|
41
48
|
flexWrap: noWrap ? 'nowrap' : 'wrap',
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
gap: space,
|
|
50
|
+
justifyContent: alignX,
|
|
51
|
+
odComponent: "inline",
|
|
52
|
+
width: width,
|
|
53
|
+
children: Children.map(items, (child, idx) => child && _jsxs(Box, {
|
|
54
|
+
alignItems: alignY,
|
|
55
|
+
as: childEl,
|
|
45
56
|
display: "flex",
|
|
46
|
-
flexDirection: "row",
|
|
47
57
|
flexWrap: "nowrap",
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
children: divider
|
|
54
|
-
}) : null]
|
|
55
|
-
}) : null)
|
|
58
|
+
useVar: "gap",
|
|
59
|
+
children: [dividers && idx > 0 && _jsx(Divider, {
|
|
60
|
+
children: dividers
|
|
61
|
+
}), child]
|
|
62
|
+
}))
|
|
56
63
|
});
|
|
57
|
-
};
|
|
58
|
-
const renderDivider = dividers => {
|
|
59
|
-
if (typeof dividers === 'boolean') {
|
|
60
|
-
return dividers ? _jsx(Text, {
|
|
61
|
-
children: "\u2022"
|
|
62
|
-
}) : null;
|
|
63
|
-
}
|
|
64
|
-
if (isValidElement(dividers)) {
|
|
65
|
-
return dividers;
|
|
66
|
-
}
|
|
67
|
-
return _jsx(Text, {
|
|
68
|
-
children: dividers
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
export default Inline;
|
|
64
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedList.css.d.ts","sourceRoot":"","sources":["../../../lib/components/OrderedList/OrderedList.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,+CAOf,CAAC"}
|
|
1
|
+
{"version":3,"file":"OrderedList.css.d.ts","sourceRoot":"","sources":["../../../lib/components/OrderedList/OrderedList.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,+CAOf,CAAC;AAEH,eAAO,MAAM,IAAI,QAMf,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
4
|
__vanilla_filescope__.setFileScope("lib/components/OrderedList/OrderedList.css.ts", "@autoguru/overdrive");
|
|
5
|
-
import { styleVariants } from '@vanilla-extract/css';
|
|
5
|
+
import { style, styleVariants } from '@vanilla-extract/css';
|
|
6
6
|
import { overdriveTokens as vars } from "../../themes/theme.css.js";
|
|
7
7
|
export const root = styleVariants({
|
|
8
8
|
default: {
|
|
@@ -12,4 +12,11 @@ export const root = styleVariants({
|
|
|
12
12
|
paddingLeft: `calc(${vars.space['6']} * 2)`
|
|
13
13
|
}
|
|
14
14
|
}, "root");
|
|
15
|
+
export const item = style({
|
|
16
|
+
selectors: {
|
|
17
|
+
'& + &': {
|
|
18
|
+
marginTop: vars.space['2']
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, "item");
|
|
15
22
|
__vanilla_filescope__.endFileScope();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FunctionComponent, OlHTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { type FunctionComponent, type OlHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
type ListStyleType = 'decimal' | 'lower-roman' | 'lower-alpha' | 'upper-alpha';
|
|
3
|
-
export interface
|
|
3
|
+
export interface OrderedListProps extends Pick<OlHTMLAttributes<HTMLOListElement>, 'start'> {
|
|
4
4
|
type?: ListStyleType;
|
|
5
5
|
className?: string;
|
|
6
6
|
children?: ReactNode;
|
|
@@ -9,8 +9,8 @@ export interface ItemProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
}
|
|
12
|
-
export declare const OrderedList: FunctionComponent<
|
|
12
|
+
export declare const OrderedList: FunctionComponent<OrderedListProps> & {
|
|
13
13
|
Item: FunctionComponent<ItemProps>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export {};
|
|
16
16
|
//# sourceMappingURL=OrderedList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedList.d.ts","sourceRoot":"","sources":["../../../lib/components/OrderedList/OrderedList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OrderedList.d.ts","sourceRoot":"","sources":["../../../lib/components/OrderedList/OrderedList.tsx"],"names":[],"mappings":"AACA,OAAc,EAEb,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,SAAS,EAET,MAAM,OAAO,CAAC;AAQf,KAAK,aAAa,GAAG,SAAS,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CAAC;AAU/E,MAAM,WAAW,gBAChB,SAAQ,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACzD,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAID,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,GAAG;IAC/D,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;CA+BnC,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import
|
|
5
|
-
import { createContext, useContext } from 'react';
|
|
4
|
+
import React, { createContext, useContext } from 'react';
|
|
6
5
|
import { typographyStyles } from "../../styles/typography.css.js";
|
|
7
6
|
import { Box } from "../Box/Box.js";
|
|
8
7
|
import { Stack } from "../Stack/Stack.js";
|
|
@@ -13,7 +12,7 @@ const OrderedListContext = createContext(-1);
|
|
|
13
12
|
export const OrderedList = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
children,
|
|
16
|
-
className
|
|
15
|
+
className,
|
|
17
16
|
type = null,
|
|
18
17
|
start
|
|
19
18
|
} = _ref;
|
|
@@ -49,7 +48,7 @@ export const OrderedList = _ref => {
|
|
|
49
48
|
};
|
|
50
49
|
const Item = _ref2 => {
|
|
51
50
|
let {
|
|
52
|
-
className
|
|
51
|
+
className,
|
|
53
52
|
children
|
|
54
53
|
} = _ref2;
|
|
55
54
|
return _jsx(Box, {
|
|
@@ -58,5 +57,4 @@ const Item = _ref2 => {
|
|
|
58
57
|
children: children
|
|
59
58
|
});
|
|
60
59
|
};
|
|
61
|
-
OrderedList.Item = Item;
|
|
62
|
-
export default OrderedList;
|
|
60
|
+
OrderedList.Item = Item;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ComponentProps,
|
|
1
|
+
import React, { ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { Box } from '../Box/Box';
|
|
3
3
|
import * as styles from './Section.css';
|
|
4
|
-
export interface
|
|
4
|
+
export interface SectionProps extends Pick<ComponentProps<typeof Box>, 'paddingX' | 'ref'> {
|
|
5
5
|
width?: keyof typeof styles.width;
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
}
|
|
8
|
-
export declare const Section:
|
|
8
|
+
export declare const Section: ({ children, width, paddingX, ref, }: SectionProps) => React.JSX.Element;
|
|
9
9
|
//# sourceMappingURL=Section.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../lib/components/Section/Section.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../lib/components/Section/Section.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,YAChB,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC;IAC5D,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,GAAI,qCAKrB,YAAY,sBASd,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import * as React from 'react';
|
|
3
|
+
import React from 'react';
|
|
5
4
|
import { Box } from "../Box/Box.js";
|
|
6
5
|
import * as styles from "./Section.css.js";
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -14,7 +13,7 @@ export const Section = _ref => {
|
|
|
14
13
|
} = _ref;
|
|
15
14
|
return _jsx(Box, {
|
|
16
15
|
ref: ref,
|
|
17
|
-
className:
|
|
16
|
+
className: [styles.root, styles.width[width]],
|
|
18
17
|
width: "full",
|
|
19
18
|
paddingX: paddingX,
|
|
20
19
|
children: children
|
|
@@ -34,7 +34,7 @@ export const SelectInput = withEnhancedInput(_ref => {
|
|
|
34
34
|
position: "relative",
|
|
35
35
|
children: [_jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
36
36
|
as: "select",
|
|
37
|
-
flexGrow: 1
|
|
37
|
+
flexGrow: "1"
|
|
38
38
|
}, eventHandlers), field), rest), {}, {
|
|
39
39
|
className: [styles.input, styles.paddedInput, field.className],
|
|
40
40
|
autoComplete: "off"
|
|
@@ -44,7 +44,7 @@ export const SelectInput = withEnhancedInput(_ref => {
|
|
|
44
44
|
alignItems: "center",
|
|
45
45
|
height: "full",
|
|
46
46
|
marginRight: size === 'medium' ? '4' : '2',
|
|
47
|
-
flexShrink: 0,
|
|
47
|
+
flexShrink: "0",
|
|
48
48
|
pointerEvents: "none",
|
|
49
49
|
position: "absolute",
|
|
50
50
|
children: _jsx(Icon, {
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { Sprinkles } from '../../styles/sprinkles.css';
|
|
2
3
|
import { type BoxProps } from '../Box/Box';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
space?: keyof typeof styles.child.spaces;
|
|
4
|
+
export interface StackProps extends Pick<BoxProps, 'as' | 'width' | 'alignItems'> {
|
|
5
|
+
children: ReactNode | ReactNode[];
|
|
6
6
|
className?: string;
|
|
7
7
|
dividers?: boolean;
|
|
8
|
-
|
|
8
|
+
space?: Sprinkles['padding'];
|
|
9
9
|
}
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const LIST_MAP: {
|
|
11
|
+
readonly ol: "li";
|
|
12
|
+
readonly ul: "li";
|
|
13
|
+
};
|
|
14
|
+
export declare const Stack: ({ alignItems, as, className, children, dividers, space, width, }: StackProps) => React.JSX.Element | null;
|
|
11
15
|
//# sourceMappingURL=Stack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../lib/components/Stack/Stack.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../../../lib/components/Stack/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAY,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAGjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAIhD,MAAM,WAAW,UAChB,SAAQ,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,OAAO,GAAG,YAAY,CAAC;IACrD,QAAQ,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IAInB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,QAAQ;;;CAGX,CAAC;AA4BX,eAAO,MAAM,KAAK,GAAI,kEAQnB,UAAU,6BAuCZ,CAAC"}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import { Children } from 'react';
|
|
3
|
+
import React, { Children, useMemo } from 'react';
|
|
5
4
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
6
5
|
import { Box } from "../Box/Box.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import * as styles from "./Divider.css.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export const LIST_MAP = {
|
|
9
|
+
ol: 'li',
|
|
10
|
+
ul: 'li'
|
|
11
|
+
};
|
|
12
|
+
const Divider = () => _jsx("hr", {
|
|
13
|
+
className: styles.hr
|
|
14
|
+
});
|
|
11
15
|
export const Stack = _ref => {
|
|
12
16
|
let {
|
|
17
|
+
alignItems,
|
|
13
18
|
as = 'div',
|
|
14
|
-
|
|
19
|
+
className,
|
|
15
20
|
children,
|
|
16
|
-
alignItems,
|
|
17
|
-
width,
|
|
18
21
|
dividers = false,
|
|
19
|
-
|
|
22
|
+
space = '2',
|
|
23
|
+
width
|
|
20
24
|
} = _ref;
|
|
21
|
-
const items = flattenChildren(children);
|
|
22
|
-
if (items.length
|
|
23
|
-
return
|
|
24
|
-
children: items
|
|
25
|
-
});
|
|
25
|
+
const items = useMemo(() => flattenChildren(children), [children]);
|
|
26
|
+
if (items.length === 0) {
|
|
27
|
+
return null;
|
|
26
28
|
}
|
|
27
|
-
|
|
28
|
-
if (typeof as === 'string') listItem = supportedListTypes.includes(as) ? 'li' : 'div';
|
|
29
|
+
const childEl = typeof as === 'string' && as in LIST_MAP ? LIST_MAP[as] : 'div';
|
|
29
30
|
return _jsx(Box, {
|
|
30
31
|
as: as,
|
|
31
32
|
className: className,
|
|
33
|
+
display: "flex",
|
|
34
|
+
flexDirection: "column",
|
|
35
|
+
gap: space,
|
|
36
|
+
odComponent: "stack",
|
|
32
37
|
width: width,
|
|
33
|
-
children: Children.map(items, (child, idx) => _jsxs(Box, {
|
|
34
|
-
as: listItem,
|
|
35
|
-
display: alignItems ? 'flex' : void 0,
|
|
36
|
-
flexDirection: "column",
|
|
38
|
+
children: Children.map(items, (child, idx) => child && _jsxs(Box, {
|
|
37
39
|
alignItems: alignItems,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
children: _jsx(Divider, {})
|
|
43
|
-
}) : null, child]
|
|
40
|
+
as: childEl,
|
|
41
|
+
display: alignItems ? 'flex' : undefined,
|
|
42
|
+
flexDirection: alignItems ? 'column' : undefined,
|
|
43
|
+
children: [dividers && idx > 0 && _jsx(Divider, {}), child]
|
|
44
44
|
}))
|
|
45
45
|
});
|
|
46
46
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ElementType, ReactElement, ReactNode } from 'react';
|
|
3
|
-
export interface
|
|
3
|
+
export interface TabProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
id?: string;
|
|
6
|
-
|
|
6
|
+
as?: ElementType | ReactElement;
|
|
7
7
|
indication?: number;
|
|
8
8
|
}
|
|
9
|
-
export declare const Tab: React.ForwardRefExoticComponent<
|
|
9
|
+
export declare const Tab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export default Tab;
|
|
11
11
|
//# sourceMappingURL=Tab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tab.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGN,WAAW,EAGX,YAAY,EACZ,SAAS,EAET,MAAM,OAAO,CAAC;AAWf,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tab.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGN,WAAW,EAGX,YAAY,EACZ,SAAS,EAET,MAAM,OAAO,CAAC;AAWf,MAAM,WAAW,QAAQ;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,GAAG,iFA+Ef,CAAC;AAIF,eAAe,GAAG,CAAC"}
|
|
@@ -17,7 +17,7 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
17
17
|
children,
|
|
18
18
|
id: incomingId = null,
|
|
19
19
|
indication = null,
|
|
20
|
-
|
|
20
|
+
as: Component = 'button'
|
|
21
21
|
} = _ref;
|
|
22
22
|
const tabsContext = useContext(TabsContext);
|
|
23
23
|
const tabListContext = useContext(TabListContext);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ClassValue as ClassName } from 'clsx';
|
|
2
|
+
import React, { type ComponentProps } from 'react';
|
|
2
3
|
import { type Sprinkles } from '../../styles/sprinkles.css';
|
|
3
4
|
import type { TestId } from '../../types';
|
|
4
5
|
import type { TextStyleProps } from './textStyles';
|
|
5
|
-
type ElementAttributes = React.ComponentPropsWithoutRef<'p'> & Pick<
|
|
6
|
+
type ElementAttributes = React.ComponentPropsWithoutRef<'p'> & Pick<ComponentProps<'label'>, 'htmlFor'>;
|
|
6
7
|
type AdditionalStyleProps = Pick<Sprinkles, 'display' | 'm' | 'mb' | 'ml' | 'mr' | 'mt' | 'mx' | 'my' | 'margin' | 'marginBottom' | 'marginLeft' | 'marginRight' | 'marginTop' | 'marginX' | 'marginY' | 'p' | 'pb' | 'pl' | 'pr' | 'pt' | 'px' | 'py' | 'padding' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'paddingX' | 'paddingY'>;
|
|
7
|
-
export interface TextProps extends Omit<ElementAttributes, 'color' | 'is'>, AdditionalStyleProps, TextStyleProps, TestId {
|
|
8
|
+
export interface TextProps extends Omit<ElementAttributes, 'className' | 'color' | 'is'>, AdditionalStyleProps, TextStyleProps, TestId {
|
|
9
|
+
className?: ClassName;
|
|
8
10
|
}
|
|
9
11
|
export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
|
|
10
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../lib/components/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AACpD,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAG1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,KAAK,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,GAC3D,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;AAE1C,KAAK,oBAAoB,GAAG,IAAI,CAC/B,SAAS,EACP,SAAS,GACT,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,aAAa,GACb,WAAW,GACX,SAAS,GACT,SAAS,GACT,GAAG,GACH,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,SAAS,GACT,eAAe,GACf,aAAa,GACb,cAAc,GACd,YAAY,GACZ,UAAU,GACV,UAAU,CACZ,CAAC;AAEF,MAAM,WAAW,SAChB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,WAAW,GAAG,OAAO,GAAG,IAAI,CAAC,EAC5D,oBAAoB,EACpB,cAAc,EACd,MAAM;IACP,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB;AAmBD,eAAO,MAAM,IAAI,+EA+ChB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export interface TextBubbleProps extends Omit<
|
|
1
|
+
import { type FunctionComponent } from 'react';
|
|
2
|
+
import { type BoxProps } from '../Box/Box';
|
|
3
|
+
import { type TextProps } from '../Text/Text';
|
|
4
|
+
export interface TextBubbleProps extends Omit<BoxProps, 'borderRadius' | 'position' | 'padding'> {
|
|
5
5
|
label: string;
|
|
6
6
|
rawNumbers?: boolean;
|
|
7
|
-
textColour?:
|
|
7
|
+
textColour?: TextProps['colour'];
|
|
8
8
|
}
|
|
9
9
|
export declare const TextBubble: FunctionComponent<TextBubbleProps>;
|
|
10
10
|
//# sourceMappingURL=TextBubble.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextBubble.d.ts","sourceRoot":"","sources":["../../../lib/components/TextBubble/TextBubble.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,KAAK,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAG/D,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,WAAW,eAChB,SAAQ,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;CACjC;AAUD,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAoDzD,CAAC"}
|
|
@@ -6,8 +6,7 @@ const _excluded = ["textColour", "rawNumbers", "label"];
|
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import
|
|
10
|
-
import { useMemo } from 'react';
|
|
9
|
+
import React, { useMemo } from 'react';
|
|
11
10
|
import { sprinkles } from "../../styles/index.js";
|
|
12
11
|
import { Box } from "../Box/Box.js";
|
|
13
12
|
import { Text } from "../Text/Text.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.css.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextLink.css.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,QASf,CAAC;AAEH,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,IAAI,QAGf,CAAC;AAEH,eAAO,MAAM,KAAK,QAKhB,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
4
|
__vanilla_filescope__.setFileScope("lib/components/TextLink/TextLink.css.ts", "@autoguru/overdrive");
|
|
5
5
|
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { sprinkles } from "../../styles/sprinkles.css.js";
|
|
6
7
|
import { overdriveTokens as vars } from "../../themes/theme.css.js";
|
|
7
8
|
export const root = style({
|
|
8
9
|
transitionDelay: '0s',
|
|
@@ -21,6 +22,10 @@ export const icon = style({
|
|
|
21
22
|
top: '50%',
|
|
22
23
|
transform: 'translateY(-50%)'
|
|
23
24
|
}, "icon");
|
|
25
|
+
export const body = sprinkles({
|
|
26
|
+
pointerEvents: 'none',
|
|
27
|
+
position: 'relative'
|
|
28
|
+
});
|
|
24
29
|
export const muted = style({
|
|
25
30
|
':hover': {
|
|
26
31
|
color: 'white',
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { IconType } from '@autoguru/icons';
|
|
2
|
-
import React, {
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
|
|
2
|
+
import React, { type ComponentPropsWithoutRef, type ElementType, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import type { TextStyleProps } from '../Text/textStyles';
|
|
4
|
+
type AnchorProps = ComponentPropsWithoutRef<'a'>;
|
|
5
|
+
type FilteredAnchorProps = Omit<AnchorProps, keyof TextStyleProps>;
|
|
6
|
+
type FilteredTextStyleProps = Omit<TextStyleProps, 'as' | 'align' | 'breakword' | 'wordbreak' | 'wrap'>;
|
|
7
|
+
export interface TextLinkProps extends FilteredAnchorProps, FilteredTextStyleProps {
|
|
7
8
|
children?: ReactNode;
|
|
8
9
|
className?: string;
|
|
9
|
-
|
|
10
|
+
as?: ElementType | ReactElement;
|
|
10
11
|
muted?: boolean;
|
|
11
12
|
icon?: IconType;
|
|
12
13
|
}
|
|
13
|
-
export declare const TextLink: React.ForwardRefExoticComponent<
|
|
14
|
+
export declare const TextLink: React.ForwardRefExoticComponent<TextLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=TextLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../lib/components/TextLink/TextLink.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,EAEb,KAAK,wBAAwB,EAE7B,KAAK,WAAW,EAGhB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,KAAK,WAAW,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC;AACjD,KAAK,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,cAAc,CAAC,CAAC;AACnE,KAAK,sBAAsB,GAAG,IAAI,CACjC,cAAc,EACd,IAAI,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,CACnD,CAAC;AAEF,MAAM,WAAW,aAChB,SAAQ,mBAAmB,EAC1B,sBAAsB;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,WAAW,GAAG,YAAY,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,IAAI,CAAC,EAAE,QAAQ,CAAC;CAChB;AAaD,eAAO,MAAM,QAAQ,yFA2EpB,CAAC"}
|
|
@@ -2,13 +2,12 @@
|
|
|
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 = ["
|
|
5
|
+
const _excluded = ["as", "children", "className", "color", "colour", "icon", "muted", "noWrap", "size", "strong", "transform", "weight"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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";
|
|
12
11
|
import { Box } from "../Box/Box.js";
|
|
13
12
|
import { Icon } from "../Icon/Icon.js";
|
|
14
13
|
import { Text } from "../Text/Text.js";
|
|
@@ -17,32 +16,32 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
17
16
|
export const TextLink = forwardRef((_ref, ref) => {
|
|
18
17
|
var _props$rel;
|
|
19
18
|
let {
|
|
20
|
-
|
|
19
|
+
as: Component,
|
|
21
20
|
children,
|
|
22
21
|
className,
|
|
23
22
|
color,
|
|
24
|
-
|
|
23
|
+
colour,
|
|
24
|
+
icon,
|
|
25
25
|
muted = false,
|
|
26
|
+
noWrap,
|
|
26
27
|
size,
|
|
27
|
-
|
|
28
|
+
strong,
|
|
29
|
+
transform,
|
|
28
30
|
weight = 'semiBold'
|
|
29
31
|
} = _ref,
|
|
30
32
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
33
|
!!(Component !== undefined && props.href !== undefined) ? process.env.NODE_ENV !== "production" ? invariant(false, 'You cannot have both href and as defined.') : invariant(false) : void 0;
|
|
32
34
|
const body = _jsxs(Text, {
|
|
33
|
-
as: "span",
|
|
34
35
|
colour: muted ? 'muted' : 'link',
|
|
36
|
+
noWrap: noWrap,
|
|
37
|
+
pr: icon ? '5' : undefined,
|
|
35
38
|
size: size,
|
|
36
|
-
weight: weight,
|
|
37
39
|
strong: strong,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
position: 'relative',
|
|
42
|
-
paddingRight: icon ? '5' : undefined
|
|
43
|
-
}), {
|
|
40
|
+
transform: transform,
|
|
41
|
+
weight: weight,
|
|
42
|
+
className: [styles.body, {
|
|
44
43
|
[styles.muted]: muted
|
|
45
|
-
}
|
|
44
|
+
}],
|
|
46
45
|
children: [children, icon ? _jsx(Icon, {
|
|
47
46
|
icon: icon,
|
|
48
47
|
size: "small",
|
|
@@ -59,6 +58,7 @@ export const TextLink = forwardRef((_ref, ref) => {
|
|
|
59
58
|
return _jsx(Box, _objectSpread(_objectSpread({
|
|
60
59
|
as: "a",
|
|
61
60
|
color: color,
|
|
61
|
+
colour: colour,
|
|
62
62
|
className: [className, styles.root]
|
|
63
63
|
}, allProps), {}, {
|
|
64
64
|
children: body
|
|
@@ -4,7 +4,7 @@ import { Box } from '../../Box/Box';
|
|
|
4
4
|
import { NotchedBase } from './NotchedBase';
|
|
5
5
|
import type { InputSize } from './withEnhancedInput.css';
|
|
6
6
|
type ElementTypes = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
|
|
7
|
-
type NativeAttributes<E extends ElementTypes> = Omit<InputHTMLAttributes<E>, 'color' | 'height' | 'is' | 'placeholder' | 'size' | 'width'>;
|
|
7
|
+
type NativeAttributes<E extends ElementTypes> = Omit<InputHTMLAttributes<E>, 'as' | 'color' | 'height' | 'is' | 'placeholder' | 'size' | 'width'>;
|
|
8
8
|
export interface EventHandlers<E extends ElementTypes> {
|
|
9
9
|
onChange?: ChangeEventHandler<E>;
|
|
10
10
|
onBlur?: FocusEventHandler<E>;
|