@carissa-io/theme-default 0.3.8 → 0.3.10
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/DESIGN.md +87 -56
- package/README.md +2 -2
- package/dist/index.css +596 -2
- package/package.json +52 -2
- package/scss/_tokens.scss +1 -1
- package/scss/index.scss +229 -21
package/DESIGN.md
CHANGED
|
@@ -10,7 +10,7 @@ never changes to the components.
|
|
|
10
10
|
|
|
11
11
|
## Principles
|
|
12
12
|
- **Objective clarity:** information is prioritized over decoration.
|
|
13
|
-
- **Mathematical grid:** precise alignment and spacing, square corners.
|
|
13
|
+
- **Mathematical grid:** precise alignment and spacing, square corners. "Square" means the token `$radius: 0`: every component reads that one token (the radio dot is the only round shape, and the date range band stays unrounded so it is unbroken), so the theme is square because the token is 0, and changing the token rounds all of it.
|
|
14
14
|
- **High contrast:** absolute black (`#000`) for primary actions and focus; neutral scales for meta-data.
|
|
15
15
|
|
|
16
16
|
## Palette
|
|
@@ -18,9 +18,9 @@ never changes to the components.
|
|
|
18
18
|
| :--- | :--- |
|
|
19
19
|
| Primary | `#000000` |
|
|
20
20
|
| Surface | `#fafafa` / `#f5f5f5` |
|
|
21
|
-
| Border (fields) | `#
|
|
21
|
+
| Border (fields) | `#666666` (hover and focus: `#000`, focus adds a 1px ring) |
|
|
22
22
|
| Text (body) | `#171717` |
|
|
23
|
-
| Text (meta, placeholder) | `#
|
|
23
|
+
| Text (meta, placeholder) | `#666666` (5.7:1; lighter greys only for disabled states) |
|
|
24
24
|
|
|
25
25
|
The same palette is available as Sass tokens (`$black`, `$muted`, `$surface`, `$error`...) in
|
|
26
26
|
[scss/_tokens.scss](scss/_tokens.scss), the machine-readable palette: apps read them (for example to configure Bootstrap)
|
|
@@ -35,7 +35,7 @@ Both modes ship in the same package; dark is **opt-in per app** with `data-mode`
|
|
|
35
35
|
| :--- | :--- | :--- |
|
|
36
36
|
| `background` | `#ffffff` | `#0a0a0a` |
|
|
37
37
|
| `text` | `#171717` | `#f5f5f5` |
|
|
38
|
-
| `muted` | `#
|
|
38
|
+
| `muted` | `#666666` | `#a3a3a3` |
|
|
39
39
|
| `surface` | `#f5f5f5` | `#171717` |
|
|
40
40
|
| `surface-active` | `#e5e5e5` | `#262626` |
|
|
41
41
|
| `primary` | `#000000` | `#ffffff` |
|
|
@@ -63,8 +63,9 @@ Contrast (WCAG 2.x): text 4.5:1, borders and the focus ring 3:1.
|
|
|
63
63
|
| Pair | Light | Dark |
|
|
64
64
|
| :--- | :--- | :--- |
|
|
65
65
|
| `text` on `background` | 17.93 | 18.16 |
|
|
66
|
-
| `muted` on `background` (labels, placeholders, field borders) |
|
|
67
|
-
| `muted` on `surface` |
|
|
66
|
+
| `muted` on `background` (labels, placeholders, field borders) | 5.74 | 7.85 |
|
|
67
|
+
| `muted` on `surface` | 5.27 | 7.11 |
|
|
68
|
+
| `muted` on `surface-active` | 4.56 | 6.00 |
|
|
68
69
|
| `on-primary` on `primary` | 21.00 | 21.00 |
|
|
69
70
|
| `error` on `background` | 4.53 | 7.16 |
|
|
70
71
|
| `focus` on `background` | 21.00 | 19.80 |
|
|
@@ -76,8 +77,8 @@ Contrast (WCAG 2.x): text 4.5:1, borders and the focus ring 3:1.
|
|
|
76
77
|
|
|
77
78
|
The light `error` on `surface` (4.15) is below 4.5 for text, so the Alert never sets text in the status color (only the icon and the accent border, which need 3:1).
|
|
78
79
|
|
|
79
|
-
`muted`
|
|
80
|
-
WCAG but are listed in the backlog for a contrast review. Known gap in dark: the 0-width listbox option separator keeps the component default
|
|
80
|
+
Every `muted` text pairing passes AA in both modes (a test asserts it): the light muted was `#737373`, which gave 4.35 on `surface` and 3.76 on
|
|
81
|
+
`surface-active`, so it is now `#666666` (5.74 / 5.27 / 4.56). The disabled states are exempt from WCAG but are listed in the backlog for a contrast review. Known gap in dark: the 0-width listbox option separator keeps the component default
|
|
81
82
|
(`#dee2e6`); it draws nothing today.
|
|
82
83
|
|
|
83
84
|
## Typography
|
|
@@ -114,7 +115,7 @@ Field text is 1rem (16px, which also avoids the zoom-on-focus of mobile browsers
|
|
|
114
115
|
Three variants from [components-button](components/components-button), all square, 44px tall, with the same uppercase,
|
|
115
116
|
bold, tracked 11px label as the field labels and 200ms color transitions.
|
|
116
117
|
- **Primary:** black background, white text; hover `#262626`, active `#404040`.
|
|
117
|
-
- **Secondary:** white background, 1px `#
|
|
118
|
+
- **Secondary:** white background, 1px `#666666` border; on hover the border turns black and the background becomes `#e5e5e5` (`--c-surface-active`), so the state reads without relying on the border alone.
|
|
118
119
|
- **Ghost:** transparent; a `#f5f5f5` surface appears on hover.
|
|
119
120
|
- **Disabled:** `#a3a3a3` text on a `#f5f5f5` surface (primary), or a lighter border (secondary, ghost); no hover.
|
|
120
121
|
- **Focus:** keyboard focus (`:focus-visible`) follows the general rule below: secondary and ghost thicken their border to
|
|
@@ -123,7 +124,7 @@ bold, tracked 11px label as the field labels and 200ms color transitions.
|
|
|
123
124
|
## Checkbox
|
|
124
125
|
From [components-checkbox](components/components-checkbox): the whole row (box and label) is the click target and is at
|
|
125
126
|
least 44px tall. The label is body text (1rem, `#171717`), not the uppercase field-label style.
|
|
126
|
-
- **Box:** 20px square, square corners, 1px `#
|
|
127
|
+
- **Box:** 20px square, square corners, 1px `#666666` border; the border turns black on hover.
|
|
127
128
|
- **Checked:** black background with a white Lucide `check` mark.
|
|
128
129
|
- **Disabled:** `#a3a3a3` label and mark on a `#f5f5f5` box with a `#d4d4d4` border; no hover.
|
|
129
130
|
- **Error:** `#dc3545`, 13px, under the row; the box border turns red too. The built-in error shows after the first
|
|
@@ -133,17 +134,17 @@ least 44px tall. The label is body text (1rem, `#171717`), not the uppercase fie
|
|
|
133
134
|
|
|
134
135
|
## Switch
|
|
135
136
|
From [components-switch](components/components-switch), a checkbox with `role="switch"`, same row, label and error.
|
|
136
|
-
- **Track:** 40 x 20px, square, white with a 1px `#
|
|
137
|
+
- **Track:** 40 x 20px, square, white with a 1px `#666666` border (black on hover); a `#666666` square thumb.
|
|
137
138
|
- **On:** black track, white thumb; the thumb slides in 200ms, like the other color transitions.
|
|
138
139
|
- **Disabled:** `#f5f5f5` track with a `#d4d4d4` border and an `#a3a3a3` thumb.
|
|
139
140
|
- **Focus:** an off track thickens its border to 2px; an on (black) track draws a 1px black ring offset by 2px.
|
|
140
141
|
|
|
141
142
|
## Radio group
|
|
142
143
|
From [components-radio-group](components/components-radio-group): a fieldset whose legend uses the field-label style
|
|
143
|
-
(11px, bold, uppercase, tracked, `#
|
|
144
|
+
(11px, bold, uppercase, tracked, `#666666`). Each option row (dot and label) is the click target and is at least 44px
|
|
144
145
|
tall; the label is body text (1rem, `#171717`).
|
|
145
146
|
- **Dot:** 20px circle (the one round shape in the theme: a radio is a circle, so its radius is not the square `$radius`),
|
|
146
|
-
1px `#
|
|
147
|
+
1px `#666666` border; the border turns black on hover.
|
|
147
148
|
- **Checked:** black border with a 10px black inner dot on white.
|
|
148
149
|
- **Disabled:** `#a3a3a3` label on a `#f5f5f5` dot with a `#d4d4d4` border; no hover. A single option can be disabled too.
|
|
149
150
|
- **Error:** `#dc3545`, 13px, under the options; the dots get a red border. The built-in error shows after the first
|
|
@@ -153,7 +154,7 @@ tall; the label is body text (1rem, `#171717`).
|
|
|
153
154
|
|
|
154
155
|
## Textarea
|
|
155
156
|
From [components-textarea](components/components-textarea), which is the input with `multiline`: it uses exactly the
|
|
156
|
-
input's look (notched uppercase label, 1px `#
|
|
157
|
+
input's look (notched uppercase label, 1px `#666666` border that turns black on hover and focus, 1px black focus ring,
|
|
157
158
|
`#dc3545` error). Only the control differs:
|
|
158
159
|
- **Height:** at least 6rem (about three lines of 16px text) and resizable vertically only, so it never breaks the grid;
|
|
159
160
|
`rows` sets the initial height.
|
|
@@ -161,9 +162,9 @@ input's look (notched uppercase label, 1px `#737373` border that turns black on
|
|
|
161
162
|
|
|
162
163
|
## Slider
|
|
163
164
|
From [components-slider](components/components-slider), a native range input; the row is at least 44px tall. The label
|
|
164
|
-
uses the field-label style (11px, bold, uppercase, tracked, `#
|
|
165
|
+
uses the field-label style (11px, bold, uppercase, tracked, `#666666`); the optional live value, on the same line at
|
|
165
166
|
the right, is body text (1rem, `#171717`).
|
|
166
|
-
- **Track:** a 2px `#
|
|
167
|
+
- **Track:** a 2px `#666666` line, square; the part before the thumb is black.
|
|
167
168
|
- **Thumb:** 20px black square with a 1px white border (so it stays distinct where it crosses the track); `#262626` on
|
|
168
169
|
hover, `#404040` while dragging.
|
|
169
170
|
- **Disabled:** `#a3a3a3` label, thumb and fill on a `#d4d4d4` track; no hover.
|
|
@@ -171,7 +172,7 @@ the right, is body text (1rem, `#171717`).
|
|
|
171
172
|
|
|
172
173
|
## Popover
|
|
173
174
|
From [components-popover](components/components-popover), the floating panel behind the select, combobox and date picker:
|
|
174
|
-
white, a 1px `#
|
|
175
|
+
white, a 1px `#666666` border, square corners and no shadow (flat, like the rest of the theme), 4px below its anchor.
|
|
175
176
|
It fades in over 200ms and opens above the anchor when there is no room below. It has no padding of its own: the
|
|
176
177
|
content (a list, a calendar) brings its spacing.
|
|
177
178
|
|
|
@@ -181,32 +182,32 @@ least 44px tall, body text (1rem, `#171717`) with 0.75rem of horizontal padding.
|
|
|
181
182
|
- **Active** (hover or keyboard cursor): `#f5f5f5` surface.
|
|
182
183
|
- **Selected:** bold text with a 2px black bar on the inline-start edge.
|
|
183
184
|
- **Disabled:** `#a3a3a3`, no hover.
|
|
184
|
-
- **Empty:** a `#
|
|
185
|
+
- **Empty:** a `#666666` message with 0.75rem of padding.
|
|
185
186
|
- **Height:** at most 15rem; longer lists scroll.
|
|
186
187
|
|
|
187
188
|
## Select
|
|
188
189
|
From [components-select](components/components-select): a custom list, so it looks the same in every browser. The closed
|
|
189
|
-
field is the Input (notched uppercase label, 1px `#
|
|
190
|
-
as body text, and the placeholder is `#
|
|
190
|
+
field is the Input (notched uppercase label, 1px `#666666` border, black on hover and focus, 44px tall); the value reads
|
|
191
|
+
as body text, and the placeholder is `#666666` like the input placeholder. A 16px `#666666` chevron sits on the right
|
|
191
192
|
and turns black; when the list is open it rotates 180 degrees over 200ms and the border stays black. The open panel is
|
|
192
193
|
the Popover and the options are the Listbox, as wide as the field. Errors, required marker and disabled look are the
|
|
193
194
|
Input's.
|
|
194
195
|
|
|
195
196
|
## Combobox
|
|
196
197
|
From [components-combobox](components/components-combobox): the Select field with a text input in place of the button, so
|
|
197
|
-
the user can type to filter the list. Same Input look (notched uppercase label, 1px `#
|
|
198
|
-
focus, 44px tall), same 16px `#
|
|
199
|
-
is body text (`#171717`) and the placeholder `#
|
|
198
|
+
the user can type to filter the list. Same Input look (notched uppercase label, 1px `#666666` border, black on hover and
|
|
199
|
+
focus, 44px tall), same 16px `#666666` chevron that turns black and rotates 180 degrees when the list is open. The text
|
|
200
|
+
is body text (`#171717`) and the placeholder `#666666`. A press anywhere in the box focuses the input (the chevron is
|
|
200
201
|
decorative, not a button); the list opens when typing or with the arrow keys. The panel is the Popover and the options
|
|
201
202
|
the Listbox, as wide as the field; a message such as "No results" uses the Listbox empty style. Errors, required marker
|
|
202
203
|
and disabled look are the Input's.
|
|
203
204
|
|
|
204
205
|
## Upload
|
|
205
206
|
From [components-upload](components/components-upload): the Input field turned into a dropzone. The box keeps the
|
|
206
|
-
notched uppercase label and the 1px `#
|
|
207
|
-
border is black and the background `#f5f5f5`. The zone is at least 5.5rem tall and centers its content as muted (`#
|
|
207
|
+
notched uppercase label and the 1px `#666666` border but dashed, black on hover; while files are dragged over it the
|
|
208
|
+
border is black and the background `#f5f5f5`. The zone is at least 5.5rem tall and centers its content as muted (`#666666`)
|
|
208
209
|
body text, and the whole box is the click target. Chosen files are listed below the zone as 44px rows split by a 1px
|
|
209
|
-
`#e5e5e5` line: the name in body text with an ellipsis, and a 44px square remove button (a multiplication sign, `#
|
|
210
|
+
`#e5e5e5` line: the name in body text with an ellipsis, and a 44px square remove button (a multiplication sign, `#666666`,
|
|
210
211
|
black on hover, 1px black focus ring). The focus ring of the box is the Input's. Errors, required marker and disabled look
|
|
211
212
|
(`#a3a3a3` on `#f5f5f5`) are the Input's.
|
|
212
213
|
|
|
@@ -214,7 +215,7 @@ black on hover, 1px black focus ring). The focus ring of the box is the Input's.
|
|
|
214
215
|
From [components-calendar](components/components-calendar): a standalone month grid (the date picker shows it inside the
|
|
215
216
|
Popover, which draws the only border). It has no outer border. The header is two 44px navigation buttons (muted
|
|
216
217
|
chevrons that turn black, 1px black focus ring drawn inside) around the month and year in the label style (11px, bold,
|
|
217
|
-
uppercase, `0.1em` tracking, `#
|
|
218
|
+
uppercase, `0.1em` tracking, `#666666`); the weekday row uses the same style. Days are 44px squares in body text
|
|
218
219
|
(`#171717`) with square corners and a `#f5f5f5` hover. The selected day is a black square with white text; today is a
|
|
219
220
|
1px black border, drawn inside the square so nothing shifts. Days outside `min..max` are `#a3a3a3` with no hover, and
|
|
220
221
|
the days of the neighbor months are left empty. The keyboard focus ring is 1px black, inset. The grid always shows six
|
|
@@ -222,20 +223,20 @@ weeks so the height never changes between months.
|
|
|
222
223
|
|
|
223
224
|
## Date picker
|
|
224
225
|
From [components-date-picker](components/components-date-picker): the Select field with a calendar in the panel. The closed
|
|
225
|
-
field is the Input (notched uppercase label, 1px `#
|
|
226
|
-
reads as body text (for example "Oct 14, 2026") and the placeholder is `#
|
|
226
|
+
field is the Input (notched uppercase label, 1px `#666666` border, black on hover and focus, 44px tall); the chosen date
|
|
227
|
+
reads as body text (for example "Oct 14, 2026") and the placeholder is `#666666`. A 16px `#666666` calendar icon sits on the
|
|
227
228
|
right and turns black on hover and while open; it does not rotate, and the border stays black while open. The open panel
|
|
228
|
-
is the Popover (1px `#
|
|
229
|
+
is the Popover (1px `#666666` border, no shadow) with 0.5rem of padding around the Calendar, as wide as the calendar
|
|
229
230
|
needs, not as the field. Errors, required marker and disabled look are the Input's.
|
|
230
231
|
|
|
231
232
|
## Search
|
|
232
233
|
From [components-search](components/components-search): the Input of type search with two inline parts built on the input's
|
|
233
|
-
`start` and `end` slots. The field is the Input's (notched uppercase label, 1px `#
|
|
234
|
-
44px tall; the keyboard focus rule below applies). A 20px `#
|
|
235
|
-
field has the focus. The clear button appears on the right only while there is text: a 16px `#
|
|
234
|
+
`start` and `end` slots. The field is the Input's (notched uppercase label, 1px `#666666` border, black on hover and focus,
|
|
235
|
+
44px tall; the keyboard focus rule below applies). A 20px `#666666` magnifier icon sits on the left and turns black while the
|
|
236
|
+
field has the focus. The clear button appears on the right only while there is text: a 16px `#666666` cross in the Input's
|
|
236
237
|
44px side-button box that turns black on hover; the browser's own clear button is hidden so the look is the same everywhere.
|
|
237
238
|
Errors, required marker and disabled look are the Input's. The Input and Textarea accept `start` and `end` content (a prefix
|
|
238
|
-
icon, a unit) in the same muted color (`#
|
|
239
|
+
icon, a unit) in the same muted color (`#666666`) with `0.5rem` between the content and the text.
|
|
239
240
|
|
|
240
241
|
## Card
|
|
241
242
|
From [components-card](components/components-card): `Card` with `CardHeader`, `CardBody` and `CardFooter`; the title and description are the Typography
|
|
@@ -275,7 +276,7 @@ placements. The look of each toast is the Alert's (see above), so its colors, ro
|
|
|
275
276
|
only the fade stays. The region is in the page, not in the browser's top layer, so a toast shown while a modal is open sits behind the modal's backdrop.
|
|
276
277
|
|
|
277
278
|
## Divider
|
|
278
|
-
From [components-divider](components/components-divider): `Divider`, a 1px line in `--c-muted` (the edge of the cards and fields:
|
|
279
|
+
From [components-divider](components/components-divider): `Divider`, a 1px line in `--c-muted` (the edge of the cards and fields: 5.74:1 on the background in light, 7.85:1 in dark),
|
|
279
280
|
1rem of space around it. With a label the text is the small `--c-muted` text (0.875rem, same contrast) with 0.75rem between it and each line. Horizontal is an `hr`, vertical and labelled
|
|
280
281
|
ones are `role="separator"`.
|
|
281
282
|
|
|
@@ -283,7 +284,7 @@ ones are `role="separator"`.
|
|
|
283
284
|
From [components-badge](components/components-badge): `Badge` in six variants and two sizes (`md` 0.75rem, `sm` 0.6875rem, bold), square like the rest, plus a `dot`. The variants are **tinted
|
|
284
285
|
like the Alert**: 12% of the role color (`--c-primary`, `--c-success`, `--c-warning`, `--c-error`, `--c-info`) over `--c-background` with `color-mix`, a 1px border at 35% of the same color.
|
|
285
286
|
**The text is always `--c-text`**, never the status color: it is 13.6:1 or more on every tint in both modes (light 13.63 to 15.32, dark 13.63 to 15.87), where the raw light `error` on its own tint would
|
|
286
|
-
fail. Neutral is `--c-surface` with a `--c-muted` border (text 16.44:1). The **dot** carries the role color (`--c-muted` for neutral) and is 3:1 or more as a graphic on its tint in both modes: in light 3.81 (error), 4.21 (warning), 4.27 (success), 5.56 (info), 15.97 (primary) and
|
|
287
|
+
fail. Neutral is `--c-surface` with a `--c-muted` border (text 16.44:1). The **dot** carries the role color (`--c-muted` for neutral) and is 3:1 or more as a graphic on its tint in both modes: in light 3.81 (error), 4.21 (warning), 4.27 (success), 5.56 (info), 15.97 (primary) and 5.27 (neutral); in dark 6.25 or more. A dot has no text, so the caller gives it `aria-label`.
|
|
287
288
|
|
|
288
289
|
## Tag
|
|
289
290
|
From [components-tag](components/components-tag): `Tag`, a chip with the same six tints, the same text rule (`--c-text`, same ratios) and square corners as the Badge, bold, 0.875rem (`md`) or 0.75rem (`sm`). A removable tag is
|
|
@@ -291,7 +292,7 @@ one tab stop and takes the theme focus ring (1px `--c-focus`, offset 2px). The r
|
|
|
291
292
|
|
|
292
293
|
## Link
|
|
293
294
|
From [components-link](components/components-link): `Link` in `default`, `subtle` and `inline`. The default is `--c-primary` (black in light, white in dark: 21:1 and 19.8:1 on the background), bold, **always underlined**: a black link
|
|
294
|
-
beside near-black text is told apart by the underline alone, so there is no un-underlined default. Hover is `--c-primary-hover`. `subtle` is `--c-muted` (
|
|
295
|
+
beside near-black text is told apart by the underline alone, so there is no un-underlined default. Hover is `--c-primary-hover`. `subtle` is `--c-muted` (5.74:1 light, 7.85:1 dark), `--c-text` on hover. Focus is the theme ring
|
|
295
296
|
(1px `--c-focus`, offset 2px). Disabled is `--c-disabled-text` at full opacity (exempt from contrast, as the other disabled states).
|
|
296
297
|
|
|
297
298
|
## Avatar
|
|
@@ -315,42 +316,42 @@ or focus, stays open while the pointer is over it and closes on `Escape`; the bu
|
|
|
315
316
|
## Prose
|
|
316
317
|
From [components-prose](components/components-prose): `Prose`, raw HTML content (markdown, a CMS, an article) with the same hierarchy as `Heading` and `Text`. Body text is `--c-text` at 1rem and a 1.6 line height, 65ch wide (small and
|
|
317
318
|
large scale the text and the headings by 0.875 and 1.125). Headings use the type scale tokens: `h1` and `h2` black (900), `h3` to `h6` bold, with the line heights of the typography block. Links are `--c-primary` and always underlined
|
|
318
|
-
(21:1 light, 19.8:1 dark), `--c-primary-hover` on hover (15.13:1 and 15.72:1). The quote edge, the `hr` and the table borders are `--c-muted` (
|
|
319
|
+
(21:1 light, 19.8:1 dark), `--c-primary-hover` on hover (15.13:1 and 15.72:1). The quote edge, the `hr` and the table borders are `--c-muted` (5.74:1 light, 7.85:1 dark, above the 3:1 of a graphic); the quote text and the figure
|
|
319
320
|
caption are `--c-muted` on the page background too. Code, `pre`, `kbd` and the table head sit on `--c-surface` with `--c-text` (16.44:1 in both modes); `kbd` has a `--c-muted` edge. Everything is square (`$radius`), code uses `$font-family-mono`.
|
|
320
|
-
`--c-muted`
|
|
321
|
+
`--c-muted` on `--c-surface` is 5.27:1 in light (AA), though the code and table text stay `--c-text`.
|
|
321
322
|
|
|
322
323
|
## Tabs
|
|
323
|
-
From [components-tabs](components/components-tabs): `Tabs`, `TabList`, `Tab` and `TabPanel`. A 1px `--c-muted` line runs under the list (
|
|
324
|
-
bold `--c-text` (17.93:1 / 18.16:1). The other tabs are bold `--c-muted` (
|
|
324
|
+
From [components-tabs](components/components-tabs): `Tabs`, `TabList`, `Tab` and `TabPanel`. A 1px `--c-muted` line runs under the list (5.74:1 light, 7.85:1 dark) and the selected tab has a 2px `--c-primary` indicator on it (21:1 light, 19.8:1 dark, well above the 3:1 of a graphic) with
|
|
325
|
+
bold `--c-text` (17.93:1 / 18.16:1). The other tabs are bold `--c-muted` (5.74:1 / 7.85:1) and turn `--c-text` on a `--c-surface` hover (16.44:1 in both modes); `--c-muted` on `--c-surface` is 5.27:1 in light (AA), and the hover still changes the text color too.
|
|
325
326
|
Square, 0.875rem, 1.25rem by 0.625rem of padding. The indicator is a bottom edge (horizontal) or an inline end edge (vertical). Keyboard focus is the theme's 1px `--c-focus` ring, drawn inside the tab so the scrolling list does not clip it.
|
|
326
327
|
|
|
327
328
|
## Accordion
|
|
328
|
-
From [components-accordion](components/components-accordion): `Accordion` and `AccordionItem`. The box and the rules between the items are 1px `--c-muted` (
|
|
329
|
+
From [components-accordion](components/components-accordion): `Accordion` and `AccordionItem`. The box and the rules between the items are 1px `--c-muted` (5.74:1 / 7.85:1); each header is a full-width bold `--c-text` button (17.93:1 / 18.16:1) with a `--c-surface` hover (16.44:1) and a chevron
|
|
329
330
|
that follows the text color and turns over when the item opens. 1.25rem of inline padding, 0.875rem of block padding on the header and 1rem on the content, square. Focus is the theme's 1px `--c-focus` ring, inside the header. The chevron is CSS, not an icon.
|
|
330
331
|
|
|
331
332
|
## Breadcrumb
|
|
332
|
-
From [components-breadcrumb](components/components-breadcrumb): `Breadcrumb` and `BreadcrumbItem`. Links and separators are `--c-muted` (
|
|
333
|
+
From [components-breadcrumb](components/components-breadcrumb): `Breadcrumb` and `BreadcrumbItem`. Links and separators are `--c-muted` (5.74:1 on the page in light, 7.85:1 in dark), links gain an underline and turn `--c-text` on hover (17.93:1 / 18.16:1), and the current page is bold `--c-text`
|
|
333
334
|
and not a link. 0.875rem text. Focus is the theme's 1px `--c-focus` ring, offset 2px. The separator is generated content, so screen readers do not read it.
|
|
334
335
|
|
|
335
336
|
## Pagination
|
|
336
337
|
From [components-pagination](components/components-pagination): `Pagination`. The controls follow the secondary button: `--c-background` with a 1px `--c-muted` border, bold `--c-text` (17.93:1 / 18.16:1), `--c-surface-active` on hover (14.23:1 / 13.88:1),
|
|
337
|
-
square, 44px minimum (the theme's touch target). The current page is filled: `--c-on-primary` on `--c-primary`, 21:1 in both modes. The ellipsis is `--c-muted` (
|
|
338
|
+
square, 44px minimum (the theme's touch target). The current page is filled: `--c-on-primary` on `--c-primary`, 21:1 in both modes. The ellipsis is `--c-muted` (5.74:1 / 7.85:1) and previous and next, drawn as CSS chevrons, are disabled
|
|
338
339
|
at the ends (half opacity). Focus is the theme's 1px `--c-focus` ring, offset 2px.
|
|
339
340
|
|
|
340
341
|
## Stepper
|
|
341
342
|
From [components-stepper](components/components-stepper): `Stepper` and `Step`. The status is carried by the marker shape and the hidden status text, never by color alone: a done step is a filled `--c-primary` marker with a `--c-on-primary` check (21:1), the current one an outlined 2px
|
|
342
343
|
`--c-primary` marker on `--c-background` with its number in `--c-text` (17.93:1 / 18.16:1), an upcoming one a `--c-surface-active` marker with its number in `--c-text` (14.23:1 / 13.88:1), and an error one a `--c-error` marker with a `--c-on-primary` mark
|
|
343
|
-
(4.53:1 light, 7.59:1 dark) and a `--c-error` title (4.53:1 / 7.16:1). Titles are bold `--c-text`; upcoming titles and the descriptions are `--c-muted` (
|
|
344
|
+
(4.53:1 light, 7.59:1 dark) and a `--c-error` title (4.53:1 / 7.16:1). Titles are bold `--c-text`; upcoming titles and the descriptions are `--c-muted` (5.74:1 / 7.85:1). The connectors are 2px `--c-muted` lines (5.74:1 / 7.85:1, above 3:1)
|
|
344
345
|
and `--c-primary` once the step is done. Clickable (completed) steps are buttons with the theme's 1px `--c-focus` ring, offset 2px.
|
|
345
346
|
|
|
346
347
|
## Sidebar
|
|
347
|
-
From [components-sidebar](components/components-sidebar): `Sidebar` and its parts. A `--c-surface` column (16rem, 4.5rem collapsed) with a 1px `--c-muted` edge (
|
|
348
|
+
From [components-sidebar](components/components-sidebar): `Sidebar` and its parts. A `--c-surface` column (16rem, 4.5rem collapsed) with a 1px `--c-muted` edge (5.74:1 light, 7.85:1 dark). Items are bold `--c-text` (16.44:1 on the surface in both modes), 0.875rem with 0.625rem of block padding, with a `--c-surface-active`
|
|
348
349
|
hover (14.23:1 light, 13.88:1 dark). The current page is filled: `--c-on-primary` on `--c-primary`, 21:1 in both modes, so it is told apart by shape and weight of fill, not by hue alone. Section titles use the label style (small, bold, uppercase, tracking) in `--c-text` and not
|
|
349
|
-
`--c-muted`, which is
|
|
350
|
+
`--c-muted`, which is 5.27:1 on the surface in light. A disabled item is half opacity and not a link. The toggle is a 44px square, `--c-text` on a `--c-surface-active` hover. Square; focus is the theme's 1px `--c-focus` ring, inside the item.
|
|
350
351
|
When collapsed the labels stay in the accessibility tree.
|
|
351
352
|
|
|
352
353
|
## Navbar
|
|
353
|
-
From [components-navbar](components/components-navbar): `Navbar` and its parts. A `--c-background` bar with a 1px `--c-muted` bottom edge. The brand is bold `--c-text` (17.93:1 light, 18.16:1 dark). Items read like the tabs: bold `--c-muted` (
|
|
354
|
+
From [components-navbar](components/components-navbar): `Navbar` and its parts. A `--c-background` bar with a 1px `--c-muted` bottom edge. The brand is bold `--c-text` (17.93:1 light, 18.16:1 dark). Items read like the tabs: bold `--c-muted` (5.74:1 / 7.85:1), `--c-text` on a `--c-surface` hover (16.44:1),
|
|
354
355
|
and `--c-text` for the current page (`aria-current="page"`). The content collapses behind a 44px toggle below 48rem (the component's Sass breakpoint, a media query, no JS). Square; focus is the theme's 1px `--c-focus` ring, inside the item.
|
|
355
356
|
|
|
356
357
|
## Drawer
|
|
@@ -360,32 +361,62 @@ The panel slides in over `$transition-duration`; with reduced motion it just app
|
|
|
360
361
|
|
|
361
362
|
## Menu
|
|
362
363
|
From [components-menu](components/components-menu): `Menu`, `MenuItem`, `MenuSeparator` and `MenuLabel`. The panel is the Popover's (`--c-background`, a 1px `--c-muted` border, flat). Items are `--c-text` with 0.625rem of block and 0.75rem of side padding, and hover and keyboard focus share a `--c-surface-active`
|
|
363
|
-
background (14.23:1 light, 13.88:1 dark) plus the theme's 1px `--c-focus` ring. Labels are small `--c-muted` text (
|
|
364
|
+
background (14.23:1 light, 13.88:1 dark) plus the theme's 1px `--c-focus` ring. Labels are small `--c-muted` text (5.74:1 / 7.85:1 on the panel), the separator a 1px `--c-muted` line, a disabled item is half opacity. Square. The trigger is the app's own button, so its look is not part of the theme.
|
|
364
365
|
|
|
365
366
|
## Table
|
|
366
367
|
From [components-table](components/components-table): `Table` and its parts. The header is `--c-surface` with bold `--c-text` (16.4:1 light, 16.4:1 dark), the rows are divided by 1px `--c-muted` lines, cells have 1rem by 0.75rem of padding (0.75rem by 0.375rem when dense) at the small size. **Row hover** is `--c-surface-active` (14.2:1 / 13.9:1 for `--c-text`), not `--c-surface`, so it still shows on a striped row (stripes are `--c-surface`). The **selected row** is a 12% tint of `--c-primary` over `--c-background`
|
|
367
|
-
(`color-mix`, light `#e0e0e0`, dark `#272727`), so `--c-text` is 13.6:1 / 13.7:1 on it and the tint follows the mode with no extra role. The **sticky header** background is `--c-surface`, a custom property and therefore opaque in both modes (rows never show through, and dark gets its own value; the component's neutral default is a literal white and must not be used in dark). The caption is `--c-muted` (
|
|
368
|
+
(`color-mix`, light `#e0e0e0`, dark `#272727`), so `--c-text` is 13.6:1 / 13.7:1 on it and the tint follows the mode with no extra role. The **sticky header** background is `--c-surface`, a custom property and therefore opaque in both modes (rows never show through, and dark gets its own value; the component's neutral default is a literal white and must not be used in dark). The caption is `--c-muted` (5.74:1 / 7.85:1 on the background). The sort arrows are CSS glyphs, so the direction is a shape and not only an opacity. Square, the theme's 1px `--c-focus` ring inside the cell and the scroll region.
|
|
368
369
|
|
|
369
370
|
## List
|
|
370
|
-
From [components-list](components/components-list): `List` and `ListItem`. Rows sit on the page background, divided (or bordered) by 1px `--c-muted` lines, with 1rem by 0.75rem of padding. A link or button row highlights with `--c-surface-active` on hover (`--c-text` 14.2:1 / 13.9:1) and the current item (`aria-current`) takes the same 12% `--c-primary` tint as a selected table row (13.6:1 / 13.7:1). The secondary text is `--c-text` at the small size on purpose: `--c-muted` is
|
|
371
|
+
From [components-list](components/components-list): `List` and `ListItem`. Rows sit on the page background, divided (or bordered) by 1px `--c-muted` lines, with 1rem by 0.75rem of padding. A link or button row highlights with `--c-surface-active` on hover (`--c-text` 14.2:1 / 13.9:1) and the current item (`aria-current`) takes the same 12% `--c-primary` tint as a selected table row (13.6:1 / 13.7:1). The secondary text is `--c-text` at the small size on purpose: `--c-muted` is 5.74:1 on the background but only 5.27:1 on `--c-surface` and 3.76:1 on `--c-surface-active`, both short of AA for text. Square, the theme's 1px `--c-focus` ring inside the row.
|
|
371
372
|
|
|
372
373
|
## Description list
|
|
373
|
-
From [components-description-list](components/components-description-list): `DescriptionList`, `DescriptionTerm`, `DescriptionDetail` and `DescriptionItem`. The term is a small bold `--c-muted` label (
|
|
374
|
+
From [components-description-list](components/components-description-list): `DescriptionList`, `DescriptionTerm`, `DescriptionDetail` and `DescriptionItem`. The term is a small bold `--c-muted` label (5.74:1 light, 7.85:1 dark on the background; do not put a description list on `--c-surface` in light, where it is 5.27:1) and the detail is `--c-text`. No fills or borders: the layout (vertical, horizontal, grid) is the only thing it sets, with 2rem between columns and 1rem between pairs.
|
|
374
375
|
|
|
375
376
|
## Stat
|
|
376
|
-
From [components-stat](components/components-stat): `Stat`. A card-like block on `--c-background` with a 1px `--c-muted` border (the Card's outlined look), square, 1.25rem by 1.5rem of padding. It is not on `--c-surface` because the delta colors are checked against the background: **delta up is `--c-success`** (5.02:1 light, 11.36:1 dark), **delta down is `--c-error`** (4.53:1 light, 7.16:1 dark) and **flat is `--c-muted`** (
|
|
377
|
+
From [components-stat](components/components-stat): `Stat`. A card-like block on `--c-background` with a 1px `--c-muted` border (the Card's outlined look), square, 1.25rem by 1.5rem of padding. It is not on `--c-surface` because the delta colors are checked against the background: **delta up is `--c-success`** (5.02:1 light, 11.36:1 dark), **delta down is `--c-error`** (4.53:1 light, 7.16:1 dark) and **flat is `--c-muted`** (5.74:1 / 7.85:1). On `--c-surface` the light `--c-error` would be 4.15:1, short of AA. The value is `--c-text` at the h1 size; the label and description are `--c-muted`. Color is never the only signal: the arrow glyph (up, down, flat) and the `delta_label` text for screen readers say the same. Whether "down" is good news (churn, cost) is the app's call: the color only follows the direction.
|
|
377
378
|
|
|
378
379
|
## Empty state
|
|
379
|
-
From [components-empty-state](components/components-empty-state): `EmptyState`. A centred block on the page background, with 3rem by 1.5rem of padding at the default size and 1rem between its parts. The icon is `--c-muted` (
|
|
380
|
+
From [components-empty-state](components/components-empty-state): `EmptyState`. A centred block on the page background, with 3rem by 1.5rem of padding at the default size and 1rem between its parts. The icon is `--c-muted` (5.74:1 light, 7.85:1 dark, above the 3:1 non-text minimum), the title is `--c-text`, bold, at the h3 size (h4 small, h2 large) and the description is `--c-muted` at the body size (5.74:1 / 7.85:1 on the background; on `--c-surface` it would be 5.27:1 in light, short of AA, so do not put an empty state on a surface panel without moving the description to `--c-text`). The actions are the app's own buttons. No fills, borders or radius.
|
|
380
381
|
|
|
381
382
|
## Timeline
|
|
382
|
-
From [components-timeline](components/components-timeline): `Timeline` and `TimelineItem`. The connector is a 1px `--c-muted` line. A **default** marker is a `--c-surface-active` dot with a 2px `--c-muted` ring; **success, warning, error and info** are solid dots in `--c-success`, `--c-warning`, `--c-error` and `--c-info` (light 5.02, 4.92, 4.53 and 6.70:1 on the background, dark 11.36, 11.86, 7.16 and 7.79:1: all above the 3:1 non-text minimum); the **current** step is a hollow `--c-primary` ring (21:1 / 19.8:1), a different shape from the dots, and the item carries `aria-current="step"`. An **icon marker** keeps a `--c-background` fill and takes the status as its 2px ring, so the `--c-text` icon is 17.93:1 / 18.16:1 in every status (a colored fill would not give one icon color AA in both modes). The status is also the visually hidden `status_label`, so colour is never the only signal. The title is bold `--c-text`, the time is `--c-muted` at the small size (
|
|
383
|
+
From [components-timeline](components/components-timeline): `Timeline` and `TimelineItem`. The connector is a 1px `--c-muted` line. A **default** marker is a `--c-surface-active` dot with a 2px `--c-muted` ring; **success, warning, error and info** are solid dots in `--c-success`, `--c-warning`, `--c-error` and `--c-info` (light 5.02, 4.92, 4.53 and 6.70:1 on the background, dark 11.36, 11.86, 7.16 and 7.79:1: all above the 3:1 non-text minimum); the **current** step is a hollow `--c-primary` ring (21:1 / 19.8:1), a different shape from the dots, and the item carries `aria-current="step"`. An **icon marker** keeps a `--c-background` fill and takes the status as its 2px ring, so the `--c-text` icon is 17.93:1 / 18.16:1 in every status (a colored fill would not give one icon color AA in both modes). The status is also the visually hidden `status_label`, so colour is never the only signal. The title is bold `--c-text`, the time is `--c-muted` at the small size (5.74:1 / 7.85:1 on the background) and the description is `--c-text`. Keep a timeline on `--c-background`. Deviation from the first plan: the default dot is outlined with `--c-muted` instead of being a bare `--c-surface-active` dot, which is 1.2:1 on white.
|
|
383
384
|
|
|
384
385
|
## Tree
|
|
385
386
|
From [components-tree](components/components-tree): `Tree` and `TreeItem`. Rows are 0.5rem by 0.75rem on the page background, 1.5rem of indent per level. **Hover** is `--c-surface-active` (`--c-text` 14.23:1 light, 13.88:1 dark); the **selected row** is the same 12% tint of `--c-primary` over `--c-background` as a selected table row (`color-mix`, light `#e0e0e0`, dark `#272727`) with `--c-text` (13.58:1 / 13.70:1), so a selected row still reads when hovered. The **chevron** is the component's CSS border chevron on `.c-tree__toggle` (parents only; right when closed, down when open), colored `--c-muted`: 3.76:1 on the hover and 3.59:1 on the selected tint in light, 6.00:1 and 5.92:1 in dark, above the 3:1 non-text minimum. A disabled item is half opacity (exempt from contrast). Square, the theme's 1px `--c-focus` ring inside the row.
|
|
386
387
|
|
|
387
388
|
## Code
|
|
388
|
-
From [components-code](components/components-code): `Code`, `Kbd` and `CodeBlock`. The font is the tokens' monospace stack. **Inline code** is `--c-text` on `--c-surface` (16.44:1 in both modes), square, 0.875em. A **kbd** is a `--c-background` key with a 1px `--c-muted` border and a 1px `--c-muted` bottom edge, text `--c-text` (17.93:1 / 18.16:1). The **block** is `--c-surface` with a 1px `--c-muted` border (
|
|
389
|
+
From [components-code](components/components-code): `Code`, `Kbd` and `CodeBlock`. The font is the tokens' monospace stack. **Inline code** is `--c-text` on `--c-surface` (16.44:1 in both modes), square, 0.875em. A **kbd** is a `--c-background` key with a 1px `--c-muted` border and a 1px `--c-muted` bottom edge, text `--c-text` (17.93:1 / 18.16:1). The **block** is `--c-surface` with a 1px `--c-muted` border (5.27:1 light, 7.11:1 dark against the surface, above 3:1) and `--c-text` at the small size; highlighted `children` are the app's to keep AA on `--c-surface`. The **copy button** reads like the secondary button: `--c-background` with a 1px `--c-muted` border, `--c-text` (17.93:1 / 18.16:1) and a `--c-surface-active` hover (`--c-text` 14.23:1 / 13.88:1), square, with the theme's 1px `--c-focus` ring inside it and on the focusable `pre`. The component has no uppercase label variables, so the button keeps the small body text instead of the secondary button's label style.
|
|
390
|
+
|
|
391
|
+
## Field
|
|
392
|
+
From [components-field](components/components-field): `Field`. The label is `--c-text`, bold, at the small size (17.93:1 light, 18.16:1 dark on the background) and not `--c-muted`, which is 5.27:1 on `--c-surface` in light. The hint is `--c-muted` at the small size (5.74:1 / 7.85:1 on the background) and stays visible, linked with `aria-describedby`. The error is `--c-error` (4.53:1 / 7.16:1), the same color as the Input's error line, and the required asterisk is `--c-error` too; color is never the only signal because the error is text with `role="alert"`. 0.5rem between label, control, hint and error; the horizontal layout uses a 10rem label column and 1.5rem of gap. Keep a field on `--c-background`.
|
|
393
|
+
|
|
394
|
+
## Number input
|
|
395
|
+
From [components-number-input](components/components-number-input): `NumberInput`. The field is the Input's, so it keeps its notched label, `--c-muted` border (5.74:1 / 7.85:1) and thickened `--c-focus` border. The stepper buttons read like the secondary button inside the box: square, `--c-muted` glyphs (5.74:1 / 7.85:1, above the 3:1 non-text minimum) turning `--c-text` on a `--c-surface-active` hover (14.23:1 / 13.88:1), half opacity at a bound (exempt from contrast). They are out of the tab order (the arrow keys do the same), so the focus ring stays on the field.
|
|
396
|
+
|
|
397
|
+
## OTP input
|
|
398
|
+
From [components-otp-input](components/components-otp-input): `OtpInput`. Each box is built like the Input: `--c-background` with a 1px `--c-muted` border (5.74:1 / 7.85:1), `--c-primary` on hover, and the keyboard focus thickens the border to `--c-focus` plus a 1px `--c-focus` shadow (2px in total, 21:1 / 19.8:1), the same rule as every outlined control. An invalid box is `--c-error` (4.53:1 / 7.16:1) with the message under the boxes in `--c-error`; a disabled one is `--c-surface` with `--c-disabled-text` (exempt). The digit is `--c-text` at the h3 size (17.93:1 / 18.16:1). Square, 3rem by 3.5rem (above the 44px touch target), 0.5rem between boxes; the group label is the field label style in `--c-muted`.
|
|
399
|
+
|
|
400
|
+
## Phone
|
|
401
|
+
From [components-phone](components/components-phone): `Phone`. The field is the Input's. The country select is a native `<select>` in the input's start slot, `--c-text` on a transparent background so the box color shows in both modes (17.93:1 / 18.16:1 on the background), with a 1px `--c-muted` divider before the number (5.74:1 / 7.85:1) and the theme's 1px `--c-focus` outline when it is focused by keyboard; disabled is `--c-disabled-text` (exempt). The open list is drawn by the platform, so it follows `color-scheme` in dark.
|
|
402
|
+
|
|
403
|
+
## Tag input
|
|
404
|
+
From [components-tag-input](components/components-tag-input): `TagInput`. The box is the Input's (square, `--c-muted` border, thickened `--c-focus` border on focus) and the chips are the Tag's, so the tag tints, borders and `--c-text` labels (14.8:1 or more on every tint) are the ones documented in the Tag section; the block only sets 0.375rem between chips and the text field and a 6rem minimum for the text field before it wraps to its own row. The placeholder is `--c-muted` as in the Input. Errors (`duplicate`, `max`, `invalid`) use the Input's `--c-error` line.
|
|
405
|
+
|
|
406
|
+
## Time picker
|
|
407
|
+
From [components-time-picker](components/components-time-picker): `TimePicker`. The field is the Input's and the times are the Listbox's inside the Popover, so the `--c-muted` border (5.74:1 / 7.85:1), the thickened `--c-focus` border, the `--c-text` options (17.93:1 / 18.16:1), the `--c-surface` active option and the selected marker are the ones documented for the Select and the Combobox (reused, no new figure). The clock icon is the Select arrow's: 16px, `--c-muted` turning `--c-primary` on hover and when open, and `--c-disabled-text` when disabled (exempt). Open takes the `--c-focus` border; the placeholder is `--c-muted`. Errors (`invalid_time`, `out_of_range`) use the Input's `--c-error` line (4.53:1 / 7.16:1).
|
|
408
|
+
|
|
409
|
+
## Date range
|
|
410
|
+
From [components-date-range](components/components-date-range): `DateRange`. The trigger is the Date picker's and the days are the Calendar's (44px squares, `--c-text`, `--c-surface` hover), so those figures are reused. The two ends use the Calendar's selected look, `--c-on-primary` on `--c-primary` (21:1 / 19.8:1). The days between them are a `--c-surface-active` band with `--c-text` (14.23:1 / 13.88:1, the same pair as the Menu and Pagination hovers), square so the band is unbroken; it is painted on the cell and on the day, and it relies on the calendar grid keeping `border-spacing: 0` (a test asserts it). The band against the background is only 1.26:1 / 1.31:1, so it is not the only cue: the ends are solid black (or white in dark), and the days carry `aria-selected`. Two months sit side by side with 1rem between them, with 0.5rem of panel padding. Errors (`end_before_start`, `out_of_range`) use the Input's `--c-error` line.
|
|
411
|
+
|
|
412
|
+
## Rating
|
|
413
|
+
From [components-rating](components/components-rating): `Rating`. The filled part is `--c-primary` (21:1 / 19.8:1 on the background) and the empty part is `--c-muted` (5.74:1 / 7.85:1), both above the 3:1 minimum for graphics. A filled star is a solid shape and an empty one an outline, so the two never rely on colour alone; their lightness differs by 4.43:1 in light and 2.52:1 in dark (below 3:1 there, which the solid-versus-outline shape makes up for). The preview while hovering is `--c-primary-hover` (15.13:1 in light, 15.72:1 in dark on the background). Stars are 1.75rem apart by 0.25rem, and the keyboard ring is the theme's 1px `--c-focus` outline (21:1 / 19.8:1). The group label is the field label style in `--c-muted`; a disabled rating is at half opacity (exempt).
|
|
414
|
+
|
|
415
|
+
## Color picker
|
|
416
|
+
From [components-color-picker](components/components-color-picker): `ColorPicker`. The field is the Input's with a 1.25rem chip bordered in `--c-muted` (5.74:1 / 7.85:1) next to the hex text in `--c-text`; the panel is the Popover's. The thumbs of the area and of the hue and alpha tracks are a 2px `--c-background` ring over a 1px `--c-text` ring, so one of the two contrasts with any colour under it in both modes (the ring pair is 17.93:1 / 18.16:1 between itself); the keyboard focus draws the theme's 1px `--c-focus` outline offset by 2px around the area or the track (21:1 / 19.8:1). The hue and brightness gradients are the colour data and keep their literal colours; the transparent checkerboard is `--c-surface-active` over `--c-background`. The hex input is built like the Input box: `--c-background`, a 1px `--c-muted` border, `--c-error` when invalid (4.53:1 / 7.16:1), the monospace stack at the small size. Swatches are 1.75rem squares with a `--c-muted` border and a `--c-primary` ring when selected; areas, tracks and chips are square.
|
|
417
|
+
|
|
418
|
+
## Async autocomplete
|
|
419
|
+
From [components-async-autocomplete](components/components-async-autocomplete): `AsyncAutocomplete`. The field, the panel and the options are the Combobox's (reused figures, no new contrast). While a request is pending the field shows a 16px spinner at the arrow's place: a 2px `--c-primary` arc (21:1 / 19.8:1) over a `--c-surface-active` track, slowed down under `prefers-reduced-motion`. The states are written in the panel: `loading` and `empty` in `--c-muted` (5.74:1 / 7.85:1, the Listbox's empty message color) and `error` in `--c-error` (4.53:1 / 7.16:1 on the background, which is the panel's); the state is also exposed as `aria-busy` and `data-state`, so colour is never the only signal. Open takes the `--c-focus` border.
|
|
389
420
|
|
|
390
421
|
## Keyboard focus (all controls)
|
|
391
422
|
One rule keeps the controls coherent: **an outlined control thickens its own border from 1px to 2px, black** (text fields,
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ change.
|
|
|
78
78
|
| `$black` | `#000` | primary, hover and focus |
|
|
79
79
|
| `$white` | `#fff` | surfaces |
|
|
80
80
|
| `$text` | `#171717` | body text |
|
|
81
|
-
| `$muted` | `#
|
|
81
|
+
| `$muted` | `#666666` | labels, field borders, placeholders |
|
|
82
82
|
| `$surface` | `#f5f5f5` | hover surface, disabled background |
|
|
83
83
|
| `$surface-active` | `#e5e5e5` | pressed surface, dividers |
|
|
84
84
|
| `$primary-hover` | `#262626` | primary action on hover |
|
|
@@ -142,7 +142,7 @@ it: check the names against the theme's `scss/_tokens.scss` before you switch.
|
|
|
142
142
|
|
|
143
143
|
## What it configures
|
|
144
144
|
`components-input`, `-button`, `-checkbox`, `-switch`, `-radio-group`, `-slider`, `-popover`, `-listbox`, `-select`,
|
|
145
|
-
`-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal`, `-toast`, `-divider`, `-badge`, `-tag`, `-link`, `-avatar`, `-skeleton`, `-progress`, `-tooltip`, `-prose`, `-tabs`, `-accordion`, `-breadcrumb`, `-pagination`, `-stepper`, `-sidebar`, `-navbar`, `-drawer`, `-menu`, `-table`, `-list`, `-description-list`, `-stat`, `-empty-state`, `-timeline`, `-tree` and `-
|
|
145
|
+
`-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal`, `-toast`, `-divider`, `-badge`, `-tag`, `-link`, `-avatar`, `-skeleton`, `-progress`, `-tooltip`, `-prose`, `-tabs`, `-accordion`, `-breadcrumb`, `-pagination`, `-stepper`, `-sidebar`, `-navbar`, `-drawer`, `-menu`, `-table`, `-list`, `-description-list`, `-stat`, `-empty-state`, `-timeline`, `-tree`, `-code`, `-field`, `-number-input`, `-otp-input`, `-phone`, `-tag-input`, `-time-picker`, `-date-range`, `-rating`, `-color-picker` and `-async-autocomplete`. `components-email`, `-password`, `-url` and `-textarea`
|
|
146
146
|
are styled through the input.
|
|
147
147
|
|
|
148
148
|
## Change a value
|