@nxgt/material-vue 0.29.0 → 0.30.1
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/CHANGELOG.md +51 -0
- package/dist/{Button-D1uzdbOJ.js → Button-CNbJT5qV.js} +5 -5
- package/dist/{HoverCardTrigger-DaM5d4hE.js → HoverCardTrigger-BTAHE6wK.js} +11 -2
- package/dist/{camera-DZ5nYW-v.js → camera-l87FB3uW.js} +3 -3
- package/dist/components/theme-tokens.css +2 -2
- package/dist/components/ui/primitives/label/label.css +14 -21
- package/dist/{components-Cteo76NG.js → components-DSl6EpOS.js} +6827 -6809
- package/dist/components.js +5 -5
- package/dist/dnd.js +1 -1
- package/dist/{form-scope-BvdPqk6T.js → form-scope-BTUGjQdY.js} +1 -1
- package/dist/{icon-button-D60G5B_Z.js → icon-button-DXXjxBgr.js} +6 -6
- package/dist/lib/components/ui/collections/data-table/partials/data-table-toolbar.d.ts +14 -9
- package/dist/lib/components/ui/dates/calendar/calendar-weekday.d.ts +4 -0
- package/dist/lib/components/ui/feedback/toast/toast-classes.d.ts +13 -0
- package/dist/lib/components/ui/layout/app-shell/use-navigation-sheet.d.ts +3 -2
- package/dist/main.js +5 -5
- package/dist/map.js +3 -3
- package/dist/material-vue.css +1 -1
- package/dist/{pdf-outline-sidebar-Bln9F9gF.js → pdf-outline-sidebar-DQ6BCQhR.js} +1 -1
- package/dist/{pdf-page-BVtXjnHS.js → pdf-page-cuvGDdM2.js} +1 -1
- package/dist/{pdf-page-list-D3eng5h4.js → pdf-page-list-B94WdjV4.js} +2 -2
- package/dist/{pdf-reader-CPms5uyj.js → pdf-reader-CEkr3KzC.js} +7 -7
- package/dist/{pdf-sidebar-lzBEntPH.js → pdf-sidebar-DJf--6rP.js} +2 -2
- package/dist/{pdf-thumbnail-sidebar-DB3PmiGW.js → pdf-thumbnail-sidebar-JLWNyl-p.js} +2 -2
- package/dist/{pdf-toolbar-mWlGTWU1.js → pdf-toolbar-B_MDicKL.js} +3 -3
- package/dist/pdf.js +1 -1
- package/dist/{sortable-provider-Dml11nQY.js → sortable-provider-Cb3tm9Cy.js} +1 -1
- package/dist/{stx-player-BpQHnHaa.js → stx-player-DWy055hI.js} +1 -1
- package/docs/components/data-table-filter-and-lists.md +15 -6
- package/docs/components/date-and-time.md +6 -1
- package/docs/components/feedback-and-status.md +17 -2
- package/docs/components/primitives.md +7 -6
- package/docs/guides/app-shell.md +2 -1
- package/docs/previews/date-time-calendar.webp +0 -0
- package/docs/previews/date-time-datefield.webp +0 -0
- package/docs/previews/date-time-daterangefield.webp +0 -0
- package/docs/previews/feedback-status-toast.webp +0 -0
- package/docs/roadmap.md +76 -38
- package/docs/troubleshooting.md +99 -8
- package/lib/components/theme-tokens.css +2 -2
- package/lib/components/ui/primitives/label/label.css +14 -21
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @nxgt/material-vue
|
|
2
2
|
|
|
3
|
+
## 0.30.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#504](https://github.com/softistx/nxgt-material/pull/504) [`c6f76a1`](https://github.com/softistx/nxgt-material/commit/c6f76a179087bd6c8b9a3698040dd001f08d8bda) Thanks [@SteveGT96](https://github.com/SteveGT96)! - The roadmaps describe the coming redesign.
|
|
8
|
+
- Updated dependencies [[`c6f76a1`](https://github.com/softistx/nxgt-material/commit/c6f76a179087bd6c8b9a3698040dd001f08d8bda)]:
|
|
9
|
+
- @nxgt/material-core@0.7.1
|
|
10
|
+
|
|
11
|
+
## 0.30.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#494](https://github.com/softistx/nxgt-material/pull/494) [`0431e63`](https://github.com/softistx/nxgt-material/commit/0431e636780da1711ea294d3a4c05a918ceb974f) Thanks [@SteveGT96](https://github.com/SteveGT96)! - A toast's `{ label }` action reads at 4.5:1 on the toast in both themes (Fixes [#489](https://github.com/softistx/nxgt-material/issues/489)). The action was a `tonal` `Button` in the page's tones on a 15 % primary tint, over a toast that is the inverse of the page: 2.5:1 in the light theme, 1.5:1 in the dark one. It now takes the other theme's primary tone on an opaque mix of primary toward the toast (9.4:1 light, 5.5:1 dark at rest, more hovered, focused or pressed). Apps can drop the "Temporary, until material [#489](https://github.com/softistx/nxgt-material/issues/489)" exclusion of `[data-slot="toast-action"]` from their `color-contrast` scans. A function action's own buttons are unchanged: give them colours measured on the toast.
|
|
16
|
+
|
|
17
|
+
`Banner` is a live region (Fixes [#491](https://github.com/softistx/nxgt-material/issues/491)): every tone, `error` included, is `role="status"` `aria-live="polite"` `aria-atomic="true"`. A modal layer that makes the page `inert` now keeps a mounted `Banner` reachable, so a change of its text is announced. React: `Banner` forwards the rest of its props (`id`, `data-*`, `aria-*`, `role`, handlers) to its root `<div>`, where they win over the defaults (`BannerProps` extends the `div`'s props but `title` and `children`), so an urgent banner can pass `role="alert"` (with `aria-live="assertive"`). Vue: its attributes already fell through to the root and win over the defaults, so `role="alert"` works there too. Apps can drop the "Temporary, until material [#491](https://github.com/softistx/nxgt-material/issues/491)" `<div aria-live="polite">` wrapped around a `Banner`, unless that `Banner` mounts while a modal layer is open (keep a live container that is in the page before the layer opens for that case). Nothing changes for tests: every `Banner` is still found with `getByRole('status')`. At the next major, an error `Banner` becomes `role="alert"` (see the roadmap).
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#493](https://github.com/softistx/nxgt-material/pull/493) [`a4f7962`](https://github.com/softistx/nxgt-material/commit/a4f79626002c5b2719175b0f2e7f25fec38d398c) Thanks [@SteveGT96](https://github.com/SteveGT96)! - A calendar's weekday row and its days reach 4.5:1 (WCAG 1.4.3) on the page and in a popover, in both themes. Fixes [#487](https://github.com/softistx/nxgt-material/issues/487), fixes [#488](https://github.com/softistx/nxgt-material/issues/488).
|
|
22
|
+
|
|
23
|
+
The base stylesheet tints every table header (`bg-primary/15`) and every other row (`bg-primary/5`), and the weekday row drew `--muted-foreground` on that header tint: 4.4:1 in the light theme, in `Calendar`, `DateField`, `DateRangeField` and `EventCalendar`'s date picker. It is now muted toward the foreground (`color-mix` of `--muted-foreground` and `--foreground`): 5.6:1 light, 6.2:1 dark on `--popover`, 7.0:1 dark on `--background`.
|
|
24
|
+
|
|
25
|
+
`@nxgt/material` only: every day's label was drawn at 70 % opacity, so the days of the neighbouring months (`.rdp-outside`, which can be picked) fell to 2.9:1 light and 3.4:1 dark, a range's middle days to 2.6:1 and the chosen day's label to 4.4:1. The labels are no longer faded: the neighbouring months' days keep `--muted-foreground` (5.1:1 light, 5.6:1 dark at least), a range's middle days use the weekday row's colour (5.6:1), and the other days are drawn at full strength, as in `@nxgt/material-vue`. A test or screenshot that relied on the faded labels will see them darker.
|
|
26
|
+
|
|
27
|
+
Apps can drop the workarounds marked `Temporary, until material [#487](https://github.com/softistx/nxgt-material/issues/487)` and `Temporary, until material [#488](https://github.com/softistx/nxgt-material/issues/488)`: an accessibility scan that skips `color-contrast` on `.rdp-weekday` (React) or `[data-slot="calendar-head-cell"]` (Vue), and on `.rdp-outside`.
|
|
28
|
+
|
|
29
|
+
- [#495](https://github.com/softistx/nxgt-material/pull/495) [`321ef19`](https://github.com/softistx/nxgt-material/commit/321ef1967e784a798cabbccca9ddf368f1d210bf) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `DataTable` spacing fixes. Fixes [#486](https://github.com/softistx/nxgt-material/issues/486).
|
|
30
|
+
|
|
31
|
+
- **"Select all" passes axe's `target-size` (WCAG 2.5.8).** The header row's checkbox failed when the next column was a sortable `DataTableColumnHeader`, whose button reaches 12px back into its cell (`-ml-3`): axe measures the 16px box itself, not its 24px `::before`, and the 24px circle around it met the button. The `select` column's checkboxes (header and rows) now keep a 12px margin after them (`me-3`; `ml-2` became `ms-2`), which widens that column by 12px. Apps can drop the workaround marked `Temporary, until material [#486](https://github.com/softistx/nxgt-material/issues/486)`: the axe `exclude` of `thead [data-slot="checkbox-field"]`. A `select` column of your own needs `me-3` on its checkboxes.
|
|
32
|
+
- **The empty state's fit on a phone is now checked.** A `#empty` slot as wide as its cell stays inside the scroll box at 375px (this package's `Table` container has no padding, so it already did); a story play now guards it.
|
|
33
|
+
- **No band on tables without selection actions.** The toolbar's 68px band (`[data-slot="header-placeholder"]`, then the toolbar's `min-h-17`) is reserved only when the table has the `select` column and selection actions (the `actions` prop or the `#actions` slot), so the first selection still does not move the rows. A table without the `select` column, or without actions, keeps no band above it, and a toolbar with real content (`show-view-options`, a filter) renders as before. Stories now guard both. Nothing to change in your code.
|
|
34
|
+
- **The `actions` prop may return an array.** `actions: () => [h('button', 'Delete')]` rendered an empty toolbar: the array was wrapped as a component. It is now rendered as the toolbar's children, and `[]`, `[null]` or an array of `v-if` comments render no toolbar, as `null` does.
|
|
35
|
+
|
|
36
|
+
- [#496](https://github.com/softistx/nxgt-material/pull/496) [`5c97ddd`](https://github.com/softistx/nxgt-material/commit/5c97ddd282eeda721b34f32d9c8ee87e83de067c) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Fixes [#490](https://github.com/softistx/nxgt-material/issues/490), fixes [#492](https://github.com/softistx/nxgt-material/issues/492).
|
|
37
|
+
|
|
38
|
+
A required `Label`'s mark is an `aria-hidden` inline SVG in the label's markup, no longer a CSS mask whose image was a `data:` URI ([#490](https://github.com/softistx/nxgt-material/issues/490)): a Content-Security-Policy whose `img-src` refuses `data:` (`img-src 'self'`) reported a violation on every form with a required field, and the mark did not render. It looks the same, the label's text and accessible name stay "Email" (the field's own `required` / `aria-required` says it is required), and it stays visible in forced-colors mode and in print. The `--label-required-mark` property and the `[data-slot="label-text"][data-required]::after` rule are gone; an app that still sets the property breaks nothing, the mark keeps its default look.
|
|
39
|
+
|
|
40
|
+
Migration, for an app that restyled the mark or worked around [#490](https://github.com/softistx/nxgt-material/issues/490) ("Temporary, until material [#490](https://github.com/softistx/nxgt-material/issues/490)"):
|
|
41
|
+
|
|
42
|
+
1. Search the app's CSS, inline styles and theme files for `--label-required-mark` (and for `[data-slot="label-text"][data-required]::after`).
|
|
43
|
+
2. Replace each override with CSS on `[data-slot="label-required-mark"]`, the SVG itself: `color` for its colour, `width` and `height` for its size. For example `[data-slot="label-required-mark"] { color: var(--color-error); width: 0.5em; height: 0.5em; }` (the defaults).
|
|
44
|
+
3. Delete any copy of the mark image the app serves (the SVG file or route that `--label-required-mark` pointed to), and its `img-src` exception if one was added for it.
|
|
45
|
+
|
|
46
|
+
After a link followed in the phone menu's sheet (`AppHeader` / `ActivityLayout`), or a navigation while it is open, the focus stays where the new screen put it inside `<main>` (an error page's `h1`, a step's title) instead of moving to `<main>` ([#492](https://github.com/softistx/nxgt-material/issues/492)). Apps can drop the "Temporary, until material [#492](https://github.com/softistx/nxgt-material/issues/492)" workaround that gives the focus back to the page's element after the sheet closes.
|
|
47
|
+
|
|
48
|
+
## 0.29.1
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- [#484](https://github.com/softistx/nxgt-material/pull/484) [`a97ec69`](https://github.com/softistx/nxgt-material/commit/a97ec695491dc0660ef62d88f326f4c36de234b3) Thanks [@SteveGT96](https://github.com/SteveGT96)! - A filled `Button` and `IconButton` keep an opaque fill in every state, focus included (softistx/nxgt-material#483). The `default` colour faded to 80 % of the foreground on focus (and 90 % on hover, 70 % on press), and the `secondary`, `success`, `info` and `warning` colours were translucent in the dark theme; the label's contrast then depended on what sat behind the button and could fall under 4.5:1 (WCAG 1.4.3). Those states are now opaque mixes toward the page background, and focus is shown by the ring. Apps can remove an axe exclusion for `[data-slot="button"][data-variant="filled"]:focus`.
|
|
53
|
+
|
|
3
54
|
## 0.29.0
|
|
4
55
|
|
|
5
56
|
### Minor Changes
|
|
@@ -419,22 +419,22 @@ var H = F(() => {
|
|
|
419
419
|
{
|
|
420
420
|
variant: "filled",
|
|
421
421
|
color: "secondary",
|
|
422
|
-
class: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--color-secondary)_90%,black)] [&_svg]:data-[slot=icon]:text-secondary-foreground active:bg-[color-mix(in_oklab,var(--color-secondary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-secondary)_85%,black)] dark:bg-secondary
|
|
422
|
+
class: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--color-secondary)_90%,black)] [&_svg]:data-[slot=icon]:text-secondary-foreground active:bg-[color-mix(in_oklab,var(--color-secondary)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-secondary)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-secondary)_70%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-secondary)_50%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-secondary)_60%,var(--color-background))]"
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
425
|
variant: "filled",
|
|
426
426
|
color: "success",
|
|
427
|
-
class: "bg-success text-success-foreground hover:bg-[color-mix(in_oklab,var(--color-success)_90%,black)] [&_svg]:data-[slot=icon]:text-success-foreground active:bg-[color-mix(in_oklab,var(--color-success)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-success)_85%,black)] dark:bg-success
|
|
427
|
+
class: "bg-success text-success-foreground hover:bg-[color-mix(in_oklab,var(--color-success)_90%,black)] [&_svg]:data-[slot=icon]:text-success-foreground active:bg-[color-mix(in_oklab,var(--color-success)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-success)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-success)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-success)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-success)_50%,var(--color-background))]"
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
430
|
variant: "filled",
|
|
431
431
|
color: "info",
|
|
432
|
-
class: "bg-info text-info-foreground hover:bg-[color-mix(in_oklab,var(--color-info)_90%,black)] [&_svg]:data-[slot=icon]:text-info-foreground active:bg-[color-mix(in_oklab,var(--color-info)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-info)_85%,black)] dark:bg-info
|
|
432
|
+
class: "bg-info text-info-foreground hover:bg-[color-mix(in_oklab,var(--color-info)_90%,black)] [&_svg]:data-[slot=icon]:text-info-foreground active:bg-[color-mix(in_oklab,var(--color-info)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-info)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-info)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-info)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-info)_50%,var(--color-background))]"
|
|
433
433
|
},
|
|
434
434
|
{
|
|
435
435
|
variant: "filled",
|
|
436
436
|
color: "warning",
|
|
437
|
-
class: "bg-warning text-warning-foreground hover:bg-[color-mix(in_oklab,var(--color-warning)_90%,black)] [&_svg]:data-[slot=icon]:text-warning-foreground active:bg-[color-mix(in_oklab,var(--color-warning)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-warning)_85%,black)] dark:bg-warning
|
|
437
|
+
class: "bg-warning text-warning-foreground hover:bg-[color-mix(in_oklab,var(--color-warning)_90%,black)] [&_svg]:data-[slot=icon]:text-warning-foreground active:bg-[color-mix(in_oklab,var(--color-warning)_80%,black)] focus:bg-[color-mix(in_oklab,var(--color-warning)_85%,black)] dark:bg-[color-mix(in_oklab,var(--color-warning)_60%,var(--color-background))] dark:hover:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))] dark:active:bg-[color-mix(in_oklab,var(--color-warning)_40%,var(--color-background))] dark:focus:bg-[color-mix(in_oklab,var(--color-warning)_50%,var(--color-background))]"
|
|
438
438
|
},
|
|
439
439
|
{
|
|
440
440
|
variant: "filled",
|
|
@@ -444,7 +444,7 @@ var H = F(() => {
|
|
|
444
444
|
{
|
|
445
445
|
variant: "filled",
|
|
446
446
|
color: "default",
|
|
447
|
-
class: "bg-foreground text-background hover:bg-foreground
|
|
447
|
+
class: "bg-foreground text-background hover:bg-[color-mix(in_oklab,var(--color-foreground)_90%,var(--color-background))] [&_svg]:data-[slot=icon]:text-foreground active:bg-[color-mix(in_oklab,var(--color-foreground)_70%,var(--color-background))] focus:bg-[color-mix(in_oklab,var(--color-foreground)_80%,var(--color-background))]"
|
|
448
448
|
},
|
|
449
449
|
{
|
|
450
450
|
variant: "tonal",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./utils-CykWQ0iJ.js";
|
|
2
2
|
import { t } from "./use-material-translation-Do6ztdtV.js";
|
|
3
|
-
import { t as n } from "./Button-
|
|
3
|
+
import { t as n } from "./Button-CNbJT5qV.js";
|
|
4
4
|
import { t as r } from "./use-inert-others-CtGqZKR8.js";
|
|
5
5
|
import { t as i } from "./field-name-attribute-Bl7LSVK0.js";
|
|
6
6
|
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, getCurrentInstance as p, guardReactiveProps as m, isRef as h, mergeProps as g, normalizeClass as _, normalizeProps as v, onMounted as ee, onUpdated as y, openBlock as b, renderSlot as x, toDisplayString as S, unref as C, useAttrs as w, useId as T, useTemplateRef as E, vModelText as D, withCtx as O, withDirectives as k } from "vue";
|
|
@@ -55,7 +55,16 @@ var J = /* @__PURE__ */ f({
|
|
|
55
55
|
setup(t) {
|
|
56
56
|
let n = t, r = V(n, "class", "withAsterisk");
|
|
57
57
|
return (i, a) => (b(), o(C(I), g({ "data-slot": "label" }, C(r), { class: C(e)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", n.class) }), {
|
|
58
|
-
default: O(() => [t.withAsterisk ? (b(), c("span", ue, [x(i.$slots, "default")]
|
|
58
|
+
default: O(() => [t.withAsterisk ? (b(), c("span", ue, [x(i.$slots, "default"), a[0] ||= l("svg", {
|
|
59
|
+
"data-slot": "label-required-mark",
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
focusable: "false",
|
|
62
|
+
viewBox: "0 0 10 10",
|
|
63
|
+
fill: "none",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
"stroke-width": "1.75",
|
|
66
|
+
"stroke-linecap": "round"
|
|
67
|
+
}, [l("path", { d: "M5 1v8M1.5 3l7 4M8.5 3l-7 4" })], -1)])) : x(i.$slots, "default", {}, void 0, void 0, 1)]),
|
|
59
68
|
_: 3
|
|
60
69
|
}, 16, ["class"]));
|
|
61
70
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./utils-CykWQ0iJ.js";
|
|
2
|
-
import { gr as t, mr as n, pr as r } from "./components-
|
|
2
|
+
import { gr as t, mr as n, pr as r } from "./components-DSl6EpOS.js";
|
|
3
3
|
import { t as i } from "./use-material-translation-Do6ztdtV.js";
|
|
4
|
-
import { t as a } from "./Button-
|
|
5
|
-
import { t as o } from "./icon-button-
|
|
4
|
+
import { t as a } from "./Button-CNbJT5qV.js";
|
|
5
|
+
import { t as o } from "./icon-button-DXXjxBgr.js";
|
|
6
6
|
import { createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, ref as g, renderSlot as _, shallowRef as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
7
7
|
import { Pause as S, Play as C } from "@lucide/vue";
|
|
8
8
|
//#region lib/components/ui/media/camera/camera-content.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
--primary: oklch(46% 0.1135 276.35);
|
|
71
71
|
--primary-foreground: oklch(0.984 0.003 247.858);
|
|
72
72
|
/* Brighter than the light one: it is read as text on the dark surfaces (6.5:1
|
|
73
|
-
on --background, 5.8:1 on --card); a filled secondary surface
|
|
74
|
-
(
|
|
73
|
+
on --background, 5.8:1 on --card); a filled secondary surface mixes it toward --background
|
|
74
|
+
(the opaque 70 % mix) to keep 5.2:1 under its near-white text. */
|
|
75
75
|
--secondary: oklch(0.66 0.1135 245.65);
|
|
76
76
|
--secondary-foreground: oklch(0.984 0.003 247.858);
|
|
77
77
|
--muted: oklch(0.279 0.041 260.031);
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
/* The required mark of `Label withAsterisk
|
|
2
|
-
* label's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
/* The required mark of `Label withAsterisk`: an `aria-hidden` inline SVG in
|
|
2
|
+
* the label's markup, not a "*" in its text. A typed "*" joined the label's
|
|
3
|
+
* name ("Email *") for `getByLabel(…, { exact })`, `getByLabelText` and
|
|
4
|
+
* screen readers, and so does generated text (`content: "*"`). The field's
|
|
5
|
+
* own `required` / `aria-required` is what is announced. Drawn by the markup,
|
|
6
|
+
* it loads no image: a Content-Security-Policy whose `img-src` refuses
|
|
7
|
+
* `data:` draws it too. Restyle it from your own CSS: `color` for the colour,
|
|
8
|
+
* `width` / `height` for the size. */
|
|
9
|
+
[data-slot="label-required-mark"] {
|
|
10
10
|
display: inline-block;
|
|
11
11
|
flex: none;
|
|
12
12
|
align-self: flex-start;
|
|
13
13
|
width: 0.5em;
|
|
14
14
|
height: 0.5em;
|
|
15
15
|
margin-block-start: 0.05em;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
mask-image: var(--label-required-mark);
|
|
19
|
-
mask-size: contain;
|
|
20
|
-
mask-repeat: no-repeat;
|
|
21
|
-
mask-position: center;
|
|
22
|
-
/* A browser's print stylesheet drops backgrounds; this one is the mark. */
|
|
23
|
-
print-color-adjust: exact;
|
|
24
|
-
-webkit-print-color-adjust: exact;
|
|
16
|
+
color: var(--color-error);
|
|
17
|
+
overflow: visible;
|
|
25
18
|
}
|
|
26
19
|
|
|
27
|
-
/* Forced colours
|
|
20
|
+
/* Forced colours keep an SVG's `currentColor` stroke as authored;
|
|
28
21
|
* CanvasText keeps the mark visible on any theme. */
|
|
29
22
|
@media (forced-colors: active) {
|
|
30
|
-
[data-slot="label-
|
|
31
|
-
|
|
23
|
+
[data-slot="label-required-mark"] {
|
|
24
|
+
color: CanvasText;
|
|
32
25
|
}
|
|
33
26
|
}
|