@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
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
<!-- index: ./index.md -->
|
|
2
|
+
# result-state
|
|
3
|
+
|
|
4
|
+
`data-ui="result-state"` · Empty, no-results, error or success state.
|
|
5
|
+
|
|
6
|
+
## Examples
|
|
7
|
+
|
|
8
|
+
### Playground
|
|
9
|
+
|
|
10
|
+
One region with every axis on it, driven by the controls below the canvas. Change the status and read what the title and the description say: the status is written as data-status and paints nothing.
|
|
11
|
+
|
|
12
|
+
Excerpt — not a complete module
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
<ResultState status="empty">
|
|
16
|
+
<ResultStateContent>
|
|
17
|
+
<ResultStateTitle>No projects yet</ResultStateTitle>
|
|
18
|
+
<ResultStateDescription>Create a project to start collecting runs.</ResultStateDescription>
|
|
19
|
+
</ResultStateContent>
|
|
20
|
+
<ResultStateActions>
|
|
21
|
+
<Button>Create project</Button>
|
|
22
|
+
</ResultStateActions>
|
|
23
|
+
</ResultState>;
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### What the region is reporting
|
|
27
|
+
|
|
28
|
+
Seven statuses name seven situations: an empty collection, a search with no matches, a missing resource, a failed request, a refused access, a lost connection and a finished task. The status paints nothing, so the title and the description tell the reader which one it is.
|
|
29
|
+
|
|
30
|
+
Example
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import {
|
|
34
|
+
ResultState,
|
|
35
|
+
ResultStateContent,
|
|
36
|
+
ResultStateDescription,
|
|
37
|
+
ResultStateTitle,
|
|
38
|
+
} from '@slotted/react/result-state';
|
|
39
|
+
import { Stack } from '@slotted/react/stack';
|
|
40
|
+
import { Text } from '@slotted/react/typography';
|
|
41
|
+
|
|
42
|
+
const REGIONS = [
|
|
43
|
+
{
|
|
44
|
+
status: 'empty',
|
|
45
|
+
title: 'No shipments yet',
|
|
46
|
+
description: 'Shipments appear here once a carrier collects an order.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
status: 'no-results',
|
|
50
|
+
title: 'No orders match this search',
|
|
51
|
+
description: 'Check the spelling or search by order number.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
status: 'not-found',
|
|
55
|
+
title: 'Order SO-10492 does not exist',
|
|
56
|
+
description: 'It may have been merged into another order.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
status: 'error',
|
|
60
|
+
title: 'Orders did not load',
|
|
61
|
+
description: 'The orders service did not respond. Try again in a moment.',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
status: 'forbidden',
|
|
65
|
+
title: 'Payroll reports are restricted',
|
|
66
|
+
description: 'Only members of Finance can open them. Ask an administrator for access.',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
status: 'offline',
|
|
70
|
+
title: 'You are offline',
|
|
71
|
+
description: 'Changes are kept on this device and sync when the connection returns.',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
status: 'success',
|
|
75
|
+
title: 'Refund issued',
|
|
76
|
+
description: 'The customer receives 84.20 USD within 5 business days.',
|
|
77
|
+
},
|
|
78
|
+
] as const;
|
|
79
|
+
|
|
80
|
+
export default function ResultStateStatuses() {
|
|
81
|
+
return (
|
|
82
|
+
<Stack gap={6}>
|
|
83
|
+
{REGIONS.map((region) => (
|
|
84
|
+
<Stack gap={1} key={region.status}>
|
|
85
|
+
<Text size="sm" tone="muted">
|
|
86
|
+
{region.status}
|
|
87
|
+
</Text>
|
|
88
|
+
<ResultState align="start" reach="inline" status={region.status}>
|
|
89
|
+
<ResultStateContent>
|
|
90
|
+
<ResultStateTitle>{region.title}</ResultStateTitle>
|
|
91
|
+
<ResultStateDescription>{region.description}</ResultStateDescription>
|
|
92
|
+
</ResultStateContent>
|
|
93
|
+
</ResultState>
|
|
94
|
+
</Stack>
|
|
95
|
+
))}
|
|
96
|
+
</Stack>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### How far the region reaches
|
|
102
|
+
|
|
103
|
+
A row inside a table cell, a panel inside a card, the whole route: the same three words Alert uses. At inline the actions join the message on its first line and no illustration is drawn. At page the title takes the top step of the type scale.
|
|
104
|
+
|
|
105
|
+
Example
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
import { Button } from '@slotted/react/button';
|
|
109
|
+
import {
|
|
110
|
+
ResultState,
|
|
111
|
+
ResultStateActions,
|
|
112
|
+
ResultStateContent,
|
|
113
|
+
ResultStateDescription,
|
|
114
|
+
ResultStateTitle,
|
|
115
|
+
} from '@slotted/react/result-state';
|
|
116
|
+
import { Stack } from '@slotted/react/stack';
|
|
117
|
+
import { Text } from '@slotted/react/typography';
|
|
118
|
+
|
|
119
|
+
export default function ResultStateReach() {
|
|
120
|
+
return (
|
|
121
|
+
<Stack gap={8}>
|
|
122
|
+
<Stack gap={1}>
|
|
123
|
+
<Text size="sm" tone="muted">
|
|
124
|
+
inline
|
|
125
|
+
</Text>
|
|
126
|
+
<ResultState reach="inline" status="no-results">
|
|
127
|
+
<ResultStateContent>
|
|
128
|
+
<ResultStateTitle>No rows match the filter</ResultStateTitle>
|
|
129
|
+
</ResultStateContent>
|
|
130
|
+
<ResultStateActions>
|
|
131
|
+
<Button size="sm" variant="ghost">
|
|
132
|
+
Clear filters
|
|
133
|
+
</Button>
|
|
134
|
+
</ResultStateActions>
|
|
135
|
+
</ResultState>
|
|
136
|
+
</Stack>
|
|
137
|
+
|
|
138
|
+
<Stack gap={1}>
|
|
139
|
+
<Text size="sm" tone="muted">
|
|
140
|
+
section
|
|
141
|
+
</Text>
|
|
142
|
+
<ResultState reach="section" status="empty">
|
|
143
|
+
<ResultStateContent>
|
|
144
|
+
<ResultStateTitle>No open invoices</ResultStateTitle>
|
|
145
|
+
<ResultStateDescription>
|
|
146
|
+
Invoices appear here when an order ships and stay until they are paid.
|
|
147
|
+
</ResultStateDescription>
|
|
148
|
+
</ResultStateContent>
|
|
149
|
+
</ResultState>
|
|
150
|
+
</Stack>
|
|
151
|
+
|
|
152
|
+
<Stack gap={1}>
|
|
153
|
+
<Text size="sm" tone="muted">
|
|
154
|
+
page
|
|
155
|
+
</Text>
|
|
156
|
+
<ResultState reach="page" status="not-found">
|
|
157
|
+
<ResultStateContent>
|
|
158
|
+
<ResultStateTitle>Page not found</ResultStateTitle>
|
|
159
|
+
<ResultStateDescription>
|
|
160
|
+
The page you opened does not exist or has moved.
|
|
161
|
+
</ResultStateDescription>
|
|
162
|
+
</ResultStateContent>
|
|
163
|
+
<ResultStateActions>
|
|
164
|
+
<Button>Go to the dashboard</Button>
|
|
165
|
+
</ResultStateActions>
|
|
166
|
+
</ResultState>
|
|
167
|
+
</Stack>
|
|
168
|
+
</Stack>
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Centered, or from the inline edge
|
|
174
|
+
|
|
175
|
+
center suits a panel or a route. start reads from the inline edge and suits a data-dense screen, where a centered column reads as an interruption.
|
|
176
|
+
|
|
177
|
+
Example
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
import { Button } from '@slotted/react/button';
|
|
181
|
+
import {
|
|
182
|
+
ResultState,
|
|
183
|
+
ResultStateActions,
|
|
184
|
+
ResultStateContent,
|
|
185
|
+
ResultStateDescription,
|
|
186
|
+
ResultStateTitle,
|
|
187
|
+
} from '@slotted/react/result-state';
|
|
188
|
+
import { Stack } from '@slotted/react/stack';
|
|
189
|
+
import { Text } from '@slotted/react/typography';
|
|
190
|
+
|
|
191
|
+
export default function ResultStateAlign() {
|
|
192
|
+
return (
|
|
193
|
+
<Stack gap={8}>
|
|
194
|
+
<Stack gap={1}>
|
|
195
|
+
<Text size="sm" tone="muted">
|
|
196
|
+
center
|
|
197
|
+
</Text>
|
|
198
|
+
<ResultState align="center">
|
|
199
|
+
<ResultStateContent>
|
|
200
|
+
<ResultStateTitle>No saved reports</ResultStateTitle>
|
|
201
|
+
<ResultStateDescription>
|
|
202
|
+
Save a report to run it again in one click.
|
|
203
|
+
</ResultStateDescription>
|
|
204
|
+
</ResultStateContent>
|
|
205
|
+
<ResultStateActions>
|
|
206
|
+
<Button>Save a report</Button>
|
|
207
|
+
</ResultStateActions>
|
|
208
|
+
</ResultState>
|
|
209
|
+
</Stack>
|
|
210
|
+
|
|
211
|
+
<Stack gap={1}>
|
|
212
|
+
<Text size="sm" tone="muted">
|
|
213
|
+
start
|
|
214
|
+
</Text>
|
|
215
|
+
<ResultState align="start">
|
|
216
|
+
<ResultStateContent>
|
|
217
|
+
<ResultStateTitle>No saved reports</ResultStateTitle>
|
|
218
|
+
<ResultStateDescription>
|
|
219
|
+
Save a report to run it again in one click.
|
|
220
|
+
</ResultStateDescription>
|
|
221
|
+
</ResultStateContent>
|
|
222
|
+
<ResultStateActions>
|
|
223
|
+
<Button>Save a report</Button>
|
|
224
|
+
</ResultStateActions>
|
|
225
|
+
</ResultState>
|
|
226
|
+
</Stack>
|
|
227
|
+
</Stack>
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### The page’s own illustration
|
|
233
|
+
|
|
234
|
+
The media box is sized before anything is in it, so an illustration that has not loaded reserves the space it will occupy and the title below it never moves.
|
|
235
|
+
|
|
236
|
+
Example
|
|
237
|
+
|
|
238
|
+
```tsx
|
|
239
|
+
import { Button } from '@slotted/react/button';
|
|
240
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
241
|
+
import {
|
|
242
|
+
ResultState,
|
|
243
|
+
ResultStateActions,
|
|
244
|
+
ResultStateContent,
|
|
245
|
+
ResultStateDescription,
|
|
246
|
+
ResultStateTitle,
|
|
247
|
+
} from '@slotted/react/result-state';
|
|
248
|
+
|
|
249
|
+
export default function ResultStateMedia() {
|
|
250
|
+
return (
|
|
251
|
+
<ResultState
|
|
252
|
+
media={
|
|
253
|
+
<Icon>
|
|
254
|
+
<Glyph name="cloud-off" />
|
|
255
|
+
</Icon>
|
|
256
|
+
}
|
|
257
|
+
status="offline"
|
|
258
|
+
>
|
|
259
|
+
<ResultStateContent>
|
|
260
|
+
<ResultStateTitle>You are offline</ResultStateTitle>
|
|
261
|
+
<ResultStateDescription>
|
|
262
|
+
Scans are saved on this scanner and upload when the connection returns.
|
|
263
|
+
</ResultStateDescription>
|
|
264
|
+
</ResultStateContent>
|
|
265
|
+
<ResultStateActions>
|
|
266
|
+
<Button variant="outline">Check connection</Button>
|
|
267
|
+
</ResultStateActions>
|
|
268
|
+
</ResultState>
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### A drawing around the page’s glyph
|
|
274
|
+
|
|
275
|
+
Three drawings in the neutral surface and border roles: a framed tile, three layers leaning back and a stack of cards, made around the glyph in media. None takes a tone, and inline reach draws none. A region that announces assembles its drawing as it arrives; under reduced motion it arrives assembled.
|
|
276
|
+
|
|
277
|
+
Excerpt — not a complete module
|
|
278
|
+
|
|
279
|
+
```tsx
|
|
280
|
+
const glyph = (
|
|
281
|
+
<Icon>
|
|
282
|
+
<Glyph name="bell" />
|
|
283
|
+
</Icon>
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
<ResultState illustration="stack" media={glyph}>
|
|
287
|
+
<ResultStateContent>
|
|
288
|
+
<ResultStateTitle>No alerts configured</ResultStateTitle>
|
|
289
|
+
</ResultStateContent>
|
|
290
|
+
</ResultState>;
|
|
291
|
+
|
|
292
|
+
// A framed tile, and a stack of cards standing in for rows.
|
|
293
|
+
<ResultState illustration="tile" media={glyph} />;
|
|
294
|
+
<ResultState illustration="cards" media={glyph} />;
|
|
295
|
+
|
|
296
|
+
// The cards draw their two lines with no glyph at all.
|
|
297
|
+
<ResultState illustration="cards" />;
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### The way out of the situation
|
|
301
|
+
|
|
302
|
+
The controls are your own Buttons, in a part outside the live region, so a reader hearing the message is not read two button labels in the middle of it. Narrow the window past 20rem and the buttons stack.
|
|
303
|
+
|
|
304
|
+
Example
|
|
305
|
+
|
|
306
|
+
```tsx
|
|
307
|
+
import { Button } from '@slotted/react/button';
|
|
308
|
+
import { Link } from '@slotted/react/link';
|
|
309
|
+
import {
|
|
310
|
+
ResultState,
|
|
311
|
+
ResultStateActions,
|
|
312
|
+
ResultStateContent,
|
|
313
|
+
ResultStateDescription,
|
|
314
|
+
ResultStateFooter,
|
|
315
|
+
ResultStateTitle,
|
|
316
|
+
} from '@slotted/react/result-state';
|
|
317
|
+
|
|
318
|
+
export default function ResultStateActionsExample() {
|
|
319
|
+
return (
|
|
320
|
+
<ResultState status="error">
|
|
321
|
+
<ResultStateContent>
|
|
322
|
+
<ResultStateTitle>Carrier rates did not load</ResultStateTitle>
|
|
323
|
+
<ResultStateDescription>
|
|
324
|
+
The rate service timed out, so shipping costs are not shown. Your cart is unchanged.
|
|
325
|
+
</ResultStateDescription>
|
|
326
|
+
</ResultStateContent>
|
|
327
|
+
<ResultStateActions>
|
|
328
|
+
<Button>Try again</Button>
|
|
329
|
+
<Button variant="outline">Use flat rate</Button>
|
|
330
|
+
</ResultStateActions>
|
|
331
|
+
<ResultStateFooter>
|
|
332
|
+
<Link href="#retries">How retries are counted</Link>
|
|
333
|
+
</ResultStateFooter>
|
|
334
|
+
</ResultState>
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### What a reader hears, and when
|
|
340
|
+
|
|
341
|
+
polite is the default, where Alert defaults to off: WCAG 2.2 SC 4.1.3 gives “No results returned” as an example of a status message. Press the button and the region arrives while the reader is elsewhere.
|
|
342
|
+
|
|
343
|
+
Example
|
|
344
|
+
|
|
345
|
+
```tsx
|
|
346
|
+
import {
|
|
347
|
+
ResultState,
|
|
348
|
+
ResultStateContent,
|
|
349
|
+
ResultStateDescription,
|
|
350
|
+
ResultStateTitle,
|
|
351
|
+
} from '@slotted/react/result-state';
|
|
352
|
+
import { Stack } from '@slotted/react/stack';
|
|
353
|
+
import { Text } from '@slotted/react/typography';
|
|
354
|
+
|
|
355
|
+
export default function ResultStateLive() {
|
|
356
|
+
return (
|
|
357
|
+
<Stack gap={6}>
|
|
358
|
+
<Stack gap={1}>
|
|
359
|
+
<Text size="sm" tone="muted">
|
|
360
|
+
polite: role status
|
|
361
|
+
</Text>
|
|
362
|
+
<ResultState align="start" live="polite" reach="inline" status="no-results">
|
|
363
|
+
<ResultStateContent>
|
|
364
|
+
<ResultStateTitle>No orders match this search</ResultStateTitle>
|
|
365
|
+
<ResultStateDescription>
|
|
366
|
+
Check the spelling or search by order number.
|
|
367
|
+
</ResultStateDescription>
|
|
368
|
+
</ResultStateContent>
|
|
369
|
+
</ResultState>
|
|
370
|
+
</Stack>
|
|
371
|
+
|
|
372
|
+
<Stack gap={1}>
|
|
373
|
+
<Text size="sm" tone="muted">
|
|
374
|
+
assertive: role alert
|
|
375
|
+
</Text>
|
|
376
|
+
<ResultState align="start" live="assertive" reach="inline" status="error">
|
|
377
|
+
<ResultStateContent>
|
|
378
|
+
<ResultStateTitle>Payment was declined</ResultStateTitle>
|
|
379
|
+
<ResultStateDescription>Use another card to complete the order.</ResultStateDescription>
|
|
380
|
+
</ResultStateContent>
|
|
381
|
+
</ResultState>
|
|
382
|
+
</Stack>
|
|
383
|
+
|
|
384
|
+
<Stack gap={1}>
|
|
385
|
+
<Text size="sm" tone="muted">
|
|
386
|
+
off: no role
|
|
387
|
+
</Text>
|
|
388
|
+
<ResultState align="start" live="off" reach="inline">
|
|
389
|
+
<ResultStateContent>
|
|
390
|
+
<ResultStateTitle>No drafts</ResultStateTitle>
|
|
391
|
+
<ResultStateDescription>
|
|
392
|
+
A live region on this screen announces changes.
|
|
393
|
+
</ResultStateDescription>
|
|
394
|
+
</ResultStateContent>
|
|
395
|
+
</ResultState>
|
|
396
|
+
</Stack>
|
|
397
|
+
</Stack>
|
|
398
|
+
);
|
|
399
|
+
}
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Content of any length
|
|
403
|
+
|
|
404
|
+
A German compound with no break opportunity, a digest no language can break, a title standing alone and a region with no media, all in a column narrow enough to make each of them a problem.
|
|
405
|
+
|
|
406
|
+
Excerpt — not a complete module
|
|
407
|
+
|
|
408
|
+
```tsx
|
|
409
|
+
<ResultState status="error">
|
|
410
|
+
<ResultStateContent>
|
|
411
|
+
<ResultStateTitle>{longTranslatedTitle}</ResultStateTitle>
|
|
412
|
+
<ResultStateDescription>The run {digest} failed.</ResultStateDescription>
|
|
413
|
+
</ResultStateContent>
|
|
414
|
+
</ResultState>;
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Composition and escape hatches
|
|
418
|
+
|
|
419
|
+
Measure belongs to Container and the frame to Card, so result state caps no width and draws no box: these two lines are what you write instead. The defaults provider sets the axes once, and render substitutes the element of any part.
|
|
420
|
+
|
|
421
|
+
Excerpt — not a complete module
|
|
422
|
+
|
|
423
|
+
```tsx
|
|
424
|
+
<Container size="measure">
|
|
425
|
+
<ResultState reach="page" status="no-results" />
|
|
426
|
+
</Container>;
|
|
427
|
+
|
|
428
|
+
<Card>
|
|
429
|
+
<ResultState status="empty" />
|
|
430
|
+
</Card>;
|
|
431
|
+
|
|
432
|
+
<ResultStateDefaultsProvider align="start" reach="inline">
|
|
433
|
+
<App />
|
|
434
|
+
</ResultStateDefaultsProvider>;
|
|
435
|
+
|
|
436
|
+
<ResultStateTitle render={(props) => <h2 {...props} />}>This page does not exist</ResultStateTitle>;
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### The landmark, the region and the keyboard
|
|
440
|
+
|
|
441
|
+
Tab past the region and then send the keyboard into it: the box is a landmark a reader can jump to, the text is the only part that announces, and nothing moves focus unless the application asks.
|
|
442
|
+
|
|
443
|
+
Excerpt — not a complete module
|
|
444
|
+
|
|
445
|
+
```tsx
|
|
446
|
+
// A region landmark named "No rows match the filter", holding a polite
|
|
447
|
+
// status region. The button is outside it.
|
|
448
|
+
<ResultState live="polite">
|
|
449
|
+
<ResultStateContent>
|
|
450
|
+
<ResultStateTitle>No rows match the filter</ResultStateTitle>
|
|
451
|
+
</ResultStateContent>
|
|
452
|
+
<ResultStateActions>
|
|
453
|
+
<Button>Clear filters</Button>
|
|
454
|
+
</ResultStateActions>
|
|
455
|
+
</ResultState>;
|
|
456
|
+
|
|
457
|
+
// The application decides when the keyboard goes there. Result state never does.
|
|
458
|
+
const region = useRef<HTMLElement>(null);
|
|
459
|
+
region.current?.focus();
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### defaults.tsx
|
|
463
|
+
|
|
464
|
+
Example
|
|
465
|
+
|
|
466
|
+
```tsx
|
|
467
|
+
import {
|
|
468
|
+
ResultState,
|
|
469
|
+
ResultStateContent,
|
|
470
|
+
ResultStateDefaultsProvider,
|
|
471
|
+
ResultStateDescription,
|
|
472
|
+
ResultStateTitle,
|
|
473
|
+
} from '@slotted/react/result-state';
|
|
474
|
+
import { Stack } from '@slotted/react/stack';
|
|
475
|
+
|
|
476
|
+
export default function ResultStateDefaults() {
|
|
477
|
+
return (
|
|
478
|
+
<ResultStateDefaultsProvider align="start" reach="inline">
|
|
479
|
+
<Stack gap={6}>
|
|
480
|
+
<ResultState status="empty">
|
|
481
|
+
<ResultStateContent>
|
|
482
|
+
<ResultStateTitle>No late shipments</ResultStateTitle>
|
|
483
|
+
<ResultStateDescription>
|
|
484
|
+
Every carrier picked up on time this week.
|
|
485
|
+
</ResultStateDescription>
|
|
486
|
+
</ResultStateContent>
|
|
487
|
+
</ResultState>
|
|
488
|
+
|
|
489
|
+
<ResultState status="no-results">
|
|
490
|
+
<ResultStateContent>
|
|
491
|
+
<ResultStateTitle>No returns in this period</ResultStateTitle>
|
|
492
|
+
<ResultStateDescription>
|
|
493
|
+
Widen the date range to see earlier returns.
|
|
494
|
+
</ResultStateDescription>
|
|
495
|
+
</ResultStateContent>
|
|
496
|
+
</ResultState>
|
|
497
|
+
|
|
498
|
+
<ResultState align="center" reach="section" status="error">
|
|
499
|
+
<ResultStateContent>
|
|
500
|
+
<ResultStateTitle>Inventory counts did not load</ResultStateTitle>
|
|
501
|
+
<ResultStateDescription>
|
|
502
|
+
This region sets its own reach and alignment.
|
|
503
|
+
</ResultStateDescription>
|
|
504
|
+
</ResultStateContent>
|
|
505
|
+
</ResultState>
|
|
506
|
+
</Stack>
|
|
507
|
+
</ResultStateDefaultsProvider>
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
### heading.tsx
|
|
513
|
+
|
|
514
|
+
Example
|
|
515
|
+
|
|
516
|
+
```tsx
|
|
517
|
+
import { Button } from '@slotted/react/button';
|
|
518
|
+
import {
|
|
519
|
+
ResultState,
|
|
520
|
+
ResultStateActions,
|
|
521
|
+
ResultStateContent,
|
|
522
|
+
ResultStateDescription,
|
|
523
|
+
ResultStateTitle,
|
|
524
|
+
} from '@slotted/react/result-state';
|
|
525
|
+
|
|
526
|
+
export default function ResultStateHeading() {
|
|
527
|
+
return (
|
|
528
|
+
<ResultState reach="page" status="not-found">
|
|
529
|
+
<ResultStateContent>
|
|
530
|
+
<ResultStateTitle render={(props) => <h1 {...props} />}>Order not found</ResultStateTitle>
|
|
531
|
+
<ResultStateDescription>
|
|
532
|
+
Nothing exists at /orders/SO-10492-REV3. The order may have been deleted or merged.
|
|
533
|
+
</ResultStateDescription>
|
|
534
|
+
</ResultStateContent>
|
|
535
|
+
<ResultStateActions>
|
|
536
|
+
<Button>Back to orders</Button>
|
|
537
|
+
</ResultStateActions>
|
|
538
|
+
</ResultState>
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### illustrations.tsx
|
|
544
|
+
|
|
545
|
+
Example
|
|
546
|
+
|
|
547
|
+
```tsx
|
|
548
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
549
|
+
import { Grid } from '@slotted/react/grid';
|
|
550
|
+
import {
|
|
551
|
+
ResultState,
|
|
552
|
+
ResultStateContent,
|
|
553
|
+
ResultStateDescription,
|
|
554
|
+
ResultStateTitle,
|
|
555
|
+
} from '@slotted/react/result-state';
|
|
556
|
+
import { Stack } from '@slotted/react/stack';
|
|
557
|
+
import { Text } from '@slotted/react/typography';
|
|
558
|
+
|
|
559
|
+
export default function ResultStateIllustrations() {
|
|
560
|
+
return (
|
|
561
|
+
<Grid columns={2} gap={6} minItemWidth="xs">
|
|
562
|
+
<Stack gap={1}>
|
|
563
|
+
<Text size="sm" tone="muted">
|
|
564
|
+
tile
|
|
565
|
+
</Text>
|
|
566
|
+
<ResultState
|
|
567
|
+
illustration="tile"
|
|
568
|
+
media={
|
|
569
|
+
<Icon>
|
|
570
|
+
<Glyph name="bell" />
|
|
571
|
+
</Icon>
|
|
572
|
+
}
|
|
573
|
+
>
|
|
574
|
+
<ResultStateContent>
|
|
575
|
+
<ResultStateTitle>No alerts configured</ResultStateTitle>
|
|
576
|
+
<ResultStateDescription>Alerts tell you when stock runs low.</ResultStateDescription>
|
|
577
|
+
</ResultStateContent>
|
|
578
|
+
</ResultState>
|
|
579
|
+
</Stack>
|
|
580
|
+
|
|
581
|
+
<Stack gap={1}>
|
|
582
|
+
<Text size="sm" tone="muted">
|
|
583
|
+
stack
|
|
584
|
+
</Text>
|
|
585
|
+
<ResultState
|
|
586
|
+
illustration="stack"
|
|
587
|
+
media={
|
|
588
|
+
<Icon>
|
|
589
|
+
<Glyph name="inbox" />
|
|
590
|
+
</Icon>
|
|
591
|
+
}
|
|
592
|
+
>
|
|
593
|
+
<ResultStateContent>
|
|
594
|
+
<ResultStateTitle>Inbox is clear</ResultStateTitle>
|
|
595
|
+
<ResultStateDescription>No supplier messages are waiting.</ResultStateDescription>
|
|
596
|
+
</ResultStateContent>
|
|
597
|
+
</ResultState>
|
|
598
|
+
</Stack>
|
|
599
|
+
|
|
600
|
+
<Stack gap={1}>
|
|
601
|
+
<Text size="sm" tone="muted">
|
|
602
|
+
cards
|
|
603
|
+
</Text>
|
|
604
|
+
<ResultState
|
|
605
|
+
illustration="cards"
|
|
606
|
+
media={
|
|
607
|
+
<Icon>
|
|
608
|
+
<Glyph name="file-text" />
|
|
609
|
+
</Icon>
|
|
610
|
+
}
|
|
611
|
+
>
|
|
612
|
+
<ResultStateContent>
|
|
613
|
+
<ResultStateTitle>No documents attached</ResultStateTitle>
|
|
614
|
+
<ResultStateDescription>Attach packing slips or customs forms.</ResultStateDescription>
|
|
615
|
+
</ResultStateContent>
|
|
616
|
+
</ResultState>
|
|
617
|
+
</Stack>
|
|
618
|
+
|
|
619
|
+
<Stack gap={1}>
|
|
620
|
+
<Text size="sm" tone="muted">
|
|
621
|
+
cards, no glyph
|
|
622
|
+
</Text>
|
|
623
|
+
<ResultState illustration="cards">
|
|
624
|
+
<ResultStateContent>
|
|
625
|
+
<ResultStateTitle>No rows to show</ResultStateTitle>
|
|
626
|
+
<ResultStateDescription>Import a file to fill this table.</ResultStateDescription>
|
|
627
|
+
</ResultStateContent>
|
|
628
|
+
</ResultState>
|
|
629
|
+
</Stack>
|
|
630
|
+
</Grid>
|
|
631
|
+
);
|
|
632
|
+
}
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
### retry.tsx
|
|
636
|
+
|
|
637
|
+
Example
|
|
638
|
+
|
|
639
|
+
```tsx
|
|
640
|
+
import { useEffect, useState } from 'react';
|
|
641
|
+
|
|
642
|
+
import { Button } from '@slotted/react/button';
|
|
643
|
+
import {
|
|
644
|
+
ResultState,
|
|
645
|
+
ResultStateActions,
|
|
646
|
+
ResultStateContent,
|
|
647
|
+
ResultStateDescription,
|
|
648
|
+
ResultStateTitle,
|
|
649
|
+
} from '@slotted/react/result-state';
|
|
650
|
+
|
|
651
|
+
type Phase = 'failed' | 'retrying' | 'loaded';
|
|
652
|
+
|
|
653
|
+
export default function ResultStateRetry() {
|
|
654
|
+
const [phase, setPhase] = useState<Phase>('failed');
|
|
655
|
+
|
|
656
|
+
useEffect(() => {
|
|
657
|
+
if (phase !== 'retrying') return;
|
|
658
|
+
const timer = setTimeout(() => setPhase('loaded'), 1500);
|
|
659
|
+
return () => clearTimeout(timer);
|
|
660
|
+
}, [phase]);
|
|
661
|
+
|
|
662
|
+
return (
|
|
663
|
+
<ResultState status={phase === 'loaded' ? 'success' : 'error'}>
|
|
664
|
+
<ResultStateContent>
|
|
665
|
+
<ResultStateTitle>
|
|
666
|
+
{phase === 'loaded' ? 'Carrier rates loaded' : 'Carrier rates did not load'}
|
|
667
|
+
</ResultStateTitle>
|
|
668
|
+
<ResultStateDescription>
|
|
669
|
+
{phase === 'loaded'
|
|
670
|
+
? 'Showing 14 shipping options for 3 packages.'
|
|
671
|
+
: 'The rate service timed out. Your cart is unchanged.'}
|
|
672
|
+
</ResultStateDescription>
|
|
673
|
+
</ResultStateContent>
|
|
674
|
+
{phase !== 'loaded' && (
|
|
675
|
+
<ResultStateActions>
|
|
676
|
+
<Button loading={phase === 'retrying'} onClick={() => setPhase('retrying')}>
|
|
677
|
+
Try again
|
|
678
|
+
</Button>
|
|
679
|
+
</ResultStateActions>
|
|
680
|
+
)}
|
|
681
|
+
</ResultState>
|
|
682
|
+
);
|
|
683
|
+
}
|
|
684
|
+
```
|
|
685
|
+
|
|
686
|
+
### search.tsx
|
|
687
|
+
|
|
688
|
+
Example
|
|
689
|
+
|
|
690
|
+
```tsx
|
|
691
|
+
import { useState } from 'react';
|
|
692
|
+
|
|
693
|
+
import { Button } from '@slotted/react/button';
|
|
694
|
+
import { Field, FieldLabel } from '@slotted/react/field';
|
|
695
|
+
import {
|
|
696
|
+
ResultState,
|
|
697
|
+
ResultStateActions,
|
|
698
|
+
ResultStateContent,
|
|
699
|
+
ResultStateDescription,
|
|
700
|
+
ResultStateTitle,
|
|
701
|
+
} from '@slotted/react/result-state';
|
|
702
|
+
import { Stack } from '@slotted/react/stack';
|
|
703
|
+
import { TextField } from '@slotted/react/text-field';
|
|
704
|
+
import { Text } from '@slotted/react/typography';
|
|
705
|
+
|
|
706
|
+
const ORDERS = [
|
|
707
|
+
{ id: 'SO-10482', customer: 'Harbor & Pine' },
|
|
708
|
+
{ id: 'SO-10483', customer: 'Brightline Studio' },
|
|
709
|
+
{ id: 'SO-10484', customer: 'Northgate Labs' },
|
|
710
|
+
{ id: 'SO-10485', customer: 'Verde Kitchen' },
|
|
711
|
+
];
|
|
712
|
+
|
|
713
|
+
export default function ResultStateSearch() {
|
|
714
|
+
const [query, setQuery] = useState('Contoso');
|
|
715
|
+
const needle = query.trim().toLowerCase();
|
|
716
|
+
const rows = ORDERS.filter((order) =>
|
|
717
|
+
`${order.id} ${order.customer}`.toLowerCase().includes(needle),
|
|
718
|
+
);
|
|
719
|
+
|
|
720
|
+
return (
|
|
721
|
+
<Stack gap={4}>
|
|
722
|
+
<Field>
|
|
723
|
+
<FieldLabel>Search orders</FieldLabel>
|
|
724
|
+
<TextField onValueChange={setQuery} value={query} />
|
|
725
|
+
</Field>
|
|
726
|
+
{rows.length === 0 ? (
|
|
727
|
+
<ResultState status="no-results">
|
|
728
|
+
<ResultStateContent>
|
|
729
|
+
<ResultStateTitle>No orders match this search</ResultStateTitle>
|
|
730
|
+
<ResultStateDescription>
|
|
731
|
+
Clear the search to see all {ORDERS.length} orders.
|
|
732
|
+
</ResultStateDescription>
|
|
733
|
+
</ResultStateContent>
|
|
734
|
+
<ResultStateActions>
|
|
735
|
+
<Button onClick={() => setQuery('')} variant="outline">
|
|
736
|
+
Clear search
|
|
737
|
+
</Button>
|
|
738
|
+
</ResultStateActions>
|
|
739
|
+
</ResultState>
|
|
740
|
+
) : (
|
|
741
|
+
<Stack gap={2}>
|
|
742
|
+
{rows.map((order) => (
|
|
743
|
+
<Text key={order.id}>
|
|
744
|
+
{order.id} · {order.customer}
|
|
745
|
+
</Text>
|
|
746
|
+
))}
|
|
747
|
+
</Stack>
|
|
748
|
+
)}
|
|
749
|
+
</Stack>
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
```
|