@slotted/react 0.1.0-beta.39 → 0.1.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-CV8wKS-N.js +179 -0
- package/dist/alert.js +1 -1
- package/dist/{avatar-DLWElrgg.js → avatar-fHRva5zn.js} +1 -1
- package/dist/{avatar-group-DshHqe8B.js → avatar-group-bJaZE1_C.js} +1 -1
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/calendar-D3QZDlm0.js +598 -0
- package/dist/calendar.js +1 -1
- package/dist/clock-DzkQa57Q.js +290 -0
- package/dist/clock.js +2 -0
- package/dist/{dashboard-grid-B6jxBz4j.js → dashboard-grid-DAY_CjCW.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-Cx0ZOf_e.js → data-grid-B7UuUvBH.js} +42 -37
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-Cb2sNA6I.js → data-list-CyEq7M2D.js} +1 -1
- package/dist/data-list.js +1 -1
- package/dist/date-picker-DMcMFW_N.js +344 -0
- package/dist/date-picker.js +3 -2
- package/dist/date-range-picker-D9zo93NE.js +543 -0
- package/dist/date-range-picker.js +2 -2
- package/dist/datetime-picker-lOXZbAx_.js +462 -0
- package/dist/datetime-picker.js +2 -2
- package/dist/datetime-range-picker-DU5ctZbm.js +641 -0
- package/dist/datetime-range-picker.js +2 -2
- package/dist/divider-DUUPCIh4.js +35 -0
- package/dist/divider.js +1 -1
- package/dist/docs/alert.examples.md +500 -0
- package/dist/docs/alert.json +85 -37
- package/dist/docs/alert.md +37 -189
- package/dist/docs/aspect-ratio.json +40 -16
- package/dist/docs/aspect-ratio.md +204 -29
- package/dist/docs/avatar.json +125 -29
- package/dist/docs/avatar.md +374 -31
- package/dist/docs/badge.json +119 -23
- package/dist/docs/badge.md +436 -27
- package/dist/docs/calendar.json +53 -5
- package/dist/docs/calendar.md +7 -2
- package/dist/docs/card.json +98 -10
- package/dist/docs/card.md +468 -26
- package/dist/docs/clock.json +405 -0
- package/dist/docs/clock.md +189 -0
- package/dist/docs/container.json +54 -6
- package/dist/docs/container.md +247 -17
- package/dist/docs/date-picker.examples.md +143 -169
- package/dist/docs/date-picker.json +178 -223
- package/dist/docs/date-picker.md +44 -50
- package/dist/docs/date-range-picker.examples.md +169 -187
- package/dist/docs/date-range-picker.json +206 -337
- package/dist/docs/date-range-picker.md +52 -67
- package/dist/docs/datetime-picker.examples.md +75 -210
- package/dist/docs/datetime-picker.json +183 -410
- package/dist/docs/datetime-picker.md +50 -72
- package/dist/docs/datetime-range-picker.json +225 -502
- package/dist/docs/datetime-range-picker.md +250 -101
- package/dist/docs/divider.json +71 -7
- package/dist/docs/divider.md +281 -13
- package/dist/docs/grid.json +76 -12
- package/dist/docs/grid.md +376 -18
- package/dist/docs/index.md +1 -0
- package/dist/docs/inline-message.json +87 -40
- package/dist/docs/inline-message.md +314 -71
- package/dist/docs/inline.json +65 -9
- package/dist/docs/inline.md +276 -13
- package/dist/docs/kbd.json +76 -36
- package/dist/docs/kbd.md +346 -63
- package/dist/docs/link.json +65 -25
- package/dist/docs/link.md +317 -60
- package/dist/docs/progress-indicator.examples.md +522 -0
- package/dist/docs/progress-indicator.json +51 -27
- package/dist/docs/progress-indicator.md +13 -238
- package/dist/docs/result-state.examples.md +752 -0
- package/dist/docs/result-state.json +95 -47
- package/dist/docs/result-state.md +45 -228
- package/dist/docs/skeleton.json +70 -38
- package/dist/docs/skeleton.md +393 -71
- package/dist/docs/stack.json +57 -9
- package/dist/docs/stack.md +225 -12
- package/dist/docs/table.examples.md +6 -10
- package/dist/docs/table.json +5 -5
- package/dist/docs/table.md +1 -1
- package/dist/docs/tag.examples.md +503 -0
- package/dist/docs/tag.json +128 -32
- package/dist/docs/tag.md +27 -138
- package/dist/docs/time-picker.json +162 -300
- package/dist/docs/time-picker.md +100 -154
- package/dist/docs/time-range-picker.json +203 -465
- package/dist/docs/time-range-picker.md +125 -173
- package/dist/docs/toast.examples.md +690 -0
- package/dist/docs/toast.json +119 -71
- package/dist/docs/toast.md +44 -212
- package/dist/docs/tree.examples.md +2008 -0
- package/dist/docs/tree.json +283 -106
- package/dist/docs/tree.md +96 -328
- package/dist/docs/visually-hidden.json +38 -6
- package/dist/docs/visually-hidden.md +148 -11
- package/dist/{entity-picker-CwfA1wr_.js → entity-picker-BwJX0gNJ.js} +1 -1
- package/dist/entity-picker.js +1 -1
- package/dist/{filter-bar-b8bRNPs9.js → filter-bar-BQZFgV0A.js} +5 -3
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-C_oNc-RM.js → import-export-center-DWSEOV5Z.js} +3 -3
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +101 -99
- package/dist/{markdown-x59MHBAa.js → markdown-7wOBMXTl.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/picker-frame-_9ZqQOjf.js +43 -0
- package/dist/picker-group-CrNRKUxz.js +33 -0
- package/dist/picker-head-C_Z0tQGq.js +69 -0
- package/dist/picker-jump-BcTRIJs6.js +70 -0
- package/dist/picker-range-head-B4tsDOc5.js +100 -0
- package/dist/picker-step-MgBwF9g1.js +26 -0
- package/dist/read-title-id-DQZVWlMt.js +14 -0
- package/dist/result-state-Ct9AB01a.js +123 -0
- package/dist/result-state.js +1 -1
- package/dist/styles/app-shell.css +1 -1
- package/dist/styles/aspect-ratio.css +1 -1
- package/dist/styles/attachment.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/cascader.css +1 -1
- package/dist/styles/chart.css +1 -1
- package/dist/styles/clock.css +2 -0
- package/dist/styles/code-block.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/dashboard-grid.css +1 -1
- package/dist/styles/data-grid.css +14 -10
- package/dist/styles/data-list.css +1 -1
- package/dist/styles/date-picker.css +4 -2
- package/dist/styles/date-range-picker.css +4 -2
- package/dist/styles/datetime-picker.css +8 -2
- package/dist/styles/datetime-range-picker.css +6 -2
- package/dist/styles/detail-panel.css +3 -3
- package/dist/styles/entity-picker.css +1 -1
- package/dist/styles/event-calendar.css +1 -1
- package/dist/styles/filter-bar.css +11 -7
- package/dist/styles/grid.css +1 -1
- package/dist/styles/image.css +1 -1
- package/dist/styles/import-export-center.css +15 -11
- package/dist/styles/index.css +21 -17
- package/dist/styles/inline.css +1 -1
- package/dist/styles/loading-overlay.css +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/page-header.css +2 -2
- package/dist/styles/progress-indicator.css +1 -1
- package/dist/styles/side-navigation.css +2 -2
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/stack.css +1 -1
- package/dist/styles/stat-card.css +1 -1
- package/dist/styles/table-of-contents.css +1 -1
- package/dist/styles/table.css +14 -10
- package/dist/styles/time-picker.css +5 -1
- package/dist/styles/time-range-picker.css +5 -1
- package/dist/styles/toast.css +1 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles/tree.css +1 -1
- package/dist/styles/upload.css +1 -1
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/{table-DqwYPHGS.js → table-MGb3iZY_.js} +11 -6
- package/dist/table.js +1 -1
- package/dist/time-picker-z4GSRuha.js +313 -0
- package/dist/time-picker.js +2 -2
- package/dist/time-range-picker-ar40oPcf.js +563 -0
- package/dist/time-range-picker.js +2 -2
- package/dist/{toast-DHDVXIew.js → toast-Cg28GkqX.js} +121 -117
- package/dist/toast.js +1 -1
- package/dist/tree-CytfCFT-.js +874 -0
- package/dist/tree.js +1 -1
- package/dist/types/alert/alert-parts.d.ts +1 -1
- package/dist/types/alert/alert-parts.d.ts.map +1 -1
- package/dist/types/alert/alert.d.ts.map +1 -1
- package/dist/types/alert/alert.types.d.ts +1 -1
- package/dist/types/alert/alert.types.d.ts.map +1 -1
- package/dist/types/avatar/avatar.d.ts.map +1 -1
- package/dist/types/badge/badge.types.d.ts +1 -1
- package/dist/types/badge/badge.types.d.ts.map +1 -1
- package/dist/types/calendar/calendar-day-cell.d.ts +3 -1
- package/dist/types/calendar/calendar-day-cell.d.ts.map +1 -1
- package/dist/types/calendar/calendar-header.d.ts +9 -5
- package/dist/types/calendar/calendar-header.d.ts.map +1 -1
- package/dist/types/calendar/calendar-month-table.d.ts +8 -3
- package/dist/types/calendar/calendar-month-table.d.ts.map +1 -1
- package/dist/types/calendar/calendar.d.ts +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +12 -1
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/clock/clock-body.d.ts +16 -0
- package/dist/types/clock/clock-body.d.ts.map +1 -0
- package/dist/types/clock/clock-demo.d.ts +15 -0
- package/dist/types/clock/clock-demo.d.ts.map +1 -0
- package/dist/types/clock/clock-groups.d.ts +15 -0
- package/dist/types/clock/clock-groups.d.ts.map +1 -0
- package/dist/types/clock/clock-option.d.ts +14 -0
- package/dist/types/clock/clock-option.d.ts.map +1 -0
- package/dist/types/clock/clock-units.d.ts +13 -0
- package/dist/types/clock/clock-units.d.ts.map +1 -0
- package/dist/types/clock/clock.d.ts +11 -0
- package/dist/types/clock/clock.d.ts.map +1 -0
- package/dist/types/clock/clock.types.d.ts +66 -0
- package/dist/types/clock/clock.types.d.ts.map +1 -0
- package/dist/types/clock/index.d.ts +3 -0
- package/dist/types/clock/index.d.ts.map +1 -0
- package/dist/types/clock/use-clock-grid.d.ts +28 -0
- package/dist/types/clock/use-clock-grid.d.ts.map +1 -0
- package/dist/types/clock/use-clock-view.d.ts +16 -0
- package/dist/types/clock/use-clock-view.d.ts.map +1 -0
- package/dist/types/data-grid/data-grid-filter.d.ts.map +1 -1
- package/dist/types/date-picker/date-panel.d.ts +32 -0
- package/dist/types/date-picker/date-panel.d.ts.map +1 -0
- package/dist/types/date-picker/date-picker-demo.d.ts +8 -15
- package/dist/types/date-picker/date-picker-demo.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker-panel.d.ts +18 -0
- package/dist/types/date-picker/date-picker-panel.d.ts.map +1 -0
- package/dist/types/date-picker/date-picker.d.ts +7 -13
- package/dist/types/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.types.d.ts +15 -16
- package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
- package/dist/types/date-picker/index.d.ts +1 -1
- package/dist/types/date-picker/index.d.ts.map +1 -1
- package/dist/types/date-picker/month-picker.d.ts +12 -0
- package/dist/types/date-picker/month-picker.d.ts.map +1 -0
- package/dist/types/date-picker/use-date-panel.d.ts +50 -0
- package/dist/types/date-picker/use-date-panel.d.ts.map +1 -0
- package/dist/types/date-picker/use-date-picker.d.ts +24 -0
- package/dist/types/date-picker/use-date-picker.d.ts.map +1 -0
- package/dist/types/date-range-picker/date-range-control.d.ts +34 -0
- package/dist/types/date-range-picker/date-range-control.d.ts.map +1 -0
- package/dist/types/date-range-picker/date-range-panel.d.ts +24 -0
- package/dist/types/date-range-picker/date-range-panel.d.ts.map +1 -0
- package/dist/types/date-range-picker/date-range-picker-demo.d.ts +8 -15
- package/dist/types/date-range-picker/date-range-picker-demo.d.ts.map +1 -1
- package/dist/types/date-range-picker/date-range-picker.d.ts +11 -21
- package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/types/date-range-picker/date-range-picker.types.d.ts +12 -26
- package/dist/types/date-range-picker/date-range-picker.types.d.ts.map +1 -1
- package/dist/types/date-range-picker/index.d.ts +2 -2
- package/dist/types/date-range-picker/index.d.ts.map +1 -1
- package/dist/types/date-range-picker/range-words.d.ts +30 -0
- package/dist/types/date-range-picker/range-words.d.ts.map +1 -0
- package/dist/types/date-range-picker/use-date-range-picker.d.ts +32 -0
- package/dist/types/date-range-picker/use-date-range-picker.d.ts.map +1 -0
- package/dist/types/date-range-picker/use-range-draft.d.ts +39 -0
- package/dist/types/date-range-picker/use-range-draft.d.ts.map +1 -0
- package/dist/types/date-range-picker/use-range-panel.d.ts +71 -0
- package/dist/types/date-range-picker/use-range-panel.d.ts.map +1 -0
- package/dist/types/datetime-picker/datetime-picker-defaults.d.ts +3 -9
- package/dist/types/datetime-picker/datetime-picker-defaults.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker-demo.d.ts +8 -31
- package/dist/types/datetime-picker/datetime-picker-demo.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker-panel.d.ts +23 -0
- package/dist/types/datetime-picker/datetime-picker-panel.d.ts.map +1 -0
- package/dist/types/datetime-picker/datetime-picker.d.ts +8 -19
- package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker.types.d.ts +25 -66
- package/dist/types/datetime-picker/datetime-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-picker/index.d.ts +2 -2
- package/dist/types/datetime-picker/index.d.ts.map +1 -1
- package/dist/types/datetime-picker/use-datetime-panel.d.ts +69 -0
- package/dist/types/datetime-picker/use-datetime-panel.d.ts.map +1 -0
- package/dist/types/datetime-picker/use-datetime-picker.d.ts +22 -0
- package/dist/types/datetime-picker/use-datetime-picker.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/datetime-range-half.d.ts +20 -0
- package/dist/types/datetime-range-picker/datetime-range-half.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/datetime-range-panel.d.ts +30 -0
- package/dist/types/datetime-range-picker/datetime-range-panel.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/datetime-range-picker-defaults.d.ts +5 -7
- package/dist/types/datetime-range-picker/datetime-range-picker-defaults.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker-demo.d.ts +8 -24
- package/dist/types/datetime-range-picker/datetime-range-picker-demo.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker.d.ts +12 -24
- package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts +31 -66
- package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-words.d.ts +40 -0
- package/dist/types/datetime-range-picker/datetime-range-words.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/index.d.ts +4 -3
- package/dist/types/datetime-range-picker/index.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/use-datetime-range-draft.d.ts +43 -0
- package/dist/types/datetime-range-picker/use-datetime-range-draft.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/use-datetime-range-panel.d.ts +82 -0
- package/dist/types/datetime-range-picker/use-datetime-range-panel.d.ts.map +1 -0
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts +28 -0
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts.map +1 -0
- package/dist/types/divider/divider.d.ts +1 -1
- package/dist/types/divider/divider.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar-rules.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/picker-panel/picker-footer.d.ts +17 -0
- package/dist/types/picker-panel/picker-footer.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-frame.d.ts +21 -0
- package/dist/types/picker-panel/picker-frame.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-group.d.ts +18 -0
- package/dist/types/picker-panel/picker-group.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-head.d.ts +27 -0
- package/dist/types/picker-panel/picker-head.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-jump.d.ts +18 -0
- package/dist/types/picker-panel/picker-jump.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-layer.d.ts +14 -0
- package/dist/types/picker-panel/picker-layer.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-panel.d.ts +17 -0
- package/dist/types/picker-panel/picker-panel.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-rail.d.ts +17 -0
- package/dist/types/picker-panel/picker-rail.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-range-head.d.ts +37 -0
- package/dist/types/picker-panel/picker-range-head.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-ruler.d.ts +14 -0
- package/dist/types/picker-panel/picker-ruler.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-step.d.ts +11 -0
- package/dist/types/picker-panel/picker-step.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-trigger.d.ts +16 -0
- package/dist/types/picker-panel/picker-trigger.d.ts.map +1 -0
- package/dist/types/picker-panel/use-media-query.d.ts +3 -0
- package/dist/types/picker-panel/use-media-query.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-draft.d.ts +18 -0
- package/dist/types/picker-panel/use-picker-draft.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-layer.d.ts +31 -0
- package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-open.d.ts +14 -0
- package/dist/types/picker-panel/use-picker-open.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-position.d.ts +12 -0
- package/dist/types/picker-panel/use-picker-position.d.ts.map +1 -0
- package/dist/types/picker-panel/use-picker-value.d.ts +20 -0
- package/dist/types/picker-panel/use-picker-value.d.ts.map +1 -0
- package/dist/types/result-state/result-state.d.ts +32 -2
- package/dist/types/result-state/result-state.d.ts.map +1 -1
- package/dist/types/table/table-filter.d.ts.map +1 -1
- package/dist/types/table/table.types.d.ts +16 -14
- package/dist/types/table/table.types.d.ts.map +1 -1
- package/dist/types/tag/tag.types.d.ts +1 -1
- package/dist/types/tag/tag.types.d.ts.map +1 -1
- package/dist/types/time-picker/index.d.ts +2 -2
- package/dist/types/time-picker/index.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker-defaults.d.ts +0 -7
- package/dist/types/time-picker/time-picker-defaults.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker-demo.d.ts +15 -0
- package/dist/types/time-picker/time-picker-demo.d.ts.map +1 -0
- package/dist/types/time-picker/time-picker-panel.d.ts +17 -0
- package/dist/types/time-picker/time-picker-panel.d.ts.map +1 -0
- package/dist/types/time-picker/time-picker.d.ts +6 -14
- package/dist/types/time-picker/time-picker.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker.types.d.ts +21 -45
- package/dist/types/time-picker/time-picker.types.d.ts.map +1 -1
- package/dist/types/time-picker/use-time-panel.d.ts +42 -0
- package/dist/types/time-picker/use-time-panel.d.ts.map +1 -0
- package/dist/types/time-picker/use-time-picker.d.ts +27 -0
- package/dist/types/time-picker/use-time-picker.d.ts.map +1 -0
- package/dist/types/time-range-picker/index.d.ts +4 -3
- package/dist/types/time-range-picker/index.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-panel.d.ts +23 -0
- package/dist/types/time-range-picker/time-range-panel.d.ts.map +1 -0
- package/dist/types/time-range-picker/time-range-picker-defaults.d.ts +2 -4
- package/dist/types/time-range-picker/time-range-picker-defaults.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker-demo.d.ts +8 -24
- package/dist/types/time-range-picker/time-range-picker-demo.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.d.ts +12 -28
- package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.types.d.ts +24 -64
- package/dist/types/time-range-picker/time-range-picker.types.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-words.d.ts +37 -0
- package/dist/types/time-range-picker/time-range-words.d.ts.map +1 -0
- package/dist/types/time-range-picker/use-time-range-panel.d.ts +68 -0
- package/dist/types/time-range-picker/use-time-range-panel.d.ts.map +1 -0
- package/dist/types/time-range-picker/use-time-range-picker.d.ts +25 -0
- package/dist/types/time-range-picker/use-time-range-picker.d.ts.map +1 -0
- package/dist/types/title-id/read-title-id.d.ts +15 -0
- package/dist/types/title-id/read-title-id.d.ts.map +1 -0
- package/dist/types/toast/toast.d.ts.map +1 -1
- package/dist/types/tree/index.d.ts +1 -1
- package/dist/types/tree/index.d.ts.map +1 -1
- package/dist/types/tree/tree-parts.d.ts +2 -0
- package/dist/types/tree/tree-parts.d.ts.map +1 -1
- package/dist/types/tree/tree.d.ts +1 -1
- package/dist/types/tree/tree.d.ts.map +1 -1
- package/dist/types/tree/tree.types.d.ts +15 -5
- package/dist/types/tree/tree.types.d.ts.map +1 -1
- package/dist/use-date-picker-DL8tRXji.js +63 -0
- package/dist/use-picker-draft-Bw8VFaj0.js +377 -0
- package/dist/{wizard-CL6u1aJb.js → wizard-BokOrtwq.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +10 -6
- package/dist/alert-Bi9s1cjV.js +0 -174
- package/dist/calendar-CX0wN5Bh.js +0 -564
- package/dist/date-picker-CLXTtQGe.js +0 -337
- package/dist/date-range-picker-Br0neGyT.js +0 -522
- package/dist/datetime-picker-CR-H_BLu.js +0 -683
- package/dist/datetime-range-picker-BLo58OIk.js +0 -1050
- package/dist/divider-ryFeK0Pi.js +0 -35
- package/dist/docs/datetime-range-picker.examples.md +0 -219
- package/dist/result-state-BMYhelu1.js +0 -128
- package/dist/time-picker-B4-GsO24.js +0 -436
- package/dist/time-range-picker-DVOWN8PF.js +0 -800
- package/dist/tree-D-y-0TrL.js +0 -794
package/dist/docs/divider.md
CHANGED
|
@@ -5,26 +5,48 @@
|
|
|
5
5
|
|
|
6
6
|
## Minimal example
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Example
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
import { Divider } from '@slotted/react/divider';
|
|
12
|
+
import { Stack } from '@slotted/react/stack';
|
|
13
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
14
|
+
|
|
15
|
+
export default function DividerBasic() {
|
|
16
|
+
return (
|
|
17
|
+
<Stack gap={4}>
|
|
18
|
+
<Stack gap={1}>
|
|
19
|
+
<Heading level={2} size="sm">
|
|
20
|
+
Billing
|
|
21
|
+
</Heading>
|
|
22
|
+
<Text size="sm" tone="muted">
|
|
23
|
+
Invoices are issued on the first business day of each month.
|
|
24
|
+
</Text>
|
|
25
|
+
</Stack>
|
|
26
|
+
<Divider />
|
|
27
|
+
<Stack gap={1}>
|
|
28
|
+
<Heading level={2} size="sm">
|
|
29
|
+
Members
|
|
30
|
+
</Heading>
|
|
31
|
+
<Text size="sm" tone="muted">
|
|
32
|
+
Eleven people in the Northwind operations team can approve orders.
|
|
33
|
+
</Text>
|
|
34
|
+
</Stack>
|
|
35
|
+
</Stack>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
16
38
|
```
|
|
17
39
|
|
|
18
40
|
## Props
|
|
19
41
|
|
|
20
42
|
| Name | Type | Default | Applies to | Description |
|
|
21
43
|
| --- | --- | --- | --- | --- |
|
|
22
|
-
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | Divider |
|
|
23
|
-
| `decorative` | `boolean` | false | Divider | Removes the rule from the accessibility tree |
|
|
24
|
-
| `inset` | `boolean` | false | Divider | Stops the rule short of both ends of its container |
|
|
25
|
-
| `label` | `string` | — | Divider | Short
|
|
26
|
-
| `align` | `'start' \| 'center' \| 'end'` | center | Divider |
|
|
27
|
-
| `render` | `(props) => ReactNode` | — | Divider | Renders a different root element |
|
|
44
|
+
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | Divider | Sets the direction the rule runs in. |
|
|
45
|
+
| `decorative` | `boolean` | false | Divider | Removes the rule from the accessibility tree. |
|
|
46
|
+
| `inset` | `boolean` | false | Divider | Stops the rule short of both ends of its container. |
|
|
47
|
+
| `label` | `string` | — | Divider | Short text that interrupts the rule. It is also the rule’s accessible name. |
|
|
48
|
+
| `align` | `'start' \| 'center' \| 'end'` | center | Divider | Sets the position of the label along the rule. |
|
|
49
|
+
| `render` | `(props) => ReactNode` | — | Divider | Renders a different root element from the props it receives. |
|
|
28
50
|
|
|
29
51
|
## Axes and defaults
|
|
30
52
|
|
|
@@ -41,7 +63,7 @@ Excerpt — not a complete module
|
|
|
41
63
|
- A labelled rule renders a div, because an hr takes no content. Its name comes from aria-label: the separator role makes its children presentational, so the visible label alone would leave the rule announced as empty.
|
|
42
64
|
- A decorative rule carries no name, because role="none" prohibits one. Its label is read in document order, like any other text.
|
|
43
65
|
- A rule rendered into another element — the li a menu separator has to be — receives role="separator", because only the hr carries that meaning by itself.
|
|
44
|
-
- A role or an aria-label
|
|
66
|
+
- A role or an aria-label you pass is kept, so a rule that has to say something else keeps saying it.
|
|
45
67
|
|
|
46
68
|
## Tokens
|
|
47
69
|
|
|
@@ -49,6 +71,18 @@ Excerpt — not a complete module
|
|
|
49
71
|
|
|
50
72
|
## Examples
|
|
51
73
|
|
|
74
|
+
### Separating two regions
|
|
75
|
+
|
|
76
|
+
Excerpt — not a complete module
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
<section>
|
|
80
|
+
<h2>Billing</h2>
|
|
81
|
+
<Divider />
|
|
82
|
+
<h2>Members</h2>
|
|
83
|
+
</section>;
|
|
84
|
+
```
|
|
85
|
+
|
|
52
86
|
### A vertical rule between groups of controls
|
|
53
87
|
|
|
54
88
|
Excerpt — not a complete module
|
|
@@ -84,3 +118,237 @@ Excerpt — not a complete module
|
|
|
84
118
|
<li role="menuitem">Delete</li>
|
|
85
119
|
</ul>;
|
|
86
120
|
```
|
|
121
|
+
|
|
122
|
+
### align.tsx
|
|
123
|
+
|
|
124
|
+
Example
|
|
125
|
+
|
|
126
|
+
```tsx
|
|
127
|
+
import { Divider } from '@slotted/react/divider';
|
|
128
|
+
import { Stack } from '@slotted/react/stack';
|
|
129
|
+
import { Text } from '@slotted/react/typography';
|
|
130
|
+
|
|
131
|
+
export default function DividerAlign() {
|
|
132
|
+
return (
|
|
133
|
+
<Stack gap={3}>
|
|
134
|
+
<Divider align="start" label="Today" />
|
|
135
|
+
<Text size="sm">3 shipments left the Rotterdam warehouse.</Text>
|
|
136
|
+
<Divider align="center" label="Yesterday" />
|
|
137
|
+
<Text size="sm">5 shipments left, 1 was returned.</Text>
|
|
138
|
+
<Divider align="end" label="Earlier this week" />
|
|
139
|
+
<Text size="sm">11 shipments left, all delivered.</Text>
|
|
140
|
+
</Stack>
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### decorative.tsx
|
|
146
|
+
|
|
147
|
+
Example
|
|
148
|
+
|
|
149
|
+
```tsx
|
|
150
|
+
import { Card, CardBody, CardHeader } from '@slotted/react/card';
|
|
151
|
+
import { Divider } from '@slotted/react/divider';
|
|
152
|
+
import { Stack } from '@slotted/react/stack';
|
|
153
|
+
import { Heading, Text } from '@slotted/react/typography';
|
|
154
|
+
|
|
155
|
+
export default function DividerDecorative() {
|
|
156
|
+
return (
|
|
157
|
+
<Stack gap={4}>
|
|
158
|
+
{[false, true].map((decorative) => (
|
|
159
|
+
<Card key={String(decorative)}>
|
|
160
|
+
<CardHeader>
|
|
161
|
+
<Heading level={2} size="sm">
|
|
162
|
+
{decorative ? 'decorative' : 'Announced'}
|
|
163
|
+
</Heading>
|
|
164
|
+
</CardHeader>
|
|
165
|
+
<CardBody>
|
|
166
|
+
<Stack gap={3}>
|
|
167
|
+
<Text>Order 20418 was packed.</Text>
|
|
168
|
+
<Divider decorative={decorative} />
|
|
169
|
+
<Text>Order 20418 was handed to the carrier.</Text>
|
|
170
|
+
<Divider decorative={decorative} label="Delivery" />
|
|
171
|
+
<Text>Order 20418 is due on Thursday.</Text>
|
|
172
|
+
</Stack>
|
|
173
|
+
</CardBody>
|
|
174
|
+
</Card>
|
|
175
|
+
))}
|
|
176
|
+
</Stack>
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### inset.tsx
|
|
182
|
+
|
|
183
|
+
Example
|
|
184
|
+
|
|
185
|
+
```tsx
|
|
186
|
+
import { Button } from '@slotted/react/button';
|
|
187
|
+
import { Card, CardBody, CardHeader } from '@slotted/react/card';
|
|
188
|
+
import { Divider } from '@slotted/react/divider';
|
|
189
|
+
import { Stack } from '@slotted/react/stack';
|
|
190
|
+
import { Heading } from '@slotted/react/typography';
|
|
191
|
+
|
|
192
|
+
const CARRIERS = ['Northwind Freight', 'Harbor Line', 'Alpine Express'];
|
|
193
|
+
|
|
194
|
+
export default function DividerInset() {
|
|
195
|
+
return (
|
|
196
|
+
<Stack gap={4}>
|
|
197
|
+
{[false, true].map((inset) => (
|
|
198
|
+
<Card key={String(inset)}>
|
|
199
|
+
<CardHeader>
|
|
200
|
+
<Heading level={2} size="sm">
|
|
201
|
+
{inset ? 'inset' : 'Full length'}
|
|
202
|
+
</Heading>
|
|
203
|
+
</CardHeader>
|
|
204
|
+
<CardBody>
|
|
205
|
+
<Stack gap={2}>
|
|
206
|
+
{CARRIERS.map((carrier, index) => [
|
|
207
|
+
index > 0 && <Divider inset={inset} key={`rule-${carrier}`} />,
|
|
208
|
+
<Button fullWidth justify="between" key={carrier} tone="secondary" variant="ghost">
|
|
209
|
+
{carrier}
|
|
210
|
+
</Button>,
|
|
211
|
+
])}
|
|
212
|
+
</Stack>
|
|
213
|
+
</CardBody>
|
|
214
|
+
</Card>
|
|
215
|
+
))}
|
|
216
|
+
</Stack>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### label.tsx
|
|
222
|
+
|
|
223
|
+
Example
|
|
224
|
+
|
|
225
|
+
```tsx
|
|
226
|
+
import { Divider } from '@slotted/react/divider';
|
|
227
|
+
import { Stack } from '@slotted/react/stack';
|
|
228
|
+
import { Text } from '@slotted/react/typography';
|
|
229
|
+
|
|
230
|
+
export default function DividerLabel() {
|
|
231
|
+
return (
|
|
232
|
+
<Stack gap={4}>
|
|
233
|
+
<Text>Pay with the card on file, ending in 4242.</Text>
|
|
234
|
+
<Divider label="Or" />
|
|
235
|
+
<Text>Send a bank transfer to Northwind Freight, reference INV-20418.</Text>
|
|
236
|
+
</Stack>
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### orientation.tsx
|
|
242
|
+
|
|
243
|
+
Example
|
|
244
|
+
|
|
245
|
+
```tsx
|
|
246
|
+
import { Divider } from '@slotted/react/divider';
|
|
247
|
+
import { Inline } from '@slotted/react/inline';
|
|
248
|
+
import { Stack } from '@slotted/react/stack';
|
|
249
|
+
import { Text } from '@slotted/react/typography';
|
|
250
|
+
|
|
251
|
+
export default function DividerOrientation() {
|
|
252
|
+
return (
|
|
253
|
+
<Stack gap={6}>
|
|
254
|
+
<Stack gap={3}>
|
|
255
|
+
<Text size="sm" tone="muted">
|
|
256
|
+
horizontal
|
|
257
|
+
</Text>
|
|
258
|
+
<Text>42 open orders</Text>
|
|
259
|
+
<Divider orientation="horizontal" />
|
|
260
|
+
<Text>17 shipped today</Text>
|
|
261
|
+
</Stack>
|
|
262
|
+
<Stack gap={3}>
|
|
263
|
+
<Text size="sm" tone="muted">
|
|
264
|
+
vertical
|
|
265
|
+
</Text>
|
|
266
|
+
<Inline gap={4}>
|
|
267
|
+
<Text>42 open orders</Text>
|
|
268
|
+
<Divider orientation="vertical" />
|
|
269
|
+
<Text>17 shipped today</Text>
|
|
270
|
+
</Inline>
|
|
271
|
+
</Stack>
|
|
272
|
+
</Stack>
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### values.tsx
|
|
278
|
+
|
|
279
|
+
Example
|
|
280
|
+
|
|
281
|
+
```tsx
|
|
282
|
+
import { Card, CardBody } from '@slotted/react/card';
|
|
283
|
+
import { Divider } from '@slotted/react/divider';
|
|
284
|
+
import { Inline } from '@slotted/react/inline';
|
|
285
|
+
import { Stack } from '@slotted/react/stack';
|
|
286
|
+
import { Text } from '@slotted/react/typography';
|
|
287
|
+
|
|
288
|
+
const FIGURES = [
|
|
289
|
+
{ label: 'Orders', value: '1,284' },
|
|
290
|
+
{ label: 'Revenue', value: '$48,200' },
|
|
291
|
+
{ label: 'Returns', value: '2.1%' },
|
|
292
|
+
];
|
|
293
|
+
|
|
294
|
+
export default function DividerValues() {
|
|
295
|
+
return (
|
|
296
|
+
<Card>
|
|
297
|
+
<CardBody>
|
|
298
|
+
<Inline gap={6}>
|
|
299
|
+
{FIGURES.flatMap((figure, index) => [
|
|
300
|
+
index > 0 ? (
|
|
301
|
+
<Divider decorative key={`rule-${figure.label}`} orientation="vertical" />
|
|
302
|
+
) : null,
|
|
303
|
+
<Stack gap={1} key={figure.label}>
|
|
304
|
+
<Text size="sm" tone="muted">
|
|
305
|
+
{figure.label}
|
|
306
|
+
</Text>
|
|
307
|
+
<Text numeric="tabular" size="3xl" weight="semibold">
|
|
308
|
+
{figure.value}
|
|
309
|
+
</Text>
|
|
310
|
+
</Stack>,
|
|
311
|
+
])}
|
|
312
|
+
</Inline>
|
|
313
|
+
</CardBody>
|
|
314
|
+
</Card>
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### vertical-label.tsx
|
|
320
|
+
|
|
321
|
+
Example
|
|
322
|
+
|
|
323
|
+
```tsx
|
|
324
|
+
import { Divider } from '@slotted/react/divider';
|
|
325
|
+
import { Inline } from '@slotted/react/inline';
|
|
326
|
+
import { Stack } from '@slotted/react/stack';
|
|
327
|
+
import { Text } from '@slotted/react/typography';
|
|
328
|
+
|
|
329
|
+
export default function DividerVerticalLabel() {
|
|
330
|
+
return (
|
|
331
|
+
<Inline gap={4}>
|
|
332
|
+
<Stack gap={1}>
|
|
333
|
+
<Text weight="semibold">Pay by card</Text>
|
|
334
|
+
<Text size="sm" tone="muted">
|
|
335
|
+
Charged today
|
|
336
|
+
</Text>
|
|
337
|
+
<Text size="sm" tone="muted">
|
|
338
|
+
Receipt by email
|
|
339
|
+
</Text>
|
|
340
|
+
</Stack>
|
|
341
|
+
<Divider label="Or" orientation="vertical" />
|
|
342
|
+
<Stack gap={1}>
|
|
343
|
+
<Text weight="semibold">Pay by transfer</Text>
|
|
344
|
+
<Text size="sm" tone="muted">
|
|
345
|
+
Due in 30 days
|
|
346
|
+
</Text>
|
|
347
|
+
<Text size="sm" tone="muted">
|
|
348
|
+
Reference INV-20418
|
|
349
|
+
</Text>
|
|
350
|
+
</Stack>
|
|
351
|
+
</Inline>
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
```
|
package/dist/docs/grid.json
CHANGED
|
@@ -85,51 +85,51 @@
|
|
|
85
85
|
"type": "0 | 1 | … | 12",
|
|
86
86
|
"defaultValue": "6",
|
|
87
87
|
"appliesTo": "Grid",
|
|
88
|
-
"description": "
|
|
88
|
+
"description": "Sets the separation between cells as a step on the space scale."
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"name": "columns",
|
|
92
92
|
"type": "1 | 2 | … | 12",
|
|
93
93
|
"defaultValue": "auto",
|
|
94
94
|
"appliesTo": "Grid",
|
|
95
|
-
"description": "
|
|
95
|
+
"description": "Sets the most columns a row may hold. When absent, the grid fits as many as it can."
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"name": "minItemWidth",
|
|
99
99
|
"type": "'xs' | 'sm' | 'md' | 'lg' | 'xl'",
|
|
100
100
|
"defaultValue": "md",
|
|
101
101
|
"appliesTo": "Grid",
|
|
102
|
-
"description": "
|
|
102
|
+
"description": "Sets the narrowest a cell may become before a column is dropped."
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"name": "align",
|
|
106
106
|
"type": "'start' | 'center' | 'end' | 'stretch'",
|
|
107
107
|
"defaultValue": "—",
|
|
108
108
|
"appliesTo": "Grid",
|
|
109
|
-
"description": "Positions a child
|
|
109
|
+
"description": "Positions a child along the block axis, inside its own cell."
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
"name": "justify",
|
|
113
113
|
"type": "'start' | 'center' | 'end' | 'stretch'",
|
|
114
114
|
"defaultValue": "—",
|
|
115
115
|
"appliesTo": "Grid",
|
|
116
|
-
"description": "Positions a child along the
|
|
116
|
+
"description": "Positions a child along the inline axis, inside its own cell."
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
"name": "render",
|
|
120
120
|
"type": "(props) => ReactNode",
|
|
121
121
|
"defaultValue": "—",
|
|
122
122
|
"appliesTo": "Grid",
|
|
123
|
-
"description": "Renders a different root element"
|
|
123
|
+
"description": "Renders a different root element from the props it receives."
|
|
124
124
|
}
|
|
125
125
|
],
|
|
126
126
|
"composition": [],
|
|
127
127
|
"events": [],
|
|
128
128
|
"accessibility": [
|
|
129
|
-
"This is not the APG grid widget. There is no role=\"grid\", no cell and no arrow-key navigation:
|
|
130
|
-
"There is no
|
|
131
|
-
"A stated count is a ceiling the
|
|
132
|
-
"The reflow is measured against the grid’s own inline size, not the viewport, so a grid inside a narrow panel behaves the same as one inside a narrow window.
|
|
129
|
+
"This is not the APG grid widget. There is no role=\"grid\", no cell and no arrow-key navigation: Grid lays children out, and the children keep whatever semantics they already had.",
|
|
130
|
+
"There is no prop that reorders or places children. 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.",
|
|
131
|
+
"A stated count is a ceiling the grid may lower. Twelve columns become six and then one as the grid narrows, so a page reflows to 320 CSS pixels without scrolling in two dimensions, as WCAG 1.4.10 requires.",
|
|
132
|
+
"The reflow is measured against the grid’s own inline size, not the viewport, so a grid inside a narrow panel behaves the same as one inside a narrow window. Grid uses no breakpoint and no container query.",
|
|
133
133
|
"minItemWidth is stated in rem, so the point at which a column is dropped moves with the browser zoom WCAG 1.4.4 requires."
|
|
134
134
|
]
|
|
135
135
|
}
|
|
@@ -173,11 +173,75 @@
|
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
175
|
"id": "grid-react-span",
|
|
176
|
-
"title": "A child that crosses
|
|
176
|
+
"title": "A child that crosses every column states it on itself",
|
|
177
177
|
"note": null,
|
|
178
178
|
"language": "tsx",
|
|
179
|
-
"source": "<Grid columns={2} gap={6}>\n <Panel style={{ gridColumn: '
|
|
179
|
+
"source": "<Grid columns={2} gap={6}>\n <Panel style={{ gridColumn: '1 / -1' }}>Summary</Panel>\n <Panel>Left</Panel>\n <Panel>Right</Panel>\n</Grid>;\n",
|
|
180
180
|
"verdict": "excerpt"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"id": "align",
|
|
184
|
+
"title": "align.tsx",
|
|
185
|
+
"note": null,
|
|
186
|
+
"language": "tsx",
|
|
187
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nconst ALIGNS = ['start', 'center', 'end', 'stretch'] as const;\n\nconst SHIPMENTS = [\n 'Ships today.',\n 'Waits for the carrier pickup window on Thursday afternoon.',\n 'Held until payment clears and the customs check for the destination country finishes.',\n] as const;\n\nexport default function GridAlign() {\n return (\n <Stack gap={6}>\n {ALIGNS.map((align) => (\n <Stack key={align} gap={3}>\n <Text size=\"sm\" tone=\"muted\">{`align: ${align}`}</Text>\n\n <Grid align={align} columns={3} gap={4} minItemWidth=\"xs\">\n {SHIPMENTS.map((shipment) => (\n <Card key={shipment}>\n <CardBody>\n <Text>{shipment}</Text>\n </CardBody>\n </Card>\n ))}\n </Grid>\n </Stack>\n ))}\n </Stack>\n );\n}\n",
|
|
188
|
+
"verdict": "example"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"id": "basic",
|
|
192
|
+
"title": "basic.tsx",
|
|
193
|
+
"note": null,
|
|
194
|
+
"language": "tsx",
|
|
195
|
+
"source": "import { Badge } from '@slotted/react/badge';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nconst WAREHOUSES = [\n { name: 'Rotterdam', units: '12,480 units on hand', status: 'Healthy', tone: 'success' },\n { name: 'Chicago', units: '8,215 units on hand', status: 'Low stock', tone: 'warning' },\n { name: 'Singapore', units: '3,902 units on hand', status: 'Delayed', tone: 'danger' },\n { name: 'Lisbon', units: '6,730 units on hand', status: 'Healthy', tone: 'success' },\n { name: 'Osaka', units: '5,118 units on hand', status: 'Audit due', tone: 'info' },\n { name: 'Denver', units: '2,044 units on hand', status: 'Opening soon', tone: 'secondary' },\n] as const;\n\nexport default function GridBasic() {\n return (\n <Grid>\n {WAREHOUSES.map((warehouse) => (\n <Card key={warehouse.name}>\n <CardBody>\n <Stack gap={3}>\n <Heading level={2} size=\"md\">\n {warehouse.name}\n </Heading>\n <Text size=\"sm\" tone=\"muted\">\n {warehouse.units}\n </Text>\n <Inline>\n <Badge tone={warehouse.tone}>{warehouse.status}</Badge>\n </Inline>\n </Stack>\n </CardBody>\n </Card>\n ))}\n </Grid>\n );\n}\n",
|
|
196
|
+
"verdict": "example"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"id": "columns",
|
|
200
|
+
"title": "columns.tsx",
|
|
201
|
+
"note": null,
|
|
202
|
+
"language": "tsx",
|
|
203
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nconst COUNTS = [2, 3, 4] as const;\n\nconst METRICS = [\n { label: 'Revenue', value: '$48,200' },\n { label: 'Refunds', value: '$1,940' },\n { label: 'Disputes', value: '7' },\n { label: 'Payouts', value: '$44,310' },\n] as const;\n\nexport default function GridColumns() {\n return (\n <Stack gap={6}>\n {COUNTS.map((count) => (\n <Stack key={count} gap={3}>\n <Text size=\"sm\" tone=\"muted\">{`columns: ${count}`}</Text>\n\n <Grid columns={count} gap={4} minItemWidth=\"xs\">\n {METRICS.map((metric) => (\n <Card key={metric.label}>\n <CardBody>\n <Stack gap={1}>\n <Text size=\"sm\" tone=\"muted\">\n {metric.label}\n </Text>\n <Heading level={2} size=\"md\">\n {metric.value}\n </Heading>\n </Stack>\n </CardBody>\n </Card>\n ))}\n </Grid>\n </Stack>\n ))}\n </Stack>\n );\n}\n",
|
|
204
|
+
"verdict": "example"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"id": "gap",
|
|
208
|
+
"title": "gap.tsx",
|
|
209
|
+
"note": null,
|
|
210
|
+
"language": "tsx",
|
|
211
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nconst GAPS = [0, 2, 6, 12] as const;\n\nconst ORDERS = ['SO-10482', 'SO-10483', 'SO-10484'] as const;\n\nexport default function GridGap() {\n return (\n <Stack gap={6}>\n {GAPS.map((gap) => (\n <Stack key={gap} gap={3}>\n <Text size=\"sm\" tone=\"muted\">{`gap: ${gap}`}</Text>\n\n <Grid columns={3} gap={gap} minItemWidth=\"xs\">\n {ORDERS.map((order) => (\n <Card key={order}>\n <CardBody>\n <Text numeric=\"tabular\">{order}</Text>\n </CardBody>\n </Card>\n ))}\n </Grid>\n </Stack>\n ))}\n </Stack>\n );\n}\n",
|
|
212
|
+
"verdict": "example"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "justify",
|
|
216
|
+
"title": "justify.tsx",
|
|
217
|
+
"note": null,
|
|
218
|
+
"language": "tsx",
|
|
219
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nconst JUSTIFIES = ['start', 'center', 'end', 'stretch'] as const;\n\nconst ACTIONS = ['Ship', 'Hold for review', 'Return to supplier'] as const;\n\nexport default function GridJustify() {\n return (\n <Stack gap={6}>\n {JUSTIFIES.map((justify) => (\n <Stack key={justify} gap={3}>\n <Text size=\"sm\" tone=\"muted\">{`justify: ${justify}`}</Text>\n\n <Grid columns={3} gap={4} justify={justify} minItemWidth=\"xs\">\n {ACTIONS.map((action) => (\n <Card key={action}>\n <CardBody>\n <Text>{action}</Text>\n </CardBody>\n </Card>\n ))}\n </Grid>\n </Stack>\n ))}\n </Stack>\n );\n}\n",
|
|
220
|
+
"verdict": "example"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"id": "min-item-width",
|
|
224
|
+
"title": "min-item-width.tsx",
|
|
225
|
+
"note": null,
|
|
226
|
+
"language": "tsx",
|
|
227
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nconst WIDTHS = [\n { size: 'xs', rem: '8rem' },\n { size: 'sm', rem: '12rem' },\n { size: 'md', rem: '16rem' },\n { size: 'lg', rem: '20rem' },\n { size: 'xl', rem: '24rem' },\n] as const;\n\nconst BAYS = ['Bay A1', 'Bay A2', 'Bay B1', 'Bay B2'] as const;\n\nexport default function GridMinItemWidth() {\n return (\n <Stack gap={6}>\n {WIDTHS.map((width) => (\n <Stack key={width.size} gap={3}>\n <Text size=\"sm\" tone=\"muted\">{`minItemWidth: ${width.size} (${width.rem})`}</Text>\n\n <Grid gap={3} minItemWidth={width.size}>\n {BAYS.map((bay) => (\n <Card key={bay}>\n <CardBody>\n <Text>{bay}</Text>\n </CardBody>\n </Card>\n ))}\n </Grid>\n </Stack>\n ))}\n </Stack>\n );\n}\n",
|
|
228
|
+
"verdict": "example"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"id": "own-width",
|
|
232
|
+
"title": "own-width.tsx",
|
|
233
|
+
"note": null,
|
|
234
|
+
"language": "tsx",
|
|
235
|
+
"source": "import { Badge } from '@slotted/react/badge';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nconst BAYS = [\n { name: 'Bay 1', status: 'Full', tone: 'success' },\n { name: 'Bay 2', status: 'Half', tone: 'info' },\n { name: 'Bay 3', status: 'Low', tone: 'warning' },\n { name: 'Bay 4', status: 'Empty', tone: 'danger' },\n] as const;\n\nconst ZONES = ['Zone A', 'Zone B'] as const;\n\nexport default function GridOwnWidth() {\n return (\n <Stack gap={6}>\n <Stack gap={3}>\n <Text size=\"sm\" tone=\"muted\">\n Across the whole preview\n </Text>\n\n <Grid columns={4} gap={4} justify=\"start\" minItemWidth=\"xs\">\n {BAYS.map((bay) => (\n <Badge key={bay.name} tone={bay.tone}>{`${bay.name}: ${bay.status}`}</Badge>\n ))}\n </Grid>\n </Stack>\n\n <Stack gap={3}>\n <Text size=\"sm\" tone=\"muted\">\n The same grid inside two half-width cards\n </Text>\n\n <Grid columns={2} gap={6}>\n {ZONES.map((zone) => (\n <Card key={zone}>\n <CardBody>\n <Stack gap={3}>\n <Heading level={2} size=\"md\">\n {zone}\n </Heading>\n <Grid columns={4} gap={4} justify=\"start\" minItemWidth=\"xs\">\n {BAYS.map((bay) => (\n <Badge key={bay.name} tone={bay.tone}>{`${bay.name}: ${bay.status}`}</Badge>\n ))}\n </Grid>\n </Stack>\n </CardBody>\n </Card>\n ))}\n </Grid>\n </Stack>\n </Stack>\n );\n}\n",
|
|
236
|
+
"verdict": "example"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "span",
|
|
240
|
+
"title": "span.tsx",
|
|
241
|
+
"note": null,
|
|
242
|
+
"language": "tsx",
|
|
243
|
+
"source": "import { Field, FieldLabel } from '@slotted/react/field';\nimport { Grid } from '@slotted/react/grid';\nimport { TextField } from '@slotted/react/text-field';\n\nexport default function GridSpan() {\n return (\n <Grid columns={2} gap={6} minItemWidth=\"sm\">\n <Field style={{ gridColumn: '1 / -1' }}>\n <FieldLabel>Company</FieldLabel>\n <TextField defaultValue=\"Northwind Traders\" />\n </Field>\n\n <Field>\n <FieldLabel>Contact</FieldLabel>\n <TextField defaultValue=\"Priya Raman\" />\n </Field>\n\n <Field>\n <FieldLabel>Phone</FieldLabel>\n <TextField defaultValue=\"+31 10 555 0142\" />\n </Field>\n\n <Field>\n <FieldLabel>City</FieldLabel>\n <TextField defaultValue=\"Rotterdam\" />\n </Field>\n\n <Field>\n <FieldLabel>Postal code</FieldLabel>\n <TextField defaultValue=\"3011 AB\" />\n </Field>\n </Grid>\n );\n}\n",
|
|
244
|
+
"verdict": "example"
|
|
181
245
|
}
|
|
182
246
|
]
|
|
183
247
|
}
|