@autoguru/overdrive 4.44.7 → 4.44.8
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/styles/layers.css.d.ts +13 -0
- package/dist/styles/layers.css.d.ts.map +1 -1
- package/dist/styles/layers.css.js +13 -0
- package/dist/styles/responsiveStyles.d.ts +35 -0
- package/dist/styles/responsiveStyles.d.ts.map +1 -0
- package/dist/styles/responsiveStyles.js +62 -0
- package/dist/styles/sprinkles.css.d.ts +18 -3
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +4 -3
- package/dist/themes/makeTheme.d.ts +9 -0
- package/dist/themes/makeTheme.d.ts.map +1 -1
- package/dist/themes/makeTheme.js +13 -0
- package/package.json +2 -2
|
@@ -5,4 +5,17 @@ export declare const cssLayerTypography: string;
|
|
|
5
5
|
export declare const cssLayerStyleprops: string;
|
|
6
6
|
export declare const cssLayerComponent: string;
|
|
7
7
|
export declare const cssLayerUtil: string;
|
|
8
|
+
/**
|
|
9
|
+
* Map of CSS layer names to their corresponding layer objects
|
|
10
|
+
*/
|
|
11
|
+
export declare const cssLayerMap: {
|
|
12
|
+
readonly reset: string;
|
|
13
|
+
readonly theme: string;
|
|
14
|
+
readonly colorset: string;
|
|
15
|
+
readonly typography: string;
|
|
16
|
+
readonly styleprops: string;
|
|
17
|
+
readonly component: string;
|
|
18
|
+
readonly util: string;
|
|
19
|
+
};
|
|
20
|
+
export type CSSLayers = keyof typeof cssLayerMap;
|
|
8
21
|
//# sourceMappingURL=layers.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.css.d.ts","sourceRoot":"","sources":["../../lib/styles/layers.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,QAAuB,CAAC;AAClD,eAAO,MAAM,aAAa,QAAuB,CAAC;AAClD,eAAO,MAAM,WAAW,QAAqD,CAAC;AAC9E,eAAO,MAAM,kBAAkB,QAG9B,CAAC;AACF,eAAO,MAAM,kBAAkB,QAA4B,CAAC;AAC5D,eAAO,MAAM,iBAAiB,QAA2B,CAAC;AAC1D,eAAO,MAAM,YAAY,QAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"layers.css.d.ts","sourceRoot":"","sources":["../../lib/styles/layers.css.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,QAAuB,CAAC;AAClD,eAAO,MAAM,aAAa,QAAuB,CAAC;AAClD,eAAO,MAAM,WAAW,QAAqD,CAAC;AAC9E,eAAO,MAAM,kBAAkB,QAG9B,CAAC;AACF,eAAO,MAAM,kBAAkB,QAA4B,CAAC;AAC5D,eAAO,MAAM,iBAAiB,QAA2B,CAAC;AAC1D,eAAO,MAAM,YAAY,QAAsB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,WAAW,CAAC"}
|
|
@@ -15,4 +15,17 @@ export const cssLayerTypography = globalLayer({
|
|
|
15
15
|
export const cssLayerStyleprops = globalLayer('styleprops');
|
|
16
16
|
export const cssLayerComponent = globalLayer('component');
|
|
17
17
|
export const cssLayerUtil = globalLayer('util');
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Map of CSS layer names to their corresponding layer objects
|
|
21
|
+
*/
|
|
22
|
+
export const cssLayerMap = {
|
|
23
|
+
reset: cssLayerReset,
|
|
24
|
+
theme: cssLayerTheme,
|
|
25
|
+
colorset: cssColorSet,
|
|
26
|
+
typography: cssLayerTypography,
|
|
27
|
+
styleprops: cssLayerStyleprops,
|
|
28
|
+
component: cssLayerComponent,
|
|
29
|
+
util: cssLayerUtil
|
|
30
|
+
};
|
|
18
31
|
__vanilla_filescope__.endFileScope();
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { StyleRule } from '@vanilla-extract/css';
|
|
2
|
+
import { type Breakpoints } from '../themes/makeTheme';
|
|
3
|
+
import { type CSSLayers } from './layers.css';
|
|
4
|
+
/**
|
|
5
|
+
* Type for defining styles for each breakpoint
|
|
6
|
+
*/
|
|
7
|
+
export type ResponsiveStyleMap = Partial<Record<Breakpoints, StyleRule>>;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a single responsive style class that applies different styles at different breakpoints
|
|
10
|
+
*
|
|
11
|
+
* @param styles - Object defining styles for each breakpoint
|
|
12
|
+
* @param layer - Optional CSS layer name to apply the styles within
|
|
13
|
+
* @returns A single vanilla-extract style class with responsive behavior
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const styles = responsiveStyles({
|
|
18
|
+
* mobile: { padding: '16px', fontSize: '14px' },
|
|
19
|
+
* tablet: { padding: '24px', fontSize: '16px' },
|
|
20
|
+
* desktop: { padding: '32px', fontSize: '18px' }
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* // With CSS layer
|
|
24
|
+
* const layeredStyles = responsiveStyles({
|
|
25
|
+
* mobile: { padding: '16px', fontSize: '14px' },
|
|
26
|
+
* tablet: { padding: '24px', fontSize: '16px' },
|
|
27
|
+
* desktop: { padding: '32px', fontSize: '18px' }
|
|
28
|
+
* }, 'component');
|
|
29
|
+
*
|
|
30
|
+
* // Usage in a component
|
|
31
|
+
* <div className={styles}>Responsive content</div>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare const responsiveStyles: (styles: ResponsiveStyleMap, layer?: CSSLayers) => string;
|
|
35
|
+
//# sourceMappingURL=responsiveStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsiveStyles.d.ts","sourceRoot":"","sources":["../../lib/styles/responsiveStyles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGrE,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG3D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB,GAC5B,QAAQ,kBAAkB,EAC1B,QAAQ,SAAS,WAoCjB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { style } from '@vanilla-extract/css';
|
|
4
|
+
import { breakpoints } from "../themes/makeTheme.js";
|
|
5
|
+
import { cssLayerMap } from "./layers.css.js";
|
|
6
|
+
import { responsiveConditions } from "./sprinkles.css.js";
|
|
7
|
+
/**
|
|
8
|
+
* Type for defining styles for each breakpoint
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Creates a single responsive style class that applies different styles at different breakpoints
|
|
12
|
+
*
|
|
13
|
+
* @param styles - Object defining styles for each breakpoint
|
|
14
|
+
* @param layer - Optional CSS layer name to apply the styles within
|
|
15
|
+
* @returns A single vanilla-extract style class with responsive behavior
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const styles = responsiveStyles({
|
|
20
|
+
* mobile: { padding: '16px', fontSize: '14px' },
|
|
21
|
+
* tablet: { padding: '24px', fontSize: '16px' },
|
|
22
|
+
* desktop: { padding: '32px', fontSize: '18px' }
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* // With CSS layer
|
|
26
|
+
* const layeredStyles = responsiveStyles({
|
|
27
|
+
* mobile: { padding: '16px', fontSize: '14px' },
|
|
28
|
+
* tablet: { padding: '24px', fontSize: '16px' },
|
|
29
|
+
* desktop: { padding: '32px', fontSize: '18px' }
|
|
30
|
+
* }, 'component');
|
|
31
|
+
*
|
|
32
|
+
* // Usage in a component
|
|
33
|
+
* <div className={styles}>Responsive content</div>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export const responsiveStyles = (styles, layer) => {
|
|
37
|
+
const responsiveStyle = {};
|
|
38
|
+
for (const [breakpoint, styleRule] of Object.entries(styles)) {
|
|
39
|
+
if (breakpoint in breakpoints) {
|
|
40
|
+
const breakpointKey = breakpoint;
|
|
41
|
+
if (breakpointKey === breakpoints[0]) {
|
|
42
|
+
// Default (mobile) styles are applied directly
|
|
43
|
+
Object.assign(responsiveStyle, styleRule);
|
|
44
|
+
} else {
|
|
45
|
+
// Larger breakpoints use media queries
|
|
46
|
+
const mediaQuery = responsiveConditions[breakpointKey]['@media'];
|
|
47
|
+
if (!responsiveStyle['@media']) {
|
|
48
|
+
responsiveStyle['@media'] = {};
|
|
49
|
+
}
|
|
50
|
+
responsiveStyle['@media'][mediaQuery] = styleRule;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (layer) {
|
|
55
|
+
return style({
|
|
56
|
+
'@layer': {
|
|
57
|
+
[cssLayerMap[layer]]: responsiveStyle
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return style(responsiveStyle);
|
|
62
|
+
};
|
|
@@ -28,8 +28,6 @@ export declare const sprinkles: ((props: {
|
|
|
28
28
|
backgroundColor?: "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "transparent" | undefined;
|
|
29
29
|
backgroundColour?: "white" | "black900" | "black800" | "black700" | "black600" | "black500" | "black400" | "black300" | "black200" | "black100" | "gray900" | "gray800" | "gray700" | "gray600" | "gray500" | "gray400" | "gray300" | "gray200" | "gray100" | "green900" | "green800" | "green700" | "green600" | "green500" | "green400" | "green300" | "green200" | "green100" | "blue900" | "blue800" | "blue700" | "blue600" | "blue500" | "blue400" | "blue300" | "blue200" | "blue100" | "yellow900" | "yellow800" | "yellow700" | "yellow600" | "yellow500" | "yellow400" | "yellow300" | "yellow200" | "yellow100" | "red900" | "red800" | "red700" | "red600" | "red500" | "red400" | "red300" | "red200" | "red100" | "success" | "danger" | "warning" | "neutral" | "primary" | "brand" | "secondary" | "shine" | "information" | "transparent" | undefined;
|
|
30
30
|
opacity?: number | "1" | "0" | undefined;
|
|
31
|
-
lineHeight?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
32
|
-
fontSize?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
33
31
|
fontWeight?: "bold" | "normal" | "semiBold" | undefined;
|
|
34
32
|
textTransform?: "capitalize" | "lowercase" | "uppercase" | undefined;
|
|
35
33
|
textWrap?: "balance" | "nowrap" | "stable" | "pretty" | undefined;
|
|
@@ -38,7 +36,6 @@ export declare const sprinkles: ((props: {
|
|
|
38
36
|
pointerEvents?: "none" | "auto" | undefined;
|
|
39
37
|
userSelect?: "none" | "auto" | "text" | undefined;
|
|
40
38
|
useVar?: "gap" | undefined;
|
|
41
|
-
text?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
42
39
|
bg?: "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "transparent" | undefined;
|
|
43
40
|
fg?: "soft" | "success" | "info" | "danger" | "warning" | "normal" | "inverse" | undefined;
|
|
44
41
|
borderColor?: "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "muted" | "default" | "disabled" | undefined;
|
|
@@ -83,6 +80,18 @@ export declare const sprinkles: ((props: {
|
|
|
83
80
|
desktop?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
84
81
|
largeDesktop?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
85
82
|
} | undefined) | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2 | 3 | 4, "fixed" | "absolute" | "relative" | "static" | "sticky" | null>;
|
|
83
|
+
lineHeight?: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | {
|
|
84
|
+
mobile?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
85
|
+
tablet?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
86
|
+
desktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
87
|
+
largeDesktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
88
|
+
} | undefined) | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2 | 3 | 4, "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | null>;
|
|
89
|
+
fontSize?: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | {
|
|
90
|
+
mobile?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
91
|
+
tablet?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
92
|
+
desktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
93
|
+
largeDesktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
94
|
+
} | undefined) | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2 | 3 | 4, "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | null>;
|
|
86
95
|
textAlign?: ("left" | "right" | "center" | "centre" | {
|
|
87
96
|
mobile?: "left" | "right" | "center" | "centre" | undefined;
|
|
88
97
|
tablet?: "left" | "right" | "center" | "centre" | undefined;
|
|
@@ -341,6 +350,12 @@ export declare const sprinkles: ((props: {
|
|
|
341
350
|
desktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "full" | "auto" | "fit-content" | "max-content" | "min-content" | undefined;
|
|
342
351
|
largeDesktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "full" | "auto" | "fit-content" | "max-content" | "min-content" | undefined;
|
|
343
352
|
} | undefined);
|
|
353
|
+
text?: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | {
|
|
354
|
+
mobile?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
355
|
+
tablet?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
356
|
+
desktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
357
|
+
largeDesktop?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | undefined;
|
|
358
|
+
} | undefined) | import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2 | 3 | 4, "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | null>;
|
|
344
359
|
padding?: import("@vanilla-extract/sprinkles").ResponsiveArray<1 | 2 | 3 | 4, "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "none" | null> | ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "none" | {
|
|
345
360
|
mobile?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "none" | undefined;
|
|
346
361
|
tablet?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "none" | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprinkles.css.d.ts","sourceRoot":"","sources":["../../lib/styles/sprinkles.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sprinkles.css.d.ts","sourceRoot":"","sources":["../../lib/styles/sprinkles.css.ts"],"names":[],"mappings":"AAqLA,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAOhC,CAAC;AA2IF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwD,CAAC;AAC/E,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACxC,SAAS,EACP,kBAAkB,GAClB,cAAc,GACd,oBAAoB,GACpB,kBAAkB,GAClB,mBAAmB,GACnB,iBAAiB,GACjB,QAAQ,CACV,CAAC;AAIF,eAAO,MAAM,WAAW;;;;;;;;;;CAcvB,CAAC"}
|
|
@@ -113,8 +113,6 @@ const baseProperties = defineProperties({
|
|
|
113
113
|
backgroundColour: mappedBackgroundColours,
|
|
114
114
|
opacity: [0, '1', '0'],
|
|
115
115
|
// Typography
|
|
116
|
-
lineHeight: mapValues(tokens.typography.size, size => size.lineHeight),
|
|
117
|
-
fontSize: mapValues(tokens.typography.size, size => size.fontSize),
|
|
118
116
|
fontWeight: tokens.typography.fontWeight,
|
|
119
117
|
textTransform: ['capitalize', 'lowercase', 'uppercase'],
|
|
120
118
|
textWrap: ['balance', 'pretty', 'stable', 'nowrap'],
|
|
@@ -131,7 +129,6 @@ const baseProperties = defineProperties({
|
|
|
131
129
|
}
|
|
132
130
|
},
|
|
133
131
|
shorthands: {
|
|
134
|
-
text: ['fontSize', 'lineHeight'],
|
|
135
132
|
bg: ['backgroundColor'],
|
|
136
133
|
fg: ['color'],
|
|
137
134
|
borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
|
|
@@ -183,6 +180,9 @@ const responsiveProperties = defineProperties({
|
|
|
183
180
|
overflowX: ['auto', 'scroll', 'hidden'],
|
|
184
181
|
overflowY: ['auto', 'scroll', 'hidden'],
|
|
185
182
|
position: ['static', 'relative', 'absolute', 'fixed', 'sticky'],
|
|
183
|
+
// Typography
|
|
184
|
+
lineHeight: mapValues(tokens.typography.size, size => size.lineHeight),
|
|
185
|
+
fontSize: mapValues(tokens.typography.size, size => size.fontSize),
|
|
186
186
|
textAlign: {
|
|
187
187
|
left: 'left',
|
|
188
188
|
center: 'center',
|
|
@@ -262,6 +262,7 @@ const responsiveProperties = defineProperties({
|
|
|
262
262
|
borderWidthTop: ['borderTopWidth'],
|
|
263
263
|
placeItems: ['justifyContent', 'alignItems'],
|
|
264
264
|
size: ['width', 'height'],
|
|
265
|
+
text: ['fontSize', 'lineHeight'],
|
|
265
266
|
padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
|
|
266
267
|
p: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
|
|
267
268
|
paddingX: ['paddingLeft', 'paddingRight'],
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { BreakPoints, ColourMap, FlattenedColours, ThemeTokens } from '.';
|
|
2
2
|
export declare const breakpoints: BreakPoints;
|
|
3
|
+
export type Breakpoints = keyof typeof breakpoints;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard to check if a value is a valid breakpoint key
|
|
6
|
+
*/
|
|
7
|
+
export declare const isBreakpoint: (value: string) => value is Breakpoints;
|
|
8
|
+
/**
|
|
9
|
+
* Get all available breakpoint keys
|
|
10
|
+
*/
|
|
11
|
+
export declare const getBreakpoint: () => readonly Breakpoints[];
|
|
3
12
|
export declare const mediaQuery: Record<import("./types").DeviceSize, string>;
|
|
4
13
|
/**
|
|
5
14
|
* Wraps theme tokens with `theme` CSS layer using the vanilla-extract method
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeTheme.d.ts","sourceRoot":"","sources":["../../lib/themes/makeTheme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAE/E,eAAO,MAAM,WAAW,EAAE,WAKzB,CAAC;AAEF,eAAO,MAAM,UAAU,8CAGtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGtD,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAC7B,qBAAoB,WAAyB;;CAG5C,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,GAAI,SAAS,SAAS,KAAG,gBAepD,CAAC"}
|
|
1
|
+
{"version":3,"file":"makeTheme.d.ts","sourceRoot":"","sources":["../../lib/themes/makeTheme.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAE/E,eAAO,MAAM,WAAW,EAAE,WAKzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,WAAW,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,KAAK,IAAI,WAErD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,QAAO,SAAS,WAAW,EAEpD,CAAC;AAEF,eAAO,MAAM,UAAU,8CAGtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGtD,CAAC;AAEH,eAAO,MAAM,iBAAiB,GAC7B,qBAAoB,WAAyB;;CAG5C,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE,eAAO,MAAM,gBAAgB,GAAI,SAAS,SAAS,KAAG,gBAepD,CAAC"}
|
package/dist/themes/makeTheme.js
CHANGED
|
@@ -13,6 +13,19 @@ export const breakpoints = {
|
|
|
13
13
|
// IPad Pro width (1366 - 25%)
|
|
14
14
|
largeDesktop: '1920px' // 1080p width (1920 - 25%)
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Type guard to check if a value is a valid breakpoint key
|
|
18
|
+
*/
|
|
19
|
+
export const isBreakpoint = value => {
|
|
20
|
+
return value in breakpoints;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get all available breakpoint keys
|
|
25
|
+
*/
|
|
26
|
+
export const getBreakpoint = () => {
|
|
27
|
+
return Object.keys(breakpoints);
|
|
28
|
+
};
|
|
16
29
|
export const mediaQuery = mapValues(breakpoints, breakpoint => `screen and (min-width: ${breakpoint})`);
|
|
17
30
|
|
|
18
31
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autoguru/overdrive",
|
|
3
|
-
"version": "4.44.
|
|
3
|
+
"version": "4.44.8",
|
|
4
4
|
"description": "Overdrive is a product component library, and design system for AutoGuru.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"webpack": "*"
|
|
177
177
|
},
|
|
178
178
|
"volta": {
|
|
179
|
-
"node": "22.17.
|
|
179
|
+
"node": "22.17.1",
|
|
180
180
|
"yarn": "4.9.2"
|
|
181
181
|
},
|
|
182
182
|
"packageManager": "yarn@4.9.2"
|