@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
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"type": "'square' | 'landscape' | 'portrait' | 'video' | 'wide' | number | [number, number]",
|
|
52
52
|
"defaultValue": "—",
|
|
53
53
|
"appliesTo": "AspectRatio",
|
|
54
|
-
"description": "Required. The proportion the box holds before anything is in it: a name a
|
|
54
|
+
"description": "Required. The proportion the box holds before anything is in it: a name, a number or a pair of numbers."
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"name": "children",
|
|
58
58
|
"type": "ReactNode",
|
|
59
59
|
"defaultValue": "—",
|
|
60
60
|
"appliesTo": "AspectRatio",
|
|
61
|
-
"description": "What the frame holds. Each child takes the one cell; a replaced child is fitted whole"
|
|
61
|
+
"description": "What the frame holds. Each child takes the one cell; a replaced child is fitted whole."
|
|
62
62
|
}
|
|
63
63
|
],
|
|
64
64
|
"composition": [
|
|
@@ -67,28 +67,28 @@
|
|
|
67
67
|
"type": "(props) => ReactNode",
|
|
68
68
|
"defaultValue": "—",
|
|
69
69
|
"appliesTo": "AspectRatio",
|
|
70
|
-
"description": "Substitutes the root element — a figure, an li — and hands it every data attribute and the token"
|
|
70
|
+
"description": "Substitutes the root element — a figure, an li — and hands it every data attribute and the token."
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"name": "ref",
|
|
74
74
|
"type": "Ref<HTMLDivElement>",
|
|
75
75
|
"defaultValue": "—",
|
|
76
76
|
"appliesTo": "AspectRatio",
|
|
77
|
-
"description": "Reaches the frame; the props type is the div’s own, extended"
|
|
77
|
+
"description": "Reaches the frame; the props type is the div’s own, extended."
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"name": "--slotted-aspect-ratio",
|
|
81
81
|
"type": "custom property",
|
|
82
82
|
"defaultValue": "—",
|
|
83
83
|
"appliesTo": "an instance",
|
|
84
|
-
"description": "What a custom ratio writes on the element, as w / h. A theme retunes a named ratio in the stylesheet instead"
|
|
84
|
+
"description": "What a custom ratio writes on the element, as w / h. A theme retunes a named ratio in the stylesheet instead."
|
|
85
85
|
}
|
|
86
86
|
],
|
|
87
87
|
"events": [],
|
|
88
88
|
"accessibility": [
|
|
89
89
|
"There is no aspect-ratio pattern in the WAI-ARIA Authoring Practices, and the frame needs none: it is a div with no role, and what it holds carries its own semantics — an img its alt, an iframe its title, a p its text.",
|
|
90
|
-
"The frame never clips. Content taller than the ratio grows the box (
|
|
91
|
-
"A replaced child is fitted with object-fit: contain, so a picture is shown entire; a
|
|
90
|
+
"The frame never clips. Content taller than the ratio grows the box (the CSS sizing specification keeps a content-based minimum on a box with aspect-ratio), so a translation that runs longer than the design is read whole rather than cut at the ratio or laid over the frame below.",
|
|
91
|
+
"A replaced child is fitted with object-fit: contain, so a picture is shown entire; a picture that has to cover the frame is a crop, and Image decides that with its fit prop.",
|
|
92
92
|
"The frame moves nothing on load: the box is its stated proportion before the first byte of a picture arrives, which is what keeps a grid of thumbnails from shifting as each request returns."
|
|
93
93
|
]
|
|
94
94
|
}
|
|
@@ -110,32 +110,32 @@
|
|
|
110
110
|
"title": "Five ratios a product decides once",
|
|
111
111
|
"note": "square, landscape (4:3), portrait (3:4), video (16:9) and wide (21:9), each named for what it holds rather than for its numbers, so a template says \"thumbnails are landscape\" and the DOM says which one was taken.",
|
|
112
112
|
"language": "tsx",
|
|
113
|
-
"source": "
|
|
114
|
-
"verdict": "
|
|
113
|
+
"source": "import { AspectRatio } from '@slotted/react/aspect-ratio';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Grid } from '@slotted/react/grid';\nimport { Text } from '@slotted/react/typography';\n\nconst RATIOS = [\n { name: 'square', label: 'square, 1:1' },\n { name: 'landscape', label: 'landscape, 4:3' },\n { name: 'portrait', label: 'portrait, 3:4' },\n { name: 'video', label: 'video, 16:9' },\n { name: 'wide', label: 'wide, 21:9' },\n] as const;\n\nexport default function AspectRatioRatios() {\n return (\n <Grid columns={3} gap={4} minItemWidth=\"xs\">\n {RATIOS.map((ratio) => (\n <AspectRatio key={ratio.name} ratio={ratio.name}>\n <Card>\n <CardBody>\n <Text size=\"sm\">{ratio.label}</Text>\n </CardBody>\n </Card>\n </AspectRatio>\n ))}\n </Grid>\n );\n}\n",
|
|
114
|
+
"verdict": "example"
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
117
|
"id": "custom",
|
|
118
118
|
"title": "Any other proportion, as a number or a pair",
|
|
119
119
|
"note": "A pair is written into the stylesheet exactly as given — 2 / 1 stays 2 / 1 — where a number is its quotient. Both mark the frame data-ratio=\"custom\" and put the value on the instance.",
|
|
120
120
|
"language": "tsx",
|
|
121
|
-
"source": "<AspectRatio ratio={[2, 1]}
|
|
122
|
-
"verdict": "
|
|
121
|
+
"source": "import { AspectRatio } from '@slotted/react/aspect-ratio';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nexport default function AspectRatioCustom() {\n return (\n <Stack gap={4}>\n <AspectRatio ratio={[2, 1]}>\n <Card>\n <CardBody>\n <Text size=\"sm\">A pair, [2, 1]: written as 2 / 1.</Text>\n </CardBody>\n </Card>\n </AspectRatio>\n <AspectRatio ratio={1.85}>\n <Card>\n <CardBody>\n <Text size=\"sm\">A number, 1.85: written as its quotient.</Text>\n </CardBody>\n </Card>\n </AspectRatio>\n </Stack>\n );\n}\n",
|
|
122
|
+
"verdict": "example"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"id": "media",
|
|
126
126
|
"title": "Replaced content is fitted whole",
|
|
127
127
|
"note": "A 4:3 photograph in a 16:9 frame is shown entire with the frame either side; a wide one in a square frame is letterboxed the same way. The frame reserves and never crops — the crop is Image’s decision, taken with fit.",
|
|
128
128
|
"language": "tsx",
|
|
129
|
-
"source": "<AspectRatio ratio=\"video\">\n
|
|
130
|
-
"verdict": "
|
|
129
|
+
"source": "import { AspectRatio } from '@slotted/react/aspect-ratio';\nimport { Card } from '@slotted/react/card';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nconst WAREHOUSE =\n \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E\";\n\nexport default function AspectRatioMedia() {\n return (\n <Stack gap={4}>\n <Text size=\"sm\" tone=\"muted\">\n A 4:3 picture in a video frame\n </Text>\n <Card>\n <AspectRatio ratio=\"video\">\n <img alt=\"Illustration of the Rotterdam warehouse\" src={WAREHOUSE} />\n </AspectRatio>\n </Card>\n <Text size=\"sm\" tone=\"muted\">\n The same picture in a square frame\n </Text>\n <Card>\n <AspectRatio ratio=\"square\">\n <img alt=\"Illustration of the Rotterdam warehouse\" src={WAREHOUSE} />\n </AspectRatio>\n </Card>\n </Stack>\n );\n}\n",
|
|
130
|
+
"verdict": "example"
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"id": "growth",
|
|
134
134
|
"title": "Content taller than the ratio grows the frame",
|
|
135
135
|
"note": "Two lines fit a 16:9 frame at this width and the frame keeps its ratio; a longer paragraph does not fit, and the frame is exactly as tall as the paragraph. Nothing is clipped and nothing lands on the frame below: the ratio is a floor, not a ceiling.",
|
|
136
136
|
"language": "tsx",
|
|
137
|
-
"source": "<AspectRatio ratio=\"video\">\n
|
|
138
|
-
"verdict": "
|
|
137
|
+
"source": "import { AspectRatio } from '@slotted/react/aspect-ratio';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nexport default function AspectRatioGrowth() {\n return (\n <Stack gap={4}>\n <AspectRatio ratio=\"video\">\n <Card>\n <CardBody>\n <Text>Pickup window: 08:00 to 10:00.</Text>\n </CardBody>\n </Card>\n </AspectRatio>\n <AspectRatio ratio=\"video\">\n <Card>\n <CardBody>\n <Text>\n Harbor Line moved the pickup for orders 20418 to 20431 from the morning window to the\n afternoon window because the vessel from Singapore docked six hours late. The\n Rotterdam warehouse holds the pallets on dock 4 until the carrier confirms the new\n slot. Customers with a delivery promise before Thursday receive an email with the new\n date, and the support team sees the same date on the order. Orders paid by transfer\n are released after the payment clears.\n </Text>\n </CardBody>\n </Card>\n </AspectRatio>\n </Stack>\n );\n}\n",
|
|
138
|
+
"verdict": "example"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"id": "composition",
|
|
@@ -148,10 +148,34 @@
|
|
|
148
148
|
{
|
|
149
149
|
"id": "accessibility",
|
|
150
150
|
"title": "The frame has no role",
|
|
151
|
-
"note": "A frame is a div and announces nothing; the content is
|
|
151
|
+
"note": "A frame is a div and announces nothing; the content is yours and carries its own name. A picture with a caption is a figure around the frame, with the figcaption after it, and the caption is not repeated in the alt.",
|
|
152
152
|
"language": "tsx",
|
|
153
153
|
"source": "<figure>\n <AspectRatio ratio=\"landscape\">\n <img alt=\"The fjord lookout at site 12 from the cliff path\" src={site.photo} />\n </AspectRatio>\n <figcaption>Site 12 — fjord lookout, March survey</figcaption>\n</figure>;\n",
|
|
154
154
|
"verdict": "excerpt"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "basic",
|
|
158
|
+
"title": "basic.tsx",
|
|
159
|
+
"note": null,
|
|
160
|
+
"language": "tsx",
|
|
161
|
+
"source": "import { AspectRatio } from '@slotted/react/aspect-ratio';\n\nconst WAREHOUSE =\n \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E\";\n\nexport default function AspectRatioBasic() {\n return (\n <AspectRatio ratio=\"landscape\">\n <img alt=\"Illustration of the Rotterdam warehouse\" src={WAREHOUSE} />\n </AspectRatio>\n );\n}\n",
|
|
162
|
+
"verdict": "example"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "figure",
|
|
166
|
+
"title": "figure.tsx",
|
|
167
|
+
"note": null,
|
|
168
|
+
"language": "tsx",
|
|
169
|
+
"source": "import { AspectRatio } from '@slotted/react/aspect-ratio';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\n\nconst WAREHOUSE =\n \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E\";\n\nexport default function AspectRatioFigure() {\n return (\n <Stack gap={3} render={(props) => <figure {...props} style={{ margin: 0 }} />}>\n <AspectRatio ratio=\"landscape\">\n <img alt=\"Illustration of the Rotterdam warehouse\" src={WAREHOUSE} />\n </AspectRatio>\n <Text render={(props) => <figcaption {...props} />} size=\"sm\" tone=\"muted\">\n Rotterdam warehouse, dock 4, March inventory count\n </Text>\n </Stack>\n );\n}\n",
|
|
170
|
+
"verdict": "example"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"id": "overlay",
|
|
174
|
+
"title": "overlay.tsx",
|
|
175
|
+
"note": null,
|
|
176
|
+
"language": "tsx",
|
|
177
|
+
"source": "import { AspectRatio } from '@slotted/react/aspect-ratio';\nimport { Badge } from '@slotted/react/badge';\nimport { Inline } from '@slotted/react/inline';\n\nconst WAREHOUSE =\n \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E\";\n\nexport default function AspectRatioOverlay() {\n return (\n <AspectRatio ratio=\"landscape\">\n <img alt=\"Last picture from the Rotterdam warehouse camera\" src={WAREHOUSE} />\n <Inline justify=\"center\">\n <Badge tone=\"danger\" variant=\"solid\">\n Camera offline\n </Badge>\n </Inline>\n </AspectRatio>\n );\n}\n",
|
|
178
|
+
"verdict": "example"
|
|
155
179
|
}
|
|
156
180
|
]
|
|
157
181
|
}
|
|
@@ -11,12 +11,21 @@ import { AspectRatio } from '@slotted/react';
|
|
|
11
11
|
|
|
12
12
|
## Minimal example
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Example
|
|
15
15
|
|
|
16
16
|
```tsx
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import { AspectRatio } from '@slotted/react/aspect-ratio';
|
|
18
|
+
|
|
19
|
+
const WAREHOUSE =
|
|
20
|
+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E";
|
|
21
|
+
|
|
22
|
+
export default function AspectRatioBasic() {
|
|
23
|
+
return (
|
|
24
|
+
<AspectRatio ratio="landscape">
|
|
25
|
+
<img alt="Illustration of the Rotterdam warehouse" src={WAREHOUSE} />
|
|
26
|
+
</AspectRatio>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
## Anatomy
|
|
@@ -29,11 +38,11 @@ Excerpt — not a complete module
|
|
|
29
38
|
|
|
30
39
|
| Name | Type | Default | Applies to | Description |
|
|
31
40
|
| --- | --- | --- | --- | --- |
|
|
32
|
-
| `ratio` | `'square' \| 'landscape' \| 'portrait' \| 'video' \| 'wide' \| number \| [number, number]` | — | AspectRatio | Required. The proportion the box holds before anything is in it: a name a
|
|
33
|
-
| `children` | `ReactNode` | — | AspectRatio | What the frame holds. Each child takes the one cell; a replaced child is fitted whole |
|
|
34
|
-
| `render` | `(props) => ReactNode` | — | AspectRatio | Substitutes the root element — a figure, an li — and hands it every data attribute and the token |
|
|
35
|
-
| `ref` | `Ref<HTMLDivElement>` | — | AspectRatio | Reaches the frame; the props type is the div’s own, extended |
|
|
36
|
-
| `--slotted-aspect-ratio` | `custom property` | — | an instance | What a custom ratio writes on the element, as w / h. A theme retunes a named ratio in the stylesheet instead |
|
|
41
|
+
| `ratio` | `'square' \| 'landscape' \| 'portrait' \| 'video' \| 'wide' \| number \| [number, number]` | — | AspectRatio | Required. The proportion the box holds before anything is in it: a name, a number or a pair of numbers. |
|
|
42
|
+
| `children` | `ReactNode` | — | AspectRatio | What the frame holds. Each child takes the one cell; a replaced child is fitted whole. |
|
|
43
|
+
| `render` | `(props) => ReactNode` | — | AspectRatio | Substitutes the root element — a figure, an li — and hands it every data attribute and the token. |
|
|
44
|
+
| `ref` | `Ref<HTMLDivElement>` | — | AspectRatio | Reaches the frame; the props type is the div’s own, extended. |
|
|
45
|
+
| `--slotted-aspect-ratio` | `custom property` | — | an instance | What a custom ratio writes on the element, as w / h. A theme retunes a named ratio in the stylesheet instead. |
|
|
37
46
|
|
|
38
47
|
## Axes and defaults
|
|
39
48
|
|
|
@@ -44,8 +53,8 @@ Excerpt — not a complete module
|
|
|
44
53
|
## Rules
|
|
45
54
|
|
|
46
55
|
- There is no aspect-ratio pattern in the WAI-ARIA Authoring Practices, and the frame needs none: it is a div with no role, and what it holds carries its own semantics — an img its alt, an iframe its title, a p its text.
|
|
47
|
-
- The frame never clips. Content taller than the ratio grows the box (
|
|
48
|
-
- A replaced child is fitted with object-fit: contain, so a picture is shown entire; a
|
|
56
|
+
- The frame never clips. Content taller than the ratio grows the box (the CSS sizing specification keeps a content-based minimum on a box with aspect-ratio), so a translation that runs longer than the design is read whole rather than cut at the ratio or laid over the frame below.
|
|
57
|
+
- A replaced child is fitted with object-fit: contain, so a picture is shown entire; a picture that has to cover the frame is a crop, and Image decides that with its fit prop.
|
|
49
58
|
- The frame moves nothing on load: the box is its stated proportion before the first byte of a picture arrives, which is what keeps a grid of thumbnails from shifting as each request returns.
|
|
50
59
|
|
|
51
60
|
## Tokens
|
|
@@ -54,53 +63,167 @@ Excerpt — not a complete module
|
|
|
54
63
|
|
|
55
64
|
## Examples
|
|
56
65
|
|
|
66
|
+
### Playground
|
|
67
|
+
|
|
68
|
+
One frame around a survey photograph, driven by the controls: switch the ratio and the frame changes shape while the picture is shown whole inside it.
|
|
69
|
+
|
|
70
|
+
Excerpt — not a complete module
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
<AspectRatio ratio="video">
|
|
74
|
+
<img alt="The fjord lookout at site 12" src={site.photo} />
|
|
75
|
+
</AspectRatio>;
|
|
76
|
+
```
|
|
77
|
+
|
|
57
78
|
### Five ratios a product decides once
|
|
58
79
|
|
|
59
80
|
square, landscape (4:3), portrait (3:4), video (16:9) and wide (21:9), each named for what it holds rather than for its numbers, so a template says "thumbnails are landscape" and the DOM says which one was taken.
|
|
60
81
|
|
|
61
|
-
|
|
82
|
+
Example
|
|
62
83
|
|
|
63
84
|
```tsx
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
import { AspectRatio } from '@slotted/react/aspect-ratio';
|
|
86
|
+
import { Card, CardBody } from '@slotted/react/card';
|
|
87
|
+
import { Grid } from '@slotted/react/grid';
|
|
88
|
+
import { Text } from '@slotted/react/typography';
|
|
89
|
+
|
|
90
|
+
const RATIOS = [
|
|
91
|
+
{ name: 'square', label: 'square, 1:1' },
|
|
92
|
+
{ name: 'landscape', label: 'landscape, 4:3' },
|
|
93
|
+
{ name: 'portrait', label: 'portrait, 3:4' },
|
|
94
|
+
{ name: 'video', label: 'video, 16:9' },
|
|
95
|
+
{ name: 'wide', label: 'wide, 21:9' },
|
|
96
|
+
] as const;
|
|
97
|
+
|
|
98
|
+
export default function AspectRatioRatios() {
|
|
99
|
+
return (
|
|
100
|
+
<Grid columns={3} gap={4} minItemWidth="xs">
|
|
101
|
+
{RATIOS.map((ratio) => (
|
|
102
|
+
<AspectRatio key={ratio.name} ratio={ratio.name}>
|
|
103
|
+
<Card>
|
|
104
|
+
<CardBody>
|
|
105
|
+
<Text size="sm">{ratio.label}</Text>
|
|
106
|
+
</CardBody>
|
|
107
|
+
</Card>
|
|
108
|
+
</AspectRatio>
|
|
109
|
+
))}
|
|
110
|
+
</Grid>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
69
113
|
```
|
|
70
114
|
|
|
71
115
|
### Any other proportion, as a number or a pair
|
|
72
116
|
|
|
73
117
|
A pair is written into the stylesheet exactly as given — 2 / 1 stays 2 / 1 — where a number is its quotient. Both mark the frame data-ratio="custom" and put the value on the instance.
|
|
74
118
|
|
|
75
|
-
|
|
119
|
+
Example
|
|
76
120
|
|
|
77
121
|
```tsx
|
|
78
|
-
|
|
79
|
-
|
|
122
|
+
import { AspectRatio } from '@slotted/react/aspect-ratio';
|
|
123
|
+
import { Card, CardBody } from '@slotted/react/card';
|
|
124
|
+
import { Stack } from '@slotted/react/stack';
|
|
125
|
+
import { Text } from '@slotted/react/typography';
|
|
126
|
+
|
|
127
|
+
export default function AspectRatioCustom() {
|
|
128
|
+
return (
|
|
129
|
+
<Stack gap={4}>
|
|
130
|
+
<AspectRatio ratio={[2, 1]}>
|
|
131
|
+
<Card>
|
|
132
|
+
<CardBody>
|
|
133
|
+
<Text size="sm">A pair, [2, 1]: written as 2 / 1.</Text>
|
|
134
|
+
</CardBody>
|
|
135
|
+
</Card>
|
|
136
|
+
</AspectRatio>
|
|
137
|
+
<AspectRatio ratio={1.85}>
|
|
138
|
+
<Card>
|
|
139
|
+
<CardBody>
|
|
140
|
+
<Text size="sm">A number, 1.85: written as its quotient.</Text>
|
|
141
|
+
</CardBody>
|
|
142
|
+
</Card>
|
|
143
|
+
</AspectRatio>
|
|
144
|
+
</Stack>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
80
147
|
```
|
|
81
148
|
|
|
82
149
|
### Replaced content is fitted whole
|
|
83
150
|
|
|
84
151
|
A 4:3 photograph in a 16:9 frame is shown entire with the frame either side; a wide one in a square frame is letterboxed the same way. The frame reserves and never crops — the crop is Image’s decision, taken with fit.
|
|
85
152
|
|
|
86
|
-
|
|
153
|
+
Example
|
|
87
154
|
|
|
88
155
|
```tsx
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
156
|
+
import { AspectRatio } from '@slotted/react/aspect-ratio';
|
|
157
|
+
import { Card } from '@slotted/react/card';
|
|
158
|
+
import { Stack } from '@slotted/react/stack';
|
|
159
|
+
import { Text } from '@slotted/react/typography';
|
|
160
|
+
|
|
161
|
+
const WAREHOUSE =
|
|
162
|
+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E";
|
|
163
|
+
|
|
164
|
+
export default function AspectRatioMedia() {
|
|
165
|
+
return (
|
|
166
|
+
<Stack gap={4}>
|
|
167
|
+
<Text size="sm" tone="muted">
|
|
168
|
+
A 4:3 picture in a video frame
|
|
169
|
+
</Text>
|
|
170
|
+
<Card>
|
|
171
|
+
<AspectRatio ratio="video">
|
|
172
|
+
<img alt="Illustration of the Rotterdam warehouse" src={WAREHOUSE} />
|
|
173
|
+
</AspectRatio>
|
|
174
|
+
</Card>
|
|
175
|
+
<Text size="sm" tone="muted">
|
|
176
|
+
The same picture in a square frame
|
|
177
|
+
</Text>
|
|
178
|
+
<Card>
|
|
179
|
+
<AspectRatio ratio="square">
|
|
180
|
+
<img alt="Illustration of the Rotterdam warehouse" src={WAREHOUSE} />
|
|
181
|
+
</AspectRatio>
|
|
182
|
+
</Card>
|
|
183
|
+
</Stack>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
92
186
|
```
|
|
93
187
|
|
|
94
188
|
### Content taller than the ratio grows the frame
|
|
95
189
|
|
|
96
190
|
Two lines fit a 16:9 frame at this width and the frame keeps its ratio; a longer paragraph does not fit, and the frame is exactly as tall as the paragraph. Nothing is clipped and nothing lands on the frame below: the ratio is a floor, not a ceiling.
|
|
97
191
|
|
|
98
|
-
|
|
192
|
+
Example
|
|
99
193
|
|
|
100
194
|
```tsx
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
195
|
+
import { AspectRatio } from '@slotted/react/aspect-ratio';
|
|
196
|
+
import { Card, CardBody } from '@slotted/react/card';
|
|
197
|
+
import { Stack } from '@slotted/react/stack';
|
|
198
|
+
import { Text } from '@slotted/react/typography';
|
|
199
|
+
|
|
200
|
+
export default function AspectRatioGrowth() {
|
|
201
|
+
return (
|
|
202
|
+
<Stack gap={4}>
|
|
203
|
+
<AspectRatio ratio="video">
|
|
204
|
+
<Card>
|
|
205
|
+
<CardBody>
|
|
206
|
+
<Text>Pickup window: 08:00 to 10:00.</Text>
|
|
207
|
+
</CardBody>
|
|
208
|
+
</Card>
|
|
209
|
+
</AspectRatio>
|
|
210
|
+
<AspectRatio ratio="video">
|
|
211
|
+
<Card>
|
|
212
|
+
<CardBody>
|
|
213
|
+
<Text>
|
|
214
|
+
Harbor Line moved the pickup for orders 20418 to 20431 from the morning window to the
|
|
215
|
+
afternoon window because the vessel from Singapore docked six hours late. The
|
|
216
|
+
Rotterdam warehouse holds the pallets on dock 4 until the carrier confirms the new
|
|
217
|
+
slot. Customers with a delivery promise before Thursday receive an email with the new
|
|
218
|
+
date, and the support team sees the same date on the order. Orders paid by transfer
|
|
219
|
+
are released after the payment clears.
|
|
220
|
+
</Text>
|
|
221
|
+
</CardBody>
|
|
222
|
+
</Card>
|
|
223
|
+
</AspectRatio>
|
|
224
|
+
</Stack>
|
|
225
|
+
);
|
|
226
|
+
}
|
|
104
227
|
```
|
|
105
228
|
|
|
106
229
|
### Two children stack; an Image composes the frame
|
|
@@ -118,7 +241,7 @@ Excerpt — not a complete module
|
|
|
118
241
|
|
|
119
242
|
### The frame has no role
|
|
120
243
|
|
|
121
|
-
A frame is a div and announces nothing; the content is
|
|
244
|
+
A frame is a div and announces nothing; the content is yours and carries its own name. A picture with a caption is a figure around the frame, with the figcaption after it, and the caption is not repeated in the alt.
|
|
122
245
|
|
|
123
246
|
Excerpt — not a complete module
|
|
124
247
|
|
|
@@ -130,3 +253,55 @@ Excerpt — not a complete module
|
|
|
130
253
|
<figcaption>Site 12 — fjord lookout, March survey</figcaption>
|
|
131
254
|
</figure>;
|
|
132
255
|
```
|
|
256
|
+
|
|
257
|
+
### figure.tsx
|
|
258
|
+
|
|
259
|
+
Example
|
|
260
|
+
|
|
261
|
+
```tsx
|
|
262
|
+
import { AspectRatio } from '@slotted/react/aspect-ratio';
|
|
263
|
+
import { Stack } from '@slotted/react/stack';
|
|
264
|
+
import { Text } from '@slotted/react/typography';
|
|
265
|
+
|
|
266
|
+
const WAREHOUSE =
|
|
267
|
+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E";
|
|
268
|
+
|
|
269
|
+
export default function AspectRatioFigure() {
|
|
270
|
+
return (
|
|
271
|
+
<Stack gap={3} render={(props) => <figure {...props} style={{ margin: 0 }} />}>
|
|
272
|
+
<AspectRatio ratio="landscape">
|
|
273
|
+
<img alt="Illustration of the Rotterdam warehouse" src={WAREHOUSE} />
|
|
274
|
+
</AspectRatio>
|
|
275
|
+
<Text render={(props) => <figcaption {...props} />} size="sm" tone="muted">
|
|
276
|
+
Rotterdam warehouse, dock 4, March inventory count
|
|
277
|
+
</Text>
|
|
278
|
+
</Stack>
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### overlay.tsx
|
|
284
|
+
|
|
285
|
+
Example
|
|
286
|
+
|
|
287
|
+
```tsx
|
|
288
|
+
import { AspectRatio } from '@slotted/react/aspect-ratio';
|
|
289
|
+
import { Badge } from '@slotted/react/badge';
|
|
290
|
+
import { Inline } from '@slotted/react/inline';
|
|
291
|
+
|
|
292
|
+
const WAREHOUSE =
|
|
293
|
+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Crect width='160' height='120' fill='%231e3a5f'/%3E%3Crect x='20' y='50' width='120' height='50' fill='%2393c5fd'/%3E%3Cpath d='M10 50 80 20l70 30Z' fill='%23dbeafe'/%3E%3Crect x='65' y='70' width='30' height='30' fill='%231e3a5f'/%3E%3C/svg%3E";
|
|
294
|
+
|
|
295
|
+
export default function AspectRatioOverlay() {
|
|
296
|
+
return (
|
|
297
|
+
<AspectRatio ratio="landscape">
|
|
298
|
+
<img alt="Last picture from the Rotterdam warehouse camera" src={WAREHOUSE} />
|
|
299
|
+
<Inline justify="center">
|
|
300
|
+
<Badge tone="danger" variant="solid">
|
|
301
|
+
Camera offline
|
|
302
|
+
</Badge>
|
|
303
|
+
</Inline>
|
|
304
|
+
</AspectRatio>
|
|
305
|
+
);
|
|
306
|
+
}
|
|
307
|
+
```
|