@autoguru/overdrive 4.61.0 → 4.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Box/useBox/useBox.d.ts +1 -1
- package/dist/components/Button/Button.css.d.ts +13 -1
- package/dist/components/Button/Button.css.d.ts.map +1 -1
- package/dist/components/Button/Button.css.js +35 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +5 -1
- package/dist/components/CheckBox/CheckBox.css.d.ts.map +1 -1
- package/dist/components/CheckBox/CheckBox.css.js +5 -2
- package/dist/components/DateInput/DateInput.js +1 -1
- package/dist/components/EditableText/EditableText.css.js +1 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.d.ts +13 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.d.ts.map +1 -1
- package/dist/components/OverdriveProvider/OverdriveProvider.js +6 -1
- package/dist/components/OverdriveProvider/useColorOverrides.d.ts +3 -2
- package/dist/components/OverdriveProvider/useColorOverrides.d.ts.map +1 -1
- package/dist/components/OverdriveProvider/useColorOverrides.js +158 -22
- package/dist/components/OverdriveProvider/useColorOverrides.spec.d.ts +2 -0
- package/dist/components/OverdriveProvider/useColorOverrides.spec.d.ts.map +1 -0
- package/dist/components/OverdriveProvider/useColorOverrides.spec.js +226 -0
- package/dist/components/Radio/Radio.css.d.ts.map +1 -1
- package/dist/components/Radio/Radio.css.js +3 -2
- package/dist/components/StandardModal/StandardModal.js +1 -1
- package/dist/components/Switch/Switch.css.d.ts.map +1 -1
- package/dist/components/Switch/Switch.css.js +3 -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.js +1 -1
- package/dist/styles/intentColorset.css.d.ts +3 -3
- package/dist/styles/sprinkles.css.d.ts +24 -24
- package/dist/styles/sprinkles.css.d.ts.map +1 -1
- package/dist/styles/sprinkles.css.js +10 -8
- package/dist/styles/typography.css.d.ts +1 -1
- package/dist/themes/base/contrastGuide.spec.js +11 -2
- package/dist/themes/base/index.d.ts +126 -18
- package/dist/themes/base/index.d.ts.map +1 -1
- package/dist/themes/base/space.spec.js +3 -3
- package/dist/themes/base/tokens.d.ts +76 -9
- package/dist/themes/base/tokens.d.ts.map +1 -1
- package/dist/themes/base/tokens.js +114 -13
- package/dist/themes/flat_red/index.d.ts +126 -18
- package/dist/themes/flat_red/index.d.ts.map +1 -1
- package/dist/themes/flat_red/tokens.d.ts +63 -9
- package/dist/themes/flat_red/tokens.d.ts.map +1 -1
- package/dist/themes/index.d.ts +126 -18
- package/dist/themes/index.d.ts.map +1 -1
- package/dist/themes/makeTheme.d.ts +63 -9
- package/dist/themes/makeTheme.d.ts.map +1 -1
- package/dist/themes/neutral/index.d.ts +126 -18
- package/dist/themes/neutral/index.d.ts.map +1 -1
- package/dist/themes/neutral/tokens.d.ts +63 -9
- package/dist/themes/neutral/tokens.d.ts.map +1 -1
- package/dist/themes/theme.css.d.ts +63 -9
- package/dist/themes/theme.css.d.ts.map +1 -1
- package/dist/themes/theme.css.js +79 -18
- package/package.json +1 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import { renderHook } from '@testing-library/react';
|
|
5
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
6
|
+
import { colourMap } from "../../themes/base/colours.js";
|
|
7
|
+
import { tokens as baseTokens } from "../../themes/base/tokens.js";
|
|
8
|
+
import { getColourLuminance, getRGBValues } from "../../themes/helpers.js";
|
|
9
|
+
import { useColorOverrides } from "./useColorOverrides.js";
|
|
10
|
+
const BRAND = '#6d39a8'; // Merchant Finder's purple — dark, wants white on it
|
|
11
|
+
const BRIGHT = '#e5bc01'; // a bright yellow — wants dark ink on it
|
|
12
|
+
|
|
13
|
+
const vars = (overrides, tokens = baseTokens) => renderHook(() => useColorOverrides(overrides, tokens)).result.current;
|
|
14
|
+
const luminance = colour => getColourLuminance(getRGBValues(colour));
|
|
15
|
+
describe('useColorOverrides', () => {
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
vi.restoreAllMocks();
|
|
18
|
+
});
|
|
19
|
+
it('generates nothing when no overrides are supplied', () => {
|
|
20
|
+
expect(vars()).toEqual({});
|
|
21
|
+
});
|
|
22
|
+
describe('back-compat with the existing five keys', () => {
|
|
23
|
+
it('writes the legacy primary intent vars it always has', () => {
|
|
24
|
+
const result = vars({
|
|
25
|
+
primaryBackground: BRAND,
|
|
26
|
+
primaryForeground: '#ffffff',
|
|
27
|
+
primaryBorder: '#000000'
|
|
28
|
+
});
|
|
29
|
+
expect(result['--od-colours-intent-primary-background-standard']).toBe(BRAND);
|
|
30
|
+
expect(result['--od-colours-intent-primary-foreground']).toBe('#ffffff');
|
|
31
|
+
expect(result['--od-colours-intent-primary-border']).toBe('#000000');
|
|
32
|
+
expect(result['--od-typography-colour-primary']).toBe(BRAND);
|
|
33
|
+
});
|
|
34
|
+
it('honours explicitly supplied mild and strong values', () => {
|
|
35
|
+
const result = vars({
|
|
36
|
+
primaryBackground: BRAND,
|
|
37
|
+
primaryBackgroundMild: '#eeeeee',
|
|
38
|
+
primaryBackgroundStrong: '#111111'
|
|
39
|
+
});
|
|
40
|
+
expect(result['--od-colours-intent-primary-background-mild']).toBe('#eeeeee');
|
|
41
|
+
expect(result['--od-colours-intent-primary-background-strong']).toBe('#111111');
|
|
42
|
+
});
|
|
43
|
+
it('derives mild lighter and strong darker than the brand, not identical', () => {
|
|
44
|
+
const result = vars({
|
|
45
|
+
primaryBackground: BRAND
|
|
46
|
+
});
|
|
47
|
+
const mild = result['--od-colours-intent-primary-background-mild'];
|
|
48
|
+
const strong = result['--od-colours-intent-primary-background-strong'];
|
|
49
|
+
|
|
50
|
+
// regression guard: these were derived with identical arguments and
|
|
51
|
+
// both resolved to the same lightened colour, so a branded button's
|
|
52
|
+
// hover and active states were indistinguishable from resting
|
|
53
|
+
expect(mild).not.toBe(strong);
|
|
54
|
+
expect(luminance(mild)).toBeGreaterThan(luminance(BRAND));
|
|
55
|
+
expect(luminance(strong)).toBeLessThan(luminance(BRAND));
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
describe('brand accent', () => {
|
|
59
|
+
it('writes the brand pair from the supplied background', () => {
|
|
60
|
+
const result = vars({
|
|
61
|
+
primaryBackground: BRAND
|
|
62
|
+
});
|
|
63
|
+
expect(result['--od-color-brand-solid']).toBe(BRAND);
|
|
64
|
+
});
|
|
65
|
+
it('picks white as on-brand content for a dark brand', () => {
|
|
66
|
+
const result = vars({
|
|
67
|
+
primaryBackground: BRAND
|
|
68
|
+
});
|
|
69
|
+
expect(result['--od-color-brand-on-solid']).toBe(colourMap.white);
|
|
70
|
+
});
|
|
71
|
+
it('picks dark ink as on-brand content for a bright brand', () => {
|
|
72
|
+
const result = vars({
|
|
73
|
+
primaryBackground: BRIGHT
|
|
74
|
+
});
|
|
75
|
+
expect(result['--od-color-brand-on-solid']).toBe(colourMap.gray['900']);
|
|
76
|
+
});
|
|
77
|
+
it('prefers an explicit primaryForeground over the derived value', () => {
|
|
78
|
+
const result = vars({
|
|
79
|
+
primaryBackground: BRIGHT,
|
|
80
|
+
primaryForeground: '#123456'
|
|
81
|
+
});
|
|
82
|
+
expect(result['--od-color-brand-on-solid']).toBe('#123456');
|
|
83
|
+
});
|
|
84
|
+
it('ignores a primaryForeground that would be illegible on the brand', () => {
|
|
85
|
+
// a tenant pairing a light brand with white button text: taken
|
|
86
|
+
// verbatim this puts a white tick on a light checkbox, which is
|
|
87
|
+
// worse than the fixed dark ink these controls had before they
|
|
88
|
+
// followed the brand at all
|
|
89
|
+
const result = vars({
|
|
90
|
+
primaryBackground: '#ff6d00',
|
|
91
|
+
primaryForeground: '#ffffff'
|
|
92
|
+
});
|
|
93
|
+
expect(result['--od-color-brand-on-solid']).toBe(colourMap.gray['900']);
|
|
94
|
+
// the button label still honours what the tenant asked for — that
|
|
95
|
+
// is their stated brand pairing, and it was already the behaviour
|
|
96
|
+
expect(result['--od-colours-intent-primary-foreground']).toBe('#ffffff');
|
|
97
|
+
});
|
|
98
|
+
it('derives the button label too when no primaryForeground is given', () => {
|
|
99
|
+
// otherwise a light brand keeps the theme's white label and the
|
|
100
|
+
// solid button is unreadable, which the prop docs promise against
|
|
101
|
+
const result = vars({
|
|
102
|
+
primaryBackground: BRIGHT
|
|
103
|
+
});
|
|
104
|
+
expect(result['--od-colours-intent-primary-foreground']).toBe(colourMap.gray['900']);
|
|
105
|
+
expect(result['--od-color-brand-on-solid']).toBe(colourMap.gray['900']);
|
|
106
|
+
});
|
|
107
|
+
it('picks its contrast candidates from the active theme, not the base one', () => {
|
|
108
|
+
// the two candidates are the theme's own page background and body
|
|
109
|
+
// ink, so a theme that changes either gets decisions made against
|
|
110
|
+
// what it actually renders
|
|
111
|
+
const recoloured = _objectSpread(_objectSpread({}, baseTokens), {}, {
|
|
112
|
+
color: _objectSpread(_objectSpread({}, baseTokens.color), {}, {
|
|
113
|
+
background: _objectSpread(_objectSpread({}, baseTokens.color.background), {}, {
|
|
114
|
+
default: '#fff8e1'
|
|
115
|
+
}),
|
|
116
|
+
foreground: _objectSpread(_objectSpread({}, baseTokens.color.foreground), {}, {
|
|
117
|
+
primary: '#1a0033'
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
const result = vars({
|
|
122
|
+
primaryBackground: BRIGHT
|
|
123
|
+
}, recoloured);
|
|
124
|
+
expect(result['--od-color-brand-on-solid']).toBe('#1a0033');
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
describe('outlined button', () => {
|
|
128
|
+
it('takes the brand verbatim for border and label', () => {
|
|
129
|
+
const result = vars({
|
|
130
|
+
primaryBackground: BRAND
|
|
131
|
+
});
|
|
132
|
+
expect(result['--od-color-button-primary-outlined-border']).toBe(BRAND);
|
|
133
|
+
expect(result['--od-color-button-primary-outlined-text']).toBe(BRAND);
|
|
134
|
+
});
|
|
135
|
+
it('derives a hover wash paler than the pressed wash', () => {
|
|
136
|
+
const result = vars({
|
|
137
|
+
primaryBackground: BRAND
|
|
138
|
+
});
|
|
139
|
+
const hover = result['--od-color-button-primary-outlined-hover'];
|
|
140
|
+
const pressed = result['--od-color-button-primary-outlined-pressed'];
|
|
141
|
+
expect(luminance(hover)).toBeGreaterThan(luminance(pressed));
|
|
142
|
+
expect(luminance(pressed)).toBeGreaterThan(luminance(BRAND));
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
describe('links and focus rings', () => {
|
|
146
|
+
it('leaves them alone when only a brand background is supplied', () => {
|
|
147
|
+
const result = vars({
|
|
148
|
+
primaryBackground: BRAND
|
|
149
|
+
});
|
|
150
|
+
expect(result['--od-colours-foreground-link']).toBeUndefined();
|
|
151
|
+
expect(result['--od-typography-colour-link']).toBeUndefined();
|
|
152
|
+
});
|
|
153
|
+
it('brands them only when linkColor is passed explicitly', () => {
|
|
154
|
+
const result = vars({
|
|
155
|
+
primaryBackground: BRAND,
|
|
156
|
+
linkColor: BRAND
|
|
157
|
+
});
|
|
158
|
+
expect(result['--od-colours-foreground-link']).toBe(BRAND);
|
|
159
|
+
expect(result['--od-typography-colour-link']).toBe(BRAND);
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
describe('invalid values', () => {
|
|
163
|
+
it('warns, drops the key, and does not mutate the caller object', () => {
|
|
164
|
+
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
165
|
+
const supplied = {
|
|
166
|
+
primaryBackground: 'not-a-colour',
|
|
167
|
+
primaryForeground: '#ffffff'
|
|
168
|
+
};
|
|
169
|
+
const result = vars(supplied);
|
|
170
|
+
expect(warn).toHaveBeenCalledWith(expect.stringContaining('primaryBackground'));
|
|
171
|
+
expect(result['--od-color-brand-solid']).toBeUndefined();
|
|
172
|
+
// the hook used to `delete` off the prop object itself, which
|
|
173
|
+
// mutates state an MFE may be holding in a GraphQL cache
|
|
174
|
+
expect(supplied.primaryBackground).toBe('not-a-colour');
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
describe('contrast warning', () => {
|
|
178
|
+
it('warns when the brand is too light to read on the page background', () => {
|
|
179
|
+
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
180
|
+
// a colour not warned about elsewhere in this file, since the
|
|
181
|
+
// warning is deduplicated for the life of the module
|
|
182
|
+
vars({
|
|
183
|
+
primaryBackground: '#ffd54a'
|
|
184
|
+
});
|
|
185
|
+
expect(warn).toHaveBeenCalledWith(expect.stringContaining('does not meet WCAG AA'));
|
|
186
|
+
});
|
|
187
|
+
it('stays quiet for a brand with enough contrast', () => {
|
|
188
|
+
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
189
|
+
vars({
|
|
190
|
+
primaryBackground: BRAND
|
|
191
|
+
});
|
|
192
|
+
expect(warn).not.toHaveBeenCalled();
|
|
193
|
+
});
|
|
194
|
+
it('warns only once for a repeated colour, since the provider re-renders freely', () => {
|
|
195
|
+
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
|
|
196
|
+
vars({
|
|
197
|
+
primaryBackground: '#ffe08a'
|
|
198
|
+
});
|
|
199
|
+
vars({
|
|
200
|
+
primaryBackground: '#ffe08a'
|
|
201
|
+
});
|
|
202
|
+
vars({
|
|
203
|
+
primaryBackground: '#ffe08a'
|
|
204
|
+
});
|
|
205
|
+
expect(warn).toHaveBeenCalledTimes(1);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
describe('server rendering', () => {
|
|
209
|
+
it('keeps overrides when the DOM colour check is unavailable', () => {
|
|
210
|
+
// `isValidColor` uses `Option`, a DOM global. Failing closed on the
|
|
211
|
+
// server stripped every override, so a branded page shipped no
|
|
212
|
+
// inline vars and only picked up the brand on hydration.
|
|
213
|
+
const original = globalThis.Option;
|
|
214
|
+
// @ts-expect-error simulating a non-DOM environment
|
|
215
|
+
delete globalThis.Option;
|
|
216
|
+
try {
|
|
217
|
+
const result = vars({
|
|
218
|
+
primaryBackground: BRAND
|
|
219
|
+
});
|
|
220
|
+
expect(result['--od-color-brand-solid']).toBe(BRAND);
|
|
221
|
+
} finally {
|
|
222
|
+
globalThis.Option = original;
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Radio/Radio.css.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,KAAK,QAehB,CAAC;AAEH,eAAO,MAAM,aAAa,QAGxB,CAAC;AAEH,eAAO,MAAM,KAAK,QAYhB,CAAC;AAEH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"Radio.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Radio/Radio.css.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,KAAK,QAehB,CAAC;AAEH,eAAO,MAAM,aAAa,QAGxB,CAAC;AAEH,eAAO,MAAM,KAAK,QAYhB,CAAC;AAEH,eAAO,MAAM,aAAa,QAQxB,CAAC"}
|
|
@@ -3,7 +3,7 @@ __vanilla_filescope__.setFileScope("lib/components/Radio/Radio.css.ts", "@autogu
|
|
|
3
3
|
import { style } from '@vanilla-extract/css';
|
|
4
4
|
import { overdriveTokens as vars } from "../../themes/theme.css.js";
|
|
5
5
|
import { checkable, nativeInput } from "../private/CheckableBase/CheckableBase.css.js";
|
|
6
|
-
const colorAccent = vars.color.
|
|
6
|
+
const colorAccent = vars.color.brand.solid;
|
|
7
7
|
const colorContrast = vars.color.background.default;
|
|
8
8
|
const colorMid = vars.colours.background.neutral;
|
|
9
9
|
const outerSize = vars.space['6'];
|
|
@@ -42,7 +42,8 @@ export const inner = style([circleBase, {
|
|
|
42
42
|
}
|
|
43
43
|
}], "inner");
|
|
44
44
|
export const innerSelected = style({
|
|
45
|
-
|
|
45
|
+
// on the brand fill, unlike the unselected hover dot above
|
|
46
|
+
backgroundColor: vars.color.brand.onSolid,
|
|
46
47
|
selectors: {
|
|
47
48
|
[`${nativeInput}:hover ~${checkable} &`]: {
|
|
48
49
|
transform: 'scale(0.85)'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Switch/Switch.css.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,MAAM,QAqBjB,CAAC;AAEH,eAAO,MAAM,QAAQ,QAMnB,CAAC;AAEH,eAAO,MAAM,QAAQ,QAOnB,CAAC;AAKH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Switch.css.d.ts","sourceRoot":"","sources":["../../../lib/components/Switch/Switch.css.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,IAAI,QAMf,CAAC;AAEH,eAAO,MAAM,MAAM,QAqBjB,CAAC;AAEH,eAAO,MAAM,QAAQ,QAMnB,CAAC;AAEH,eAAO,MAAM,QAAQ,QAOnB,CAAC;AAKH,eAAO,MAAM,MAAM,sCAoCjB,CAAC;AAEH,eAAO,MAAM,UAAU,QAOrB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { focusOutlineStyle } from "../../styles/focusOutline.css.js";
|
|
|
5
5
|
import { LAYER_ORDER, cssLayerComponent } from "../../styles/layers.css.js";
|
|
6
6
|
import { overdriveTokens as vars } from "../../themes/theme.css.js";
|
|
7
7
|
globalLayer(LAYER_ORDER);
|
|
8
|
-
const colorAccent = vars.color.
|
|
8
|
+
const colorAccent = vars.color.brand.solid;
|
|
9
9
|
const colorContrast = vars.color.background.default;
|
|
10
10
|
const colorMid = vars.colours.background.neutral;
|
|
11
11
|
const colorLight = vars.colours.background.light;
|
|
@@ -78,6 +78,8 @@ export const handle = styleVariants({
|
|
|
78
78
|
[cssLayerComponent]: {
|
|
79
79
|
selectors: {
|
|
80
80
|
[`${toggleOn} &`]: {
|
|
81
|
+
// on the brand track, so on-brand rather than page
|
|
82
|
+
backgroundColor: vars.color.brand.onSolid,
|
|
81
83
|
transform: handleTranslate
|
|
82
84
|
},
|
|
83
85
|
[`${toggle}:not([data-disabled]):hover &`]: {
|
|
@@ -19,7 +19,7 @@ export const disabled = styleVariants({
|
|
|
19
19
|
export const natural = {
|
|
20
20
|
default: {
|
|
21
21
|
colour: style({
|
|
22
|
-
color: vars.color.foreground.
|
|
22
|
+
color: vars.color.foreground.tertiary
|
|
23
23
|
}, "natural_default_colour"),
|
|
24
24
|
borderColour: style({
|
|
25
25
|
borderColor: vars.border.colours.gray
|
|
@@ -157,7 +157,7 @@ export const placeholder = styleVariants({
|
|
|
157
157
|
color: vars.colours.background.neutral
|
|
158
158
|
},
|
|
159
159
|
mutedLabelStyles: {
|
|
160
|
-
color: vars.color.foreground.
|
|
160
|
+
color: vars.color.foreground.tertiary
|
|
161
161
|
}
|
|
162
162
|
}, "placeholder");
|
|
163
163
|
const calcPlaceholderTranslate = (notched, prefixed, size) => {
|
|
@@ -14,7 +14,7 @@ export const input = {
|
|
|
14
14
|
cursor: 'not-allowed'
|
|
15
15
|
},
|
|
16
16
|
'&::placeholder': {
|
|
17
|
-
color: vars.color.foreground.
|
|
17
|
+
color: vars.color.foreground.tertiary,
|
|
18
18
|
fontSize: vars.typography.size['4'].fontSize,
|
|
19
19
|
lineHeight: vars.typography.size['4'].lineHeight,
|
|
20
20
|
opacity: 1
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
-
export declare const variantIntentionalColors: Record<"success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "
|
|
3
|
-
export declare const variantIntentionalColorsInverted: Record<"success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "
|
|
2
|
+
export declare const variantIntentionalColors: Record<"brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "shine" | "information", string>;
|
|
3
|
+
export declare const variantIntentionalColorsInverted: Record<"brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "shine" | "information", string>;
|
|
4
4
|
export declare const styledIntentionalElement: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
5
|
-
intention: Record<"success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "
|
|
5
|
+
intention: Record<"brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "shine" | "information", object>;
|
|
6
6
|
inverted: {
|
|
7
7
|
true: {};
|
|
8
8
|
false: {};
|
|
@@ -26,22 +26,22 @@ export declare const responsiveConditions: {
|
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
export declare const sprinkles: ((props: {
|
|
29
|
-
borderBottomColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "
|
|
30
|
-
borderLeftColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "
|
|
31
|
-
borderRightColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "
|
|
32
|
-
borderTopColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "
|
|
33
|
-
borderBottomColour?: "gray" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
34
|
-
borderLeftColour?: "gray" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
35
|
-
borderRightColour?: "gray" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
36
|
-
borderTopColour?: "gray" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
29
|
+
borderBottomColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "disabled" | "muted" | "transparent" | undefined;
|
|
30
|
+
borderLeftColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "disabled" | "muted" | "transparent" | undefined;
|
|
31
|
+
borderRightColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "disabled" | "muted" | "transparent" | undefined;
|
|
32
|
+
borderTopColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "disabled" | "muted" | "transparent" | undefined;
|
|
33
|
+
borderBottomColour?: "gray" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | undefined;
|
|
34
|
+
borderLeftColour?: "gray" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | undefined;
|
|
35
|
+
borderRightColour?: "gray" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | undefined;
|
|
36
|
+
borderTopColour?: "gray" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | undefined;
|
|
37
37
|
borderLeftStyle?: "none" | "solid" | undefined;
|
|
38
38
|
borderBottomStyle?: "none" | "solid" | undefined;
|
|
39
39
|
borderRightStyle?: "none" | "solid" | undefined;
|
|
40
40
|
borderTopStyle?: "none" | "solid" | undefined;
|
|
41
|
-
color?: "white" | "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" | "soft" | "success" | "info" | "danger" | "warning" | "normal" | "inverse" | "
|
|
42
|
-
colour?: "link" | "white" | "body" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
43
|
-
backgroundColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "reverse" | "default" | "inactive" | "emphasisInactive" | "transparent" | "
|
|
44
|
-
backgroundColour?: "white" | "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" | "primary" | "secondary" | "neutral" | "
|
|
41
|
+
color?: "white" | "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" | "soft" | "success" | "info" | "danger" | "warning" | "normal" | "inverse" | "placeholder" | "primary" | "secondary" | "reverse" | "tertiary" | "unset" | "infoText" | "infoForeground" | "successText" | "successForeground" | "warningText" | "warningForeground" | "alertText" | "alertForeground" | undefined;
|
|
42
|
+
colour?: "link" | "white" | "body" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | "muted" | "unset" | undefined;
|
|
43
|
+
backgroundColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "reverse" | "default" | "inactive" | "emphasisInactive" | "emphasisLight" | "modal" | "transparent" | "infoBackgroundStrong" | "infoBackgroundSubtle" | "successBackgroundStrong" | "successBackgroundSubtle" | "warningBackgroundStrong" | "warningBackgroundSubtle" | "alertBackgroundStrong" | "alertBackgroundSubtle" | undefined;
|
|
44
|
+
backgroundColour?: "white" | "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" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "shine" | "information" | "transparent" | "black900" | undefined;
|
|
45
45
|
opacity?: number | "0" | "1" | undefined;
|
|
46
46
|
fontWeight?: "bold" | "medium" | "normal" | "semiBold" | undefined;
|
|
47
47
|
textTransform?: "capitalize" | "lowercase" | "uppercase" | undefined;
|
|
@@ -51,14 +51,14 @@ export declare const sprinkles: ((props: {
|
|
|
51
51
|
pointerEvents?: "none" | "auto" | undefined;
|
|
52
52
|
userSelect?: "none" | "text" | "auto" | undefined;
|
|
53
53
|
useVar?: "gap" | undefined;
|
|
54
|
-
bg?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "reverse" | "default" | "inactive" | "emphasisInactive" | "transparent" | "
|
|
55
|
-
fg?: "white" | "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" | "soft" | "success" | "info" | "danger" | "warning" | "normal" | "inverse" | "
|
|
56
|
-
borderColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "
|
|
57
|
-
borderColorX?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "
|
|
58
|
-
borderColorY?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "
|
|
59
|
-
borderColour?: "gray" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
60
|
-
borderColourX?: "gray" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
61
|
-
borderColourY?: "gray" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
54
|
+
bg?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "reverse" | "default" | "inactive" | "emphasisInactive" | "emphasisLight" | "modal" | "transparent" | "infoBackgroundStrong" | "infoBackgroundSubtle" | "successBackgroundStrong" | "successBackgroundSubtle" | "warningBackgroundStrong" | "warningBackgroundSubtle" | "alertBackgroundStrong" | "alertBackgroundSubtle" | undefined;
|
|
55
|
+
fg?: "white" | "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" | "soft" | "success" | "info" | "danger" | "warning" | "normal" | "inverse" | "placeholder" | "primary" | "secondary" | "reverse" | "tertiary" | "unset" | "infoText" | "infoForeground" | "successText" | "successForeground" | "warningText" | "warningForeground" | "alertText" | "alertForeground" | undefined;
|
|
56
|
+
borderColor?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "disabled" | "muted" | "transparent" | undefined;
|
|
57
|
+
borderColorX?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "disabled" | "muted" | "transparent" | undefined;
|
|
58
|
+
borderColorY?: "white" | "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" | "page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "emphasis" | "selected" | "strong" | "disabled" | "muted" | "transparent" | undefined;
|
|
59
|
+
borderColour?: "gray" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | undefined;
|
|
60
|
+
borderColourX?: "gray" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | undefined;
|
|
61
|
+
borderColourY?: "gray" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | undefined;
|
|
62
62
|
borderStyle?: "none" | "solid" | undefined;
|
|
63
63
|
borderStyleBottom?: "none" | "solid" | undefined;
|
|
64
64
|
borderStyleLeft?: "none" | "solid" | undefined;
|
|
@@ -502,11 +502,11 @@ export type Sprinkles = Parameters<typeof sprinkles>[0];
|
|
|
502
502
|
export type SprinklesLegacyColours = Pick<Sprinkles, 'backgroundColour' | 'borderColour' | 'borderBottomColour' | 'borderLeftColour' | 'borderRightColour' | 'borderTopColour' | 'colour'>;
|
|
503
503
|
export declare const valueArrays: {
|
|
504
504
|
alignItems: ("stretch" | "center" | "end" | "start" | "baseline" | "centre" | "flexEnd" | "flexStart")[];
|
|
505
|
-
borderColors: ("page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "
|
|
505
|
+
borderColors: ("page" | "hard" | "soft" | "accent" | "success" | "info" | "danger" | "warning" | "default" | "disabled" | "muted")[];
|
|
506
506
|
gapSizesWithVar: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "none")[];
|
|
507
|
-
intentBackgroundColoursStandard: ("success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "
|
|
508
|
-
intentBorderColours: ("success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "
|
|
509
|
-
intentForegroundColours: ("success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "
|
|
507
|
+
intentBackgroundColoursStandard: ("brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "shine" | "information")[];
|
|
508
|
+
intentBorderColours: ("brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "shine" | "information")[];
|
|
509
|
+
intentForegroundColours: ("brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "neutral" | "shine" | "information")[];
|
|
510
510
|
justifyContent: ("space-around" | "space-between" | "space-evenly" | "stretch" | "center" | "end" | "start" | "centre" | "spaceAround" | "spaceBetween" | "flexEnd" | "flexStart")[];
|
|
511
511
|
spaceWithNone: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "none")[];
|
|
512
512
|
width: ("0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "full" | "auto" | "fit-content" | "max-content" | "min-content")[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprinkles.css.d.ts","sourceRoot":"","sources":["../../lib/styles/sprinkles.css.ts"],"names":[],"mappings":"AAiDA;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC;IAC/C;;;;;OAKG;;CAEH,CAAC;
|
|
1
|
+
{"version":3,"file":"sprinkles.css.d.ts","sourceRoot":"","sources":["../../lib/styles/sprinkles.css.ts"],"names":[],"mappings":"AAiDA;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC;IAC/C;;;;;OAKG;;CAEH,CAAC;AAyMF,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"}
|
|
@@ -84,7 +84,7 @@ const semanticGamut = buildColourGamut({
|
|
|
84
84
|
|
|
85
85
|
// `color` (text/foreground) semantic value space
|
|
86
86
|
const semanticColor = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, tokens.color.content), tokens.color.foreground), {}, {
|
|
87
|
-
// primary, secondary, reverse,
|
|
87
|
+
// primary, secondary, reverse, tertiary, placeholder (W1-P1)
|
|
88
88
|
infoText: tokens.color.info.text,
|
|
89
89
|
infoForeground: tokens.color.info.foreground,
|
|
90
90
|
successText: tokens.color.success.text,
|
|
@@ -101,13 +101,15 @@ const semanticColor = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}
|
|
|
101
101
|
|
|
102
102
|
// `backgroundColor` semantic value space
|
|
103
103
|
const semanticBackgroundColor = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, tokens.color.surface), tokens.color.background), {}, {
|
|
104
|
-
// default, reverse, inactive, emphasisInactive (W1-P1)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
// default, reverse, inactive, emphasisInactive, emphasisLight, modal (W1-P1)
|
|
105
|
+
infoBackgroundStrong: tokens.color.info.backgroundStrong,
|
|
106
|
+
infoBackgroundSubtle: tokens.color.info.backgroundSubtle,
|
|
107
|
+
successBackgroundStrong: tokens.color.success.backgroundStrong,
|
|
108
|
+
successBackgroundSubtle: tokens.color.success.backgroundSubtle,
|
|
109
|
+
warningBackgroundStrong: tokens.color.warning.backgroundStrong,
|
|
110
|
+
warningBackgroundSubtle: tokens.color.warning.backgroundSubtle,
|
|
111
|
+
alertBackgroundStrong: tokens.color.alert.backgroundStrong,
|
|
112
|
+
alertBackgroundSubtle: tokens.color.alert.backgroundSubtle
|
|
111
113
|
}, semanticGamut), {}, {
|
|
112
114
|
white: tokens.color.gamut.white,
|
|
113
115
|
transparent: 'transparent'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const sprinklesLegacyText: ((props: {
|
|
2
|
-
color?: "link" | "white" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "
|
|
2
|
+
color?: "link" | "white" | "brand" | "success" | "danger" | "warning" | "primary" | "secondary" | "light" | "neutral" | "shine" | "information" | "dark" | "muted" | "unset" | undefined;
|
|
3
3
|
}) => string) & {
|
|
4
4
|
properties: Set<"color">;
|
|
5
5
|
};
|
|
@@ -32,9 +32,10 @@ describe('contrast guide', () => {
|
|
|
32
32
|
const tokenPairs = tokens => {
|
|
33
33
|
const {
|
|
34
34
|
surface,
|
|
35
|
-
content
|
|
35
|
+
content,
|
|
36
|
+
brand
|
|
36
37
|
} = tokens.color;
|
|
37
|
-
return [['content.normal on surface.page', content.normal, surface.page], ['content.soft on surface.page', content.soft, surface.page], ['content.inverse on surface.hard', content.inverse, surface.hard], ['content.inverse on surface.soft', content.inverse, surface.soft], ['content.info on surface.page', content.info, surface.page], ['content.danger on surface.page', content.danger, surface.page], ['content.success on surface.page', content.success, surface.page], ['content.warning on surface.page', content.warning, surface.page]].concat(_toConsumableArray(Object.entries(tokens.colours.intent).flatMap(([name, intent]) => [[`intent.${name} foreground on background.standard`, intent.foreground, intent.background.standard], [`intent.${name} foreground on background.strong`, intent.foreground, intent.background.strong]])));
|
|
38
|
+
return [['brand.onSolid on brand.solid', brand.onSolid, brand.solid], ['content.normal on surface.page', content.normal, surface.page], ['content.soft on surface.page', content.soft, surface.page], ['content.inverse on surface.hard', content.inverse, surface.hard], ['content.inverse on surface.soft', content.inverse, surface.soft], ['content.info on surface.page', content.info, surface.page], ['content.danger on surface.page', content.danger, surface.page], ['content.success on surface.page', content.success, surface.page], ['content.warning on surface.page', content.warning, surface.page]].concat(_toConsumableArray(Object.entries(tokens.colours.intent).flatMap(([name, intent]) => [[`intent.${name} foreground on background.standard`, intent.foreground, intent.background.standard], [`intent.${name} foreground on background.strong`, intent.foreground, intent.background.strong]])));
|
|
38
39
|
};
|
|
39
40
|
const KNOWN_AA_FAILURES = {
|
|
40
41
|
base: ['content.warning on surface.page', 'intent.brand foreground on background.standard', 'intent.primary foreground on background.standard', 'intent.primary foreground on background.strong', 'intent.shine foreground on background.standard', 'intent.shine foreground on background.strong', 'intent.success foreground on background.standard', 'intent.warning foreground on background.standard', 'intent.warning foreground on background.strong'],
|
|
@@ -42,6 +43,14 @@ const KNOWN_AA_FAILURES = {
|
|
|
42
43
|
neutral: ['content.warning on surface.page', 'intent.brand foreground on background.standard', 'intent.shine foreground on background.standard', 'intent.shine foreground on background.strong', 'intent.success foreground on background.standard', 'intent.warning foreground on background.standard', 'intent.warning foreground on background.strong']
|
|
43
44
|
};
|
|
44
45
|
describe.each([['base', baseTokens], ['flat_red', flatRedTokens], ['neutral', neutralTokens]])('theme token audit: %s', (themeName, tokens) => {
|
|
46
|
+
// The brand pair is seeded to the values its consumers (Switch, Radio,
|
|
47
|
+
// CheckBox) rendered before it existed, which is what makes introducing it a
|
|
48
|
+
// zero-visual-change addition. If someone re-brands the seed without also
|
|
49
|
+
// moving those components, this fails first and says why.
|
|
50
|
+
it('seeds the brand pair to the values its consumers rendered before it existed', () => {
|
|
51
|
+
expect(tokens.color.brand.solid).toBe(tokens.color.foreground.primary);
|
|
52
|
+
expect(tokens.color.brand.onSolid).toBe(tokens.color.background.default);
|
|
53
|
+
});
|
|
45
54
|
it('has no undocumented AA failures in intended pairings', () => {
|
|
46
55
|
const failures = tokenPairs(tokens).filter(([, foreground, background]) => {
|
|
47
56
|
return ratio(foreground, background) < 4.5;
|