@autoguru/overdrive 4.40.0-next.0 → 4.40.0-next.2
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/Badge/Badge.css.d.ts.map +1 -1
- package/dist/components/Badge/Badge.css.js +1 -0
- package/dist/components/Badge/Badge.stories.d.ts +0 -8
- package/dist/components/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/components/CheckBox/CheckBox.css.d.ts.map +1 -1
- package/dist/components/CheckBox/CheckBox.css.js +1 -1
- package/dist/components/CheckBox/CheckBox.d.ts +2 -2
- package/dist/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/dist/components/CheckBox/CheckBox.js +23 -10
- package/dist/components/CheckBox/CheckBox.stories.d.ts +1 -0
- package/dist/components/CheckBox/CheckBox.stories.d.ts.map +1 -1
- package/dist/components/Columns/Columns.stories.d.ts +8 -0
- package/dist/components/Columns/Columns.stories.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +12 -11
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts +4 -0
- package/dist/components/LoadingBox/LoadingBox.stories.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.css.d.ts +43 -5
- package/dist/components/Tabs/Tab.css.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.css.js +101 -23
- package/dist/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.js +11 -12
- package/dist/components/Tabs/TabList.css.d.ts +15 -1
- package/dist/components/Tabs/TabList.css.d.ts.map +1 -1
- package/dist/components/Tabs/TabList.css.js +19 -10
- package/dist/components/Tabs/TabList.d.ts +1 -3
- package/dist/components/Tabs/TabList.d.ts.map +1 -1
- package/dist/components/Tabs/TabList.js +14 -7
- package/dist/components/Tabs/Tabs.d.ts +3 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +3 -1
- package/dist/components/Tabs/Tabs.stories.d.ts +3 -19
- package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/TextLink/TextLink.stories.d.ts +4 -0
- package/dist/components/TextLink/TextLink.stories.d.ts.map +1 -1
- package/dist/styles/focusOutline.css.d.ts +4 -2
- package/dist/styles/focusOutline.css.d.ts.map +1 -1
- package/package.json +38 -39
- package/dist/components/Button/Button-cursor.css.js +0 -205
- package/dist/components/Button/Button-windsuft.css.js +0 -566
- package/dist/report.html +0 -39
- package/dist/stats.json +0 -368
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAMvE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Badge.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAMvE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;EA6GtB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { fontSize, fontWeight } from "../../styles/typography.css.js";
|
|
|
8
8
|
import { themeContractVars as tokens } from "../../themes/theme.css.js";
|
|
9
9
|
export const styledBadge = recipe({
|
|
10
10
|
base: [{
|
|
11
|
+
display: 'inline-block',
|
|
11
12
|
overflow: 'hidden',
|
|
12
13
|
textOverflow: 'ellipsis',
|
|
13
14
|
textTransform: 'uppercase',
|
|
@@ -5,14 +5,6 @@ type Story = StoryObj<typeof Badge>;
|
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
7
|
component: ({ label, colour, look, size, className, testId, }: import("../../types").WithTestId<import("./Badge").BadgeProps>) => React.JSX.Element;
|
|
8
|
-
decorators: ((story: import("@storybook/core/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
9
|
-
label: string;
|
|
10
|
-
colour?: ("neutral" | "green" | "blue" | "yellow" | "red") | undefined;
|
|
11
|
-
className?: string | undefined;
|
|
12
|
-
look?: "standard" | "inverted" | undefined;
|
|
13
|
-
size?: "small" | "large" | "standard" | undefined;
|
|
14
|
-
testId?: string | undefined;
|
|
15
|
-
}>) => React.JSX.Element)[];
|
|
16
8
|
tags: string[];
|
|
17
9
|
};
|
|
18
10
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Badge/Badge.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAE1B,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;;;;;;AAUpC,wBAI+B;AAE/B,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAiChC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAahC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBox.css.d.ts","sourceRoot":"","sources":["../../../lib/components/CheckBox/CheckBox.css.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"CheckBox.css.d.ts","sourceRoot":"","sources":["../../../lib/components/CheckBox/CheckBox.css.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ,wCA0BnB,CAAC;AAEH,eAAO,MAAM,IAAI,QAOf,CAAC"}
|
|
@@ -27,7 +27,7 @@ export const checkbox = styleVariants({
|
|
|
27
27
|
borderWidth: borderWidth,
|
|
28
28
|
zIndex: 0,
|
|
29
29
|
selectors: {
|
|
30
|
-
[`${nativeInput}:not(:checked):hover ~${checkable}
|
|
30
|
+
[`${nativeInput}:not(:checked):hover ~${checkable} &:not([data-indeterminate])`]: {
|
|
31
31
|
backgroundColor: colorMid
|
|
32
32
|
}
|
|
33
33
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
3
2
|
export interface Props {
|
|
4
3
|
className?: string;
|
|
5
4
|
checked?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
6
|
+
isIndeterminate?: boolean;
|
|
7
7
|
name?: string;
|
|
8
8
|
value: string;
|
|
9
9
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBox.d.ts","sourceRoot":"","sources":["../../../lib/components/CheckBox/CheckBox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CheckBox.d.ts","sourceRoot":"","sources":["../../../lib/components/CheckBox/CheckBox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAqB,MAAM,OAAO,CAAC;AAWxE,MAAM,WAAW,KAAK;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,QAAQ,gFA0DpB,CAAC;AAIF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
import { CheckIcon, MinusIcon } from '@autoguru/icons';
|
|
4
7
|
import clsx from 'clsx';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
+
import React, { forwardRef, useEffect, useRef } from 'react';
|
|
9
|
+
import { mergeRefs, noop } from "../../utils/index.js";
|
|
10
|
+
import { dataAttrs } from "../../utils/dataAttrs.js";
|
|
8
11
|
import { Box } from "../Box/index.js";
|
|
9
12
|
import { Icon } from "../Icon/index.js";
|
|
10
13
|
import { CheckableBase } from "../private/CheckableBase/index.js";
|
|
@@ -18,12 +21,19 @@ export const CheckBox = forwardRef((_ref, ref) => {
|
|
|
18
21
|
name = '',
|
|
19
22
|
disabled = false,
|
|
20
23
|
checked = false,
|
|
24
|
+
isIndeterminate = false,
|
|
21
25
|
onClick = noop,
|
|
22
26
|
onChange = noop,
|
|
23
27
|
children
|
|
24
28
|
} = _ref;
|
|
29
|
+
const internalRef = useRef(null);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (internalRef.current) {
|
|
32
|
+
internalRef.current.indeterminate = isIndeterminate;
|
|
33
|
+
}
|
|
34
|
+
}, [isIndeterminate]);
|
|
25
35
|
return _jsx(CheckableBase, {
|
|
26
|
-
ref: ref,
|
|
36
|
+
ref: mergeRefs([ref, internalRef]),
|
|
27
37
|
inputType: "checkbox",
|
|
28
38
|
className: className,
|
|
29
39
|
inputName: name,
|
|
@@ -33,16 +43,19 @@ export const CheckBox = forwardRef((_ref, ref) => {
|
|
|
33
43
|
checked: checked,
|
|
34
44
|
handleClick: onClick,
|
|
35
45
|
handleChange: onChange,
|
|
36
|
-
children: _jsx(Box, {
|
|
46
|
+
children: _jsx(Box, _objectSpread(_objectSpread({
|
|
37
47
|
className: clsx(styles.checkbox.default, checkableIndicator, {
|
|
38
|
-
[styles.checkbox.selected]: checked
|
|
39
|
-
})
|
|
48
|
+
[styles.checkbox.selected]: checked || isIndeterminate
|
|
49
|
+
})
|
|
50
|
+
}, dataAttrs({
|
|
51
|
+
indeterminate: isIndeterminate
|
|
52
|
+
})), {}, {
|
|
40
53
|
children: _jsx(Icon, {
|
|
41
|
-
icon: CheckIcon,
|
|
54
|
+
icon: isIndeterminate ? MinusIcon : CheckIcon,
|
|
42
55
|
size: "medium",
|
|
43
56
|
className: styles.icon
|
|
44
57
|
})
|
|
45
|
-
})
|
|
58
|
+
}))
|
|
46
59
|
});
|
|
47
60
|
});
|
|
48
61
|
CheckBox.displayName = 'Checkbox';
|
|
@@ -6,6 +6,7 @@ export default meta;
|
|
|
6
6
|
type Story = StoryObj<typeof CheckBox>;
|
|
7
7
|
export declare const Default: Story;
|
|
8
8
|
export declare const Disabled: Story;
|
|
9
|
+
export declare const Indeterminate: Story;
|
|
9
10
|
export declare const List: {
|
|
10
11
|
render: ({ disabled, onChange }: {
|
|
11
12
|
disabled: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckBox.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/CheckBox/CheckBox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,
|
|
1
|
+
{"version":3,"file":"CheckBox.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/CheckBox/CheckBox.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAU7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CA+C/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAOF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,IAAI;;;;;;;;CAwChB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAeF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KA8BpC,CAAC"}
|
|
@@ -208,6 +208,8 @@ declare const _default: {
|
|
|
208
208
|
popoverTarget?: string | undefined | undefined;
|
|
209
209
|
inert?: boolean | undefined | undefined;
|
|
210
210
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
211
|
+
exportparts?: string | undefined | undefined;
|
|
212
|
+
part?: string | undefined | undefined;
|
|
211
213
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
212
214
|
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
213
215
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
@@ -414,6 +416,8 @@ declare const _default: {
|
|
|
414
416
|
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
415
417
|
onScroll?: React.UIEventHandler<HTMLElement> | undefined;
|
|
416
418
|
onScrollCapture?: React.UIEventHandler<HTMLElement> | undefined;
|
|
419
|
+
onScrollEnd?: React.UIEventHandler<HTMLElement> | undefined;
|
|
420
|
+
onScrollEndCapture?: React.UIEventHandler<HTMLElement> | undefined;
|
|
417
421
|
onWheel?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
418
422
|
onWheelCapture?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
419
423
|
onAnimationStart?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
@@ -642,6 +646,8 @@ declare const _default: {
|
|
|
642
646
|
popoverTarget?: import("@storybook/core/csf").InputType | undefined;
|
|
643
647
|
inert?: import("@storybook/core/csf").InputType | undefined;
|
|
644
648
|
inputMode?: import("@storybook/core/csf").InputType | undefined;
|
|
649
|
+
exportparts?: import("@storybook/core/csf").InputType | undefined;
|
|
650
|
+
part?: import("@storybook/core/csf").InputType | undefined;
|
|
645
651
|
"aria-activedescendant"?: import("@storybook/core/csf").InputType | undefined;
|
|
646
652
|
"aria-atomic"?: import("@storybook/core/csf").InputType | undefined;
|
|
647
653
|
"aria-autocomplete"?: import("@storybook/core/csf").InputType | undefined;
|
|
@@ -846,6 +852,8 @@ declare const _default: {
|
|
|
846
852
|
onLostPointerCaptureCapture?: import("@storybook/core/csf").InputType | undefined;
|
|
847
853
|
onScroll?: import("@storybook/core/csf").InputType | undefined;
|
|
848
854
|
onScrollCapture?: import("@storybook/core/csf").InputType | undefined;
|
|
855
|
+
onScrollEnd?: import("@storybook/core/csf").InputType | undefined;
|
|
856
|
+
onScrollEndCapture?: import("@storybook/core/csf").InputType | undefined;
|
|
849
857
|
onWheel?: import("@storybook/core/csf").InputType | undefined;
|
|
850
858
|
onWheelCapture?: import("@storybook/core/csf").InputType | undefined;
|
|
851
859
|
onAnimationStart?: import("@storybook/core/csf").InputType | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.stories.d.ts","sourceRoot":"","sources":["../../../lib/components/Columns/Columns.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;;;;;;;;;+EAkClC,6CACV;;;;;;;;;;;;;;;;;sFAgBU,6CAAgB;oFAI/B,6CACC;qFAPY,6CACL;mFAJW,6CACR;;;uFAbW,6CAExB;qFAGO,6CAEN;sFAXU,6CAEV;oFALO,6CACI;;;;;;;qFAiCH,8CACJ,SAAS;;gFApBQ,6CAAgB;;iFA3BhC,6CACG;;;;;;;;;;;;;;;;;;;;;;;kFAES,6CAGhB;kFAEC,6CACD;iFAmBgB,6CACL;iFAAkC,6CAAgB;sFAmBxC,8CAAiB,SACrC;sFAIE,8CAAiB,SAAS;wFAErB,8CACP,SAAS;0FAEO,8CACJ,SAAS;2FACa,8CAElC,SACD;yFAEoB,8CAAiB,SAAS;6BAEvC,yDACS,OACb;8BACQ,yDACY,OAAO;8BACT,yDAEnB,OACH;gCAEI,yDAGiB,OAAO;kCAA4B,yDAExD,OAAO;mCAEA,yDACS,OACb;iCACW,yDACY,OACzB
|
|
1
|
+
{"version":3,"file":"Columns.stories.d.ts","sourceRoot":"","s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AAG,MAAM,CAAC,CAAC;IACzD,IAAI,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,IAAI,EAAE,iBAAiB,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../lib/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM5E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5C,OAAO,KAAK,MAAM,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,YAAY,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC;AAE/E,MAAM,WAAW,KAAK;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC,CAAC;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;IACzD,IAAI,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,IAAI,EAAE,iBAAiB,CAAC,KAAK,CA4BzC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -16,20 +16,21 @@ export const Icon = _ref => {
|
|
|
16
16
|
display = 'block'
|
|
17
17
|
} = _ref;
|
|
18
18
|
useNullCheck(icon, 'Icon component received an empty icon prop.');
|
|
19
|
+
const iconElement = cloneElement(icon, {
|
|
20
|
+
className: useBoxStyles({
|
|
21
|
+
as: 'svg',
|
|
22
|
+
display: 'block',
|
|
23
|
+
width: 'full',
|
|
24
|
+
height: 'full'
|
|
25
|
+
}),
|
|
26
|
+
'aria-label': (_icon$props$ariaLabe = icon.props['aria-label']) !== null && _icon$props$ariaLabe !== void 0 ? _icon$props$ariaLabe : undefined,
|
|
27
|
+
'aria-hidden': icon.props['aria-label'] ? undefined : true
|
|
28
|
+
});
|
|
19
29
|
return _jsx(Box, {
|
|
20
|
-
as: "
|
|
30
|
+
as: "span",
|
|
21
31
|
display: display,
|
|
22
32
|
className: [resolveResponsiveStyle(size, styles.size), className],
|
|
23
|
-
children: icon ?
|
|
24
|
-
className: useBoxStyles({
|
|
25
|
-
as: 'svg',
|
|
26
|
-
display: 'block',
|
|
27
|
-
width: 'full',
|
|
28
|
-
height: 'full'
|
|
29
|
-
}),
|
|
30
|
-
'aria-label': (_icon$props$ariaLabe = icon.props['aria-label']) !== null && _icon$props$ariaLabe !== void 0 ? _icon$props$ariaLabe : undefined,
|
|
31
|
-
'aria-hidden': icon.props['aria-label'] ? undefined : true
|
|
32
|
-
}) : '⬤'
|
|
33
|
+
children: icon ? iconElement : '⬤'
|
|
33
34
|
});
|
|
34
35
|
};
|
|
35
36
|
export default Icon;
|
|
@@ -210,6 +210,8 @@ declare const _default: {
|
|
|
210
210
|
popoverTarget?: string | undefined | undefined;
|
|
211
211
|
inert?: boolean | undefined | undefined;
|
|
212
212
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
213
|
+
exportparts?: string | undefined | undefined;
|
|
214
|
+
part?: string | undefined | undefined;
|
|
213
215
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
214
216
|
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
215
217
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
@@ -416,6 +418,8 @@ declare const _default: {
|
|
|
416
418
|
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
417
419
|
onScroll?: React.UIEventHandler<HTMLElement> | undefined;
|
|
418
420
|
onScrollCapture?: React.UIEventHandler<HTMLElement> | undefined;
|
|
421
|
+
onScrollEnd?: React.UIEventHandler<HTMLElement> | undefined;
|
|
422
|
+
onScrollEndCapture?: React.UIEventHandler<HTMLElement> | undefined;
|
|
419
423
|
onWheel?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
420
424
|
onWheelCapture?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
421
425
|
onAnimationStart?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
@@ -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,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;sFAiCgU,6CAAgB;oFAAqC,6CAAgB;qFAA5H,6CAAgB;mFAAtE,6CAAgB;;;uFAJhQ,6CACO;qFAGU,6CAAgB;sFAT1B,6CAEP;oFAJF,6CAAe;;;;;;;qFAWyiB,8CAAiB,SAAS;gFAAxf,6CAAgB;;iFArB9D,6CAC/B;;;;;;;;;;;;;;;;;;;;;;;kFACW,6CAEtB;kFAAmC,6CAE3B;iFAekI,6CAAgB;iFAAkC,6CAAgB;sFAA2a,8CAAiB,SAAS;sFAAuC,8CAAiB,SAAS;wFAAyC,8CAAiB,SAAS;0FAA2C,8CAAiB,SAAS;2FAA4C,8CAAiB,SAAS;yFAA0C,8CAAiB,SAAS;6BAAyB,yDAAiC,OAAO;8BAAwB,yDAAiC,OAAO;8BAAwB,yDAAiC,OAAO;gCAA0B,yDAAiC,OAAO;kCAA4B,yDAAiC,OAAO;mCAA6B,yDAAiC,OAAO;iCAA2B,yDAAiC,OAAO
|
|
1
|
+
{"version":3,"file":"LoadingBox.stories.d.ts","sourceRoot":"","sources":["../../../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;;AA/Br7C,wBAYoC;AAEpC,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC"}
|
|
@@ -1,7 +1,45 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const styledTab: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
appearance: {
|
|
3
|
+
underlined: {
|
|
4
|
+
borderBottom: "calc(1px + 1px) solid transparent";
|
|
5
|
+
padding: `calc(var(--${string}) + 1px) var(--${string})` | `calc(var(--${string}) + 1px) var(--${string}, ${string})` | `calc(var(--${string}) + 1px) var(--${string}, ${number})` | `calc(var(--${string}, ${string}) + 1px) var(--${string})` | `calc(var(--${string}, ${string}) + 1px) var(--${string}, ${string})` | `calc(var(--${string}, ${string}) + 1px) var(--${string}, ${number})` | `calc(var(--${string}, ${number}) + 1px) var(--${string})` | `calc(var(--${string}, ${number}) + 1px) var(--${string}, ${string})` | `calc(var(--${string}, ${number}) + 1px) var(--${string}, ${number})`;
|
|
6
|
+
':focus-visible': {
|
|
7
|
+
outlineOffset: "-1px";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
pill: {
|
|
11
|
+
borderRadius: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
12
|
+
color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
13
|
+
fontWeight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
14
|
+
padding: `var(--${string}) var(--${string})` | `var(--${string}) var(--${string}, ${string})` | `var(--${string}) var(--${string}, ${number})` | `var(--${string}, ${string}) var(--${string})` | `var(--${string}, ${string}) var(--${string}, ${string})` | `var(--${string}, ${string}) var(--${string}, ${number})` | `var(--${string}, ${number}) var(--${string})` | `var(--${string}, ${number}) var(--${string}, ${string})` | `var(--${string}, ${number}) var(--${string}, ${number})`;
|
|
15
|
+
selectors: {
|
|
16
|
+
'&+&': {
|
|
17
|
+
marginLeft: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
18
|
+
};
|
|
19
|
+
'&:not([aria-selected=true]):hover': {
|
|
20
|
+
backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
active: {
|
|
26
|
+
true: {};
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
5
29
|
export declare const item: string;
|
|
6
|
-
export declare const indication:
|
|
30
|
+
export declare const indication: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
31
|
+
appearance: {
|
|
32
|
+
underlined: {};
|
|
33
|
+
pill: {
|
|
34
|
+
selectors: {
|
|
35
|
+
[x: string]: {
|
|
36
|
+
backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
active: {
|
|
42
|
+
true: {};
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
7
45
|
//# sourceMappingURL=Tab.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tab.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tab.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tab.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEpB,CAAC;AAEH,eAAO,MAAM,IAAI,QAIf,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;EAqDrB,CAAC"}
|
|
@@ -5,47 +5,125 @@ import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
|
5
5
|
__vanilla_filescope__.setFileScope("lib/components/Tabs/Tab.css.ts", "@autoguru/overdrive");
|
|
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
|
-
import { style
|
|
8
|
+
import { style } from '@vanilla-extract/css';
|
|
9
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
9
10
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
10
11
|
import { focusOutline } from "./../../styles/focusOutline.css.js";
|
|
11
12
|
const lineBottomHeight = '1px';
|
|
12
13
|
const size = '20px';
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
padding: `calc(${vars.space['3']} + ${lineBottomHeight}) ${vars.space['4']}`,
|
|
16
|
-
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s, background-color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
17
|
-
borderBottom: `calc(${lineBottomHeight} + ${lineBottomHeight}) solid transparent`,
|
|
14
|
+
export const styledTab = recipe({
|
|
15
|
+
base: {
|
|
18
16
|
flex: 'auto',
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s, background-color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
18
|
+
':focus-visible': _objectSpread({}, focusOutline),
|
|
19
|
+
selectors: {
|
|
20
|
+
'&:not([aria-selected=true]):hover': {
|
|
21
|
+
color: vars.colours.foreground.body
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
appearance: {
|
|
27
|
+
underlined: {
|
|
28
|
+
borderBottom: `calc(${lineBottomHeight} + ${lineBottomHeight}) solid transparent`,
|
|
29
|
+
padding: `calc(${vars.space['3']} + ${lineBottomHeight}) ${vars.space['4']}`,
|
|
30
|
+
':focus-visible': {
|
|
31
|
+
outlineOffset: '-1px'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
pill: {
|
|
35
|
+
borderRadius: vars.border.radius.pill,
|
|
36
|
+
color: vars.colours.foreground.body,
|
|
37
|
+
fontWeight: vars.typography.fontWeight.normal,
|
|
38
|
+
padding: `${vars.space['2']} ${vars.space['4']}`,
|
|
39
|
+
selectors: {
|
|
40
|
+
'&+&': {
|
|
41
|
+
marginLeft: vars.space['3']
|
|
42
|
+
},
|
|
43
|
+
'&:not([aria-selected=true]):hover': {
|
|
44
|
+
backgroundColor: vars.colours.gamut.gray200
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
active: {
|
|
50
|
+
true: {}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
compoundVariants: [{
|
|
54
|
+
variants: {
|
|
55
|
+
appearance: 'underlined',
|
|
56
|
+
active: true
|
|
21
57
|
},
|
|
22
|
-
|
|
23
|
-
color: vars.colours.intent.neutral.background.strong
|
|
58
|
+
style: {
|
|
59
|
+
color: vars.colours.intent.neutral.background.strong,
|
|
60
|
+
borderBottomColor: vars.colours.intent.neutral.background.strong
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
variants: {
|
|
64
|
+
appearance: 'pill',
|
|
65
|
+
active: true
|
|
24
66
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
};
|
|
67
|
+
style: {
|
|
68
|
+
backgroundColor: vars.colours.foreground.body,
|
|
69
|
+
color: vars.colours.background.body
|
|
70
|
+
}
|
|
71
|
+
}],
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
appearance: 'underlined'
|
|
74
|
+
}
|
|
75
|
+
}, "styledTab");
|
|
34
76
|
export const item = style({
|
|
35
77
|
display: 'inline-flex',
|
|
36
78
|
width: 'max-content',
|
|
37
79
|
verticalAlign: 'middle'
|
|
38
80
|
}, "item");
|
|
39
|
-
export const indication =
|
|
40
|
-
|
|
81
|
+
export const indication = recipe({
|
|
82
|
+
base: [{
|
|
41
83
|
backgroundColor: vars.colours.background.light,
|
|
84
|
+
borderRadius: vars.border.radius.pill,
|
|
85
|
+
display: 'inline-block',
|
|
42
86
|
minWidth: size,
|
|
43
87
|
height: size,
|
|
88
|
+
padding: `0 ${vars.space['1']}`,
|
|
44
89
|
lineHeight: size,
|
|
45
90
|
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s, backgroundColor 0.2s ${vars.animation.easing.decelerate} 0s`
|
|
91
|
+
}],
|
|
92
|
+
variants: {
|
|
93
|
+
appearance: {
|
|
94
|
+
underlined: {},
|
|
95
|
+
pill: {
|
|
96
|
+
selectors: {
|
|
97
|
+
[`${styledTab.classNames.base}:not([aria-selected=true]):hover &`]: {
|
|
98
|
+
backgroundColor: vars.colours.background.neutral
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
active: {
|
|
104
|
+
true: {}
|
|
105
|
+
}
|
|
46
106
|
},
|
|
47
|
-
|
|
48
|
-
|
|
107
|
+
compoundVariants: [{
|
|
108
|
+
variants: {
|
|
109
|
+
appearance: 'underlined',
|
|
110
|
+
active: true
|
|
111
|
+
},
|
|
112
|
+
style: {
|
|
113
|
+
backgroundColor: vars.colours.intent.neutral.background.strong
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
variants: {
|
|
117
|
+
appearance: 'pill',
|
|
118
|
+
active: true
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
backgroundColor: vars.colours.background.light,
|
|
122
|
+
color: vars.colours.foreground.body
|
|
123
|
+
}
|
|
124
|
+
}],
|
|
125
|
+
defaultVariants: {
|
|
126
|
+
appearance: 'underlined'
|
|
49
127
|
}
|
|
50
128
|
}, "indication");
|
|
51
129
|
__vanilla_filescope__.endFileScope();
|
|
@@ -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;AAUf,MAAM,WAAW,KAAK;IACrB,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,
|
|
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;AAUf,MAAM,WAAW,KAAK;IACrB,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,8EA+Ef,CAAC;AAIF,eAAe,GAAG,CAAC"}
|
|
@@ -21,28 +21,26 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
21
21
|
const tabsContext = useContext(TabsContext);
|
|
22
22
|
const tabListContext = useContext(TabListContext);
|
|
23
23
|
!(tabsContext !== null && tabListContext !== null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'This tab pane isnt nested beneath <Tabs /> or <TabPanes />>') : invariant(false) : void 0;
|
|
24
|
+
const {
|
|
25
|
+
appearance
|
|
26
|
+
} = tabsContext;
|
|
24
27
|
const isActive = tabsContext.activeIndex === tabListContext;
|
|
25
|
-
const indicationStyles = useBoxStyles({
|
|
26
|
-
display: 'inlineBlock',
|
|
27
|
-
paddingX: '1',
|
|
28
|
-
borderRadius: 'pill'
|
|
29
|
-
});
|
|
30
28
|
const controlsId = typeof incomingId === 'string' ? incomingId : `${tabsContext.id}-${tabListContext}-tab`;
|
|
31
29
|
const props = {
|
|
32
30
|
className: clsx(useBoxStyles({
|
|
33
31
|
is: typeof Component === 'string' ? Component : 'button',
|
|
34
32
|
display: 'inlineFlex',
|
|
35
33
|
justifyContent: 'center',
|
|
36
|
-
backgroundColour: 'transparent'
|
|
37
|
-
marginRight: '6'
|
|
34
|
+
backgroundColour: 'transparent'
|
|
38
35
|
}), useTextStyles({
|
|
39
36
|
noWrap: true,
|
|
40
37
|
size: '3',
|
|
41
38
|
fontWeight: 'bold',
|
|
42
39
|
colour: 'light'
|
|
43
|
-
}), styles.
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
}), styles.styledTab({
|
|
41
|
+
appearance,
|
|
42
|
+
active: isActive
|
|
43
|
+
})),
|
|
46
44
|
role: 'tab',
|
|
47
45
|
'aria-selected': isActive ? 'true' : 'false',
|
|
48
46
|
'data-controls': controlsId,
|
|
@@ -68,8 +66,9 @@ export const Tab = forwardRef((_ref, ref) => {
|
|
|
68
66
|
align: "center",
|
|
69
67
|
display: "block",
|
|
70
68
|
colour: isActive ? 'white' : 'dark',
|
|
71
|
-
className:
|
|
72
|
-
|
|
69
|
+
className: styles.indication({
|
|
70
|
+
appearance,
|
|
71
|
+
active: isActive
|
|
73
72
|
}),
|
|
74
73
|
children: indication
|
|
75
74
|
})]
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const styledTabList: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
appearance: {
|
|
3
|
+
underlined: {
|
|
4
|
+
boxShadow: `inset 0 -1px 0 0 var(--${string})` | `inset 0 -1px 0 0 var(--${string}, ${string})` | `inset 0 -1px 0 0 var(--${string}, ${number})`;
|
|
5
|
+
};
|
|
6
|
+
pill: {};
|
|
7
|
+
};
|
|
8
|
+
scroll: {
|
|
9
|
+
true: {
|
|
10
|
+
display: "grid";
|
|
11
|
+
gridTemplateColumns: "auto 1fr auto";
|
|
12
|
+
gridGap: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
2
16
|
export declare const listWrapperScroll: string;
|
|
3
17
|
//# sourceMappingURL=TabList.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabList.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabList.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabList.css.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;EAiBxB,CAAC;AAEH,eAAO,MAAM,iBAAiB,QAW5B,CAAC"}
|
|
@@ -2,18 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
4
|
__vanilla_filescope__.setFileScope("lib/components/Tabs/TabList.css.ts", "@autoguru/overdrive");
|
|
5
|
-
import { style
|
|
5
|
+
import { style } from '@vanilla-extract/css';
|
|
6
|
+
import { recipe } from '@vanilla-extract/recipes';
|
|
6
7
|
import { themeContractVars as vars } from "../../themes/theme.css.js";
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
export const styledTabList = recipe({
|
|
9
|
+
base: {},
|
|
10
|
+
variants: {
|
|
11
|
+
appearance: {
|
|
12
|
+
underlined: {
|
|
13
|
+
boxShadow: `inset 0 -1px 0 0 ${vars.border.colours.gray}`
|
|
14
|
+
},
|
|
15
|
+
pill: {}
|
|
16
|
+
},
|
|
17
|
+
scroll: {
|
|
18
|
+
true: {
|
|
19
|
+
display: 'grid',
|
|
20
|
+
gridTemplateColumns: 'auto 1fr auto',
|
|
21
|
+
gridGap: vars.space['2']
|
|
22
|
+
}
|
|
23
|
+
}
|
|
15
24
|
}
|
|
16
|
-
}, "
|
|
25
|
+
}, "styledTabList");
|
|
17
26
|
export const listWrapperScroll = style({
|
|
18
27
|
overflowX: 'auto',
|
|
19
28
|
overflowY: 'hidden',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TabList.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAEb,KAAK,iBAAiB,EAGtB,KAAK,SAAS,EAMd,MAAM,OAAO,CAAC;AAYf,MAAM,WAAW,KAAK;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAOD,eAAO,MAAM,cAAc,8BAAqC,CAAC;AAEjE,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,KAAK,CA+I5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
|