@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
|
@@ -15,10 +15,14 @@ import {
|
|
|
15
15
|
|
|
16
16
|
## Minimal example
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Example
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
|
|
21
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
22
|
+
|
|
23
|
+
export default function InlineMessageBasic() {
|
|
24
|
+
return <InlineMessage tone="danger">Enter the tax ID printed on the invoice.</InlineMessage>;
|
|
25
|
+
}
|
|
22
26
|
```
|
|
23
27
|
|
|
24
28
|
## Anatomy
|
|
@@ -35,21 +39,22 @@ Excerpt — not a complete module
|
|
|
35
39
|
|
|
36
40
|
| Name | Type | Default | Applies to | Description |
|
|
37
41
|
| --- | --- | --- | --- | --- |
|
|
38
|
-
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | InlineMessage | What the message is about, and therefore which mark it draws and which word a reader hears first. secondary is help: no mark, no word, and the neutral muted ink |
|
|
39
|
-
| `size` | `'sm' \| 'md'` | sm | InlineMessage | The type step. sm beside a compact field, md beside a large field; both read the control scales, which the theme restates per density |
|
|
40
|
-
| `live` | `'off' \| 'polite' \| 'assertive'` | off | InlineMessage | Whether the message announces itself. polite writes role="status" and assertive writes role="alert", both on this element
|
|
41
|
-
| `mark` | `'glyph' \| 'dot' \| 'none'` | glyph | InlineMessage | Which mark is drawn. glyph is the tone’s own silhouette; dot is one neutral bullet in the tone’s ink, the same shape for every tone including help; none draws nothing, and the tone is said by the ink and the weight of the sentence. Field and FieldGroup ask for none, because a silhouette under every control of a form is texture rather than a warning |
|
|
42
|
-
| `prefix` | `string` | — | InlineMessage | The word read before the message. Unstated is the tone’s own; the empty string removes it, for a sentence that already names the severity |
|
|
43
|
-
| `hideIcon` | `boolean` | false | InlineMessage | Draws no mark at all. The severity word stays, because it is what a reader hears rather than what a reader sees |
|
|
44
|
-
| `icon` | `ReactNode` | — | InlineMessage | Replaces the tone’s mark, keeping its box, its size and its place on the first line. Angular projects an element carrying slInlineMessageIcon instead |
|
|
45
|
-
| `loading` | `boolean` | false | InlineMessage | The message is waiting for something: the mark becomes a ring turning at the same duration Button’s does, and stopping under reduced motion |
|
|
46
|
-
| `disabled` | `boolean` | — | InlineMessage | Unstated rather than false, so
|
|
47
|
-
| `reserve` | `boolean` | false | InlineMessage | Holds one line box of
|
|
48
|
-
| `id` | `string` | generated | InlineMessage | What aria-describedby or aria-errormessage points at.
|
|
49
|
-
| `render` | `(props) => ReactNode` | — | InlineMessage | Substitutes the rendered element and hands it every data attribute. A ul is how one message carries a list of failures instead of a sentence |
|
|
50
|
-
| `ref` | `Ref<HTMLParagraphElement>` | — | InlineMessage | Reaches the element. There is no imperative handle beyond it:
|
|
51
|
-
| `InlineMessageDefaultsProvider` | `{ tone, size, live, prefixes }` | — | a subtree | Sets the
|
|
52
|
-
| `
|
|
42
|
+
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | InlineMessage | What the message is about, and therefore which mark it draws and which word a reader hears first. secondary is help: no mark, no word, and the neutral muted ink. |
|
|
43
|
+
| `size` | `'sm' \| 'md'` | sm | InlineMessage | The type step. sm beside a compact field, md beside a large field; both read the control scales, which the theme restates per density. |
|
|
44
|
+
| `live` | `'off' \| 'polite' \| 'assertive'` | off | InlineMessage | Whether the message announces itself. polite writes role="status" and assertive writes role="alert", both on this element, or on the sentence when the message holds actions. |
|
|
45
|
+
| `mark` | `'glyph' \| 'dot' \| 'none'` | glyph | InlineMessage | Which mark is drawn. glyph is the tone’s own silhouette; dot is one neutral bullet in the tone’s ink, the same shape for every tone including help; none draws nothing, and the tone is said by the ink and the weight of the sentence. Field and FieldGroup ask for none, because a silhouette under every control of a form is texture rather than a warning. |
|
|
46
|
+
| `prefix` | `string` | — | InlineMessage | The word read before the message. Unstated is the tone’s own; the empty string removes it, for a sentence that already names the severity. |
|
|
47
|
+
| `hideIcon` | `boolean` | false | InlineMessage | Draws no mark at all. The severity word stays, because it is what a reader hears rather than what a reader sees. |
|
|
48
|
+
| `icon` | `ReactNode` | — | InlineMessage | Replaces the tone’s mark, keeping its box, its size and its place on the first line. Angular projects an element carrying slInlineMessageIcon instead. |
|
|
49
|
+
| `loading` | `boolean` | false | InlineMessage | The message is waiting for something: the mark becomes a ring turning at the same duration Button’s does, and stopping under reduced motion. |
|
|
50
|
+
| `disabled` | `boolean` | — | InlineMessage | Unstated rather than false, so a Field around the message can answer it. Stated, it wins: the ink is muted and the ring stops. |
|
|
51
|
+
| `reserve` | `boolean` | false | InlineMessage | Holds one line box of InlineMessage’s own leading open whether or not there is a message, so a form rendering the message unconditionally never moves when the error arrives. |
|
|
52
|
+
| `id` | `string` | generated | InlineMessage | What aria-describedby or aria-errormessage points at. InlineMessage generates one from useId when the page states none, so the element is always addressable. |
|
|
53
|
+
| `render` | `(props) => ReactNode` | — | InlineMessage | Substitutes the rendered element and hands it every data attribute. A ul is how one message carries a list of failures instead of a sentence. |
|
|
54
|
+
| `ref` | `Ref<HTMLParagraphElement>` | — | InlineMessage | Reaches the element. There is no imperative handle beyond it: InlineMessage holds no state and moves nothing, so there is nothing to call. |
|
|
55
|
+
| `InlineMessageDefaultsProvider` | `{ tone, size, mark, live, prefixes }` | — | a subtree | Sets the axes once, and the table of severity words, merged over the shipped one so a single word can be replaced alone. |
|
|
56
|
+
| `InlineMessageActions` | `component` | — | InlineMessage | Holds the answers the message offers, after its sentence. The buttons inside take the size of the message. |
|
|
57
|
+
| `children` | `ReactNode` | — | InlineMessage | The sentence, wrapped by InlineMessage in the text part. Undefined or an empty string leaves that part empty, which is what reserve draws nothing in. |
|
|
53
58
|
|
|
54
59
|
## Axes and defaults
|
|
55
60
|
|
|
@@ -62,14 +67,14 @@ Excerpt — not a complete module
|
|
|
62
67
|
|
|
63
68
|
## Rules
|
|
64
69
|
|
|
65
|
-
- A message about a section, a page or
|
|
70
|
+
- A message about a section, a page or the outcome of a command belongs in an Alert. InlineMessage is the message of one field or one control, under or beside it.
|
|
66
71
|
- There is no WAI-ARIA APG pattern for a message attached to a field. Three documents cover it between them: the APG Alert Pattern (w3.org/WAI/ARIA/apg/patterns/alert/) for the announcing behavior, MDN’s aria-errormessage reference for the wiring, and WCAG 2.2 Understanding 3.3.1 Error Identification for the requirement that the error be identified in text.
|
|
67
|
-
- The severity is a word, not only a color and a mark. A reader who cannot see the message hears the sentence and nothing else, so
|
|
68
|
-
- The live role goes on the message itself. Alert puts its role on an inner part because it has a dismiss button beside its text and MDN’s alert role reference restricts the role to text content;
|
|
69
|
-
- Wiring is the control’s job and the identifier is
|
|
70
|
-
- The mark is aria-hidden, because it repeats what the severity word already says. Under forced colors it keeps its silhouette in CanvasText — the
|
|
71
|
-
- A disabled message is muted to a measured color rather than faded by opacity, and its ring stops:
|
|
72
|
-
-
|
|
72
|
+
- The severity is a word, not only a color and a mark. A reader who cannot see the message hears the sentence and nothing else, so InlineMessage writes “Error:”, “Warning:” or “Success:” in clipped text before it — GOV.UK’s Error message component publishes the idea for errors, and this generalizes it to every severity and to a table an application replaces once through the provider.
|
|
73
|
+
- The live role goes on the message itself. Alert puts its role on an inner part because it has a dismiss button beside its text and MDN’s alert role reference restricts the role to text content; InlineMessage without actions owns no controls, so the element that is the text is the element that announces. With actions, the live role moves to the sentence. live defaults to off, because a message already present when the page finishes loading is announced by nothing whatever role it carries.
|
|
74
|
+
- Wiring is the control’s job and the identifier is InlineMessage’s. MDN: set aria-invalid="true" on the control, then aria-errormessage to the id of the element holding the message. InlineMessage generates an id with useId when the page states none, and never replaces one the page wrote.
|
|
75
|
+
- The mark is aria-hidden, because it repeats what the severity word already says. Under forced colors it keeps its silhouette in CanvasText — the mark of each severity has a shape of its own, which is what tells an error from a note when every color has been replaced, which is WCAG 2.2 1.4.1.
|
|
76
|
+
- A disabled message is muted to a measured color rather than faded by opacity, and its ring stops: disabled takes precedence over loading, and a control nobody can use is not waiting for anything. Nothing is removed from the accessibility tree, because a message about a disabled field is still a message.
|
|
77
|
+
- InlineMessage never becomes a tooltip. The message is visible text in the flow of the page, which is the requirement WCAG 2.2 3.3.1 states and the one a hover-only error fails for every reader who does not hover.
|
|
73
78
|
|
|
74
79
|
## Tokens
|
|
75
80
|
|
|
@@ -77,98 +82,214 @@ Excerpt — not a complete module
|
|
|
77
82
|
|
|
78
83
|
## Examples
|
|
79
84
|
|
|
80
|
-
###
|
|
85
|
+
### Playground
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
One message with every axis on it, driven by the controls below the canvas. Change the tone and both the mark and the word a screen reader hears change with it.
|
|
83
88
|
|
|
84
89
|
Excerpt — not a complete module
|
|
85
90
|
|
|
86
91
|
```tsx
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
<InlineMessage tone="danger">Enter a valid EIN to continue.</InlineMessage>;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### What the message is about
|
|
96
|
+
|
|
97
|
+
Three severities, two tones for information, and help. secondary is help: no mark, no severity word, and the neutral muted ink rather than a tone’s louder label color.
|
|
98
|
+
|
|
99
|
+
Example
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
103
|
+
import { Stack } from '@slotted/react/stack';
|
|
104
|
+
|
|
105
|
+
export default function InlineMessageTones() {
|
|
106
|
+
return (
|
|
107
|
+
<Stack gap={2}>
|
|
108
|
+
<InlineMessage tone="secondary">Use the SKU printed on the shelf label.</InlineMessage>
|
|
109
|
+
<InlineMessage tone="accent">Prices are shown in euros.</InlineMessage>
|
|
110
|
+
<InlineMessage tone="info">Carrier rates were updated on Monday.</InlineMessage>
|
|
111
|
+
<InlineMessage tone="success">Pickup scheduled for 09:30.</InlineMessage>
|
|
112
|
+
<InlineMessage tone="warning">Only 4 units are left at this location.</InlineMessage>
|
|
113
|
+
<InlineMessage tone="danger">This SKU is already registered.</InlineMessage>
|
|
114
|
+
</Stack>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
91
117
|
```
|
|
92
118
|
|
|
93
119
|
### The step the message sits at
|
|
94
120
|
|
|
95
121
|
sm sits beside a compact field and md beside a large field. Both read the control scales, so switching the toolbar to dense shrinks them with the rows around them.
|
|
96
122
|
|
|
97
|
-
|
|
123
|
+
Example
|
|
98
124
|
|
|
99
125
|
```tsx
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
126
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
127
|
+
import { Stack } from '@slotted/react/stack';
|
|
128
|
+
|
|
129
|
+
export default function InlineMessageSizes() {
|
|
130
|
+
return (
|
|
131
|
+
<Stack gap={3}>
|
|
132
|
+
<InlineMessage size="sm" tone="danger">
|
|
133
|
+
The reorder point must be a whole number.
|
|
134
|
+
</InlineMessage>
|
|
135
|
+
<InlineMessage size="md" tone="danger">
|
|
136
|
+
The reorder point must be lower than the stock ceiling.
|
|
137
|
+
</InlineMessage>
|
|
138
|
+
</Stack>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
106
141
|
```
|
|
107
142
|
|
|
108
143
|
### A message that is still waiting
|
|
109
144
|
|
|
110
145
|
The mark becomes a ring turning in the same box, so the wait becomes its answer with no geometry moving. Under reduced motion the ring stops rather than slows.
|
|
111
146
|
|
|
112
|
-
|
|
147
|
+
Example
|
|
113
148
|
|
|
114
149
|
```tsx
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
150
|
+
import { useState } from 'react';
|
|
151
|
+
|
|
152
|
+
import { Button } from '@slotted/react/button';
|
|
153
|
+
import { Inline } from '@slotted/react/inline';
|
|
154
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
155
|
+
import { Stack } from '@slotted/react/stack';
|
|
156
|
+
|
|
157
|
+
type Check = 'checking' | 'done' | 'idle';
|
|
158
|
+
|
|
159
|
+
const SENTENCES: Record<Check, string> = {
|
|
160
|
+
checking: 'Checking stock in Rotterdam…',
|
|
161
|
+
done: '142 units in stock in Rotterdam.',
|
|
162
|
+
idle: '',
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export default function InlineMessagePending() {
|
|
166
|
+
const [check, setCheck] = useState<Check>('idle');
|
|
167
|
+
|
|
168
|
+
function handleCheck() {
|
|
169
|
+
setCheck('checking');
|
|
170
|
+
setTimeout(() => setCheck('done'), 1800);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<Stack gap={3}>
|
|
175
|
+
<Inline gap={2}>
|
|
176
|
+
<Button disabled={check === 'checking'} onClick={handleCheck} variant="outline">
|
|
177
|
+
Check stock in Rotterdam
|
|
178
|
+
</Button>
|
|
179
|
+
</Inline>
|
|
180
|
+
<InlineMessage
|
|
181
|
+
live="polite"
|
|
182
|
+
loading={check === 'checking'}
|
|
183
|
+
reserve
|
|
184
|
+
tone={check === 'done' ? 'success' : 'secondary'}
|
|
185
|
+
>
|
|
186
|
+
{SENTENCES[check]}
|
|
187
|
+
</InlineMessage>
|
|
188
|
+
</Stack>
|
|
189
|
+
);
|
|
190
|
+
}
|
|
124
191
|
```
|
|
125
192
|
|
|
126
193
|
### Pointing a control at the message
|
|
127
194
|
|
|
128
|
-
The three attributes that make an error reach a reader: aria-invalid on the control, aria-errormessage at the message’s id, and an id
|
|
195
|
+
The three attributes that make an error reach a reader: aria-invalid on the control, aria-errormessage at the message’s id, and an id InlineMessage generates when the page states none.
|
|
129
196
|
|
|
130
|
-
|
|
197
|
+
Example
|
|
131
198
|
|
|
132
199
|
```tsx
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
200
|
+
import { useId } from 'react';
|
|
201
|
+
|
|
202
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
203
|
+
import { Stack } from '@slotted/react/stack';
|
|
204
|
+
import { TextField } from '@slotted/react/text-field';
|
|
205
|
+
|
|
206
|
+
export default function InlineMessageWiring() {
|
|
207
|
+
const messageId = useId();
|
|
208
|
+
|
|
209
|
+
return (
|
|
210
|
+
<Stack gap={2}>
|
|
211
|
+
<TextField aria-errormessage={messageId} aria-label="EIN" defaultValue="12-345678" invalid />
|
|
212
|
+
<InlineMessage id={messageId} tone="danger">
|
|
213
|
+
The EIN has 8 digits and needs 9.
|
|
214
|
+
</InlineMessage>
|
|
215
|
+
</Stack>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
142
218
|
```
|
|
143
219
|
|
|
144
220
|
### What a reader hears, and when
|
|
145
221
|
|
|
146
222
|
off by default, because a message already on the page when it loads is announced by nothing. Press the button and the message arrives while the reader is elsewhere, which is what polite is for.
|
|
147
223
|
|
|
148
|
-
|
|
224
|
+
Example
|
|
149
225
|
|
|
150
226
|
```tsx
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
227
|
+
import { useState } from 'react';
|
|
228
|
+
|
|
229
|
+
import { Button } from '@slotted/react/button';
|
|
230
|
+
import { Inline } from '@slotted/react/inline';
|
|
231
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
232
|
+
import { Stack } from '@slotted/react/stack';
|
|
233
|
+
|
|
234
|
+
type Status = 'failed' | 'idle' | 'saved';
|
|
235
|
+
|
|
236
|
+
export default function InlineMessageLive() {
|
|
237
|
+
const [status, setStatus] = useState<Status>('idle');
|
|
238
|
+
|
|
239
|
+
return (
|
|
240
|
+
<Stack gap={4}>
|
|
241
|
+
<Inline gap={2}>
|
|
242
|
+
<Button onClick={() => setStatus('saved')} variant="outline">
|
|
243
|
+
Save prices
|
|
244
|
+
</Button>
|
|
245
|
+
<Button onClick={() => setStatus('failed')} variant="outline">
|
|
246
|
+
Lose connection
|
|
247
|
+
</Button>
|
|
248
|
+
</Inline>
|
|
249
|
+
<InlineMessage live="polite" reserve tone="success">
|
|
250
|
+
{status === 'saved' ? 'Changes to 214 products are live.' : ''}
|
|
251
|
+
</InlineMessage>
|
|
252
|
+
<InlineMessage live="assertive" reserve tone="danger">
|
|
253
|
+
{status === 'failed' ? 'Price changes are not being saved.' : ''}
|
|
254
|
+
</InlineMessage>
|
|
255
|
+
</Stack>
|
|
256
|
+
);
|
|
257
|
+
}
|
|
156
258
|
```
|
|
157
259
|
|
|
158
260
|
### Holding the line open
|
|
159
261
|
|
|
160
262
|
Both columns render the message unconditionally; only the right one has something to say. The two second fields sit at the same height, because the empty message keeps its line and draws nothing in it.
|
|
161
263
|
|
|
162
|
-
|
|
264
|
+
Example
|
|
163
265
|
|
|
164
266
|
```tsx
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
267
|
+
import { Inline } from '@slotted/react/inline';
|
|
268
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
269
|
+
import { Stack } from '@slotted/react/stack';
|
|
270
|
+
import { TextField } from '@slotted/react/text-field';
|
|
271
|
+
|
|
272
|
+
export default function InlineMessageReserve() {
|
|
273
|
+
return (
|
|
274
|
+
<Inline gap={4}>
|
|
275
|
+
<Stack gap={2}>
|
|
276
|
+
<TextField aria-label="Units, Rotterdam" defaultValue="120" />
|
|
277
|
+
<InlineMessage reserve tone="danger" />
|
|
278
|
+
<TextField aria-label="Reorder point, Rotterdam" defaultValue="40" />
|
|
279
|
+
</Stack>
|
|
280
|
+
<Stack gap={2}>
|
|
281
|
+
<TextField aria-label="Units, Antwerp" defaultValue="900" />
|
|
282
|
+
<InlineMessage reserve tone="danger">
|
|
283
|
+
Order at most 500 units at once.
|
|
284
|
+
</InlineMessage>
|
|
285
|
+
<TextField aria-label="Reorder point, Antwerp" defaultValue="60" />
|
|
286
|
+
</Stack>
|
|
287
|
+
</Inline>
|
|
288
|
+
);
|
|
289
|
+
}
|
|
169
290
|
```
|
|
170
291
|
|
|
171
|
-
### Content
|
|
292
|
+
### Content you write
|
|
172
293
|
|
|
173
294
|
A German compound over three lines, a container digest with no break opportunity, a sentence carrying a link, and the page’s own artwork — the mark stays on the first line in all four.
|
|
174
295
|
|
|
@@ -176,7 +297,7 @@ Excerpt — not a complete module
|
|
|
176
297
|
|
|
177
298
|
```tsx
|
|
178
299
|
<InlineMessage tone="secondary">
|
|
179
|
-
We accept credit card, ACH transfer and Zelle. <Link href="/
|
|
300
|
+
We accept credit card, ACH transfer and Zelle. <Link href="/fees">View fees</Link>
|
|
180
301
|
</InlineMessage>;
|
|
181
302
|
```
|
|
182
303
|
|
|
@@ -210,3 +331,125 @@ Excerpt — not a complete module
|
|
|
210
331
|
<InlineMessage prefix="Error:" tone="danger" />;
|
|
211
332
|
<InlineMessage prefix="" tone="danger" />;
|
|
212
333
|
```
|
|
334
|
+
|
|
335
|
+
### actions.tsx
|
|
336
|
+
|
|
337
|
+
Example
|
|
338
|
+
|
|
339
|
+
```tsx
|
|
340
|
+
import { useState } from 'react';
|
|
341
|
+
|
|
342
|
+
import { Button } from '@slotted/react/button';
|
|
343
|
+
import { InlineMessage, InlineMessageActions } from '@slotted/react/inline-message';
|
|
344
|
+
|
|
345
|
+
export default function InlineMessageActionsExample() {
|
|
346
|
+
const [quantity, setQuantity] = useState<number | null>(null);
|
|
347
|
+
|
|
348
|
+
if (quantity !== null) {
|
|
349
|
+
return (
|
|
350
|
+
<InlineMessage live="polite" size="md" tone="success">
|
|
351
|
+
Quantity set to {quantity}.
|
|
352
|
+
</InlineMessage>
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
return (
|
|
357
|
+
<InlineMessage live="polite" size="md" tone="warning">
|
|
358
|
+
Order 4821 lists 240 units. Did you mean 24?
|
|
359
|
+
<InlineMessageActions>
|
|
360
|
+
<Button onClick={() => setQuantity(24)} variant="outline">
|
|
361
|
+
Use 24
|
|
362
|
+
</Button>
|
|
363
|
+
<Button onClick={() => setQuantity(240)} variant="ghost">
|
|
364
|
+
Keep 240
|
|
365
|
+
</Button>
|
|
366
|
+
</InlineMessageActions>
|
|
367
|
+
</InlineMessage>
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### marks.tsx
|
|
373
|
+
|
|
374
|
+
Example
|
|
375
|
+
|
|
376
|
+
```tsx
|
|
377
|
+
import { Glyph, Icon } from '@slotted/react/icon';
|
|
378
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
379
|
+
import { Stack } from '@slotted/react/stack';
|
|
380
|
+
|
|
381
|
+
export default function InlineMessageMarks() {
|
|
382
|
+
return (
|
|
383
|
+
<Stack gap={2}>
|
|
384
|
+
<InlineMessage mark="glyph" tone="warning">
|
|
385
|
+
Carrier pickup moved to 14:00.
|
|
386
|
+
</InlineMessage>
|
|
387
|
+
<InlineMessage mark="dot" tone="warning">
|
|
388
|
+
Pallet 118 is missing a label.
|
|
389
|
+
</InlineMessage>
|
|
390
|
+
<InlineMessage mark="none" tone="warning">
|
|
391
|
+
Dock 3 closes at 18:00.
|
|
392
|
+
</InlineMessage>
|
|
393
|
+
<InlineMessage hideIcon tone="warning">
|
|
394
|
+
Two orders share one delivery slot.
|
|
395
|
+
</InlineMessage>
|
|
396
|
+
<InlineMessage
|
|
397
|
+
icon={
|
|
398
|
+
<Icon>
|
|
399
|
+
<Glyph name="clock" />
|
|
400
|
+
</Icon>
|
|
401
|
+
}
|
|
402
|
+
tone="warning"
|
|
403
|
+
>
|
|
404
|
+
Orders placed after 16:00 ship tomorrow.
|
|
405
|
+
</InlineMessage>
|
|
406
|
+
</Stack>
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### prefix.tsx
|
|
412
|
+
|
|
413
|
+
Example
|
|
414
|
+
|
|
415
|
+
```tsx
|
|
416
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
417
|
+
import { Stack } from '@slotted/react/stack';
|
|
418
|
+
|
|
419
|
+
export default function InlineMessagePrefix() {
|
|
420
|
+
return (
|
|
421
|
+
<Stack gap={2}>
|
|
422
|
+
<InlineMessage tone="danger">Enter a valid tax ID.</InlineMessage>
|
|
423
|
+
<InlineMessage prefix="Overdue:" tone="danger">
|
|
424
|
+
Invoice 4822 was due on March 3.
|
|
425
|
+
</InlineMessage>
|
|
426
|
+
<InlineMessage prefix="" tone="danger">
|
|
427
|
+
Error: the tax ID needs 9 digits.
|
|
428
|
+
</InlineMessage>
|
|
429
|
+
</Stack>
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### states.tsx
|
|
435
|
+
|
|
436
|
+
Example
|
|
437
|
+
|
|
438
|
+
```tsx
|
|
439
|
+
import { InlineMessage } from '@slotted/react/inline-message';
|
|
440
|
+
import { Stack } from '@slotted/react/stack';
|
|
441
|
+
|
|
442
|
+
export default function InlineMessageStates() {
|
|
443
|
+
return (
|
|
444
|
+
<Stack gap={2}>
|
|
445
|
+
<InlineMessage loading>Checking the carrier rates…</InlineMessage>
|
|
446
|
+
<InlineMessage disabled tone="danger">
|
|
447
|
+
The address cannot be edited while the order ships.
|
|
448
|
+
</InlineMessage>
|
|
449
|
+
<InlineMessage disabled loading>
|
|
450
|
+
Syncing stock counts…
|
|
451
|
+
</InlineMessage>
|
|
452
|
+
</Stack>
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
```
|
package/dist/docs/inline.json
CHANGED
|
@@ -71,45 +71,45 @@
|
|
|
71
71
|
"type": "0 | 1 | … | 12",
|
|
72
72
|
"defaultValue": "4",
|
|
73
73
|
"appliesTo": "Inline",
|
|
74
|
-
"description": "
|
|
74
|
+
"description": "Sets the separation between items as a step on the space scale."
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"name": "align",
|
|
78
78
|
"type": "'start' | 'center' | 'end' | 'stretch' | 'baseline'",
|
|
79
79
|
"defaultValue": "center",
|
|
80
80
|
"appliesTo": "Inline",
|
|
81
|
-
"description": "Positions items across the
|
|
81
|
+
"description": "Positions items across the row, along the block axis. baseline puts their text on one line."
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"name": "justify",
|
|
85
85
|
"type": "'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'",
|
|
86
86
|
"defaultValue": "—",
|
|
87
87
|
"appliesTo": "Inline",
|
|
88
|
-
"description": "Positions items along the
|
|
88
|
+
"description": "Positions items along the row and distributes the free space between them."
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"name": "wrap",
|
|
92
92
|
"type": "'wrap' | 'nowrap'",
|
|
93
93
|
"defaultValue": "wrap",
|
|
94
94
|
"appliesTo": "Inline",
|
|
95
|
-
"description": "nowrap keeps one line
|
|
95
|
+
"description": "Decides what happens when the row is full. nowrap keeps one line and overflows a container narrower than it."
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"name": "render",
|
|
99
99
|
"type": "(props) => ReactNode",
|
|
100
100
|
"defaultValue": "—",
|
|
101
101
|
"appliesTo": "Inline",
|
|
102
|
-
"description": "Renders a different root element"
|
|
102
|
+
"description": "Renders a different root element from the props it receives."
|
|
103
103
|
}
|
|
104
104
|
],
|
|
105
105
|
"composition": [],
|
|
106
106
|
"events": [],
|
|
107
107
|
"accessibility": [
|
|
108
|
-
"Inline has no role and no ARIA. It arranges what
|
|
108
|
+
"Inline has no role and no ARIA. It arranges what you write inside it, and the items keep whatever semantics they already had.",
|
|
109
109
|
"There is no axis that reverses the items. Visual order stays DOM order, which is what WCAG 2.2 SC 1.3.2 asks for (technique C27, failure F1) and what keeps the Tab order matching the page.",
|
|
110
|
-
"Wrapping is the default because a row that cannot wrap has one answer to a narrow container: overflow it.
|
|
110
|
+
"Wrapping is the default because a row that cannot wrap has one answer to a narrow container: overflow it. nowrap accepts that overflow, so check WCAG 1.4.10 Reflow before choosing it.",
|
|
111
111
|
"baseline is the alignment for items that carry text of different sizes. It puts the type on one line where centering only puts the boxes there.",
|
|
112
|
-
"Alignment and distribution use the logical keywords, so a right-to-left document is the same
|
|
112
|
+
"Alignment and distribution use the logical keywords, so a right-to-left document is the same row mirrored."
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
115
|
},
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"title": "Cancel and confirm, pushed apart",
|
|
134
134
|
"note": null,
|
|
135
135
|
"language": "tsx",
|
|
136
|
-
"source": "<Inline gap={4} justify=\"between\">\n <Button
|
|
136
|
+
"source": "<Inline gap={4} justify=\"between\">\n <Button tone=\"secondary\" variant=\"outline\">\n Cancel\n </Button>\n <Button>Save changes</Button>\n</Inline>;\n",
|
|
137
137
|
"verdict": "excerpt"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
@@ -151,6 +151,62 @@
|
|
|
151
151
|
"language": "tsx",
|
|
152
152
|
"source": "<Inline align=\"baseline\" gap={5}>\n <Text tone=\"muted\">Status</Text>\n <Text size=\"lg\" weight=\"semibold\">\n Awaiting review\n </Text>\n</Inline>;\n",
|
|
153
153
|
"verdict": "excerpt"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "align",
|
|
157
|
+
"title": "align.tsx",
|
|
158
|
+
"note": null,
|
|
159
|
+
"language": "tsx",
|
|
160
|
+
"source": "import { Badge } from '@slotted/react/badge';\nimport { Button } from '@slotted/react/button';\nimport { Card, CardBody, CardHeader } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nconst ALIGNS = ['start', 'center', 'end', 'stretch'] as const;\n\nexport default function InlineAlign() {\n return (\n <Stack gap={4}>\n {ALIGNS.map((align) => (\n <Card key={align}>\n <CardHeader>\n <Heading level={2} size=\"sm\">\n align {align}\n </Heading>\n </CardHeader>\n <CardBody>\n <Inline align={align}>\n <Text size=\"3xl\" weight=\"semibold\">\n 14\n </Text>\n <Badge tone=\"warning\">Late pickups</Badge>\n <Button tone=\"secondary\" variant=\"outline\">\n Review\n </Button>\n </Inline>\n </CardBody>\n </Card>\n ))}\n </Stack>\n );\n}\n",
|
|
161
|
+
"verdict": "example"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "baseline",
|
|
165
|
+
"title": "baseline.tsx",
|
|
166
|
+
"note": null,
|
|
167
|
+
"language": "tsx",
|
|
168
|
+
"source": "import { Card, CardBody, CardHeader } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nconst ALIGNS = ['center', 'baseline'] as const;\n\nexport default function InlineBaseline() {\n return (\n <Stack gap={4}>\n {ALIGNS.map((align) => (\n <Card key={align}>\n <CardHeader>\n <Heading level={2} size=\"sm\">\n align {align}\n </Heading>\n </CardHeader>\n <CardBody>\n <Inline align={align} gap={3}>\n <Text tone=\"muted\">Open invoices</Text>\n <Text numeric=\"tabular\" size=\"3xl\" weight=\"semibold\">\n $48,200\n </Text>\n <Text size=\"sm\" tone=\"muted\">\n across 14 customers\n </Text>\n </Inline>\n </CardBody>\n </Card>\n ))}\n </Stack>\n );\n}\n",
|
|
169
|
+
"verdict": "example"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "basic",
|
|
173
|
+
"title": "basic.tsx",
|
|
174
|
+
"note": null,
|
|
175
|
+
"language": "tsx",
|
|
176
|
+
"source": "import { Avatar } from '@slotted/react/avatar';\nimport { Badge } from '@slotted/react/badge';\nimport { Inline } from '@slotted/react/inline';\nimport { Text } from '@slotted/react/typography';\n\nexport default function InlineBasic() {\n return (\n <Inline>\n <Avatar name=\"Maria Chen\" />\n <Text weight=\"semibold\">Maria Chen</Text>\n <Badge tone=\"success\">Approver</Badge>\n <Badge tone=\"info\">Finance</Badge>\n </Inline>\n );\n}\n",
|
|
177
|
+
"verdict": "example"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": "form",
|
|
181
|
+
"title": "form.tsx",
|
|
182
|
+
"note": null,
|
|
183
|
+
"language": "tsx",
|
|
184
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Field, FieldLabel } from '@slotted/react/field';\nimport { Inline } from '@slotted/react/inline';\nimport { TextField } from '@slotted/react/text-field';\n\nexport default function InlineForm() {\n return (\n <Inline\n align=\"end\"\n gap={3}\n render={(props) => (\n <form\n {...props}\n aria-label=\"Find orders\"\n onSubmit={(event) => {\n event.preventDefault();\n }}\n />\n )}\n >\n <Field>\n <FieldLabel>Order number</FieldLabel>\n <TextField placeholder=\"SO-10482\" />\n </Field>\n <Field>\n <FieldLabel>Customer</FieldLabel>\n <TextField placeholder=\"Harbor Street store\" />\n </Field>\n <Button type=\"submit\">Search</Button>\n </Inline>\n );\n}\n",
|
|
185
|
+
"verdict": "example"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"id": "gap",
|
|
189
|
+
"title": "gap.tsx",
|
|
190
|
+
"note": null,
|
|
191
|
+
"language": "tsx",
|
|
192
|
+
"source": "import { Avatar } from '@slotted/react/avatar';\nimport { Grid } from '@slotted/react/grid';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nconst GAPS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] as const;\nconst PEOPLE = ['Maria Chen', 'Tomas Reyes', 'Priya Nair'] as const;\n\nexport default function InlineGap() {\n return (\n <Grid columns={2} gap={5} minItemWidth=\"sm\">\n {GAPS.map((gap) => (\n <Stack key={gap} gap={1}>\n <Text size=\"xs\" tone=\"muted\">\n Gap {gap}\n </Text>\n <Inline gap={gap}>\n {PEOPLE.map((person) => (\n <Avatar key={person} name={person} size=\"sm\" />\n ))}\n </Inline>\n </Stack>\n ))}\n </Grid>\n );\n}\n",
|
|
193
|
+
"verdict": "example"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "justify",
|
|
197
|
+
"title": "justify.tsx",
|
|
198
|
+
"note": null,
|
|
199
|
+
"language": "tsx",
|
|
200
|
+
"source": "import { Badge } from '@slotted/react/badge';\nimport { Card, CardBody, CardHeader } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading } from '@slotted/react/typography';\n\nconst JUSTIFIES = ['start', 'center', 'end', 'between', 'around', 'evenly'] as const;\n\nexport default function InlineJustify() {\n return (\n <Stack gap={4}>\n {JUSTIFIES.map((justify) => (\n <Card key={justify}>\n <CardHeader>\n <Heading level={2} size=\"sm\">\n justify {justify}\n </Heading>\n </CardHeader>\n <CardBody>\n <Inline justify={justify}>\n <Badge tone=\"info\">Packed</Badge>\n <Badge tone=\"warning\">Shipped</Badge>\n <Badge tone=\"success\">Delivered</Badge>\n </Inline>\n </CardBody>\n </Card>\n ))}\n </Stack>\n );\n}\n",
|
|
201
|
+
"verdict": "example"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "wrap",
|
|
205
|
+
"title": "wrap.tsx",
|
|
206
|
+
"note": null,
|
|
207
|
+
"language": "tsx",
|
|
208
|
+
"source": "import { Badge } from '@slotted/react/badge';\nimport { Card, CardBody, CardHeader } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading } from '@slotted/react/typography';\n\nconst WRAPS = ['wrap', 'nowrap'] as const;\nconst LABELS = [\n 'Wholesale',\n 'Fragile',\n 'Priority shipping',\n 'Refrigerated',\n 'Hazardous materials',\n 'Signature required',\n] as const;\n\nexport default function InlineWrap() {\n return (\n <Stack gap={4}>\n {WRAPS.map((wrap) => (\n <Card key={wrap}>\n <CardHeader>\n <Heading level={2} size=\"sm\">\n wrap {wrap}\n </Heading>\n </CardHeader>\n <CardBody>\n <Inline gap={2} wrap={wrap}>\n {LABELS.map((label) => (\n <Badge key={label} tone=\"secondary\" variant=\"outline\">\n {label}\n </Badge>\n ))}\n </Inline>\n </CardBody>\n </Card>\n ))}\n </Stack>\n );\n}\n",
|
|
209
|
+
"verdict": "example"
|
|
154
210
|
}
|
|
155
211
|
]
|
|
156
212
|
}
|