@whatsaaaa/design-system 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/css/nuxt-ui.css +5 -1
- package/dist/css/terminal.css +27 -2
- package/dist/index.css +27 -2
- package/docs/usage.md +6 -2
- package/package.json +1 -1
- package/src/vitepress/styles/nav.css +31 -4
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ CI runs on every pull request:
|
|
|
65
65
|
- the unit tests, with the contrast of every role pair in both themes, the comments of the stylesheets in the built ones, and Nuxt UI's colors read from tokens outside any layer,
|
|
66
66
|
- that `assets/` is what the sources produce,
|
|
67
67
|
- 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 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, Nuxt UI's colors take the roles of the theme chosen around them, and the pages of the style guide look like their stored screenshots.
|
|
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, Nuxt UI's colors take the roles of the theme chosen around them, and the pages of the style guide look like their stored screenshots.
|
|
69
69
|
|
|
70
70
|
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
71
|
|
package/dist/css/nuxt-ui.css
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Deprecated: removed in 0.9.0. An app on Nuxt UI gets it from ui-vue, which
|
|
3
|
+
* `@whatsaaaa/ui-vue/index.css` brings. An app that imports this file directly copies it from
|
|
4
|
+
* 0.8.3 into its own stylesheets.
|
|
5
|
+
*
|
|
2
6
|
* Nuxt UI's theme variables, pointed at the design system's roles. Both themes follow by
|
|
3
7
|
* themselves: the roles switch, and these read them.
|
|
4
8
|
*
|
|
@@ -12,7 +16,7 @@
|
|
|
12
16
|
* color (500) to the text (950), so a low shade is a faint tint in both themes.
|
|
13
17
|
*
|
|
14
18
|
* It reads the tokens and comes after Nuxt UI's own stylesheet, so it is not in index.css or
|
|
15
|
-
* tailwind.css. An app
|
|
19
|
+
* tailwind.css. An app on Nuxt UI without ui-vue ends its imports with it, until 0.9.0:
|
|
16
20
|
*
|
|
17
21
|
* @import '@whatsaaaa/design-system/tailwind.css';
|
|
18
22
|
* @import '@nuxt/ui';
|
package/dist/css/terminal.css
CHANGED
|
@@ -177,6 +177,31 @@
|
|
|
177
177
|
color: var(--ws-color-brand);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
/*
|
|
181
|
+
* In forced colors the browser drops the current tab's bar, a shadow, and paints the edges
|
|
182
|
+
* every tab keeps for it, so all tabs would look alike. The other tabs' edges take the page's
|
|
183
|
+
* color, and the current tab keeps its colors as they are: its edges in the text color, its
|
|
184
|
+
* bar and number in the system's color of a selection.
|
|
185
|
+
*/
|
|
186
|
+
@media (forced-colors: active) {
|
|
187
|
+
.ws-tabs a {
|
|
188
|
+
border-inline-color: canvas;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.ws-tabs a[aria-current]:not([aria-current="false"]) {
|
|
192
|
+
box-shadow: inset 0 var(--ws-border-width-medium) 0 Highlight;
|
|
193
|
+
color: canvastext;
|
|
194
|
+
forced-color-adjust: none;
|
|
195
|
+
background: canvas;
|
|
196
|
+
border-color: canvastext;
|
|
197
|
+
outline-color: highlight;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.ws-tabs a[aria-current]:not([aria-current="false"]):before {
|
|
201
|
+
color: highlight;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
180
205
|
.ws-tab-bar__end {
|
|
181
206
|
align-items: center;
|
|
182
207
|
gap: var(--ws-space-24);
|
|
@@ -612,11 +637,11 @@
|
|
|
612
637
|
}
|
|
613
638
|
|
|
614
639
|
/* The row runs from edge to edge, so the current tab has no border at an end of it. */
|
|
615
|
-
.ws-tabs li:first-child a[aria-current] {
|
|
640
|
+
.ws-tabs li:first-child a[aria-current]:not([aria-current="false"]) {
|
|
616
641
|
border-left-color: #0000;
|
|
617
642
|
}
|
|
618
643
|
|
|
619
|
-
.ws-tabs li:last-child a[aria-current] {
|
|
644
|
+
.ws-tabs li:last-child a[aria-current]:not([aria-current="false"]) {
|
|
620
645
|
border-right-color: #0000;
|
|
621
646
|
}
|
|
622
647
|
|
package/dist/index.css
CHANGED
|
@@ -1402,6 +1402,31 @@ input[type="number"]::-webkit-outer-spin-button {
|
|
|
1402
1402
|
color: var(--ws-color-brand);
|
|
1403
1403
|
}
|
|
1404
1404
|
|
|
1405
|
+
/*
|
|
1406
|
+
* In forced colors the browser drops the current tab's bar, a shadow, and paints the edges
|
|
1407
|
+
* every tab keeps for it, so all tabs would look alike. The other tabs' edges take the page's
|
|
1408
|
+
* color, and the current tab keeps its colors as they are: its edges in the text color, its
|
|
1409
|
+
* bar and number in the system's color of a selection.
|
|
1410
|
+
*/
|
|
1411
|
+
@media (forced-colors: active) {
|
|
1412
|
+
.ws-tabs a {
|
|
1413
|
+
border-inline-color: canvas;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.ws-tabs a[aria-current]:not([aria-current="false"]) {
|
|
1417
|
+
box-shadow: inset 0 var(--ws-border-width-medium) 0 Highlight;
|
|
1418
|
+
color: canvastext;
|
|
1419
|
+
forced-color-adjust: none;
|
|
1420
|
+
background: canvas;
|
|
1421
|
+
border-color: canvastext;
|
|
1422
|
+
outline-color: highlight;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
.ws-tabs a[aria-current]:not([aria-current="false"]):before {
|
|
1426
|
+
color: highlight;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1405
1430
|
.ws-tab-bar__end {
|
|
1406
1431
|
align-items: center;
|
|
1407
1432
|
gap: var(--ws-space-24);
|
|
@@ -1837,11 +1862,11 @@ input[type="number"]::-webkit-outer-spin-button {
|
|
|
1837
1862
|
}
|
|
1838
1863
|
|
|
1839
1864
|
/* The row runs from edge to edge, so the current tab has no border at an end of it. */
|
|
1840
|
-
.ws-tabs li:first-child a[aria-current] {
|
|
1865
|
+
.ws-tabs li:first-child a[aria-current]:not([aria-current="false"]) {
|
|
1841
1866
|
border-left-color: #0000;
|
|
1842
1867
|
}
|
|
1843
1868
|
|
|
1844
|
-
.ws-tabs li:last-child a[aria-current] {
|
|
1869
|
+
.ws-tabs li:last-child a[aria-current]:not([aria-current="false"]) {
|
|
1845
1870
|
border-right-color: #0000;
|
|
1846
1871
|
}
|
|
1847
1872
|
|
package/docs/usage.md
CHANGED
|
@@ -32,7 +32,7 @@ Or take pieces. `tokens.css` and `fonts.css` first, then what you use:
|
|
|
32
32
|
| `@whatsaaaa/design-system/css/theme.css` | `ws-theme-dark` and `ws-theme-light`, for an element of one theme only |
|
|
33
33
|
| `@whatsaaaa/design-system/css/ghost.css` | Styles of `<ws-ghost>` |
|
|
34
34
|
| `@whatsaaaa/design-system/css/icons.css` | The icons the callouts and prompts draw, and the icons of a form: `--ws-icon-check`, the tick, and `--ws-icon-calendar`. Needed with `callout.css` and `terminal.css`, and for those |
|
|
35
|
-
| `@whatsaaaa/design-system/css/nuxt-ui.css` | Nuxt UI's colors on the roles. Only in an app on Nuxt UI, after it: see With Tailwind CSS below
|
|
35
|
+
| `@whatsaaaa/design-system/css/nuxt-ui.css` | Deprecated, removed in 0.9.0. Nuxt UI's colors on the roles. Only in an app on Nuxt UI, after it: see With Tailwind CSS below |
|
|
36
36
|
|
|
37
37
|
Everything is prefixed: classes with `ws-`, variables with `--ws-`. Only `nuxt-ui.css` sets variables of another prefix, Nuxt UI's `--ui-*`.
|
|
38
38
|
|
|
@@ -48,7 +48,11 @@ An app on Tailwind CSS v4, such as one on Nuxt UI, imports the Tailwind entry in
|
|
|
48
48
|
|
|
49
49
|
Install `tailwindcss` 4.3.5 or a later 4.x next to the package. Only this entry needs it.
|
|
50
50
|
|
|
51
|
-
The entry gives Nuxt UI the system's fonts, weights, radii and spacing, but not its colors. Nuxt UI takes its colors from its own `--ui-*` variables, which fall back to its green and slate, and without `--ui-bg` it paints the body in its own background. `css/nuxt-ui.css` points them at the roles.
|
|
51
|
+
The entry gives Nuxt UI the system's fonts, weights, radii and spacing, but not its colors. Nuxt UI takes its colors from its own `--ui-*` variables, which fall back to its green and slate, and without `--ui-bg` it paints the body in its own background. `css/nuxt-ui.css` points them at the roles.
|
|
52
|
+
|
|
53
|
+
`css/nuxt-ui.css` is deprecated and is removed in 0.9.0. An app on Nuxt UI gets it from ui-vue, which `@whatsaaaa/ui-vue/index.css` brings, and imports none of the lines below. An app that imports it directly copies the file from 0.8.3 into its own stylesheets and imports that copy in its place.
|
|
54
|
+
|
|
55
|
+
It is not in the entry, as it has to come after Nuxt UI, so an app on Nuxt UI without ui-vue imports it last, until 0.9.0:
|
|
52
56
|
|
|
53
57
|
```css
|
|
54
58
|
@import '@whatsaaaa/design-system/tailwind.css';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatsaaaa/design-system",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Whatsaaaa's design system: brand identity, design tokens, typography, docs theme and asset kit",
|
|
5
5
|
"homepage": "https://github.com/whatsaaaa/design-system#readme",
|
|
6
6
|
"bugs": "https://github.com/whatsaaaa/design-system/issues",
|
|
@@ -145,6 +145,33 @@
|
|
|
145
145
|
color: var(--ws-color-brand);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
/*
|
|
149
|
+
* In forced colors the browser drops the current tab's bar, a shadow, and paints the edges
|
|
150
|
+
* every tab keeps for it: the other tabs' edges take the page's color, and the current tab
|
|
151
|
+
* keeps its colors, as in the tab bar of the terminal frame.
|
|
152
|
+
*/
|
|
153
|
+
@media (forced-colors: active) {
|
|
154
|
+
.VPNav .VPNavBarMenu .VPNavBarMenuLink,
|
|
155
|
+
.VPNav .VPNavBarMenu .VPNavBarMenuGroup .button {
|
|
156
|
+
border-inline-color: Canvas;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.VPNav .VPNavBarMenu .VPNavBarMenuLink.active,
|
|
160
|
+
.VPNav .VPNavBarMenu .VPNavBarMenuGroup.active .button {
|
|
161
|
+
border-color: CanvasText;
|
|
162
|
+
background: Canvas;
|
|
163
|
+
box-shadow: inset 0 var(--ws-border-width-medium) 0 Highlight;
|
|
164
|
+
color: CanvasText;
|
|
165
|
+
outline-color: Highlight;
|
|
166
|
+
forced-color-adjust: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.VPNav .VPNavBarMenu .VPNavBarMenuLink.active::before,
|
|
170
|
+
.VPNav .VPNavBarMenu .VPNavBarMenuGroup.active .button::before {
|
|
171
|
+
color: Highlight;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
148
175
|
/* flyout menus of a tab group, of the language picker and of the overflow menu */
|
|
149
176
|
.VPNav .VPFlyout .menu .VPMenu {
|
|
150
177
|
border: var(--ws-border-width-thin) solid var(--ws-color-border);
|
|
@@ -473,13 +500,13 @@
|
|
|
473
500
|
}
|
|
474
501
|
|
|
475
502
|
/* the row runs from edge to edge, so the current tab has no border at an end of it */
|
|
476
|
-
.VPNav .VPNavBarMenu > .visually-hidden + .VPNavBarMenuLink,
|
|
477
|
-
.VPNav .VPNavBarMenu > .visually-hidden + .VPNavBarMenuGroup .button {
|
|
503
|
+
.VPNav .VPNavBarMenu > .visually-hidden + .VPNavBarMenuLink.active,
|
|
504
|
+
.VPNav .VPNavBarMenu > .visually-hidden + .VPNavBarMenuGroup.active .button {
|
|
478
505
|
border-left-color: transparent;
|
|
479
506
|
}
|
|
480
507
|
|
|
481
|
-
.VPNav .VPNavBarMenu > .VPNavBarMenuLink:last-child,
|
|
482
|
-
.VPNav .VPNavBarMenu > .VPNavBarMenuGroup:last-child .button {
|
|
508
|
+
.VPNav .VPNavBarMenu > .VPNavBarMenuLink.active:last-child,
|
|
509
|
+
.VPNav .VPNavBarMenu > .VPNavBarMenuGroup.active:last-child .button {
|
|
483
510
|
border-right-color: transparent;
|
|
484
511
|
}
|
|
485
512
|
|