@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
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"part": "item",
|
|
80
80
|
"element": "button, or the element ToggleGroupItem’s render returns",
|
|
81
81
|
"required": true,
|
|
82
|
-
"purpose": "One two-state control. It carries aria-pressed in both states and data-pressed when it is on, and its border is always present so that turning it on changes a
|
|
82
|
+
"purpose": "One two-state control. It carries aria-pressed in both states and data-pressed when it is on, and its border is always present so that turning it on changes a color and never the geometry."
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"part": "icon",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"type": "'outline' | 'ghost' | 'chips'",
|
|
136
136
|
"defaultValue": "outline",
|
|
137
137
|
"appliesTo": "ToggleGroup",
|
|
138
|
-
"description": "Whether the bar draws its own edge, or draws its items as chips: separate rounded items that wrap, never joined, the pressed one in the neutral tone ink. There is no tone axis: “on” is one
|
|
138
|
+
"description": "Whether the bar draws its own edge, or draws its items as chips: separate rounded items that wrap, never joined, the pressed one in the neutral tone ink. There is no tone axis: “on” is one color across the system, and a bar that wants the whole palette is button-group around ToggleButtons"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"name": "orientation",
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
"title": "Playground",
|
|
331
331
|
"note": "One bar 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 focus from there without changing anything.",
|
|
332
332
|
"language": "tsx",
|
|
333
|
-
"source": "<ToggleGroup aria-label=\"
|
|
333
|
+
"source": "<ToggleGroup aria-label=\"Chart period\" defaultValue={['week']}>\n <ToggleGroupItem value=\"day\">Day</ToggleGroupItem>\n <ToggleGroupItem value=\"week\">Week</ToggleGroupItem>\n <ToggleGroupItem value=\"month\">Month</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
334
334
|
"verdict": "excerpt"
|
|
335
335
|
},
|
|
336
336
|
{
|
|
@@ -338,15 +338,15 @@
|
|
|
338
338
|
"title": "One at a time, several at once, or none",
|
|
339
339
|
"note": "The value is an array in both modes: multiple caps it at every item rather than at one. Press the item that is already on — the set empties, unless deselectable says it may not.",
|
|
340
340
|
"language": "tsx",
|
|
341
|
-
"source": "<ToggleGroup aria-label=\"
|
|
341
|
+
"source": "<ToggleGroup aria-label=\"Text style\" defaultValue={['bold', 'italic']} multiple>\n <ToggleGroupItem value=\"bold\">Bold</ToggleGroupItem>\n <ToggleGroupItem value=\"italic\">Italic</ToggleGroupItem>\n</ToggleGroup>;\n\n<ToggleGroup aria-label=\"Period\" defaultValue={['week']} deselectable={false}>\n <ToggleGroupItem value=\"week\">Week</ToggleGroupItem>\n <ToggleGroupItem value=\"month\">Month</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
342
342
|
"verdict": "excerpt"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"id": "variant",
|
|
346
346
|
"title": "Framed, or bare",
|
|
347
|
-
"note": "outline draws the bar’s own edge; ghost draws none, for a bar that sits inside something already framed — a toolbar, a card header. The
|
|
347
|
+
"note": "outline draws the bar’s own edge; ghost draws none, for a bar that sits inside something already framed — a toolbar, a card header. The color of an item that is on is the same in both.",
|
|
348
348
|
"language": "tsx",
|
|
349
|
-
"source": "<ToggleGroup aria-label=\"
|
|
349
|
+
"source": "<ToggleGroup aria-label=\"Density\" defaultValue={['compact']} variant=\"ghost\">\n <ToggleGroupItem value=\"comfortable\">Comfortable</ToggleGroupItem>\n <ToggleGroupItem value=\"compact\">Compact</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
350
350
|
"verdict": "excerpt"
|
|
351
351
|
},
|
|
352
352
|
{
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
"title": "The three control steps",
|
|
355
355
|
"note": "Each step reads the control scale, so a bar is exactly as tall as the text field and the button beside it at every size and at every density.",
|
|
356
356
|
"language": "tsx",
|
|
357
|
-
"source": "<ToggleGroup aria-label=\"
|
|
357
|
+
"source": "<ToggleGroup aria-label=\"Sorting\" defaultValue={['newest']} size=\"sm\">\n <ToggleGroupItem value=\"newest\">Newest</ToggleGroupItem>\n <ToggleGroupItem value=\"oldest\">Oldest</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
358
358
|
"verdict": "excerpt"
|
|
359
359
|
},
|
|
360
360
|
{
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
"title": "Along the line, or down the page",
|
|
363
363
|
"note": "A vertical bar moves with ArrowUp and ArrowDown and writes aria-orientation; a horizontal one leaves the cross axis to the page, so scrolling still works with focus inside the group.",
|
|
364
364
|
"language": "tsx",
|
|
365
|
-
"source": "<ToggleGroup aria-label=\"
|
|
365
|
+
"source": "<ToggleGroup aria-label=\"Alignment\" defaultValue={['center']} orientation=\"vertical\">\n <ToggleGroupItem value=\"start\">Start</ToggleGroupItem>\n <ToggleGroupItem value=\"center\">Center</ToggleGroupItem>\n <ToggleGroupItem value=\"end\">End</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
366
366
|
"verdict": "excerpt"
|
|
367
367
|
},
|
|
368
368
|
{
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
"title": "Marks without words",
|
|
387
387
|
"note": "An item with only a mark draws square and takes its accessible name from aria-label, which is the one thing the family cannot supply for a consumer’s own artwork.",
|
|
388
388
|
"language": "tsx",
|
|
389
|
-
"source": "<ToggleGroup aria-label=\"
|
|
389
|
+
"source": "<ToggleGroup aria-label=\"Text style\" defaultValue={['bold']} multiple>\n <ToggleGroupItem aria-label=\"Bold\" icon={<BoldIcon />} value=\"bold\" />\n <ToggleGroupItem aria-label=\"Italic\" icon={<ItalicIcon />} value=\"italic\" />\n</ToggleGroup>;\n",
|
|
390
390
|
"verdict": "excerpt"
|
|
391
391
|
},
|
|
392
392
|
{
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
"title": "Content width, or the whole line",
|
|
395
395
|
"note": "Left alone the bar is as wide as its labels; fullWidth makes the items share the line. Either way an item gives way rather than pushing the layout, and its label clips at the ellipsis.",
|
|
396
396
|
"language": "tsx",
|
|
397
|
-
"source": "<ToggleGroup aria-label=\"
|
|
397
|
+
"source": "<ToggleGroup aria-label=\"Billing\" defaultValue={['monthly']} fullWidth>\n <ToggleGroupItem value=\"monthly\">Monthly</ToggleGroupItem>\n <ToggleGroupItem value=\"yearly\">Yearly</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
398
398
|
"verdict": "excerpt"
|
|
399
399
|
},
|
|
400
400
|
{
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
"title": "Inside a toolbar, the bar owns the keyboard",
|
|
403
403
|
"note": "A toolbar is already one tab stop with arrow navigation across every control it holds, so the group stands down rather than putting a second stop inside the first. Nothing has to be passed.",
|
|
404
404
|
"language": "tsx",
|
|
405
|
-
"source": "<Toolbar aria-label=\"
|
|
405
|
+
"source": "<Toolbar aria-label=\"Formatting\">\n <ToggleGroup aria-label=\"Text style\" defaultValue={['bold']} multiple variant=\"ghost\">\n <ToggleGroupItem aria-label=\"Bold\" icon={<BoldIcon />} value=\"bold\" />\n <ToggleGroupItem aria-label=\"Italic\" icon={<ItalicIcon />} value=\"italic\" />\n </ToggleGroup>\n <ToolbarSeparator />\n <Button size=\"sm\" tone=\"secondary\" variant=\"ghost\">\n Publicar\n </Button>\n</Toolbar>;\n",
|
|
406
406
|
"verdict": "excerpt"
|
|
407
407
|
},
|
|
408
408
|
{
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
"title": "Content the family did not choose",
|
|
411
411
|
"note": "A label nine words long, one unbroken token, and a right-to-left string inside a left-to-right page. Each clips at the ellipsis and keeps its whole text in the DOM.",
|
|
412
412
|
"language": "tsx",
|
|
413
|
-
"source": "<ToggleGroup aria-label=\"
|
|
413
|
+
"source": "<ToggleGroup aria-label=\"Frequency\" defaultValue={['now']} fullWidth>\n <ToggleGroupItem value=\"now\">Immediately</ToggleGroupItem>\n <ToggleGroupItem value=\"digest\">Once a day, in the evening digest</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
414
414
|
"verdict": "excerpt"
|
|
415
415
|
},
|
|
416
416
|
{
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
"title": "The keyboard, key by key",
|
|
427
427
|
"note": "Tab reaches the group once; the arrows move focus and never toggle; Home and End reach the ends; Space and Enter turn the focused item on and off. An item is a button, and that is why.",
|
|
428
428
|
"language": "tsx",
|
|
429
|
-
"source": "<ToggleGroup aria-label=\"
|
|
429
|
+
"source": "<ToggleGroup aria-label=\"Period\" defaultValue={['week']} loop={false}>\n <ToggleGroupItem value=\"day\">Day</ToggleGroupItem>\n <ToggleGroupItem value=\"week\">Week</ToggleGroupItem>\n</ToggleGroup>;\n",
|
|
430
430
|
"verdict": "excerpt"
|
|
431
431
|
}
|
|
432
432
|
]
|
|
@@ -14,10 +14,10 @@ import { ToggleGroup, ToggleGroupDefaultsProvider, ToggleGroupItem } from '@slot
|
|
|
14
14
|
Excerpt — not a complete module
|
|
15
15
|
|
|
16
16
|
```tsx
|
|
17
|
-
<ToggleGroup aria-label="
|
|
18
|
-
<ToggleGroupItem value="day">
|
|
19
|
-
<ToggleGroupItem value="week">
|
|
20
|
-
<ToggleGroupItem value="month">
|
|
17
|
+
<ToggleGroup aria-label="Chart period" defaultValue={['week']}>
|
|
18
|
+
<ToggleGroupItem value="day">Day</ToggleGroupItem>
|
|
19
|
+
<ToggleGroupItem value="week">Week</ToggleGroupItem>
|
|
20
|
+
<ToggleGroupItem value="month">Month</ToggleGroupItem>
|
|
21
21
|
</ToggleGroup>;
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -39,7 +39,7 @@ Excerpt — not a complete module
|
|
|
39
39
|
| `multiple` | `boolean` | false | ToggleGroup | Whether more than one item may be on at a time. The value stays an array either way, so both bindings hold one shape and a single-select consumer writes an array of one |
|
|
40
40
|
| `deselectable` | `boolean` | true | ToggleGroup | Whether the last item on may be turned off. Ignored while multiple is true, where a set may always empty |
|
|
41
41
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | ToggleGroup | The control step the bar and every item sit at. It reads the control scale, so the bar is as tall as the field beside it |
|
|
42
|
-
| `variant` | `'outline' \| 'ghost' \| 'chips'` | outline | ToggleGroup | Whether the bar draws its own edge, or draws its items as chips: separate rounded items that wrap, never joined, the pressed one in the neutral tone ink. There is no tone axis: “on” is one
|
|
42
|
+
| `variant` | `'outline' \| 'ghost' \| 'chips'` | outline | ToggleGroup | Whether the bar draws its own edge, or draws its items as chips: separate rounded items that wrap, never joined, the pressed one in the neutral tone ink. There is no tone axis: “on” is one color across the system, and a bar that wants the whole palette is button-group around ToggleButtons |
|
|
43
43
|
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | ToggleGroup | How the items flow, and which pair of arrows moves focus. A vertical group writes aria-orientation |
|
|
44
44
|
| `attached` | `boolean` | true | ToggleGroup | Whether the items are joined into one bar or spaced apart. A joined bar overlaps its items by one border so a shared column holds one line |
|
|
45
45
|
| `fullWidth` | `boolean` | false | ToggleGroup | Whether the items share the whole line. Left alone the bar is as wide as its labels |
|
|
@@ -92,27 +92,27 @@ The value is an array in both modes: multiple caps it at every item rather than
|
|
|
92
92
|
Excerpt — not a complete module
|
|
93
93
|
|
|
94
94
|
```tsx
|
|
95
|
-
<ToggleGroup aria-label="
|
|
96
|
-
<ToggleGroupItem value="bold">
|
|
97
|
-
<ToggleGroupItem value="italic">
|
|
95
|
+
<ToggleGroup aria-label="Text style" defaultValue={['bold', 'italic']} multiple>
|
|
96
|
+
<ToggleGroupItem value="bold">Bold</ToggleGroupItem>
|
|
97
|
+
<ToggleGroupItem value="italic">Italic</ToggleGroupItem>
|
|
98
98
|
</ToggleGroup>;
|
|
99
99
|
|
|
100
|
-
<ToggleGroup aria-label="
|
|
101
|
-
<ToggleGroupItem value="week">
|
|
102
|
-
<ToggleGroupItem value="month">
|
|
100
|
+
<ToggleGroup aria-label="Period" defaultValue={['week']} deselectable={false}>
|
|
101
|
+
<ToggleGroupItem value="week">Week</ToggleGroupItem>
|
|
102
|
+
<ToggleGroupItem value="month">Month</ToggleGroupItem>
|
|
103
103
|
</ToggleGroup>;
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
### Framed, or bare
|
|
107
107
|
|
|
108
|
-
outline draws the bar’s own edge; ghost draws none, for a bar that sits inside something already framed — a toolbar, a card header. The
|
|
108
|
+
outline draws the bar’s own edge; ghost draws none, for a bar that sits inside something already framed — a toolbar, a card header. The color of an item that is on is the same in both.
|
|
109
109
|
|
|
110
110
|
Excerpt — not a complete module
|
|
111
111
|
|
|
112
112
|
```tsx
|
|
113
|
-
<ToggleGroup aria-label="
|
|
114
|
-
<ToggleGroupItem value="comfortable">
|
|
115
|
-
<ToggleGroupItem value="compact">
|
|
113
|
+
<ToggleGroup aria-label="Density" defaultValue={['compact']} variant="ghost">
|
|
114
|
+
<ToggleGroupItem value="comfortable">Comfortable</ToggleGroupItem>
|
|
115
|
+
<ToggleGroupItem value="compact">Compact</ToggleGroupItem>
|
|
116
116
|
</ToggleGroup>;
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -123,9 +123,9 @@ Each step reads the control scale, so a bar is exactly as tall as the text field
|
|
|
123
123
|
Excerpt — not a complete module
|
|
124
124
|
|
|
125
125
|
```tsx
|
|
126
|
-
<ToggleGroup aria-label="
|
|
127
|
-
<ToggleGroupItem value="newest">
|
|
128
|
-
<ToggleGroupItem value="oldest">
|
|
126
|
+
<ToggleGroup aria-label="Sorting" defaultValue={['newest']} size="sm">
|
|
127
|
+
<ToggleGroupItem value="newest">Newest</ToggleGroupItem>
|
|
128
|
+
<ToggleGroupItem value="oldest">Oldest</ToggleGroupItem>
|
|
129
129
|
</ToggleGroup>;
|
|
130
130
|
```
|
|
131
131
|
|
|
@@ -136,10 +136,10 @@ A vertical bar moves with ArrowUp and ArrowDown and writes aria-orientation; a h
|
|
|
136
136
|
Excerpt — not a complete module
|
|
137
137
|
|
|
138
138
|
```tsx
|
|
139
|
-
<ToggleGroup aria-label="
|
|
140
|
-
<ToggleGroupItem value="start">
|
|
141
|
-
<ToggleGroupItem value="center">
|
|
142
|
-
<ToggleGroupItem value="end">
|
|
139
|
+
<ToggleGroup aria-label="Alignment" defaultValue={['center']} orientation="vertical">
|
|
140
|
+
<ToggleGroupItem value="start">Start</ToggleGroupItem>
|
|
141
|
+
<ToggleGroupItem value="center">Center</ToggleGroupItem>
|
|
142
|
+
<ToggleGroupItem value="end">End</ToggleGroupItem>
|
|
143
143
|
</ToggleGroup>;
|
|
144
144
|
```
|
|
145
145
|
|
|
@@ -181,9 +181,9 @@ An item with only a mark draws square and takes its accessible name from aria-la
|
|
|
181
181
|
Excerpt — not a complete module
|
|
182
182
|
|
|
183
183
|
```tsx
|
|
184
|
-
<ToggleGroup aria-label="
|
|
185
|
-
<ToggleGroupItem aria-label="
|
|
186
|
-
<ToggleGroupItem aria-label="
|
|
184
|
+
<ToggleGroup aria-label="Text style" defaultValue={['bold']} multiple>
|
|
185
|
+
<ToggleGroupItem aria-label="Bold" icon={<BoldIcon />} value="bold" />
|
|
186
|
+
<ToggleGroupItem aria-label="Italic" icon={<ItalicIcon />} value="italic" />
|
|
187
187
|
</ToggleGroup>;
|
|
188
188
|
```
|
|
189
189
|
|
|
@@ -194,9 +194,9 @@ Left alone the bar is as wide as its labels; fullWidth makes the items share the
|
|
|
194
194
|
Excerpt — not a complete module
|
|
195
195
|
|
|
196
196
|
```tsx
|
|
197
|
-
<ToggleGroup aria-label="
|
|
198
|
-
<ToggleGroupItem value="monthly">
|
|
199
|
-
<ToggleGroupItem value="yearly">
|
|
197
|
+
<ToggleGroup aria-label="Billing" defaultValue={['monthly']} fullWidth>
|
|
198
|
+
<ToggleGroupItem value="monthly">Monthly</ToggleGroupItem>
|
|
199
|
+
<ToggleGroupItem value="yearly">Yearly</ToggleGroupItem>
|
|
200
200
|
</ToggleGroup>;
|
|
201
201
|
```
|
|
202
202
|
|
|
@@ -207,10 +207,10 @@ A toolbar is already one tab stop with arrow navigation across every control it
|
|
|
207
207
|
Excerpt — not a complete module
|
|
208
208
|
|
|
209
209
|
```tsx
|
|
210
|
-
<Toolbar aria-label="
|
|
211
|
-
<ToggleGroup aria-label="
|
|
212
|
-
<ToggleGroupItem aria-label="
|
|
213
|
-
<ToggleGroupItem aria-label="
|
|
210
|
+
<Toolbar aria-label="Formatting">
|
|
211
|
+
<ToggleGroup aria-label="Text style" defaultValue={['bold']} multiple variant="ghost">
|
|
212
|
+
<ToggleGroupItem aria-label="Bold" icon={<BoldIcon />} value="bold" />
|
|
213
|
+
<ToggleGroupItem aria-label="Italic" icon={<ItalicIcon />} value="italic" />
|
|
214
214
|
</ToggleGroup>
|
|
215
215
|
<ToolbarSeparator />
|
|
216
216
|
<Button size="sm" tone="secondary" variant="ghost">
|
|
@@ -226,9 +226,9 @@ A label nine words long, one unbroken token, and a right-to-left string inside a
|
|
|
226
226
|
Excerpt — not a complete module
|
|
227
227
|
|
|
228
228
|
```tsx
|
|
229
|
-
<ToggleGroup aria-label="
|
|
230
|
-
<ToggleGroupItem value="now">
|
|
231
|
-
<ToggleGroupItem value="digest">
|
|
229
|
+
<ToggleGroup aria-label="Frequency" defaultValue={['now']} fullWidth>
|
|
230
|
+
<ToggleGroupItem value="now">Immediately</ToggleGroupItem>
|
|
231
|
+
<ToggleGroupItem value="digest">Once a day, in the evening digest</ToggleGroupItem>
|
|
232
232
|
</ToggleGroup>;
|
|
233
233
|
```
|
|
234
234
|
|
|
@@ -253,8 +253,8 @@ Tab reaches the group once; the arrows move focus and never toggle; Home and End
|
|
|
253
253
|
Excerpt — not a complete module
|
|
254
254
|
|
|
255
255
|
```tsx
|
|
256
|
-
<ToggleGroup aria-label="
|
|
257
|
-
<ToggleGroupItem value="day">
|
|
258
|
-
<ToggleGroupItem value="week">
|
|
256
|
+
<ToggleGroup aria-label="Period" defaultValue={['week']} loop={false}>
|
|
257
|
+
<ToggleGroupItem value="day">Day</ToggleGroupItem>
|
|
258
|
+
<ToggleGroupItem value="week">Week</ToggleGroupItem>
|
|
259
259
|
</ToggleGroup>;
|
|
260
260
|
```
|
package/dist/docs/toggle.json
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"part": "root",
|
|
62
62
|
"element": "button, or the element render returns",
|
|
63
63
|
"required": true,
|
|
64
|
-
"purpose": "The control. It carries data-ui=\"toggle\", aria-pressed in both states, data-pressed while it is on, and the two axes. Its border is always present, so turning it on changes a
|
|
64
|
+
"purpose": "The control. It carries data-ui=\"toggle\", aria-pressed in both states, data-pressed while it is on, and the two axes. Its border is always present, so turning it on changes a color and never the geometry."
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"part": "icon",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"type": "'outline' | 'ghost' | 'chips'",
|
|
104
104
|
"defaultValue": "outline",
|
|
105
105
|
"appliesTo": "Toggle",
|
|
106
|
-
"description": "Whether the control draws its own edge before it is on, or is a chip pressed in the neutral tone ink. There is no tone axis: a mode is one
|
|
106
|
+
"description": "Whether the control draws its own edge before it is on, or is a chip pressed in the neutral tone ink. There is no tone axis: a mode is one color when it is on, and an action that persists in one of five tones is button’s ToggleButton"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"name": "icon",
|
|
@@ -267,9 +267,9 @@
|
|
|
267
267
|
{
|
|
268
268
|
"id": "variant",
|
|
269
269
|
"title": "Framed, or bare until it is on",
|
|
270
|
-
"note": "outline draws its own edge and stands beside a field; ghost is the toggle inside something already framed — a toolbar, a card header. Both turn on into the same accent pair, so “on” is one
|
|
270
|
+
"note": "outline draws its own edge and stands beside a field; ghost is the toggle inside something already framed — a toolbar, a card header. Both turn on into the same accent pair, so “on” is one color wherever the control is.",
|
|
271
271
|
"language": "tsx",
|
|
272
|
-
"source": "<Toggle icon={<Pin size={16} />} variant=\"ghost\">\n
|
|
272
|
+
"source": "<Toggle icon={<Pin size={16} />} variant=\"ghost\">\n Pin header\n</Toggle>;\n",
|
|
273
273
|
"verdict": "excerpt"
|
|
274
274
|
},
|
|
275
275
|
{
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
{
|
|
284
284
|
"id": "iconOnly",
|
|
285
285
|
"title": "A mark and no words",
|
|
286
|
-
"note": "Without children the toggle draws square from the control height and the mark is
|
|
286
|
+
"note": "Without children the toggle draws square from the control height and the mark is centerd in it. The name comes from aria-label, and the type makes nothing of that: the reference page is where the rule is stated, and the harness photographs it.",
|
|
287
287
|
"language": "tsx",
|
|
288
288
|
"source": "<Toggle aria-label=\"Negrito\" icon={<Bold size={16} />} defaultPressed />;\n",
|
|
289
289
|
"verdict": "excerpt"
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"title": "Every state the contract declares",
|
|
294
294
|
"note": "Hover takes the neutral ground when off and the accent ground’s own hover step when on. Disabled keeps both facts of a toggle that is on: the ground says unavailable and the edge still says on, so the reader learns the mode from a control they cannot change.",
|
|
295
295
|
"language": "tsx",
|
|
296
|
-
"source": "<Toggle icon={<Pin size={16} />} defaultPressed disabled>\n
|
|
296
|
+
"source": "<Toggle icon={<Pin size={16} />} defaultPressed disabled>\n Pin header\n</Toggle>;\n",
|
|
297
297
|
"verdict": "excerpt"
|
|
298
298
|
},
|
|
299
299
|
{
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
"title": "Inside a toolbar",
|
|
302
302
|
"note": "The bar is one tab stop with arrow navigation across every control it holds, and a toggle is one of those controls: Tab reaches the bar once, the arrows reach the toggle, Space presses it. The family writes no listener of its own.",
|
|
303
303
|
"language": "tsx",
|
|
304
|
-
"source": "<Toolbar aria-label=\"Editor\">\n <Toggle aria-label=\"
|
|
304
|
+
"source": "<Toolbar aria-label=\"Editor\">\n <Toggle aria-label=\"Bold\" icon={<Bold size={16} />} variant=\"ghost\" />\n <Toggle aria-label=\"Italic\" icon={<Italic size={16} />} variant=\"ghost\" />\n <ToolbarSeparator />\n <Toggle icon={<WrapText size={16} />} variant=\"ghost\">\n Quebrar\n </Toggle>\n</Toolbar>;\n",
|
|
305
305
|
"verdict": "excerpt"
|
|
306
306
|
},
|
|
307
307
|
{
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
{
|
|
332
332
|
"id": "versus",
|
|
333
333
|
"title": "Toggle, or ToggleButton",
|
|
334
|
-
"note": "A mode is one
|
|
334
|
+
"note": "A mode is one color and true the moment it is pressed: Toggle. An action that persists — Follow, Subscribe — reaches a server, waits, and stands in one of five tones beside the other actions of a page: button’s ToggleButton. Same state model, different meaning.",
|
|
335
335
|
"language": "tsx",
|
|
336
336
|
"source": "<>\n <Toggle icon={<WrapText size={16} />}>Quebrar linhas</Toggle>\n <ToggleButton loading={following} onPressedChange={follow} pressed={followed}>\n Seguir\n </ToggleButton>\n</>;\n",
|
|
337
337
|
"verdict": "excerpt"
|
package/dist/docs/toggle.md
CHANGED
|
@@ -34,7 +34,7 @@ Excerpt — not a complete module
|
|
|
34
34
|
| `pressed` | `boolean` | — | Toggle | Present means the consumer owns the state, for the life of the component. Absent, the toggle owns it and starts from defaultPressed |
|
|
35
35
|
| `defaultPressed` | `boolean` | false | Toggle | What an uncontrolled toggle starts from, read once. A later change to it does not silently become new state |
|
|
36
36
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | Toggle | The control step. It reads the control scale, so the toggle is as tall as the field beside it |
|
|
37
|
-
| `variant` | `'outline' \| 'ghost' \| 'chips'` | outline | Toggle | Whether the control draws its own edge before it is on, or is a chip pressed in the neutral tone ink. There is no tone axis: a mode is one
|
|
37
|
+
| `variant` | `'outline' \| 'ghost' \| 'chips'` | outline | Toggle | Whether the control draws its own edge before it is on, or is a chip pressed in the neutral tone ink. There is no tone axis: a mode is one color when it is on, and an action that persists in one of five tones is button’s ToggleButton |
|
|
38
38
|
| `icon` | `ReactNode` | — | Toggle | The mark drawn before the words, sized from the control glyph scale and hidden from the reading order. Alone, it makes the toggle square |
|
|
39
39
|
| `children` | `ReactNode` | — | Toggle | The words, which never change with the state. Absent, the toggle needs an aria-label |
|
|
40
40
|
| `disabled` | `boolean` | false | Toggle | The native attribute, which is also what makes the browser refuse focus. A toggle that is on and unavailable keeps saying both |
|
|
@@ -88,13 +88,13 @@ const [wrap, setWrap] = useState(false);
|
|
|
88
88
|
|
|
89
89
|
### Framed, or bare until it is on
|
|
90
90
|
|
|
91
|
-
outline draws its own edge and stands beside a field; ghost is the toggle inside something already framed — a toolbar, a card header. Both turn on into the same accent pair, so “on” is one
|
|
91
|
+
outline draws its own edge and stands beside a field; ghost is the toggle inside something already framed — a toolbar, a card header. Both turn on into the same accent pair, so “on” is one color wherever the control is.
|
|
92
92
|
|
|
93
93
|
Excerpt — not a complete module
|
|
94
94
|
|
|
95
95
|
```tsx
|
|
96
96
|
<Toggle icon={<Pin size={16} />} variant="ghost">
|
|
97
|
-
|
|
97
|
+
Pin header
|
|
98
98
|
</Toggle>;
|
|
99
99
|
```
|
|
100
100
|
|
|
@@ -112,7 +112,7 @@ Excerpt — not a complete module
|
|
|
112
112
|
|
|
113
113
|
### A mark and no words
|
|
114
114
|
|
|
115
|
-
Without children the toggle draws square from the control height and the mark is
|
|
115
|
+
Without children the toggle draws square from the control height and the mark is centerd in it. The name comes from aria-label, and the type makes nothing of that: the reference page is where the rule is stated, and the harness photographs it.
|
|
116
116
|
|
|
117
117
|
Excerpt — not a complete module
|
|
118
118
|
|
|
@@ -128,7 +128,7 @@ Excerpt — not a complete module
|
|
|
128
128
|
|
|
129
129
|
```tsx
|
|
130
130
|
<Toggle icon={<Pin size={16} />} defaultPressed disabled>
|
|
131
|
-
|
|
131
|
+
Pin header
|
|
132
132
|
</Toggle>;
|
|
133
133
|
```
|
|
134
134
|
|
|
@@ -140,8 +140,8 @@ Excerpt — not a complete module
|
|
|
140
140
|
|
|
141
141
|
```tsx
|
|
142
142
|
<Toolbar aria-label="Editor">
|
|
143
|
-
<Toggle aria-label="
|
|
144
|
-
<Toggle aria-label="
|
|
143
|
+
<Toggle aria-label="Bold" icon={<Bold size={16} />} variant="ghost" />
|
|
144
|
+
<Toggle aria-label="Italic" icon={<Italic size={16} />} variant="ghost" />
|
|
145
145
|
<ToolbarSeparator />
|
|
146
146
|
<Toggle icon={<WrapText size={16} />} variant="ghost">
|
|
147
147
|
Quebrar
|
|
@@ -187,7 +187,7 @@ Excerpt — not a complete module
|
|
|
187
187
|
|
|
188
188
|
### Toggle, or ToggleButton
|
|
189
189
|
|
|
190
|
-
A mode is one
|
|
190
|
+
A mode is one color and true the moment it is pressed: Toggle. An action that persists — Follow, Subscribe — reaches a server, waits, and stands in one of five tones beside the other actions of a page: button’s ToggleButton. Same state model, different meaning.
|
|
191
191
|
|
|
192
192
|
Excerpt — not a complete module
|
|
193
193
|
|
package/dist/docs/tokens.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The theme states every value the families draw with. An element of the application's own reads the groups on this page, never a literal, and never a token of a group under "Read by their family only" (CP-05, OE-01).
|
|
4
4
|
|
|
5
|
-
A primitive is a step on a scale; a semantic token says what a value is for. Values are the default theme's. A
|
|
5
|
+
A primitive is a step on a scale; a semantic token says what a value is for. Values are the default theme's. A color has no value here: it changes with the scheme — light, dark, high-contrast — and is chosen by its role. A value that follows density is given for comfortable, compact and dense.
|
|
6
6
|
|
|
7
7
|
## space
|
|
8
8
|
|
|
@@ -205,7 +205,7 @@ Names: --slotted-z-index-{layer}
|
|
|
205
205
|
|
|
206
206
|
## shadow
|
|
207
207
|
|
|
208
|
-
What elevation a surface has above the one under it, smallest first; under forced
|
|
208
|
+
What elevation a surface has above the one under it, smallest first; under forced colors every step is none.
|
|
209
209
|
|
|
210
210
|
Names: --slotted-shadow-{step}
|
|
211
211
|
|
|
@@ -228,12 +228,12 @@ The grounds content stands on.
|
|
|
228
228
|
| `--slotted-surface-inverse` | A ground in the opposite lightness, with `--slotted-text-inverse` on it. | by scheme |
|
|
229
229
|
| `--slotted-surface-inverse-hover` | The inverse ground under the pointer: `--slotted-surface-inverse` moved a share toward the opposite lightness. | by scheme |
|
|
230
230
|
| `--slotted-surface-inverse-active` | The inverse ground while pressed, a step beyond the hover. | by scheme |
|
|
231
|
-
| `--slotted-surface-material` | The ground of a bar that floats over scrolling content, drawn as a material: `--slotted-surface` at a partial share over transparency, behind `--slotted-material-backdrop`. Under `prefers-reduced-transparency: reduce` it is `--slotted-surface`, and under forced
|
|
232
|
-
| `--slotted-material-backdrop` | The backdrop filter a material is drawn with: the content scrolling under it, saturated and blurred. Each scheme states its own, because a light page holds less contrast for a blur to keep. Under `prefers-reduced-transparency: reduce` and forced
|
|
231
|
+
| `--slotted-surface-material` | The ground of a bar that floats over scrolling content, drawn as a material: `--slotted-surface` at a partial share over transparency, behind `--slotted-material-backdrop`. Under `prefers-reduced-transparency: reduce` it is `--slotted-surface`, and under forced colors the Canvas system color. | by scheme |
|
|
232
|
+
| `--slotted-material-backdrop` | The backdrop filter a material is drawn with: the content scrolling under it, saturated and blurred. Each scheme states its own, because a light page holds less contrast for a blur to keep. Under `prefers-reduced-transparency: reduce` and forced colors it is `none`. | by scheme |
|
|
233
233
|
|
|
234
234
|
## text
|
|
235
235
|
|
|
236
|
-
The
|
|
236
|
+
The colors text is painted in.
|
|
237
237
|
|
|
238
238
|
| Token | Meaning | Default value |
|
|
239
239
|
| --- | --- | --- |
|
|
@@ -243,7 +243,7 @@ The colours text is painted in.
|
|
|
243
243
|
|
|
244
244
|
## border
|
|
245
245
|
|
|
246
|
-
The
|
|
246
|
+
The colors of lines between and inside surfaces.
|
|
247
247
|
|
|
248
248
|
| Token | Meaning | Default value |
|
|
249
249
|
| --- | --- | --- |
|
|
@@ -270,8 +270,8 @@ The outline every focused element draws.
|
|
|
270
270
|
| --- | --- | --- |
|
|
271
271
|
| `--slotted-focus-ring-width` | The thickness of the focus outline. | 2px |
|
|
272
272
|
| `--slotted-focus-ring-offset` | The distance between the element and its focus outline. | 2px |
|
|
273
|
-
| `--slotted-focus-ring-color` | The
|
|
274
|
-
| `--slotted-focus-ring-color-invalid` | The
|
|
273
|
+
| `--slotted-focus-ring-color` | The color of the focus outline. | by scheme |
|
|
274
|
+
| `--slotted-focus-ring-color-invalid` | The color of the focus outline of a control in error; an element in error points `--slotted-focus-ring-color` at it. | by scheme |
|
|
275
275
|
|
|
276
276
|
## target
|
|
277
277
|
|
|
@@ -292,7 +292,7 @@ Names: --slotted-tone-{tone}-{role}
|
|
|
292
292
|
| --- | --- |
|
|
293
293
|
| accent | The product's intent: the primary action, the chosen option, the current place. |
|
|
294
294
|
| secondary | A second intent beside accent, for an action or a mark that must not compete with it. |
|
|
295
|
-
| neutral | Ink: the inverse surface as a fill and the text
|
|
295
|
+
| neutral | Ink: the inverse surface as a fill and the text color as a label, for a primary action in a product that keeps the accent for data. |
|
|
296
296
|
| info | A fact the reader is told with no judgement of it: a note, a transfer, a change of state that is neither good nor bad. Its own seed, so it stays apart from an accent that shares a hue with success. |
|
|
297
297
|
| success | A result that completed or a state that is healthy. |
|
|
298
298
|
| warning | A state that needs attention before it becomes a failure. |
|
|
@@ -356,12 +356,12 @@ What a control's text and frame look like at every size.
|
|
|
356
356
|
| `--slotted-control-letter-spacing` | The letter spacing of a control's text. | 0 |
|
|
357
357
|
| `--slotted-control-border-width` | The edge width of a control at rest. | 1px |
|
|
358
358
|
| `--slotted-control-radius` | The corner of a control. | 4px |
|
|
359
|
-
| `--slotted-control-shadow-focus-geometry` | Offset, blur and spread of the shadow a focused control draws, with no
|
|
359
|
+
| `--slotted-control-shadow-focus-geometry` | Offset, blur and spread of the shadow a focused control draws, with no color; drawn with `--slotted-focus-ring-color`. | 0 1px 4px -1px |
|
|
360
360
|
| `--slotted-control-transition-duration` | How long a control takes to change state. | 120ms; 1ms under reduced motion |
|
|
361
361
|
| `--slotted-control-transition-easing` | The curve of a control's change of state. | cubic-bezier(0.2, 0, 0, 1) |
|
|
362
|
-
| `--slotted-control-invalid-edge-width` | The edge an invalid control adds inside its border, so the state reads where
|
|
362
|
+
| `--slotted-control-invalid-edge-width` | The edge an invalid control adds inside its border, so the state reads where color cannot. | 1px |
|
|
363
363
|
| `--slotted-control-focus-ring-offset` | The distance between a field's frame and its focus outline; set to the negative of `--slotted-control-border-width`, a field's ring lies flush over its border while a button keeps `--slotted-focus-ring-offset`. | 2px |
|
|
364
|
-
| `--slotted-control-border-color` | The edge
|
|
364
|
+
| `--slotted-control-border-color` | The edge color of a control at rest. | by scheme |
|
|
365
365
|
| `--slotted-control-surface` | The ground of a control at rest: a field, a select, a segmented control. | by scheme |
|
|
366
366
|
| `--slotted-control-shadow` | The shadow of a control at rest. | by scheme |
|
|
367
367
|
|
|
@@ -440,7 +440,7 @@ How the place the reader is on is marked.
|
|
|
440
440
|
|
|
441
441
|
## state
|
|
442
442
|
|
|
443
|
-
Translucent layers laid over whatever surface an element stands on, so a hovered, pressed or selected row reads the same on the page and on a raised surface. Each is the scheme's text
|
|
443
|
+
Translucent layers laid over whatever surface an element stands on, so a hovered, pressed or selected row reads the same on the page and on a raised surface. Each is the scheme's text color at a small share over transparency. Under forced colors every layer is the Canvas system color: the state is carried by the system colors the family draws, Highlight for selection and an outline for focus.
|
|
444
444
|
|
|
445
445
|
| Token | Meaning | Default value |
|
|
446
446
|
| --- | --- | --- |
|
|
@@ -461,7 +461,7 @@ The veil under a modal surface.
|
|
|
461
461
|
A family adjusts these for itself. An element of the application's own does not read them.
|
|
462
462
|
|
|
463
463
|
- icon: The geometry of an icon a family draws itself; an icon of the application's own is drawn with the icon family. Names: --slotted-icon-{glyph}
|
|
464
|
-
- upload-kind: The tile
|
|
465
|
-
- code: The
|
|
464
|
+
- upload-kind: The tile colors of file kinds in upload and attachment. Names: --slotted-upload-kind-{kind}
|
|
465
|
+
- code: The colors of syntax scopes in code-block. Names: --slotted-code-{scope}
|
|
466
466
|
- rating: The edge of a star in rating. Names: --slotted-rating-edge
|
|
467
467
|
- avatar-size: The sizes of avatar, smallest first. Names: --slotted-avatar-size-{size}
|
package/dist/docs/toolbar.json
CHANGED
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"type": "string | ((hidden: number) => string)",
|
|
151
151
|
"defaultValue": "counted",
|
|
152
152
|
"appliesTo": "ToolbarOverflow",
|
|
153
|
-
"description": "The accessible name of the control that holds what did not fit. The default counts — \"3 more actions\" — because three dots say nothing about how much is behind them. It is a sentence of the language in force, with its plural
|
|
153
|
+
"description": "The accessible name of the control that holds what did not fit. The default counts — \"3 more actions\" — because three dots say nothing about how much is behind them. It is a sentence of the language in force, with its plural, and label replaces it"
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
"name": "align, side, size",
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"A control that announces aria-disabled keeps its place in the ring, which the pattern allows where discoverability of a function is crucial and which is what Button’s focusableWhenDisabled renders. A control carrying the native attribute is skipped, because the platform will not focus it either — including every control inside a disabled fieldset.",
|
|
240
240
|
"The bar names itself with the consumer’s aria-label or aria-labelledby, and each group names itself the same way. The pattern uses the role for three or more controls; that is documented rather than enforced, because a role that disappeared when a permission filter removed a button would be a semantic changing behind the author.",
|
|
241
241
|
"Under overflow=\"menu\" the control that holds what did not fit is a control of the bar like any other: the arrows, Home and End reach it, and it leaves the ring the moment the bar has room for everything, because a hidden control cannot hold focus. Its name carries the count rather than the mark, and focus is moved onto it before the control under focus is hidden — so a reader who was on the fifth button lands on the control that now holds it rather than on the document body.",
|
|
242
|
-
"Nothing in the bar is painted over: every control keeps its own states, its own focus ring and its own contrast. What the bar adds is the boundary between runs — a group, a rule, a spacer — and under forced
|
|
242
|
+
"Nothing in the bar is painted over: every control keeps its own states, its own focus ring and its own contrast. What the bar adds is the boundary between runs — a group, a rule, a spacer — and under forced colors the rule keeps its own paint, because a background flattens to Canvas and would take the boundary with it."
|
|
243
243
|
]
|
|
244
244
|
}
|
|
245
245
|
},
|
|
@@ -298,15 +298,15 @@
|
|
|
298
298
|
"title": "Playground",
|
|
299
299
|
"note": "One bar with every axis on it, driven by the controls below the canvas. Tab into it once, then use the arrows: the whole bar is a single stop however many controls it holds.",
|
|
300
300
|
"language": "tsx",
|
|
301
|
-
"source": "<Toolbar aria-label=\"
|
|
301
|
+
"source": "<Toolbar aria-label=\"Formatting\">\n <Button variant=\"ghost\">Bold</Button>\n <Button variant=\"ghost\">Italic</Button>\n <ToolbarSeparator />\n <Button variant=\"ghost\">Link</Button>\n</Toolbar>;\n",
|
|
302
302
|
"verdict": "excerpt"
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
"id": "orientation",
|
|
306
306
|
"title": "Which way the bar runs",
|
|
307
|
-
"note": "A horizontal bar
|
|
307
|
+
"note": "A horizontal bar centers its controls and a vertical one stretches them, because a column at each control’s natural width is a ragged edge; the separator and the group boundary turn with it.",
|
|
308
308
|
"language": "tsx",
|
|
309
|
-
"source": "<Toolbar aria-label=\"
|
|
309
|
+
"source": "<Toolbar aria-label=\"Tools\" orientation=\"vertical\">\n <Button variant=\"ghost\">Pencil</Button>\n <Button variant=\"ghost\">Brush</Button>\n <ToolbarSeparator />\n <Button variant=\"ghost\">Borracha</Button>\n</Toolbar>;\n",
|
|
310
310
|
"verdict": "excerpt"
|
|
311
311
|
},
|
|
312
312
|
{
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
"title": "Runs that belong together",
|
|
331
331
|
"note": "A group carries a name a screen reader announces and a boundary the eye reads, and a rule draws the same boundary the other way — which is what keeps a destructive action off a frequent one.",
|
|
332
332
|
"language": "tsx",
|
|
333
|
-
"source": "<Toolbar aria-label=\"
|
|
333
|
+
"source": "<Toolbar aria-label=\"Selection\" variant=\"outline\">\n <ToolbarGroup aria-label=\"Alignment\">\n <Button variant=\"outline\">Start</Button>\n <Button pressed variant=\"outline\">\n Center\n </Button>\n </ToolbarGroup>\n <ToolbarSeparator />\n <ToolbarSpacer />\n <Button tone=\"danger\">Delete</Button>\n</Toolbar>;\n",
|
|
334
334
|
"verdict": "excerpt"
|
|
335
335
|
},
|
|
336
336
|
{
|
|
@@ -338,13 +338,13 @@
|
|
|
338
338
|
"title": "The APG table, and where focus lands",
|
|
339
339
|
"note": "Tab enters the bar once and returns to the control that last had focus; the arrows of the flow axis move and wrap, the cross axis duplicates them, and Home and End reach the ends.",
|
|
340
340
|
"language": "tsx",
|
|
341
|
-
"source": "// Every focusable control inside the bar is an item, found in the DOM\n// rather than wrapped in a component of its own — so this library's own\n// families, and a consumer's own control, drop in unwrapped.\n<Toolbar aria-label=\"
|
|
341
|
+
"source": "// Every focusable control inside the bar is an item, found in the DOM\n// rather than wrapped in a component of its own — so this library's own\n// families, and a consumer's own control, drop in unwrapped.\n<Toolbar aria-label=\"Formatting\">\n <Button variant=\"ghost\">Bold</Button>\n <Checkbox>Grid</Checkbox>\n <Link href=\"/ajuda\">Ajuda</Link>\n</Toolbar>;\n",
|
|
342
342
|
"verdict": "excerpt"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"id": "keyOwners",
|
|
346
346
|
"title": "An item that keeps the arrows",
|
|
347
|
-
"note": "A text field needs the inline arrows for its caret, so the bar leaves them to it and focus moves out on the cross axis instead — the APG’s advice for the author, written as
|
|
347
|
+
"note": "A text field needs the inline arrows for its caret, so the bar leaves them to it and focus moves out on the cross axis instead — the APG’s advice for the author, written as behavior.",
|
|
348
348
|
"language": "tsx",
|
|
349
349
|
"source": "<Toolbar aria-label=\"Filtro\">\n <Button variant=\"outline\">Todos</Button>\n <ToolbarSpacer />\n {/* Inferred from the kind of control; data-toolbar-keys states it where\n the kind cannot say — \"none\", \"inline\", \"block\" or \"all\". */}\n <TextField aria-label=\"Buscar\" type=\"search\" />\n</Toolbar>;\n",
|
|
350
350
|
"verdict": "excerpt"
|
|
@@ -354,7 +354,7 @@
|
|
|
354
354
|
"title": "A bar out of action",
|
|
355
355
|
"note": "A fieldset around the bar disables every control inside it natively, and because a natively disabled control cannot be focused, the arrows skip exactly those — the platform answers it in two lines.",
|
|
356
356
|
"language": "tsx",
|
|
357
|
-
"source": "<fieldset disabled={readOnly}>\n <Toolbar aria-label=\"
|
|
357
|
+
"source": "<fieldset disabled={readOnly}>\n <Toolbar aria-label=\"Read-only\">\n <Button variant=\"outline\">Edit</Button>\n <ToolbarSeparator />\n <Button tone=\"danger\">Delete</Button>\n </Toolbar>\n</fieldset>;\n",
|
|
358
358
|
"verdict": "excerpt"
|
|
359
359
|
},
|
|
360
360
|
{
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
"title": "More controls than room",
|
|
363
363
|
"note": "wrap keeps every control visible on a second row, and the arrows wrap from row to row because the item list is linear; scroll keeps the bar to one line and scrolls past its controls rather than squeezing them.",
|
|
364
364
|
"language": "tsx",
|
|
365
|
-
"source": "<Toolbar aria-label=\"
|
|
365
|
+
"source": "<Toolbar aria-label=\"Many actions\" overflow=\"wrap\" />;\n<Toolbar aria-label=\"Many actions, scrolling\" overflow=\"scroll\" />;\n",
|
|
366
366
|
"verdict": "excerpt"
|
|
367
367
|
},
|
|
368
368
|
{
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
"title": "Setting it once, and standing beside other families",
|
|
379
379
|
"note": "The provider carries the five decisions an application takes once, and the bar is what belongs in a tab list’s actions slot — one tab stop for however many actions the page puts there.",
|
|
380
380
|
"language": "tsx",
|
|
381
|
-
"source": "<ToolbarDefaultsProvider size=\"sm\" variant=\"outline\">\n <Tabs defaultValue=\"
|
|
381
|
+
"source": "<ToolbarDefaultsProvider size=\"sm\" variant=\"outline\">\n <Tabs defaultValue=\"summary\">\n <TabList aria-label=\"Order\">\n <Tab value=\"summary\">Summary</Tab>\n </TabList>\n <TabActions>\n <Toolbar aria-label=\"Order actions\">\n <Button variant=\"ghost\">Export</Button>\n </Toolbar>\n </TabActions>\n </Tabs>\n</ToolbarDefaultsProvider>;\n",
|
|
382
382
|
"verdict": "excerpt"
|
|
383
383
|
}
|
|
384
384
|
]
|