@autoguru/overdrive 4.8.1 → 4.9.1
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.css.js +1 -1
- package/dist/components/AutoSuggest/AutoSuggest.css.js +1 -1
- package/dist/components/AutoSuggest/AutoSuggest.d.ts +2 -1
- package/dist/components/AutoSuggest/AutoSuggest.d.ts.map +1 -1
- package/dist/components/AutoSuggest/stories.js +1 -1
- package/dist/components/Badge/Badge.css.d.ts +1 -1
- package/dist/components/Badge/Badge.css.js +1 -1
- package/dist/components/Box/useBoxStyles.css.d.ts.map +1 -1
- package/dist/components/Box/useBoxStyles.css.js +2 -1
- package/dist/components/BulletList/Bullet.css.js +1 -1
- package/dist/components/BulletList/BulletList.css.js +1 -1
- package/dist/components/BulletText/BulletText.css.js +1 -1
- package/dist/components/Button/Button.css.js +1 -1
- package/dist/components/CheckBox/CheckBox.css.js +1 -1
- package/dist/components/ColourInput/ColourInput.css.d.ts +6 -0
- package/dist/components/ColourInput/ColourInput.css.d.ts.map +1 -0
- package/dist/components/ColourInput/ColourInput.css.js +29 -0
- package/dist/components/ColourInput/ColourInput.d.ts +4 -0
- package/dist/components/ColourInput/ColourInput.d.ts.map +1 -0
- package/dist/components/ColourInput/ColourInput.js +25 -0
- package/dist/components/ColourInput/index.d.ts +2 -0
- package/dist/components/ColourInput/index.d.ts.map +1 -0
- package/dist/components/ColourInput/index.js +1 -0
- package/dist/components/ColourInput/stories.js +182 -0
- package/dist/components/Columns/Column.d.ts +1 -1
- package/dist/components/Columns/Columns.css.js +1 -1
- package/dist/components/Columns/Columns.d.ts +2 -2
- package/dist/components/Columns/Columns.d.ts.map +1 -1
- package/dist/components/DateInput/stories.js +1 -1
- package/dist/components/Flyout/stories.js +1 -1
- package/dist/components/Icon/Icon.css.js +1 -1
- package/dist/components/Image/ImageServerProvider.d.ts +1 -1
- package/dist/components/Image/ImageServerProvider.d.ts.map +1 -1
- package/dist/components/Image/ResponsiveImage.d.ts.map +1 -1
- package/dist/components/LinearProgressIndicator/LinearProgressIndicator.css.js +1 -1
- package/dist/components/LoadingBox/LoadingBox.css.js +1 -1
- package/dist/components/Meta/Meta.css.js +1 -1
- package/dist/components/Modal/Modal.css.js +1 -1
- package/dist/components/OrderedList/OrderedList.css.js +1 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.d.ts.map +1 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.js +3 -2
- package/dist/components/Pagination/Pagination.css.js +1 -1
- package/dist/components/Portal/Portal.d.ts +2 -2
- package/dist/components/Portal/Portal.d.ts.map +1 -1
- package/dist/components/Positioner/stories.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.css.js +1 -1
- package/dist/components/ProgressBarGroup/ProgressBarGroup.css.js +1 -1
- package/dist/components/ProgressSpinner/ProgressSpinner.css.js +1 -1
- package/dist/components/Radio/Radio.css.js +1 -1
- package/dist/components/Radio/RadioGroup.d.ts +1 -1
- package/dist/components/Radio/RadioGroup.d.ts.map +1 -1
- package/dist/components/Section/Section.css.js +1 -1
- package/dist/components/SelectInput/SelectInput.css.js +1 -1
- package/dist/components/SelectInput/SelectInput.d.ts +1 -2
- package/dist/components/SelectInput/SelectInput.d.ts.map +1 -1
- package/dist/components/SelectInput/stories.js +1 -1
- package/dist/components/Stack/Divider.css.js +1 -1
- package/dist/components/Stack/Stack.css.js +1 -1
- package/dist/components/StandardModal/StandardModal.css.js +1 -1
- package/dist/components/StarRating/StarRating.css.js +1 -1
- package/dist/components/Stepper/Stepper.css.js +1 -1
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Switch/Switch.css.js +1 -1
- package/dist/components/Table/TableCell.css.js +1 -1
- package/dist/components/Table/TableHeadCell.css.js +1 -1
- package/dist/components/Tabs/Tab.css.js +1 -1
- package/dist/components/Tabs/TabList.css.js +1 -1
- package/dist/components/Tabs/TabList.d.ts +1 -1
- package/dist/components/Tabs/TabList.d.ts.map +1 -1
- package/dist/components/Tabs/TabPanes.d.ts +1 -1
- package/dist/components/Tabs/TabPanes.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Text/useTextStyles.css.js +1 -1
- package/dist/components/TextAreaInput/stories.js +1 -1
- package/dist/components/TextInput/stories.js +1 -1
- package/dist/components/TextLink/TextLink.css.js +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -1
- package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.js +2 -2
- package/dist/components/Toaster/Toast.css.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/private/CheckableBase/CheckableBase.css.js +1 -1
- package/dist/components/private/InputBase/HintText.css.js +1 -1
- package/dist/components/private/InputBase/InputState.css.js +1 -1
- package/dist/components/private/InputBase/NotchedBase.css.js +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.css.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.css.js +2 -1
- package/dist/components/private/InputBase/withEnhancedInput.d.ts +4 -3
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -1
- package/dist/components/private/InputBase/withEnhancedInput.js +1 -1
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.css.js +1 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginLeft.css.js +1 -1
- package/dist/hooks/useNegativeMargin/useNegativeMarginTop.css.js +1 -1
- package/dist/themes/base/index.d.ts +260 -2
- package/dist/themes/base/index.d.ts.map +1 -1
- package/dist/themes/base/index.js +3 -4
- package/dist/themes/base/tokens.d.ts.map +1 -1
- package/dist/themes/base/vars.css.d.ts +1 -2
- package/dist/themes/base/vars.css.d.ts.map +1 -1
- package/dist/themes/base/vars.css.js +2 -1
- package/dist/themes/flat_red/index.d.ts +260 -2
- package/dist/themes/flat_red/index.d.ts.map +1 -1
- package/dist/themes/flat_red/index.js +2 -4
- package/dist/themes/flat_red/tokens.d.ts +1 -2
- package/dist/themes/flat_red/tokens.d.ts.map +1 -1
- package/dist/themes/flat_red/tokens.js +3 -86
- package/dist/themes/flat_red/vars.css.d.ts.map +1 -1
- package/dist/themes/flat_red/vars.css.js +2 -2
- package/dist/themes/makeTheme.d.ts +2 -6
- package/dist/themes/makeTheme.d.ts.map +1 -1
- package/dist/themes/makeTheme.js +1 -5
- package/dist/themes/theme.css.d.ts +262 -0
- package/dist/themes/theme.css.d.ts.map +1 -0
- package/dist/themes/theme.css.js +279 -0
- package/dist/themes/tokens.d.ts +1 -1
- package/dist/themes/tokens.d.ts.map +1 -1
- package/dist/utils/index.d.ts +6 -6
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/resolveResponsiveProps.d.ts +1 -1
- package/dist/utils/resolveResponsiveProps.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverdriveProvider.d.ts","sourceRoot":"","sources":["../../../lib/components/OverdriveProvider/OverdriveProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OverdriveProvider.d.ts","sourceRoot":"","sources":["../../../lib/components/OverdriveProvider/OverdriveProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,KAAM,SAAQ,cAAc,CAAC,OAAO,aAAa,CAAC;IAIlE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,KAAK,CA6BtD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
+
import { tokens } from '../../themes/base/tokens';
|
|
3
4
|
import { isBrowser } from '../../utils';
|
|
4
5
|
import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
|
|
5
|
-
export const OverdriveProvider = ({ noBodyLevelTheming = false, vars, themeClass,
|
|
6
|
+
export const OverdriveProvider = ({ noBodyLevelTheming = false, vars, themeClass, breakpoints, children, }) => {
|
|
6
7
|
useEffect(() => {
|
|
7
8
|
if (!isBrowser)
|
|
8
9
|
return;
|
|
@@ -16,6 +17,6 @@ export const OverdriveProvider = ({ noBodyLevelTheming = false, vars, themeClass
|
|
|
16
17
|
document.body.style.color = tokens.body.colour;
|
|
17
18
|
}
|
|
18
19
|
}, [vars]);
|
|
19
|
-
return (React.createElement(ThemeProvider, { vars: vars, themeClass: themeClass,
|
|
20
|
+
return (React.createElement(ThemeProvider, { vars: vars, themeClass: themeClass, breakpoints: breakpoints }, children));
|
|
20
21
|
};
|
|
21
22
|
export default OverdriveProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
const paginationBubbleSize = '36px';
|
|
4
4
|
export const disabled = style({
|
|
5
5
|
color: vars.colours.background.neutral,
|
|
@@ -5,8 +5,8 @@ export interface Props {
|
|
|
5
5
|
container?: Element;
|
|
6
6
|
noThemedWrapper?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare function Portal({ children, container, noThemedWrapper }: Props, ref: Ref<typeof container>): React.ReactPortal;
|
|
9
|
-
declare const _Portal: React.ForwardRefExoticComponent<Props & React.RefAttributes<Element>>;
|
|
8
|
+
declare function Portal({ children, container, noThemedWrapper }: Props, ref: Ref<typeof container>): React.ReactPortal | null;
|
|
9
|
+
declare const _Portal: React.ForwardRefExoticComponent<Props & React.RefAttributes<Element | undefined>>;
|
|
10
10
|
export { _Portal as Portal };
|
|
11
11
|
export default Portal;
|
|
12
12
|
//# sourceMappingURL=Portal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../lib/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAa,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,KAAK;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAID,iBAAS,MAAM,CACd,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,KAAK,EAC/C,GAAG,EAAE,GAAG,CAAC,OAAO,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../lib/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAa,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,KAAK;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AAID,iBAAS,MAAM,CACd,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,KAAK,EAC/C,GAAG,EAAE,GAAG,CAAC,OAAO,SAAS,CAAC,4BA2B1B;AAED,QAAA,MAAM,OAAO,mFAAqB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,CAAC;AAE7B,eAAe,MAAM,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
export const circle = styleVariants({
|
|
4
4
|
default: {
|
|
5
5
|
transition: `border-color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
@@ -12,7 +12,7 @@ interface RadioGroupContext {
|
|
|
12
12
|
value: string;
|
|
13
13
|
radioSelected?(value: string): void;
|
|
14
14
|
}
|
|
15
|
-
export declare const RadioContext: React.Context<RadioGroupContext>;
|
|
15
|
+
export declare const RadioContext: React.Context<RadioGroupContext | null>;
|
|
16
16
|
export declare const useRadioContext: () => RadioGroupContext;
|
|
17
17
|
export declare const RadioGroup: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
export default RadioGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../lib/components/Radio/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGN,SAAS,EAGT,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,UAAU,iBAAiB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IAEd,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../lib/components/Radio/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGN,SAAS,EAGT,MAAM,OAAO,CAAC;AAIf,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,UAAU,iBAAiB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IAEd,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,YAAY,yCAAgD,CAAC;AAE1E,eAAO,MAAM,eAAe,QAAO,iBACT,CAAC;AAE3B,eAAO,MAAM,UAAU,8EAuBtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
import { mapTokenToProperty } from '../../utils/mapTokenToProperty';
|
|
4
4
|
export const root = style({
|
|
5
5
|
margin: '0 auto',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
2
|
export declare const SelectInput: React.ForwardRefExoticComponent<{
|
|
4
|
-
children?: ReactNode[];
|
|
3
|
+
children?: React.ReactNode[] | undefined;
|
|
5
4
|
} & import("../private/InputBase/withEnhancedInput").EnhanceInputPrimitiveProps & import("../private/InputBase/withEnhancedInput").EventHandlers<HTMLSelectElement> & import("../private/InputBase/withEnhancedInput").ValidationProps & React.RefAttributes<HTMLSelectElement>>;
|
|
6
5
|
export default SelectInput;
|
|
7
6
|
//# sourceMappingURL=SelectInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../lib/components/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../lib/components/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,eAAO,MAAM,WAAW;;gRAqDvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
export const line = style({
|
|
4
4
|
height: '1px',
|
|
5
5
|
boxShadow: `inset 0 0 0 1px ${vars.colours.background.light}`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
import { mapTokenToProperty } from '../../utils/mapTokenToProperty';
|
|
4
4
|
export const child = {
|
|
5
5
|
spaces: styleVariants(mapTokenToProperty(vars.space, (value) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
import { responsiveStyle } from '../../utils/responsiveStyle';
|
|
4
4
|
export const container = style({
|
|
5
5
|
outline: '0',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
export const star = styleVariants({
|
|
4
4
|
default: {
|
|
5
5
|
color: vars.colours.intent.shine.foreground,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
export const disabled = style({ cursor: 'not-allowed' });
|
|
4
4
|
export const root = style({
|
|
5
5
|
width: 'max-content',
|
|
@@ -18,7 +18,7 @@ const Handle = ({ disabled, icon, label, onClick, }) => (React.createElement(Box
|
|
|
18
18
|
useTextStyles({ colour: 'white' }),
|
|
19
19
|
], "aria-label": label, padding: "none", borderRadius: "full", display: "flex", alignItems: "center", justifyContent: "center", disabled: disabled, tabIndex: -1, onClick: onClick },
|
|
20
20
|
React.createElement(Icon, { icon: icon, size: "small" })));
|
|
21
|
-
export const Stepper = ({ className = '', disabled: incomingDisabled = false, isFullWidth = false, step = 1, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER, value: incomingValue, format = (value) => value.toString(), onChange = () => void 0, }) => {
|
|
21
|
+
export const Stepper = ({ className = '', disabled: incomingDisabled = false, isFullWidth = false, step = 1, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER, value: incomingValue = 0, format = (value) => value.toString(), onChange = () => void 0, }) => {
|
|
22
22
|
const value = clamp(incomingValue, min, max);
|
|
23
23
|
const disabled = incomingDisabled || value === undefined || value === null;
|
|
24
24
|
const onDecrement = useCallback(() => onChange(takeStep({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
const handleSize = '24px';
|
|
4
4
|
const handleOffset = '2px';
|
|
5
5
|
const borderSize = '1px';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
export const sorterButton = style({ userSelect: 'text' });
|
|
4
4
|
export const text = style({
|
|
5
5
|
color: vars.typography.colour.muted,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
export const root = styleVariants({
|
|
4
4
|
default: {
|
|
5
5
|
boxShadow: `inset 0 -1px 0 0 ${vars.border.colours.gray}`,
|
|
@@ -6,7 +6,7 @@ export interface Props {
|
|
|
6
6
|
scrollable?: boolean;
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export declare const TabListContext: React.Context<number>;
|
|
9
|
+
export declare const TabListContext: React.Context<number | null>;
|
|
10
10
|
export declare const TabList: FunctionComponent<Props>;
|
|
11
11
|
export default TabList;
|
|
12
12
|
//# sourceMappingURL=TabList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIN,SAAS,EAKT,MAAM,OAAO,CAAC;AAWf,MAAM,WAAW,KAAK;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"TabList.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAIN,SAAS,EAKT,MAAM,OAAO,CAAC;AAWf,MAAM,WAAW,KAAK;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,8BAAqC,CAAC;AAEjE,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAuI5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -5,7 +5,7 @@ interface TabPanesContextValue {
|
|
|
5
5
|
paneIndex: number;
|
|
6
6
|
renderInactive: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const TabPanesContext: React.Context<TabPanesContextValue>;
|
|
8
|
+
export declare const TabPanesContext: React.Context<TabPanesContextValue | null>;
|
|
9
9
|
interface Props {
|
|
10
10
|
renderInactivePanes?: boolean;
|
|
11
11
|
children?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanes.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabPanes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAC;AAO3D,UAAU,oBAAoB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"TabPanes.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/TabPanes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAC;AAO3D,UAAU,oBAAoB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,4CAAmD,CAAC;AAEhF,UAAU,KAAK;IAEd,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CAAC,KAAK,CAgB7C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -6,7 +6,7 @@ interface TabsContextValue {
|
|
|
6
6
|
activeIndex: number;
|
|
7
7
|
onChange?: (index: number) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const TabsContext: React.Context<TabsContextValue>;
|
|
9
|
+
export declare const TabsContext: React.Context<TabsContextValue | null>;
|
|
10
10
|
export interface Props {
|
|
11
11
|
id?: string | null;
|
|
12
12
|
active: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,SAAS,EAAW,MAAM,OAAO,CAAC;AAI1D,UAAU,gBAAgB;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../lib/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,SAAS,EAAW,MAAM,OAAO,CAAC;AAI1D,UAAU,gBAAgB;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,wCAA+C,CAAC;AAExE,MAAM,WAAW,KAAK;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,IAAI,EAAE,iBAAiB,CAAC,KAAK,CA2BzC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
import { mapTokenToProperty } from '../../utils/mapTokenToProperty';
|
|
4
4
|
export const root = style({
|
|
5
5
|
selectors: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
export const root = style({
|
|
4
4
|
transitionDelay: '0s',
|
|
5
5
|
transitionTimingFunction: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../lib/components/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAE7E,OAAO,EAEN,iBAAiB,E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8 +4,8 @@ import { createContext, useContext, useMemo, } from 'react';
|
|
|
4
4
|
import { makeRuntimeTokens } from '../../themes/makeTheme';
|
|
5
5
|
const themeContext = createContext(null);
|
|
6
6
|
const runtimeTokensContext = createContext(null);
|
|
7
|
-
export const ThemeProvider = ({ vars,
|
|
8
|
-
React.createElement(runtimeTokensContext.Provider, { value: useMemo(() => makeRuntimeTokens(
|
|
7
|
+
export const ThemeProvider = ({ vars, themeClass, children, breakpoints, }) => (React.createElement(themeContext.Provider, { value: useMemo(() => ({ vars, themeClass }), [vars]) },
|
|
8
|
+
React.createElement(runtimeTokensContext.Provider, { value: useMemo(() => makeRuntimeTokens(breakpoints), []) }, children)));
|
|
9
9
|
export const useTheme = () => {
|
|
10
10
|
const theme = useContext(themeContext);
|
|
11
11
|
invariant(theme !== null, "You haven't provided an `OverdriveProvider`.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC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AW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../../themes/theme.css';
|
|
3
3
|
export const root = style({
|
|
4
4
|
cursor: 'pointer',
|
|
5
5
|
transition: `background-color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../../themes/theme.css';
|
|
3
3
|
export const hintText = style({
|
|
4
4
|
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
5
5
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../../themes/theme.css';
|
|
3
3
|
const activeColour = style({
|
|
4
4
|
color: vars.typography.colour.information,
|
|
5
5
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../../themes/theme.css';
|
|
3
3
|
export const root = style({
|
|
4
4
|
transition: `fill 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
5
5
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withEnhancedInput.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK;;CAqBjB,CAAC;AAIF,eAAO,MAAM,KAAK,4BAOhB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;CAe5B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"withEnhancedInput.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK;;CAqBjB,CAAC;AAIF,eAAO,MAAM,KAAK,4BAOhB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;CAe5B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;CAqD3B,CAAC;AAEF,eAAO,MAAM,QAAQ,QAKnB,CAAC;AAEH,eAAO,MAAM,UAAU,QAErB,CAAC;AACH,eAAO,MAAM,UAAU,QAErB,CAAC;AACH,eAAO,MAAM,QAAQ,oCAOnB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../../themes/theme.css';
|
|
3
3
|
export const input = {
|
|
4
4
|
itself: styleVariants({
|
|
5
5
|
root: {
|
|
@@ -54,6 +54,7 @@ export const inputItselfSize = {
|
|
|
54
54
|
fontSize: vars.typography.size['3'].fontSize,
|
|
55
55
|
lineHeight: vars.typography.size['3'].lineHeight,
|
|
56
56
|
padding: `${vars.space['2']}`,
|
|
57
|
+
minHeight: `calc(${vars.typography.size['3'].lineHeight} + (2* ${vars.space['2']}))`,
|
|
57
58
|
},
|
|
58
59
|
textarea: {
|
|
59
60
|
padding: `0 ${vars.space['2']} ${vars.space['2']}`,
|
|
@@ -50,11 +50,12 @@ export declare type WrappedComponentProps<IncomingProps, PrimitiveElementType> =
|
|
|
50
50
|
suffixed: boolean;
|
|
51
51
|
isLoading: boolean;
|
|
52
52
|
} & IncomingProps;
|
|
53
|
-
interface EnhancedInputConfigs {
|
|
53
|
+
interface EnhancedInputConfigs<ValueType = string> {
|
|
54
|
+
defaultValue?: ValueType;
|
|
54
55
|
withPrefixIcon?: boolean;
|
|
55
56
|
withSuffixIcon?: boolean;
|
|
56
|
-
primitiveType: 'textarea' | 'text' | 'number' | 'date' | 'select';
|
|
57
|
+
primitiveType: 'textarea' | 'text' | 'number' | 'date' | 'select' | 'color';
|
|
57
58
|
}
|
|
58
|
-
export declare const withEnhancedInput: <IncomingProps extends {} = {}, PrimitiveElementType extends HTMLElement = HTMLInputElement>(WrappingComponent: React.ComponentType<WrappedComponentProps<IncomingProps, PrimitiveElementType>>, { primitiveType, withPrefixIcon, withSuffixIcon, }?: EnhancedInputConfigs) => React.ForwardRefExoticComponent<React.PropsWithoutRef<EnhanceInputProps<IncomingProps, PrimitiveElementType>> & React.RefAttributes<PrimitiveElementType>>;
|
|
59
|
+
export declare const withEnhancedInput: <IncomingProps extends {} = {}, PrimitiveElementType extends HTMLElement = HTMLInputElement>(WrappingComponent: React.ComponentType<WrappedComponentProps<IncomingProps, PrimitiveElementType>>, { primitiveType, withPrefixIcon, withSuffixIcon, defaultValue, }?: EnhancedInputConfigs) => React.ForwardRefExoticComponent<React.PropsWithoutRef<EnhanceInputProps<IncomingProps, PrimitiveElementType>> & React.RefAttributes<PrimitiveElementType>>;
|
|
59
60
|
export {};
|
|
60
61
|
//# sourceMappingURL=withEnhancedInput.d.ts.map
|
|
@@ -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,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EAEjB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,GAAG,EAGH,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAGlD,MAAM,WAAW,aAAa,CAAC,oBAAoB;IAClD,QAAQ,CAAC,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,iBAAiB,CAAC,oBAAo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AAe,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACnD,KAAK,EAAE,IAAI,CACV,0BAA0B,EAC1B,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CACjD,GAAG;QACH,GAAG,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;KAC5C,CAAC;IACF,SAAS,CAAC,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACnB,GAAG,aAAa,CAAC;AAElB,UAAU,oBAAoB;
|
|
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,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EAEjB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,GAAG,EAGH,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAGlD,MAAM,WAAW,aAAa,CAAC,oBAAoB;IAClD,QAAQ,CAAC,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAClD,SAAS,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,CAAC,CAAC;IAClD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AAa,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;IACnD,KAAK,EAAE,IAAI,CACV,0BAA0B,EAC1B,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CACjD,GAAG;QACH,GAAG,EAAE,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;KAC5C,CAAC;IACF,SAAS,CAAC,EAAE,0BAA0B,CAAC,WAAW,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACnB,GAAG,aAAa,CAAC;AAElB,UAAU,oBAAoB,CAAC,SAAS,GAAG,MAAM;IAChD,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC5E;AAED,eAAO,MAAM,iBAAiB,sQAY1B,oBAAoB,+JAoPtB,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { HintText } from './HintText';
|
|
|
10
10
|
import * as inputStateStyles from './InputState.css';
|
|
11
11
|
import { NotchedBase } from './NotchedBase';
|
|
12
12
|
import * as styles from './withEnhancedInput.css';
|
|
13
|
-
export const withEnhancedInput = (WrappingComponent, { primitiveType = 'text', withPrefixIcon = true, withSuffixIcon = true, } = { primitiveType: 'text' }) => forwardRef(({ placeholder, name, id = name, hintText, disabled = false, className, isTouched, isValid, isLoading = false, notch = true, reserveHintSpace = false, size = 'medium', value: incomingValue = '', onChange: incomingOnChange, onReset, onMouseLeave, onMouseEnter, onBlur, onFocus, onKeyDown, prefixIcon, suffixIcon, wrapperRef, autoFocus, ...rest }, ref) => {
|
|
13
|
+
export const withEnhancedInput = (WrappingComponent, { primitiveType = 'text', withPrefixIcon = true, withSuffixIcon = true, defaultValue, } = { primitiveType: 'text', defaultValue: void 0 }) => forwardRef(({ placeholder, name, id = name, hintText, disabled = false, className, isTouched, isValid, isLoading = false, notch = true, reserveHintSpace = false, size = 'medium', value: incomingValue = defaultValue || '', onChange: incomingOnChange, onReset, onMouseLeave, onMouseEnter, onBlur, onFocus, onKeyDown, prefixIcon, suffixIcon, wrapperRef, autoFocus, ...rest }, ref) => {
|
|
14
14
|
invariant(!(prefixIcon && !withPrefixIcon), 'prefix icon is not supported for this component');
|
|
15
15
|
invariant(!(suffixIcon && !withSuffixIcon), 'suffix icon is not supported for this component');
|
|
16
16
|
const [value, onChange] = useInputControlledState(incomingValue, incomingOnChange);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
|
-
import { vars } from '../../themes/
|
|
2
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
3
3
|
import { makeResponsiveStyle } from '../../utils/responsiveProps.css';
|
|
4
4
|
export const grid = {
|
|
5
5
|
default: style({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { vars } from '../../themes/
|
|
1
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
2
2
|
import { makeResponsiveStyle } from '../../utils/responsiveProps.css';
|
|
3
3
|
export const negativeMarginLeft = makeResponsiveStyle(vars.space, (value) => ({
|
|
4
4
|
marginLeft: `calc(-1 * ${value})`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { vars } from '../../themes/
|
|
1
|
+
import { themeContractVars as vars } from '../../themes/theme.css';
|
|
2
2
|
import { makeResponsiveStyle } from '../../utils/responsiveProps.css';
|
|
3
3
|
export const negativeMarginTop = makeResponsiveStyle(vars.space, (value) => ({
|
|
4
4
|
marginTop: `calc(-1 * ${value})`,
|