@whatsaaaa/design-system 0.8.3 → 0.9.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/README.md +13 -11
- package/dist/index.css +63 -0
- package/dist/tailwind/theme.css +9 -0
- package/dist/tokens.css +77 -1
- package/dist/tokens.d.ts +60 -2
- package/dist/tokens.js +118 -2
- package/docs/usage.md +52 -23
- package/package.json +4 -1
- package/specs/button.spec.json +903 -0
- package/specs/input.spec.json +800 -0
- package/specs/spec.schema.json +347 -0
- package/tokens/components/button.tokens.json +75 -0
- package/tokens/components/control.tokens.json +43 -0
- package/tokens/components/field.tokens.json +40 -0
- package/tokens/contrast.json +12 -0
- package/tokens/core.tokens.json +36 -1
- package/tokens/theme-dark.tokens.json +4 -0
- package/tokens/theme-light.tokens.json +8 -0
- package/tokens/whatsaaaa.resolver.json +17 -1
- package/dist/css/nuxt-ui.css +0 -125
package/README.md
CHANGED
|
@@ -8,14 +8,15 @@ The package is [`@whatsaaaa/design-system`](https://www.npmjs.com/package/@whats
|
|
|
8
8
|
|
|
9
9
|
## What is in it
|
|
10
10
|
|
|
11
|
-
| Part | What it is
|
|
12
|
-
| ----------------------- |
|
|
13
|
-
| Identity | The ghost in every cut, the wordmark, six poses, a sprite per project, favicons, README headers, social cards and a profile banner. All generated
|
|
14
|
-
| Tokens | Rosé Pine main for dark and Dawn for light, mapped to roles, with type, space, radii and motion
|
|
15
|
-
| Styles | Prose, code blocks, tables, lists, callouts, a segmented control, terms and values, and the terminal frame: tab bar, prompts, status line
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
11
|
+
| Part | What it is | Source |
|
|
12
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
13
|
+
| Identity | The ghost in every cut, the wordmark, six poses, a sprite per project, favicons, README headers, social cards and a profile banner. All generated | `src/identity/ghost.ts`, `identity/` |
|
|
14
|
+
| Tokens | Rosé Pine main for dark and Dawn for light, mapped to roles, with type, space, radii and motion, and the component tokens that controls share | `tokens/` |
|
|
15
|
+
| Styles | Prose, code blocks, tables, lists, callouts, a segmented control, terms and values, and the terminal frame: tab bar, prompts, status line | `src/css/` |
|
|
16
|
+
| Component specs | What every implementation of a component draws alike, as data: its parts, kinds, sizes and states and the token each part takes. Button and input so far | `specs/` |
|
|
17
|
+
| The ghost as an element | `<ws-ghost>`, with the easter egg | `src/ghost/` |
|
|
18
|
+
| Docs theme | A VitePress theme on top of VitePress's default theme | `src/vitepress/`, `src/vitepress-config/` |
|
|
19
|
+
| Style guide | A site that shows all of it with real content, in dark and light, and offers the assets for download | `styleguide/` |
|
|
19
20
|
|
|
20
21
|
To use it in another project, install it with `pnpm add @whatsaaaa/design-system` and read [docs/usage.md](./docs/usage.md). It is written for coding agents and is short.
|
|
21
22
|
|
|
@@ -49,6 +50,7 @@ Every script builds what it needs first, so each one works on a fresh checkout.
|
|
|
49
50
|
## Changing things
|
|
50
51
|
|
|
51
52
|
- **A color, a size, a text style.** Edit the files in `tokens/`. They are in the Design Tokens Community Group format and [Terrazzo](https://terrazzo.app) builds them. A color pair that has to stay readable goes in `tokens/contrast.json`, and a test holds it to its bar.
|
|
53
|
+
- **A component token.** Add it to its group's file in `tokens/components/`, as an alias of a role or a measure. A new group is a new file there and a line in the `components` set of `tokens/whatsaaaa.resolver.json`. `docs/decisions.md` says when a token earns its place, and `tests/tier.test.ts` checks its name and alias.
|
|
52
54
|
- **The ghost.** Edit `src/identity/ghost.ts`, then run `pnpm assets`. The kit, the element and the style guide all draw from that file.
|
|
53
55
|
- **A new project.** Add `identity/projects/<name>.json` with its name, a line about it and its sprite, then run `pnpm assets`.
|
|
54
56
|
- **A style.** The stylesheets in `src/css/` take every color from a token. Stylelint rejects a hex value.
|
|
@@ -62,10 +64,10 @@ A pull request that changes what the package ships adds a changeset with `pnpm c
|
|
|
62
64
|
CI runs on every pull request:
|
|
63
65
|
|
|
64
66
|
- formatting, lint and types,
|
|
65
|
-
- the unit tests, with the contrast of every role pair in both themes
|
|
67
|
+
- the unit tests, with the contrast of every role pair in both themes and the comments of the stylesheets in the built ones,
|
|
66
68
|
- that `assets/` is what the sources produce,
|
|
67
69
|
- that the package and the style guide build,
|
|
68
|
-
- the browser tests: no page overflows sideways at phone, tablet and desktop width in either theme, and no terminal window or bar of one cuts off its content, no page logs an error when it loads, the easter egg works with the mouse, the keyboard and reduced motion, the keys of the status line work and their switch turns them off, the numbers of the tabs show only while their keys work and keep their place while the keys load, the current tab keeps its bar in forced colors, in the tab bar and in the docs theme, at phone and desktop width, the path of the status line gives way at every width from 320 px without leaving a stub, and in the docs theme from 180 px with the keys on and 187 px with them off, its items take less padding on a phone and the theme button switches the theme, the content of a window starts at the gutter where the brand of the tab bar does on a phone, in the docs theme too, where a project's mark as the logo starts on it as well and over the sidebar's headings from 60rem up, a `dark` or `light` class chooses the theme as `data-theme` does, an element for one theme shows only in it, the browser's theme-color follows the theme and the page as it is sent has it for both themes, without JavaScript, a control that takes the focus is not left under the status line and no bar or corner of the window cuts off its focus ring, a button of the docs theme takes its ring and not the browser's and the ring of its brand paints over neither the mark nor the name, a code group's language stands in the row of its tabs and off its code, a radius of the page's own wins over the focus ring's and a button without one takes its small corners, with index.css and with tailwind.css, a state lines up with the text beside it, a prompt that wraps keeps its chevron on its first line at every width from 320 px, assistive technology reads the parts of the path above a page title as words of their own, the first tab starts on the border of the sidebar, the pieces of a form fit every width from 320 px (a segmented control works with the keyboard, stands out at 3:1 and takes the selection colors in forced colors, amounts line up at the right in figures of one width, the sections of a review share a term column, two fields share a row from 40rem, a number field has no spin buttons and its arrow keys step it, wrapped code hangs and stays inside its block, a long email breaks after its @, and the icons draw at the icon size and the ghost files draw), both fonts draw Serbian Latin, an app built on the Tailwind entry takes its utilities, layers and `dark:` and `light:` from the tokens and their theme,
|
|
70
|
+
- the browser tests: no page overflows sideways at phone, tablet and desktop width in either theme, and no terminal window or bar of one cuts off its content, no page logs an error when it loads, the easter egg works with the mouse, the keyboard and reduced motion, the keys of the status line work and their switch turns them off, the numbers of the tabs show only while their keys work and keep their place while the keys load, the current tab keeps its bar in forced colors, in the tab bar and in the docs theme, at phone and desktop width, the path of the status line gives way at every width from 320 px without leaving a stub, and in the docs theme from 180 px with the keys on and 187 px with them off, its items take less padding on a phone and the theme button switches the theme, the content of a window starts at the gutter where the brand of the tab bar does on a phone, in the docs theme too, where a project's mark as the logo starts on it as well and over the sidebar's headings from 60rem up, a `dark` or `light` class chooses the theme as `data-theme` does, an element for one theme shows only in it, the browser's theme-color follows the theme and the page as it is sent has it for both themes, without JavaScript, a control that takes the focus is not left under the status line and no bar or corner of the window cuts off its focus ring, a button of the docs theme takes its ring and not the browser's and the ring of its brand paints over neither the mark nor the name, a code group's language stands in the row of its tabs and off its code, a radius of the page's own wins over the focus ring's and a button without one takes its small corners, with index.css and with tailwind.css, a state lines up with the text beside it, a prompt that wraps keeps its chevron on its first line at every width from 320 px, assistive technology reads the parts of the path above a page title as words of their own, the first tab starts on the border of the sidebar, the pieces of a form fit every width from 320 px (a segmented control works with the keyboard, stands out at 3:1 and takes the selection colors in forced colors, amounts line up at the right in figures of one width, the sections of a review share a term column, two fields share a row from 40rem, a number field has no spin buttons and its arrow keys step it, wrapped code hangs and stays inside its block, a long email breaks after its @, and the icons draw at the icon size and the ghost files draw), both fonts draw Serbian Latin, an app built on the Tailwind entry takes its utilities, layers and `dark:` and `light:` from the tokens and their theme, and the pages of the style guide look like their stored screenshots.
|
|
69
71
|
|
|
70
72
|
The screenshots are in `tests/browser/__screenshots__/` and are taken on Linux, in the Playwright container, so they are the same on every machine. After a change that is meant to be seen, update them:
|
|
71
73
|
|
|
@@ -94,7 +96,7 @@ npm sets up a trusted publisher only for a package that exists, so the package w
|
|
|
94
96
|
## Layout
|
|
95
97
|
|
|
96
98
|
```
|
|
97
|
-
tokens/ the design tokens, and the contrast pairs
|
|
99
|
+
tokens/ the design tokens, the component tier in components/, and the contrast pairs
|
|
98
100
|
identity/ the handle and one file per project: name, tagline, sprite
|
|
99
101
|
src/identity/ the ghost, pixel by pixel, and how a sprite becomes a mark
|
|
100
102
|
src/css/ the stylesheets
|
package/dist/index.css
CHANGED
|
@@ -158,8 +158,13 @@
|
|
|
158
158
|
--ws-size-check: 1.25rem;
|
|
159
159
|
--ws-size-content: 50rem;
|
|
160
160
|
--ws-size-control: 2.5rem;
|
|
161
|
+
--ws-size-control-lg: 2.75rem;
|
|
162
|
+
--ws-size-control-sm: 2rem;
|
|
163
|
+
--ws-size-control-xl: 3rem;
|
|
164
|
+
--ws-size-control-xs: 1.75rem;
|
|
161
165
|
--ws-size-frame: 90rem;
|
|
162
166
|
--ws-size-icon: 1rem;
|
|
167
|
+
--ws-size-icon-lg: 1.25rem;
|
|
163
168
|
--ws-size-outline: 15rem;
|
|
164
169
|
--ws-size-sidebar: 17rem;
|
|
165
170
|
--ws-size-status-line: 2rem;
|
|
@@ -306,6 +311,7 @@
|
|
|
306
311
|
--ws-color-border-strong: var(--ws-palette-main-highlight-high);
|
|
307
312
|
--ws-color-brand: var(--ws-palette-main-love);
|
|
308
313
|
--ws-color-brand-fill: var(--ws-palette-main-love);
|
|
314
|
+
--ws-color-brand-text: var(--ws-palette-main-love);
|
|
309
315
|
--ws-color-danger: var(--ws-palette-main-love);
|
|
310
316
|
--ws-color-danger-text: var(--ws-palette-main-love);
|
|
311
317
|
--ws-color-danger-tint: #eb6f9217;
|
|
@@ -343,6 +349,7 @@
|
|
|
343
349
|
--ws-color-border-strong: var(--ws-palette-dawn-highlight-high);
|
|
344
350
|
--ws-color-brand: var(--ws-palette-dawn-love);
|
|
345
351
|
--ws-color-brand-fill: var(--ws-palette-dawn-text);
|
|
352
|
+
--ws-color-brand-text: #a4546b;
|
|
346
353
|
--ws-color-danger: var(--ws-palette-dawn-love);
|
|
347
354
|
--ws-color-danger-text: var(--ws-palette-dawn-text);
|
|
348
355
|
--ws-color-danger-tint: #b4637a17;
|
|
@@ -381,6 +388,7 @@
|
|
|
381
388
|
--ws-color-border-strong: var(--ws-palette-dawn-highlight-high);
|
|
382
389
|
--ws-color-brand: var(--ws-palette-dawn-love);
|
|
383
390
|
--ws-color-brand-fill: var(--ws-palette-dawn-text);
|
|
391
|
+
--ws-color-brand-text: #a4546b;
|
|
384
392
|
--ws-color-danger: var(--ws-palette-dawn-love);
|
|
385
393
|
--ws-color-danger-text: var(--ws-palette-dawn-text);
|
|
386
394
|
--ws-color-danger-tint: #b4637a17;
|
|
@@ -410,6 +418,61 @@
|
|
|
410
418
|
}
|
|
411
419
|
}
|
|
412
420
|
|
|
421
|
+
:root, [data-theme], .dark:where(:not(.light)), .light:where(:not(.dark)) {
|
|
422
|
+
--ws-button-border-disabled: var(--ws-color-text-faint);
|
|
423
|
+
--ws-button-danger-bg-active: var(--ws-color-danger-tint);
|
|
424
|
+
--ws-button-danger-bg-hover: var(--ws-color-danger-tint);
|
|
425
|
+
--ws-button-danger-border-rest: var(--ws-color-danger);
|
|
426
|
+
--ws-button-danger-text-rest: var(--ws-color-danger-text);
|
|
427
|
+
--ws-button-ghost-bg-active: var(--ws-color-raised);
|
|
428
|
+
--ws-button-ghost-bg-hover: var(--ws-color-raised);
|
|
429
|
+
--ws-button-ghost-text-rest: var(--ws-color-text);
|
|
430
|
+
--ws-button-primary-bg-active: var(--ws-color-interactive-active);
|
|
431
|
+
--ws-button-primary-bg-hover: var(--ws-color-interactive-hover);
|
|
432
|
+
--ws-button-primary-bg-rest: var(--ws-color-interactive);
|
|
433
|
+
--ws-button-primary-text-rest: var(--ws-color-on-interactive);
|
|
434
|
+
--ws-button-quiet-text-rest: var(--ws-color-interactive);
|
|
435
|
+
--ws-button-secondary-bg-active: var(--ws-color-raised);
|
|
436
|
+
--ws-button-secondary-bg-hover: var(--ws-color-raised);
|
|
437
|
+
--ws-button-secondary-border-active: var(--ws-color-text-secondary);
|
|
438
|
+
--ws-button-secondary-border-hover: var(--ws-color-text-secondary);
|
|
439
|
+
--ws-button-secondary-border-rest: var(--ws-color-field-border);
|
|
440
|
+
--ws-button-secondary-text-rest: var(--ws-color-text);
|
|
441
|
+
--ws-button-text-disabled: var(--ws-color-text-faint);
|
|
442
|
+
--ws-control-border-width-invalid: var(--ws-border-width-medium);
|
|
443
|
+
--ws-control-border-width-rest: var(--ws-border-width-thin);
|
|
444
|
+
--ws-control-gap-lg: var(--ws-space-8);
|
|
445
|
+
--ws-control-gap-md: var(--ws-space-8);
|
|
446
|
+
--ws-control-gap-sm: var(--ws-space-6);
|
|
447
|
+
--ws-control-gap-xl: var(--ws-space-10);
|
|
448
|
+
--ws-control-gap-xs: var(--ws-space-6);
|
|
449
|
+
--ws-control-height-lg: var(--ws-size-control-lg);
|
|
450
|
+
--ws-control-height-md: var(--ws-size-control);
|
|
451
|
+
--ws-control-height-sm: var(--ws-size-control-sm);
|
|
452
|
+
--ws-control-height-xl: var(--ws-size-control-xl);
|
|
453
|
+
--ws-control-height-xs: var(--ws-size-control-xs);
|
|
454
|
+
--ws-control-icon-size-lg: var(--ws-size-icon-lg);
|
|
455
|
+
--ws-control-icon-size-md: var(--ws-size-icon);
|
|
456
|
+
--ws-control-icon-size-sm: var(--ws-size-icon);
|
|
457
|
+
--ws-control-icon-size-xl: var(--ws-size-icon-lg);
|
|
458
|
+
--ws-control-icon-size-xs: var(--ws-size-icon);
|
|
459
|
+
--ws-control-radius: var(--ws-radius-md);
|
|
460
|
+
--ws-field-bg: var(--ws-color-bg);
|
|
461
|
+
--ws-field-border-disabled: var(--ws-color-text-faint);
|
|
462
|
+
--ws-field-border-hover: var(--ws-color-text-secondary);
|
|
463
|
+
--ws-field-border-invalid: var(--ws-color-danger);
|
|
464
|
+
--ws-field-border-rest: var(--ws-color-field-border);
|
|
465
|
+
--ws-field-error-font-weight: var(--ws-font-weight-medium);
|
|
466
|
+
--ws-field-error-icon: var(--ws-color-danger);
|
|
467
|
+
--ws-field-error-text: var(--ws-color-danger-text);
|
|
468
|
+
--ws-field-help-text: var(--ws-color-text-secondary);
|
|
469
|
+
--ws-field-icon: var(--ws-color-text-secondary);
|
|
470
|
+
--ws-field-label-text: var(--ws-color-text);
|
|
471
|
+
--ws-field-required-text: var(--ws-color-brand-text);
|
|
472
|
+
--ws-field-text-disabled: var(--ws-color-text-faint);
|
|
473
|
+
--ws-field-text-rest: var(--ws-color-text);
|
|
474
|
+
}
|
|
475
|
+
|
|
413
476
|
/*
|
|
414
477
|
* The few icons the styles draw themselves, as masks, so they take the color of their text
|
|
415
478
|
* and need no markup. The icons of the callouts, the tick and the calendar are 16 x 16 strokes
|
package/dist/tailwind/theme.css
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
* mark the colors of the ghost are its own
|
|
9
9
|
* font.size text takes a text style, not a size
|
|
10
10
|
* motion.duration Tailwind's duration-* takes milliseconds, and transitions take the fast one
|
|
11
|
+
* button the component tier: what draws a button reads --ws-button-* by name
|
|
12
|
+
* control the component tier: what draws a control reads --ws-control-* by name
|
|
13
|
+
* field the component tier: what draws a field reads --ws-field-* by name
|
|
11
14
|
*
|
|
12
15
|
* Inline: a utility reads the token itself, where it is used. So bg-surface follows the theme
|
|
13
16
|
* of the part of the page it is in, as the tokens do.
|
|
@@ -24,6 +27,7 @@
|
|
|
24
27
|
--color-border-strong: var(--ws-color-border-strong);
|
|
25
28
|
--color-brand: var(--ws-color-brand);
|
|
26
29
|
--color-brand-fill: var(--ws-color-brand-fill);
|
|
30
|
+
--color-brand-text: var(--ws-color-brand-text);
|
|
27
31
|
--color-danger: var(--ws-color-danger);
|
|
28
32
|
--color-danger-text: var(--ws-color-danger-text);
|
|
29
33
|
--color-danger-tint: var(--ws-color-danger-tint);
|
|
@@ -159,8 +163,13 @@
|
|
|
159
163
|
--spacing-check: var(--ws-size-check);
|
|
160
164
|
--spacing-content: var(--ws-size-content);
|
|
161
165
|
--spacing-control: var(--ws-size-control);
|
|
166
|
+
--spacing-control-lg: var(--ws-size-control-lg);
|
|
167
|
+
--spacing-control-sm: var(--ws-size-control-sm);
|
|
168
|
+
--spacing-control-xl: var(--ws-size-control-xl);
|
|
169
|
+
--spacing-control-xs: var(--ws-size-control-xs);
|
|
162
170
|
--spacing-frame: var(--ws-size-frame);
|
|
163
171
|
--spacing-icon: var(--ws-size-icon);
|
|
172
|
+
--spacing-icon-lg: var(--ws-size-icon-lg);
|
|
164
173
|
--spacing-outline: var(--ws-size-outline);
|
|
165
174
|
--spacing-sidebar: var(--ws-size-sidebar);
|
|
166
175
|
--spacing-status-line: var(--ws-size-status-line);
|
package/dist/tokens.css
CHANGED
|
@@ -124,12 +124,22 @@
|
|
|
124
124
|
--ws-size-check: 1.25rem;
|
|
125
125
|
/* Widest a column of long-form text gets, padding included. */
|
|
126
126
|
--ws-size-content: 50rem;
|
|
127
|
-
/* Height of a one-line field, a button and a segmented control. */
|
|
127
|
+
/* Height of a one-line field, a button and a segmented control. The medium size, md, and the default. */
|
|
128
128
|
--ws-size-control: 2.5rem;
|
|
129
|
+
/* Height of a one-line control of the large size, lg. */
|
|
130
|
+
--ws-size-control-lg: 2.75rem;
|
|
131
|
+
/* Height of a one-line control of the small size, sm. */
|
|
132
|
+
--ws-size-control-sm: 2rem;
|
|
133
|
+
/* Height of a one-line control of the extra large size, xl. */
|
|
134
|
+
--ws-size-control-xl: 3rem;
|
|
135
|
+
/* Height of a one-line control of the extra small size, xs. */
|
|
136
|
+
--ws-size-control-xs: 1.75rem;
|
|
129
137
|
/* Widest a page frame gets. */
|
|
130
138
|
--ws-size-frame: 90rem;
|
|
131
139
|
/* An icon next to text, such as a tick, the icon of a callout or a calendar. */
|
|
132
140
|
--ws-size-icon: 1rem;
|
|
141
|
+
/* An icon in a control of the two large sizes, lg and xl. */
|
|
142
|
+
--ws-size-icon-lg: 1.25rem;
|
|
133
143
|
/* Page outline. */
|
|
134
144
|
--ws-size-outline: 15rem;
|
|
135
145
|
/* Side navigation. */
|
|
@@ -394,6 +404,8 @@
|
|
|
394
404
|
--ws-color-brand: var(--ws-palette-main-love);
|
|
395
405
|
/* Solid chip behind small text, such as the mode segment. */
|
|
396
406
|
--ws-color-brand-fill: var(--ws-palette-main-love);
|
|
407
|
+
/* Brand red as small text, such as the required mark of a field. Love on dark; on light love 0.05 further from the page in OKLab lightness, so it reads at 4.5:1. */
|
|
408
|
+
--ws-color-brand-text: var(--ws-palette-main-love);
|
|
397
409
|
/* Status danger: field error border and bar. */
|
|
398
410
|
--ws-color-danger: var(--ws-palette-main-love);
|
|
399
411
|
/* Status danger: label and error message text. */
|
|
@@ -461,6 +473,8 @@
|
|
|
461
473
|
--ws-color-brand: var(--ws-palette-dawn-love);
|
|
462
474
|
/* Solid chip behind small text, such as the mode segment. */
|
|
463
475
|
--ws-color-brand-fill: var(--ws-palette-dawn-text);
|
|
476
|
+
/* Brand red as small text, such as the required mark of a field. Love on dark; on light love 0.05 further from the page in OKLab lightness, so it reads at 4.5:1. */
|
|
477
|
+
--ws-color-brand-text: #a4546b;
|
|
464
478
|
/* Status danger: field error border and bar. */
|
|
465
479
|
--ws-color-danger: var(--ws-palette-dawn-love);
|
|
466
480
|
/* Status danger: label and error message text. */
|
|
@@ -528,6 +542,8 @@
|
|
|
528
542
|
--ws-color-brand: var(--ws-palette-dawn-love);
|
|
529
543
|
/* Solid chip behind small text, such as the mode segment. */
|
|
530
544
|
--ws-color-brand-fill: var(--ws-palette-dawn-text);
|
|
545
|
+
/* Brand red as small text, such as the required mark of a field. Love on dark; on light love 0.05 further from the page in OKLab lightness, so it reads at 4.5:1. */
|
|
546
|
+
--ws-color-brand-text: #a4546b;
|
|
531
547
|
/* Status danger: field error border and bar. */
|
|
532
548
|
--ws-color-danger: var(--ws-palette-dawn-love);
|
|
533
549
|
/* Status danger: label and error message text. */
|
|
@@ -582,3 +598,63 @@
|
|
|
582
598
|
--ws-color-warning-tint: #ea9d3417;
|
|
583
599
|
}
|
|
584
600
|
}
|
|
601
|
+
|
|
602
|
+
:root,
|
|
603
|
+
[data-theme],
|
|
604
|
+
.dark:where(:not(.light)),
|
|
605
|
+
.light:where(:not(.dark)) {
|
|
606
|
+
--ws-button-border-disabled: var(--ws-color-text-faint);
|
|
607
|
+
--ws-button-danger-bg-active: var(--ws-color-danger-tint);
|
|
608
|
+
--ws-button-danger-bg-hover: var(--ws-color-danger-tint);
|
|
609
|
+
--ws-button-danger-border-rest: var(--ws-color-danger);
|
|
610
|
+
--ws-button-danger-text-rest: var(--ws-color-danger-text);
|
|
611
|
+
--ws-button-ghost-bg-active: var(--ws-color-raised);
|
|
612
|
+
--ws-button-ghost-bg-hover: var(--ws-color-raised);
|
|
613
|
+
--ws-button-ghost-text-rest: var(--ws-color-text);
|
|
614
|
+
--ws-button-primary-bg-active: var(--ws-color-interactive-active);
|
|
615
|
+
--ws-button-primary-bg-hover: var(--ws-color-interactive-hover);
|
|
616
|
+
--ws-button-primary-bg-rest: var(--ws-color-interactive);
|
|
617
|
+
--ws-button-primary-text-rest: var(--ws-color-on-interactive);
|
|
618
|
+
--ws-button-quiet-text-rest: var(--ws-color-interactive);
|
|
619
|
+
--ws-button-secondary-bg-active: var(--ws-color-raised);
|
|
620
|
+
--ws-button-secondary-bg-hover: var(--ws-color-raised);
|
|
621
|
+
--ws-button-secondary-border-active: var(--ws-color-text-secondary);
|
|
622
|
+
--ws-button-secondary-border-hover: var(--ws-color-text-secondary);
|
|
623
|
+
--ws-button-secondary-border-rest: var(--ws-color-field-border);
|
|
624
|
+
--ws-button-secondary-text-rest: var(--ws-color-text);
|
|
625
|
+
--ws-button-text-disabled: var(--ws-color-text-faint);
|
|
626
|
+
--ws-control-border-width-invalid: var(--ws-border-width-medium);
|
|
627
|
+
--ws-control-border-width-rest: var(--ws-border-width-thin);
|
|
628
|
+
--ws-control-gap-lg: var(--ws-space-8);
|
|
629
|
+
--ws-control-gap-md: var(--ws-space-8);
|
|
630
|
+
--ws-control-gap-sm: var(--ws-space-6);
|
|
631
|
+
--ws-control-gap-xl: var(--ws-space-10);
|
|
632
|
+
--ws-control-gap-xs: var(--ws-space-6);
|
|
633
|
+
--ws-control-height-lg: var(--ws-size-control-lg);
|
|
634
|
+
--ws-control-height-md: var(--ws-size-control);
|
|
635
|
+
--ws-control-height-sm: var(--ws-size-control-sm);
|
|
636
|
+
--ws-control-height-xl: var(--ws-size-control-xl);
|
|
637
|
+
--ws-control-height-xs: var(--ws-size-control-xs);
|
|
638
|
+
--ws-control-icon-size-lg: var(--ws-size-icon-lg);
|
|
639
|
+
--ws-control-icon-size-md: var(--ws-size-icon);
|
|
640
|
+
--ws-control-icon-size-sm: var(--ws-size-icon);
|
|
641
|
+
--ws-control-icon-size-xl: var(--ws-size-icon-lg);
|
|
642
|
+
--ws-control-icon-size-xs: var(--ws-size-icon);
|
|
643
|
+
/* The same at every size, as in Nuxt UI. */
|
|
644
|
+
--ws-control-radius: var(--ws-radius-md);
|
|
645
|
+
--ws-field-bg: var(--ws-color-bg);
|
|
646
|
+
--ws-field-border-disabled: var(--ws-color-text-faint);
|
|
647
|
+
--ws-field-border-hover: var(--ws-color-text-secondary);
|
|
648
|
+
--ws-field-border-invalid: var(--ws-color-danger);
|
|
649
|
+
--ws-field-border-rest: var(--ws-color-field-border);
|
|
650
|
+
--ws-field-error-font-weight: var(--ws-font-weight-medium);
|
|
651
|
+
--ws-field-error-icon: var(--ws-color-danger);
|
|
652
|
+
--ws-field-error-text: var(--ws-color-danger-text);
|
|
653
|
+
--ws-field-help-text: var(--ws-color-text-secondary);
|
|
654
|
+
/* An icon in the field, such as a select's chevron. */
|
|
655
|
+
--ws-field-icon: var(--ws-color-text-secondary);
|
|
656
|
+
--ws-field-label-text: var(--ws-color-text);
|
|
657
|
+
--ws-field-required-text: var(--ws-color-brand-text);
|
|
658
|
+
--ws-field-text-disabled: var(--ws-color-text-faint);
|
|
659
|
+
--ws-field-text-rest: var(--ws-color-text);
|
|
660
|
+
}
|
package/dist/tokens.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import type {
|
|
|
5
5
|
TokenNormalizedSet,
|
|
6
6
|
DimensionTokenNormalized,
|
|
7
7
|
ColorTokenNormalized,
|
|
8
|
+
FontWeightTokenNormalized,
|
|
8
9
|
FontFamilyTokenNormalized,
|
|
9
10
|
NumberTokenNormalized,
|
|
10
|
-
FontWeightTokenNormalized,
|
|
11
11
|
DurationTokenNormalized,
|
|
12
12
|
CubicBezierTokenNormalized,
|
|
13
13
|
TypographyTokenNormalized,
|
|
@@ -21,9 +21,9 @@ type InputType = {
|
|
|
21
21
|
|
|
22
22
|
export type Dimension = Pick<DimensionTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
23
23
|
export type Color = Pick<ColorTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
24
|
+
export type FontWeight = Pick<FontWeightTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
24
25
|
export type FontFamily = Pick<FontFamilyTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
25
26
|
export type Number = Pick<NumberTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
26
|
-
export type FontWeight = Pick<FontWeightTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
27
27
|
export type Duration = Pick<DurationTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
28
28
|
export type CubicBezier = Pick<CubicBezierTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
29
29
|
export type Typography = Pick<TypographyTokenNormalized, "$type" | "$value" | "$description" | "$extensions" | "$deprecated">;
|
|
@@ -32,6 +32,26 @@ export interface Tokens {
|
|
|
32
32
|
"border-width.medium": Dimension;
|
|
33
33
|
"border-width.thick": Dimension;
|
|
34
34
|
"border-width.thin": Dimension;
|
|
35
|
+
"button.border.disabled": Color;
|
|
36
|
+
"button.danger.bg.active": Color;
|
|
37
|
+
"button.danger.bg.hover": Color;
|
|
38
|
+
"button.danger.border.rest": Color;
|
|
39
|
+
"button.danger.text.rest": Color;
|
|
40
|
+
"button.ghost.bg.active": Color;
|
|
41
|
+
"button.ghost.bg.hover": Color;
|
|
42
|
+
"button.ghost.text.rest": Color;
|
|
43
|
+
"button.primary.bg.active": Color;
|
|
44
|
+
"button.primary.bg.hover": Color;
|
|
45
|
+
"button.primary.bg.rest": Color;
|
|
46
|
+
"button.primary.text.rest": Color;
|
|
47
|
+
"button.quiet.text.rest": Color;
|
|
48
|
+
"button.secondary.bg.active": Color;
|
|
49
|
+
"button.secondary.bg.hover": Color;
|
|
50
|
+
"button.secondary.border.active": Color;
|
|
51
|
+
"button.secondary.border.hover": Color;
|
|
52
|
+
"button.secondary.border.rest": Color;
|
|
53
|
+
"button.secondary.text.rest": Color;
|
|
54
|
+
"button.text.disabled": Color;
|
|
35
55
|
"code.bg": Color;
|
|
36
56
|
"code.border": Color;
|
|
37
57
|
"code.header-bg": Color;
|
|
@@ -46,6 +66,7 @@ export interface Tokens {
|
|
|
46
66
|
"color.border-strong": Color;
|
|
47
67
|
"color.brand": Color;
|
|
48
68
|
"color.brand-fill": Color;
|
|
69
|
+
"color.brand-text": Color;
|
|
49
70
|
"color.danger": Color;
|
|
50
71
|
"color.danger-text": Color;
|
|
51
72
|
"color.danger-tint": Color;
|
|
@@ -72,6 +93,38 @@ export interface Tokens {
|
|
|
72
93
|
"color.warning": Color;
|
|
73
94
|
"color.warning-text": Color;
|
|
74
95
|
"color.warning-tint": Color;
|
|
96
|
+
"control.border-width.invalid": Dimension;
|
|
97
|
+
"control.border-width.rest": Dimension;
|
|
98
|
+
"control.gap.lg": Dimension;
|
|
99
|
+
"control.gap.md": Dimension;
|
|
100
|
+
"control.gap.sm": Dimension;
|
|
101
|
+
"control.gap.xl": Dimension;
|
|
102
|
+
"control.gap.xs": Dimension;
|
|
103
|
+
"control.height.lg": Dimension;
|
|
104
|
+
"control.height.md": Dimension;
|
|
105
|
+
"control.height.sm": Dimension;
|
|
106
|
+
"control.height.xl": Dimension;
|
|
107
|
+
"control.height.xs": Dimension;
|
|
108
|
+
"control.icon-size.lg": Dimension;
|
|
109
|
+
"control.icon-size.md": Dimension;
|
|
110
|
+
"control.icon-size.sm": Dimension;
|
|
111
|
+
"control.icon-size.xl": Dimension;
|
|
112
|
+
"control.icon-size.xs": Dimension;
|
|
113
|
+
"control.radius": Dimension;
|
|
114
|
+
"field.bg": Color;
|
|
115
|
+
"field.border.disabled": Color;
|
|
116
|
+
"field.border.hover": Color;
|
|
117
|
+
"field.border.invalid": Color;
|
|
118
|
+
"field.border.rest": Color;
|
|
119
|
+
"field.error.font-weight": FontWeight;
|
|
120
|
+
"field.error.icon": Color;
|
|
121
|
+
"field.error.text": Color;
|
|
122
|
+
"field.help.text": Color;
|
|
123
|
+
"field.icon": Color;
|
|
124
|
+
"field.label.text": Color;
|
|
125
|
+
"field.required.text": Color;
|
|
126
|
+
"field.text.disabled": Color;
|
|
127
|
+
"field.text.rest": Color;
|
|
75
128
|
"font.family.mono": FontFamily;
|
|
76
129
|
"font.family.sans": FontFamily;
|
|
77
130
|
"font.line-height.loose": Number;
|
|
@@ -146,8 +199,13 @@ export interface Tokens {
|
|
|
146
199
|
"size.check": Dimension;
|
|
147
200
|
"size.content": Dimension;
|
|
148
201
|
"size.control": Dimension;
|
|
202
|
+
"size.control-lg": Dimension;
|
|
203
|
+
"size.control-sm": Dimension;
|
|
204
|
+
"size.control-xl": Dimension;
|
|
205
|
+
"size.control-xs": Dimension;
|
|
149
206
|
"size.frame": Dimension;
|
|
150
207
|
"size.icon": Dimension;
|
|
208
|
+
"size.icon-lg": Dimension;
|
|
151
209
|
"size.outline": Dimension;
|
|
152
210
|
"size.sidebar": Dimension;
|
|
153
211
|
"size.status-line": Dimension;
|