sherick-ui 2.7.1 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Input.cjs +1 -1
- package/dist/cjs/components/Input.cjs.map +1 -1
- package/dist/cjs/components/Textarea.cjs +1 -1
- package/dist/cjs/components/Textarea.cjs.map +1 -1
- package/dist/cjs/components/choice-row.cjs +1 -1
- package/dist/cjs/components/choice-row.cjs.map +1 -1
- package/dist/cjs/components/ui.common.cjs +57 -47
- package/dist/cjs/components/ui.common.cjs.map +1 -1
- package/dist/esm/components/Input.js +1 -1
- package/dist/esm/components/Input.js.map +1 -1
- package/dist/esm/components/Textarea.js +1 -1
- package/dist/esm/components/Textarea.js.map +1 -1
- package/dist/esm/components/choice-row.js +1 -1
- package/dist/esm/components/choice-row.js.map +1 -1
- package/dist/esm/components/ui.common.js +57 -47
- package/dist/esm/components/ui.common.js.map +1 -1
- package/dist/styles.css +38 -58
- package/dist/theme.css +3 -0
- package/dist/types/dev.d.cts +15 -16
- package/dist/types/dev.d.ts +15 -16
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"choice-row.js","sources":["../../../src/components/choice-row.tsx"],"sourcesContent":["\"use client\";\n\nimport { Field } from \"@base-ui/react/field\";\nimport type { ClassValue } from \"clsx\";\nimport React, { type ReactNode } from \"react\";\nimport { cn } from \"@/libs/utils\";\nimport {\n density,\n focusRingWithin,\n material,\n selectableRowSupporting,\n selectableRowSurface,\n shape,\n state,\n stateLayerQuietComposite,\n text,\n type,\n} from \"./ui.common\";\nimport { motionFeedback } from \"./ui.motion\";\n\n/* The row a choice in a group sits on — a radio in `RadioGroup`, a checkbox in `CheckboxGroup`. The\n two groups hold different marks and different values, but a choice is the same object in both: the\n whole row is its label, the mark holds the first line of the copy, and the opt-in `surface` row is\n the same held-choice surface. One anatomy keeps the two from drifting into two designs. */\n\nexport type ChoiceAppearance = \"default\" | \"surface\";\n\n/* Each part is a class list rather than a finished class name: the component composes it through its\n own `cn()`, which is what scopes it. */\n\n/** The `Field.Item` that scopes one choice's label and description. */\nexport const choiceItemClasses = (appearance: ChoiceAppearance): ClassValue[] => [\n \"group flex items-stretch\",\n density.normal,\n appearance === \"surface\" &&\n cn(\n \"relative min-w-0 forced-colors:has-[:focus-visible]:[outline-style:none]\",\n shape.control,\n material.matteQuiet,\n selectableRowSurface,\n stateLayerQuietComposite,\n focusRingWithin,\n motionFeedback\n ),\n state.enabled,\n state.effectiveDisabled,\n state.disabledRow,\n];\n\n/* The row itself is the label, so the whole row stays the pointer target. Inside it the mark and the\n copy are one first-line group: a wrapped label then aligns the mark to its first line instead of\n centring it on the block, while a one-line row is still centred in the row's own density height.\n The copy declares its own line height — `density.normal` sets the type step but no leading, and this\n package ships no reset — so the 20px mark plus its 2px of block margin and the line it is centred on\n are the same 24px whatever line height a host happens to inherit. */\nexport const choiceLabelClasses = (appearance: ChoiceAppearance): ClassValue[] => [\n \"flex min-w-0 flex-1 items-center\",\n appearance === \"surface\" && \"px-4 py-3\",\n];\n\nexport const choiceLineClassName = \"flex w-full items-start gap-3\";\n\ninterface ChoiceCopyProps {\n appearance: ChoiceAppearance;\n label: ReactNode;\n description?: ReactNode;\n /** The id the control is named by when a description follows its label. */\n labelId: string;\n}\n\n/**\n * A choice's copy. Without a description it is the label alone, and the control is named by the\n * whole row. With one, the label is the name and the description is the control's description:\n * Base links it through the `Field.Item` around the row, so a reader hears \"Casino A, checkbox,\n * casino-a.com and casino-a.net\" rather than one run-on name. Both stay inside the row, so a press\n * on the supporting line still makes the choice.\n */\nexport function ChoiceCopy({ appearance, label, description, labelId }: ChoiceCopyProps) {\n if (description == null) {\n return <span className={cn(text.high, \"min-w-0 leading-6\", appearance === \"surface\" && \"flex-1\")}>{label}</span>;\n }\n return (\n <span className={cn(\"flex min-w-0 flex-col\", appearance === \"surface\" && \"flex-1\")}>\n <span id={labelId} className={cn(text.high, \"leading-6\")}>{label}</span>\n {/* A label holds phrasing content only, so the description renders as a span. */}\n <Field.Description\n render={<span />}\n className={cn(\"mt-0.5 block\", type.supporting, text.medium, appearance === \"surface\" && selectableRowSupporting)}\n >\n {description}\n </Field.Description>\n </span>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AA2BA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAC0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAE1C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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ui/react/field\";\nimport type { ClassValue } from \"clsx\";\nimport React, { type ReactNode } from \"react\";\nimport { cn } from \"@/libs/utils\";\nimport {\n density,\n focusRingWithin,\n material,\n selectableRowSupporting,\n selectableRowSurface,\n shape,\n state,\n stateLayerQuietComposite,\n text,\n type,\n} from \"./ui.common\";\nimport { motionFeedback } from \"./ui.motion\";\n\n/* The row a choice in a group sits on — a radio in `RadioGroup`, a checkbox in `CheckboxGroup`. The\n two groups hold different marks and different values, but a choice is the same object in both: the\n whole row is its label, the mark holds the first line of the copy, and the opt-in `surface` row is\n the same held-choice surface. One anatomy keeps the two from drifting into two designs. */\n\nexport type ChoiceAppearance = \"default\" | \"surface\";\n\n/* Each part is a class list rather than a finished class name: the component composes it through its\n own `cn()`, which is what scopes it. */\n\n/** The `Field.Item` that scopes one choice's label and description. */\nexport const choiceItemClasses = (appearance: ChoiceAppearance): ClassValue[] => [\n \"group flex items-stretch\",\n density.normal,\n appearance === \"surface\" &&\n cn(\n \"relative min-w-0 forced-colors:has-[:focus-visible]:[outline-style:none]\",\n shape.control,\n material.matteHigh,\n selectableRowSurface,\n stateLayerQuietComposite,\n focusRingWithin,\n motionFeedback\n ),\n state.enabled,\n state.effectiveDisabled,\n state.disabledRow,\n];\n\n/* The row itself is the label, so the whole row stays the pointer target. Inside it the mark and the\n copy are one first-line group: a wrapped label then aligns the mark to its first line instead of\n centring it on the block, while a one-line row is still centred in the row's own density height.\n The copy declares its own line height — `density.normal` sets the type step but no leading, and this\n package ships no reset — so the 20px mark plus its 2px of block margin and the line it is centred on\n are the same 24px whatever line height a host happens to inherit. */\nexport const choiceLabelClasses = (appearance: ChoiceAppearance): ClassValue[] => [\n \"flex min-w-0 flex-1 items-center\",\n appearance === \"surface\" && \"px-4 py-3\",\n];\n\nexport const choiceLineClassName = \"flex w-full items-start gap-3\";\n\ninterface ChoiceCopyProps {\n appearance: ChoiceAppearance;\n label: ReactNode;\n description?: ReactNode;\n /** The id the control is named by when a description follows its label. */\n labelId: string;\n}\n\n/**\n * A choice's copy. Without a description it is the label alone, and the control is named by the\n * whole row. With one, the label is the name and the description is the control's description:\n * Base links it through the `Field.Item` around the row, so a reader hears \"Casino A, checkbox,\n * casino-a.com and casino-a.net\" rather than one run-on name. Both stay inside the row, so a press\n * on the supporting line still makes the choice.\n */\nexport function ChoiceCopy({ appearance, label, description, labelId }: ChoiceCopyProps) {\n if (description == null) {\n return <span className={cn(text.high, \"min-w-0 leading-6\", appearance === \"surface\" && \"flex-1\")}>{label}</span>;\n }\n return (\n <span className={cn(\"flex min-w-0 flex-col\", appearance === \"surface\" && \"flex-1\")}>\n <span id={labelId} className={cn(text.high, \"leading-6\")}>{label}</span>\n {/* A label holds phrasing content only, so the description renders as a span. */}\n <Field.Description\n render={<span />}\n className={cn(\"mt-0.5 block\", type.supporting, text.medium, appearance === \"surface\" && selectableRowSupporting)}\n >\n {description}\n </Field.Description>\n </span>\n );\n}\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AA2BA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAC0C,CAAA,CAA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AC,MAAM,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,KAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAI,uBAAuB,CAAC,CAAA,CAAA,QAAA,CAAA,CAE/G,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAA,CACM,CAAA,EAAA,CACf,CAAA;AAEX;;"}
|
|
@@ -175,27 +175,27 @@ const edgeTone = {
|
|
|
175
175
|
header: "border-sherick-edge/[0.10]",
|
|
176
176
|
rule: "border-sherick-edge/[0.075]",
|
|
177
177
|
};
|
|
178
|
-
/* Rim — the boundary of a *hollow* control:
|
|
179
|
-
inside such a control says what it is — an empty
|
|
180
|
-
|
|
178
|
+
/* Rim — the boundary of a *hollow* control: the file drop target, or an empty checkbox or radio.
|
|
179
|
+
Nothing inside such a control says what it is — an empty mark holds nothing, a drop target only
|
|
180
|
+
an invitation — and it still has to be identifiable at 3:1, which no neutral fill step and no
|
|
181
181
|
depth the light model can draw achieves on its own. So a hollow control carries one rim in the
|
|
182
182
|
`rim` tone, tuned to clear 3:1 by a small margin and no more, and that rim is the only border a
|
|
183
183
|
control has. A filled control — a button, a chip, a selected mark — is identified by its fill and
|
|
184
184
|
never carries one.
|
|
185
|
-
A text field
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
border on all four sides
|
|
190
|
-
a field there keeps its whole outline
|
|
191
|
-
|
|
185
|
+
A text field is not hollow: its label names it, and its value or placeholder and its parts — a
|
|
186
|
+
chevron, a calendar glyph, a stepper — show what it is and where it is, which is how WCAG 1.4.11
|
|
187
|
+
lets a control be identified without a 3:1 edge. Its tray says "something goes here", and its
|
|
188
|
+
states ride on the tray and the focus ring (`state.field`). `rim.field` is therefore no visible
|
|
189
|
+
line: it is a transparent border on all four sides, because forced colors repaints even a
|
|
190
|
+
transparent border in a system colour, so a field there keeps its whole outline where the tray is
|
|
191
|
+
discarded; the scoped baseline sizes boxes by their border edge, so it never changes a field's
|
|
192
|
+
footprint. An invalid field takes the same transparent border.
|
|
192
193
|
A drop target's rim is dashed, and the dashes are a mask over an overlay rather than the native
|
|
193
194
|
`dashed` style, whose dash length and corner joins the platform decides: the mask fixes the dash
|
|
194
195
|
rhythm and follows the `control` corner exactly. The mask is authored in `tokens.ts`. */
|
|
195
196
|
const dashedRimMask = "after:[mask-image:var(--sui-rim-dashed)] after:[mask-size:100%_100%] after:[mask-repeat:no-repeat]";
|
|
196
197
|
const rim = {
|
|
197
|
-
field: "border-[1.5px] border-transparent
|
|
198
|
-
fieldError: "border-[1.5px] border-transparent border-b-sherick-danger",
|
|
198
|
+
field: "border-[1.5px] border-transparent",
|
|
199
199
|
dashed: /* @__PURE__ */ cx("after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:content-['']", "after:bg-sherick-rim", dashedRimMask, motionRim),
|
|
200
200
|
/* The dashes step up under the pointer and take the primary tone while a file is held over them. */
|
|
201
201
|
dashedHover: "hover:after:bg-sherick-ink-muted",
|
|
@@ -255,29 +255,31 @@ const state = {
|
|
|
255
255
|
composite field focuses its outer surface while the input inside stays
|
|
256
256
|
borderless; an expanded control holds the engaged step while its popup is
|
|
257
257
|
open. Tonality carries the state, so no border appears and disappears. */
|
|
258
|
-
/* A field is a tray
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
258
|
+
/* A field is a tray in the `surface-high` tone, so it reads as a quiet recess in light and a
|
|
259
|
+
quiet step up in dark. It draws no line: its label and content identify it (see `rim`), so the
|
|
260
|
+
tray is laid at full strength to say "something goes here" on a card and on the page alike.
|
|
261
|
+
The pointer sinks it to the deep tray, and so does engagement — focus or an open popup — where
|
|
262
|
+
the focus ring is what says "this one is engaged"; an engaged field never falls back under the
|
|
263
|
+
pointer, because both states share the step. An invalid field is the danger tray — the role's
|
|
264
|
+
soft surface, at full strength like the neutral tray — and it holds still under the pointer:
|
|
265
|
+
its colour is already what it has to say, and the danger placeholder and the field's message
|
|
266
|
+
carry the error in words. */
|
|
265
267
|
field: {
|
|
266
|
-
hover: "hover:bg-sherick-
|
|
267
|
-
focus: "focus:bg-sherick-
|
|
268
|
+
hover: "hover:bg-sherick-tray-deep",
|
|
269
|
+
focus: "focus:bg-sherick-tray-deep",
|
|
268
270
|
/* A composite's engaged tone outranks hover, independent of variant emission order. */
|
|
269
|
-
focusWithin: "[&&]:focus-within:bg-sherick-
|
|
270
|
-
engaged: "bg-sherick-
|
|
271
|
-
errorHover: "hover:bg-sherick-danger-soft
|
|
272
|
-
errorFocus: "focus:bg-sherick-danger-soft
|
|
273
|
-
errorEngaged: "bg-sherick-danger-soft
|
|
271
|
+
focusWithin: "[&&]:focus-within:bg-sherick-tray-deep",
|
|
272
|
+
engaged: "bg-sherick-tray-deep",
|
|
273
|
+
errorHover: "hover:bg-sherick-danger-soft",
|
|
274
|
+
errorFocus: "focus:bg-sherick-danger-soft",
|
|
275
|
+
errorEngaged: "bg-sherick-danger-soft",
|
|
274
276
|
/* The error ladder again, keyed on Base UI's validity attribute for a part that learns its
|
|
275
277
|
validity from the field it sits in. Two variants outrank the single-variant ladder above,
|
|
276
278
|
so neither ladder has to be conditional. */
|
|
277
|
-
invalid: "data-[invalid]:bg-sherick-danger-soft
|
|
278
|
-
invalidHover: "data-[invalid]:hover:bg-sherick-danger-soft
|
|
279
|
-
invalidEngaged: "data-[invalid]:bg-sherick-danger-soft
|
|
280
|
-
invalidFocusWithin: "[&&]:data-[invalid]:focus-within:bg-sherick-danger-soft
|
|
279
|
+
invalid: "data-[invalid]:bg-sherick-danger-soft",
|
|
280
|
+
invalidHover: "data-[invalid]:hover:bg-sherick-danger-soft",
|
|
281
|
+
invalidEngaged: "data-[invalid]:bg-sherick-danger-soft",
|
|
282
|
+
invalidFocusWithin: "[&&]:data-[invalid]:focus-within:bg-sherick-danger-soft",
|
|
281
283
|
},
|
|
282
284
|
};
|
|
283
285
|
/* State layers.
|
|
@@ -385,10 +387,9 @@ const hitArea = "relative after:pointer-events-auto after:absolute after:inset-[
|
|
|
385
387
|
- matteHigh: the second matte step, for nesting inside another matte surface.
|
|
386
388
|
- matteInset: a passive sheet tucked under a stronger control; subdued without
|
|
387
389
|
blending into the canvas or needing a drawn rim.
|
|
388
|
-
- control: the fill every text control shares, plus its placeholder tone
|
|
389
|
-
the `
|
|
390
|
-
|
|
391
|
-
3:1 boundary (see `rim`).
|
|
390
|
+
- control: the fill every text control shares, plus its placeholder tone: an opaque tray
|
|
391
|
+
in the `surface-high` tone. The tray says "something goes here"; the field's
|
|
392
|
+
label and content, not a drawn edge, are what identify it (see `rim`).
|
|
392
393
|
- handle: the fill of a small part the user has to find — a value control's handle.
|
|
393
394
|
Surface steps sit within a few percent of their neighbours, so this role
|
|
394
395
|
takes the mid-emphasis tone, which inverts with the theme and separates in
|
|
@@ -421,15 +422,15 @@ const material = {
|
|
|
421
422
|
matteQuiet: "bg-sherick-surface/[0.42] text-sherick-ink",
|
|
422
423
|
matte: "bg-sherick-surface/[0.78] text-sherick-ink",
|
|
423
424
|
matteHigh: "bg-sherick-surface-high/[0.72] text-sherick-ink",
|
|
424
|
-
control: "bg-sherick-surface-high
|
|
425
|
+
control: "bg-sherick-surface-high text-sherick-ink placeholder:text-sherick-ink-muted",
|
|
425
426
|
/* The invalid fill carries its placeholder at the *full* danger tone, not at a fraction of it. A
|
|
426
427
|
placeholder is text, so it answers to the same 4.5:1 the copy beside it does, and a partial
|
|
427
428
|
opacity of an accent is a different colour from the accent: the 72%-opacity placeholder
|
|
428
|
-
measured 2.8–3.0:1 light and 3.4–3.9:1 dark on
|
|
429
|
+
measured 2.8–3.0:1 light and 3.4–3.9:1 dark on the half-strength danger tray, while the token it was mixed from
|
|
429
430
|
measures 4.1–4.7:1 light and 5.2–6.2:1 dark on it. There is no dimmer step of a semantic tone
|
|
430
431
|
that is still readable, and a normal field's placeholder is `ink-muted` at full strength
|
|
431
432
|
already — so the error form is the same rule, in the tone the field is in. */
|
|
432
|
-
controlError: "bg-sherick-danger-soft
|
|
433
|
+
controlError: "bg-sherick-danger-soft text-sherick-ink placeholder:text-sherick-danger",
|
|
433
434
|
handle: "bg-sherick-ink-muted text-sherick-canvas",
|
|
434
435
|
acrylic: "bg-sherick-surface-float/[var(--sui-glass-fill)] bg-[image:var(--sui-glass-gradient)] text-sherick-ink backdrop-blur-[var(--sui-glass-blur)] backdrop-saturate-[var(--sui-glass-saturation)] backdrop-brightness-[var(--sui-glass-brightness)]",
|
|
435
436
|
acrylicDense: "bg-sherick-surface-float/[var(--sui-glass-dense-fill)] bg-[image:var(--sui-glass-gradient-dense)] text-sherick-ink backdrop-blur-[var(--sui-glass-dense-blur)] backdrop-saturate-[var(--sui-glass-dense-saturation)] backdrop-brightness-[var(--sui-glass-dense-brightness)]",
|
|
@@ -721,12 +722,18 @@ const currentDestination = "bg-sherick-primary-soft text-sherick-ink font-medium
|
|
|
721
722
|
an option, a tree row, a date — keeps `tone.selected`, because a list sheet is already the
|
|
722
723
|
brightest surface and a white row on it would vanish. */
|
|
723
724
|
const puck = "bg-sherick-puck";
|
|
724
|
-
/* A choice row
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
725
|
+
/* A choice row — an opt-in `surface` row in a RadioGroup or CheckboxGroup — rests on the
|
|
726
|
+
`matteHigh` tray, so every choice in the group reads as a target before any is chosen; it stays
|
|
727
|
+
light enough that the empty mark's rim still clears 3:1 against it. The row that holds the
|
|
728
|
+
selection takes the role's *soft* surface and the accent **selection rim**, and stays flat. The
|
|
729
|
+
soft surface is lighter than the resting tray, so the tint alone would make the chosen row the
|
|
730
|
+
quieter of the two; the rim is what says "this one". It is the row's selection mark, not an
|
|
731
|
+
outline drawn to separate a surface, and it belongs to the selected state only. Like an empty
|
|
732
|
+
mark's rim it is an overlay rather than a border, so the fill and the hover layer reach the row's
|
|
733
|
+
real edge, and it is transparent rather than absent at rest, so forced colors keeps every row's
|
|
734
|
+
outline. The selected step and a lift turned a whole card into an accent block, which outshouted
|
|
735
|
+
the priority action on the same view. */
|
|
736
|
+
const selectableRowSurface = /* @__PURE__ */ cx("has-[[data-checked]]:bg-sherick-primary-soft has-[[data-checked]]:text-sherick-ink", "after:pointer-events-none after:absolute after:inset-0 after:box-border after:rounded-[inherit] after:border-[1.5px] after:border-transparent after:content-['']", "has-[[data-checked]]:after:border-sherick-primary", motionRim);
|
|
730
737
|
/* Supporting copy inside such a row — a choice's description. `text.medium` clears 4.5:1 on the
|
|
731
738
|
soft step at rest (5.7:1 light, 6.2:1 dark), but the row's press layer composites toward the label
|
|
732
739
|
and takes that margin away, so while the row holds the selection its supporting line takes full
|
|
@@ -788,8 +795,11 @@ const toneAlpha = (tone) => (recipe, label) => {
|
|
|
788
795
|
throw new Error(`recipe alpha missing for ${label}`);
|
|
789
796
|
return match[1] === undefined ? 1 : Number(match[1]);
|
|
790
797
|
};
|
|
791
|
-
/* A field tray's `surface-high` step, and the canvas step an empty
|
|
798
|
+
/* A field tray's `surface-high` step, its deep step, its danger step, and the canvas step an empty
|
|
799
|
+
mark's interior holds. */
|
|
792
800
|
const trayAlpha = toneAlpha("surface-high");
|
|
801
|
+
const deepTrayAlpha = toneAlpha("tray-deep");
|
|
802
|
+
const dangerTrayAlpha = toneAlpha("danger-soft");
|
|
793
803
|
const markAlpha = toneAlpha("canvas");
|
|
794
804
|
const recipeAlphas = {
|
|
795
805
|
state: {
|
|
@@ -808,10 +818,10 @@ const recipeAlphas = {
|
|
|
808
818
|
card: fillAlpha(material.matte, "field.card"),
|
|
809
819
|
groove: fillAlpha(material.matteHigh, "field.groove"),
|
|
810
820
|
control: trayAlpha(material.control, "field.control"),
|
|
811
|
-
hover:
|
|
812
|
-
engaged:
|
|
821
|
+
hover: deepTrayAlpha(state.field.hover, "field.hover"),
|
|
822
|
+
engaged: deepTrayAlpha(state.field.engaged, "field.engaged"),
|
|
813
823
|
mark: markAlpha(markWellFill, "field.mark"),
|
|
814
|
-
error:
|
|
824
|
+
error: dangerTrayAlpha(material.controlError, "field.error"),
|
|
815
825
|
},
|
|
816
826
|
};
|
|
817
827
|
/* A labelled field is a shrinkable column. Its explanatory copy wraps, including identifiers;
|