@autoguru/overdrive 3.0.0-next.9 → 4.0.3
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/CHANGELOG.md +106 -0
- package/dist/components/AutoSuggest/AutoSuggest.css.js +1 -1
- package/dist/components/AutoSuggest/AutoSuggest.d.ts +29 -0
- package/dist/components/AutoSuggest/AutoSuggest.d.ts.map +1 -0
- package/dist/components/AutoSuggest/index.d.ts +3 -0
- package/dist/components/AutoSuggest/index.d.ts.map +1 -0
- package/dist/components/DateInput/DateInput.d.ts +3 -0
- package/dist/components/DateInput/DateInput.d.ts.map +1 -0
- package/dist/components/DateInput/index.d.ts +2 -0
- package/dist/components/DateInput/index.d.ts.map +1 -0
- package/dist/components/Meta/Meta.d.ts +10 -0
- package/dist/components/Meta/Meta.d.ts.map +1 -0
- package/dist/components/Meta/index.d.ts +2 -0
- package/dist/components/Meta/index.d.ts.map +1 -0
- package/dist/components/NumberInput/NumberInput.d.ts +7 -0
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/index.d.ts.map +1 -0
- package/dist/components/OverdriveProvider/OverdriveProvider.js +2 -0
- package/dist/components/Portal/Portal.js +5 -3
- package/dist/components/Positioner/Positioner.js +2 -2
- package/dist/components/ProgressSpinner/ProgressSpinner.css.js +2 -2
- package/dist/components/SelectInput/SelectInput.d.ts +6 -0
- package/dist/components/SelectInput/SelectInput.d.ts.map +1 -0
- package/dist/components/SelectInput/index.d.ts +2 -0
- package/dist/components/SelectInput/index.d.ts.map +1 -0
- package/dist/components/Tabs/Tab.js +1 -1
- package/dist/components/TextAreaInput/TextAreaInput.d.ts +3 -0
- package/dist/components/TextAreaInput/TextAreaInput.d.ts.map +1 -0
- package/dist/components/TextAreaInput/index.d.ts +2 -0
- package/dist/components/TextAreaInput/index.d.ts.map +1 -0
- package/dist/components/TextInput/TextInput.d.ts +3 -0
- package/dist/components/TextInput/TextInput.d.ts.map +1 -0
- package/dist/components/TextInput/index.d.ts +2 -0
- package/dist/components/TextInput/index.d.ts.map +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.js +3 -2
- package/dist/components/index.d.ts +52 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/private/InputBase/index.d.ts +2 -0
- package/dist/components/private/InputBase/index.d.ts.map +1 -0
- package/dist/components/private/InputBase/withEnhancedInput.css.d.ts +9 -0
- package/dist/components/private/InputBase/withEnhancedInput.css.d.ts.map +1 -0
- package/dist/components/private/InputBase/withEnhancedInput.css.js +46 -59
- package/dist/components/private/InputBase/withEnhancedInput.d.ts +57 -0
- package/dist/components/private/InputBase/withEnhancedInput.d.ts.map +1 -0
- package/dist/hooks/useAttachedBoxes/index.d.ts +2 -0
- package/dist/hooks/useAttachedBoxes/index.d.ts.map +1 -0
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts +18 -0
- package/dist/hooks/useAttachedBoxes/useAttachedBoxes.d.ts.map +1 -0
- package/dist/hooks/useMedia/index.d.ts +2 -0
- package/dist/hooks/useMedia/index.d.ts.map +1 -0
- package/dist/hooks/useMedia/useMedia.d.ts +3 -0
- package/dist/hooks/useMedia/useMedia.d.ts.map +1 -0
- package/dist/hooks/useMedia/useMedia.js +1 -1
- package/dist/hooks/useResponsiveValue/index.d.ts +2 -0
- package/dist/hooks/useResponsiveValue/index.d.ts.map +1 -0
- package/dist/hooks/useResponsiveValue/useResponsiveValue.d.ts +3 -0
- package/dist/hooks/useResponsiveValue/useResponsiveValue.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/themes/flat_red/tokens.js +6 -1
- package/dist/themes/makeTheme.js +10 -7
- package/package.json +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,111 @@
|
|
|
1
1
|
# @autoguru/overdrive
|
|
2
2
|
|
|
3
|
+
## 4.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7f65be1: TextArea: Fixed min height
|
|
8
|
+
|
|
9
|
+
## 4.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f7bfcdb: Tabs Get a more distinct colour for unselected tab labels
|
|
14
|
+
|
|
15
|
+
## 4.0.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- e2cebc8: Applies type fixes
|
|
20
|
+
|
|
21
|
+
## 4.0.0
|
|
22
|
+
|
|
23
|
+
### Major Changes
|
|
24
|
+
|
|
25
|
+
- dd12f20: Migrates Overdrive to vanilla extract
|
|
26
|
+
|
|
27
|
+
## 3.0.0
|
|
28
|
+
|
|
29
|
+
### Major Changes
|
|
30
|
+
|
|
31
|
+
- eb36462: Overdrive: Migrates styling away from treat to vanilla extract
|
|
32
|
+
- aaac596: Migrate to vanilla extract
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- 4324095: OverdriveProvider: Imports reset styles
|
|
37
|
+
- 4324095: OverdriveProvider: Imports global fonts
|
|
38
|
+
- 2623174: fixes list of files with side effects
|
|
39
|
+
- 03ca973: Autosuggest: Replaces deprecated fill-available with stretch
|
|
40
|
+
- 56edcaf: Overdrive: Gets file extentions for imports
|
|
41
|
+
- 2fbe7bf: OverdriveProvider: Accepts runtime breakpoint token
|
|
42
|
+
- 4324095: Compiles released package to JS
|
|
43
|
+
- 4858d44: Compiles Overdrive package into JS
|
|
44
|
+
- 36736c3: useMedia
|
|
45
|
+
- ec17939: Adds babel react preset
|
|
46
|
+
- 965c7ed: Portal: Makes theme wrapping optional
|
|
47
|
+
- 19d14a1: Multiple theming fixes
|
|
48
|
+
- aa5d74b: Portal: Removes memo
|
|
49
|
+
- 4324095: Reverts compiling to js
|
|
50
|
+
- 713b1a3: Oderdrive: Fixed type generation for released package
|
|
51
|
+
- 4b3b1ec: Adds inhouse babel config
|
|
52
|
+
- ca4e971: Portal: Fixes unwrapped version
|
|
53
|
+
- 158d3bb: Accept custom runtime breakpoint tokens
|
|
54
|
+
|
|
55
|
+
## 3.0.0-next.18
|
|
56
|
+
|
|
57
|
+
### Patch Changes
|
|
58
|
+
|
|
59
|
+
- Fixes type generation for released package
|
|
60
|
+
|
|
61
|
+
## 3.0.0-next.17
|
|
62
|
+
|
|
63
|
+
### Patch Changes
|
|
64
|
+
|
|
65
|
+
- useMedia
|
|
66
|
+
|
|
67
|
+
## 3.0.0-next.16
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Portal: Removes memo
|
|
72
|
+
|
|
73
|
+
## 3.0.0-next.15
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Portal: Fixes unwrapped version
|
|
78
|
+
|
|
79
|
+
## 3.0.0-next.14
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- Portal: Makes theme wrapping optional
|
|
84
|
+
|
|
85
|
+
## 3.0.0-next.13
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- OverdriveProvider: Accepts runtime breakpoint token
|
|
90
|
+
|
|
91
|
+
## 3.0.0-next.12
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- Accept custom runtime breakpoint tokens
|
|
96
|
+
|
|
97
|
+
## 3.0.0-next.11
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- Autosuggest: Replaces deprecated fill-available with stretch
|
|
102
|
+
|
|
103
|
+
## 3.0.0-next.10
|
|
104
|
+
|
|
105
|
+
### Patch Changes
|
|
106
|
+
|
|
107
|
+
- fixes list of files with sideeffects
|
|
108
|
+
|
|
3
109
|
## 3.0.0-next.9
|
|
4
110
|
|
|
5
111
|
### Patch Changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IconType } from '@autoguru/icons';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactElement, Ref } from 'react';
|
|
3
|
+
import { TextInput } from '../TextInput';
|
|
4
|
+
export interface AutoSuggestValue<PayloadType> {
|
|
5
|
+
text: string;
|
|
6
|
+
payload: PayloadType | null | undefined;
|
|
7
|
+
skip?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare type AutoSuggestItemRenderer<PayloadType> = (props: {
|
|
10
|
+
value: AutoSuggestValue<PayloadType>;
|
|
11
|
+
highlight: boolean;
|
|
12
|
+
suggestions: Array<AutoSuggestValue<PayloadType>>;
|
|
13
|
+
}) => ReactElement;
|
|
14
|
+
declare type Suggestions<PayloadType> = Array<AutoSuggestValue<PayloadType>>;
|
|
15
|
+
export interface Props<PayloadType> extends Omit<ComponentPropsWithoutRef<typeof TextInput>, 'onChange' | 'value' | 'type' | 'suffixIcon'> {
|
|
16
|
+
autoFocus?: boolean;
|
|
17
|
+
autoWidth?: boolean;
|
|
18
|
+
inlineOptions?: boolean;
|
|
19
|
+
fieldIcon?: IconType;
|
|
20
|
+
value: AutoSuggestValue<PayloadType> | null;
|
|
21
|
+
suggestions: Suggestions<PayloadType>;
|
|
22
|
+
itemRenderer?: AutoSuggestItemRenderer<PayloadType>;
|
|
23
|
+
onChange?(value: AutoSuggestValue<PayloadType>): void;
|
|
24
|
+
}
|
|
25
|
+
export declare const AutoSuggest: <PayloadType extends unknown>(p: Props<PayloadType> & {
|
|
26
|
+
ref?: Ref<HTMLInputElement>;
|
|
27
|
+
}) => ReactElement;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=AutoSuggest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoSuggest.d.ts","sourceRoot":"","sources":["../../../lib/components/AutoSuggest/AutoSuggest.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIvE,OAAO,EACN,wBAAwB,EAIxB,YAAY,EAEZ,GAAG,EAOH,MAAM,OAAO,CAAC;AAWf,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC,MAAM,WAAW,gBAAgB,CAAC,WAAW;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;AAED,oBAAY,uBAAuB,CAAC,WAAW,IAAI,CAAC,KAAK,EAAE;IAC1D,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;CAClD,KAAK,YAAY,CAAC;AAiCnB,aAAK,WAAW,CAAC,WAAW,IAAI,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;AAErE,MAAM,WAAW,KAAK,CAAC,WAAW,CACjC,SAAQ,IAAI,CACX,wBAAwB,CAAC,OAAO,SAAS,CAAC,EAC1C,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,CAC5C;IACD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IAC5C,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAEtC,YAAY,CAAC,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAEpD,QAAQ,CAAC,CAAC,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;CACtD;AAwGD,eAAO,MAAM,WAAW;UAyES,IAAI,gBAAgB,CAAC;MACjD,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/AutoSuggest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const DateInput: React.ForwardRefExoticComponent<Partial<Pick<HTMLInputElement, "min" | "max">> & import("../private/InputBase/withEnhancedInput").EnhanceInputPrimitiveProps & import("../private/InputBase/withEnhancedInput").EventHandlers<HTMLInputElement> & import("../private/InputBase/withEnhancedInput").ValidationProps & React.RefAttributes<HTMLInputElement>>;
|
|
3
|
+
//# sourceMappingURL=DateInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../lib/components/DateInput/DateInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,SAAS,6VA+BrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/DateInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconType } from '@autoguru/icons';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
import * as styles from './Meta.css';
|
|
4
|
+
export interface Props {
|
|
5
|
+
icon: IconType;
|
|
6
|
+
label: string;
|
|
7
|
+
variant?: keyof typeof styles.variant;
|
|
8
|
+
}
|
|
9
|
+
export declare const Meta: FunctionComponent<Props>;
|
|
10
|
+
//# sourceMappingURL=Meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Meta.d.ts","sourceRoot":"","sources":["../../../lib/components/Meta/Meta.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM1C,OAAO,KAAK,MAAM,MAAM,YAAY,CAAC;AAErC,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC;CACtC;AAED,eAAO,MAAM,IAAI,EAAE,iBAAiB,CAAC,KAAK,CASzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/Meta/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface Props extends Partial<Pick<HTMLInputElement, 'min' | 'max' | 'step'>> {
|
|
3
|
+
preventMouseWheel?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const NumberInput: React.ForwardRefExoticComponent<Props & import("../private/InputBase/withEnhancedInput").EnhanceInputPrimitiveProps & import("../private/InputBase/withEnhancedInput").EventHandlers<HTMLInputElement> & import("../private/InputBase/withEnhancedInput").ValidationProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=NumberInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,UAAU,KACT,SAAQ,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC;IAC/D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,oTA0EvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/NumberInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -11,6 +11,7 @@ export const OverdriveProvider = _ref => {
|
|
|
11
11
|
vars,
|
|
12
12
|
themeClass,
|
|
13
13
|
tokens,
|
|
14
|
+
breakpoints,
|
|
14
15
|
children
|
|
15
16
|
} = _ref;
|
|
16
17
|
useEffect(() => {
|
|
@@ -29,6 +30,7 @@ export const OverdriveProvider = _ref => {
|
|
|
29
30
|
vars: vars,
|
|
30
31
|
themeClass: themeClass,
|
|
31
32
|
tokens: tokens,
|
|
33
|
+
breakpoints: breakpoints,
|
|
32
34
|
children: children
|
|
33
35
|
});
|
|
34
36
|
};
|
|
@@ -12,7 +12,8 @@ function Portal(_ref, ref) {
|
|
|
12
12
|
|
|
13
13
|
let {
|
|
14
14
|
children,
|
|
15
|
-
container
|
|
15
|
+
container,
|
|
16
|
+
noThemedWrapper
|
|
16
17
|
} = _ref;
|
|
17
18
|
const themeClass = (_useTheme = useTheme()) === null || _useTheme === void 0 ? void 0 : _useTheme.themeClass;
|
|
18
19
|
const [mountNode, setMountNode] = useState(null);
|
|
@@ -28,10 +29,11 @@ function Portal(_ref, ref) {
|
|
|
28
29
|
void setRef(ref, null);
|
|
29
30
|
};
|
|
30
31
|
}, [ref, mountNode]);
|
|
31
|
-
|
|
32
|
+
if (!mountNode) return null;
|
|
33
|
+
return noThemedWrapper ? createPortal(children, mountNode) : createPortal(_jsx("div", {
|
|
32
34
|
className: themeClass,
|
|
33
35
|
children: children
|
|
34
|
-
}), mountNode)
|
|
36
|
+
}), mountNode);
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
const _Portal = forwardRef(Portal);
|
|
@@ -9,6 +9,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
9
|
|
|
10
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
11
11
|
|
|
12
|
+
import { flip, offset, popperGenerator, preventOverflow } from '@popperjs/core';
|
|
13
|
+
import { defaultModifiers } from '@popperjs/core/lib/popper';
|
|
12
14
|
import * as React from 'react';
|
|
13
15
|
import { useCallback, useEffect, useRef } from 'react';
|
|
14
16
|
import { isBrowser, setRef } from "../../utils/index.js";
|
|
@@ -16,8 +18,6 @@ import { Box } from "../Box/index.js";
|
|
|
16
18
|
import { Portal } from "../Portal/index.js";
|
|
17
19
|
import * as styles from "./Positioner.css.js";
|
|
18
20
|
import { EAlignment } from "./alignment.js";
|
|
19
|
-
import { flip, offset, popperGenerator, preventOverflow } from '@popperjs/core';
|
|
20
|
-
import { defaultModifiers } from '@popperjs/core/lib/popper';
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
export { EAlignment } from "./alignment.js";
|
|
23
23
|
const createPopper = popperGenerator({
|
|
@@ -12,11 +12,11 @@ const spinAnim = keyframes({
|
|
|
12
12
|
}
|
|
13
13
|
}, "spinAnim");
|
|
14
14
|
export const circular = style({
|
|
15
|
+
animationName: spinAnim,
|
|
15
16
|
transformOrigin: 'center center',
|
|
16
17
|
animationDuration: '2s',
|
|
17
18
|
animationTimingFunction: 'linear',
|
|
18
|
-
animationIterationCount: 'infinite'
|
|
19
|
-
animationName: spinAnim
|
|
19
|
+
animationIterationCount: 'infinite'
|
|
20
20
|
}, "circular");
|
|
21
21
|
const stokeAnim = keyframes({
|
|
22
22
|
'0%': {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare const SelectInput: React.ForwardRefExoticComponent<{
|
|
4
|
+
children: ReactNode[];
|
|
5
|
+
} & import("../private/InputBase/withEnhancedInput").EnhanceInputPrimitiveProps & import("../private/InputBase/withEnhancedInput").EventHandlers<HTMLSelectElement> & import("../private/InputBase/withEnhancedInput").ValidationProps & React.RefAttributes<HTMLSelectElement>>;
|
|
6
|
+
//# sourceMappingURL=SelectInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectInput.d.ts","sourceRoot":"","sources":["../../../lib/components/SelectInput/SelectInput.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQlC,eAAO,MAAM,WAAW;cAEZ,SAAS,EAAE;gRAgDtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/SelectInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const TextAreaInput: React.ForwardRefExoticComponent<import("../private/InputBase/withEnhancedInput").EnhanceInputPrimitiveProps & import("../private/InputBase/withEnhancedInput").EventHandlers<HTMLTextAreaElement> & import("../private/InputBase/withEnhancedInput").ValidationProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
3
|
+
//# sourceMappingURL=TextAreaInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextAreaInput.d.ts","sourceRoot":"","sources":["../../../lib/components/TextAreaInput/TextAreaInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,aAAa,kTAuBzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/TextAreaInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const TextInput: React.ForwardRefExoticComponent<Partial<Pick<HTMLInputElement, "type">> & import("../private/InputBase/withEnhancedInput").EnhanceInputPrimitiveProps & import("../private/InputBase/withEnhancedInput").EventHandlers<HTMLInputElement> & import("../private/InputBase/withEnhancedInput").ValidationProps & React.RefAttributes<HTMLInputElement>>;
|
|
3
|
+
//# sourceMappingURL=TextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../lib/components/TextInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,SAAS,sVAwBrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/components/TextInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -12,7 +12,8 @@ export const ThemeProvider = _ref => {
|
|
|
12
12
|
vars,
|
|
13
13
|
tokens,
|
|
14
14
|
themeClass,
|
|
15
|
-
children
|
|
15
|
+
children,
|
|
16
|
+
breakpoints
|
|
16
17
|
} = _ref;
|
|
17
18
|
return _jsx(themeContext.Provider, {
|
|
18
19
|
value: useMemo(() => ({
|
|
@@ -20,7 +21,7 @@ export const ThemeProvider = _ref => {
|
|
|
20
21
|
themeClass
|
|
21
22
|
}), [vars, tokens]),
|
|
22
23
|
children: _jsx(runtimeTokensContext.Provider, {
|
|
23
|
-
value: useMemo(() => makeRuntimeTokens(tokens), [tokens]),
|
|
24
|
+
value: useMemo(() => makeRuntimeTokens(tokens, breakpoints), [tokens]),
|
|
24
25
|
children: children
|
|
25
26
|
})
|
|
26
27
|
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export * from './OverdriveProvider';
|
|
2
|
+
export * from './ThemeProvider';
|
|
3
|
+
export * from './Actions';
|
|
4
|
+
export * from './Alert';
|
|
5
|
+
export * from './Anchor';
|
|
6
|
+
export * from './AutoSuggest';
|
|
7
|
+
export * from './Badge';
|
|
8
|
+
export * from './Box';
|
|
9
|
+
export * from './BulletList';
|
|
10
|
+
export * from './BulletText';
|
|
11
|
+
export * from './Button';
|
|
12
|
+
export * from './CheckBox';
|
|
13
|
+
export * from './Columns';
|
|
14
|
+
export * from './DateInput';
|
|
15
|
+
export * from './Flyout';
|
|
16
|
+
export * from './Heading';
|
|
17
|
+
export * from './Icon';
|
|
18
|
+
export * from './Inline';
|
|
19
|
+
export * from './LinearProgressIndicator';
|
|
20
|
+
export * from './LoadingBox';
|
|
21
|
+
export * from './Meta';
|
|
22
|
+
export * from './Modal';
|
|
23
|
+
export * from './NumberInput';
|
|
24
|
+
export * from './OrderedList';
|
|
25
|
+
export * from './OutsideClick';
|
|
26
|
+
export * from './Pagination';
|
|
27
|
+
export * from './Portal';
|
|
28
|
+
export * from './Positioner';
|
|
29
|
+
export * from './ProgressBar';
|
|
30
|
+
export * from './ProgressBarGroup';
|
|
31
|
+
export * from './ProgressSpinner';
|
|
32
|
+
export * from './Radio';
|
|
33
|
+
export * from './Section';
|
|
34
|
+
export * from './SelectInput';
|
|
35
|
+
export * from './SimplePagination';
|
|
36
|
+
export * from './Stack';
|
|
37
|
+
export * from './StandardModal';
|
|
38
|
+
export * from './StarRating';
|
|
39
|
+
export * from './Stepper';
|
|
40
|
+
export * from './Switch';
|
|
41
|
+
export * from './Table';
|
|
42
|
+
export * from './Tabs';
|
|
43
|
+
export * from './Text';
|
|
44
|
+
export * from './TextAreaInput';
|
|
45
|
+
export * from './TextContainer';
|
|
46
|
+
export * from './TextInput';
|
|
47
|
+
export * from './TextLink';
|
|
48
|
+
export * from './Toaster';
|
|
49
|
+
export * from './Tooltip';
|
|
50
|
+
export * from './VisuallyHidden';
|
|
51
|
+
export * from './MinimalModal';
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const icon: {
|
|
2
|
+
prefix: string[];
|
|
3
|
+
suffix: string[];
|
|
4
|
+
};
|
|
5
|
+
export declare const input: {
|
|
6
|
+
itself: Record<"root" | "prefixed" | "suffixed", string>;
|
|
7
|
+
};
|
|
8
|
+
export declare const types: Record<"textarea", string>;
|
|
9
|
+
//# sourceMappingURL=withEnhancedInput.css.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withEnhancedInput.css.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.css.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,IAAI;;;CAGhB,CAAC;AAEF,eAAO,MAAM,KAAK;;CA+BjB,CAAC;AAIF,eAAO,MAAM,KAAK,4BAOhB,CAAC"}
|
|
@@ -1,66 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import * as __vanilla_filescope__ from '@vanilla-extract/css/fileScope';
|
|
4
|
-
|
|
5
|
-
__vanilla_filescope__.setFileScope("lib/components/private/InputBase/withEnhancedInput.css.ts", "@autoguru/overdrive");
|
|
6
|
-
|
|
7
1
|
import { style, styleVariants } from '@vanilla-extract/css';
|
|
8
|
-
import { vars } from
|
|
2
|
+
import { vars } from '../../../themes/base/vars.css';
|
|
9
3
|
const iconRoot = style({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
4
|
+
top: '50%',
|
|
5
|
+
transform: 'translate3d(0, -50%, 0)',
|
|
6
|
+
transition: `color 0.2s ${vars.animation.easing.decelerate} 0s`,
|
|
7
|
+
margin: `0 calc(${vars.space['3']} - 1px)`,
|
|
8
|
+
});
|
|
15
9
|
export const icon = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}, "icon_prefix")],
|
|
19
|
-
suffix: [iconRoot, style({
|
|
20
|
-
right: 0
|
|
21
|
-
}, "icon_suffix")]
|
|
10
|
+
prefix: [iconRoot, style({ left: 0 })],
|
|
11
|
+
suffix: [iconRoot, style({ right: 0 })],
|
|
22
12
|
};
|
|
23
13
|
export const input = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
itself: styleVariants({
|
|
15
|
+
root: {
|
|
16
|
+
zIndex: 1,
|
|
17
|
+
alignSelf: 'flex-end',
|
|
18
|
+
background: 'transparent',
|
|
19
|
+
outline: 'none',
|
|
20
|
+
fontSize: vars.typography.size['4'].fontSize,
|
|
21
|
+
lineHeight: 1,
|
|
22
|
+
height: vars.space['8'],
|
|
23
|
+
padding: `calc(((${vars.space['8']} - ${vars.typography.size['4'].fontSize}) / 2) - 3px) calc(${vars.space['4']} - 1px)`,
|
|
24
|
+
selectors: {
|
|
25
|
+
'&[disabled]': {
|
|
26
|
+
color: vars.typography.colour.muted,
|
|
27
|
+
cursor: 'not-allowed',
|
|
28
|
+
},
|
|
29
|
+
'&::placeholder': {
|
|
30
|
+
fontSize: vars.typography.size['4'].fontSize,
|
|
31
|
+
lineHeight: vars.typography.size['4'].lineHeight,
|
|
32
|
+
color: vars.typography.colour.muted,
|
|
33
|
+
opacity: 1,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
38
36
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
prefixed: {
|
|
48
|
-
paddingLeft: "calc((".concat(vars.space['3'], " - 1px) + (").concat(vars.space['4'], " - 1px) + ").concat(vars.space[4], ")")
|
|
49
|
-
},
|
|
50
|
-
suffixed: {
|
|
51
|
-
paddingRight: "calc((".concat(vars.space['3'], " - 1px) + (").concat(vars.space['4'], " - 1px) + ").concat(vars.space[4], ")")
|
|
52
|
-
}
|
|
53
|
-
}, "input_itself")
|
|
54
|
-
};
|
|
55
|
-
const textAreaHeight = "calc((".concat(vars.space['8'], " * 2.5))");
|
|
56
|
-
const topSpacing = "calc(((".concat(vars.space['8'], " - ").concat(vars.typography.size['4'].fontSize, ") / 2) - 3px)");
|
|
57
|
-
export const types = {
|
|
58
|
-
textarea: {
|
|
59
|
-
height: "calc(".concat(textAreaHeight, " - ").concat(topSpacing, ")"),
|
|
60
|
-
minHeight: "calc(".concat(textAreaHeight, " - ").concat(topSpacing, ")"),
|
|
61
|
-
lineHeight: 1.2,
|
|
62
|
-
resize: 'vertical'
|
|
63
|
-
}
|
|
37
|
+
prefixed: {
|
|
38
|
+
paddingLeft: `calc((${vars.space['3']} - 1px) + (${vars.space['4']} - 1px) + ${vars.space[4]})`,
|
|
39
|
+
},
|
|
40
|
+
suffixed: {
|
|
41
|
+
paddingRight: `calc((${vars.space['3']} - 1px) + (${vars.space['4']} - 1px) + ${vars.space[4]})`,
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
64
44
|
};
|
|
65
|
-
|
|
66
|
-
|
|
45
|
+
const textAreaHeight = '107px';
|
|
46
|
+
export const types = styleVariants({
|
|
47
|
+
textarea: {
|
|
48
|
+
height: textAreaHeight,
|
|
49
|
+
minHeight: textAreaHeight,
|
|
50
|
+
lineHeight: 1.2,
|
|
51
|
+
resize: 'vertical',
|
|
52
|
+
},
|
|
53
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IconType } from '@autoguru/icons';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { AriaAttributes, ChangeEventHandler, ComponentType, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, MutableRefObject, ReactNode, Ref } from 'react';
|
|
4
|
+
export interface EventHandlers<PrimitiveElementType> {
|
|
5
|
+
onChange?: ChangeEventHandler<PrimitiveElementType>;
|
|
6
|
+
onBlur?: FocusEventHandler<PrimitiveElementType>;
|
|
7
|
+
onFocus?: FocusEventHandler<PrimitiveElementType>;
|
|
8
|
+
onKeyDown?: KeyboardEventHandler<PrimitiveElementType>;
|
|
9
|
+
onClick?: MouseEventHandler<PrimitiveElementType>;
|
|
10
|
+
onMouseEnter?: MouseEventHandler<PrimitiveElementType>;
|
|
11
|
+
onMouseLeave?: MouseEventHandler<PrimitiveElementType>;
|
|
12
|
+
onReset?(): void;
|
|
13
|
+
}
|
|
14
|
+
export interface EnhanceInputPrimitiveProps extends AriaAttributes {
|
|
15
|
+
name: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
id?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
value?: string;
|
|
20
|
+
hintText?: ReactNode;
|
|
21
|
+
autoFocus?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
notch?: boolean;
|
|
24
|
+
reserveHintSpace?: boolean;
|
|
25
|
+
fieldIcon?: IconType;
|
|
26
|
+
prefixIcon?: IconType;
|
|
27
|
+
suffixIcon?: IconType;
|
|
28
|
+
wrapperRef?: Ref<HTMLDivElement>;
|
|
29
|
+
isLoading?: boolean;
|
|
30
|
+
isFocused?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface ValidationProps {
|
|
33
|
+
isTouched?: boolean;
|
|
34
|
+
isValid?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare type EnhanceInputProps<IncomingProps, PrimitiveElementType> = IncomingProps & EnhanceInputPrimitiveProps & EventHandlers<PrimitiveElementType> & ValidationProps;
|
|
37
|
+
export declare type WrappedComponentProps<IncomingProps, PrimitiveElementType> = {
|
|
38
|
+
validation: ValidationProps;
|
|
39
|
+
eventHandlers: EventHandlers<PrimitiveElementType>;
|
|
40
|
+
field: Omit<EnhanceInputPrimitiveProps, 'placeholder' | 'hintText' | 'fieldIcon'> & {
|
|
41
|
+
ref: MutableRefObject<PrimitiveElementType>;
|
|
42
|
+
};
|
|
43
|
+
fieldIcon?: EnhanceInputPrimitiveProps['fieldIcon'];
|
|
44
|
+
isFocused?: boolean;
|
|
45
|
+
className?: boolean;
|
|
46
|
+
prefixed: boolean;
|
|
47
|
+
suffixed: boolean;
|
|
48
|
+
isLoading: boolean;
|
|
49
|
+
} & IncomingProps;
|
|
50
|
+
interface EnhancedInputConfigs {
|
|
51
|
+
withPrefixIcon?: boolean;
|
|
52
|
+
withSuffixIcon?: boolean;
|
|
53
|
+
primitiveType: 'textarea' | 'text' | 'number' | 'date' | 'select';
|
|
54
|
+
}
|
|
55
|
+
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>>;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=withEnhancedInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withEnhancedInput.d.ts","sourceRoot":"","sources":["../../../../lib/components/private/InputBase/withEnhancedInput.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useAttachedBoxes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps, FunctionComponent } from 'react';
|
|
2
|
+
import { Box } from '../../components';
|
|
3
|
+
import { ResponsiveProp } from '../../utils/responsiveProps.css';
|
|
4
|
+
import * as styles from './useAttachedBoxes.css';
|
|
5
|
+
interface Props extends Pick<ComponentProps<typeof Box>, 'backgroundColour'> {
|
|
6
|
+
count: number;
|
|
7
|
+
columnCount: ResponsiveProp<number>;
|
|
8
|
+
gap?: ResponsiveProp<keyof typeof styles.grid.gaps>;
|
|
9
|
+
}
|
|
10
|
+
declare type AttachedBoxProps = Omit<ComponentProps<typeof Box>, 'borderRadius'>;
|
|
11
|
+
declare type Returns = [
|
|
12
|
+
boxes: FunctionComponent<AttachedBoxProps>[],
|
|
13
|
+
wrapperCls: string,
|
|
14
|
+
style: ComponentProps<typeof Box>['style']
|
|
15
|
+
];
|
|
16
|
+
export declare const useAttachedBoxes: ({ count, columnCount: incomingColumnCount, gap, backgroundColour, }: Props) => Returns;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useAttachedBoxes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttachedBoxes.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useAttachedBoxes/useAttachedBoxes.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAKvC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAEjD,UAAU,KAAM,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,kBAAkB,CAAC;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,aAAK,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,cAAc,CAAC,CAAC;AAiBzE,aAAK,OAAO,GAAG;IACd,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,EAAE;IAC5C,UAAU,EAAE,MAAM;IAClB,KAAK,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;CAC1C,CAAC;AACF,eAAO,MAAM,gBAAgB,wEAK1B,KAAK,YA0DP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useMedia/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMedia.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useMedia/useMedia.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,eAAO,MAAM,QAAQ,YACX,cAAc,MAAM,WAAW,CAAC,6BAEvC,SAAS,OAAO,EA2ClB,CAAC"}
|
|
@@ -10,7 +10,7 @@ export const useMedia = function useMedia(queries) {
|
|
|
10
10
|
breakpoints
|
|
11
11
|
} = useRuntimeTokens();
|
|
12
12
|
if (!isBrowser) return queries.map(() => fallbackCase);
|
|
13
|
-
const getQueries = useCallback(() => queries.map(media => "(min-width: ".concat(breakpoints[media], "
|
|
13
|
+
const getQueries = useCallback(() => queries.map(media => "(min-width: ".concat(breakpoints[media], ")")), [breakpoints]);
|
|
14
14
|
const matchesInit = useMemo(() => getQueries().map(query => window.matchMedia(query).matches), [getQueries]);
|
|
15
15
|
const [matches, setMatches] = useState(matchesInit);
|
|
16
16
|
useLayoutEffect(() => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useResponsiveValue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResponsiveValue.d.ts","sourceRoot":"","sources":["../../../lib/hooks/useResponsiveValue/useResponsiveValue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,EACrE,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,EAClC,YAAY,UAAQ,GAClB,CAAC,CAYH"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './components/index';
|
|
2
|
+
export { useMedia } from './hooks/useMedia/useMedia';
|
|
3
|
+
export { useResponsiveValue } from './hooks/useResponsiveValue/useResponsiveValue';
|
|
4
|
+
export { useAttachedBoxes } from './hooks/useAttachedBoxes/useAttachedBoxes';
|
|
5
|
+
export { useId, arrayRingLookup } from './utils/index';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -177,5 +177,10 @@ export const tokens = _objectSpread(_objectSpread({}, baseTokens), {}, {
|
|
|
177
177
|
min: 'none',
|
|
178
178
|
'1': 'none'
|
|
179
179
|
}
|
|
180
|
-
}
|
|
180
|
+
},
|
|
181
|
+
typography: _objectSpread(_objectSpread({}, baseTokens.typography), {}, {
|
|
182
|
+
colour: _objectSpread(_objectSpread({}, baseTokens.typography.colour), {}, {
|
|
183
|
+
primary: colours.red['600']
|
|
184
|
+
})
|
|
185
|
+
})
|
|
181
186
|
});
|
package/dist/themes/makeTheme.js
CHANGED
|
@@ -12,13 +12,16 @@ export const breakpoints = {
|
|
|
12
12
|
desktop: '1024px',
|
|
13
13
|
largeDesktop: '1440px'
|
|
14
14
|
};
|
|
15
|
-
export const makeRuntimeTokens = tokens
|
|
16
|
-
breakpoints
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
export const makeRuntimeTokens = function makeRuntimeTokens(tokens) {
|
|
16
|
+
let runtimeBreakpoints = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : breakpoints;
|
|
17
|
+
return {
|
|
18
|
+
breakpoints: runtimeBreakpoints,
|
|
19
|
+
body: {
|
|
20
|
+
colour: tokens.colours.foreground.body,
|
|
21
|
+
backgroundColour: tokens.colours.background.body
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
22
25
|
export const buildColourGamut = colours => Object.entries(colours).reduce((result, _ref) => {
|
|
23
26
|
let [name, colourGrades] = _ref;
|
|
24
27
|
return _objectSpread(_objectSpread({}, result), Object.entries(colourGrades).reduce((grades, _ref2) => {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autoguru/overdrive",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "Overdrive is a product component library, and design system for AutoGuru.",
|
|
5
|
-
"types": "
|
|
6
|
-
"main": "
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"component",
|
|
9
9
|
"design-system",
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
"repository": "autoguru-au/overdrive",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"sideEffects": [
|
|
19
|
-
"./themes.js",
|
|
20
19
|
"./lib/reset/**/*",
|
|
21
20
|
"./lib/theme/**/*",
|
|
22
|
-
"./lib/themes/**/*"
|
|
21
|
+
"./lib/themes/**/*",
|
|
22
|
+
"./dist/reset/**/*",
|
|
23
|
+
"./dist/theme/**/*",
|
|
24
|
+
"./dist/themes/**/*"
|
|
23
25
|
],
|
|
24
26
|
"files": [
|
|
25
27
|
"dist"
|
|
@@ -29,7 +31,7 @@
|
|
|
29
31
|
},
|
|
30
32
|
"scripts": {
|
|
31
33
|
"typecheck": "tsc",
|
|
32
|
-
"build": "babel lib --out-dir dist --extensions '.ts,.tsx, .css'",
|
|
34
|
+
"build": "babel lib --out-dir dist --extensions '.ts,.tsx, .css' && tsc",
|
|
33
35
|
"prepublishOnly": "yarn run build",
|
|
34
36
|
"watch": "tsc --watch"
|
|
35
37
|
},
|