@slotted/react 0.1.0-beta.29 → 0.1.0-beta.30
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-CXlO6z0w.js → app-shell-ClwskWBN.js} +1 -1
- package/dist/app-shell.js +2 -2
- package/dist/docs/AGENTS.snippet.md +1 -1
- package/dist/docs/accordion.json +5 -5
- package/dist/docs/accordion.md +11 -11
- package/dist/docs/action-bar.json +19 -19
- package/dist/docs/action-bar.md +29 -29
- package/dist/docs/action-sheet.json +5 -5
- package/dist/docs/action-sheet.md +15 -15
- package/dist/docs/alert.json +11 -11
- package/dist/docs/alert.md +17 -17
- package/dist/docs/app-shell.examples.md +8 -8
- package/dist/docs/app-shell.json +11 -11
- package/dist/docs/app-shell.md +2 -2
- package/dist/docs/attachment.json +1 -1
- package/dist/docs/attachment.md +1 -1
- package/dist/docs/avatar-group.json +1 -1
- package/dist/docs/avatar-group.md +1 -1
- package/dist/docs/avatar.json +10 -10
- package/dist/docs/avatar.md +9 -9
- package/dist/docs/badge.json +5 -5
- package/dist/docs/badge.md +5 -5
- package/dist/docs/breadcrumb.json +2 -2
- package/dist/docs/breadcrumb.md +2 -2
- package/dist/docs/button-group.json +1 -1
- package/dist/docs/button-group.md +1 -1
- package/dist/docs/button.json +11 -11
- package/dist/docs/button.md +7 -7
- package/dist/docs/calendar.json +4 -4
- package/dist/docs/calendar.md +3 -3
- package/dist/docs/card.json +2 -2
- package/dist/docs/card.md +2 -2
- package/dist/docs/carousel.json +11 -11
- package/dist/docs/carousel.md +12 -12
- package/dist/docs/chart.examples.md +41 -41
- package/dist/docs/chart.json +28 -28
- package/dist/docs/chart.md +4 -4
- package/dist/docs/checkbox-group.examples.md +12 -12
- package/dist/docs/checkbox-group.json +6 -6
- package/dist/docs/checkbox-group.md +1 -1
- package/dist/docs/checkbox.examples.md +8 -8
- package/dist/docs/checkbox.json +7 -7
- package/dist/docs/checkbox.md +4 -4
- package/dist/docs/code-block.json +1 -1
- package/dist/docs/code-block.md +1 -1
- package/dist/docs/collapsible.json +12 -12
- package/dist/docs/collapsible.md +21 -21
- package/dist/docs/color-picker.json +25 -25
- package/dist/docs/color-picker.md +15 -15
- package/dist/docs/column-manager.json +1 -1
- package/dist/docs/column-manager.md +1 -1
- package/dist/docs/combobox.json +1 -1
- package/dist/docs/combobox.md +1 -1
- package/dist/docs/context-menu.json +1 -1
- package/dist/docs/context-menu.md +1 -1
- package/dist/docs/currency-field.examples.md +1 -1
- package/dist/docs/currency-field.json +5 -5
- package/dist/docs/currency-field.md +4 -4
- package/dist/docs/dashboard-grid.json +1 -1
- package/dist/docs/data-grid.json +2 -2
- package/dist/docs/data-grid.md +1 -1
- package/dist/docs/data-grid.props.md +1 -1
- package/dist/docs/date-field.json +4 -4
- package/dist/docs/date-field.md +9 -9
- package/dist/docs/date-picker.json +1 -1
- package/dist/docs/date-range-picker.json +1 -1
- package/dist/docs/datetime-field.json +3 -3
- package/dist/docs/datetime-field.md +7 -7
- package/dist/docs/datetime-picker.json +1 -1
- package/dist/docs/datetime-range-picker.examples.md +2 -2
- package/dist/docs/datetime-range-picker.json +3 -3
- package/dist/docs/datetime-range-picker.md +2 -2
- package/dist/docs/description-list.json +5 -5
- package/dist/docs/description-list.md +4 -4
- package/dist/docs/detail-panel.json +9 -9
- package/dist/docs/detail-panel.md +11 -11
- package/dist/docs/dialog.examples.md +5 -5
- package/dist/docs/dialog.json +12 -12
- package/dist/docs/dialog.md +4 -4
- package/dist/docs/dialog.props.md +2 -2
- package/dist/docs/drawer.examples.md +14 -14
- package/dist/docs/drawer.json +8 -8
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/entity-picker.json +1 -1
- package/dist/docs/entity-picker.md +2 -2
- package/dist/docs/event-calendar.examples.md +3 -3
- package/dist/docs/event-calendar.json +5 -5
- package/dist/docs/event-calendar.md +2 -2
- package/dist/docs/field-group.json +5 -5
- package/dist/docs/field-group.md +9 -9
- package/dist/docs/field.examples.md +3 -3
- package/dist/docs/field.json +4 -4
- package/dist/docs/field.md +1 -1
- package/dist/docs/form.json +6 -6
- package/dist/docs/form.md +10 -10
- package/dist/docs/fullscreen.json +3 -3
- package/dist/docs/fullscreen.md +6 -6
- package/dist/docs/guidelines/async-feedback.md +2 -2
- package/dist/docs/guidelines/builders.md +1 -1
- package/dist/docs/guidelines/composition.md +4 -4
- package/dist/docs/guidelines/conversations.md +1 -1
- package/dist/docs/guidelines/index.md +2 -2
- package/dist/docs/guidelines/layout-alignment.md +5 -5
- package/dist/docs/guidelines/overviews.md +3 -3
- package/dist/docs/guidelines/own-elements.md +7 -7
- package/dist/docs/guidelines/record-pages.md +1 -1
- package/dist/docs/highlight.json +11 -11
- package/dist/docs/highlight.md +18 -18
- package/dist/docs/icon.json +2 -2
- package/dist/docs/icon.md +2 -2
- package/dist/docs/image.json +3 -3
- package/dist/docs/image.md +3 -3
- package/dist/docs/import-export-center.json +25 -25
- package/dist/docs/import-export-center.md +21 -21
- package/dist/docs/inline-message.json +14 -14
- package/dist/docs/inline-message.md +20 -20
- package/dist/docs/inline.json +1 -1
- package/dist/docs/inline.md +1 -1
- package/dist/docs/kbd.json +2 -2
- package/dist/docs/kbd.md +2 -2
- package/dist/docs/link.json +7 -7
- package/dist/docs/link.md +7 -7
- package/dist/docs/list-item.json +1 -1
- package/dist/docs/list-item.md +1 -1
- package/dist/docs/list.json +2 -2
- package/dist/docs/list.md +1 -1
- package/dist/docs/listbox.json +1 -1
- package/dist/docs/listbox.md +1 -1
- package/dist/docs/loading-overlay.json +2 -2
- package/dist/docs/loading-overlay.md +2 -2
- package/dist/docs/media-viewer.json +1 -1
- package/dist/docs/media-viewer.md +1 -1
- package/dist/docs/message-scroller.json +1 -1
- package/dist/docs/message-scroller.md +1 -1
- package/dist/docs/message.json +11 -11
- package/dist/docs/message.md +17 -17
- package/dist/docs/multi-select.json +1 -1
- package/dist/docs/notification-center.json +18 -18
- package/dist/docs/notification-center.md +25 -22
- package/dist/docs/number-field.examples.md +4 -4
- package/dist/docs/number-field.json +3 -3
- package/dist/docs/otp-input.json +9 -9
- package/dist/docs/otp-input.md +12 -12
- package/dist/docs/page-header.json +9 -9
- package/dist/docs/page-header.md +23 -23
- package/dist/docs/pagination.json +2 -2
- package/dist/docs/pagination.md +1 -1
- package/dist/docs/popover.examples.md +1 -1
- package/dist/docs/popover.json +3 -3
- package/dist/docs/popover.md +1 -1
- package/dist/docs/progress-indicator.json +4 -4
- package/dist/docs/progress-indicator.md +4 -4
- package/dist/docs/prompt-composer.json +3 -3
- package/dist/docs/prompt-composer.md +4 -4
- package/dist/docs/prose.json +1 -1
- package/dist/docs/prose.md +1 -1
- package/dist/docs/radio-group.examples.md +16 -16
- package/dist/docs/radio-group.json +9 -9
- package/dist/docs/radio-group.md +2 -2
- package/dist/docs/rating.json +18 -18
- package/dist/docs/rating.md +19 -23
- package/dist/docs/result-state.json +13 -13
- package/dist/docs/result-state.md +18 -20
- package/dist/docs/saved-views.json +1 -1
- package/dist/docs/scroll-area.json +5 -5
- package/dist/docs/scroll-area.md +6 -6
- package/dist/docs/section.json +6 -6
- package/dist/docs/section.md +11 -11
- package/dist/docs/segmented-control.json +15 -15
- package/dist/docs/segmented-control.md +39 -39
- package/dist/docs/skeleton.json +1 -1
- package/dist/docs/skeleton.md +1 -1
- package/dist/docs/skills/build-own-element/SKILL.md +3 -3
- package/dist/docs/skills/compose-screen/SKILL.md +2 -2
- package/dist/docs/skills/index.md +2 -2
- package/dist/docs/skills/review-screen/SKILL.md +3 -3
- package/dist/docs/skills/theme-app/SKILL.md +9 -9
- package/dist/docs/skills/waiting-states/SKILL.md +1 -1
- package/dist/docs/slider.json +9 -9
- package/dist/docs/slider.md +19 -19
- package/dist/docs/sparkline.json +8 -8
- package/dist/docs/sparkline.md +6 -6
- package/dist/docs/split-button.json +11 -11
- package/dist/docs/split-button.md +27 -27
- package/dist/docs/stack.json +1 -1
- package/dist/docs/stack.md +1 -1
- package/dist/docs/stat-card.json +3 -3
- package/dist/docs/stat-card.md +2 -2
- package/dist/docs/status-indicator.json +8 -8
- package/dist/docs/status-indicator.md +5 -5
- package/dist/docs/stepper.json +4 -4
- package/dist/docs/stepper.md +4 -4
- package/dist/docs/switch.json +5 -5
- package/dist/docs/switch.md +11 -7
- package/dist/docs/table-of-contents.json +9 -9
- package/dist/docs/table-of-contents.md +13 -13
- package/dist/docs/table.examples.md +1 -1
- package/dist/docs/table.json +1 -1
- package/dist/docs/tabs.json +1 -1
- package/dist/docs/tabs.md +1 -1
- package/dist/docs/tag.json +21 -21
- package/dist/docs/tag.md +18 -18
- package/dist/docs/tags-input.json +1 -1
- package/dist/docs/tags-input.md +1 -1
- package/dist/docs/text-field.examples.md +5 -5
- package/dist/docs/text-field.json +5 -5
- package/dist/docs/text-field.md +1 -1
- package/dist/docs/textarea.examples.md +4 -4
- package/dist/docs/textarea.json +2 -2
- package/dist/docs/time-field.json +3 -3
- package/dist/docs/time-field.md +7 -7
- package/dist/docs/time-picker.json +4 -4
- package/dist/docs/time-picker.md +7 -7
- package/dist/docs/time-range-picker.json +4 -4
- package/dist/docs/time-range-picker.md +5 -5
- package/dist/docs/toast.json +5 -5
- package/dist/docs/toast.md +5 -5
- package/dist/docs/toggle-group.json +13 -13
- package/dist/docs/toggle-group.md +38 -38
- package/dist/docs/toggle.json +8 -8
- package/dist/docs/toggle.md +8 -8
- package/dist/docs/tokens.md +15 -15
- package/dist/docs/toolbar.json +11 -11
- package/dist/docs/toolbar.md +28 -28
- package/dist/docs/tooltip.json +3 -3
- package/dist/docs/tooltip.md +3 -3
- package/dist/docs/top-navigation.examples.md +13 -13
- package/dist/docs/top-navigation.json +10 -10
- package/dist/docs/top-navigation.md +7 -7
- package/dist/docs/tour.json +8 -8
- package/dist/docs/tour.md +5 -5
- package/dist/docs/typography.json +2 -2
- package/dist/docs/typography.md +2 -2
- package/dist/docs/upload.examples.md +5 -5
- package/dist/docs/upload.json +10 -10
- package/dist/docs/upload.md +3 -3
- package/dist/{form-Im9lGi45.js → form-DnV8ndwm.js} +1 -1
- package/dist/form.js +1 -1
- package/dist/index.js +8 -8
- package/dist/{rating-Cjrwmxyw.js → rating-BtrkTAi0.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{side-navigation-CvIGfGjZ.js → side-navigation-DNMpckRs.js} +1 -1
- package/dist/side-navigation.js +1 -1
- package/dist/{slider-DuJGh0pf.js → slider-CU89H3i0.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{top-navigation-D_Jt0jNw.js → top-navigation-C73WDqLg.js} +1 -1
- package/dist/top-navigation.js +1 -1
- package/dist/types/alert/alert.types.d.ts +2 -2
- package/dist/types/alert/alert.types.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-demo/atrio.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-demo/aurora.d.ts +6 -6
- package/dist/types/app-shell/app-shell-demo/aurora.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-demo/cadence.d.ts.map +1 -1
- package/dist/types/app-shell/app-shell-parts.d.ts +2 -2
- package/dist/types/app-shell/app-shell.types.d.ts +1 -1
- package/dist/types/app-shell/index.d.ts +2 -2
- package/dist/types/avatar/avatar.types.d.ts +8 -8
- package/dist/types/avatar/avatar.types.d.ts.map +1 -1
- package/dist/types/badge/badge.types.d.ts +4 -4
- package/dist/types/badge/badge.types.d.ts.map +1 -1
- package/dist/types/breadcrumb/breadcrumb-parts.d.ts +1 -1
- package/dist/types/button/button.constants.d.ts +1 -1
- package/dist/types/button-group/button-group-separator.d.ts +1 -1
- package/dist/types/card/card-selection.d.ts +1 -1
- package/dist/types/carousel/carousel-catalogue.d.ts +6 -6
- package/dist/types/carousel/carousel-parts.d.ts +2 -2
- package/dist/types/code-block/code-block.types.d.ts +1 -1
- package/dist/types/collapsible/collapsible.types.d.ts +1 -1
- package/dist/types/color-picker/color-picker.d.ts +7 -7
- package/dist/types/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/color-picker/color-picker.types.d.ts +5 -5
- package/dist/types/color-picker/color-picker.types.d.ts.map +1 -1
- package/dist/types/column-manager/column-manager.d.ts +2 -2
- package/dist/types/column-manager/column-manager.d.ts.map +1 -1
- package/dist/types/combobox/combobox-collection.d.ts +1 -1
- package/dist/types/combobox/combobox-defaults.d.ts +1 -1
- package/dist/types/command-palette/command-palette-defaults.d.ts +1 -1
- package/dist/types/data-grid/data-grid-context.d.ts +2 -2
- package/dist/types/description-list/description-list-clipboard.d.ts +1 -1
- package/dist/types/detail-panel/detail-panel-demo.d.ts.map +1 -1
- package/dist/types/dialog/dialog.types.d.ts +1 -1
- package/dist/types/drawer/drawer.types.d.ts +1 -1
- package/dist/types/entity-picker/entity-picker.d.ts +1 -1
- package/dist/types/field/field-parts.d.ts +1 -1
- package/dist/types/field/field.d.ts +1 -1
- package/dist/types/field/field.types.d.ts +1 -1
- package/dist/types/form/form.d.ts +1 -1
- package/dist/types/form/form.types.d.ts +1 -1
- package/dist/types/highlight/highlight.types.d.ts +1 -1
- package/dist/types/icon/glyph.d.ts +1 -1
- package/dist/types/icon/icon.d.ts +2 -2
- package/dist/types/icon/icon.types.d.ts +1 -1
- package/dist/types/icon/icon.types.d.ts.map +1 -1
- package/dist/types/image/image.d.ts +1 -1
- package/dist/types/import-export-center/import-export-center-defaults.d.ts +3 -3
- package/dist/types/import-export-center/import-export-center-demo.d.ts +2 -2
- package/dist/types/import-export-center/import-export-center-demo.d.ts.map +1 -1
- package/dist/types/import-export-center/import-export-center.types.d.ts +3 -3
- package/dist/types/import-export-center/use-job-toasts.d.ts +3 -3
- package/dist/types/inline/inline.d.ts +1 -1
- package/dist/types/inline-message/inline-message-defaults.d.ts +1 -1
- package/dist/types/inline-message/inline-message.d.ts +2 -2
- package/dist/types/inline-message/inline-message.types.d.ts +1 -1
- package/dist/types/inline-message/inline-message.types.d.ts.map +1 -1
- package/dist/types/kbd/kbd.types.d.ts +1 -1
- package/dist/types/list/list.types.d.ts +1 -1
- package/dist/types/listbox/listbox-defaults.d.ts +1 -1
- package/dist/types/listbox/listbox-parts.d.ts +2 -2
- package/dist/types/menu/menu-defaults.d.ts +1 -1
- package/dist/types/menu/menu-parts.d.ts +1 -1
- package/dist/types/message/message-demo.d.ts +2 -2
- package/dist/types/message/message-demo.d.ts.map +1 -1
- package/dist/types/message-scroller/message-scroller.d.ts +1 -1
- package/dist/types/notification-center/notification-center-defaults.d.ts +2 -2
- package/dist/types/notification-center/notification-center-demo.d.ts +1 -1
- package/dist/types/notification-center/notification-center-demo.d.ts.map +1 -1
- package/dist/types/notification-center/notification-center.types.d.ts +2 -2
- package/dist/types/otp-input/otp-input.d.ts +1 -1
- package/dist/types/page/page-demo.d.ts +2 -2
- package/dist/types/page/page-demo.d.ts.map +1 -1
- package/dist/types/progress-indicator/loader.d.ts +1 -1
- package/dist/types/progress-indicator/progress-circle.d.ts +1 -1
- package/dist/types/progress-indicator/progress-indicator.types.d.ts +1 -1
- package/dist/types/rating/rating-summary.d.ts +1 -1
- package/dist/types/rating/rating.types.d.ts +1 -1
- package/dist/types/result-state/result-state-demo.d.ts +1 -1
- package/dist/types/result-state/result-state.types.d.ts +1 -1
- package/dist/types/segmented-control/segmented-control.types.d.ts +1 -1
- package/dist/types/select/select.types.d.ts +1 -1
- package/dist/types/side-navigation/side-navigation.d.ts +1 -1
- package/dist/types/stat-card/stat-card.d.ts +1 -1
- package/dist/types/status-indicator/status-indicator.types.d.ts +3 -3
- package/dist/types/status-indicator/status-indicator.types.d.ts.map +1 -1
- package/dist/types/switch/switch.types.d.ts +1 -1
- package/dist/types/table/table-parts.d.ts +1 -1
- package/dist/types/table/table.types.d.ts +1 -1
- package/dist/types/table-of-contents/table-of-contents-demo.d.ts.map +1 -1
- package/dist/types/tabs/tabs.types.d.ts +2 -2
- package/dist/types/tag/tag.types.d.ts +3 -3
- package/dist/types/tag/tag.types.d.ts.map +1 -1
- package/dist/types/tags-input/tags-input.d.ts +1 -1
- package/dist/types/theme/theme-scope.d.ts +2 -2
- package/dist/types/theme/theme-scope.d.ts.map +1 -1
- package/dist/types/toast/toast-defaults.d.ts +1 -1
- package/dist/types/toast/toast.types.d.ts +2 -2
- package/dist/types/toast/toast.types.d.ts.map +1 -1
- package/dist/types/toggle/toggle.types.d.ts +1 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts +1 -1
- package/dist/types/tooltip/tooltip-defaults.d.ts +1 -1
- package/dist/types/tour/tour.types.d.ts +2 -2
- package/dist/types/typography/text.d.ts +1 -1
- package/dist/types/typography/typography.attributes.d.ts +1 -1
- package/dist/types/typography/typography.types.d.ts +1 -1
- package/dist/types/typography/typography.types.d.ts.map +1 -1
- package/dist/{wizard-CpYwQGQ-.js → wizard-CmEJK55_.js} +2 -2
- package/dist/wizard.js +1 -1
- package/package.json +18 -6
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"part": "control",
|
|
89
89
|
"element": "input type=\"radio\"",
|
|
90
90
|
"required": true,
|
|
91
|
-
"purpose": "The native radio input. It holds the value, the name the group shares, the identifier and every native attribute written on Radio. The shared name gives the set the platform’s keyboard
|
|
91
|
+
"purpose": "The native radio input. It holds the value, the name the group shares, the identifier and every native attribute written on Radio. The shared name gives the set the platform’s keyboard behavior, and ref reaches the element, so focus() needs no handle of its own."
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"part": "indicator",
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"type": "(props: RadioGroupRootProps | RadioRootProps) => ReactNode",
|
|
209
209
|
"defaultValue": "—",
|
|
210
210
|
"appliesTo": "RadioGroup, Radio",
|
|
211
|
-
"description": "Replaces either root and hands it every attribute. The props are typed as HTMLAttributes<HTMLElement>, so a set of choices can render as a ul with each item as an li. The control has no render: it holds the value and the platform’s keyboard
|
|
211
|
+
"description": "Replaces either root and hands it every attribute. The props are typed as HTMLAttributes<HTMLElement>, so a set of choices can render as a ul with each item as an li. The control has no render: it holds the value and the platform’s keyboard behavior."
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"name": "ref",
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
"Each item takes its accessible name from its own label, through for pointing at an identifier the control generates. The group takes its name from the field group’s legend or, outside a field group, from an aria-label the consumer writes. Inside a field group the radiogroup role is withdrawn, so the set is not announced twice.",
|
|
258
258
|
"The group writes aria-required, never the native required on an item. The native attribute turns on browser constraint validation and changes how the form submits, which describing the set must not do as a side effect. disabled is native, because the native attribute is also what makes the browser skip the option with the arrow keys.",
|
|
259
259
|
"A radio has no native read-only state, so the radio group enforces one: it refuses the change on the click that a pointer and Space share, aria-readonly announces it on the group, and every item keeps its tab stop, its focus ring and its full contrast. The chosen option keeps its accent, because the value is real.",
|
|
260
|
-
"The invalid state does not rely on
|
|
260
|
+
"The invalid state does not rely on color alone. In the high-contrast scheme the theme paints the danger border in the same color as every other border, so the circle also thickens its edge. The sentence that says what is wrong is the field group’s error.",
|
|
261
261
|
"The target is larger than the circle. A 24-pixel square around the circle meets WCAG 2.2 SC 2.5.8 at every size and density, while the circle is 14 pixels at size=\"sm\"; the label extends the target to the end of the text, and the hover wash covers exactly that area. The row keeps its line height: the target is drawn around the circle, not laid out beside it."
|
|
262
262
|
]
|
|
263
263
|
}
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"title": "Playground",
|
|
372
372
|
"note": "One set with every axis on it, driven by the controls below the canvas. Tab into it once: the whole group is a single stop, and the arrows move the choice from there.",
|
|
373
373
|
"language": "tsx",
|
|
374
|
-
"source": "<RadioGroup defaultValue=\"standard\" name=\"shipping\">\n <Radio value=\"standard\">
|
|
374
|
+
"source": "<RadioGroup defaultValue=\"standard\" name=\"shipping\">\n <Radio value=\"standard\">Standard delivery</Radio>\n <Radio value=\"express\">Express delivery</Radio>\n <Radio value=\"pickup\">Pick up in store</Radio>\n</RadioGroup>;\n",
|
|
375
375
|
"verdict": "excerpt"
|
|
376
376
|
},
|
|
377
377
|
{
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
"title": "The plan picker, which is what tiles are for",
|
|
388
388
|
"note": "An exclusive set of framed choices is the case Cloudscape built a whole Tiles family for and Carbon a selectable Tile. Here it is one axis on the group: each item becomes the surface, the arrow keys and the roving tab stop stay the platform’s, and Grid gives the row equal widths and equal heights.",
|
|
389
389
|
"language": "tsx",
|
|
390
|
-
"source": "<RadioGroup defaultValue=\"team\" name=\"plan\" variant=\"tile\">\n <Grid minItemWidth=\"sm\">\n <Radio description=\"
|
|
390
|
+
"source": "<RadioGroup defaultValue=\"team\" name=\"plan\" variant=\"tile\">\n <Grid minItemWidth=\"sm\">\n <Radio description=\"Up to three projects and one seat.\" value=\"starter\">\n Starter\n </Radio>\n <Radio description=\"Projetos sem limite e dez assentos.\" value=\"team\">\n Team\n </Radio>\n </Grid>\n</RadioGroup>;\n",
|
|
391
391
|
"verdict": "excerpt"
|
|
392
392
|
},
|
|
393
393
|
{
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
"title": "Saying more about one option",
|
|
420
420
|
"note": "The description belongs to the item and reaches only that item’s control, so a reader on the second option hears the second sentence rather than everything the set has to say.",
|
|
421
421
|
"language": "tsx",
|
|
422
|
-
"source": "<RadioGroup defaultValue=\"monthly\">\n <Radio description=\"
|
|
422
|
+
"source": "<RadioGroup defaultValue=\"monthly\">\n <Radio description=\"Billed on the 5th of every month, no cancellation fee.\" value=\"monthly\">\n Monthly\n </Radio>\n <Radio description=\"Two months off, billed at signup.\" value=\"yearly\">\n Yearly\n </Radio>\n</RadioGroup>;\n",
|
|
423
423
|
"verdict": "excerpt"
|
|
424
424
|
},
|
|
425
425
|
{
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
"title": "Inside a group of fields",
|
|
428
428
|
"note": "The fieldset and its legend are what group and name the set, so the group withdraws its own radiogroup role rather than announcing the same set twice under the same name.",
|
|
429
429
|
"language": "tsx",
|
|
430
|
-
"source": "<FieldGroup required>\n <FieldGroupLegend>
|
|
430
|
+
"source": "<FieldGroup required>\n <FieldGroupLegend>Payment method</FieldGroupLegend>\n <RadioGroup defaultValue=\"card\" name=\"payment\">\n <Radio value=\"card\">Card</Radio>\n <Radio value=\"zelle\">Zelle</Radio>\n </RadioGroup>\n</FieldGroup>;\n",
|
|
431
431
|
"verdict": "excerpt"
|
|
432
432
|
},
|
|
433
433
|
{
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
"title": "Content the family did not choose",
|
|
436
436
|
"note": "An option that wraps to three lines keeps its circle on the first of them, an unbroken token breaks instead of taking the page with it, and a right-to-left label mirrors the whole row.",
|
|
437
437
|
"language": "tsx",
|
|
438
|
-
"source": "<RadioGroup defaultValue=\"a\">\n <Radio description=\"
|
|
438
|
+
"source": "<RadioGroup defaultValue=\"a\">\n <Radio description=\"The circle stays on the first line of the label.\" value=\"a\">\n I authorize sharing the delivery data with the carrier responsible for the last leg of the\n route.\n </Radio>\n <Radio dir=\"rtl\" value=\"b\">\n أوافق على مشاركة بيانات التسليم مع شركة الشحن.\n </Radio>\n</RadioGroup>;\n",
|
|
439
439
|
"verdict": "excerpt"
|
|
440
440
|
},
|
|
441
441
|
{
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
"title": "The APG table, implemented by the platform",
|
|
452
452
|
"note": "Tab lands on the chosen item or on the first, the arrows move focus and selection together in both axes, the set wraps at both ends, and disabled options are skipped — none of it written here.",
|
|
453
453
|
"language": "tsx",
|
|
454
|
-
"source": "// Native radios in one form owner with one name already implement the\n// whole APG table, in a right-to-left document too. The group generates\n// a name when the consumer writes none, because an unnamed set is not a\n// set — the price is that such a group inside a form submits under a\n// generated key.\n<RadioGroup name=\"shipping\">\n <Radio value=\"standard\">
|
|
454
|
+
"source": "// Native radios in one form owner with one name already implement the\n// whole APG table, in a right-to-left document too. The group generates\n// a name when the consumer writes none, because an unnamed set is not a\n// set — the price is that such a group inside a form submits under a\n// generated key.\n<RadioGroup name=\"shipping\">\n <Radio value=\"standard\">Standard</Radio>\n <Radio value=\"express\">Express</Radio>\n</RadioGroup>;\n",
|
|
455
455
|
"verdict": "excerpt"
|
|
456
456
|
},
|
|
457
457
|
{
|
package/dist/docs/radio-group.md
CHANGED
|
@@ -61,7 +61,7 @@ export default function RadioGroupBasic() {
|
|
|
61
61
|
| `required` | `boolean` | from the field, or false | RadioGroup | Unset rather than false. Writes aria-required on the group, never the native required, which would turn on browser constraint validation. |
|
|
62
62
|
| `value, on Radio` | `string` | — | Radio | What this item selects, and the value the group holds when it is chosen. Required: an item with no value is a choice nobody can make. |
|
|
63
63
|
| `description, on Radio` | `ReactNode` | — | Radio | Help text under the item’s label, wired with aria-describedby, so it describes that item and not the set. |
|
|
64
|
-
| `render` | `(props: RadioGroupRootProps \| RadioRootProps) => ReactNode` | — | RadioGroup, Radio | Replaces either root and hands it every attribute. The props are typed as HTMLAttributes<HTMLElement>, so a set of choices can render as a ul with each item as an li. The control has no render: it holds the value and the platform’s keyboard
|
|
64
|
+
| `render` | `(props: RadioGroupRootProps \| RadioRootProps) => ReactNode` | — | RadioGroup, Radio | Replaces either root and hands it every attribute. The props are typed as HTMLAttributes<HTMLElement>, so a set of choices can render as a ul with each item as an li. The control has no render: it holds the value and the platform’s keyboard behavior. |
|
|
65
65
|
| `ref` | `Ref<HTMLInputElement>` | — | Radio | Reaches the item’s input. focus() and click() are the element’s own, so there is no imperative handle. |
|
|
66
66
|
| `useRadioGroup()` | `() => RadioGroupContextValue` | — | inside a RadioGroup | Returns what an item reads: whether it is chosen, its size, and how to request a change. It throws outside a RadioGroup instead of rendering a control that looks right and does nothing. |
|
|
67
67
|
| `RadioGroupDefaultsProvider` | `{ size, variant, orientation, labelPlacement }` | — | a subtree | The four decisions an application takes once for every radio group under it. A field or field group around a radio group decides size before the provider. |
|
|
@@ -90,7 +90,7 @@ export default function RadioGroupBasic() {
|
|
|
90
90
|
- Each item takes its accessible name from its own label, through for pointing at an identifier the control generates. The group takes its name from the field group’s legend or, outside a field group, from an aria-label the consumer writes. Inside a field group the radiogroup role is withdrawn, so the set is not announced twice.
|
|
91
91
|
- The group writes aria-required, never the native required on an item. The native attribute turns on browser constraint validation and changes how the form submits, which describing the set must not do as a side effect. disabled is native, because the native attribute is also what makes the browser skip the option with the arrow keys.
|
|
92
92
|
- A radio has no native read-only state, so the radio group enforces one: it refuses the change on the click that a pointer and Space share, aria-readonly announces it on the group, and every item keeps its tab stop, its focus ring and its full contrast. The chosen option keeps its accent, because the value is real.
|
|
93
|
-
- The invalid state does not rely on
|
|
93
|
+
- The invalid state does not rely on color alone. In the high-contrast scheme the theme paints the danger border in the same color as every other border, so the circle also thickens its edge. The sentence that says what is wrong is the field group’s error.
|
|
94
94
|
- The target is larger than the circle. A 24-pixel square around the circle meets WCAG 2.2 SC 2.5.8 at every size and density, while the circle is 14 pixels at size="sm"; the label extends the target to the end of the text, and the hover wash covers exactly that area. The row keeps its line height: the target is drawn around the circle, not laid out beside it.
|
|
95
95
|
|
|
96
96
|
## Tokens
|
package/dist/docs/rating.json
CHANGED
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
"type": "'accent' | 'info' | 'success' | 'warning' | 'danger'",
|
|
251
251
|
"defaultValue": "warning",
|
|
252
252
|
"appliesTo": "all members, RatingProvider",
|
|
253
|
-
"description": "The
|
|
253
|
+
"description": "The color a lit symbol takes. secondary is declined: its solid step is a ground, and a star lit in it reads as unlit"
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"name": "disabled",
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
"The pattern is the WAI-ARIA APG’s Rating Radio Group: a radiogroup of native radios that share a name, each named by the itemLabel message — 3,5 de 5 — so the number is heard on every stop. Tab and Space are the platform’s.",
|
|
375
375
|
"The arrows depart from the radio example on purpose: they stop at both ends instead of wrapping, as the APG’s rating slider, Ark, MUI and Mantine do, because a rating that falls from five to one on one keystroke too many is a defect. Home and End reach the ends, and the inline arrows swap in a right-to-left document.",
|
|
376
376
|
"Read-only has no platform answer for a radio, so the change is refused on the click a pointer and Space share, aria-readonly is announced, and every radio keeps its tab stop. aria-required and aria-invalid are written on the group; the native required is not, because it would engage the browser’s own validation.",
|
|
377
|
-
"In the light and dark schemes a star does not reach 3:1 against the page: the value is always in the accessible name and may be written beside the stars, and the high-contrast scheme and forced
|
|
377
|
+
"In the light and dark schemes a star does not reach 3:1 against the page: the value is always in the accessible name and may be written beside the stars, and the high-contrast scheme and forced colors draw lit and unlit stars as distinct shapes with a contrasting edge.",
|
|
378
378
|
"Under a coarse pointer each target grows to 44 pixels, and a finger can scrub along the row without losing vertical scrolling."
|
|
379
379
|
]
|
|
380
380
|
},
|
|
@@ -465,7 +465,7 @@
|
|
|
465
465
|
"type": "'accent' | 'info' | 'success' | 'warning' | 'danger'",
|
|
466
466
|
"defaultValue": "warning",
|
|
467
467
|
"appliesTo": "all members, RatingProvider",
|
|
468
|
-
"description": "The
|
|
468
|
+
"description": "The color a lit symbol takes. secondary is declined: its solid step is a ground, and a star lit in it reads as unlit"
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
"name": "variant",
|
|
@@ -544,7 +544,7 @@
|
|
|
544
544
|
"accessibility": [
|
|
545
545
|
"The display is one image: role=\"img\" with an aria-label from displayLabel or displayLabelWithCount — Avaliação 4,6 de 5, 1.284 avaliações — and every symbol, number and count inside is hidden, so the value is said once.",
|
|
546
546
|
"The value is written in the locale’s digits and, as a label read aloud, a whole value is written whole: 4 de 5, not 4,0 de 5.",
|
|
547
|
-
"A partial star is a clip of one shape, never a
|
|
547
|
+
"A partial star is a clip of one shape, never a color alone; the number beside it is the reading that does not depend on seeing the fraction."
|
|
548
548
|
]
|
|
549
549
|
},
|
|
550
550
|
"ratingSummary": {
|
|
@@ -556,7 +556,7 @@
|
|
|
556
556
|
"part": "root",
|
|
557
557
|
"element": "section, or the element render returns",
|
|
558
558
|
"required": true,
|
|
559
|
-
"purpose": "A region named by its aria-label. data-variant is summary for bars and spectrum for the spectrum, which also writes --slotted-rating-mean, --slotted-rating-low and --slotted-rating-high from
|
|
559
|
+
"purpose": "A region named by its aria-label. data-variant is summary for bars and spectrum for the spectrum, which also writes --slotted-rating-mean, --slotted-rating-low and --slotted-rating-high from summarizeRatings."
|
|
560
560
|
},
|
|
561
561
|
{
|
|
562
562
|
"part": "aggregate",
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
"part": "swatch",
|
|
713
713
|
"element": "span aria-hidden=\"true\"",
|
|
714
714
|
"required": false,
|
|
715
|
-
"purpose": "The bucket’s
|
|
715
|
+
"purpose": "The bucket’s color key."
|
|
716
716
|
}
|
|
717
717
|
],
|
|
718
718
|
"api": [
|
|
@@ -784,7 +784,7 @@
|
|
|
784
784
|
"type": "'accent' | 'info' | 'success' | 'warning' | 'danger'",
|
|
785
785
|
"defaultValue": "warning",
|
|
786
786
|
"appliesTo": "all members, RatingProvider",
|
|
787
|
-
"description": "The
|
|
787
|
+
"description": "The color a lit symbol takes. secondary is declined: its solid step is a ground, and a star lit in it reads as unlit"
|
|
788
788
|
},
|
|
789
789
|
{
|
|
790
790
|
"name": "locale",
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
"accessibility": [
|
|
835
835
|
"The summary is a region named by its aria-label. The figure, the scale and the count are text; the stars beside them are one image with its own name.",
|
|
836
836
|
"Each level is named in full by levelLabel — 5 estrelas: 1.052 avaliações, 82% — so a reader hears the level, its count and its share without reading the bar. Filtering, each is a toggle with aria-pressed, disabled where nobody rated.",
|
|
837
|
-
"The spectrum’s axis, its interval and its mean are hidden: the count line says the margin or the interval in words, and the conclusion is text in a pill, never a
|
|
837
|
+
"The spectrum’s axis, its interval and its mean are hidden: the count line says the margin or the interval in words, and the conclusion is text in a pill, never a color alone."
|
|
838
838
|
]
|
|
839
839
|
}
|
|
840
840
|
},
|
|
@@ -933,7 +933,7 @@
|
|
|
933
933
|
"title": "Playground",
|
|
934
934
|
"note": "One rating with every prop on the controls below the canvas. Hover previews the value and the caption follows it; press the lit star again and the value empties.",
|
|
935
935
|
"language": "tsx",
|
|
936
|
-
"source": "<Rating aria-label=\"
|
|
936
|
+
"source": "<Rating aria-label=\"Your rating\" defaultValue={4} />;\n",
|
|
937
937
|
"verdict": "excerpt"
|
|
938
938
|
},
|
|
939
939
|
{
|
|
@@ -941,7 +941,7 @@
|
|
|
941
941
|
"title": "Half steps",
|
|
942
942
|
"note": "step={0.5} puts two radios in each star: the half radio sits above the whole one, so the inline-start half of a star asks for the half value. Ten arrow stops for five stars is the cost.",
|
|
943
943
|
"language": "tsx",
|
|
944
|
-
"source": "<Rating aria-label=\"
|
|
944
|
+
"source": "<Rating aria-label=\"Rating in half points\" defaultValue={3.5} step={0.5} />;\n",
|
|
945
945
|
"verdict": "excerpt"
|
|
946
946
|
},
|
|
947
947
|
{
|
|
@@ -949,7 +949,7 @@
|
|
|
949
949
|
"title": "Read-only, disabled and invalid",
|
|
950
950
|
"note": "Read-only keeps every tab stop and the lit stars, and refuses every change; disabled dims the row and leaves the value readable; invalid writes aria-invalid and reddens the focus ring.",
|
|
951
951
|
"language": "tsx",
|
|
952
|
-
"source": "<Rating aria-label=\"
|
|
952
|
+
"source": "<Rating aria-label=\"Your previous score\" defaultValue={4} readOnly />;\n<Rating aria-label=\"Closed rating\" defaultValue={2} disabled />;\n<Rating aria-label=\"Required rating\" invalid required />;\n",
|
|
953
953
|
"verdict": "excerpt"
|
|
954
954
|
},
|
|
955
955
|
{
|
|
@@ -965,7 +965,7 @@
|
|
|
965
965
|
"title": "Words for the value",
|
|
966
966
|
"note": "caption as a function receives the value held and the value under the pointer, so the word follows the pointer and settles back. Each radio keeps its own number as its accessible name, through the itemLabel message.",
|
|
967
967
|
"language": "tsx",
|
|
968
|
-
"source": "const WORDS = ['
|
|
968
|
+
"source": "const WORDS = ['Terrible', 'Poor', 'Fair', 'Good', 'Excellent'];\n\n<Rating\n aria-label=\"Atendimento\"\n caption={({ preview, value }) => {\n const shown = preview ?? value;\n return shown === null ? 'No rating' : WORDS[shown - 1];\n }}\n defaultValue={4}\n/>;\n",
|
|
969
969
|
"verdict": "excerpt"
|
|
970
970
|
},
|
|
971
971
|
{
|
|
@@ -973,7 +973,7 @@
|
|
|
973
973
|
"title": "The keyboard",
|
|
974
974
|
"note": "Tab lands on the checked star, or on the first. The arrows move one step and stop at both ends instead of wrapping; Home and End reach them; Backspace and Delete empty the value. The inline arrows swap in a right-to-left document.",
|
|
975
975
|
"language": "tsx",
|
|
976
|
-
"source": "<Rating\n aria-label=\"
|
|
976
|
+
"source": "<Rating\n aria-label=\"Delivery\"\n defaultValue={3}\n onValueChange={(value, request) => console.log(value, request.reason)}\n/>;\n",
|
|
977
977
|
"verdict": "excerpt"
|
|
978
978
|
},
|
|
979
979
|
{
|
|
@@ -1037,7 +1037,7 @@
|
|
|
1037
1037
|
"title": "Playground",
|
|
1038
1038
|
"note": "The bars variant: the mean as a figure, its scale, the stars and the count, then one bar per level, highest first, each the level’s share of the total.",
|
|
1039
1039
|
"language": "tsx",
|
|
1040
|
-
"source": "<RatingSummary aria-label=\"
|
|
1040
|
+
"source": "<RatingSummary aria-label=\"Customer ratings\" counts={[9, 18, 47, 158, 1052]} />;\n",
|
|
1041
1041
|
"verdict": "excerpt"
|
|
1042
1042
|
},
|
|
1043
1043
|
{
|
|
@@ -1045,7 +1045,7 @@
|
|
|
1045
1045
|
"title": "Levels that filter",
|
|
1046
1046
|
"note": "filterable turns each level into a toggle with aria-pressed; a level nobody chose is disabled. The pressed levels are a state model of their own, controlled or not, with the reason pointer or keyboard.",
|
|
1047
1047
|
"language": "tsx",
|
|
1048
|
-
"source": "const [levels, setLevels] = useState<readonly number[]>([5]);\n\n<RatingSummary\n aria-label=\"
|
|
1048
|
+
"source": "const [levels, setLevels] = useState<readonly number[]>([5]);\n\n<RatingSummary\n aria-label=\"Filter ratings\"\n counts={[9, 18, 47, 158, 1052]}\n filterable\n onSelectedLevelsChange={setLevels}\n selectedLevels={levels}\n/>;\n",
|
|
1049
1049
|
"verdict": "excerpt"
|
|
1050
1050
|
},
|
|
1051
1051
|
{
|
|
@@ -1053,7 +1053,7 @@
|
|
|
1053
1053
|
"title": "Spectrum",
|
|
1054
1054
|
"note": "The same counts on the axis of the scale: a column per level, the mean, its 95% interval and the three buckets. Few readings widen the interval until the count says the mean is uncertain.",
|
|
1055
1055
|
"language": "tsx",
|
|
1056
|
-
"source": "<RatingSummary
|
|
1056
|
+
"source": "<RatingSummary aria-label=\"Ratings summary\" counts={[9, 18, 47, 158, 1052]} variant=\"spectrum\" />;\n",
|
|
1057
1057
|
"verdict": "excerpt"
|
|
1058
1058
|
},
|
|
1059
1059
|
{
|
|
@@ -1069,7 +1069,7 @@
|
|
|
1069
1069
|
"title": "Nothing rated yet",
|
|
1070
1070
|
"note": "No figure and no scale: an absent mean is not a nought. The stars stay unlit, the count says why, and the conclusion is withheld.",
|
|
1071
1071
|
"language": "tsx",
|
|
1072
|
-
"source": "<RatingSummary aria-label=\"
|
|
1072
|
+
"source": "<RatingSummary aria-label=\"No ratings\" counts={[0, 0, 0, 0, 0]} />;\n",
|
|
1073
1073
|
"verdict": "excerpt"
|
|
1074
1074
|
},
|
|
1075
1075
|
{
|
|
@@ -1077,7 +1077,7 @@
|
|
|
1077
1077
|
"title": "At a phone’s width",
|
|
1078
1078
|
"note": "The aggregate and the distribution stand side by side while both fit and stack when they do not; the spectrum keeps its axis and lets the count wrap.",
|
|
1079
1079
|
"language": "tsx",
|
|
1080
|
-
"source": "<Measure>\n <RatingSummary aria-label=\"
|
|
1080
|
+
"source": "<Measure>\n <RatingSummary aria-label=\"Ratings\" counts={[9, 18, 47, 158, 1052]} />\n</Measure>;\n",
|
|
1081
1081
|
"verdict": "excerpt"
|
|
1082
1082
|
}
|
|
1083
1083
|
]
|
package/dist/docs/rating.md
CHANGED
|
@@ -14,7 +14,7 @@ import { Rating, RatingDisplay, RatingProvider, RatingSummary } from '@slotted/r
|
|
|
14
14
|
Excerpt — not a complete module
|
|
15
15
|
|
|
16
16
|
```tsx
|
|
17
|
-
<Rating aria-label="
|
|
17
|
+
<Rating aria-label="Your rating" defaultValue={4} />;
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Anatomy
|
|
@@ -89,7 +89,7 @@ Excerpt — not a complete module
|
|
|
89
89
|
| `step` | `1 \| 0.5` | 1 | Rating | A whole symbol or half of one. Finer fractions are declined: a third of a 20-pixel star is below the minimum target |
|
|
90
90
|
| `clearable` | `boolean` | true | Rating, RatingProvider | Whether a press on the checked star, Backspace and Delete empty the value |
|
|
91
91
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | all members, RatingProvider | The step the symbols and the text sit at. The symbol does not follow density; the text does |
|
|
92
|
-
| `tone` | `'accent' \| 'info' \| 'success' \| 'warning' \| 'danger'` | warning | all members, RatingProvider | The
|
|
92
|
+
| `tone` | `'accent' \| 'info' \| 'success' \| 'warning' \| 'danger'` | warning | all members, RatingProvider | The color a lit symbol takes. secondary is declined: its solid step is a ground, and a star lit in it reads as unlit |
|
|
93
93
|
| `disabled` | `boolean` | from the field, or false | Rating | Unstated rather than false. Every radio is disabled natively; the value stays readable |
|
|
94
94
|
| `readOnly` | `boolean` | from the field, or false | Rating | Unstated rather than false. Every change is refused, every radio keeps its tab stop, and aria-readonly is written |
|
|
95
95
|
| `required` | `boolean` | from the field, or false | Rating | Unstated rather than false. Writes aria-required on the group, never the native attribute |
|
|
@@ -112,7 +112,7 @@ Excerpt — not a complete module
|
|
|
112
112
|
| `value` | `number` | — | RatingDisplay | The value reported, any fraction, clamped to the scale |
|
|
113
113
|
| `max` | `number` | 5 | all members, RatingProvider | How many symbols, or how many levels a summary reads from counts |
|
|
114
114
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | all members, RatingProvider | The step the symbols and the text sit at. The symbol does not follow density; the text does |
|
|
115
|
-
| `tone` | `'accent' \| 'info' \| 'success' \| 'warning' \| 'danger'` | warning | all members, RatingProvider | The
|
|
115
|
+
| `tone` | `'accent' \| 'info' \| 'success' \| 'warning' \| 'danger'` | warning | all members, RatingProvider | The color a lit symbol takes. secondary is declined: its solid step is a ground, and a star lit in it reads as unlit |
|
|
116
116
|
| `variant` | `'full' \| 'compact' \| 'histogram'` | full | RatingDisplay | Every symbol, or one star beside the number, or one star and a bar per level |
|
|
117
117
|
| `count` | `number` | — | RatingDisplay | How many ratings. Written beside the number and added to the accessible name |
|
|
118
118
|
| `distribution` | `readonly number[]` | — | RatingDisplay | Counts per level, lowest first, drawn by the histogram variant |
|
|
@@ -137,7 +137,7 @@ Excerpt — not a complete module
|
|
|
137
137
|
| `showInsight` | `boolean` | true | RatingSummary | Whether the spectrum writes its conclusion |
|
|
138
138
|
| `insightThresholds` | `Partial<RatingInsightThresholds>` | { divided: 0.25, few: 30, margin: 0.5, consensus: 0.8 } | RatingSummary, RatingProvider | Where the conclusions are drawn, merged over the provider’s |
|
|
139
139
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | all members, RatingProvider | The step the symbols and the text sit at. The symbol does not follow density; the text does |
|
|
140
|
-
| `tone` | `'accent' \| 'info' \| 'success' \| 'warning' \| 'danger'` | warning | all members, RatingProvider | The
|
|
140
|
+
| `tone` | `'accent' \| 'info' \| 'success' \| 'warning' \| 'danger'` | warning | all members, RatingProvider | The color a lit symbol takes. secondary is declined: its solid step is a ground, and a star lit in it reads as unlit |
|
|
141
141
|
| `locale` | `string` | the language in force | all members | The locale every number is written in: 4,6 and 1.284 in pt-BR |
|
|
142
142
|
| `messages` | `Partial<RatingMessages>` | — | all members | Words laid over the language in force, key by key: every string the family writes |
|
|
143
143
|
| `render` | `(props: RatingRootProps) => ReactNode` | — | RatingSummary | Substitutes the section root and hands it every attribute and handler |
|
|
@@ -174,14 +174,14 @@ Excerpt — not a complete module
|
|
|
174
174
|
- The pattern is the WAI-ARIA APG’s Rating Radio Group: a radiogroup of native radios that share a name, each named by the itemLabel message — 3,5 de 5 — so the number is heard on every stop. Tab and Space are the platform’s.
|
|
175
175
|
- The arrows depart from the radio example on purpose: they stop at both ends instead of wrapping, as the APG’s rating slider, Ark, MUI and Mantine do, because a rating that falls from five to one on one keystroke too many is a defect. Home and End reach the ends, and the inline arrows swap in a right-to-left document.
|
|
176
176
|
- Read-only has no platform answer for a radio, so the change is refused on the click a pointer and Space share, aria-readonly is announced, and every radio keeps its tab stop. aria-required and aria-invalid are written on the group; the native required is not, because it would engage the browser’s own validation.
|
|
177
|
-
- In the light and dark schemes a star does not reach 3:1 against the page: the value is always in the accessible name and may be written beside the stars, and the high-contrast scheme and forced
|
|
177
|
+
- In the light and dark schemes a star does not reach 3:1 against the page: the value is always in the accessible name and may be written beside the stars, and the high-contrast scheme and forced colors draw lit and unlit stars as distinct shapes with a contrasting edge.
|
|
178
178
|
- Under a coarse pointer each target grows to 44 pixels, and a finger can scrub along the row without losing vertical scrolling.
|
|
179
179
|
- The display is one image: role="img" with an aria-label from displayLabel or displayLabelWithCount — Avaliação 4,6 de 5, 1.284 avaliações — and every symbol, number and count inside is hidden, so the value is said once.
|
|
180
180
|
- The value is written in the locale’s digits and, as a label read aloud, a whole value is written whole: 4 de 5, not 4,0 de 5.
|
|
181
|
-
- A partial star is a clip of one shape, never a
|
|
181
|
+
- A partial star is a clip of one shape, never a color alone; the number beside it is the reading that does not depend on seeing the fraction.
|
|
182
182
|
- The summary is a region named by its aria-label. The figure, the scale and the count are text; the stars beside them are one image with its own name.
|
|
183
183
|
- Each level is named in full by levelLabel — 5 estrelas: 1.052 avaliações, 82% — so a reader hears the level, its count and its share without reading the bar. Filtering, each is a toggle with aria-pressed, disabled where nobody rated.
|
|
184
|
-
- The spectrum’s axis, its interval and its mean are hidden: the count line says the margin or the interval in words, and the conclusion is text in a pill, never a
|
|
184
|
+
- The spectrum’s axis, its interval and its mean are hidden: the count line says the margin or the interval in words, and the conclusion is text in a pill, never a color alone.
|
|
185
185
|
|
|
186
186
|
## Tokens
|
|
187
187
|
|
|
@@ -196,7 +196,7 @@ step={0.5} puts two radios in each star: the half radio sits above the whole one
|
|
|
196
196
|
Excerpt — not a complete module
|
|
197
197
|
|
|
198
198
|
```tsx
|
|
199
|
-
<Rating aria-label="
|
|
199
|
+
<Rating aria-label="Rating in half points" defaultValue={3.5} step={0.5} />;
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
### Read-only, disabled and invalid
|
|
@@ -206,9 +206,9 @@ Read-only keeps every tab stop and the lit stars, and refuses every change; disa
|
|
|
206
206
|
Excerpt — not a complete module
|
|
207
207
|
|
|
208
208
|
```tsx
|
|
209
|
-
<Rating aria-label="
|
|
210
|
-
<Rating aria-label="
|
|
211
|
-
<Rating aria-label="
|
|
209
|
+
<Rating aria-label="Your previous score" defaultValue={4} readOnly />;
|
|
210
|
+
<Rating aria-label="Closed rating" defaultValue={2} disabled />;
|
|
211
|
+
<Rating aria-label="Required rating" invalid required />;
|
|
212
212
|
```
|
|
213
213
|
|
|
214
214
|
### Inside a field
|
|
@@ -232,13 +232,13 @@ caption as a function receives the value held and the value under the pointer, s
|
|
|
232
232
|
Excerpt — not a complete module
|
|
233
233
|
|
|
234
234
|
```tsx
|
|
235
|
-
const WORDS = ['
|
|
235
|
+
const WORDS = ['Terrible', 'Poor', 'Fair', 'Good', 'Excellent'];
|
|
236
236
|
|
|
237
237
|
<Rating
|
|
238
238
|
aria-label="Atendimento"
|
|
239
239
|
caption={({ preview, value }) => {
|
|
240
240
|
const shown = preview ?? value;
|
|
241
|
-
return shown === null ? '
|
|
241
|
+
return shown === null ? 'No rating' : WORDS[shown - 1];
|
|
242
242
|
}}
|
|
243
243
|
defaultValue={4}
|
|
244
244
|
/>;
|
|
@@ -252,7 +252,7 @@ Excerpt — not a complete module
|
|
|
252
252
|
|
|
253
253
|
```tsx
|
|
254
254
|
<Rating
|
|
255
|
-
aria-label="
|
|
255
|
+
aria-label="Delivery"
|
|
256
256
|
defaultValue={3}
|
|
257
257
|
onValueChange={(value, request) => console.log(value, request.reason)}
|
|
258
258
|
/>;
|
|
@@ -348,7 +348,7 @@ The bars variant: the mean as a figure, its scale, the stars and the count, then
|
|
|
348
348
|
Excerpt — not a complete module
|
|
349
349
|
|
|
350
350
|
```tsx
|
|
351
|
-
<RatingSummary aria-label="
|
|
351
|
+
<RatingSummary aria-label="Customer ratings" counts={[9, 18, 47, 158, 1052]} />;
|
|
352
352
|
```
|
|
353
353
|
|
|
354
354
|
### Levels that filter
|
|
@@ -361,7 +361,7 @@ Excerpt — not a complete module
|
|
|
361
361
|
const [levels, setLevels] = useState<readonly number[]>([5]);
|
|
362
362
|
|
|
363
363
|
<RatingSummary
|
|
364
|
-
aria-label="
|
|
364
|
+
aria-label="Filter ratings"
|
|
365
365
|
counts={[9, 18, 47, 158, 1052]}
|
|
366
366
|
filterable
|
|
367
367
|
onSelectedLevelsChange={setLevels}
|
|
@@ -376,11 +376,7 @@ The same counts on the axis of the scale: a column per level, the mean, its 95%
|
|
|
376
376
|
Excerpt — not a complete module
|
|
377
377
|
|
|
378
378
|
```tsx
|
|
379
|
-
<RatingSummary
|
|
380
|
-
aria-label="Resumo das avaliações"
|
|
381
|
-
counts={[9, 18, 47, 158, 1052]}
|
|
382
|
-
variant="spectrum"
|
|
383
|
-
/>;
|
|
379
|
+
<RatingSummary aria-label="Ratings summary" counts={[9, 18, 47, 158, 1052]} variant="spectrum" />;
|
|
384
380
|
```
|
|
385
381
|
|
|
386
382
|
### The conclusion
|
|
@@ -406,7 +402,7 @@ No figure and no scale: an absent mean is not a nought. The stars stay unlit, th
|
|
|
406
402
|
Excerpt — not a complete module
|
|
407
403
|
|
|
408
404
|
```tsx
|
|
409
|
-
<RatingSummary aria-label="
|
|
405
|
+
<RatingSummary aria-label="No ratings" counts={[0, 0, 0, 0, 0]} />;
|
|
410
406
|
```
|
|
411
407
|
|
|
412
408
|
### At a phone’s width
|
|
@@ -417,6 +413,6 @@ Excerpt — not a complete module
|
|
|
417
413
|
|
|
418
414
|
```tsx
|
|
419
415
|
<Measure>
|
|
420
|
-
<RatingSummary aria-label="
|
|
416
|
+
<RatingSummary aria-label="Ratings" counts={[9, 18, 47, 158, 1052]} />
|
|
421
417
|
</Measure>;
|
|
422
418
|
```
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"type": "'center' | 'start'",
|
|
138
138
|
"defaultValue": "center",
|
|
139
139
|
"appliesTo": "ResultState",
|
|
140
|
-
"description": "Whether the region reads
|
|
140
|
+
"description": "Whether the region reads centerd or from the inline edge. start is for a data-dense screen, where a centerd column reads as an interruption"
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"name": "live",
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
"There is no APG pattern for this family: the Authoring Practices list holds no empty, error or result state, and the nearest official guidance is the Region landmark practice, which states that “a region landmark must have a label”. The root is a section and the attribute is written only once a title exists, so an unlabelled region is a plain grouping element rather than a landmark with no name.",
|
|
211
211
|
"The box is a landmark, not a live region. MDN’s alert role reference states that the role “should only be used for text content, not interactive elements such as links or buttons”, and this family has a row of buttons in it. The region that announces is the content part, which holds the title and the description alone; the mark, the actions and the footer are its siblings.",
|
|
212
212
|
"live defaults to polite, which is the one place this family and alert disagree. WCAG 2.2’s Understanding document for SC 4.1.3 names this family’s own text as its example: “brief text messages displayed about the completion or status of the search, such as ‘Searching…’, ‘18 results returned’ or ‘No results returned’ would be status updates”. An alert may be a standing notice that was on the page before it loaded; a result is always the outcome of an operation. None of the seven surveyed implementations writes a live role of any kind.",
|
|
213
|
-
"Status is never carried by
|
|
213
|
+
"Status is never carried by color alone, because the family paints no color for it: what happened is in the title and the description, which forced colors leave legible. The illustrations keep the theme’s system-color mapping under forced colors, so a stack is still three layers and not three outlines laid over one another.",
|
|
214
214
|
"The media box is hidden from assistive technology, with the glyph, the drawing made around it and any artwork the page supplies. The title and the description already say what the picture says; an illustration that adds information is not decorative, and what it adds belongs in the description.",
|
|
215
215
|
"The root carries tabindex=\"-1\" and is not in the tab sequence. An application that has just emptied a table can send the reader to the message through the ref; the family never does it, because moving focus unprompted is a change of context nobody asked for.",
|
|
216
216
|
"The family holds no mutable value, so it emits nothing and has no event table. Which status a region is in is a fact about the consumer’s own data — a region that decided it would be deciding whether the fetch failed.",
|
|
@@ -285,15 +285,15 @@
|
|
|
285
285
|
{
|
|
286
286
|
"id": "playground",
|
|
287
287
|
"title": "Playground",
|
|
288
|
-
"note": "One region with every axis on it, driven by the controls below the canvas. Change the status and the mark changes with it, which is what makes the seven distinguishable in
|
|
288
|
+
"note": "One region with every axis on it, driven by the controls below the canvas. Change the status and the mark changes with it, which is what makes the seven distinguishable in grayscale.",
|
|
289
289
|
"language": "tsx",
|
|
290
|
-
"source": "<ResultState status=\"empty\">\n <ResultStateContent>\n <ResultStateTitle>
|
|
290
|
+
"source": "<ResultState status=\"empty\">\n <ResultStateContent>\n <ResultStateTitle>No projects yet</ResultStateTitle>\n <ResultStateDescription>Create a project to start collecting runs.</ResultStateDescription>\n </ResultStateContent>\n <ResultStateActions>\n <Button>Create project</Button>\n </ResultStateActions>\n</ResultState>;\n",
|
|
291
291
|
"verdict": "excerpt"
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
"id": "statuses",
|
|
295
295
|
"title": "What the region is reporting",
|
|
296
|
-
"note": "Seven semantics, seven silhouettes. Read in
|
|
296
|
+
"note": "Seven semantics, seven silhouettes. Read in grayscale, or under forced colors where every ground becomes one system color, the shape is the only thing left telling an absent collection from a failed request.",
|
|
297
297
|
"language": "tsx",
|
|
298
298
|
"source": "// empty: the collection exists and holds nothing.\n// no-results: a query or a filter matched nothing.\n// not-found: the thing that was asked for is not here.\n// error: a failure the reader can act on.\n// forbidden: the reader is not allowed to see it.\n// offline: the connection is gone.\n// success: the flow finished and there is nothing left to do.\n<ResultState status=\"no-results\" />;\n",
|
|
299
299
|
"verdict": "excerpt"
|
|
@@ -303,15 +303,15 @@
|
|
|
303
303
|
"title": "How far the region reaches",
|
|
304
304
|
"note": "A row inside a table cell, a panel inside a card, the whole route — the same three words alert uses. The mark is the title’s own size at every reach and stands over the title at section and page; at inline it sits on the message’s first line and the actions join it, and at page the title takes the top step of the type scale.",
|
|
305
305
|
"language": "tsx",
|
|
306
|
-
"source": "<ResultState reach=\"inline\" status=\"no-results\">\n <ResultStateContent>\n <ResultStateTitle>
|
|
306
|
+
"source": "<ResultState reach=\"inline\" status=\"no-results\">\n <ResultStateContent>\n <ResultStateTitle>No rows match the filter</ResultStateTitle>\n </ResultStateContent>\n <ResultStateActions>\n <Button size=\"sm\" variant=\"ghost\">\n Clear filters\n </Button>\n </ResultStateActions>\n</ResultState>;\n\n<ResultState reach=\"page\" status=\"not-found\" />;\n",
|
|
307
307
|
"verdict": "excerpt"
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
"id": "align",
|
|
311
|
-
"title": "
|
|
312
|
-
"note": "Carbon left-aligns its empty states inside data-dense views and the other six surveyed implementations
|
|
311
|
+
"title": "Centerd, or from the inline edge",
|
|
312
|
+
"note": "Carbon left-aligns its empty states inside data-dense views and the other six surveyed implementations center unconditionally. Both readings are real, and align is one axis rather than a second family.",
|
|
313
313
|
"language": "tsx",
|
|
314
|
-
"source": "// The default, for a panel or a route.\n<ResultState align=\"center\" />;\n\n// For a data-dense screen, where a
|
|
314
|
+
"source": "// The default, for a panel or a route.\n<ResultState align=\"center\" />;\n\n// For a data-dense screen, where a centerd column reads as an interruption.\n<ResultState align=\"start\" reach=\"inline\" />;\n",
|
|
315
315
|
"verdict": "excerpt"
|
|
316
316
|
},
|
|
317
317
|
{
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
"title": "A drawing around the page’s glyph",
|
|
328
328
|
"note": "Three drawings in the neutral surface and border roles — a framed tile, three layers leaning back, a stack of cards — made around the glyph in media. None takes a tone, and inline reach draws none. A region that announces assembles its drawing as it arrives; under reduced motion it arrives assembled.",
|
|
329
329
|
"language": "tsx",
|
|
330
|
-
"source": "const glyph = (\n <Icon>\n <Glyph name=\"bell\" />\n </Icon>\n);\n\n<ResultState illustration=\"stack\" media={glyph}>\n <ResultStateContent>\n <ResultStateTitle>
|
|
330
|
+
"source": "const glyph = (\n <Icon>\n <Glyph name=\"bell\" />\n </Icon>\n);\n\n<ResultState illustration=\"stack\" media={glyph}>\n <ResultStateContent>\n <ResultStateTitle>No alerts configured</ResultStateTitle>\n </ResultStateContent>\n</ResultState>;\n\n// A framed tile, and a stack of cards standing in for rows.\n<ResultState illustration=\"tile\" media={glyph} />;\n<ResultState illustration=\"cards\" media={glyph} />;\n\n// The cards draw their two lines with no glyph at all.\n<ResultState illustration=\"cards\" />;\n",
|
|
331
331
|
"verdict": "excerpt"
|
|
332
332
|
},
|
|
333
333
|
{
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
"title": "The way out of the situation",
|
|
336
336
|
"note": "The controls are the consumer’s own Buttons in a part outside the live region — a reader hearing the message is not read two button labels in the middle of it. Narrow the window past 20rem and watch them stack.",
|
|
337
337
|
"language": "tsx",
|
|
338
|
-
"source": "<ResultState status=\"error\">\n <ResultStateContent>\n <ResultStateTitle>
|
|
338
|
+
"source": "<ResultState status=\"error\">\n <ResultStateContent>\n <ResultStateTitle>The run failed</ResultStateTitle>\n </ResultStateContent>\n <ResultStateActions>\n <Button loading={retrying} tone=\"danger\">\n Try again\n </Button>\n <Button variant=\"outline\">Open log</Button>\n </ResultStateActions>\n <ResultStateFooter>\n <Link href=\"/docs/retries\">How retries are counted</Link>\n </ResultStateFooter>\n</ResultState>;\n",
|
|
339
339
|
"verdict": "excerpt"
|
|
340
340
|
},
|
|
341
341
|
{
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
"title": "Content the family did not choose",
|
|
352
352
|
"note": "A German compound with no break opportunity, a digest no language can break, a title standing alone and a region with no mark — all in a column narrow enough to make each of them a problem.",
|
|
353
353
|
"language": "tsx",
|
|
354
|
-
"source": "<ResultState status=\"error\">\n <ResultStateContent>\n <ResultStateTitle>{longTranslatedTitle}</ResultStateTitle>\n <ResultStateDescription>
|
|
354
|
+
"source": "<ResultState status=\"error\">\n <ResultStateContent>\n <ResultStateTitle>{longTranslatedTitle}</ResultStateTitle>\n <ResultStateDescription>The run {digest} failed.</ResultStateDescription>\n </ResultStateContent>\n</ResultState>;\n",
|
|
355
355
|
"verdict": "excerpt"
|
|
356
356
|
},
|
|
357
357
|
{
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
"title": "Composition and escape hatches",
|
|
360
360
|
"note": "Measure belongs to container and the frame to card, so the region caps nothing and draws no box: these two lines are what a consumer writes instead. The provider sets the axes once, and render substitutes the element of any part.",
|
|
361
361
|
"language": "tsx",
|
|
362
|
-
"source": "<Container size=\"measure\">\n <ResultState reach=\"page\" status=\"no-results\" />\n</Container>;\n\n<Card>\n <ResultState status=\"empty\" />\n</Card>;\n\n<ResultStateDefaultsProvider align=\"start\" reach=\"inline\">\n <App />\n</ResultStateDefaultsProvider>;\n\n<ResultStateTitle render={(props) => <h2 {...props} />}>
|
|
362
|
+
"source": "<Container size=\"measure\">\n <ResultState reach=\"page\" status=\"no-results\" />\n</Container>;\n\n<Card>\n <ResultState status=\"empty\" />\n</Card>;\n\n<ResultStateDefaultsProvider align=\"start\" reach=\"inline\">\n <App />\n</ResultStateDefaultsProvider>;\n\n<ResultStateTitle render={(props) => <h2 {...props} />}>This page does not exist</ResultStateTitle>;\n",
|
|
363
363
|
"verdict": "excerpt"
|
|
364
364
|
},
|
|
365
365
|
{
|