@vinyasa/tokens 1.0.25 → 1.0.26
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/README.md +14 -5
- package/dist/cjs/index.cjs +316 -154
- package/dist/esm/VinyasaProvider.d.ts +1 -1
- package/dist/esm/density.d.ts +1 -1
- package/dist/esm/index.d.ts +4 -1
- package/dist/esm/index.js +186 -112
- package/dist/esm/primitives.d.ts +8 -67
- package/dist/esm/{theme.d.ts → themes/base.d.ts} +52 -5
- package/dist/esm/themes/dark.d.ts +3 -0
- package/dist/esm/themes/light.d.ts +4 -0
- package/dist/esm/themes/orange.d.ts +3 -0
- package/dist/esm/themes.d.ts +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -30,12 +30,12 @@ function App() {
|
|
|
30
30
|
|
|
31
31
|
Values are organized in three tiers:
|
|
32
32
|
|
|
33
|
-
1. **Primitives**
|
|
33
|
+
1. **Primitives** — raw, numeric-keyed scales with no meaning attached: `moss[700]`, `space[3]`. Two kinds, in two places: `primitives.ts` holds only what's genuinely shared across 2+ color schemes (`dusk`, `ember`/`saffron`/`moss` — reused as-is by both `light.ts` and `orange.ts` — plus the fully structural scales like `space`/`radius`/`fontFamily`, consumed via `base.ts`). A scheme's _exclusive_ palette (e.g. `light.ts`'s own `stone`/`paper`/`shadow`, `orange.ts`'s own `sand`/`sunrise`) lives directly in that scheme's own file under `src/themes/`, not centralized — nothing else references it, so centralizing it would just be an extra file to jump to.
|
|
34
34
|
2. **Semantic contract** (`themeContract`, exported from this package) — a flat, brand-role naming tier covering colors (`primary`/`onPrimary`, `secondary`/`onSecondary`, `tertiary`/`onTertiary`, `error`/`onError`, `focus`), spacing (`space1`–`space6`), radii, border width, typography (font family/size/weight/letter-spacing/line-height), motion (duration/easing), focus rings, opacity, shadows, elevation, blur, and z-index. This is what a component's own `.css.ts` file imports and references — never the primitives directly.
|
|
35
35
|
|
|
36
36
|
`breakpoints` and `grid` (from `layout.ts`) are the one exception — they're exported as plain static values, **not** part of `themeContract`. CSS custom properties can't appear inside `@media` query conditions (`@media (min-width: var(--x))` is invalid in every browser), so responsive breakpoints can never be runtime-themed the way colors or spacing can. Consume them as literals directly in your own component's build-time `@media` blocks.
|
|
37
37
|
|
|
38
|
-
3. **Runtime theme** (`
|
|
38
|
+
3. **Runtime theme** (`lightTheme`, `createTheme`, `VinyasaProvider`) — the actual values, injected as CSS custom properties at render time (via `@vanilla-extract/dynamic`), not baked into a static stylesheet. This is what makes overriding a value a runtime prop, not a rebuild.
|
|
39
39
|
|
|
40
40
|
### Overriding values
|
|
41
41
|
|
|
@@ -78,7 +78,15 @@ function Component() {
|
|
|
78
78
|
<VinyasaProvider colorScheme="light" contrast="normal" density="comfortable">
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
- `colorScheme`: `'light'` (default) | `'dark'` | `'orange'` — three full peer themes, not "light/dark plus an orange accent." `orange` isn't a variant of light or dark; it has its own complete palette (surface, text, borders, shadow, and the brand color itself), warm throughout. `info`/`success`/`warning`/`error` stay on the same semantic hues (`dusk`/`moss`/`saffron`/`ember`) as every other theme — only the brand color and neutrals change per scheme.
|
|
82
|
+
- `contrast`: `'normal'` (default) | `'high'` — every `colorScheme` × `contrast` combination is populated and WCAG-AAA-verified (7:1), not a placeholder; see `primitives.ts`'s and each `src/themes/*.ts` file's own comments for the exact ratios behind each override.
|
|
83
|
+
- `density`: `'comfortable'` (default) | `'compact'` | `'spacious'`.
|
|
84
|
+
|
|
85
|
+
Each color scheme's values live in its own file under `src/themes/`: `base.ts` (the `VinyasaTheme` interface plus the structural scale — spacing/radius/type/motion — shared by every scheme), `light.ts`, `dark.ts`, `orange.ts`. Every export name is unique across these files (`lightTheme`/`darkTheme`/`orangeTheme`, `lightHighContrastTheme`/`darkHighContrastTheme`/`orangeHighContrastTheme`) — no two files export something with the same name. Adding a new scheme (e.g. `blue`) means a new `src/themes/blue.ts` spreading `base` and defining only the color/shadow keys that differ, one new entry in `src/themes.ts`'s matrix, and widening the `ColorScheme` union there — no other file needs to change.
|
|
86
|
+
|
|
87
|
+
`colorScheme`/`contrast` resolve together via `resolveBaseTheme`; `density` resolves separately via `resolveDensitySpacing` (it only ever varies the `space1`–`space6` keys, applied as an overlay after the base theme and before any explicit `theme` override) since color and spacing don't vary together. Requesting an unshipped combination falls back to `light`/`normal` with a console warning in development.
|
|
88
|
+
|
|
89
|
+
Storybook's own toolbar (`apps/storybook/.storybook/preview.tsx`) exposes all three `colorScheme` values as a global toggle, so any story can be browsed in any of them, not just the Foundations pages' own light/dark comparison.
|
|
82
90
|
|
|
83
91
|
## Consuming the contract in your own component
|
|
84
92
|
|
|
@@ -106,8 +114,9 @@ export const root = style({
|
|
|
106
114
|
| `VinyasaProvider` | React component. Props: `theme?`, `colorScheme?`, `contrast?`, `density?`, `children`. |
|
|
107
115
|
| `useVinyasaTheme()` | Hook returning the currently resolved `VinyasaTheme` object. |
|
|
108
116
|
| `themeContract` | The token contract — import as `vars` in a component's `.css.ts` file. |
|
|
109
|
-
| `
|
|
110
|
-
| `
|
|
117
|
+
| `lightTheme`, `darkTheme`, `orangeTheme` | The normal-contrast values object for each color scheme. |
|
|
118
|
+
| `lightHighContrastTheme`, `darkHighContrastTheme`, `orangeHighContrastTheme` | The high-contrast values object for each color scheme. |
|
|
119
|
+
| `createTheme(overrides)` | Merges a partial theme onto `lightTheme`, returning a full `VinyasaTheme`. |
|
|
111
120
|
| `resolveBaseTheme(colorScheme, contrast)` | Looks up the base theme for a scheme/contrast pair, with a dev-mode fallback warning. |
|
|
112
121
|
| `resolveDensitySpacing(density)` | Looks up the `space1`–`space6` overlay for a density, with a dev-mode fallback warning. |
|
|
113
122
|
| `breakpoints`, `grid` | Static layout values (not themeable — see above). From `layout.ts`. |
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -33,10 +33,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
33
33
|
createTheme: ()=>createTheme,
|
|
34
34
|
darkHighContrastTheme: ()=>darkHighContrastTheme,
|
|
35
35
|
darkTheme: ()=>darkTheme,
|
|
36
|
-
defaultTheme: ()=>defaultTheme,
|
|
37
36
|
focusRingStyle: ()=>focusRingStyle,
|
|
38
37
|
grid: ()=>grid,
|
|
39
|
-
|
|
38
|
+
lightHighContrastTheme: ()=>lightHighContrastTheme,
|
|
39
|
+
lightTheme: ()=>lightTheme,
|
|
40
|
+
orangeHighContrastTheme: ()=>orangeHighContrastTheme,
|
|
41
|
+
orangeTheme: ()=>orangeTheme,
|
|
40
42
|
resolveBaseTheme: ()=>resolveBaseTheme,
|
|
41
43
|
resolveDensitySpacing: ()=>resolveDensitySpacing,
|
|
42
44
|
themeContract: ()=>themeContract,
|
|
@@ -128,73 +130,30 @@ const focusRingStyle = (vars)=>({
|
|
|
128
130
|
borderColor: vars.focus,
|
|
129
131
|
boxShadow: `0 0 0 1px ${vars.focus}, 0 0 0 4px color-mix(in srgb, ${vars.focus} 16%, transparent)`
|
|
130
132
|
});
|
|
131
|
-
const stone = {
|
|
132
|
-
50: '#FAFAFC',
|
|
133
|
-
100: '#F6F5F8',
|
|
134
|
-
200: '#E3E0EA',
|
|
135
|
-
300: '#CFCADC',
|
|
136
|
-
400: '#A79DBE',
|
|
137
|
-
500: '#7C7191',
|
|
138
|
-
600: '#5C5470',
|
|
139
|
-
700: '#4A4458',
|
|
140
|
-
800: '#332E40',
|
|
141
|
-
900: '#1E1A28'
|
|
142
|
-
};
|
|
143
|
-
const stoneDark = {
|
|
144
|
-
50: '#100E17',
|
|
145
|
-
100: '#161320',
|
|
146
|
-
200: '#221C30',
|
|
147
|
-
300: '#362E4C',
|
|
148
|
-
400: '#493D64',
|
|
149
|
-
500: '#7C7191',
|
|
150
|
-
600: '#B9B3CB',
|
|
151
|
-
700: '#D6D2E0',
|
|
152
|
-
800: '#E9E7EF',
|
|
153
|
-
900: '#F1EFF5'
|
|
154
|
-
};
|
|
155
|
-
const paper = '#FFFFFF';
|
|
156
|
-
const paperDark = stoneDark[200];
|
|
157
133
|
const dusk = {
|
|
158
134
|
tint: '#EEE9F9',
|
|
159
135
|
600: '#4B2E8C',
|
|
160
136
|
700: '#37206B',
|
|
161
137
|
onDusk: '#FFFFFF'
|
|
162
138
|
};
|
|
163
|
-
const duskDark = {
|
|
164
|
-
tint: '#2E2648',
|
|
165
|
-
600: '#B49BEA',
|
|
166
|
-
700: '#CBB8F2',
|
|
167
|
-
onDusk: '#1A1425'
|
|
168
|
-
};
|
|
169
139
|
const moss = {
|
|
170
140
|
tint: '#E4EEE8',
|
|
171
141
|
700: '#3F6650',
|
|
172
|
-
800: '#3B604B'
|
|
173
|
-
|
|
174
|
-
const mossDark = {
|
|
175
|
-
tint: '#22332A',
|
|
176
|
-
700: '#7FB89A'
|
|
142
|
+
800: '#3B604B',
|
|
143
|
+
900: '#385B47'
|
|
177
144
|
};
|
|
178
145
|
const ember = {
|
|
179
146
|
tint: '#F7E7E1',
|
|
180
147
|
600: '#A64B2A',
|
|
181
148
|
700: '#8E4024',
|
|
149
|
+
800: '#863C22',
|
|
182
150
|
onEmber: '#FFFFFF'
|
|
183
151
|
};
|
|
184
|
-
const emberDark = {
|
|
185
|
-
tint: '#3A281F',
|
|
186
|
-
600: '#E08D6D',
|
|
187
|
-
700: '#E3977A',
|
|
188
|
-
onEmber: '#2A1208'
|
|
189
|
-
};
|
|
190
152
|
const saffron = {
|
|
191
153
|
tint: '#F5EBDD',
|
|
192
154
|
700: '#A15C1F',
|
|
193
|
-
800: '#834B19'
|
|
194
|
-
|
|
195
|
-
const saffronDark = {
|
|
196
|
-
tint: '#3A2F1B',
|
|
197
|
-
700: '#D9A15C'
|
|
155
|
+
800: '#834B19',
|
|
156
|
+
900: '#7C4717'
|
|
198
157
|
};
|
|
199
158
|
const space = {
|
|
200
159
|
1: '0.25rem',
|
|
@@ -260,16 +219,6 @@ const opacity = {
|
|
|
260
219
|
disabled: '0.5',
|
|
261
220
|
hover: '0.92'
|
|
262
221
|
};
|
|
263
|
-
const shadow = {
|
|
264
|
-
sm: '0 1px 1px rgba(30, 20, 50, 0.06)',
|
|
265
|
-
md: '0 1px 2px rgba(30, 20, 50, 0.05), 0 8px 20px -8px rgba(43, 26, 90, 0.18)',
|
|
266
|
-
lg: '0 2px 4px rgba(30, 20, 50, 0.06), 0 16px 40px -12px rgba(43, 26, 90, 0.28)'
|
|
267
|
-
};
|
|
268
|
-
const shadowDark = {
|
|
269
|
-
sm: '0 1px 1px rgba(0, 0, 0, 0.45)',
|
|
270
|
-
md: '0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.55)',
|
|
271
|
-
lg: '0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.65)'
|
|
272
|
-
};
|
|
273
222
|
const primitives_blur = {
|
|
274
223
|
sm: '4px',
|
|
275
224
|
md: '8px',
|
|
@@ -282,49 +231,7 @@ const zIndex = {
|
|
|
282
231
|
toast: '1300',
|
|
283
232
|
tooltip: '1400'
|
|
284
233
|
};
|
|
285
|
-
|
|
286
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
287
|
-
value: value,
|
|
288
|
-
enumerable: true,
|
|
289
|
-
configurable: true,
|
|
290
|
-
writable: true
|
|
291
|
-
});
|
|
292
|
-
else obj[key] = value;
|
|
293
|
-
return obj;
|
|
294
|
-
}
|
|
295
|
-
function _object_spread(target) {
|
|
296
|
-
for(var i = 1; i < arguments.length; i++){
|
|
297
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
298
|
-
var ownKeys = Object.keys(source);
|
|
299
|
-
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
300
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
301
|
-
}));
|
|
302
|
-
ownKeys.forEach(function(key) {
|
|
303
|
-
_define_property(target, key, source[key]);
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
return target;
|
|
307
|
-
}
|
|
308
|
-
function theme_ownKeys(object, enumerableOnly) {
|
|
309
|
-
var keys = Object.keys(object);
|
|
310
|
-
if (Object.getOwnPropertySymbols) {
|
|
311
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
312
|
-
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
313
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
314
|
-
});
|
|
315
|
-
keys.push.apply(keys, symbols);
|
|
316
|
-
}
|
|
317
|
-
return keys;
|
|
318
|
-
}
|
|
319
|
-
function _object_spread_props(target, source) {
|
|
320
|
-
source = null != source ? source : {};
|
|
321
|
-
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
322
|
-
else theme_ownKeys(Object(source)).forEach(function(key) {
|
|
323
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
324
|
-
});
|
|
325
|
-
return target;
|
|
326
|
-
}
|
|
327
|
-
const structural = {
|
|
234
|
+
const base_base = {
|
|
328
235
|
space1: space["1"],
|
|
329
236
|
space2: space["2"],
|
|
330
237
|
space3: space["3"],
|
|
@@ -376,19 +283,79 @@ const structural = {
|
|
|
376
283
|
zIndexToast: zIndex.toast,
|
|
377
284
|
zIndexTooltip: zIndex.tooltip
|
|
378
285
|
};
|
|
379
|
-
|
|
286
|
+
function _define_property(obj, key, value) {
|
|
287
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
288
|
+
value: value,
|
|
289
|
+
enumerable: true,
|
|
290
|
+
configurable: true,
|
|
291
|
+
writable: true
|
|
292
|
+
});
|
|
293
|
+
else obj[key] = value;
|
|
294
|
+
return obj;
|
|
295
|
+
}
|
|
296
|
+
function _object_spread(target) {
|
|
297
|
+
for(var i = 1; i < arguments.length; i++){
|
|
298
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
299
|
+
var ownKeys = Object.keys(source);
|
|
300
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
301
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
302
|
+
}));
|
|
303
|
+
ownKeys.forEach(function(key) {
|
|
304
|
+
_define_property(target, key, source[key]);
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
return target;
|
|
308
|
+
}
|
|
309
|
+
function light_ownKeys(object, enumerableOnly) {
|
|
310
|
+
var keys = Object.keys(object);
|
|
311
|
+
if (Object.getOwnPropertySymbols) {
|
|
312
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
313
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
314
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
315
|
+
});
|
|
316
|
+
keys.push.apply(keys, symbols);
|
|
317
|
+
}
|
|
318
|
+
return keys;
|
|
319
|
+
}
|
|
320
|
+
function _object_spread_props(target, source) {
|
|
321
|
+
source = null != source ? source : {};
|
|
322
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
323
|
+
else light_ownKeys(Object(source)).forEach(function(key) {
|
|
324
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
325
|
+
});
|
|
326
|
+
return target;
|
|
327
|
+
}
|
|
328
|
+
const stone = {
|
|
329
|
+
50: '#FAFAFC',
|
|
330
|
+
100: '#F6F5F8',
|
|
331
|
+
200: '#E3E0EA',
|
|
332
|
+
300: '#CFCADC',
|
|
333
|
+
400: '#A79DBE',
|
|
334
|
+
500: '#7C7191',
|
|
335
|
+
600: '#5C5470',
|
|
336
|
+
700: '#4A4458',
|
|
337
|
+
800: '#332E40',
|
|
338
|
+
900: '#1E1A28'
|
|
339
|
+
};
|
|
340
|
+
const paper = '#FFFFFF';
|
|
341
|
+
const shadow = {
|
|
342
|
+
sm: '0 1px 1px rgba(30, 20, 50, 0.06)',
|
|
343
|
+
md: '0 1px 2px rgba(30, 20, 50, 0.05), 0 8px 20px -8px rgba(43, 26, 90, 0.18)',
|
|
344
|
+
lg: '0 2px 4px rgba(30, 20, 50, 0.06), 0 16px 40px -12px rgba(43, 26, 90, 0.28)'
|
|
345
|
+
};
|
|
346
|
+
const lightTheme = _object_spread_props(_object_spread({}, base_base), {
|
|
380
347
|
primary: dusk["600"],
|
|
381
348
|
onPrimary: dusk.onDusk,
|
|
382
|
-
secondary: stone[
|
|
383
|
-
onSecondary: stone[
|
|
349
|
+
secondary: stone[200],
|
|
350
|
+
onSecondary: stone[900],
|
|
384
351
|
surface: paper,
|
|
385
352
|
tertiary: dusk.tint,
|
|
386
353
|
onTertiary: dusk["600"],
|
|
387
354
|
error: ember["600"],
|
|
388
355
|
onError: ember.onEmber,
|
|
389
356
|
focus: dusk["600"],
|
|
390
|
-
textDefault: stone[
|
|
391
|
-
textMuted: stone[
|
|
357
|
+
textDefault: stone[900],
|
|
358
|
+
textMuted: stone[700],
|
|
392
359
|
statusInfoBg: dusk.tint,
|
|
393
360
|
statusInfoText: dusk["600"],
|
|
394
361
|
statusSuccessBg: moss.tint,
|
|
@@ -397,7 +364,7 @@ const defaultTheme = _object_spread_props(_object_spread({}, structural), {
|
|
|
397
364
|
statusWarningText: saffron["700"],
|
|
398
365
|
statusErrorBg: ember.tint,
|
|
399
366
|
statusErrorText: ember["600"],
|
|
400
|
-
borderColorDefault: stone[
|
|
367
|
+
borderColorDefault: stone[200],
|
|
401
368
|
shadowSm: shadow.sm,
|
|
402
369
|
shadowMd: shadow.md,
|
|
403
370
|
shadowLg: shadow.lg,
|
|
@@ -405,28 +372,119 @@ const defaultTheme = _object_spread_props(_object_spread({}, structural), {
|
|
|
405
372
|
elevationOverlay: shadow.md,
|
|
406
373
|
elevationModal: shadow.lg
|
|
407
374
|
});
|
|
408
|
-
const
|
|
409
|
-
primary:
|
|
375
|
+
const lightHighContrastTheme = _object_spread_props(_object_spread({}, lightTheme), {
|
|
376
|
+
primary: dusk["700"],
|
|
377
|
+
onTertiary: dusk["700"],
|
|
378
|
+
focus: dusk["700"],
|
|
379
|
+
error: ember["700"],
|
|
380
|
+
statusErrorText: ember["700"],
|
|
381
|
+
statusWarningText: saffron["800"],
|
|
382
|
+
statusSuccessText: moss["800"],
|
|
383
|
+
borderColorDefault: stone[600]
|
|
384
|
+
});
|
|
385
|
+
const createTheme = (overrides = {})=>_object_spread({}, lightTheme, overrides);
|
|
386
|
+
function dark_define_property(obj, key, value) {
|
|
387
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
388
|
+
value: value,
|
|
389
|
+
enumerable: true,
|
|
390
|
+
configurable: true,
|
|
391
|
+
writable: true
|
|
392
|
+
});
|
|
393
|
+
else obj[key] = value;
|
|
394
|
+
return obj;
|
|
395
|
+
}
|
|
396
|
+
function dark_object_spread(target) {
|
|
397
|
+
for(var i = 1; i < arguments.length; i++){
|
|
398
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
399
|
+
var ownKeys = Object.keys(source);
|
|
400
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
401
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
402
|
+
}));
|
|
403
|
+
ownKeys.forEach(function(key) {
|
|
404
|
+
dark_define_property(target, key, source[key]);
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
return target;
|
|
408
|
+
}
|
|
409
|
+
function dark_ownKeys(object, enumerableOnly) {
|
|
410
|
+
var keys = Object.keys(object);
|
|
411
|
+
if (Object.getOwnPropertySymbols) {
|
|
412
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
413
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
414
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
415
|
+
});
|
|
416
|
+
keys.push.apply(keys, symbols);
|
|
417
|
+
}
|
|
418
|
+
return keys;
|
|
419
|
+
}
|
|
420
|
+
function dark_object_spread_props(target, source) {
|
|
421
|
+
source = null != source ? source : {};
|
|
422
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
423
|
+
else dark_ownKeys(Object(source)).forEach(function(key) {
|
|
424
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
425
|
+
});
|
|
426
|
+
return target;
|
|
427
|
+
}
|
|
428
|
+
const stoneDark = {
|
|
429
|
+
50: '#100E17',
|
|
430
|
+
100: '#161320',
|
|
431
|
+
200: '#221C30',
|
|
432
|
+
300: '#362E4C',
|
|
433
|
+
400: '#493D64',
|
|
434
|
+
500: '#7C7191',
|
|
435
|
+
600: '#B9B3CB',
|
|
436
|
+
700: '#D6D2E0',
|
|
437
|
+
800: '#E9E7EF',
|
|
438
|
+
900: '#F1EFF5'
|
|
439
|
+
};
|
|
440
|
+
const paperDark = stoneDark[200];
|
|
441
|
+
const duskDark = {
|
|
442
|
+
tint: '#2E2648',
|
|
443
|
+
600: '#B49BEA',
|
|
444
|
+
700: '#CBB8F2',
|
|
445
|
+
onDusk: '#1A1425'
|
|
446
|
+
};
|
|
447
|
+
const mossDark = {
|
|
448
|
+
tint: '#22332A',
|
|
449
|
+
700: '#7FB89A'
|
|
450
|
+
};
|
|
451
|
+
const emberDark = {
|
|
452
|
+
tint: '#3A281F',
|
|
453
|
+
600: '#E08D6D',
|
|
454
|
+
700: '#E3977A',
|
|
455
|
+
onEmber: '#2A1208'
|
|
456
|
+
};
|
|
457
|
+
const saffronDark = {
|
|
458
|
+
tint: '#3A2F1B',
|
|
459
|
+
700: '#D9A15C'
|
|
460
|
+
};
|
|
461
|
+
const shadowDark = {
|
|
462
|
+
sm: '0 1px 1px rgba(0, 0, 0, 0.45)',
|
|
463
|
+
md: '0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.55)',
|
|
464
|
+
lg: '0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.65)'
|
|
465
|
+
};
|
|
466
|
+
const darkTheme = dark_object_spread_props(dark_object_spread({}, base_base), {
|
|
467
|
+
primary: duskDark[600],
|
|
410
468
|
onPrimary: duskDark.onDusk,
|
|
411
|
-
secondary: stoneDark[
|
|
412
|
-
onSecondary: stoneDark[
|
|
469
|
+
secondary: stoneDark[300],
|
|
470
|
+
onSecondary: stoneDark[900],
|
|
413
471
|
surface: paperDark,
|
|
414
472
|
tertiary: duskDark.tint,
|
|
415
|
-
onTertiary: duskDark[
|
|
416
|
-
error: emberDark[
|
|
473
|
+
onTertiary: duskDark[600],
|
|
474
|
+
error: emberDark[600],
|
|
417
475
|
onError: emberDark.onEmber,
|
|
418
|
-
focus: duskDark[
|
|
419
|
-
textDefault: stoneDark[
|
|
420
|
-
textMuted: stoneDark[
|
|
476
|
+
focus: duskDark[600],
|
|
477
|
+
textDefault: stoneDark[900],
|
|
478
|
+
textMuted: stoneDark[600],
|
|
421
479
|
statusInfoBg: duskDark.tint,
|
|
422
|
-
statusInfoText: duskDark[
|
|
480
|
+
statusInfoText: duskDark[600],
|
|
423
481
|
statusSuccessBg: mossDark.tint,
|
|
424
|
-
statusSuccessText: mossDark[
|
|
482
|
+
statusSuccessText: mossDark[700],
|
|
425
483
|
statusWarningBg: saffronDark.tint,
|
|
426
|
-
statusWarningText: saffronDark[
|
|
484
|
+
statusWarningText: saffronDark[700],
|
|
427
485
|
statusErrorBg: emberDark.tint,
|
|
428
|
-
statusErrorText: emberDark[
|
|
429
|
-
borderColorDefault: stoneDark[
|
|
486
|
+
statusErrorText: emberDark[600],
|
|
487
|
+
borderColorDefault: stoneDark[300],
|
|
430
488
|
shadowSm: shadowDark.sm,
|
|
431
489
|
shadowMd: shadowDark.md,
|
|
432
490
|
shadowLg: shadowDark.lg,
|
|
@@ -434,33 +492,133 @@ const darkTheme = _object_spread_props(_object_spread({}, structural), {
|
|
|
434
492
|
elevationOverlay: shadowDark.md,
|
|
435
493
|
elevationModal: shadowDark.lg
|
|
436
494
|
});
|
|
437
|
-
const
|
|
438
|
-
primary:
|
|
439
|
-
onTertiary:
|
|
440
|
-
focus:
|
|
441
|
-
error:
|
|
442
|
-
statusErrorText:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
495
|
+
const darkHighContrastTheme = dark_object_spread_props(dark_object_spread({}, darkTheme), {
|
|
496
|
+
primary: duskDark[700],
|
|
497
|
+
onTertiary: duskDark[700],
|
|
498
|
+
focus: duskDark[700],
|
|
499
|
+
error: emberDark[700],
|
|
500
|
+
statusErrorText: emberDark[700],
|
|
501
|
+
borderColorDefault: stoneDark[600]
|
|
502
|
+
});
|
|
503
|
+
function orange_define_property(obj, key, value) {
|
|
504
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
505
|
+
value: value,
|
|
506
|
+
enumerable: true,
|
|
507
|
+
configurable: true,
|
|
508
|
+
writable: true
|
|
509
|
+
});
|
|
510
|
+
else obj[key] = value;
|
|
511
|
+
return obj;
|
|
512
|
+
}
|
|
513
|
+
function orange_object_spread(target) {
|
|
514
|
+
for(var i = 1; i < arguments.length; i++){
|
|
515
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
516
|
+
var ownKeys = Object.keys(source);
|
|
517
|
+
if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
518
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
519
|
+
}));
|
|
520
|
+
ownKeys.forEach(function(key) {
|
|
521
|
+
orange_define_property(target, key, source[key]);
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
return target;
|
|
525
|
+
}
|
|
526
|
+
function orange_ownKeys(object, enumerableOnly) {
|
|
527
|
+
var keys = Object.keys(object);
|
|
528
|
+
if (Object.getOwnPropertySymbols) {
|
|
529
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
530
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
531
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
532
|
+
});
|
|
533
|
+
keys.push.apply(keys, symbols);
|
|
534
|
+
}
|
|
535
|
+
return keys;
|
|
536
|
+
}
|
|
537
|
+
function orange_object_spread_props(target, source) {
|
|
538
|
+
source = null != source ? source : {};
|
|
539
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
540
|
+
else orange_ownKeys(Object(source)).forEach(function(key) {
|
|
541
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
542
|
+
});
|
|
543
|
+
return target;
|
|
544
|
+
}
|
|
545
|
+
const sand = {
|
|
546
|
+
50: '#FFFBF5',
|
|
547
|
+
100: '#FDF0E1',
|
|
548
|
+
200: '#F0D9BC',
|
|
549
|
+
300: '#DEBB8C',
|
|
550
|
+
400: '#BE8F58',
|
|
551
|
+
500: '#8F6A3F',
|
|
552
|
+
600: '#6B4F30',
|
|
553
|
+
700: '#523D26',
|
|
554
|
+
800: '#382A1A',
|
|
555
|
+
900: '#221A10'
|
|
556
|
+
};
|
|
557
|
+
const paperSand = '#FFF8F0';
|
|
558
|
+
const sunrise = {
|
|
559
|
+
tint: '#FFE9DF',
|
|
560
|
+
600: '#FF5A2B',
|
|
561
|
+
700: '#B8380C',
|
|
562
|
+
800: '#8F2C08',
|
|
563
|
+
onSunrise: '#2A1206'
|
|
564
|
+
};
|
|
565
|
+
const shadowSand = {
|
|
566
|
+
sm: '0 1px 1px rgba(60, 30, 10, 0.06)',
|
|
567
|
+
md: '0 1px 2px rgba(60, 30, 10, 0.05), 0 8px 20px -8px rgba(90, 40, 10, 0.18)',
|
|
568
|
+
lg: '0 2px 4px rgba(60, 30, 10, 0.06), 0 16px 40px -12px rgba(90, 40, 10, 0.28)'
|
|
569
|
+
};
|
|
570
|
+
const orangeTheme = orange_object_spread_props(orange_object_spread({}, base_base), {
|
|
571
|
+
primary: sunrise[600],
|
|
572
|
+
onPrimary: sunrise.onSunrise,
|
|
573
|
+
secondary: sand[200],
|
|
574
|
+
onSecondary: sand[900],
|
|
575
|
+
surface: paperSand,
|
|
576
|
+
tertiary: sunrise.tint,
|
|
577
|
+
onTertiary: sunrise[700],
|
|
578
|
+
error: ember["600"],
|
|
579
|
+
onError: ember.onEmber,
|
|
580
|
+
focus: sunrise[700],
|
|
581
|
+
textDefault: sand[900],
|
|
582
|
+
textMuted: sand[700],
|
|
583
|
+
statusInfoBg: dusk.tint,
|
|
584
|
+
statusInfoText: dusk["600"],
|
|
585
|
+
statusSuccessBg: moss.tint,
|
|
586
|
+
statusSuccessText: moss["700"],
|
|
587
|
+
statusWarningBg: saffron.tint,
|
|
588
|
+
statusWarningText: saffron["700"],
|
|
589
|
+
statusErrorBg: ember.tint,
|
|
590
|
+
statusErrorText: ember["600"],
|
|
591
|
+
borderColorDefault: sand[200],
|
|
592
|
+
shadowSm: shadowSand.sm,
|
|
593
|
+
shadowMd: shadowSand.md,
|
|
594
|
+
shadowLg: shadowSand.lg,
|
|
595
|
+
elevationRaised: shadowSand.sm,
|
|
596
|
+
elevationOverlay: shadowSand.md,
|
|
597
|
+
elevationModal: shadowSand.lg
|
|
446
598
|
});
|
|
447
|
-
const
|
|
448
|
-
primary:
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
599
|
+
const orangeHighContrastTheme = orange_object_spread_props(orange_object_spread({}, orangeTheme), {
|
|
600
|
+
primary: sunrise[800],
|
|
601
|
+
onPrimary: '#FFFFFF',
|
|
602
|
+
onTertiary: sunrise[800],
|
|
603
|
+
focus: sunrise[800],
|
|
604
|
+
error: ember["800"],
|
|
605
|
+
statusErrorText: ember["800"],
|
|
606
|
+
statusWarningText: saffron["900"],
|
|
607
|
+
statusSuccessText: moss["900"],
|
|
608
|
+
borderColorDefault: sand[600]
|
|
454
609
|
});
|
|
455
|
-
const createTheme = (overrides = {})=>_object_spread({}, defaultTheme, overrides);
|
|
456
610
|
const themes = {
|
|
457
611
|
light: {
|
|
458
|
-
normal:
|
|
459
|
-
high:
|
|
612
|
+
normal: lightTheme,
|
|
613
|
+
high: lightHighContrastTheme
|
|
460
614
|
},
|
|
461
615
|
dark: {
|
|
462
616
|
normal: darkTheme,
|
|
463
617
|
high: darkHighContrastTheme
|
|
618
|
+
},
|
|
619
|
+
orange: {
|
|
620
|
+
normal: orangeTheme,
|
|
621
|
+
high: orangeHighContrastTheme
|
|
464
622
|
}
|
|
465
623
|
};
|
|
466
624
|
const resolveBaseTheme = (colorScheme, contrast)=>{
|
|
@@ -468,17 +626,17 @@ const resolveBaseTheme = (colorScheme, contrast)=>{
|
|
|
468
626
|
const theme = null == (_themes_colorScheme = themes[colorScheme]) ? void 0 : _themes_colorScheme[contrast];
|
|
469
627
|
if (!theme) {
|
|
470
628
|
if ('production' !== process.env.NODE_ENV) console.warn(`[vinyasa] no theme values for colorScheme="${colorScheme}" contrast="${contrast}" yet; falling back to light/normal.`);
|
|
471
|
-
return
|
|
629
|
+
return lightTheme;
|
|
472
630
|
}
|
|
473
631
|
return theme;
|
|
474
632
|
};
|
|
475
633
|
const comfortableSpacing = {
|
|
476
|
-
space1:
|
|
477
|
-
space2:
|
|
478
|
-
space3:
|
|
479
|
-
space4:
|
|
480
|
-
space5:
|
|
481
|
-
space6:
|
|
634
|
+
space1: base_base.space1,
|
|
635
|
+
space2: base_base.space2,
|
|
636
|
+
space3: base_base.space3,
|
|
637
|
+
space4: base_base.space4,
|
|
638
|
+
space5: base_base.space5,
|
|
639
|
+
space6: base_base.space6
|
|
482
640
|
};
|
|
483
641
|
const compactSpacing = {
|
|
484
642
|
space1: '0.125rem',
|
|
@@ -571,7 +729,7 @@ function VinyasaProvider_object_spread(target) {
|
|
|
571
729
|
}
|
|
572
730
|
return target;
|
|
573
731
|
}
|
|
574
|
-
const ThemeContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(
|
|
732
|
+
const ThemeContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)(lightTheme);
|
|
575
733
|
const useVinyasaTheme = ()=>(0, external_react_namespaceObject.useContext)(ThemeContext);
|
|
576
734
|
const VinyasaProvider = ({ theme, colorScheme = 'light', contrast = 'normal', density = 'comfortable', children })=>{
|
|
577
735
|
const base = (0, external_react_namespaceObject.useMemo)(()=>resolveBaseTheme(colorScheme, contrast), [
|
|
@@ -609,10 +767,12 @@ exports.breakpoints = __webpack_exports__.breakpoints;
|
|
|
609
767
|
exports.createTheme = __webpack_exports__.createTheme;
|
|
610
768
|
exports.darkHighContrastTheme = __webpack_exports__.darkHighContrastTheme;
|
|
611
769
|
exports.darkTheme = __webpack_exports__.darkTheme;
|
|
612
|
-
exports.defaultTheme = __webpack_exports__.defaultTheme;
|
|
613
770
|
exports.focusRingStyle = __webpack_exports__.focusRingStyle;
|
|
614
771
|
exports.grid = __webpack_exports__.grid;
|
|
615
|
-
exports.
|
|
772
|
+
exports.lightHighContrastTheme = __webpack_exports__.lightHighContrastTheme;
|
|
773
|
+
exports.lightTheme = __webpack_exports__.lightTheme;
|
|
774
|
+
exports.orangeHighContrastTheme = __webpack_exports__.orangeHighContrastTheme;
|
|
775
|
+
exports.orangeTheme = __webpack_exports__.orangeTheme;
|
|
616
776
|
exports.resolveBaseTheme = __webpack_exports__.resolveBaseTheme;
|
|
617
777
|
exports.resolveDensitySpacing = __webpack_exports__.resolveDensitySpacing;
|
|
618
778
|
exports.themeContract = __webpack_exports__.themeContract;
|
|
@@ -625,10 +785,12 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
625
785
|
"createTheme",
|
|
626
786
|
"darkHighContrastTheme",
|
|
627
787
|
"darkTheme",
|
|
628
|
-
"defaultTheme",
|
|
629
788
|
"focusRingStyle",
|
|
630
789
|
"grid",
|
|
631
|
-
"
|
|
790
|
+
"lightHighContrastTheme",
|
|
791
|
+
"lightTheme",
|
|
792
|
+
"orangeHighContrastTheme",
|
|
793
|
+
"orangeTheme",
|
|
632
794
|
"resolveBaseTheme",
|
|
633
795
|
"resolveDensitySpacing",
|
|
634
796
|
"themeContract",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type Density } from './density';
|
|
3
|
-
import { type VinyasaTheme } from './theme';
|
|
4
3
|
import { type ColorScheme, type Contrast } from './themes';
|
|
4
|
+
import { type VinyasaTheme } from './themes/base';
|
|
5
5
|
export declare const useVinyasaTheme: () => VinyasaTheme;
|
|
6
6
|
export interface VinyasaProviderProps {
|
|
7
7
|
theme?: Partial<VinyasaTheme>;
|
package/dist/esm/density.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VinyasaTheme } from './
|
|
1
|
+
import { type VinyasaTheme } from './themes/base';
|
|
2
2
|
export type Density = 'compact' | 'comfortable' | 'spacious';
|
|
3
3
|
type DensitySpacing = Pick<VinyasaTheme, 'space1' | 'space2' | 'space3' | 'space4' | 'space5' | 'space6'>;
|
|
4
4
|
export declare const resolveDensitySpacing: (density: Density) => DensitySpacing;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { themeContract } from './contract.css';
|
|
2
2
|
export { focusRingStyle } from './focusRing';
|
|
3
|
-
export {
|
|
3
|
+
export { type VinyasaTheme } from './themes/base';
|
|
4
|
+
export { createTheme, lightHighContrastTheme, lightTheme } from './themes/light';
|
|
5
|
+
export { darkHighContrastTheme, darkTheme } from './themes/dark';
|
|
6
|
+
export { orangeHighContrastTheme, orangeTheme } from './themes/orange';
|
|
4
7
|
export { resolveBaseTheme, type ColorScheme, type Contrast } from './themes';
|
|
5
8
|
export { resolveDensitySpacing, type Density } from './density';
|
|
6
9
|
export { breakpoints, grid } from './layout';
|
package/dist/esm/index.js
CHANGED
|
@@ -86,73 +86,30 @@ const focusRingStyle = (vars)=>({
|
|
|
86
86
|
borderColor: vars.focus,
|
|
87
87
|
boxShadow: `0 0 0 1px ${vars.focus}, 0 0 0 4px color-mix(in srgb, ${vars.focus} 16%, transparent)`
|
|
88
88
|
});
|
|
89
|
-
const stone = {
|
|
90
|
-
50: '#FAFAFC',
|
|
91
|
-
100: '#F6F5F8',
|
|
92
|
-
200: '#E3E0EA',
|
|
93
|
-
300: '#CFCADC',
|
|
94
|
-
400: '#A79DBE',
|
|
95
|
-
500: '#7C7191',
|
|
96
|
-
600: '#5C5470',
|
|
97
|
-
700: '#4A4458',
|
|
98
|
-
800: '#332E40',
|
|
99
|
-
900: '#1E1A28'
|
|
100
|
-
};
|
|
101
|
-
const stoneDark = {
|
|
102
|
-
50: '#100E17',
|
|
103
|
-
100: '#161320',
|
|
104
|
-
200: '#221C30',
|
|
105
|
-
300: '#362E4C',
|
|
106
|
-
400: '#493D64',
|
|
107
|
-
500: '#7C7191',
|
|
108
|
-
600: '#B9B3CB',
|
|
109
|
-
700: '#D6D2E0',
|
|
110
|
-
800: '#E9E7EF',
|
|
111
|
-
900: '#F1EFF5'
|
|
112
|
-
};
|
|
113
|
-
const paper = '#FFFFFF';
|
|
114
|
-
const paperDark = stoneDark[200];
|
|
115
89
|
const dusk = {
|
|
116
90
|
tint: '#EEE9F9',
|
|
117
91
|
600: '#4B2E8C',
|
|
118
92
|
700: '#37206B',
|
|
119
93
|
onDusk: '#FFFFFF'
|
|
120
94
|
};
|
|
121
|
-
const duskDark = {
|
|
122
|
-
tint: '#2E2648',
|
|
123
|
-
600: '#B49BEA',
|
|
124
|
-
700: '#CBB8F2',
|
|
125
|
-
onDusk: '#1A1425'
|
|
126
|
-
};
|
|
127
95
|
const moss = {
|
|
128
96
|
tint: '#E4EEE8',
|
|
129
97
|
700: '#3F6650',
|
|
130
|
-
800: '#3B604B'
|
|
131
|
-
|
|
132
|
-
const mossDark = {
|
|
133
|
-
tint: '#22332A',
|
|
134
|
-
700: '#7FB89A'
|
|
98
|
+
800: '#3B604B',
|
|
99
|
+
900: '#385B47'
|
|
135
100
|
};
|
|
136
101
|
const ember = {
|
|
137
102
|
tint: '#F7E7E1',
|
|
138
103
|
600: '#A64B2A',
|
|
139
104
|
700: '#8E4024',
|
|
105
|
+
800: '#863C22',
|
|
140
106
|
onEmber: '#FFFFFF'
|
|
141
107
|
};
|
|
142
|
-
const emberDark = {
|
|
143
|
-
tint: '#3A281F',
|
|
144
|
-
600: '#E08D6D',
|
|
145
|
-
700: '#E3977A',
|
|
146
|
-
onEmber: '#2A1208'
|
|
147
|
-
};
|
|
148
108
|
const saffron = {
|
|
149
109
|
tint: '#F5EBDD',
|
|
150
110
|
700: '#A15C1F',
|
|
151
|
-
800: '#834B19'
|
|
152
|
-
|
|
153
|
-
const saffronDark = {
|
|
154
|
-
tint: '#3A2F1B',
|
|
155
|
-
700: '#D9A15C'
|
|
111
|
+
800: '#834B19',
|
|
112
|
+
900: '#7C4717'
|
|
156
113
|
};
|
|
157
114
|
const space = {
|
|
158
115
|
1: '0.25rem',
|
|
@@ -218,16 +175,6 @@ const opacity = {
|
|
|
218
175
|
disabled: '0.5',
|
|
219
176
|
hover: '0.92'
|
|
220
177
|
};
|
|
221
|
-
const shadow = {
|
|
222
|
-
sm: '0 1px 1px rgba(30, 20, 50, 0.06)',
|
|
223
|
-
md: '0 1px 2px rgba(30, 20, 50, 0.05), 0 8px 20px -8px rgba(43, 26, 90, 0.18)',
|
|
224
|
-
lg: '0 2px 4px rgba(30, 20, 50, 0.06), 0 16px 40px -12px rgba(43, 26, 90, 0.28)'
|
|
225
|
-
};
|
|
226
|
-
const shadowDark = {
|
|
227
|
-
sm: '0 1px 1px rgba(0, 0, 0, 0.45)',
|
|
228
|
-
md: '0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.55)',
|
|
229
|
-
lg: '0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.65)'
|
|
230
|
-
};
|
|
231
178
|
const primitives_blur = {
|
|
232
179
|
sm: '4px',
|
|
233
180
|
md: '8px',
|
|
@@ -240,7 +187,7 @@ const zIndex = {
|
|
|
240
187
|
toast: '1300',
|
|
241
188
|
tooltip: '1400'
|
|
242
189
|
};
|
|
243
|
-
const
|
|
190
|
+
const base_base = {
|
|
244
191
|
space1: space["1"],
|
|
245
192
|
space2: space["2"],
|
|
246
193
|
space3: space["3"],
|
|
@@ -292,20 +239,38 @@ const structural = {
|
|
|
292
239
|
zIndexToast: zIndex.toast,
|
|
293
240
|
zIndexTooltip: zIndex.tooltip
|
|
294
241
|
};
|
|
295
|
-
const
|
|
296
|
-
|
|
242
|
+
const stone = {
|
|
243
|
+
50: '#FAFAFC',
|
|
244
|
+
100: '#F6F5F8',
|
|
245
|
+
200: '#E3E0EA',
|
|
246
|
+
300: '#CFCADC',
|
|
247
|
+
400: '#A79DBE',
|
|
248
|
+
500: '#7C7191',
|
|
249
|
+
600: '#5C5470',
|
|
250
|
+
700: '#4A4458',
|
|
251
|
+
800: '#332E40',
|
|
252
|
+
900: '#1E1A28'
|
|
253
|
+
};
|
|
254
|
+
const paper = '#FFFFFF';
|
|
255
|
+
const shadow = {
|
|
256
|
+
sm: '0 1px 1px rgba(30, 20, 50, 0.06)',
|
|
257
|
+
md: '0 1px 2px rgba(30, 20, 50, 0.05), 0 8px 20px -8px rgba(43, 26, 90, 0.18)',
|
|
258
|
+
lg: '0 2px 4px rgba(30, 20, 50, 0.06), 0 16px 40px -12px rgba(43, 26, 90, 0.28)'
|
|
259
|
+
};
|
|
260
|
+
const lightTheme = {
|
|
261
|
+
...base_base,
|
|
297
262
|
primary: dusk["600"],
|
|
298
263
|
onPrimary: dusk.onDusk,
|
|
299
|
-
secondary: stone[
|
|
300
|
-
onSecondary: stone[
|
|
264
|
+
secondary: stone[200],
|
|
265
|
+
onSecondary: stone[900],
|
|
301
266
|
surface: paper,
|
|
302
267
|
tertiary: dusk.tint,
|
|
303
268
|
onTertiary: dusk["600"],
|
|
304
269
|
error: ember["600"],
|
|
305
270
|
onError: ember.onEmber,
|
|
306
271
|
focus: dusk["600"],
|
|
307
|
-
textDefault: stone[
|
|
308
|
-
textMuted: stone[
|
|
272
|
+
textDefault: stone[900],
|
|
273
|
+
textMuted: stone[700],
|
|
309
274
|
statusInfoBg: dusk.tint,
|
|
310
275
|
statusInfoText: dusk["600"],
|
|
311
276
|
statusSuccessBg: moss.tint,
|
|
@@ -314,7 +279,7 @@ const defaultTheme = {
|
|
|
314
279
|
statusWarningText: saffron["700"],
|
|
315
280
|
statusErrorBg: ember.tint,
|
|
316
281
|
statusErrorText: ember["600"],
|
|
317
|
-
borderColorDefault: stone[
|
|
282
|
+
borderColorDefault: stone[200],
|
|
318
283
|
shadowSm: shadow.sm,
|
|
319
284
|
shadowMd: shadow.md,
|
|
320
285
|
shadowLg: shadow.lg,
|
|
@@ -322,29 +287,82 @@ const defaultTheme = {
|
|
|
322
287
|
elevationOverlay: shadow.md,
|
|
323
288
|
elevationModal: shadow.lg
|
|
324
289
|
};
|
|
290
|
+
const lightHighContrastTheme = {
|
|
291
|
+
...lightTheme,
|
|
292
|
+
primary: dusk["700"],
|
|
293
|
+
onTertiary: dusk["700"],
|
|
294
|
+
focus: dusk["700"],
|
|
295
|
+
error: ember["700"],
|
|
296
|
+
statusErrorText: ember["700"],
|
|
297
|
+
statusWarningText: saffron["800"],
|
|
298
|
+
statusSuccessText: moss["800"],
|
|
299
|
+
borderColorDefault: stone[600]
|
|
300
|
+
};
|
|
301
|
+
const createTheme = (overrides = {})=>({
|
|
302
|
+
...lightTheme,
|
|
303
|
+
...overrides
|
|
304
|
+
});
|
|
305
|
+
const stoneDark = {
|
|
306
|
+
50: '#100E17',
|
|
307
|
+
100: '#161320',
|
|
308
|
+
200: '#221C30',
|
|
309
|
+
300: '#362E4C',
|
|
310
|
+
400: '#493D64',
|
|
311
|
+
500: '#7C7191',
|
|
312
|
+
600: '#B9B3CB',
|
|
313
|
+
700: '#D6D2E0',
|
|
314
|
+
800: '#E9E7EF',
|
|
315
|
+
900: '#F1EFF5'
|
|
316
|
+
};
|
|
317
|
+
const paperDark = stoneDark[200];
|
|
318
|
+
const duskDark = {
|
|
319
|
+
tint: '#2E2648',
|
|
320
|
+
600: '#B49BEA',
|
|
321
|
+
700: '#CBB8F2',
|
|
322
|
+
onDusk: '#1A1425'
|
|
323
|
+
};
|
|
324
|
+
const mossDark = {
|
|
325
|
+
tint: '#22332A',
|
|
326
|
+
700: '#7FB89A'
|
|
327
|
+
};
|
|
328
|
+
const emberDark = {
|
|
329
|
+
tint: '#3A281F',
|
|
330
|
+
600: '#E08D6D',
|
|
331
|
+
700: '#E3977A',
|
|
332
|
+
onEmber: '#2A1208'
|
|
333
|
+
};
|
|
334
|
+
const saffronDark = {
|
|
335
|
+
tint: '#3A2F1B',
|
|
336
|
+
700: '#D9A15C'
|
|
337
|
+
};
|
|
338
|
+
const shadowDark = {
|
|
339
|
+
sm: '0 1px 1px rgba(0, 0, 0, 0.45)',
|
|
340
|
+
md: '0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.55)',
|
|
341
|
+
lg: '0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.65)'
|
|
342
|
+
};
|
|
325
343
|
const darkTheme = {
|
|
326
|
-
...
|
|
327
|
-
primary: duskDark[
|
|
344
|
+
...base_base,
|
|
345
|
+
primary: duskDark[600],
|
|
328
346
|
onPrimary: duskDark.onDusk,
|
|
329
|
-
secondary: stoneDark[
|
|
330
|
-
onSecondary: stoneDark[
|
|
347
|
+
secondary: stoneDark[300],
|
|
348
|
+
onSecondary: stoneDark[900],
|
|
331
349
|
surface: paperDark,
|
|
332
350
|
tertiary: duskDark.tint,
|
|
333
|
-
onTertiary: duskDark[
|
|
334
|
-
error: emberDark[
|
|
351
|
+
onTertiary: duskDark[600],
|
|
352
|
+
error: emberDark[600],
|
|
335
353
|
onError: emberDark.onEmber,
|
|
336
|
-
focus: duskDark[
|
|
337
|
-
textDefault: stoneDark[
|
|
338
|
-
textMuted: stoneDark[
|
|
354
|
+
focus: duskDark[600],
|
|
355
|
+
textDefault: stoneDark[900],
|
|
356
|
+
textMuted: stoneDark[600],
|
|
339
357
|
statusInfoBg: duskDark.tint,
|
|
340
|
-
statusInfoText: duskDark[
|
|
358
|
+
statusInfoText: duskDark[600],
|
|
341
359
|
statusSuccessBg: mossDark.tint,
|
|
342
|
-
statusSuccessText: mossDark[
|
|
360
|
+
statusSuccessText: mossDark[700],
|
|
343
361
|
statusWarningBg: saffronDark.tint,
|
|
344
|
-
statusWarningText: saffronDark[
|
|
362
|
+
statusWarningText: saffronDark[700],
|
|
345
363
|
statusErrorBg: emberDark.tint,
|
|
346
|
-
statusErrorText: emberDark[
|
|
347
|
-
borderColorDefault: stoneDark[
|
|
364
|
+
statusErrorText: emberDark[600],
|
|
365
|
+
borderColorDefault: stoneDark[300],
|
|
348
366
|
shadowSm: shadowDark.sm,
|
|
349
367
|
shadowMd: shadowDark.md,
|
|
350
368
|
shadowLg: shadowDark.lg,
|
|
@@ -352,55 +370,111 @@ const darkTheme = {
|
|
|
352
370
|
elevationOverlay: shadowDark.md,
|
|
353
371
|
elevationModal: shadowDark.lg
|
|
354
372
|
};
|
|
355
|
-
const highContrastTheme = {
|
|
356
|
-
...defaultTheme,
|
|
357
|
-
primary: dusk["700"],
|
|
358
|
-
onTertiary: dusk["700"],
|
|
359
|
-
focus: dusk["700"],
|
|
360
|
-
error: ember["700"],
|
|
361
|
-
statusErrorText: ember["700"],
|
|
362
|
-
statusWarningText: saffron["800"],
|
|
363
|
-
statusSuccessText: moss["800"],
|
|
364
|
-
borderColorDefault: stone["600"]
|
|
365
|
-
};
|
|
366
373
|
const darkHighContrastTheme = {
|
|
367
374
|
...darkTheme,
|
|
368
|
-
primary: duskDark[
|
|
369
|
-
onTertiary: duskDark[
|
|
370
|
-
focus: duskDark[
|
|
371
|
-
error: emberDark[
|
|
372
|
-
statusErrorText: emberDark[
|
|
373
|
-
borderColorDefault: stoneDark[
|
|
375
|
+
primary: duskDark[700],
|
|
376
|
+
onTertiary: duskDark[700],
|
|
377
|
+
focus: duskDark[700],
|
|
378
|
+
error: emberDark[700],
|
|
379
|
+
statusErrorText: emberDark[700],
|
|
380
|
+
borderColorDefault: stoneDark[600]
|
|
381
|
+
};
|
|
382
|
+
const sand = {
|
|
383
|
+
50: '#FFFBF5',
|
|
384
|
+
100: '#FDF0E1',
|
|
385
|
+
200: '#F0D9BC',
|
|
386
|
+
300: '#DEBB8C',
|
|
387
|
+
400: '#BE8F58',
|
|
388
|
+
500: '#8F6A3F',
|
|
389
|
+
600: '#6B4F30',
|
|
390
|
+
700: '#523D26',
|
|
391
|
+
800: '#382A1A',
|
|
392
|
+
900: '#221A10'
|
|
393
|
+
};
|
|
394
|
+
const paperSand = '#FFF8F0';
|
|
395
|
+
const sunrise = {
|
|
396
|
+
tint: '#FFE9DF',
|
|
397
|
+
600: '#FF5A2B',
|
|
398
|
+
700: '#B8380C',
|
|
399
|
+
800: '#8F2C08',
|
|
400
|
+
onSunrise: '#2A1206'
|
|
401
|
+
};
|
|
402
|
+
const shadowSand = {
|
|
403
|
+
sm: '0 1px 1px rgba(60, 30, 10, 0.06)',
|
|
404
|
+
md: '0 1px 2px rgba(60, 30, 10, 0.05), 0 8px 20px -8px rgba(90, 40, 10, 0.18)',
|
|
405
|
+
lg: '0 2px 4px rgba(60, 30, 10, 0.06), 0 16px 40px -12px rgba(90, 40, 10, 0.28)'
|
|
406
|
+
};
|
|
407
|
+
const orangeTheme = {
|
|
408
|
+
...base_base,
|
|
409
|
+
primary: sunrise[600],
|
|
410
|
+
onPrimary: sunrise.onSunrise,
|
|
411
|
+
secondary: sand[200],
|
|
412
|
+
onSecondary: sand[900],
|
|
413
|
+
surface: paperSand,
|
|
414
|
+
tertiary: sunrise.tint,
|
|
415
|
+
onTertiary: sunrise[700],
|
|
416
|
+
error: ember["600"],
|
|
417
|
+
onError: ember.onEmber,
|
|
418
|
+
focus: sunrise[700],
|
|
419
|
+
textDefault: sand[900],
|
|
420
|
+
textMuted: sand[700],
|
|
421
|
+
statusInfoBg: dusk.tint,
|
|
422
|
+
statusInfoText: dusk["600"],
|
|
423
|
+
statusSuccessBg: moss.tint,
|
|
424
|
+
statusSuccessText: moss["700"],
|
|
425
|
+
statusWarningBg: saffron.tint,
|
|
426
|
+
statusWarningText: saffron["700"],
|
|
427
|
+
statusErrorBg: ember.tint,
|
|
428
|
+
statusErrorText: ember["600"],
|
|
429
|
+
borderColorDefault: sand[200],
|
|
430
|
+
shadowSm: shadowSand.sm,
|
|
431
|
+
shadowMd: shadowSand.md,
|
|
432
|
+
shadowLg: shadowSand.lg,
|
|
433
|
+
elevationRaised: shadowSand.sm,
|
|
434
|
+
elevationOverlay: shadowSand.md,
|
|
435
|
+
elevationModal: shadowSand.lg
|
|
436
|
+
};
|
|
437
|
+
const orangeHighContrastTheme = {
|
|
438
|
+
...orangeTheme,
|
|
439
|
+
primary: sunrise[800],
|
|
440
|
+
onPrimary: '#FFFFFF',
|
|
441
|
+
onTertiary: sunrise[800],
|
|
442
|
+
focus: sunrise[800],
|
|
443
|
+
error: ember["800"],
|
|
444
|
+
statusErrorText: ember["800"],
|
|
445
|
+
statusWarningText: saffron["900"],
|
|
446
|
+
statusSuccessText: moss["900"],
|
|
447
|
+
borderColorDefault: sand[600]
|
|
374
448
|
};
|
|
375
|
-
const createTheme = (overrides = {})=>({
|
|
376
|
-
...defaultTheme,
|
|
377
|
-
...overrides
|
|
378
|
-
});
|
|
379
449
|
const themes = {
|
|
380
450
|
light: {
|
|
381
|
-
normal:
|
|
382
|
-
high:
|
|
451
|
+
normal: lightTheme,
|
|
452
|
+
high: lightHighContrastTheme
|
|
383
453
|
},
|
|
384
454
|
dark: {
|
|
385
455
|
normal: darkTheme,
|
|
386
456
|
high: darkHighContrastTheme
|
|
457
|
+
},
|
|
458
|
+
orange: {
|
|
459
|
+
normal: orangeTheme,
|
|
460
|
+
high: orangeHighContrastTheme
|
|
387
461
|
}
|
|
388
462
|
};
|
|
389
463
|
const resolveBaseTheme = (colorScheme, contrast)=>{
|
|
390
464
|
const theme = themes[colorScheme]?.[contrast];
|
|
391
465
|
if (!theme) {
|
|
392
466
|
if ('production' !== process.env.NODE_ENV) console.warn(`[vinyasa] no theme values for colorScheme="${colorScheme}" contrast="${contrast}" yet; falling back to light/normal.`);
|
|
393
|
-
return
|
|
467
|
+
return lightTheme;
|
|
394
468
|
}
|
|
395
469
|
return theme;
|
|
396
470
|
};
|
|
397
471
|
const comfortableSpacing = {
|
|
398
|
-
space1:
|
|
399
|
-
space2:
|
|
400
|
-
space3:
|
|
401
|
-
space4:
|
|
402
|
-
space5:
|
|
403
|
-
space6:
|
|
472
|
+
space1: base_base.space1,
|
|
473
|
+
space2: base_base.space2,
|
|
474
|
+
space3: base_base.space3,
|
|
475
|
+
space4: base_base.space4,
|
|
476
|
+
space5: base_base.space5,
|
|
477
|
+
space6: base_base.space6
|
|
404
478
|
};
|
|
405
479
|
const compactSpacing = {
|
|
406
480
|
space1: '0.125rem',
|
|
@@ -467,7 +541,7 @@ const useThemedRef = (ref)=>{
|
|
|
467
541
|
return mergeRefs(ref, innerRef);
|
|
468
542
|
};
|
|
469
543
|
var resetScope = '_1k07u5u0';
|
|
470
|
-
const ThemeContext = /*#__PURE__*/ createContext(
|
|
544
|
+
const ThemeContext = /*#__PURE__*/ createContext(lightTheme);
|
|
471
545
|
const useVinyasaTheme = ()=>useContext(ThemeContext);
|
|
472
546
|
const VinyasaProvider = ({ theme, colorScheme = 'light', contrast = 'normal', density = 'comfortable', children })=>{
|
|
473
547
|
const base = useMemo(()=>resolveBaseTheme(colorScheme, contrast), [
|
|
@@ -505,4 +579,4 @@ const VinyasaProvider = ({ theme, colorScheme = 'light', contrast = 'normal', de
|
|
|
505
579
|
})
|
|
506
580
|
});
|
|
507
581
|
};
|
|
508
|
-
export { VinyasaProvider, breakpoints, createTheme, darkHighContrastTheme, darkTheme,
|
|
582
|
+
export { VinyasaProvider, breakpoints, createTheme, darkHighContrastTheme, darkTheme, focusRingStyle, grid, lightHighContrastTheme, lightTheme, orangeHighContrastTheme, orangeTheme, resolveBaseTheme, resolveDensitySpacing, themeContract, useAssertVinyasaProvider, useThemedRef, useVinyasaTheme };
|
package/dist/esm/primitives.d.ts
CHANGED
|
@@ -1,82 +1,33 @@
|
|
|
1
|
-
export declare const stone: {
|
|
2
|
-
readonly 50: "#FAFAFC";
|
|
3
|
-
readonly 100: "#F6F5F8";
|
|
4
|
-
readonly 200: "#E3E0EA";
|
|
5
|
-
readonly 300: "#CFCADC";
|
|
6
|
-
readonly 400: "#A79DBE";
|
|
7
|
-
readonly 500: "#7C7191";
|
|
8
|
-
readonly 600: "#5C5470";
|
|
9
|
-
readonly 700: "#4A4458";
|
|
10
|
-
readonly 800: "#332E40";
|
|
11
|
-
readonly 900: "#1E1A28";
|
|
12
|
-
};
|
|
13
|
-
export declare const stoneDark: {
|
|
14
|
-
readonly 50: "#100E17";
|
|
15
|
-
readonly 100: "#161320";
|
|
16
|
-
readonly 200: "#221C30";
|
|
17
|
-
readonly 300: "#362E4C";
|
|
18
|
-
readonly 400: "#493D64";
|
|
19
|
-
readonly 500: "#7C7191";
|
|
20
|
-
readonly 600: "#B9B3CB";
|
|
21
|
-
readonly 700: "#D6D2E0";
|
|
22
|
-
readonly 800: "#E9E7EF";
|
|
23
|
-
readonly 900: "#F1EFF5";
|
|
24
|
-
};
|
|
25
|
-
export declare const paper = "#FFFFFF";
|
|
26
|
-
export declare const paperDark: "#221C30";
|
|
27
1
|
export declare const dusk: {
|
|
28
2
|
readonly tint: "#EEE9F9";
|
|
29
3
|
readonly 600: "#4B2E8C";
|
|
30
4
|
readonly 700: "#37206B";
|
|
31
5
|
readonly onDusk: "#FFFFFF";
|
|
32
6
|
};
|
|
33
|
-
export declare const duskDark: {
|
|
34
|
-
readonly tint: "#2E2648";
|
|
35
|
-
readonly 600: "#B49BEA";
|
|
36
|
-
readonly 700: "#CBB8F2";
|
|
37
|
-
readonly onDusk: "#1A1425";
|
|
38
|
-
};
|
|
39
|
-
export declare const sunrise: {
|
|
40
|
-
readonly tint: "#FFE9DF";
|
|
41
|
-
readonly 600: "#FF5A2B";
|
|
42
|
-
readonly 700: "#E64719";
|
|
43
|
-
readonly onSunrise: "#2A1206";
|
|
44
|
-
};
|
|
45
|
-
export declare const sunriseDark: {
|
|
46
|
-
readonly tint: "#3D2113";
|
|
47
|
-
readonly 600: "#FF8354";
|
|
48
|
-
readonly 700: "#FFA47C";
|
|
49
|
-
readonly onSunrise: "#200E05";
|
|
50
|
-
};
|
|
51
7
|
export declare const moss: {
|
|
52
8
|
readonly tint: "#E4EEE8";
|
|
53
9
|
readonly 700: "#3F6650";
|
|
54
10
|
readonly 800: "#3B604B";
|
|
55
|
-
|
|
56
|
-
export declare const mossDark: {
|
|
57
|
-
readonly tint: "#22332A";
|
|
58
|
-
readonly 700: "#7FB89A";
|
|
11
|
+
readonly 900: "#385B47";
|
|
59
12
|
};
|
|
60
13
|
export declare const ember: {
|
|
61
14
|
readonly tint: "#F7E7E1";
|
|
62
15
|
readonly 600: "#A64B2A";
|
|
63
16
|
readonly 700: "#8E4024";
|
|
17
|
+
readonly 800: "#863C22";
|
|
64
18
|
readonly onEmber: "#FFFFFF";
|
|
65
19
|
};
|
|
66
|
-
export declare const emberDark: {
|
|
67
|
-
readonly tint: "#3A281F";
|
|
68
|
-
readonly 600: "#E08D6D";
|
|
69
|
-
readonly 700: "#E3977A";
|
|
70
|
-
readonly onEmber: "#2A1208";
|
|
71
|
-
};
|
|
72
20
|
export declare const saffron: {
|
|
73
21
|
readonly tint: "#F5EBDD";
|
|
74
22
|
readonly 700: "#A15C1F";
|
|
75
23
|
readonly 800: "#834B19";
|
|
24
|
+
readonly 900: "#7C4717";
|
|
76
25
|
};
|
|
77
|
-
export declare const
|
|
78
|
-
readonly tint: "#
|
|
79
|
-
readonly
|
|
26
|
+
export declare const sunriseDark: {
|
|
27
|
+
readonly tint: "#3D2113";
|
|
28
|
+
readonly 600: "#FF8354";
|
|
29
|
+
readonly 700: "#FFA47C";
|
|
30
|
+
readonly onSunrise: "#200E05";
|
|
80
31
|
};
|
|
81
32
|
export declare const space: {
|
|
82
33
|
readonly 1: "0.25rem";
|
|
@@ -142,16 +93,6 @@ export declare const opacity: {
|
|
|
142
93
|
readonly disabled: "0.5";
|
|
143
94
|
readonly hover: "0.92";
|
|
144
95
|
};
|
|
145
|
-
export declare const shadow: {
|
|
146
|
-
readonly sm: "0 1px 1px rgba(30, 20, 50, 0.06)";
|
|
147
|
-
readonly md: "0 1px 2px rgba(30, 20, 50, 0.05), 0 8px 20px -8px rgba(43, 26, 90, 0.18)";
|
|
148
|
-
readonly lg: "0 2px 4px rgba(30, 20, 50, 0.06), 0 16px 40px -12px rgba(43, 26, 90, 0.28)";
|
|
149
|
-
};
|
|
150
|
-
export declare const shadowDark: {
|
|
151
|
-
readonly sm: "0 1px 1px rgba(0, 0, 0, 0.45)";
|
|
152
|
-
readonly md: "0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 20px -8px rgba(0, 0, 0, 0.55)";
|
|
153
|
-
readonly lg: "0 2px 4px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.65)";
|
|
154
|
-
};
|
|
155
96
|
export declare const blur: {
|
|
156
97
|
readonly sm: "4px";
|
|
157
98
|
readonly md: "8px";
|
|
@@ -77,8 +77,55 @@ export interface VinyasaTheme {
|
|
|
77
77
|
zIndexToast: string;
|
|
78
78
|
zIndexTooltip: string;
|
|
79
79
|
}
|
|
80
|
-
export declare const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
export declare const base: {
|
|
81
|
+
readonly space1: "0.25rem";
|
|
82
|
+
readonly space2: "0.5rem";
|
|
83
|
+
readonly space3: "0.625rem";
|
|
84
|
+
readonly space4: "1rem";
|
|
85
|
+
readonly space5: "1.25rem";
|
|
86
|
+
readonly space6: "1.5rem";
|
|
87
|
+
readonly radiusSm: "0.25rem";
|
|
88
|
+
readonly radiusMd: "0.5rem";
|
|
89
|
+
readonly radiusFull: "9999px";
|
|
90
|
+
readonly borderWidthThin: "1px";
|
|
91
|
+
readonly fontFamilySans: "'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
|
|
92
|
+
readonly fontFamilyMono: "'IBM Plex Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace";
|
|
93
|
+
readonly fontSizeXs: "0.75rem";
|
|
94
|
+
readonly fontSizeSm: "0.875rem";
|
|
95
|
+
readonly fontSizeMd: "1rem";
|
|
96
|
+
readonly fontSizeLg: "1.125rem";
|
|
97
|
+
readonly fontSizeXl: "1.25rem";
|
|
98
|
+
readonly fontSize2xl: "1.5rem";
|
|
99
|
+
readonly fontSize3xl: "1.875rem";
|
|
100
|
+
readonly fontSize4xl: "2.25rem";
|
|
101
|
+
readonly fontWeightRegular: "400";
|
|
102
|
+
readonly fontWeightMedium: "500";
|
|
103
|
+
readonly fontWeightSemibold: "600";
|
|
104
|
+
readonly fontWeightBold: "700";
|
|
105
|
+
readonly letterSpacingTight: "-0.01em";
|
|
106
|
+
readonly letterSpacingNormal: "0";
|
|
107
|
+
readonly letterSpacingWide: "0.02em";
|
|
108
|
+
readonly lineHeightTight: "1";
|
|
109
|
+
readonly lineHeightNormal: "1.5";
|
|
110
|
+
readonly lineHeightLoose: "1.75";
|
|
111
|
+
readonly motionDurationInstant: "100ms";
|
|
112
|
+
readonly motionDurationFast: "150ms";
|
|
113
|
+
readonly motionDurationNormal: "250ms";
|
|
114
|
+
readonly motionDurationSlow: "400ms";
|
|
115
|
+
readonly motionEasingStandard: "ease";
|
|
116
|
+
readonly motionEasingIn: "ease-in";
|
|
117
|
+
readonly motionEasingOut: "ease-out";
|
|
118
|
+
readonly motionEasingInOut: "ease-in-out";
|
|
119
|
+
readonly focusRingWidth: "2px";
|
|
120
|
+
readonly focusRingOffset: "2px";
|
|
121
|
+
readonly opacityDisabled: "0.5";
|
|
122
|
+
readonly opacityHover: "0.92";
|
|
123
|
+
readonly blurSm: "4px";
|
|
124
|
+
readonly blurMd: "8px";
|
|
125
|
+
readonly blurLg: "16px";
|
|
126
|
+
readonly zIndexDropdown: "1000";
|
|
127
|
+
readonly zIndexOverlay: "1100";
|
|
128
|
+
readonly zIndexModal: "1200";
|
|
129
|
+
readonly zIndexToast: "1300";
|
|
130
|
+
readonly zIndexTooltip: "1400";
|
|
131
|
+
};
|
package/dist/esm/themes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ColorScheme = 'light' | 'dark';
|
|
1
|
+
import type { VinyasaTheme } from './themes/base';
|
|
2
|
+
export type ColorScheme = 'light' | 'dark' | 'orange';
|
|
3
3
|
export type Contrast = 'normal' | 'high';
|
|
4
4
|
export declare const resolveBaseTheme: (colorScheme: ColorScheme, contrast: Contrast) => VinyasaTheme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinyasa/tokens",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "rslib build && node ../../scripts/postbuild-package.mjs",
|
|
49
49
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
50
|
-
"lint": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx} --ignore-pattern src/**/__test__/**",
|
|
51
|
-
"lint:fix": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx} --ignore-pattern src/**/__test__/** --fix",
|
|
50
|
+
"lint": "eslint --config ../../configs/eslint.config.mjs 'src/**/*.{ts,tsx}' --ignore-pattern 'src/**/__test__/**'",
|
|
51
|
+
"lint:fix": "eslint --config ../../configs/eslint.config.mjs 'src/**/*.{ts,tsx}' --ignore-pattern 'src/**/__test__/**' --fix",
|
|
52
52
|
"format": "prettier . --config ../../configs/prettier.config.json --ignore-path ../../configs/.prettierignore --write",
|
|
53
53
|
"format:check": "prettier . --config ../../configs/prettier.config.json --ignore-path ../../configs/.prettierignore --check",
|
|
54
54
|
"test": "vitest run --config vitest.config.ts",
|