@slotted/react 0.1.0-beta.35 → 0.1.0-beta.36
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/{app-shell-DzgUaTI_.js → app-shell-ClwskWBN.js} +1 -1
- package/dist/app-shell.js +1 -1
- package/dist/{attachment-BMVfyrfb.js → attachment-AAjprQyU.js} +1 -1
- package/dist/attachment.js +1 -1
- package/dist/{button-DWqgjdVT.js → button-BMRInd-t.js} +3 -3
- package/dist/button.js +2 -2
- package/dist/{cascader-DuHG1xmi.js → cascader-DqrFX3Ob.js} +1 -1
- package/dist/cascader.js +1 -1
- package/dist/{column-manager-qJX80g4n.js → column-manager-D2PXs80l.js} +1 -1
- package/dist/column-manager.js +1 -1
- package/dist/{dashboard-grid-CLRtbO05.js → dashboard-grid-B6jxBz4j.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-B1AhnXmo.js → data-grid-DOMm7-ew.js} +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-BWseCMYO.js → data-list-DgXGmRQx.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/{detail-panel-D3AT1upM.js → detail-panel-DEZewVVV.js} +2 -2
- package/dist/detail-panel.js +1 -1
- package/dist/docs/button.json +10 -7
- package/dist/docs/button.md +6 -6
- package/dist/docs/command-palette.json +2 -1
- package/dist/docs/command-palette.md +1 -1
- package/dist/docs/dashboard-grid.json +2 -1
- package/dist/docs/dashboard-grid.md +1 -1
- package/dist/docs/entity-picker.json +2 -1
- package/dist/docs/entity-picker.md +1 -1
- package/dist/docs/field-group.json +1 -1
- package/dist/docs/field-group.md +1 -1
- package/dist/docs/guidelines/index.md +2 -0
- package/dist/docs/guidelines/own-elements.md +20 -0
- package/dist/docs/index.md +1 -1
- package/dist/docs/list.json +2 -1
- package/dist/docs/list.md +2 -2
- package/dist/docs/page.json +1 -1
- package/dist/docs/page.md +1 -1
- package/dist/docs/progress-indicator.json +1 -39
- package/dist/docs/progress-indicator.md +1 -6
- package/dist/docs/radio-group.json +1 -18
- package/dist/docs/radio-group.md +1 -3
- package/dist/docs/skills/build-own-element/SKILL.md +42 -2
- package/dist/docs/sparkline.json +1 -412
- package/dist/docs/sparkline.md +2 -177
- package/dist/docs/tokens.md +12 -0
- package/dist/{event-calendar-l17xA1Uw.js → event-calendar-CM302ec0.js} +1 -1
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-CYPaGUt2.js → filter-bar-CDEpYvq4.js} +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/{icon-button-CSjgX1pQ.js → icon-button-N8Madx6i.js} +11 -17
- package/dist/{import-export-center-Da8o-xT6.js → import-export-center-DdANj0_T.js} +5 -5
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +125 -125
- package/dist/{loading-overlay-CjUmvxqX.js → loading-overlay-BLIrcaoj.js} +1 -1
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-JPxAdShq.js → markdown-CfPMPahy.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/{notification-center-B9rX_ZOu.js → notification-center-BngAw_kt.js} +1 -1
- package/dist/notification-center.js +1 -1
- package/dist/{page-Tesi7Z_n.js → page-DT8L0iRT.js} +5 -4
- package/dist/{page-header-ByhInJv-.js → page-header-NN3Jq5vb.js} +2 -2
- package/dist/page-header.js +1 -1
- package/dist/page.js +1 -1
- package/dist/progress-indicator-D0acshNn.js +292 -0
- package/dist/progress-indicator.js +2 -2
- package/dist/{radio-group-C59cfjry.js → radio-group-doL7tde1.js} +42 -49
- package/dist/radio-group.js +1 -1
- package/dist/{saved-views-D1h4jRTs.js → saved-views-fg5PoMgv.js} +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/{side-navigation-fTRK3wuI.js → side-navigation-Cwi2FHOz.js} +1 -1
- package/dist/side-navigation.js +1 -1
- package/dist/sparkline-CYU4_lCD.js +152 -0
- package/dist/sparkline.js +2 -2
- package/dist/{split-button-ugark7Xc.js → split-button-BYowsA6Q.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/{stat-card-DjuW65lA.js → stat-card-CmpabaTc.js} +3 -3
- package/dist/stat-card.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/attachment.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/cascader.css +2 -2
- package/dist/styles/chart.css +1 -1
- package/dist/styles/checkbox-group.css +2 -2
- package/dist/styles/checkbox.css +2 -2
- package/dist/styles/color-picker.css +1 -1
- package/dist/styles/column-manager.css +3 -3
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/currency-field.css +1 -1
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +3 -3
- package/dist/styles/data-list.css +5 -5
- package/dist/styles/date-field.css +1 -1
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/datetime-field.css +1 -1
- package/dist/styles/datetime-picker.css +1 -1
- package/dist/styles/datetime-range-picker.css +1 -1
- package/dist/styles/detail-panel.css +1 -1
- package/dist/styles/entity-picker.css +2 -2
- package/dist/styles/event-calendar.css +3 -3
- package/dist/styles/field-group.css +2 -2
- package/dist/styles/field.css +1 -1
- package/dist/styles/filter-bar.css +3 -3
- package/dist/styles/import-export-center.css +5 -5
- package/dist/styles/index.css +11 -11
- package/dist/styles/list-item.css +2 -2
- package/dist/styles/list.css +1 -1
- package/dist/styles/listbox.css +1 -1
- package/dist/styles/loading-overlay.css +1 -1
- package/dist/styles/markdown.css +3 -3
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/notification-center.css +2 -2
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-input.css +1 -1
- package/dist/styles/page-header.css +1 -1
- package/dist/styles/progress-indicator.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/radio-group.css +3 -3
- package/dist/styles/rating.css +1 -1
- package/dist/styles/saved-views.css +2 -2
- package/dist/styles/segmented-control.css +2 -2
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-navigation.css +2 -2
- package/dist/styles/slider.css +1 -1
- package/dist/styles/sparkline.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/stat-card.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/table.css +4 -4
- package/dist/styles/tags-input.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/time-field.css +1 -1
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/time-range-picker.css +1 -1
- package/dist/styles/toast.css +1 -1
- package/dist/styles/toggle-group.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-navigation.css +2 -2
- package/dist/styles/tour.css +1 -1
- package/dist/styles/transfer.css +3 -3
- package/dist/styles/upload.css +2 -2
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-BsdRSKob.js → table-D8-WlkFz.js} +2 -2
- package/dist/table.js +1 -1
- package/dist/{toast-D0xdff1C.js → toast-DHDVXIew.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/{top-navigation-B8jVv3rJ.js → top-navigation-C73WDqLg.js} +1 -1
- package/dist/top-navigation.js +1 -1
- package/dist/{tour-CuM6SrwJ.js → tour-ALH5CYMY.js} +1 -1
- package/dist/tour.js +1 -1
- package/dist/{transfer-CJLJumb8.js → transfer-CuNCXEoR.js} +1 -1
- package/dist/transfer.js +1 -1
- package/dist/types/button/button-content.d.ts +1 -3
- package/dist/types/button/button-content.d.ts.map +1 -1
- package/dist/types/button/button-root.d.ts +5 -2
- package/dist/types/button/button-root.d.ts.map +1 -1
- package/dist/types/button/button.d.ts.map +1 -1
- package/dist/types/button/button.types.d.ts +8 -4
- package/dist/types/button/button.types.d.ts.map +1 -1
- package/dist/types/button/toggle-button.d.ts.map +1 -1
- package/dist/types/list/list.types.d.ts +6 -4
- package/dist/types/list/list.types.d.ts.map +1 -1
- package/dist/types/page/page.d.ts.map +1 -1
- package/dist/types/progress-indicator/index.d.ts +1 -2
- package/dist/types/progress-indicator/index.d.ts.map +1 -1
- package/dist/types/progress-indicator/progress-indicator.types.d.ts +1 -26
- package/dist/types/progress-indicator/progress-indicator.types.d.ts.map +1 -1
- package/dist/types/radio-group/index.d.ts +1 -1
- package/dist/types/radio-group/index.d.ts.map +1 -1
- package/dist/types/radio-group/radio-group-parts.d.ts +1 -1
- package/dist/types/radio-group/radio-group-parts.d.ts.map +1 -1
- package/dist/types/radio-group/radio-group.d.ts +1 -1
- package/dist/types/radio-group/radio-group.d.ts.map +1 -1
- package/dist/types/radio-group/radio-group.types.d.ts +0 -16
- package/dist/types/radio-group/radio-group.types.d.ts.map +1 -1
- package/dist/types/sparkline/index.d.ts +1 -3
- package/dist/types/sparkline/index.d.ts.map +1 -1
- package/dist/types/sparkline/sparkline.types.d.ts +0 -70
- package/dist/types/sparkline/sparkline.types.d.ts.map +1 -1
- package/dist/{upload-Jx3gJJ2f.js → upload-Bpjlax3i.js} +1 -1
- package/dist/upload.js +1 -1
- package/dist/{wizard-CxtTDlWR.js → wizard-CL6u1aJb.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/progress-indicator-iIoarHsj.js +0 -329
- package/dist/sparkline-SVDPBBav.js +0 -307
- package/dist/types/progress-indicator/segmented-bar.d.ts +0 -12
- package/dist/types/progress-indicator/segmented-bar.d.ts.map +0 -1
- package/dist/types/sparkline/bar-compare.d.ts +0 -11
- package/dist/types/sparkline/bar-compare.d.ts.map +0 -1
- package/dist/types/sparkline/position-strip.d.ts +0 -12
- package/dist/types/sparkline/position-strip.d.ts.map +0 -1
|
@@ -63,9 +63,7 @@
|
|
|
63
63
|
"label",
|
|
64
64
|
"value",
|
|
65
65
|
"track",
|
|
66
|
-
"indicator"
|
|
67
|
-
"segment",
|
|
68
|
-
"scale"
|
|
66
|
+
"indicator"
|
|
69
67
|
]
|
|
70
68
|
}
|
|
71
69
|
},
|
|
@@ -104,42 +102,9 @@
|
|
|
104
102
|
"element": "div, or an svg circle or path",
|
|
105
103
|
"required": true,
|
|
106
104
|
"purpose": "The quantity: the filled bar, the arc, or the morphing shape. It is what the tone paints and what the motion moves."
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"part": "segment",
|
|
110
|
-
"element": "span",
|
|
111
|
-
"required": false,
|
|
112
|
-
"purpose": "One part of a total in a SegmentedBar: its width is in the ratio of its value, its color a data palette slot, a remainder hatched in the muted ink. data-current marks the one a legend row points at and the others dim."
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"part": "scale",
|
|
116
|
-
"element": "div",
|
|
117
|
-
"required": false,
|
|
118
|
-
"purpose": "The line under a SegmentedBar: what stands at its start and at its end (a zero, the total), in tabular figures. It stays text, outside the picture the track names."
|
|
119
105
|
}
|
|
120
106
|
],
|
|
121
107
|
"api": [
|
|
122
|
-
{
|
|
123
|
-
"name": "segments",
|
|
124
|
-
"type": "{ key?, value, color?, pattern?, label }[]",
|
|
125
|
-
"defaultValue": "—",
|
|
126
|
-
"appliesTo": "SegmentedBar",
|
|
127
|
-
"description": "One total in parts: each segment is as wide as its share of the values, colored by a data palette slot (color 1 to 8), or hatched in the muted ink for a remainder (pattern: hatch). The track is role img, named by every label in order in the language’s list format"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"name": "current",
|
|
131
|
-
"type": "string | number | null",
|
|
132
|
-
"defaultValue": "null",
|
|
133
|
-
"appliesTo": "SegmentedBar",
|
|
134
|
-
"description": "The segment to mark, by key or index; the others dim with the motion tokens, at once under reduced motion. A legend row sets it from its pointer"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"name": "aria-label / start / end",
|
|
138
|
-
"type": "string",
|
|
139
|
-
"defaultValue": "—",
|
|
140
|
-
"appliesTo": "SegmentedBar",
|
|
141
|
-
"description": "aria-label names the whole and leads the accessible name; start and end stand under the bar as text, the total at the end"
|
|
142
|
-
},
|
|
143
108
|
{
|
|
144
109
|
"name": "value",
|
|
145
110
|
"type": "number | null",
|
|
@@ -331,7 +296,6 @@
|
|
|
331
296
|
},
|
|
332
297
|
"tokens": [
|
|
333
298
|
"--slotted-border-strong",
|
|
334
|
-
"--slotted-border-width-medium",
|
|
335
299
|
"--slotted-border-width-thin",
|
|
336
300
|
"--slotted-control-font-family",
|
|
337
301
|
"--slotted-control-font-size-lg",
|
|
@@ -367,8 +331,6 @@
|
|
|
367
331
|
"--slotted-progress-indicator-wave-phase",
|
|
368
332
|
"--slotted-radius-full",
|
|
369
333
|
"--slotted-radius-none",
|
|
370
|
-
"--slotted-segmented-bar-dimmed-opacity",
|
|
371
|
-
"--slotted-segmented-bar-gap",
|
|
372
334
|
"--slotted-space-2",
|
|
373
335
|
"--slotted-space-3",
|
|
374
336
|
"--slotted-space-4",
|
|
@@ -26,16 +26,11 @@ Excerpt — not a complete module
|
|
|
26
26
|
| `value` | span | no |
|
|
27
27
|
| `track` | div, or an svg circle | yes |
|
|
28
28
|
| `indicator` | div, or an svg circle or path | yes |
|
|
29
|
-
| `segment` | span | no |
|
|
30
|
-
| `scale` | div | no |
|
|
31
29
|
|
|
32
30
|
## Props
|
|
33
31
|
|
|
34
32
|
| Name | Type | Default | Applies to | Description |
|
|
35
33
|
| --- | --- | --- | --- | --- |
|
|
36
|
-
| `segments` | `{ key?, value, color?, pattern?, label }[]` | — | SegmentedBar | One total in parts: each segment is as wide as its share of the values, colored by a data palette slot (color 1 to 8), or hatched in the muted ink for a remainder (pattern: hatch). The track is role img, named by every label in order in the language’s list format |
|
|
37
|
-
| `current` | `string \| number \| null` | null | SegmentedBar | The segment to mark, by key or index; the others dim with the motion tokens, at once under reduced motion. A legend row sets it from its pointer |
|
|
38
|
-
| `aria-label / start / end` | `string` | — | SegmentedBar | aria-label names the whole and leads the accessible name; start and end stand under the bar as text, the total at the end |
|
|
39
34
|
| `value` | `number \| null` | null (indeterminate) | ProgressBar, ProgressCircle | The quantity. Absent or null is a wait rather than nought per cent, and a value outside the range is clamped |
|
|
40
35
|
| `min` | `number` | 0 | ProgressBar, ProgressCircle | The bottom of the range, and what aria-valuemin reports |
|
|
41
36
|
| `max` | `number` | 100 | ProgressBar, ProgressCircle | The top of the range, and what aria-valuemax reports. Reaching it writes data-complete |
|
|
@@ -87,7 +82,7 @@ Excerpt — not a complete module
|
|
|
87
82
|
|
|
88
83
|
## Tokens
|
|
89
84
|
|
|
90
|
-
`--slotted-border-strong`, `--slotted-border-width-
|
|
85
|
+
`--slotted-border-strong`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-duration-long`, `--slotted-duration-loop`, `--slotted-duration-loop-slow`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-emphasized`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-line-height-md`, `--slotted-progress-indicator-buffer-color`, `--slotted-progress-indicator-buffer-percent`, `--slotted-progress-indicator-gap`, `--slotted-progress-indicator-indicator-color`, `--slotted-progress-indicator-percent`, `--slotted-progress-indicator-position`, `--slotted-progress-indicator-radius`, `--slotted-progress-indicator-size`, `--slotted-progress-indicator-stroke`, `--slotted-progress-indicator-thickness`, `--slotted-progress-indicator-track-color`, `--slotted-progress-indicator-travel-size`, `--slotted-progress-indicator-travel-start`, `--slotted-progress-indicator-wave-amplitude`, `--slotted-progress-indicator-wave-phase`, `--slotted-radius-full`, `--slotted-radius-none`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-surface`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-text`, `--slotted-tone-danger-text`, `--slotted-tone-info-text`, `--slotted-tone-success-text`, `--slotted-tone-warning-text`, `--slotted-z-index-sticky`
|
|
91
86
|
|
|
92
87
|
## Examples
|
|
93
88
|
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"size": "md",
|
|
33
33
|
"variant": "plain",
|
|
34
34
|
"orientation": "vertical",
|
|
35
|
-
"labelPlacement": "end"
|
|
36
|
-
"mark": "visible"
|
|
35
|
+
"labelPlacement": "end"
|
|
37
36
|
},
|
|
38
37
|
"capabilities": [
|
|
39
38
|
"selection",
|
|
@@ -63,7 +62,6 @@
|
|
|
63
62
|
"label",
|
|
64
63
|
"control",
|
|
65
64
|
"indicator",
|
|
66
|
-
"media",
|
|
67
65
|
"description"
|
|
68
66
|
]
|
|
69
67
|
}
|
|
@@ -104,12 +102,6 @@
|
|
|
104
102
|
"required": false,
|
|
105
103
|
"purpose": "Names the item’s control through for, and carries the target and the hover wash: a 24-pixel square around the circle, and a wash behind the circle and the text that stands half the control gap off the circle and half as far again past the text. It is as wide as its text, so the empty space beside it does not toggle the circle."
|
|
106
104
|
},
|
|
107
|
-
{
|
|
108
|
-
"part": "media",
|
|
109
|
-
"element": "span",
|
|
110
|
-
"required": false,
|
|
111
|
-
"purpose": "A picture above the label inside a tile, given through the media prop. It is decorative, because the label names the option, and the stretched label makes it part of the target."
|
|
112
|
-
},
|
|
113
105
|
{
|
|
114
106
|
"part": "description",
|
|
115
107
|
"element": "p",
|
|
@@ -167,13 +159,6 @@
|
|
|
167
159
|
"appliesTo": "RadioGroup, RadioGroupDefaultsProvider",
|
|
168
160
|
"description": "Which side of its label each circle is on, set once for the set so the circles line up."
|
|
169
161
|
},
|
|
170
|
-
{
|
|
171
|
-
"name": "mark",
|
|
172
|
-
"type": "'visible' | 'hidden'",
|
|
173
|
-
"defaultValue": "visible",
|
|
174
|
-
"appliesTo": "RadioGroup",
|
|
175
|
-
"description": "Whether a tile draws its circle. hidden leaves the frame and the chosen edge to say the choice; the input keeps its role, its name and its single tab stop, and the tile draws the focus ring. A plain group ignores it."
|
|
176
|
-
},
|
|
177
162
|
{
|
|
178
163
|
"name": "disabled",
|
|
179
164
|
"type": "boolean",
|
|
@@ -352,7 +337,6 @@
|
|
|
352
337
|
"--slotted-radio-group-tile-invalid-border-color",
|
|
353
338
|
"--slotted-radio-group-tile-invalid-checked-background",
|
|
354
339
|
"--slotted-radio-group-tile-invalid-checked-border-color",
|
|
355
|
-
"--slotted-radio-group-tile-media-gap",
|
|
356
340
|
"--slotted-radio-group-tile-radius",
|
|
357
341
|
"--slotted-radio-group-tile-readonly-background",
|
|
358
342
|
"--slotted-radio-group-tile-readonly-border-color",
|
|
@@ -364,7 +348,6 @@
|
|
|
364
348
|
"--slotted-selection-size-sm",
|
|
365
349
|
"--slotted-space-2",
|
|
366
350
|
"--slotted-space-3",
|
|
367
|
-
"--slotted-space-4",
|
|
368
351
|
"--slotted-surface",
|
|
369
352
|
"--slotted-target-min",
|
|
370
353
|
"--slotted-text",
|
package/dist/docs/radio-group.md
CHANGED
|
@@ -42,7 +42,6 @@ export default function RadioGroupBasic() {
|
|
|
42
42
|
| `control` | input type="radio" | yes |
|
|
43
43
|
| `indicator` | span | yes |
|
|
44
44
|
| `label` | label | no |
|
|
45
|
-
| `media` | span | no |
|
|
46
45
|
| `description` | p | no |
|
|
47
46
|
|
|
48
47
|
## Props
|
|
@@ -56,7 +55,6 @@ export default function RadioGroupBasic() {
|
|
|
56
55
|
| `orientation` | `'vertical' \| 'horizontal'` | vertical | RadioGroup, RadioGroupDefaultsProvider | How the choices flow. A horizontal set wraps instead of scrolling, and aria-orientation is written only where the group carries the radiogroup role. |
|
|
57
56
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | RadioGroup, RadioGroupDefaultsProvider | The type step, passed to every item. A field or field group around the radio group decides it first, then the provider. The circle follows the control glyph scale, which the theme restates per density. |
|
|
58
57
|
| `labelPlacement` | `'end' \| 'start'` | end | RadioGroup, RadioGroupDefaultsProvider | Which side of its label each circle is on, set once for the set so the circles line up. |
|
|
59
|
-
| `mark` | `'visible' \| 'hidden'` | visible | RadioGroup | Whether a tile draws its circle. hidden leaves the frame and the chosen edge to say the choice; the input keeps its role, its name and its single tab stop, and the tile draws the focus ring. A plain group ignores it. |
|
|
60
58
|
| `disabled` | `boolean` | from the field, or false | RadioGroup, Radio | Unset rather than false. Reaches every item as the native attribute, which also makes the browser skip the item with the arrow keys. Set it on one Radio to disable that option alone. |
|
|
61
59
|
| `readOnly` | `boolean` | from the field, or false | RadioGroup | Unset rather than false. A radio has no native readonly, so the radio group refuses every change and writes aria-readonly; every item keeps its tab stop, its focus ring and its contrast. |
|
|
62
60
|
| `invalid` | `boolean` | from the field, or false | RadioGroup | Unset rather than false. Writes aria-invalid on the group and data-invalid on the root, which draws every circle in the danger tone with a thicker edge. |
|
|
@@ -97,7 +95,7 @@ export default function RadioGroupBasic() {
|
|
|
97
95
|
|
|
98
96
|
## Tokens
|
|
99
97
|
|
|
100
|
-
`--slotted-border-strong`, `--slotted-border-width-medium`, `--slotted-border-width-thick`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-label-gap-lg`, `--slotted-control-label-gap-md`, `--slotted-control-label-gap-sm`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-shadow`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-line-height-md`, `--slotted-line-height-xs`, `--slotted-radio-group-active-background`, `--slotted-radio-group-background`, `--slotted-radio-group-border-color`, `--slotted-radio-group-border-width`, `--slotted-radio-group-checked-active-border-color`, `--slotted-radio-group-checked-border-color`, `--slotted-radio-group-checked-hover-border-color`, `--slotted-radio-group-color`, `--slotted-radio-group-description-color`, `--slotted-radio-group-description-font-size`, `--slotted-radio-group-disabled-background`, `--slotted-radio-group-disabled-border-color`, `--slotted-radio-group-disabled-color`, `--slotted-radio-group-disabled-mark-color`, `--slotted-radio-group-gap`, `--slotted-radio-group-halo-color`, `--slotted-radio-group-hover-border-color`, `--slotted-radio-group-invalid-border-color`, `--slotted-radio-group-invalid-checked-border-color`, `--slotted-radio-group-invalid-edge-width`, `--slotted-radio-group-invalid-focus-ring-color`, `--slotted-radio-group-invalid-mark-color`, `--slotted-radio-group-line-height`, `--slotted-radio-group-mark-color`, `--slotted-radio-group-readonly-background`, `--slotted-radio-group-size`, `--slotted-radio-group-tile-active-background`, `--slotted-radio-group-tile-background`, `--slotted-radio-group-tile-border-color`, `--slotted-radio-group-tile-checked-background`, `--slotted-radio-group-tile-checked-border-color`, `--slotted-radio-group-tile-checked-hover-border-color`, `--slotted-radio-group-tile-description-gap`, `--slotted-radio-group-tile-disabled-background`, `--slotted-radio-group-tile-disabled-border-color`, `--slotted-radio-group-tile-hover-background`, `--slotted-radio-group-tile-hover-border-color`, `--slotted-radio-group-tile-inset`, `--slotted-radio-group-tile-invalid-border-color`, `--slotted-radio-group-tile-invalid-checked-background`, `--slotted-radio-group-tile-invalid-checked-border-color`, `--slotted-radio-group-tile-
|
|
98
|
+
`--slotted-border-strong`, `--slotted-border-width-medium`, `--slotted-border-width-thick`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-label-gap-lg`, `--slotted-control-label-gap-md`, `--slotted-control-label-gap-sm`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-shadow`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-size-xs`, `--slotted-line-height-md`, `--slotted-line-height-xs`, `--slotted-radio-group-active-background`, `--slotted-radio-group-background`, `--slotted-radio-group-border-color`, `--slotted-radio-group-border-width`, `--slotted-radio-group-checked-active-border-color`, `--slotted-radio-group-checked-border-color`, `--slotted-radio-group-checked-hover-border-color`, `--slotted-radio-group-color`, `--slotted-radio-group-description-color`, `--slotted-radio-group-description-font-size`, `--slotted-radio-group-disabled-background`, `--slotted-radio-group-disabled-border-color`, `--slotted-radio-group-disabled-color`, `--slotted-radio-group-disabled-mark-color`, `--slotted-radio-group-gap`, `--slotted-radio-group-halo-color`, `--slotted-radio-group-hover-border-color`, `--slotted-radio-group-invalid-border-color`, `--slotted-radio-group-invalid-checked-border-color`, `--slotted-radio-group-invalid-edge-width`, `--slotted-radio-group-invalid-focus-ring-color`, `--slotted-radio-group-invalid-mark-color`, `--slotted-radio-group-line-height`, `--slotted-radio-group-mark-color`, `--slotted-radio-group-readonly-background`, `--slotted-radio-group-size`, `--slotted-radio-group-tile-active-background`, `--slotted-radio-group-tile-background`, `--slotted-radio-group-tile-border-color`, `--slotted-radio-group-tile-checked-background`, `--slotted-radio-group-tile-checked-border-color`, `--slotted-radio-group-tile-checked-hover-border-color`, `--slotted-radio-group-tile-description-gap`, `--slotted-radio-group-tile-disabled-background`, `--slotted-radio-group-tile-disabled-border-color`, `--slotted-radio-group-tile-hover-background`, `--slotted-radio-group-tile-hover-border-color`, `--slotted-radio-group-tile-inset`, `--slotted-radio-group-tile-invalid-border-color`, `--slotted-radio-group-tile-invalid-checked-background`, `--slotted-radio-group-tile-invalid-checked-border-color`, `--slotted-radio-group-tile-radius`, `--slotted-radio-group-tile-readonly-background`, `--slotted-radio-group-tile-readonly-border-color`, `--slotted-radius-full`, `--slotted-radius-md`, `--slotted-selection-halo-opacity`, `--slotted-selection-size-lg`, `--slotted-selection-size-md`, `--slotted-selection-size-sm`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-surface`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-solid-active`, `--slotted-tone-accent-solid-hover`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-danger-solid`, `--slotted-tone-danger-surface`, `--slotted-tone-secondary-subtle-hover`
|
|
101
99
|
|
|
102
100
|
## Examples
|
|
103
101
|
|
|
@@ -62,7 +62,47 @@ A new appearance is a new combination of tokens, never a new value.
|
|
|
62
62
|
A decision no group names is written as a literal beside a comment that says
|
|
63
63
|
why no token covers it (CP-05).
|
|
64
64
|
|
|
65
|
-
## 4.
|
|
65
|
+
## 4. A word-sized comparison
|
|
66
|
+
|
|
67
|
+
A comparison bar, a position strip and a split bar are elements of the
|
|
68
|
+
application's own: each depends on its screen — a scale shared with blocks
|
|
69
|
+
outside it, inks that carry meaning, labels placed on the mark. They start from
|
|
70
|
+
these primitives:
|
|
71
|
+
|
|
72
|
+
- `linearScale` from `@slotted/core/sparkline` takes a min, a max, the values
|
|
73
|
+
and whether zero stays inside the domain. Its at method returns a value's
|
|
74
|
+
share of the domain from 0 to 1; its zero is the share of zero, or null when
|
|
75
|
+
the domain does not cross it; its ticks method lists a tick at each multiple
|
|
76
|
+
of a step. Marks that state the same min and max draw the same axis.
|
|
77
|
+
- A share is written as a custom property of the mark and read as a
|
|
78
|
+
percentage of its track (`inset-inline-start: calc(var(--at) * 100%)`), so
|
|
79
|
+
the mark needs no measuring.
|
|
80
|
+
- A track takes `--slotted-mark-track-thickness` in
|
|
81
|
+
`--slotted-mark-track-color`. A dot takes `--slotted-mark-dot-size`, and the
|
|
82
|
+
current value's ring `--slotted-mark-ring-width` in
|
|
83
|
+
`--slotted-mark-ring-color`. A reference or zero line takes
|
|
84
|
+
`--slotted-border-strong`.
|
|
85
|
+
- The inks come from the `data` and `tone` groups; a neutral part takes
|
|
86
|
+
`--slotted-text-muted`. Under forced colors, a filled mark takes the
|
|
87
|
+
CanvasText system color and a dimmed one GrayText, with
|
|
88
|
+
`forced-color-adjust: none`.
|
|
89
|
+
- The mark is an image named by its numbers; a focusable part takes the focus
|
|
90
|
+
ring of section 6.
|
|
91
|
+
|
|
92
|
+
## 5. A gallery of illustrated choices
|
|
93
|
+
|
|
94
|
+
A choice told apart by pictures belongs to its screen's identity: its frame,
|
|
95
|
+
its chosen state and the motion of its illustration are the application's own.
|
|
96
|
+
`radio-group` draws a choice in words (CP-04). The gallery starts from:
|
|
97
|
+
|
|
98
|
+
- one native radio input per tile, visually hidden, all with one `name`, the
|
|
99
|
+
tile being its label. The platform gives one tab stop, the arrows across
|
|
100
|
+
every section that shares the name, and Enter that submits.
|
|
101
|
+
- `createRovingRadio` from `@slotted/core/focus` when the tile is a button that
|
|
102
|
+
carries the radio role, its `name` and its `value`: it gives the same
|
|
103
|
+
keyboard and reports each choice; the application writes the checked state.
|
|
104
|
+
|
|
105
|
+
## 6. Write it
|
|
66
106
|
|
|
67
107
|
1. Give each interactive part the native element that carries its role: a
|
|
68
108
|
button for an action, a link for a destination, an input for a value. Add
|
|
@@ -82,7 +122,7 @@ why no token covers it (CP-05).
|
|
|
82
122
|
step (OE-10).
|
|
83
123
|
6. Text that stands alone takes its size from the `typography` family (CP-02).
|
|
84
124
|
|
|
85
|
-
##
|
|
125
|
+
## 7. Done
|
|
86
126
|
|
|
87
127
|
1. Each `Check` of `../../guidelines/own-elements.md` passes.
|
|
88
128
|
2. The element's CSS holds no color or length literal without its comment.
|