@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
|
@@ -13,21 +13,21 @@ Excerpt — not a complete module
|
|
|
13
13
|
|
|
14
14
|
```tsx
|
|
15
15
|
<Drawer>
|
|
16
|
-
<DrawerTrigger>
|
|
16
|
+
<DrawerTrigger>Open details</DrawerTrigger>
|
|
17
17
|
<DrawerPanel>
|
|
18
18
|
<DrawerHeader>
|
|
19
|
-
<DrawerTitle>
|
|
20
|
-
<DrawerDescription>
|
|
19
|
+
<DrawerTitle>Invoice 4471</DrawerTitle>
|
|
20
|
+
<DrawerDescription>Issued on August 12.</DrawerDescription>
|
|
21
21
|
<DrawerClose />
|
|
22
22
|
</DrawerHeader>
|
|
23
23
|
<DrawerBody>
|
|
24
|
-
<TextField label="
|
|
24
|
+
<TextField label="Note" />
|
|
25
25
|
</DrawerBody>
|
|
26
26
|
<DrawerFooter>
|
|
27
27
|
<Button variant="ghost" tone="secondary">
|
|
28
|
-
|
|
28
|
+
Cancel
|
|
29
29
|
</Button>
|
|
30
|
-
<Button>
|
|
30
|
+
<Button>Save</Button>
|
|
31
31
|
</DrawerFooter>
|
|
32
32
|
</DrawerPanel>
|
|
33
33
|
</Drawer>;
|
|
@@ -44,7 +44,7 @@ const wide = useMediaQuery('(min-width: 60rem)');
|
|
|
44
44
|
|
|
45
45
|
<div style={{ display: 'grid', gridTemplateColumns: 'auto minmax(0, 1fr)' }}>
|
|
46
46
|
<Drawer mode={wide ? 'inline' : 'overlay'} open={open} side="start">
|
|
47
|
-
<DrawerPanel render={(props) => <nav {...props} aria-label="
|
|
47
|
+
<DrawerPanel render={(props) => <nav {...props} aria-label="Sections" />}>…</DrawerPanel>
|
|
48
48
|
</Drawer>
|
|
49
49
|
<main>…</main>
|
|
50
50
|
</div>;
|
|
@@ -287,10 +287,10 @@ Excerpt — not a complete module
|
|
|
287
287
|
<Drawer side="bottom">
|
|
288
288
|
<DrawerPanel>
|
|
289
289
|
<DrawerHeader>
|
|
290
|
-
<DrawerTitle>
|
|
290
|
+
<DrawerTitle>Send reminder</DrawerTitle>
|
|
291
291
|
</DrawerHeader>
|
|
292
292
|
<DrawerBody>
|
|
293
|
-
<TextField aria-label="
|
|
293
|
+
<TextField aria-label="Note to the customer" />
|
|
294
294
|
</DrawerBody>
|
|
295
295
|
<DrawerFooter>…</DrawerFooter>
|
|
296
296
|
</DrawerPanel>
|
|
@@ -305,7 +305,7 @@ Excerpt — not a complete module
|
|
|
305
305
|
|
|
306
306
|
```tsx
|
|
307
307
|
<Drawer modal={false}>
|
|
308
|
-
<DrawerTrigger>
|
|
308
|
+
<DrawerTrigger>Order details</DrawerTrigger>
|
|
309
309
|
<DrawerPanel>…</DrawerPanel>
|
|
310
310
|
</Drawer>;
|
|
311
311
|
```
|
|
@@ -568,7 +568,7 @@ Excerpt — not a complete module
|
|
|
568
568
|
</DrawerHeader>
|
|
569
569
|
<DrawerBody>{longText}</DrawerBody>
|
|
570
570
|
<DrawerFooter>
|
|
571
|
-
<Button>
|
|
571
|
+
<Button>Save</Button>
|
|
572
572
|
</DrawerFooter>
|
|
573
573
|
</DrawerPanel>;
|
|
574
574
|
```
|
|
@@ -580,9 +580,9 @@ render hands each part every attribute the family wrote, so the trigger is the l
|
|
|
580
580
|
Excerpt — not a complete module
|
|
581
581
|
|
|
582
582
|
```tsx
|
|
583
|
-
<DrawerTrigger render={(props) => <Button {...props} variant="outline" />}>
|
|
583
|
+
<DrawerTrigger render={(props) => <Button {...props} variant="outline" />}>Open</DrawerTrigger>;
|
|
584
584
|
|
|
585
|
-
<DrawerPanel render={(props) => <nav {...props} aria-label="
|
|
585
|
+
<DrawerPanel render={(props) => <nav {...props} aria-label="Sections" />}>…</DrawerPanel>;
|
|
586
586
|
```
|
|
587
587
|
|
|
588
588
|
### What an application decides once
|
|
@@ -663,7 +663,7 @@ Excerpt — not a complete module
|
|
|
663
663
|
```tsx
|
|
664
664
|
<DrawerPanel>
|
|
665
665
|
<DrawerHeader>
|
|
666
|
-
<DrawerTitle>
|
|
666
|
+
<DrawerTitle>Collections</DrawerTitle>
|
|
667
667
|
</DrawerHeader>
|
|
668
668
|
<DrawerResizer />
|
|
669
669
|
</DrawerPanel>;
|
package/dist/docs/drawer.json
CHANGED
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
{
|
|
435
435
|
"name": "onClick, onKeyDown, onPointerDown, on every part",
|
|
436
436
|
"payload": "the element’s own events",
|
|
437
|
-
"when": "Whenever the element fires them. Your handler runs first, and preventDefault() in it cancels the drawer’s own
|
|
437
|
+
"when": "Whenever the element fires them. Your handler runs first, and preventDefault() in it cancels the drawer’s own behavior for that event."
|
|
438
438
|
}
|
|
439
439
|
],
|
|
440
440
|
"accessibility": [
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
"title": "Playground",
|
|
544
544
|
"note": "A drawer opened inside the scene rather than over the page. Press the trigger, then Tab: focus is contained, Escape closes, and focus returns to the button it came from.",
|
|
545
545
|
"language": "tsx",
|
|
546
|
-
"source": "<Drawer>\n <DrawerTrigger>
|
|
546
|
+
"source": "<Drawer>\n <DrawerTrigger>Open details</DrawerTrigger>\n <DrawerPanel>\n <DrawerHeader>\n <DrawerTitle>Invoice 4471</DrawerTitle>\n <DrawerDescription>Issued on August 12.</DrawerDescription>\n <DrawerClose />\n </DrawerHeader>\n <DrawerBody>\n <TextField label=\"Note\" />\n </DrawerBody>\n <DrawerFooter>\n <Button variant=\"ghost\" tone=\"secondary\">\n Cancel\n </Button>\n <Button>Save</Button>\n </DrawerFooter>\n </DrawerPanel>\n</Drawer>;\n",
|
|
547
547
|
"verdict": "excerpt"
|
|
548
548
|
},
|
|
549
549
|
{
|
|
@@ -551,7 +551,7 @@
|
|
|
551
551
|
"title": "A layer over the page, or a panel beside it",
|
|
552
552
|
"note": "One axis rather than two components, because an application binds it to its own breakpoint: swapping one element for another there would take the panel’s scroll position, its focus and every uncontrolled field with it.",
|
|
553
553
|
"language": "tsx",
|
|
554
|
-
"source": "const wide = useMediaQuery('(min-width: 60rem)');\n\n<div style={{ display: 'grid', gridTemplateColumns: 'auto minmax(0, 1fr)' }}>\n <Drawer mode={wide ? 'inline' : 'overlay'} open={open} side=\"start\">\n <DrawerPanel render={(props) => <nav {...props} aria-label=\"
|
|
554
|
+
"source": "const wide = useMediaQuery('(min-width: 60rem)');\n\n<div style={{ display: 'grid', gridTemplateColumns: 'auto minmax(0, 1fr)' }}>\n <Drawer mode={wide ? 'inline' : 'overlay'} open={open} side=\"start\">\n <DrawerPanel render={(props) => <nav {...props} aria-label=\"Sections\" />}>…</DrawerPanel>\n </Drawer>\n <main>…</main>\n</div>;\n",
|
|
555
555
|
"verdict": "excerpt"
|
|
556
556
|
},
|
|
557
557
|
{
|
|
@@ -607,7 +607,7 @@
|
|
|
607
607
|
"title": "A sheet above the virtual keyboard",
|
|
608
608
|
"note": "On a phone the keyboard shrinks the visual viewport and leaves fixed layers under the keys. The open layer reads what the keyboard covers and recedes by it, so the sheet — and its footer — land above the keys. The button beside the scene writes the same property the binding writes, 260 pixels, to show it on a screen without one.",
|
|
609
609
|
"language": "tsx",
|
|
610
|
-
"source": "<Drawer side=\"bottom\">\n <DrawerPanel>\n <DrawerHeader>\n <DrawerTitle>
|
|
610
|
+
"source": "<Drawer side=\"bottom\">\n <DrawerPanel>\n <DrawerHeader>\n <DrawerTitle>Send reminder</DrawerTitle>\n </DrawerHeader>\n <DrawerBody>\n <TextField aria-label=\"Note to the customer\" />\n </DrawerBody>\n <DrawerFooter>…</DrawerFooter>\n </DrawerPanel>\n</Drawer>;\n",
|
|
611
611
|
"verdict": "excerpt"
|
|
612
612
|
},
|
|
613
613
|
{
|
|
@@ -615,7 +615,7 @@
|
|
|
615
615
|
"title": "A drawer the page behind can still be used",
|
|
616
616
|
"note": "modal={false} writes no aria-modal, makes nothing inert, locks no scroll and contains no focus. The APG warns that marking a container modal without doing all four is worse for a screen-reader reader than not marking it at all.",
|
|
617
617
|
"language": "tsx",
|
|
618
|
-
"source": "<Drawer modal={false}>\n <DrawerTrigger>
|
|
618
|
+
"source": "<Drawer modal={false}>\n <DrawerTrigger>Order details</DrawerTrigger>\n <DrawerPanel>…</DrawerPanel>\n</Drawer>;\n",
|
|
619
619
|
"verdict": "excerpt"
|
|
620
620
|
},
|
|
621
621
|
{
|
|
@@ -655,7 +655,7 @@
|
|
|
655
655
|
"title": "Content the family did not choose",
|
|
656
656
|
"note": "A ninety-character token in a title breaks rather than widening the panel, and a body longer than the layer scrolls while the actions hold still. Radix, MUI and Angular Material ship no layout, so a footer past the fold is the default of following any of them.",
|
|
657
657
|
"language": "tsx",
|
|
658
|
-
"source": "<DrawerPanel>\n <DrawerHeader>\n <DrawerTitle>{fileName}</DrawerTitle>\n </DrawerHeader>\n <DrawerBody>{longText}</DrawerBody>\n <DrawerFooter>\n <Button>
|
|
658
|
+
"source": "<DrawerPanel>\n <DrawerHeader>\n <DrawerTitle>{fileName}</DrawerTitle>\n </DrawerHeader>\n <DrawerBody>{longText}</DrawerBody>\n <DrawerFooter>\n <Button>Save</Button>\n </DrawerFooter>\n</DrawerPanel>;\n",
|
|
659
659
|
"verdict": "excerpt"
|
|
660
660
|
},
|
|
661
661
|
{
|
|
@@ -663,7 +663,7 @@
|
|
|
663
663
|
"title": "The parts are the consumer’s own elements",
|
|
664
664
|
"note": "render hands each part every attribute the family wrote, so the trigger is the library’s Button and an inline panel is a nav — nothing is reimplemented and nothing is wrapped. An empty list inside the body is result-state, which owns that question.",
|
|
665
665
|
"language": "tsx",
|
|
666
|
-
"source": "<DrawerTrigger render={(props) => <Button {...props} variant=\"outline\" />}>
|
|
666
|
+
"source": "<DrawerTrigger render={(props) => <Button {...props} variant=\"outline\" />}>Open</DrawerTrigger>;\n\n<DrawerPanel render={(props) => <nav {...props} aria-label=\"Sections\" />}>…</DrawerPanel>;\n",
|
|
667
667
|
"verdict": "excerpt"
|
|
668
668
|
},
|
|
669
669
|
{
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
"title": "What a reader hears, and what they can reach",
|
|
680
680
|
"note": "The title names the panel and the separator; the trigger says expanded in both modes and haspopup in one. Tab wraps inside a modal panel, and the closed panel of an inline drawer is inert so the collapse the eye reads and the tab order agree.",
|
|
681
681
|
"language": "tsx",
|
|
682
|
-
"source": "<DrawerPanel>\n <DrawerHeader>\n <DrawerTitle>
|
|
682
|
+
"source": "<DrawerPanel>\n <DrawerHeader>\n <DrawerTitle>Collections</DrawerTitle>\n </DrawerHeader>\n <DrawerResizer />\n</DrawerPanel>;\n",
|
|
683
683
|
"verdict": "excerpt"
|
|
684
684
|
},
|
|
685
685
|
{
|
package/dist/docs/drawer.md
CHANGED
|
@@ -152,7 +152,7 @@ export default function DrawerBasic() {
|
|
|
152
152
|
| `onOpenChange` | `(open: boolean, request: DrawerChangeRequest)` | Before the drawer opens or closes, for every way it can: the trigger, the ✕, Escape, a press outside, the back gesture and the handle. The request carries value, previous, reason (pointer, keyboard, dismiss, escape, outsidePress, back or programmatic), result, the source event and cancel(), which keeps the drawer as it is. |
|
|
153
153
|
| `onOpenChangeComplete` | `(open: boolean)` | After the entrance or the exit has ended: true once the drawer is settled open, false once it has left — the moment an application that renders the drawer conditionally removes it, so the exit runs. A drawer mounted open enters from its closed style, as one opened later does. |
|
|
154
154
|
| `onExtentChange` | `(extent: number \| undefined, request: DrawerExtentRequest)` | Before the panel’s measure changes, with the reason pointer for a drag or a tap on the grip, keyboard for an arrow key, Home, End or Enter, and programmatic for a change from code. A drag of the separator fires on every pointer move and can report a value below minExtent; a bottom sheet fires once its scroll comes to rest, with the stop it rests on. undefined means the panel is back on its size step, or on the height of its content under size="content". |
|
|
155
|
-
| `onClick, onKeyDown, onPointerDown, on every part` | `the element’s own events` | Whenever the element fires them. Your handler runs first, and preventDefault() in it cancels the drawer’s own
|
|
155
|
+
| `onClick, onKeyDown, onPointerDown, on every part` | `the element’s own events` | Whenever the element fires them. Your handler runs first, and preventDefault() in it cancels the drawer’s own behavior for that event. |
|
|
156
156
|
|
|
157
157
|
## Axes and defaults
|
|
158
158
|
|
|
@@ -1008,7 +1008,7 @@
|
|
|
1008
1008
|
"title": "Composition",
|
|
1009
1009
|
"note": "renderOption adds the team after the address; renderChip adds the role to a chip; SlottedProvider says every sentence in Portuguese once.",
|
|
1010
1010
|
"language": "tsx",
|
|
1011
|
-
"source": "<SlottedProvider locale=\"pt-BR\" catalogs={{ 'pt-BR': PT_BR }}>\n <EntityPicker\n aria-label=\"
|
|
1011
|
+
"source": "<SlottedProvider locale=\"pt-BR\" catalogs={{ 'pt-BR': PT_BR }}>\n <EntityPicker\n aria-label=\"Owner\"\n messages={{ retry: 'Search again' }}\n renderOption={(person) => (\n <>\n <EntityPickerOptionLabel>{person.label}</EntityPickerOptionLabel>\n <EntityPickerOptionDescription>{person.team}</EntityPickerOptionDescription>\n </>\n )}\n source={directory}\n />\n</SlottedProvider>;\n",
|
|
1012
1012
|
"verdict": "excerpt"
|
|
1013
1013
|
}
|
|
1014
1014
|
]
|
|
@@ -382,8 +382,8 @@ Excerpt — not a complete module
|
|
|
382
382
|
```tsx
|
|
383
383
|
<SlottedProvider locale="pt-BR" catalogs={{ 'pt-BR': PT_BR }}>
|
|
384
384
|
<EntityPicker
|
|
385
|
-
aria-label="
|
|
386
|
-
messages={{ retry: '
|
|
385
|
+
aria-label="Owner"
|
|
386
|
+
messages={{ retry: 'Search again' }}
|
|
387
387
|
renderOption={(person) => (
|
|
388
388
|
<>
|
|
389
389
|
<EntityPickerOptionLabel>{person.label}</EntityPickerOptionLabel>
|
|
@@ -127,9 +127,9 @@ const events = rows.map((row) => ({
|
|
|
127
127
|
<EventCalendar events={events} timeZone={zone} />;
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
### Calendars and their
|
|
130
|
+
### Calendars and their colors
|
|
131
131
|
|
|
132
|
-
Each calendar takes a slot of the data palette in order and never cycles. The filter is a menu of checkboxes; a predicate composes a search on top.
|
|
132
|
+
Each calendar takes a slot of the data palette in order and never cycles. The filter is a menu of checkboxes; a predicate composes a search on top. Color is identity only: the calendar is also in every event’s name.
|
|
133
133
|
|
|
134
134
|
Excerpt — not a complete module
|
|
135
135
|
|
|
@@ -304,7 +304,7 @@ Excerpt — not a complete module
|
|
|
304
304
|
|
|
305
305
|
### On a phone
|
|
306
306
|
|
|
307
|
-
Below 600 pixels the month and the week draw as a list of the same days and the view does not change. With compact="keep" the grid stays: events become marks of
|
|
307
|
+
Below 600 pixels the month and the week draw as a list of the same days and the view does not change. With compact="keep" the grid stays: events become marks of color, the day is the target, and each keeps its name. At that width the “+N” panel and the detail are sheets from the bottom edge rather than popovers.
|
|
308
308
|
|
|
309
309
|
Excerpt — not a complete module
|
|
310
310
|
|
|
@@ -541,7 +541,7 @@
|
|
|
541
541
|
"type": "readonly EventCalendarCalendar[]",
|
|
542
542
|
"defaultValue": "[]",
|
|
543
543
|
"appliesTo": "EventCalendar",
|
|
544
|
-
"description": "Key, label and an optional
|
|
544
|
+
"description": "Key, label and an optional color slot 1–8"
|
|
545
545
|
},
|
|
546
546
|
{
|
|
547
547
|
"name": "date",
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
],
|
|
914
914
|
"accessibility": [
|
|
915
915
|
"No Authoring Practices pattern covers a calendar of events. The month and the week are the layout grid of the Grid pattern with the day as its cell: one cell holds the tab stop, arrows move the day, Enter goes into the day’s widgets and Escape or F2 comes back out, which is the pattern’s own answer for a cell holding several widgets.",
|
|
916
|
-
"Every event is named by its own content — its time, its title — and a visually hidden continuation of the whole range, its calendar, its status and whether it repeats. Position and
|
|
916
|
+
"Every event is named by its own content — its time, its title — and a visually hidden continuation of the whole range, its calendar, its status and whether it repeats. Position and color state nothing the words do not; a multi-day bar is heard as continuing on each day it crosses.",
|
|
917
917
|
"The title is a polite live region, so paging by key announces the new period; a chosen stretch is announced once through the shared live announcer, and a wait once when its indicator appears.",
|
|
918
918
|
"The list is not a grid: each day is a section named by its heading and every event is in the tab order, because a list read top to bottom has no second axis. Below 600 pixels the month and the week become that list, and the view the reader chose does not change.",
|
|
919
919
|
"Every move a pointer makes has a key: with an editable event focused, Alt and the arrows move it a slot or a day, and Alt with Shift moves its end. The request is announced once with the title and the new range, and focus stays on the event where it lands. A destination canDrop refuses is passed over for the next allowed one; with none in reach the event stays and the refusal is announced.",
|
|
@@ -1092,8 +1092,8 @@
|
|
|
1092
1092
|
},
|
|
1093
1093
|
{
|
|
1094
1094
|
"id": "calendars",
|
|
1095
|
-
"title": "Calendars and their
|
|
1096
|
-
"note": "Each calendar takes a slot of the data palette in order and never cycles. The filter is a menu of checkboxes; a predicate composes a search on top.
|
|
1095
|
+
"title": "Calendars and their colors",
|
|
1096
|
+
"note": "Each calendar takes a slot of the data palette in order and never cycles. The filter is a menu of checkboxes; a predicate composes a search on top. Color is identity only: the calendar is also in every event’s name.",
|
|
1097
1097
|
"language": "tsx",
|
|
1098
1098
|
"source": "<EventCalendar\n actions={<TextField aria-label=\"Search events\" onChange={search} size=\"sm\" type=\"search\" />}\n calendars={calendars}\n events={events}\n filter={(occurrence) => occurrence.event.title.toLowerCase().includes(query)}\n onVisibleCalendarsChange={setVisible}\n visibleCalendars={visible}\n/>;\n",
|
|
1099
1099
|
"verdict": "excerpt"
|
|
@@ -1173,7 +1173,7 @@
|
|
|
1173
1173
|
{
|
|
1174
1174
|
"id": "compact",
|
|
1175
1175
|
"title": "On a phone",
|
|
1176
|
-
"note": "Below 600 pixels the month and the week draw as a list of the same days and the view does not change. With compact=\"keep\" the grid stays: events become marks of
|
|
1176
|
+
"note": "Below 600 pixels the month and the week draw as a list of the same days and the view does not change. With compact=\"keep\" the grid stays: events become marks of color, the day is the target, and each keeps its name. At that width the “+N” panel and the detail are sheets from the bottom edge rather than popovers.",
|
|
1177
1177
|
"language": "tsx",
|
|
1178
1178
|
"source": "<EventCalendar compact=\"keep\" events={events} />;\n",
|
|
1179
1179
|
"verdict": "excerpt"
|
|
@@ -95,7 +95,7 @@ Excerpt — not a complete module
|
|
|
95
95
|
| Name | Type | Default | Applies to | Description |
|
|
96
96
|
| --- | --- | --- | --- | --- |
|
|
97
97
|
| `events` | `readonly CalendarEvent[]` | — | EventCalendar | The consumer’s events; a start without a time is all-day |
|
|
98
|
-
| `calendars` | `readonly EventCalendarCalendar[]` | [] | EventCalendar | Key, label and an optional
|
|
98
|
+
| `calendars` | `readonly EventCalendarCalendar[]` | [] | EventCalendar | Key, label and an optional color slot 1–8 |
|
|
99
99
|
| `date` | `PlainDate` | — | EventCalendar | The day the calendar is on; present means controlled |
|
|
100
100
|
| `defaultDate` | `PlainDate` | today in timeZone | EventCalendar | Read once; pass it when rendering on a server |
|
|
101
101
|
| `now` | `PlainDateTime` | the clock in timeZone, ticked each minute | EventCalendar | Present means the consumer owns it: the clock is no longer read, and today and the now line follow it. A page dated by its content passes it. |
|
|
@@ -173,7 +173,7 @@ Excerpt — not a complete module
|
|
|
173
173
|
## Rules
|
|
174
174
|
|
|
175
175
|
- No Authoring Practices pattern covers a calendar of events. The month and the week are the layout grid of the Grid pattern with the day as its cell: one cell holds the tab stop, arrows move the day, Enter goes into the day’s widgets and Escape or F2 comes back out, which is the pattern’s own answer for a cell holding several widgets.
|
|
176
|
-
- Every event is named by its own content — its time, its title — and a visually hidden continuation of the whole range, its calendar, its status and whether it repeats. Position and
|
|
176
|
+
- Every event is named by its own content — its time, its title — and a visually hidden continuation of the whole range, its calendar, its status and whether it repeats. Position and color state nothing the words do not; a multi-day bar is heard as continuing on each day it crosses.
|
|
177
177
|
- The title is a polite live region, so paging by key announces the new period; a chosen stretch is announced once through the shared live announcer, and a wait once when its indicator appears.
|
|
178
178
|
- The list is not a grid: each day is a section named by its heading and every event is in the tab order, because a list read top to bottom has no second axis. Below 600 pixels the month and the week become that list, and the view the reader chose does not change.
|
|
179
179
|
- Every move a pointer makes has a key: with an editable event focused, Alt and the arrows move it a slot or a day, and Alt with Shift moves its end. The request is announced once with the title and the new range, and focus stays on the event where it lands. A destination canDrop refuses is passed over for the next allowed one; with none in reach the event stays and the refusal is announced.
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"title": "Playground",
|
|
284
284
|
"note": "A group with its legend, its help and two fields, driven by the controls below the canvas. Switch orientation to horizontal and narrow the window to see the row wrap rather than squeeze.",
|
|
285
285
|
"language": "tsx",
|
|
286
|
-
"source": "<FieldGroup>\n <FieldGroupLegend>
|
|
286
|
+
"source": "<FieldGroup>\n <FieldGroupLegend>Billing address</FieldGroupLegend>\n <FieldGroupDescription>We need it to issue the invoice.</FieldGroupDescription>\n <FieldGroupContent>\n <Field>\n <FieldLabel>Street</FieldLabel>\n <FieldControl />\n </Field>\n </FieldGroupContent>\n</FieldGroup>;\n",
|
|
287
287
|
"verdict": "excerpt"
|
|
288
288
|
},
|
|
289
289
|
{
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
"title": "A column of fields, or a row",
|
|
292
292
|
"note": "A row wraps rather than squeezing: each field keeps enough width to hold a date or a document number, and drops to the next line instead of clipping what is being typed into it.",
|
|
293
293
|
"language": "tsx",
|
|
294
|
-
"source": "<FieldGroup orientation=\"horizontal\">\n <FieldGroupLegend>
|
|
294
|
+
"source": "<FieldGroup orientation=\"horizontal\">\n <FieldGroupLegend>Contract term</FieldGroupLegend>\n <FieldGroupContent>\n <Field>…</Field>\n <Field>…</Field>\n </FieldGroupContent>\n</FieldGroup>;\n",
|
|
295
295
|
"verdict": "excerpt"
|
|
296
296
|
},
|
|
297
297
|
{
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
"title": "Disabled by the platform, invalid by the group",
|
|
300
300
|
"note": "Nothing is passed down for disabled: the browser disables every control inside a disabled fieldset. What the family adds is the muting of the words — a legend is not a control, and a section that turned off while keeping its name at full strength reads as available.",
|
|
301
301
|
"language": "tsx",
|
|
302
|
-
"source": "// The native attribute. Every control inside is disabled by the browser.\n<FieldGroup disabled>\n <FieldGroupLegend>
|
|
302
|
+
"source": "// The native attribute. Every control inside is disabled by the browser.\n<FieldGroup disabled>\n <FieldGroupLegend>Automatic payout</FieldGroupLegend>\n <FieldGroupContent>…</FieldGroupContent>\n</FieldGroup>;\n",
|
|
303
303
|
"verdict": "excerpt"
|
|
304
304
|
},
|
|
305
305
|
{
|
|
@@ -307,7 +307,7 @@
|
|
|
307
307
|
"title": "What is said about the set, before the set",
|
|
308
308
|
"note": "The description and the error come between the legend and the fields — where GOV.UK’s fieldset example puts them, and the opposite of where a single field puts its own. Both ids go on the fieldset, so a reader entering any control hears them once.",
|
|
309
309
|
"language": "tsx",
|
|
310
|
-
"source": "<FieldGroup invalid required>\n <FieldGroupLegend>
|
|
310
|
+
"source": "<FieldGroup invalid required>\n <FieldGroupLegend>Nationality</FieldGroupLegend>\n <FieldGroupDescription>Select all that apply.</FieldGroupDescription>\n <FieldGroupError>Choose at least one nationality.</FieldGroupError>\n <FieldGroupContent>…</FieldGroupContent>\n</FieldGroup>;\n",
|
|
311
311
|
"verdict": "excerpt"
|
|
312
312
|
},
|
|
313
313
|
{
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
"title": "A legend that is also the page heading",
|
|
324
324
|
"note": "GOV.UK recommends it on a page asking one question, so a reader hears the question once rather than twice. The heading keeps its own type and loses only the block break that would drop the necessity words onto a line of their own.",
|
|
325
325
|
"language": "tsx",
|
|
326
|
-
"source": "<FieldGroup required necessity=\"words\">\n <FieldGroupLegend>\n <h1>
|
|
326
|
+
"source": "<FieldGroup required necessity=\"words\">\n <FieldGroupLegend>\n <h1>What is your nationality?</h1>\n </FieldGroupLegend>\n <FieldGroupContent>…</FieldGroupContent>\n</FieldGroup>;\n",
|
|
327
327
|
"verdict": "excerpt"
|
|
328
328
|
},
|
|
329
329
|
{
|
package/dist/docs/field-group.md
CHANGED
|
@@ -21,11 +21,11 @@ Excerpt — not a complete module
|
|
|
21
21
|
|
|
22
22
|
```tsx
|
|
23
23
|
<FieldGroup>
|
|
24
|
-
<FieldGroupLegend>
|
|
25
|
-
<FieldGroupDescription>
|
|
24
|
+
<FieldGroupLegend>Billing address</FieldGroupLegend>
|
|
25
|
+
<FieldGroupDescription>We need it to issue the invoice.</FieldGroupDescription>
|
|
26
26
|
<FieldGroupContent>
|
|
27
27
|
<Field>
|
|
28
|
-
<FieldLabel>
|
|
28
|
+
<FieldLabel>Street</FieldLabel>
|
|
29
29
|
<FieldControl />
|
|
30
30
|
</Field>
|
|
31
31
|
</FieldGroupContent>
|
|
@@ -97,7 +97,7 @@ Excerpt — not a complete module
|
|
|
97
97
|
|
|
98
98
|
```tsx
|
|
99
99
|
<FieldGroup orientation="horizontal">
|
|
100
|
-
<FieldGroupLegend>
|
|
100
|
+
<FieldGroupLegend>Contract term</FieldGroupLegend>
|
|
101
101
|
<FieldGroupContent>
|
|
102
102
|
<Field>…</Field>
|
|
103
103
|
<Field>…</Field>
|
|
@@ -114,7 +114,7 @@ Excerpt — not a complete module
|
|
|
114
114
|
```tsx
|
|
115
115
|
// The native attribute. Every control inside is disabled by the browser.
|
|
116
116
|
<FieldGroup disabled>
|
|
117
|
-
<FieldGroupLegend>
|
|
117
|
+
<FieldGroupLegend>Automatic payout</FieldGroupLegend>
|
|
118
118
|
<FieldGroupContent>…</FieldGroupContent>
|
|
119
119
|
</FieldGroup>;
|
|
120
120
|
```
|
|
@@ -127,9 +127,9 @@ Excerpt — not a complete module
|
|
|
127
127
|
|
|
128
128
|
```tsx
|
|
129
129
|
<FieldGroup invalid required>
|
|
130
|
-
<FieldGroupLegend>
|
|
131
|
-
<FieldGroupDescription>
|
|
132
|
-
<FieldGroupError>
|
|
130
|
+
<FieldGroupLegend>Nationality</FieldGroupLegend>
|
|
131
|
+
<FieldGroupDescription>Select all that apply.</FieldGroupDescription>
|
|
132
|
+
<FieldGroupError>Choose at least one nationality.</FieldGroupError>
|
|
133
133
|
<FieldGroupContent>…</FieldGroupContent>
|
|
134
134
|
</FieldGroup>;
|
|
135
135
|
```
|
|
@@ -158,7 +158,7 @@ Excerpt — not a complete module
|
|
|
158
158
|
```tsx
|
|
159
159
|
<FieldGroup required necessity="words">
|
|
160
160
|
<FieldGroupLegend>
|
|
161
|
-
<h1>
|
|
161
|
+
<h1>What is your nationality?</h1>
|
|
162
162
|
</FieldGroupLegend>
|
|
163
163
|
<FieldGroupContent>…</FieldGroupContent>
|
|
164
164
|
</FieldGroup>;
|
|
@@ -115,7 +115,7 @@ export default function FieldSizes() {
|
|
|
115
115
|
|
|
116
116
|
### The four states a field can be in
|
|
117
117
|
|
|
118
|
-
The label never turns red when the field is invalid: the error already says so in words and in
|
|
118
|
+
The label never turns red when the field is invalid: the error already says so in words and in color, and a red marker on a red label is a marker nobody can see. Read-only stays legible and focusable; disabled is muted to a measured color rather than faded.
|
|
119
119
|
|
|
120
120
|
Example
|
|
121
121
|
|
|
@@ -402,7 +402,7 @@ import { Field, FieldControl, FieldDescription, FieldLabel } from '@slotted/reac
|
|
|
402
402
|
export default function FieldCustomControl() {
|
|
403
403
|
return (
|
|
404
404
|
<Field>
|
|
405
|
-
<FieldLabel>Brand
|
|
405
|
+
<FieldLabel>Brand color</FieldLabel>
|
|
406
406
|
<FieldControl type="color" defaultValue="#2f6fde" />
|
|
407
407
|
<FieldDescription>Used on invoices and in the customer portal.</FieldDescription>
|
|
408
408
|
</Field>
|
|
@@ -455,7 +455,7 @@ export default function FieldHelpExample() {
|
|
|
455
455
|
<Stack gap={5}>
|
|
456
456
|
<Field required>
|
|
457
457
|
<FieldHeader>
|
|
458
|
-
<FieldLabel>Cost
|
|
458
|
+
<FieldLabel>Cost center</FieldLabel>
|
|
459
459
|
<FieldHelp>
|
|
460
460
|
The four-digit code finance assigns to your team. It appears on every invoice line.
|
|
461
461
|
</FieldHelp>
|
package/dist/docs/field.json
CHANGED
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"type": "boolean",
|
|
183
183
|
"defaultValue": "—",
|
|
184
184
|
"appliesTo": "Field, FieldCounter",
|
|
185
|
-
"description": "On Field: unset rather than false; writes aria-invalid on the control and data-invalid on the field, and leaves the label’s
|
|
185
|
+
"description": "On Field: unset rather than false; writes aria-invalid on the control and data-invalid on the field, and leaves the label’s color unchanged. On FieldCounter: the count has passed its limit, which can happen before validation runs, so it is the counter’s own state and defaults to false."
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
"name": "disabled",
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
{
|
|
431
431
|
"id": "states",
|
|
432
432
|
"title": "The four states a field can be in",
|
|
433
|
-
"note": "The label never turns red when the field is invalid: the error already says so in words and in
|
|
433
|
+
"note": "The label never turns red when the field is invalid: the error already says so in words and in color, and a red marker on a red label is a marker nobody can see. Read-only stays legible and focusable; disabled is muted to a measured color rather than faded.",
|
|
434
434
|
"language": "tsx",
|
|
435
435
|
"source": "import { Field, FieldDescription, FieldError, FieldLabel } from '@slotted/react/field';\nimport { Stack } from '@slotted/react/stack';\nimport { TextField } from '@slotted/react/text-field';\n\nexport default function FieldStates() {\n return (\n <Stack gap={5}>\n <Field invalid required>\n <FieldLabel>Card number</FieldLabel>\n <TextField inputMode=\"numeric\" defaultValue=\"4242 4242 42\" />\n <FieldError>Six digits are missing.</FieldError>\n </Field>\n <Field readOnly>\n <FieldLabel>Account ID</FieldLabel>\n <TextField defaultValue=\"acct_9f2c41\" />\n <FieldDescription>Quote this ID when you contact support.</FieldDescription>\n </Field>\n <Field disabled>\n <FieldLabel>Workspace URL</FieldLabel>\n <TextField defaultValue=\"northwind.slotted.app\" />\n <FieldDescription>Only the workspace owner can change the URL.</FieldDescription>\n </Field>\n </Stack>\n );\n}\n",
|
|
436
436
|
"verdict": "example"
|
|
@@ -504,7 +504,7 @@
|
|
|
504
504
|
"title": "custom-control.tsx",
|
|
505
505
|
"note": null,
|
|
506
506
|
"language": "tsx",
|
|
507
|
-
"source": "import { Field, FieldControl, FieldDescription, FieldLabel } from '@slotted/react/field';\n\nexport default function FieldCustomControl() {\n return (\n <Field>\n <FieldLabel>Brand
|
|
507
|
+
"source": "import { Field, FieldControl, FieldDescription, FieldLabel } from '@slotted/react/field';\n\nexport default function FieldCustomControl() {\n return (\n <Field>\n <FieldLabel>Brand color</FieldLabel>\n <FieldControl type=\"color\" defaultValue=\"#2f6fde\" />\n <FieldDescription>Used on invoices and in the customer portal.</FieldDescription>\n </Field>\n );\n}\n",
|
|
508
508
|
"verdict": "example"
|
|
509
509
|
},
|
|
510
510
|
{
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
"title": "help.tsx",
|
|
521
521
|
"note": null,
|
|
522
522
|
"language": "tsx",
|
|
523
|
-
"source": "import { Field, FieldHeader, FieldHelp, FieldLabel } from '@slotted/react/field';\nimport { Stack } from '@slotted/react/stack';\nimport { TextField } from '@slotted/react/text-field';\n\nexport default function FieldHelpExample() {\n return (\n <Stack gap={5}>\n <Field required>\n <FieldHeader>\n <FieldLabel>Cost
|
|
523
|
+
"source": "import { Field, FieldHeader, FieldHelp, FieldLabel } from '@slotted/react/field';\nimport { Stack } from '@slotted/react/stack';\nimport { TextField } from '@slotted/react/text-field';\n\nexport default function FieldHelpExample() {\n return (\n <Stack gap={5}>\n <Field required>\n <FieldHeader>\n <FieldLabel>Cost center</FieldLabel>\n <FieldHelp>\n The four-digit code finance assigns to your team. It appears on every invoice line.\n </FieldHelp>\n </FieldHeader>\n <TextField inputMode=\"numeric\" defaultValue=\"4120\" />\n </Field>\n <Field disabled>\n <FieldHeader>\n <FieldLabel>Billing currency</FieldLabel>\n <FieldHelp>Set when the workspace was created. Contact support to change it.</FieldHelp>\n </FieldHeader>\n <TextField defaultValue=\"USD — US dollar\" />\n </Field>\n </Stack>\n );\n}\n",
|
|
524
524
|
"verdict": "example"
|
|
525
525
|
},
|
|
526
526
|
{
|
package/dist/docs/field.md
CHANGED
|
@@ -64,7 +64,7 @@ export default function FieldBasic() {
|
|
|
64
64
|
| `width` | `'short' \| 'medium' \| 'full'` | full | Field | The longest the control stands, as a cue to the length of its answer: short (--slotted-field-width-short, 6rem) for an integer of up to four digits, medium (--slotted-field-width-medium, 15rem) for an amount, a code or a short word, full for free text, a name or a picker of records. The control still shrinks below the bound in a narrower field. |
|
|
65
65
|
| `messages` | `Partial<FieldMessages>` | — | Field | Words that replace the active language’s, key by key: the necessity words (optional, required) and the help button’s name (help). |
|
|
66
66
|
| `required` | `boolean` | — | Field | Unset rather than false. Writes aria-required on the control, never the native required, which would turn on browser constraint validation and change how the form submits. |
|
|
67
|
-
| `invalid` | `boolean` | — | Field, FieldCounter | On Field: unset rather than false; writes aria-invalid on the control and data-invalid on the field, and leaves the label’s
|
|
67
|
+
| `invalid` | `boolean` | — | Field, FieldCounter | On Field: unset rather than false; writes aria-invalid on the control and data-invalid on the field, and leaves the label’s color unchanged. On FieldCounter: the count has passed its limit, which can happen before validation runs, so it is the counter’s own state and defaults to false. |
|
|
68
68
|
| `disabled` | `boolean` | from the group, then the provider | Field, FieldDefaultsProvider | Unset rather than false, so a field follows the FieldGroup around it. A stated value wins, and it reaches the control as the native attribute. |
|
|
69
69
|
| `readOnly` | `boolean` | from the group, then the provider | Field, FieldDefaultsProvider | Unset rather than false. Reaches the control as the native readonly, which keeps the value focusable and copyable. |
|
|
70
70
|
| `id` | `string` | generated | Field | The base of every identifier the field derives: <id>-control, <id>-label, <id>-indicator, <id>-help, <id>-description, <id>-counter and <id>-error. Generated with useId when unset. |
|
package/dist/docs/form.json
CHANGED
|
@@ -316,7 +316,7 @@
|
|
|
316
316
|
"title": "Playground",
|
|
317
317
|
"note": "A form of two fields with the family’s whole lifecycle on it. Submit it empty: the platform’s own messages appear in the summary, focus moves there, and each link jumps to the field it names. Two fields written one after the other inside the form stand apart by --slotted-form-field-gap (space-6 by default), and two field groups by --slotted-form-section-gap (space-9 by default); a layout the page draws itself — a Grid, a Stack — keeps its own gap.",
|
|
318
318
|
"language": "tsx",
|
|
319
|
-
"source": "<Form onSubmit={(values) => save(values)}>\n <Field>\n <FieldLabel>Nome completo</FieldLabel>\n <TextField name=\"nome\" required />\n </Field>\n <FormActions>\n <Button type=\"submit\">
|
|
319
|
+
"source": "<Form onSubmit={(values) => save(values)}>\n <Field>\n <FieldLabel>Nome completo</FieldLabel>\n <TextField name=\"nome\" required />\n </Field>\n <FormActions>\n <Button type=\"submit\">Save</Button>\n </FormActions>\n</Form>;\n",
|
|
320
320
|
"verdict": "excerpt"
|
|
321
321
|
},
|
|
322
322
|
{
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
"title": "Submission, and the second press that does nothing",
|
|
349
349
|
"note": "A handler that returns a promise puts the form in its busy state until it settles, and a second submit while one is pending is refused — the defect a double-clicked button produces in a bare form. Returning an error map from the handler re-enters the same path a failed validation takes.",
|
|
350
350
|
"language": "tsx",
|
|
351
|
-
"source": "<Form\n onSubmit={async (values) => {\n const answer = await fetch('/
|
|
351
|
+
"source": "<Form\n onSubmit={async (values) => {\n const answer = await fetch('/orders', {\n body: new URLSearchParams(values as never),\n method: 'POST',\n });\n if (!answer.ok) return await answer.json();\n }}\n>\n …\n</Form>;\n",
|
|
352
352
|
"verdict": "excerpt"
|
|
353
353
|
},
|
|
354
354
|
{
|
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
"title": "The row the actions stand in",
|
|
357
357
|
"note": "end is the default, between pushes a destructive action away from the one beside it, and stretch shares the row. Narrow the column below 360 pixels and every alignment becomes the same column of full-width actions, primary first.",
|
|
358
358
|
"language": "tsx",
|
|
359
|
-
"source": "<FormActions>\n <Button tone=\"secondary\" type=\"button\" variant=\"ghost\">\n
|
|
359
|
+
"source": "<FormActions>\n <Button tone=\"secondary\" type=\"button\" variant=\"ghost\">\n Cancel\n </Button>\n <Button type=\"submit\">Save changes</Button>\n</FormActions>;\n\n<FormActions align=\"between\">…</FormActions>;\n",
|
|
360
360
|
"verdict": "excerpt"
|
|
361
361
|
},
|
|
362
362
|
{
|
|
@@ -364,7 +364,7 @@
|
|
|
364
364
|
"title": "Every state the family carries",
|
|
365
365
|
"note": "data-invalid while anything is wrong, data-loading and aria-busy while a submit is in flight, data-disabled when the consumer says so. The form does not dim itself while it saves: a form that hid its own values would hide what the reader is waiting on.",
|
|
366
366
|
"language": "tsx",
|
|
367
|
-
"source": "// The family's own submission, and a mutation the consumer started.\n<Form loading={mutation.isPending}>…</Form>;\n\nconst form = useFormState();\n<Button disabled={form?.submitting} type=\"submit\">\n
|
|
367
|
+
"source": "// The family's own submission, and a mutation the consumer started.\n<Form loading={mutation.isPending}>…</Form>;\n\nconst form = useFormState();\n<Button disabled={form?.submitting} type=\"submit\">\n Save\n</Button>;\n",
|
|
368
368
|
"verdict": "excerpt"
|
|
369
369
|
},
|
|
370
370
|
{
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
"title": "Eleven errors, and one for a field that is not there",
|
|
373
373
|
"note": "The list scrolls past twelve lines rather than truncating, and an error naming a control the form does not hold keeps its place without a link. Both are cases a real server produces and none of the surveyed implementations answers.",
|
|
374
374
|
"language": "tsx",
|
|
375
|
-
"source": "<Form errors={{
|
|
375
|
+
"source": "<Form errors={{ coupon: 'The coupon provided has expired', email: 'Invalid address' }}>\n <Field>\n <FieldLabel>Email</FieldLabel>\n <TextField name=\"email\" />\n </Field>\n</Form>;\n",
|
|
376
376
|
"verdict": "excerpt"
|
|
377
377
|
},
|
|
378
378
|
{
|
|
@@ -388,7 +388,7 @@
|
|
|
388
388
|
"title": "What a reader hears, and where focus goes",
|
|
389
389
|
"note": "Tab into the form, submit it empty, and follow what happens: the region announces itself, takes focus, and each link moves focus to the control it names without changing the address bar. Every message in the summary is the same string the field shows.",
|
|
390
390
|
"language": "tsx",
|
|
391
|
-
"source": "<Form errors={{ email: '
|
|
391
|
+
"source": "<Form errors={{ email: 'The address must contain an at sign' }}>\n <Field invalid>\n <FieldLabel>Email</FieldLabel>\n <TextField name=\"email\" />\n <FieldError>The address must contain an at sign</FieldError>\n </Field>\n</Form>;\n",
|
|
392
392
|
"verdict": "excerpt"
|
|
393
393
|
}
|
|
394
394
|
]
|
package/dist/docs/form.md
CHANGED
|
@@ -20,7 +20,7 @@ Excerpt — not a complete module
|
|
|
20
20
|
<TextField name="nome" required />
|
|
21
21
|
</Field>
|
|
22
22
|
<FormActions>
|
|
23
|
-
<Button type="submit">
|
|
23
|
+
<Button type="submit">Save</Button>
|
|
24
24
|
</FormActions>
|
|
25
25
|
</Form>;
|
|
26
26
|
```
|
|
@@ -149,7 +149,7 @@ Excerpt — not a complete module
|
|
|
149
149
|
```tsx
|
|
150
150
|
<Form
|
|
151
151
|
onSubmit={async (values) => {
|
|
152
|
-
const answer = await fetch('/
|
|
152
|
+
const answer = await fetch('/orders', {
|
|
153
153
|
body: new URLSearchParams(values as never),
|
|
154
154
|
method: 'POST',
|
|
155
155
|
});
|
|
@@ -169,9 +169,9 @@ Excerpt — not a complete module
|
|
|
169
169
|
```tsx
|
|
170
170
|
<FormActions>
|
|
171
171
|
<Button tone="secondary" type="button" variant="ghost">
|
|
172
|
-
|
|
172
|
+
Cancel
|
|
173
173
|
</Button>
|
|
174
|
-
<Button type="submit">
|
|
174
|
+
<Button type="submit">Save changes</Button>
|
|
175
175
|
</FormActions>;
|
|
176
176
|
|
|
177
177
|
<FormActions align="between">…</FormActions>;
|
|
@@ -189,7 +189,7 @@ Excerpt — not a complete module
|
|
|
189
189
|
|
|
190
190
|
const form = useFormState();
|
|
191
191
|
<Button disabled={form?.submitting} type="submit">
|
|
192
|
-
|
|
192
|
+
Save
|
|
193
193
|
</Button>;
|
|
194
194
|
```
|
|
195
195
|
|
|
@@ -200,9 +200,9 @@ The list scrolls past twelve lines rather than truncating, and an error naming a
|
|
|
200
200
|
Excerpt — not a complete module
|
|
201
201
|
|
|
202
202
|
```tsx
|
|
203
|
-
<Form errors={{
|
|
203
|
+
<Form errors={{ coupon: 'The coupon provided has expired', email: 'Invalid address' }}>
|
|
204
204
|
<Field>
|
|
205
|
-
<FieldLabel>
|
|
205
|
+
<FieldLabel>Email</FieldLabel>
|
|
206
206
|
<TextField name="email" />
|
|
207
207
|
</Field>
|
|
208
208
|
</Form>;
|
|
@@ -231,11 +231,11 @@ Tab into the form, submit it empty, and follow what happens: the region announce
|
|
|
231
231
|
Excerpt — not a complete module
|
|
232
232
|
|
|
233
233
|
```tsx
|
|
234
|
-
<Form errors={{ email: '
|
|
234
|
+
<Form errors={{ email: 'The address must contain an at sign' }}>
|
|
235
235
|
<Field invalid>
|
|
236
|
-
<FieldLabel>
|
|
236
|
+
<FieldLabel>Email</FieldLabel>
|
|
237
237
|
<TextField name="email" />
|
|
238
|
-
<FieldError>
|
|
238
|
+
<FieldError>The address must contain an at sign</FieldError>
|
|
239
239
|
</Field>
|
|
240
240
|
</Form>;
|
|
241
241
|
```
|