@slotted/react 0.1.0-beta.39 → 0.1.0-beta.40
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/alert-CV8wKS-N.js +179 -0
- package/dist/alert.js +1 -1
- package/dist/{avatar-DLWElrgg.js → avatar-fHRva5zn.js} +1 -1
- package/dist/{avatar-group-DshHqe8B.js → avatar-group-bJaZE1_C.js} +1 -1
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/calendar-D3QZDlm0.js +598 -0
- package/dist/calendar.js +1 -1
- package/dist/clock-DzkQa57Q.js +290 -0
- package/dist/clock.js +2 -0
- package/dist/{dashboard-grid-B6jxBz4j.js → dashboard-grid-DAY_CjCW.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-Cx0ZOf_e.js → data-grid-B7UuUvBH.js} +42 -37
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-Cb2sNA6I.js → data-list-CyEq7M2D.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/date-picker-DMcMFW_N.js +344 -0
- package/dist/date-picker.js +3 -2
- package/dist/date-range-picker-D9zo93NE.js +543 -0
- package/dist/date-range-picker.js +2 -2
- package/dist/datetime-picker-lOXZbAx_.js +462 -0
- package/dist/datetime-picker.js +2 -2
- package/dist/datetime-range-picker-DU5ctZbm.js +641 -0
- package/dist/datetime-range-picker.js +2 -2
- package/dist/divider-DUUPCIh4.js +35 -0
- package/dist/divider.js +1 -1
- package/dist/docs/alert.examples.md +500 -0
- package/dist/docs/alert.json +85 -37
- package/dist/docs/alert.md +37 -189
- package/dist/docs/aspect-ratio.json +40 -16
- package/dist/docs/aspect-ratio.md +204 -29
- package/dist/docs/avatar.json +125 -29
- package/dist/docs/avatar.md +374 -31
- package/dist/docs/badge.json +119 -23
- package/dist/docs/badge.md +436 -27
- package/dist/docs/calendar.json +53 -5
- package/dist/docs/calendar.md +7 -2
- package/dist/docs/card.json +98 -10
- package/dist/docs/card.md +468 -26
- package/dist/docs/clock.json +405 -0
- package/dist/docs/clock.md +189 -0
- package/dist/docs/container.json +54 -6
- package/dist/docs/container.md +247 -17
- package/dist/docs/date-picker.examples.md +143 -169
- package/dist/docs/date-picker.json +178 -223
- package/dist/docs/date-picker.md +44 -50
- package/dist/docs/date-range-picker.examples.md +169 -187
- package/dist/docs/date-range-picker.json +206 -337
- package/dist/docs/date-range-picker.md +52 -67
- package/dist/docs/datetime-picker.examples.md +75 -210
- package/dist/docs/datetime-picker.json +183 -410
- package/dist/docs/datetime-picker.md +50 -72
- package/dist/docs/datetime-range-picker.json +225 -502
- package/dist/docs/datetime-range-picker.md +250 -101
- package/dist/docs/divider.json +71 -7
- package/dist/docs/divider.md +281 -13
- package/dist/docs/grid.json +76 -12
- package/dist/docs/grid.md +376 -18
- package/dist/docs/index.md +1 -0
- package/dist/docs/inline-message.json +87 -40
- package/dist/docs/inline-message.md +314 -71
- package/dist/docs/inline.json +65 -9
- package/dist/docs/inline.md +276 -13
- package/dist/docs/kbd.json +76 -36
- package/dist/docs/kbd.md +346 -63
- package/dist/docs/link.json +65 -25
- package/dist/docs/link.md +317 -60
- package/dist/docs/progress-indicator.examples.md +522 -0
- package/dist/docs/progress-indicator.json +51 -27
- package/dist/docs/progress-indicator.md +13 -238
- package/dist/docs/result-state.examples.md +752 -0
- package/dist/docs/result-state.json +95 -47
- package/dist/docs/result-state.md +45 -228
- package/dist/docs/skeleton.json +70 -38
- package/dist/docs/skeleton.md +393 -71
- package/dist/docs/stack.json +57 -9
- package/dist/docs/stack.md +225 -12
- package/dist/docs/table.examples.md +6 -10
- package/dist/docs/table.json +5 -5
- package/dist/docs/table.md +1 -1
- package/dist/docs/tag.examples.md +503 -0
- package/dist/docs/tag.json +128 -32
- package/dist/docs/tag.md +27 -138
- package/dist/docs/time-picker.json +162 -300
- package/dist/docs/time-picker.md +100 -154
- package/dist/docs/time-range-picker.json +203 -465
- package/dist/docs/time-range-picker.md +125 -173
- package/dist/docs/toast.examples.md +690 -0
- package/dist/docs/toast.json +119 -71
- package/dist/docs/toast.md +44 -212
- package/dist/docs/tree.examples.md +2008 -0
- package/dist/docs/tree.json +283 -106
- package/dist/docs/tree.md +96 -328
- package/dist/docs/visually-hidden.json +38 -6
- package/dist/docs/visually-hidden.md +148 -11
- package/dist/{entity-picker-CwfA1wr_.js → entity-picker-BwJX0gNJ.js} +1 -1
- package/dist/entity-picker.js +1 -1
- package/dist/{filter-bar-b8bRNPs9.js → filter-bar-BQZFgV0A.js} +5 -3
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-C_oNc-RM.js → import-export-center-DWSEOV5Z.js} +3 -3
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +101 -99
- package/dist/{markdown-x59MHBAa.js → markdown-7wOBMXTl.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/picker-frame-_9ZqQOjf.js +43 -0
- package/dist/picker-group-CrNRKUxz.js +33 -0
- package/dist/picker-head-C_Z0tQGq.js +69 -0
- package/dist/picker-jump-BcTRIJs6.js +70 -0
- package/dist/picker-range-head-B4tsDOc5.js +100 -0
- package/dist/picker-step-MgBwF9g1.js +26 -0
- package/dist/read-title-id-DQZVWlMt.js +14 -0
- package/dist/result-state-Ct9AB01a.js +123 -0
- package/dist/result-state.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/aspect-ratio.css +1 -1
- package/dist/styles/attachment.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/cascader.css +1 -1
- package/dist/styles/chart.css +1 -1
- package/dist/styles/clock.css +2 -0
- package/dist/styles/code-block.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/dashboard-grid.css +1 -1
- package/dist/styles/data-grid.css +14 -10
- package/dist/styles/data-list.css +1 -1
- package/dist/styles/date-picker.css +4 -2
- package/dist/styles/date-range-picker.css +4 -2
- package/dist/styles/datetime-picker.css +8 -2
- package/dist/styles/datetime-range-picker.css +6 -2
- package/dist/styles/detail-panel.css +3 -3
- package/dist/styles/entity-picker.css +1 -1
- package/dist/styles/event-calendar.css +1 -1
- package/dist/styles/filter-bar.css +11 -7
- package/dist/styles/grid.css +1 -1
- package/dist/styles/image.css +1 -1
- package/dist/styles/import-export-center.css +15 -11
- package/dist/styles/index.css +21 -17
- package/dist/styles/inline.css +1 -1
- package/dist/styles/loading-overlay.css +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/page-header.css +2 -2
- package/dist/styles/progress-indicator.css +1 -1
- package/dist/styles/side-navigation.css +2 -2
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/stack.css +1 -1
- package/dist/styles/stat-card.css +1 -1
- package/dist/styles/table-of-contents.css +1 -1
- package/dist/styles/table.css +14 -10
- package/dist/styles/time-picker.css +5 -1
- package/dist/styles/time-range-picker.css +5 -1
- package/dist/styles/toast.css +1 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles/tree.css +1 -1
- package/dist/styles/upload.css +1 -1
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-DqwYPHGS.js → table-MGb3iZY_.js} +11 -6
- package/dist/table.js +1 -1
- package/dist/time-picker-z4GSRuha.js +313 -0
- package/dist/time-picker.js +2 -2
- package/dist/time-range-picker-ar40oPcf.js +563 -0
- package/dist/time-range-picker.js +2 -2
- package/dist/{toast-DHDVXIew.js → toast-Cg28GkqX.js} +121 -117
- package/dist/toast.js +1 -1
- package/dist/tree-CytfCFT-.js +874 -0
- package/dist/tree.js +1 -1
- package/dist/types/alert/alert-parts.d.ts +1 -1
- package/dist/types/alert/alert-parts.d.ts.map +1 -1
- package/dist/types/alert/alert.d.ts.map +1 -1
- package/dist/types/alert/alert.types.d.ts +1 -1
- package/dist/types/alert/alert.types.d.ts.map +1 -1
- package/dist/types/avatar/avatar.d.ts.map +1 -1
- package/dist/types/badge/badge.types.d.ts +1 -1
- package/dist/types/badge/badge.types.d.ts.map +1 -1
- package/dist/types/calendar/calendar-day-cell.d.ts +3 -1
- package/dist/types/calendar/calendar-day-cell.d.ts.map +1 -1
- package/dist/types/calendar/calendar-header.d.ts +9 -5
- package/dist/types/calendar/calendar-header.d.ts.map +1 -1
- package/dist/types/calendar/calendar-month-table.d.ts +8 -3
- package/dist/types/calendar/calendar-month-table.d.ts.map +1 -1
- package/dist/types/calendar/calendar.d.ts +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +12 -1
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/clock/clock-body.d.ts +16 -0
- package/dist/types/clock/clock-body.d.ts.map +1 -0
- package/dist/types/clock/clock-demo.d.ts +15 -0
- package/dist/types/clock/clock-demo.d.ts.map +1 -0
- package/dist/types/clock/clock-groups.d.ts +15 -0
- package/dist/types/clock/clock-groups.d.ts.map +1 -0
- package/dist/types/clock/clock-option.d.ts +14 -0
- package/dist/types/clock/clock-option.d.ts.map +1 -0
- package/dist/types/clock/clock-units.d.ts +13 -0
- package/dist/types/clock/clock-units.d.ts.map +1 -0
- package/dist/types/clock/clock.d.ts +11 -0
- package/dist/types/clock/clock.d.ts.map +1 -0
- package/dist/types/clock/clock.types.d.ts +66 -0
- package/dist/types/clock/clock.types.d.ts.map +1 -0
- package/dist/types/clock/index.d.ts +3 -0
- package/dist/types/clock/index.d.ts.map +1 -0
- package/dist/types/clock/use-clock-grid.d.ts +28 -0
- package/dist/types/clock/use-clock-grid.d.ts.map +1 -0
- package/dist/types/clock/use-clock-view.d.ts +16 -0
- package/dist/types/clock/use-clock-view.d.ts.map +1 -0
- package/dist/types/data-grid/data-grid-filter.d.ts.map +1 -1
- package/dist/types/date-picker/date-panel.d.ts +32 -0
- package/dist/types/date-picker/date-panel.d.ts.map +1 -0
- package/dist/types/date-picker/date-picker-demo.d.ts +8 -15
- package/dist/types/date-picker/date-picker-demo.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker-panel.d.ts +18 -0
- package/dist/types/date-picker/date-picker-panel.d.ts.map +1 -0
- package/dist/types/date-picker/date-picker.d.ts +7 -13
- package/dist/types/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.types.d.ts +15 -16
- package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
- package/dist/types/date-picker/index.d.ts +1 -1
- package/dist/types/date-picker/index.d.ts.map +1 -1
- package/dist/types/date-picker/month-picker.d.ts +12 -0
- package/dist/types/date-picker/month-picker.d.ts.map +1 -0
- package/dist/types/date-picker/use-date-panel.d.ts +50 -0
- package/dist/types/date-picker/use-date-panel.d.ts.map +1 -0
- package/dist/types/date-picker/use-date-picker.d.ts +24 -0
- package/dist/types/date-picker/use-date-picker.d.ts.map +1 -0
- package/dist/types/date-range-picker/date-range-control.d.ts +34 -0
- package/dist/types/date-range-picker/date-range-control.d.ts.map +1 -0
- package/dist/types/date-range-picker/date-range-panel.d.ts +24 -0
- package/dist/types/date-range-picker/date-range-panel.d.ts.map +1 -0
- package/dist/types/date-range-picker/date-range-picker-demo.d.ts +8 -15
- package/dist/types/date-range-picker/date-range-picker-demo.d.ts.map +1 -1
- package/dist/types/date-range-picker/date-range-picker.d.ts +11 -21
- package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/types/date-range-picker/date-range-picker.types.d.ts +12 -26
- package/dist/types/date-range-picker/date-range-picker.types.d.ts.map +1 -1
- package/dist/types/date-range-picker/index.d.ts +2 -2
- package/dist/types/date-range-picker/index.d.ts.map +1 -1
- package/dist/types/date-range-picker/range-words.d.ts +30 -0
- package/dist/types/date-range-picker/range-words.d.ts.map +1 -0
- package/dist/types/date-range-picker/use-date-range-picker.d.ts +32 -0
- package/dist/types/date-range-picker/use-date-range-picker.d.ts.map +1 -0
- package/dist/types/date-range-picker/use-range-draft.d.ts +39 -0
- package/dist/types/date-range-picker/use-range-draft.d.ts.map +1 -0
- package/dist/types/date-range-picker/use-range-panel.d.ts +71 -0
- package/dist/types/date-range-picker/use-range-panel.d.ts.map +1 -0
- package/dist/types/datetime-picker/datetime-picker-defaults.d.ts +3 -9
- package/dist/types/datetime-picker/datetime-picker-defaults.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker-demo.d.ts +8 -31
- package/dist/types/datetime-picker/datetime-picker-demo.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker-panel.d.ts +23 -0
- package/dist/types/datetime-picker/datetime-picker-panel.d.ts.map +1 -0
- package/dist/types/datetime-picker/datetime-picker.d.ts +8 -19
- package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker.types.d.ts +25 -66
- package/dist/types/datetime-picker/datetime-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-picker/index.d.ts +2 -2
- package/dist/types/datetime-picker/index.d.ts.map +1 -1
- package/dist/types/datetime-picker/use-datetime-panel.d.ts +69 -0
- package/dist/types/datetime-picker/use-datetime-panel.d.ts.map +1 -0
- package/dist/types/datetime-picker/use-datetime-picker.d.ts +22 -0
- package/dist/types/datetime-picker/use-datetime-picker.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/datetime-range-half.d.ts +20 -0
- package/dist/types/datetime-range-picker/datetime-range-half.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/datetime-range-panel.d.ts +30 -0
- package/dist/types/datetime-range-picker/datetime-range-panel.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/datetime-range-picker-defaults.d.ts +5 -7
- package/dist/types/datetime-range-picker/datetime-range-picker-defaults.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker-demo.d.ts +8 -24
- package/dist/types/datetime-range-picker/datetime-range-picker-demo.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker.d.ts +12 -24
- package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts +31 -66
- package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-words.d.ts +40 -0
- package/dist/types/datetime-range-picker/datetime-range-words.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/index.d.ts +4 -3
- package/dist/types/datetime-range-picker/index.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/use-datetime-range-draft.d.ts +43 -0
- package/dist/types/datetime-range-picker/use-datetime-range-draft.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/use-datetime-range-panel.d.ts +82 -0
- package/dist/types/datetime-range-picker/use-datetime-range-panel.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts +28 -0
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts.map +1 -0
- package/dist/types/divider/divider.d.ts +1 -1
- package/dist/types/divider/divider.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar-rules.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/picker-panel/picker-footer.d.ts +17 -0
- package/dist/types/picker-panel/picker-footer.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-frame.d.ts +21 -0
- package/dist/types/picker-panel/picker-frame.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-group.d.ts +18 -0
- package/dist/types/picker-panel/picker-group.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-head.d.ts +27 -0
- package/dist/types/picker-panel/picker-head.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-jump.d.ts +18 -0
- package/dist/types/picker-panel/picker-jump.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-layer.d.ts +14 -0
- package/dist/types/picker-panel/picker-layer.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-panel.d.ts +17 -0
- package/dist/types/picker-panel/picker-panel.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-rail.d.ts +17 -0
- package/dist/types/picker-panel/picker-rail.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-range-head.d.ts +37 -0
- package/dist/types/picker-panel/picker-range-head.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-ruler.d.ts +14 -0
- package/dist/types/picker-panel/picker-ruler.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-step.d.ts +11 -0
- package/dist/types/picker-panel/picker-step.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-trigger.d.ts +16 -0
- package/dist/types/picker-panel/picker-trigger.d.ts.map +1 -0
- package/dist/types/picker-panel/use-media-query.d.ts +3 -0
- package/dist/types/picker-panel/use-media-query.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-draft.d.ts +18 -0
- package/dist/types/picker-panel/use-picker-draft.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-layer.d.ts +31 -0
- package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-open.d.ts +14 -0
- package/dist/types/picker-panel/use-picker-open.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-position.d.ts +12 -0
- package/dist/types/picker-panel/use-picker-position.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-value.d.ts +20 -0
- package/dist/types/picker-panel/use-picker-value.d.ts.map +1 -0
- package/dist/types/result-state/result-state.d.ts +32 -2
- package/dist/types/result-state/result-state.d.ts.map +1 -1
- package/dist/types/table/table-filter.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +16 -14
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/types/tag/tag.types.d.ts +1 -1
- package/dist/types/tag/tag.types.d.ts.map +1 -1
- package/dist/types/time-picker/index.d.ts +2 -2
- package/dist/types/time-picker/index.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker-defaults.d.ts +0 -7
- package/dist/types/time-picker/time-picker-defaults.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker-demo.d.ts +15 -0
- package/dist/types/time-picker/time-picker-demo.d.ts.map +1 -0
- package/dist/types/time-picker/time-picker-panel.d.ts +17 -0
- package/dist/types/time-picker/time-picker-panel.d.ts.map +1 -0
- package/dist/types/time-picker/time-picker.d.ts +6 -14
- package/dist/types/time-picker/time-picker.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker.types.d.ts +21 -45
- package/dist/types/time-picker/time-picker.types.d.ts.map +1 -1
- package/dist/types/time-picker/use-time-panel.d.ts +42 -0
- package/dist/types/time-picker/use-time-panel.d.ts.map +1 -0
- package/dist/types/time-picker/use-time-picker.d.ts +27 -0
- package/dist/types/time-picker/use-time-picker.d.ts.map +1 -0
- package/dist/types/time-range-picker/index.d.ts +4 -3
- package/dist/types/time-range-picker/index.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-panel.d.ts +23 -0
- package/dist/types/time-range-picker/time-range-panel.d.ts.map +1 -0
- package/dist/types/time-range-picker/time-range-picker-defaults.d.ts +2 -4
- package/dist/types/time-range-picker/time-range-picker-defaults.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker-demo.d.ts +8 -24
- package/dist/types/time-range-picker/time-range-picker-demo.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.d.ts +12 -28
- package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.types.d.ts +24 -64
- package/dist/types/time-range-picker/time-range-picker.types.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-words.d.ts +37 -0
- package/dist/types/time-range-picker/time-range-words.d.ts.map +1 -0
- package/dist/types/time-range-picker/use-time-range-panel.d.ts +68 -0
- package/dist/types/time-range-picker/use-time-range-panel.d.ts.map +1 -0
- package/dist/types/time-range-picker/use-time-range-picker.d.ts +25 -0
- package/dist/types/time-range-picker/use-time-range-picker.d.ts.map +1 -0
- package/dist/types/title-id/read-title-id.d.ts +15 -0
- package/dist/types/title-id/read-title-id.d.ts.map +1 -0
- package/dist/types/toast/toast.d.ts.map +1 -1
- package/dist/types/tree/index.d.ts +1 -1
- package/dist/types/tree/index.d.ts.map +1 -1
- package/dist/types/tree/tree-parts.d.ts +2 -0
- package/dist/types/tree/tree-parts.d.ts.map +1 -1
- package/dist/types/tree/tree.d.ts +1 -1
- package/dist/types/tree/tree.d.ts.map +1 -1
- package/dist/types/tree/tree.types.d.ts +15 -5
- package/dist/types/tree/tree.types.d.ts.map +1 -1
- package/dist/use-date-picker-DL8tRXji.js +63 -0
- package/dist/use-picker-draft-Bw8VFaj0.js +377 -0
- package/dist/{wizard-CL6u1aJb.js → wizard-BokOrtwq.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +10 -6
- package/dist/alert-Bi9s1cjV.js +0 -174
- package/dist/calendar-CX0wN5Bh.js +0 -564
- package/dist/date-picker-CLXTtQGe.js +0 -337
- package/dist/date-range-picker-Br0neGyT.js +0 -522
- package/dist/datetime-picker-CR-H_BLu.js +0 -683
- package/dist/datetime-range-picker-BLo58OIk.js +0 -1050
- package/dist/divider-ryFeK0Pi.js +0 -35
- package/dist/docs/datetime-range-picker.examples.md +0 -219
- package/dist/result-state-BMYhelu1.js +0 -128
- package/dist/time-picker-B4-GsO24.js +0 -436
- package/dist/time-range-picker-DVOWN8PF.js +0 -800
- package/dist/tree-D-y-0TrL.js +0 -794
package/dist/docs/toast.json
CHANGED
|
@@ -124,61 +124,61 @@
|
|
|
124
124
|
"part": "root",
|
|
125
125
|
"element": "section",
|
|
126
126
|
"required": true,
|
|
127
|
-
"purpose": "The region.
|
|
127
|
+
"purpose": "The region. It is a landmark with a name, and it carries the placement, the attachment and the stacking. It is never a live region."
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"part": "list",
|
|
131
131
|
"element": "ol",
|
|
132
132
|
"required": true,
|
|
133
|
-
"purpose": "The
|
|
133
|
+
"purpose": "The messages in order, newest first."
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"part": "item",
|
|
137
137
|
"element": "li",
|
|
138
138
|
"required": false,
|
|
139
|
-
"purpose": "One message.
|
|
139
|
+
"purpose": "One message. It carries the tone, the variant and its states, and the hotkey moves focus to it."
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
"part": "icon",
|
|
143
143
|
"element": "span",
|
|
144
144
|
"required": false,
|
|
145
|
-
"purpose": "The
|
|
145
|
+
"purpose": "The mark of the tone, hidden from assistive technology. While the message is loading it holds a loader."
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"part": "content",
|
|
149
149
|
"element": "div",
|
|
150
150
|
"required": false,
|
|
151
|
-
"purpose": "The title and the description
|
|
151
|
+
"purpose": "The title and the description. A long string wraps inside it."
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
"part": "title",
|
|
155
155
|
"element": "div, or the element render returns",
|
|
156
156
|
"required": false,
|
|
157
|
-
"purpose": "The message
|
|
157
|
+
"purpose": "The name of the message. It is not a heading, because a message is not a section of the page."
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
"part": "description",
|
|
161
161
|
"element": "p, or the element render returns",
|
|
162
162
|
"required": false,
|
|
163
|
-
"purpose": "The message.
|
|
163
|
+
"purpose": "The text of the message. A string without spaces breaks instead of overflowing."
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
"part": "actions",
|
|
167
167
|
"element": "div",
|
|
168
168
|
"required": false,
|
|
169
|
-
"purpose": "The controls that act on the message, under
|
|
169
|
+
"purpose": "The controls that act on the message, under its text. They stack when the region is narrower than 20rem."
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
"part": "close",
|
|
173
173
|
"element": "button",
|
|
174
174
|
"required": false,
|
|
175
|
-
"purpose": "
|
|
175
|
+
"purpose": "The button that dismisses the message. It is present while the message is dismissible, and its target holds the minimum pointer size at every density."
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
"part": "progress",
|
|
179
179
|
"element": "div",
|
|
180
180
|
"required": false,
|
|
181
|
-
"purpose": "How much of the duration is left. It
|
|
181
|
+
"purpose": "How much of the duration is left. It stops with the timer, and under reduced motion it is a static rule."
|
|
182
182
|
}
|
|
183
183
|
],
|
|
184
184
|
"api": [
|
|
@@ -187,182 +187,182 @@
|
|
|
187
187
|
"type": "'top-start' | 'top' | 'top-end' | 'bottom-start' | 'bottom' | 'bottom-end'",
|
|
188
188
|
"defaultValue": "bottom-end",
|
|
189
189
|
"appliesTo": "ToastRegion",
|
|
190
|
-
"description": "
|
|
190
|
+
"description": "The edge the region sits at. The names are logical, so a right-to-left document mirrors them."
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
"name": "attach",
|
|
194
194
|
"type": "'portal' | 'viewport' | 'inline'",
|
|
195
195
|
"defaultValue": "portal",
|
|
196
196
|
"appliesTo": "ToastRegion",
|
|
197
|
-
"description": "Where the region is rendered
|
|
197
|
+
"description": "Where the region is rendered. portal places it at the end of the document with the theme it came from, viewport fixes it where it is written, and inline positions it in the nearest positioned ancestor."
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"name": "stacking",
|
|
201
201
|
"type": "'list' | 'stack'",
|
|
202
202
|
"defaultValue": "list",
|
|
203
203
|
"appliesTo": "ToastRegion",
|
|
204
|
-
"description": "
|
|
204
|
+
"description": "How the messages are arranged. list is a column at their own height; stack is a pile that opens while the pointer is over it or focus is inside it."
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
"name": "limit",
|
|
208
208
|
"type": "number",
|
|
209
209
|
"defaultValue": "3",
|
|
210
210
|
"appliesTo": "ToastRegion",
|
|
211
|
-
"description": "How many messages are on screen at once.
|
|
211
|
+
"description": "How many messages are on screen at once. The rest wait, and a waiting message has no timer."
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"name": "duration",
|
|
215
215
|
"type": "number",
|
|
216
216
|
"defaultValue": "5000",
|
|
217
217
|
"appliesTo": "ToastRegion, toast.show",
|
|
218
|
-
"description": "
|
|
218
|
+
"description": "The milliseconds a message stays on screen, counted from the moment it appears. 0 never expires."
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
"name": "swipe",
|
|
222
222
|
"type": "boolean",
|
|
223
223
|
"defaultValue": "true",
|
|
224
224
|
"appliesTo": "ToastRegion",
|
|
225
|
-
"description": "
|
|
225
|
+
"description": "Whether a message can be dragged toward the edge of the placement to dismiss it. A drag that starts on a control is not a swipe."
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
"name": "pauseOnHover",
|
|
229
229
|
"type": "boolean",
|
|
230
230
|
"defaultValue": "true",
|
|
231
231
|
"appliesTo": "ToastRegion",
|
|
232
|
-
"description": "
|
|
232
|
+
"description": "Whether the timers stop while the pointer is over the region. Focus inside the region always stops them."
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
235
|
"name": "pauseWhenHidden",
|
|
236
236
|
"type": "boolean",
|
|
237
237
|
"defaultValue": "true",
|
|
238
238
|
"appliesTo": "ToastRegion",
|
|
239
|
-
"description": "
|
|
239
|
+
"description": "Whether the timers stop while the tab is hidden."
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
"name": "hotkey",
|
|
243
243
|
"type": "string",
|
|
244
244
|
"defaultValue": "F6",
|
|
245
245
|
"appliesTo": "ToastRegion",
|
|
246
|
-
"description": "The key that moves focus into the region,
|
|
246
|
+
"description": "The key that moves focus into the region, such as F6, Alt+T or Shift+F8."
|
|
247
247
|
},
|
|
248
248
|
{
|
|
249
249
|
"name": "messages",
|
|
250
250
|
"type": "Partial<ToastMessages>",
|
|
251
251
|
"defaultValue": "—",
|
|
252
252
|
"appliesTo": "ToastRegion",
|
|
253
|
-
"description": "
|
|
253
|
+
"description": "The words of the region over the ones of the language in force: label names the region and close names each close button."
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"name": "tone",
|
|
257
257
|
"type": "'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
258
258
|
"defaultValue": "accent",
|
|
259
259
|
"appliesTo": "toast.show",
|
|
260
|
-
"description": "
|
|
260
|
+
"description": "The color and the mark of the message. secondary draws no mark."
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
"name": "variant",
|
|
264
264
|
"type": "'raised' | 'soft' | 'solid'",
|
|
265
265
|
"defaultValue": "raised",
|
|
266
266
|
"appliesTo": "toast.show",
|
|
267
|
-
"description": "How
|
|
267
|
+
"description": "How the tone is painted. raised keeps the neutral surface and puts the tone in the mark, soft tints the surface, and solid fills it."
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
"name": "priority",
|
|
271
271
|
"type": "'polite' | 'assertive'",
|
|
272
272
|
"defaultValue": "polite",
|
|
273
273
|
"appliesTo": "toast.show",
|
|
274
|
-
"description": "How
|
|
274
|
+
"description": "How the message is announced. assertive interrupts the screen reader. It does not follow the tone."
|
|
275
275
|
},
|
|
276
276
|
{
|
|
277
277
|
"name": "dismissible",
|
|
278
278
|
"type": "boolean",
|
|
279
279
|
"defaultValue": "true",
|
|
280
280
|
"appliesTo": "toast.show",
|
|
281
|
-
"description": "
|
|
281
|
+
"description": "Whether the message has a close button."
|
|
282
282
|
},
|
|
283
283
|
{
|
|
284
284
|
"name": "progress",
|
|
285
285
|
"type": "boolean",
|
|
286
286
|
"defaultValue": "false",
|
|
287
287
|
"appliesTo": "toast.show",
|
|
288
|
-
"description": "
|
|
288
|
+
"description": "Whether the message draws how much of its duration is left."
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"name": "toasts",
|
|
292
292
|
"type": "readonly ToastMessage[]",
|
|
293
293
|
"defaultValue": "—",
|
|
294
294
|
"appliesTo": "ToastRegion",
|
|
295
|
-
"description": "The queue
|
|
295
|
+
"description": "The queue you own. A region that receives it is controlled for its whole life and only asks for changes."
|
|
296
296
|
},
|
|
297
297
|
{
|
|
298
298
|
"name": "defaultToasts",
|
|
299
299
|
"type": "readonly ToastMessage[]",
|
|
300
300
|
"defaultValue": "—",
|
|
301
301
|
"appliesTo": "ToastRegion",
|
|
302
|
-
"description": "The
|
|
302
|
+
"description": "The messages the queue starts with, read once."
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
"name": "title",
|
|
306
306
|
"type": "ReactNode",
|
|
307
307
|
"defaultValue": "—",
|
|
308
308
|
"appliesTo": "toast.show",
|
|
309
|
-
"description": "The
|
|
309
|
+
"description": "The name of the message. With the description, it is what is announced."
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
312
|
"name": "description",
|
|
313
313
|
"type": "ReactNode",
|
|
314
314
|
"defaultValue": "—",
|
|
315
315
|
"appliesTo": "toast.show",
|
|
316
|
-
"description": "The
|
|
316
|
+
"description": "The text under the title."
|
|
317
317
|
},
|
|
318
318
|
{
|
|
319
319
|
"name": "announcement",
|
|
320
320
|
"type": "string",
|
|
321
321
|
"defaultValue": "—",
|
|
322
322
|
"appliesTo": "toast.show",
|
|
323
|
-
"description": "What
|
|
323
|
+
"description": "What is announced instead of the title and the description. State it for a message whose content is not a string."
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
326
|
"name": "loading",
|
|
327
327
|
"type": "boolean",
|
|
328
328
|
"defaultValue": "false",
|
|
329
329
|
"appliesTo": "toast.show",
|
|
330
|
-
"description": "
|
|
330
|
+
"description": "Whether the message waits for work to end. It draws a loader in place of the mark and never expires."
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
"name": "icon",
|
|
334
334
|
"type": "ReactNode",
|
|
335
335
|
"defaultValue": "—",
|
|
336
336
|
"appliesTo": "toast.show",
|
|
337
|
-
"description": "
|
|
337
|
+
"description": "The content that replaces the mark of the tone."
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
340
|
"name": "hideIcon",
|
|
341
341
|
"type": "boolean",
|
|
342
342
|
"defaultValue": "false",
|
|
343
343
|
"appliesTo": "toast.show",
|
|
344
|
-
"description": "
|
|
344
|
+
"description": "Whether the mark is left out."
|
|
345
345
|
},
|
|
346
346
|
{
|
|
347
347
|
"name": "actions",
|
|
348
348
|
"type": "ReactNode",
|
|
349
349
|
"defaultValue": "—",
|
|
350
350
|
"appliesTo": "toast.show",
|
|
351
|
-
"description": "The
|
|
351
|
+
"description": "The controls under the text. A message with actions never expires unless it states a duration."
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
354
|
"name": "id",
|
|
355
355
|
"type": "string",
|
|
356
356
|
"defaultValue": "—",
|
|
357
357
|
"appliesTo": "toast.show",
|
|
358
|
-
"description": "
|
|
358
|
+
"description": "The identifier of the message. Showing an id that is already in the queue updates that message in place."
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
361
|
"name": "container",
|
|
362
362
|
"type": "Element | null",
|
|
363
363
|
"defaultValue": "—",
|
|
364
364
|
"appliesTo": "ToastRegion",
|
|
365
|
-
"description": "The element a portalled region is placed
|
|
365
|
+
"description": "The element a portalled region is placed in."
|
|
366
366
|
}
|
|
367
367
|
],
|
|
368
368
|
"composition": [
|
|
@@ -371,66 +371,66 @@
|
|
|
371
371
|
"type": "(message) => ReactNode",
|
|
372
372
|
"defaultValue": "—",
|
|
373
373
|
"appliesTo": "ToastRegion",
|
|
374
|
-
"description": "Renders each message
|
|
374
|
+
"description": "Renders each message. The timer, the exit, the swipe, the keyboard and the announcement stay."
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
"name": "render",
|
|
378
378
|
"type": "(props) => ReactNode",
|
|
379
379
|
"defaultValue": "—",
|
|
380
380
|
"appliesTo": "ToastContent, ToastTitle, ToastDescription, ToastActions, ToastClose",
|
|
381
|
-
"description": "
|
|
381
|
+
"description": "Renders the part as another element with the attributes it receives."
|
|
382
382
|
},
|
|
383
383
|
{
|
|
384
384
|
"name": "toast",
|
|
385
385
|
"type": "Toaster",
|
|
386
386
|
"defaultValue": "—",
|
|
387
387
|
"appliesTo": "anywhere",
|
|
388
|
-
"description": "The shared
|
|
388
|
+
"description": "The shared queue: show, update, dismiss, clear, pauseAll, resumeAll and promise. It is a plain object, so it works outside components."
|
|
389
389
|
},
|
|
390
390
|
{
|
|
391
391
|
"name": "createToaster",
|
|
392
392
|
"type": "() => Toaster",
|
|
393
393
|
"defaultValue": "—",
|
|
394
394
|
"appliesTo": "an application",
|
|
395
|
-
"description": "
|
|
395
|
+
"description": "Creates another queue, for an application with two regions. Pass it to a region as toaster, or to a subtree with ToasterProvider."
|
|
396
396
|
},
|
|
397
397
|
{
|
|
398
398
|
"name": "ToastDefaultsProvider",
|
|
399
399
|
"type": "{ placement, attach, stacking, tone, variant, limit, duration, hotkey, … }",
|
|
400
400
|
"defaultValue": "—",
|
|
401
401
|
"appliesTo": "a subtree",
|
|
402
|
-
"description": "Sets
|
|
402
|
+
"description": "Sets the axes once for every region and message under it. A value on a region or a message still wins."
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
405
|
"name": "useToastQueue",
|
|
406
406
|
"type": "() => { visible, queued, paused }",
|
|
407
407
|
"defaultValue": "—",
|
|
408
408
|
"appliesTo": "inside a region",
|
|
409
|
-
"description": "
|
|
409
|
+
"description": "Reads how many messages are on screen, how many wait and whether the timers are stopped."
|
|
410
410
|
}
|
|
411
411
|
],
|
|
412
412
|
"events": [
|
|
413
413
|
{
|
|
414
414
|
"name": "onToastsChange",
|
|
415
415
|
"payload": "(toasts, request)",
|
|
416
|
-
"when": "
|
|
416
|
+
"when": "Before the queue changes. The request carries the previous queue, the reason (programmatic, dismiss, escape, keyboard, pointer, timeout or clear), the originating event and cancel()."
|
|
417
417
|
},
|
|
418
418
|
{
|
|
419
419
|
"name": "onStatusChange",
|
|
420
420
|
"payload": "(status, message)",
|
|
421
|
-
"when": "
|
|
421
|
+
"when": "When a message appears (visible), leaves the queue (closing) and leaves the document (removed). It is passed to the call that shows the message."
|
|
422
422
|
}
|
|
423
423
|
],
|
|
424
424
|
"accessibility": [
|
|
425
|
-
"
|
|
426
|
-
"
|
|
427
|
-
"A message that
|
|
428
|
-
"
|
|
429
|
-
"
|
|
430
|
-
"
|
|
431
|
-
"A message
|
|
432
|
-
"Every tone with a severity
|
|
433
|
-
"The region
|
|
425
|
+
"The region is a landmark with the name Notifications in English. The words of a message are announced by a live region that exists before any message does, so the buttons of a message are not read inside its sentence.",
|
|
426
|
+
"A message is announced as its title and its description. A message whose content is not a string announces the string in announcement, and nothing without one.",
|
|
427
|
+
"A message that arrives never moves focus. The hotkey, F6 by default, moves focus to the newest message, and Escape dismisses the message focus is in.",
|
|
428
|
+
"When the message that holds focus leaves, focus moves to the next message, and after the last one to the element it came from.",
|
|
429
|
+
"The timers stop while the pointer is over the region, while focus is inside it and while the tab is hidden, and go on with the time that was left.",
|
|
430
|
+
"A duration of 0 in the defaults turns every time limit off, which WCAG 2.2 SC 2.2.1 asks an application to offer. The setting that does so is yours.",
|
|
431
|
+
"A message with actions, and one that is loading, never expires unless it states a duration.",
|
|
432
|
+
"Every tone with a severity has a mark of its own shape, so the tone is not told by color alone. secondary has none.",
|
|
433
|
+
"The region lets pointer events through, and each message takes its own."
|
|
434
434
|
]
|
|
435
435
|
}
|
|
436
436
|
},
|
|
@@ -545,24 +545,24 @@
|
|
|
545
545
|
"title": "What the message is about",
|
|
546
546
|
"note": "Five tones and five marks. The mark is the answer to WCAG 2.2 1.4.1: read in grayscale, or under forced colors where every ground becomes one system color, the silhouette is the only thing left to tell a failure from a note.",
|
|
547
547
|
"language": "tsx",
|
|
548
|
-
"source": "
|
|
549
|
-
"verdict": "
|
|
548
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastTones() {\n return (\n <>\n <ToastRegion toaster={toaster} />\n <Inline gap={2}>\n <Button\n variant=\"outline\"\n onClick={() => toaster.show({ title: 'Nightly sync starts at 02:00', tone: 'info' })}\n >\n Info\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => toaster.show({ title: 'Invoice INV-2041 sent', tone: 'success' })}\n >\n Success\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({ title: 'Stock of BEV-104 is below 20 units', tone: 'warning' })\n }\n >\n Warning\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({ title: 'Payment for SO-10482 was declined', tone: 'danger' })\n }\n >\n Danger\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({ title: 'Columns restored to their defaults', tone: 'secondary' })\n }\n >\n Note\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
549
|
+
"verdict": "example"
|
|
550
550
|
},
|
|
551
551
|
{
|
|
552
552
|
"id": "variants",
|
|
553
553
|
"title": "How that tone is painted",
|
|
554
554
|
"note": "raised is the default and the one the other message families do not have: a toast floats over content this family does not own, so the tone is in the mark and the box keeps the neutral raised surface. soft and solid are for a region inside a page’s own chrome.",
|
|
555
555
|
"language": "tsx",
|
|
556
|
-
"source": "toast.show({ title: 'Invoice sent', tone: 'success', variant: 'raised' })
|
|
557
|
-
"verdict": "
|
|
556
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastVariants() {\n return (\n <>\n <ToastRegion toaster={toaster} />\n <Inline gap={2}>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({ title: 'Invoice INV-2041 sent', tone: 'success', variant: 'raised' })\n }\n >\n Raised\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({ title: 'Invoice INV-2041 sent', tone: 'success', variant: 'soft' })\n }\n >\n Soft\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({ title: 'Invoice INV-2041 sent', tone: 'success', variant: 'solid' })\n }\n >\n Solid\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
557
|
+
"verdict": "example"
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
"id": "placement",
|
|
561
561
|
"title": "Which corner the region owns",
|
|
562
562
|
"note": "Six placements, all written in logical properties: bottom-end is the bottom right of this page and the bottom left of the same page in Arabic. Switch the direction in the toolbar and the region moves with the text.",
|
|
563
563
|
"language": "tsx",
|
|
564
|
-
"source": "<ToastRegion placement=\"top
|
|
565
|
-
"verdict": "
|
|
564
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastPlacement() {\n return (\n <>\n <ToastRegion toaster={toaster} placement=\"top\" />\n <Inline gap={2}>\n <Button onClick={() => toaster.show({ title: 'Draft saved' })}>Show at the top</Button>\n </Inline>\n </>\n );\n}\n",
|
|
565
|
+
"verdict": "example"
|
|
566
566
|
},
|
|
567
567
|
{
|
|
568
568
|
"id": "timing",
|
|
@@ -577,48 +577,48 @@
|
|
|
577
577
|
"title": "A message the reader can act on",
|
|
578
578
|
"note": "A message that carries an action is given no duration unless one is stated: Angular Material is the only surveyed implementation that states the rule, and a reader on their way to Undo must not watch it disappear. Press Undo and the message closes with it.",
|
|
579
579
|
"language": "tsx",
|
|
580
|
-
"source": "const id =
|
|
581
|
-
"verdict": "
|
|
580
|
+
"source": "import { useState } from 'react';\nimport { Button } from '@slotted/react/button';\nimport { Stack } from '@slotted/react/stack';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\nimport { Text } from '@slotted/react/typography';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastActionsExample() {\n const [archived, setArchived] = useState(false);\n\n function handleArchive() {\n setArchived(true);\n const id = toaster.show({\n title: 'Order SO-10482 archived',\n actions: (\n <Button\n size=\"sm\"\n variant=\"outline\"\n onClick={() => {\n setArchived(false);\n toaster.dismiss(id);\n }}\n >\n Undo\n </Button>\n ),\n });\n }\n\n return (\n <Stack align=\"start\" gap={3}>\n <ToastRegion toaster={toaster} />\n <Button disabled={archived} onClick={handleArchive}>\n Archive order\n </Button>\n <Text size=\"sm\" tone=\"muted\">\n {archived ? 'SO-10482 is archived.' : 'SO-10482 is open.'}\n </Text>\n </Stack>\n );\n}\n",
|
|
581
|
+
"verdict": "example"
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
"id": "promise",
|
|
585
585
|
"title": "A message that follows a promise",
|
|
586
586
|
"note": "One message from start to finish: it begins as loading with no duration and no countdown, and the same element becomes the success or the failure. Replacing it with a second message would make a reader hear the sentence twice.",
|
|
587
587
|
"language": "tsx",
|
|
588
|
-
"source": "toast
|
|
589
|
-
"verdict": "
|
|
588
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\nfunction publish(succeeds: boolean) {\n return new Promise<number>((resolve, reject) => {\n setTimeout(() => (succeeds ? resolve(148) : reject(new Error('Offline'))), 2000);\n });\n}\n\nconst MESSAGES = {\n loading: { title: 'Publishing prices' },\n success: (count: number) => ({ title: `${count} prices published`, tone: 'success' as const }),\n error: { title: 'Prices were not published', tone: 'danger' as const },\n};\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastPromise() {\n return (\n <>\n <ToastRegion toaster={toaster} />\n <Inline gap={2}>\n <Button onClick={() => void toaster.promise(publish(true), MESSAGES)}>\n Publish prices\n </Button>\n <Button\n variant=\"outline\"\n onClick={() => toaster.promise(publish(false), MESSAGES).catch(() => undefined)}\n >\n Publish with an error\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
589
|
+
"verdict": "example"
|
|
590
590
|
},
|
|
591
591
|
{
|
|
592
592
|
"id": "queue",
|
|
593
593
|
"title": "More messages than the screen",
|
|
594
594
|
"note": "Past the limit a message waits, and what is already on screen stays — a reader half way through one does not lose it to something that arrived after. A waiting message has no clock at all: its duration starts when it appears.",
|
|
595
595
|
"language": "tsx",
|
|
596
|
-
"source": "<ToastRegion limit={2}
|
|
597
|
-
"verdict": "
|
|
596
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\nconst LABELS = ['SO-10482', 'SO-10483', 'SO-10484', 'SO-10485', 'SO-10486'];\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastQueue() {\n return (\n <>\n <ToastRegion toaster={toaster} limit={2} />\n <Inline gap={2}>\n <Button\n onClick={() => LABELS.forEach((label) => toaster.show({ title: `${label} printed` }))}\n >\n Print five labels\n </Button>\n <Button variant=\"outline\" onClick={() => toaster.clear()}>\n Clear\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
597
|
+
"verdict": "example"
|
|
598
598
|
},
|
|
599
599
|
{
|
|
600
600
|
"id": "stacking",
|
|
601
601
|
"title": "A pile that opens",
|
|
602
602
|
"note": "Four messages at full height fill a phone. stack puts them one behind another at the edge the placement names and opens the pile when the pointer is over it or the keyboard is inside — the same two conditions that stop the clock, because both mean the reader is reading.",
|
|
603
603
|
"language": "tsx",
|
|
604
|
-
"source": "<ToastRegion stacking=\"stack\"
|
|
605
|
-
"verdict": "
|
|
604
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\nconst SHIPMENTS = ['SH-2201', 'SH-2202', 'SH-2203', 'SH-2204'];\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastStacking() {\n return (\n <>\n <ToastRegion toaster={toaster} limit={4} stacking=\"stack\" />\n <Inline gap={2}>\n <Button\n onClick={() =>\n SHIPMENTS.forEach((shipment) =>\n toaster.show({ title: `${shipment} received`, tone: 'success', duration: 0 }),\n )\n }\n >\n Receive four shipments\n </Button>\n <Button variant=\"outline\" onClick={() => toaster.clear()}>\n Clear\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
605
|
+
"verdict": "example"
|
|
606
606
|
},
|
|
607
607
|
{
|
|
608
608
|
"id": "dismissal",
|
|
609
609
|
"title": "The ways a message leaves",
|
|
610
610
|
"note": "Four, and each carries its own reason: the close control says dismiss, Escape inside the message says escape, a swipe toward the edge says pointer, and the timer says timeout. A page that has to tell them apart reads the reason rather than guessing.",
|
|
611
611
|
"language": "tsx",
|
|
612
|
-
"source": "<ToastRegion\n
|
|
613
|
-
"verdict": "
|
|
612
|
+
"source": "import { useState } from 'react';\nimport { Button } from '@slotted/react/button';\nimport { Stack } from '@slotted/react/stack';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\nimport { Text } from '@slotted/react/typography';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastDismissal() {\n const [reason, setReason] = useState('none yet');\n\n return (\n <Stack align=\"start\" gap={3}>\n <ToastRegion\n onToastsChange={(_toasts, request) => {\n if (request.reason !== 'programmatic') setReason(request.reason);\n }}\n toaster={toaster}\n />\n <Button onClick={() => toaster.show({ title: 'Draft saved', progress: true })}>\n Save draft\n </Button>\n <Text role=\"status\" size=\"sm\" tone=\"muted\">\n Last departure: {reason}\n </Text>\n </Stack>\n );\n}\n",
|
|
613
|
+
"verdict": "example"
|
|
614
614
|
},
|
|
615
615
|
{
|
|
616
616
|
"id": "keyboard",
|
|
617
617
|
"title": "Reaching the messages from the keyboard",
|
|
618
618
|
"note": "A message arriving never moves focus — the APG’s Alert pattern is explicit about it. F6 is what the reader presses to get there, Tab walks the controls, and Escape closes the message and hands the keyboard back to where it came from.",
|
|
619
619
|
"language": "tsx",
|
|
620
|
-
"source": "<ToastRegion hotkey=\"Alt+
|
|
621
|
-
"verdict": "
|
|
620
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastKeyboard() {\n return (\n <>\n <ToastRegion toaster={toaster} hotkey=\"Alt+N\" />\n <Inline gap={2}>\n <Button\n onClick={() =>\n toaster.show({\n title: 'Draft saved',\n description: 'Press Alt+N to reach this message.',\n duration: 0,\n })\n }\n >\n Show a message\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
621
|
+
"verdict": "example"
|
|
622
622
|
},
|
|
623
623
|
{
|
|
624
624
|
"id": "content",
|
|
@@ -643,6 +643,54 @@
|
|
|
643
643
|
"language": "tsx",
|
|
644
644
|
"source": "import { Button } from '@slotted/react/button';\nimport { toast, ToastRegion } from '@slotted/react/toast';\n\nexport default function ToastBasic() {\n return (\n <>\n {/* Once, near the root of the application. */}\n <ToastRegion />\n <Button\n onClick={() =>\n toast.show({ title: 'Draft saved', description: 'Everything since 2:02 PM is saved.' })\n }\n >\n Save draft\n </Button>\n </>\n );\n}\n",
|
|
645
645
|
"verdict": "example"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"id": "controlled",
|
|
649
|
+
"title": "controlled.tsx",
|
|
650
|
+
"note": null,
|
|
651
|
+
"language": "tsx",
|
|
652
|
+
"source": "import { useState } from 'react';\nimport { Stack } from '@slotted/react/stack';\nimport { Button } from '@slotted/react/button';\nimport { ToastRegion, type ToastContentValue, type ToastMessage } from '@slotted/react/toast';\nimport { Text } from '@slotted/react/typography';\n\nconst FIRST: ToastMessage<ToastContentValue> = {\n id: 'import-118',\n duration: 0,\n priority: 'polite',\n announcement: 'Import 118 finished',\n loading: false,\n action: false,\n data: { title: 'Import 118 finished', tone: 'success' },\n status: 'visible',\n revision: 0,\n};\n\nexport default function ToastControlled() {\n const [toasts, setToasts] = useState<readonly ToastMessage<ToastContentValue>[]>([FIRST]);\n\n return (\n <Stack align=\"start\" gap={3}>\n <div style={{ blockSize: '9rem', inlineSize: '100%', position: 'relative' }}>\n <ToastRegion attach=\"inline\" onToastsChange={(next) => setToasts(next)} toasts={toasts} />\n </div>\n <Button disabled={toasts.length > 0} variant=\"outline\" onClick={() => setToasts([FIRST])}>\n Show again\n </Button>\n <Text size=\"sm\" tone=\"muted\">\n Messages in the queue: {toasts.length}\n </Text>\n </Stack>\n );\n}\n",
|
|
653
|
+
"verdict": "example"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"id": "defaults",
|
|
657
|
+
"title": "defaults.tsx",
|
|
658
|
+
"note": null,
|
|
659
|
+
"language": "tsx",
|
|
660
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { createToaster, ToastDefaultsProvider, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastDefaultsExample() {\n return (\n <ToastDefaultsProvider duration={0} placement=\"top-end\" variant=\"soft\">\n <ToastRegion toaster={toaster} />\n <Button onClick={() => toaster.show({ title: 'Order SO-10482 packed', tone: 'success' })}>\n Pack order\n </Button>\n </ToastDefaultsProvider>\n );\n}\n",
|
|
661
|
+
"verdict": "example"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"id": "duration",
|
|
665
|
+
"title": "duration.tsx",
|
|
666
|
+
"note": null,
|
|
667
|
+
"language": "tsx",
|
|
668
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastDuration() {\n return (\n <>\n <ToastRegion toaster={toaster} />\n <Inline gap={2}>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({\n title: 'Export ready',\n description: 'orders-november.csv',\n duration: 8000,\n progress: true,\n })\n }\n >\n Eight seconds\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({\n title: 'Your session has expired',\n description: 'Sign in again to go on.',\n tone: 'danger',\n duration: 0,\n })\n }\n >\n Until dismissed\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
669
|
+
"verdict": "example"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"id": "long-content",
|
|
673
|
+
"title": "long-content.tsx",
|
|
674
|
+
"note": null,
|
|
675
|
+
"language": "tsx",
|
|
676
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastLongContent() {\n return (\n <>\n <ToastRegion toaster={toaster} />\n <Inline gap={2}>\n <Button\n onClick={() =>\n toaster.show({\n title: 'Deployment of the storefront rejected by the registry',\n description:\n 'sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08',\n tone: 'danger',\n duration: 0,\n })\n }\n >\n Show a long message\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({ title: 'Columns restored to their defaults', hideIcon: true })\n }\n >\n Without a mark\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
677
|
+
"verdict": "example"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"id": "priority",
|
|
681
|
+
"title": "priority.tsx",
|
|
682
|
+
"note": null,
|
|
683
|
+
"language": "tsx",
|
|
684
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastPriority() {\n return (\n <>\n <ToastRegion toaster={toaster} />\n <Inline gap={2}>\n <Button variant=\"outline\" onClick={() => toaster.show({ title: 'Draft saved' })}>\n Polite\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({\n title: 'Connection lost',\n description: 'Changes are kept on this device.',\n tone: 'danger',\n priority: 'assertive',\n })\n }\n >\n Assertive\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
685
|
+
"verdict": "example"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"id": "update",
|
|
689
|
+
"title": "update.tsx",
|
|
690
|
+
"note": null,
|
|
691
|
+
"language": "tsx",
|
|
692
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { createToaster, ToastRegion } from '@slotted/react/toast';\n\n/* A queue for this example. The shared `toast` serves the whole application. */\nconst toaster = createToaster();\n\nexport default function ToastUpdate() {\n return (\n <>\n <ToastRegion toaster={toaster} />\n <Inline gap={2}>\n <Button\n onClick={() =>\n toaster.show({ id: 'price-list', title: 'Uploading price list', duration: 0 })\n }\n >\n Upload the price list\n </Button>\n <Button\n variant=\"outline\"\n onClick={() =>\n toaster.show({\n id: 'price-list',\n title: 'Price list uploaded',\n tone: 'success',\n duration: 5000,\n })\n }\n >\n Finish\n </Button>\n </Inline>\n </>\n );\n}\n",
|
|
693
|
+
"verdict": "example"
|
|
646
694
|
}
|
|
647
695
|
]
|
|
648
696
|
}
|