@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/tag.json
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"type": "'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
187
187
|
"defaultValue": "secondary",
|
|
188
188
|
"appliesTo": "Tag",
|
|
189
|
-
"description": "Which of the
|
|
189
|
+
"description": "Which of the six semantic colors the tag speaks in"
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
"name": "variant",
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
"type": "Partial<TagMessages>",
|
|
243
243
|
"defaultValue": "—",
|
|
244
244
|
"appliesTo": "Tag",
|
|
245
|
-
"description": "
|
|
245
|
+
"description": "Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design”"
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
"name": "removeDisabled",
|
|
@@ -304,15 +304,15 @@
|
|
|
304
304
|
"composition": [],
|
|
305
305
|
"events": [],
|
|
306
306
|
"accessibility": [
|
|
307
|
-
"
|
|
307
|
+
"The WAI-ARIA Authoring Practices define no tag or chip pattern. The group follows the Toolbar pattern, a chip that acts and the remove control follow the Button pattern, a chip that navigates follows the Link pattern, and a chip that holds a selection uses aria-pressed from WAI-ARIA 1.2.",
|
|
308
308
|
"The chip box is never the interactive element. A button cannot contain a button and an anchor cannot contain either, so a chip that both acts and removes puts its two controls side by side: the body is the primary target and the remove control is its sibling.",
|
|
309
309
|
"The remove control’s name is composed, not repeated: aria-labelledby joins a hidden word to the tag’s own label, so it announces “Remove Design” rather than “Remove”. Text referenced by aria-labelledby counts even when the element holding it is hidden.",
|
|
310
|
-
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.
|
|
311
|
-
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus.
|
|
310
|
+
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.",
|
|
311
|
+
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus. The ring is inset, so it does not cover the remove control beside the body or touch the next tag in a wrapped run.",
|
|
312
312
|
"The remove control is as tall as the chip and as wide as its glyph plus a step of air on each side, floored at the WCAG 2.2 2.5.8 minimum of 24 CSS pixels, which carries it past that minimum in both axes at every size and every density. The chip’s own height is floored at that minimum for the same reason.",
|
|
313
313
|
"A tag is one line. A value too long for its container is clipped with an ellipsis rather than reflowed, and the clipping is visual only: text-overflow shortens nothing, so the whole value stays in the DOM, stays in the accessibility tree, and a page search still finds it.",
|
|
314
314
|
"The label is a bidi isolate whose direction comes from its own first strong character, so an Arabic value inside an English page reads right to left and is clipped at its own end.",
|
|
315
|
-
"Under forced colors every tone ground becomes one system color, so
|
|
315
|
+
"Under forced colors every tone ground becomes one system color, so tag draws its edge in currentColor there, and a selected chip takes the system’s own Highlight pair — its whole signal is a ground the system has replaced.",
|
|
316
316
|
"A static tag carries no role of its own. What a value means comes from where it sits, and a role invented here would be wrong more often than right.",
|
|
317
317
|
"A group of static tags is written role=\"list\", which announces its length and turns the arrow keys off — a list is a structure rather than a widget."
|
|
318
318
|
]
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
"type": "'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
327
327
|
"defaultValue": "secondary",
|
|
328
328
|
"appliesTo": "TagButton",
|
|
329
|
-
"description": "Which of the
|
|
329
|
+
"description": "Which of the six semantic colors the tag speaks in"
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
332
|
"name": "variant",
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"type": "Partial<TagMessages>",
|
|
383
383
|
"defaultValue": "—",
|
|
384
384
|
"appliesTo": "TagButton",
|
|
385
|
-
"description": "
|
|
385
|
+
"description": "Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design”"
|
|
386
386
|
},
|
|
387
387
|
{
|
|
388
388
|
"name": "removeDisabled",
|
|
@@ -402,15 +402,15 @@
|
|
|
402
402
|
"composition": [],
|
|
403
403
|
"events": [],
|
|
404
404
|
"accessibility": [
|
|
405
|
-
"
|
|
405
|
+
"The WAI-ARIA Authoring Practices define no tag or chip pattern. The group follows the Toolbar pattern, a chip that acts and the remove control follow the Button pattern, a chip that navigates follows the Link pattern, and a chip that holds a selection uses aria-pressed from WAI-ARIA 1.2.",
|
|
406
406
|
"The chip box is never the interactive element. A button cannot contain a button and an anchor cannot contain either, so a chip that both acts and removes puts its two controls side by side: the body is the primary target and the remove control is its sibling.",
|
|
407
407
|
"The remove control’s name is composed, not repeated: aria-labelledby joins a hidden word to the tag’s own label, so it announces “Remove Design” rather than “Remove”. Text referenced by aria-labelledby counts even when the element holding it is hidden.",
|
|
408
|
-
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.
|
|
409
|
-
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus.
|
|
408
|
+
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.",
|
|
409
|
+
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus. The ring is inset, so it does not cover the remove control beside the body or touch the next tag in a wrapped run.",
|
|
410
410
|
"The remove control is as tall as the chip and as wide as its glyph plus a step of air on each side, floored at the WCAG 2.2 2.5.8 minimum of 24 CSS pixels, which carries it past that minimum in both axes at every size and every density. The chip’s own height is floored at that minimum for the same reason.",
|
|
411
411
|
"A tag is one line. A value too long for its container is clipped with an ellipsis rather than reflowed, and the clipping is visual only: text-overflow shortens nothing, so the whole value stays in the DOM, stays in the accessibility tree, and a page search still finds it.",
|
|
412
412
|
"The label is a bidi isolate whose direction comes from its own first strong character, so an Arabic value inside an English page reads right to left and is clipped at its own end.",
|
|
413
|
-
"Under forced colors every tone ground becomes one system color, so
|
|
413
|
+
"Under forced colors every tone ground becomes one system color, so tag draws its edge in currentColor there, and a selected chip takes the system’s own Highlight pair — its whole signal is a ground the system has replaced.",
|
|
414
414
|
"The command is a real button, so Enter and Space both activate it and the platform supplies the rest.",
|
|
415
415
|
"A disabled TagButton is natively disabled. Reach for aria-disabled through rootProps only when the chip has to stay in the tab sequence to explain itself."
|
|
416
416
|
]
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
"type": "'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
425
425
|
"defaultValue": "secondary",
|
|
426
426
|
"appliesTo": "TagLink",
|
|
427
|
-
"description": "Which of the
|
|
427
|
+
"description": "Which of the six semantic colors the tag speaks in"
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
430
|
"name": "variant",
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
"type": "Partial<TagMessages>",
|
|
481
481
|
"defaultValue": "—",
|
|
482
482
|
"appliesTo": "TagLink",
|
|
483
|
-
"description": "
|
|
483
|
+
"description": "Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design”"
|
|
484
484
|
},
|
|
485
485
|
{
|
|
486
486
|
"name": "removeDisabled",
|
|
@@ -500,15 +500,15 @@
|
|
|
500
500
|
"composition": [],
|
|
501
501
|
"events": [],
|
|
502
502
|
"accessibility": [
|
|
503
|
-
"
|
|
503
|
+
"The WAI-ARIA Authoring Practices define no tag or chip pattern. The group follows the Toolbar pattern, a chip that acts and the remove control follow the Button pattern, a chip that navigates follows the Link pattern, and a chip that holds a selection uses aria-pressed from WAI-ARIA 1.2.",
|
|
504
504
|
"The chip box is never the interactive element. A button cannot contain a button and an anchor cannot contain either, so a chip that both acts and removes puts its two controls side by side: the body is the primary target and the remove control is its sibling.",
|
|
505
505
|
"The remove control’s name is composed, not repeated: aria-labelledby joins a hidden word to the tag’s own label, so it announces “Remove Design” rather than “Remove”. Text referenced by aria-labelledby counts even when the element holding it is hidden.",
|
|
506
|
-
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.
|
|
507
|
-
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus.
|
|
506
|
+
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.",
|
|
507
|
+
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus. The ring is inset, so it does not cover the remove control beside the body or touch the next tag in a wrapped run.",
|
|
508
508
|
"The remove control is as tall as the chip and as wide as its glyph plus a step of air on each side, floored at the WCAG 2.2 2.5.8 minimum of 24 CSS pixels, which carries it past that minimum in both axes at every size and every density. The chip’s own height is floored at that minimum for the same reason.",
|
|
509
509
|
"A tag is one line. A value too long for its container is clipped with an ellipsis rather than reflowed, and the clipping is visual only: text-overflow shortens nothing, so the whole value stays in the DOM, stays in the accessibility tree, and a page search still finds it.",
|
|
510
510
|
"The label is a bidi isolate whose direction comes from its own first strong character, so an Arabic value inside an English page reads right to left and is clipped at its own end.",
|
|
511
|
-
"Under forced colors every tone ground becomes one system color, so
|
|
511
|
+
"Under forced colors every tone ground becomes one system color, so tag draws its edge in currentColor there, and a selected chip takes the system’s own Highlight pair — its whole signal is a ground the system has replaced.",
|
|
512
512
|
"The destination is a real anchor, so middle click, the context menu, download and “open in new tab” all keep working.",
|
|
513
513
|
"A chip that navigates to another origin says so in its own words or in a visually hidden sentence. The external marker belongs to the link family, on a link."
|
|
514
514
|
]
|
|
@@ -522,7 +522,7 @@
|
|
|
522
522
|
"type": "'accent' | 'secondary' | 'info' | 'success' | 'warning' | 'danger'",
|
|
523
523
|
"defaultValue": "secondary",
|
|
524
524
|
"appliesTo": "TagToggle",
|
|
525
|
-
"description": "Which of the
|
|
525
|
+
"description": "Which of the six semantic colors the tag speaks in"
|
|
526
526
|
},
|
|
527
527
|
{
|
|
528
528
|
"name": "variant",
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
"type": "Partial<TagMessages>",
|
|
579
579
|
"defaultValue": "—",
|
|
580
580
|
"appliesTo": "TagToggle",
|
|
581
|
-
"description": "
|
|
581
|
+
"description": "Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design”"
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
"name": "removeDisabled",
|
|
@@ -612,17 +612,17 @@
|
|
|
612
612
|
"composition": [],
|
|
613
613
|
"events": [],
|
|
614
614
|
"accessibility": [
|
|
615
|
-
"
|
|
615
|
+
"The WAI-ARIA Authoring Practices define no tag or chip pattern. The group follows the Toolbar pattern, a chip that acts and the remove control follow the Button pattern, a chip that navigates follows the Link pattern, and a chip that holds a selection uses aria-pressed from WAI-ARIA 1.2.",
|
|
616
616
|
"The chip box is never the interactive element. A button cannot contain a button and an anchor cannot contain either, so a chip that both acts and removes puts its two controls side by side: the body is the primary target and the remove control is its sibling.",
|
|
617
617
|
"The remove control’s name is composed, not repeated: aria-labelledby joins a hidden word to the tag’s own label, so it announces “Remove Design” rather than “Remove”. Text referenced by aria-labelledby counts even when the element holding it is hidden.",
|
|
618
|
-
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.
|
|
619
|
-
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus.
|
|
618
|
+
"Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.",
|
|
619
|
+
"The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus. The ring is inset, so it does not cover the remove control beside the body or touch the next tag in a wrapped run.",
|
|
620
620
|
"The remove control is as tall as the chip and as wide as its glyph plus a step of air on each side, floored at the WCAG 2.2 2.5.8 minimum of 24 CSS pixels, which carries it past that minimum in both axes at every size and every density. The chip’s own height is floored at that minimum for the same reason.",
|
|
621
621
|
"A tag is one line. A value too long for its container is clipped with an ellipsis rather than reflowed, and the clipping is visual only: text-overflow shortens nothing, so the whole value stays in the DOM, stays in the accessibility tree, and a page search still finds it.",
|
|
622
622
|
"The label is a bidi isolate whose direction comes from its own first strong character, so an Arabic value inside an English page reads right to left and is clipped at its own end.",
|
|
623
|
-
"Under forced colors every tone ground becomes one system color, so
|
|
624
|
-
"A selected tag announces aria-pressed, not aria-selected. aria-selected is only valid inside a listbox, a grid or a tree, and an option may not contain the remove control
|
|
625
|
-
"The label never changes with the state, which is the APG’s rule for a toggle: “
|
|
623
|
+
"Under forced colors every tone ground becomes one system color, so tag draws its edge in currentColor there, and a selected chip takes the system’s own Highlight pair — its whole signal is a ground the system has replaced.",
|
|
624
|
+
"A selected tag announces aria-pressed, not aria-selected. aria-selected is only valid inside a listbox, a grid or a tree, and an option may not contain the remove control that tag puts beside the label.",
|
|
625
|
+
"The label never changes with the state, which is the APG’s rule for a toggle: “Open” stays “Open” and the state is announced beside it.",
|
|
626
626
|
"Selection is not color alone. The chip fills, and a check grows into the label beside the words — WCAG 2.2 1.4.1."
|
|
627
627
|
]
|
|
628
628
|
}
|
|
@@ -753,7 +753,7 @@
|
|
|
753
753
|
"title": "A run of values that are not controls",
|
|
754
754
|
"note": null,
|
|
755
755
|
"language": "tsx",
|
|
756
|
-
"source": "<TagGroup aria-label=\"
|
|
756
|
+
"source": "<TagGroup aria-label=\"Technologies\" role=\"list\">\n <Tag>TypeScript</Tag>\n <Tag>Angular</Tag>\n <Tag>React</Tag>\n</TagGroup>;\n",
|
|
757
757
|
"verdict": "excerpt"
|
|
758
758
|
},
|
|
759
759
|
{
|
|
@@ -777,7 +777,7 @@
|
|
|
777
777
|
"title": "The remaining values, behind one more chip",
|
|
778
778
|
"note": null,
|
|
779
779
|
"language": "tsx",
|
|
780
|
-
"source": "<TagGroup aria-label=\"
|
|
780
|
+
"source": "<TagGroup aria-label=\"Participants\">\n {people.slice(0, 5).map((person) => (\n <Tag key={person.id}>{person.name}</Tag>\n ))}\n {people.length > 5 ? (\n <TagButton onClick={showAll} variant=\"outline\">\n +{people.length - 5}\n </TagButton>\n ) : null}\n</TagGroup>;\n",
|
|
781
781
|
"verdict": "excerpt"
|
|
782
782
|
},
|
|
783
783
|
{
|
|
@@ -785,7 +785,7 @@
|
|
|
785
785
|
"title": "A chip that navigates",
|
|
786
786
|
"note": null,
|
|
787
787
|
"language": "tsx",
|
|
788
|
-
"source": "<TagLink href=\"/
|
|
788
|
+
"source": "<TagLink href=\"/teams/platform\">#platform</TagLink>;\n",
|
|
789
789
|
"verdict": "excerpt"
|
|
790
790
|
},
|
|
791
791
|
{
|
|
@@ -793,7 +793,7 @@
|
|
|
793
793
|
"title": "A destination the router owns",
|
|
794
794
|
"note": null,
|
|
795
795
|
"language": "tsx",
|
|
796
|
-
"source": "<TagLink render={(props) => <Link {...props} to=\"/
|
|
796
|
+
"source": "<TagLink render={(props) => <Link {...props} to=\"/teams/platform\" />}>#platform</TagLink>;\n",
|
|
797
797
|
"verdict": "excerpt"
|
|
798
798
|
},
|
|
799
799
|
{
|
|
@@ -801,7 +801,7 @@
|
|
|
801
801
|
"title": "A filter that remembers its own state",
|
|
802
802
|
"note": null,
|
|
803
803
|
"language": "tsx",
|
|
804
|
-
"source": "<TagToggle defaultSelected>
|
|
804
|
+
"source": "<TagToggle defaultSelected>Open only</TagToggle>;\n",
|
|
805
805
|
"verdict": "excerpt"
|
|
806
806
|
},
|
|
807
807
|
{
|
|
@@ -809,8 +809,104 @@
|
|
|
809
809
|
"title": "A set of filters the application owns",
|
|
810
810
|
"note": null,
|
|
811
811
|
"language": "tsx",
|
|
812
|
-
"source": "<TagGroup aria-label=\"
|
|
812
|
+
"source": "<TagGroup aria-label=\"Filters\">\n {facets.map((facet) => (\n <TagToggle\n key={facet}\n onSelectedChange={(next) => setChosen(toggle(chosen, facet, next))}\n selected={chosen.has(facet)}\n tone=\"accent\"\n >\n {facet}\n </TagToggle>\n ))}\n</TagGroup>;\n",
|
|
813
813
|
"verdict": "excerpt"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"id": "actions",
|
|
817
|
+
"title": "actions.tsx",
|
|
818
|
+
"note": null,
|
|
819
|
+
"language": "tsx",
|
|
820
|
+
"source": "import { TagButton, TagGroup, TagLink } from '@slotted/react/tag';\nimport { useState } from 'react';\n\nconst CARRIERS = [\n { name: 'Northwind Freight', href: '#northwind-freight' },\n { name: 'Harbor Line', href: '#harbor-line' },\n { name: 'Blue Route', href: '#blue-route' },\n { name: 'Summit Cargo', href: '#summit-cargo' },\n { name: 'Delta Parcel', href: '#delta-parcel' },\n];\n\nexport default function TagActions() {\n const [expanded, setExpanded] = useState(false);\n\n const shown = expanded ? CARRIERS : CARRIERS.slice(0, 3);\n const hidden = CARRIERS.length - 3;\n\n return (\n <TagGroup aria-label=\"Carriers on route 14\">\n {shown.map((carrier) => (\n <TagLink key={carrier.name} href={carrier.href}>\n {carrier.name}\n </TagLink>\n ))}\n <TagButton onClick={() => setExpanded(!expanded)} variant=\"outline\">\n {expanded ? 'Show fewer' : `+${hidden} more`}\n </TagButton>\n </TagGroup>\n );\n}\n",
|
|
821
|
+
"verdict": "example"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"id": "appearance",
|
|
825
|
+
"title": "appearance.tsx",
|
|
826
|
+
"note": null,
|
|
827
|
+
"language": "tsx",
|
|
828
|
+
"source": "import { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Tag } from '@slotted/react/tag';\n\nconst VARIANTS = ['solid', 'soft', 'outline', 'dashed'] as const;\nconst TONES = [\n { tone: 'accent', label: 'Accent' },\n { tone: 'secondary', label: 'Secondary' },\n { tone: 'info', label: 'Info' },\n { tone: 'success', label: 'Success' },\n { tone: 'warning', label: 'Warning' },\n { tone: 'danger', label: 'Danger' },\n] as const;\n\nexport default function TagAppearance() {\n return (\n <Stack gap={3}>\n {VARIANTS.map((variant) => (\n <Inline key={variant} gap={2}>\n {TONES.map(({ tone, label }) => (\n <Tag key={tone} tone={tone} variant={variant}>\n {label}\n </Tag>\n ))}\n </Inline>\n ))}\n </Stack>\n );\n}\n",
|
|
829
|
+
"verdict": "example"
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
"id": "basic",
|
|
833
|
+
"title": "basic.tsx",
|
|
834
|
+
"note": null,
|
|
835
|
+
"language": "tsx",
|
|
836
|
+
"source": "import { Tag, TagGroup } from '@slotted/react/tag';\n\nexport default function TagBasic() {\n return (\n <TagGroup aria-label=\"Labels on order SO-10482\" role=\"list\">\n <Tag>Wholesale</Tag>\n <Tag>Fragile</Tag>\n <Tag>Priority shipping</Tag>\n </TagGroup>\n );\n}\n",
|
|
837
|
+
"verdict": "example"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"id": "confirm",
|
|
841
|
+
"title": "confirm.tsx",
|
|
842
|
+
"note": null,
|
|
843
|
+
"language": "tsx",
|
|
844
|
+
"source": "import { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Tag, TagGroup } from '@slotted/react/tag';\nimport type { TagRemoveReason, TagRemoveRequest } from '@slotted/react/tag';\nimport { Text } from '@slotted/react/typography';\nimport { useState } from 'react';\n\nexport default function TagConfirm() {\n const [reason, setReason] = useState<TagRemoveReason | null>(null);\n const [removed, setRemoved] = useState(false);\n\n const via = reason === 'keyboard' ? 'Backspace or Delete' : 'the remove control';\n\n function handleRemove(request: TagRemoveRequest) {\n request.cancel();\n setReason(request.reason);\n }\n\n function handleConfirm() {\n setRemoved(true);\n setReason(null);\n }\n\n return (\n <Stack gap={3}>\n <TagGroup aria-label=\"Environments of the release rule\">\n {!removed && (\n <Tag onRemove={handleRemove} tone=\"danger\" variant=\"outline\">\n Production\n </Tag>\n )}\n <Tag>Staging</Tag>\n </TagGroup>\n\n {reason !== null && (\n <Stack gap={2}>\n <Text size=\"sm\">Remove Production from this rule? Requested with {via}.</Text>\n <Inline gap={2}>\n <Button onClick={handleConfirm}>Remove</Button>\n <Button onClick={() => setReason(null)} variant=\"outline\">\n Keep\n </Button>\n </Inline>\n </Stack>\n )}\n </Stack>\n );\n}\n",
|
|
845
|
+
"verdict": "example"
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
"id": "content",
|
|
849
|
+
"title": "content.tsx",
|
|
850
|
+
"note": null,
|
|
851
|
+
"language": "tsx",
|
|
852
|
+
"source": "import { Glyph } from '@slotted/react/icon';\nimport { Inline } from '@slotted/react/inline';\nimport { Tag } from '@slotted/react/tag';\n\nexport default function TagContent() {\n return (\n <Inline gap={2}>\n <Tag start={<Glyph name=\"clock\" />} tone=\"warning\">\n Due Friday\n </Tag>\n <Tag end={<Glyph name=\"lock\" />}>Contract price</Tag>\n <Tag end={<Glyph name=\"circle-check\" />} start={<Glyph name=\"pin\" />} tone=\"success\">\n Verified address\n </Tag>\n </Inline>\n );\n}\n",
|
|
853
|
+
"verdict": "example"
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"id": "defaults",
|
|
857
|
+
"title": "defaults.tsx",
|
|
858
|
+
"note": null,
|
|
859
|
+
"language": "tsx",
|
|
860
|
+
"source": "import { Inline } from '@slotted/react/inline';\nimport { Tag, TagDefaultsProvider } from '@slotted/react/tag';\n\nexport default function TagDefaults() {\n return (\n <TagDefaultsProvider shape=\"square\" size=\"sm\">\n <Inline gap={2}>\n <Tag>Inbound</Tag>\n <Tag>Cross-dock</Tag>\n <Tag shape=\"pill\" size=\"md\">\n Cold chain\n </Tag>\n </Inline>\n </TagDefaultsProvider>\n );\n}\n",
|
|
861
|
+
"verdict": "example"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"id": "filters",
|
|
865
|
+
"title": "filters.tsx",
|
|
866
|
+
"note": null,
|
|
867
|
+
"language": "tsx",
|
|
868
|
+
"source": "import { Stack } from '@slotted/react/stack';\nimport { TagGroup, TagToggle } from '@slotted/react/tag';\nimport { Text } from '@slotted/react/typography';\nimport { useState } from 'react';\n\nconst FACETS = ['Late', 'Backordered', 'Fragile', 'Gift wrap'];\n\nexport default function TagFilters() {\n const [facets, setFacets] = useState(FACETS);\n const [chosen, setChosen] = useState(['Late']);\n\n function handleSelect(facet: string, selected: boolean) {\n setChosen((current) =>\n selected ? [...current, facet] : current.filter((item) => item !== facet),\n );\n }\n\n function handleRemove(facet: string) {\n setFacets((current) => current.filter((item) => item !== facet));\n setChosen((current) => current.filter((item) => item !== facet));\n }\n\n return (\n <Stack gap={3}>\n <TagGroup aria-label=\"Order filters\">\n {facets.map((facet) => (\n <TagToggle\n key={facet}\n onRemove={() => handleRemove(facet)}\n onSelectedChange={(selected) => handleSelect(facet, selected)}\n selected={chosen.includes(facet)}\n tone=\"accent\"\n >\n {facet}\n </TagToggle>\n ))}\n </TagGroup>\n\n <Text size=\"sm\" tone=\"muted\">\n {chosen.length} of {facets.length} filters applied.\n </Text>\n </Stack>\n );\n}\n",
|
|
869
|
+
"verdict": "example"
|
|
870
|
+
},
|
|
871
|
+
{
|
|
872
|
+
"id": "group",
|
|
873
|
+
"title": "group.tsx",
|
|
874
|
+
"note": null,
|
|
875
|
+
"language": "tsx",
|
|
876
|
+
"source": "import { TagButton, TagGroup } from '@slotted/react/tag';\n\nexport default function TagGroupExample() {\n return (\n <TagGroup aria-label=\"Saved order views\" loop={false} orientation=\"vertical\">\n <TagButton>All orders</TagButton>\n <TagButton>Late deliveries</TagButton>\n <TagButton>Awaiting payment</TagButton>\n <TagButton>Returns in transit</TagButton>\n </TagGroup>\n );\n}\n",
|
|
877
|
+
"verdict": "example"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"id": "removal",
|
|
881
|
+
"title": "removal.tsx",
|
|
882
|
+
"note": null,
|
|
883
|
+
"language": "tsx",
|
|
884
|
+
"source": "import { Tag, TagGroup } from '@slotted/react/tag';\nimport { Text } from '@slotted/react/typography';\nimport { useState } from 'react';\n\nconst LABELS = ['Wholesale', 'Fragile', 'Priority shipping', 'Gift wrap'];\n\nexport default function TagRemoval() {\n const [labels, setLabels] = useState(LABELS);\n\n function handleRemove(label: string) {\n setLabels((current) => current.filter((item) => item !== label));\n }\n\n return (\n <>\n <TagGroup aria-label=\"Labels on order SO-10482\">\n {labels.map((label) => (\n <Tag key={label} onRemove={() => handleRemove(label)}>\n {label}\n </Tag>\n ))}\n </TagGroup>\n\n {labels.length === 0 && (\n <Text size=\"sm\" tone=\"muted\">\n No labels on this order.\n </Text>\n )}\n </>\n );\n}\n",
|
|
885
|
+
"verdict": "example"
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"id": "selection",
|
|
889
|
+
"title": "selection.tsx",
|
|
890
|
+
"note": null,
|
|
891
|
+
"language": "tsx",
|
|
892
|
+
"source": "import { TagGroup, TagToggle } from '@slotted/react/tag';\n\nexport default function TagSelection() {\n return (\n <TagGroup aria-label=\"Order status\">\n <TagToggle defaultSelected tone=\"accent\">\n Open\n </TagToggle>\n <TagToggle tone=\"accent\">Packed</TagToggle>\n <TagToggle tone=\"accent\">Shipped</TagToggle>\n <TagToggle disabled tone=\"accent\">\n Cancelled\n </TagToggle>\n </TagGroup>\n );\n}\n",
|
|
893
|
+
"verdict": "example"
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
"id": "sizes",
|
|
897
|
+
"title": "sizes.tsx",
|
|
898
|
+
"note": null,
|
|
899
|
+
"language": "tsx",
|
|
900
|
+
"source": "import { Inline } from '@slotted/react/inline';\nimport { Stack } from '@slotted/react/stack';\nimport { Tag } from '@slotted/react/tag';\n\nconst SIZES = [\n { size: 'sm', label: 'Small' },\n { size: 'md', label: 'Medium' },\n { size: 'lg', label: 'Large' },\n] as const;\nconst SHAPES = ['pill', 'square'] as const;\n\nexport default function TagSizes() {\n return (\n <Stack gap={3}>\n {SHAPES.map((shape) => (\n <Inline key={shape} align=\"center\" gap={2}>\n {SIZES.map(({ size, label }) => (\n <Tag key={size} shape={shape} size={size} tone=\"success\">\n {label}\n </Tag>\n ))}\n </Inline>\n ))}\n </Stack>\n );\n}\n",
|
|
901
|
+
"verdict": "example"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
"id": "states",
|
|
905
|
+
"title": "states.tsx",
|
|
906
|
+
"note": null,
|
|
907
|
+
"language": "tsx",
|
|
908
|
+
"source": "import { Inline } from '@slotted/react/inline';\nimport { Tag, TagButton, TagLink } from '@slotted/react/tag';\n\nexport default function TagStates() {\n return (\n <Inline gap={2}>\n <Tag disabled onRemove={() => undefined}>\n Archived\n </Tag>\n <Tag onRemove={() => undefined} removeDisabled>\n Required\n </Tag>\n <TagButton disabled>Assign owner</TagButton>\n <TagLink disabled href=\"#carrier-portal\">\n Carrier portal\n </TagLink>\n </Inline>\n );\n}\n",
|
|
909
|
+
"verdict": "example"
|
|
814
910
|
}
|
|
815
911
|
]
|
|
816
912
|
}
|
package/dist/docs/tag.md
CHANGED
|
@@ -5,10 +5,20 @@
|
|
|
5
5
|
|
|
6
6
|
## Minimal example
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Example
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
|
-
|
|
11
|
+
import { Tag, TagGroup } from '@slotted/react/tag';
|
|
12
|
+
|
|
13
|
+
export default function TagBasic() {
|
|
14
|
+
return (
|
|
15
|
+
<TagGroup aria-label="Labels on order SO-10482" role="list">
|
|
16
|
+
<Tag>Wholesale</Tag>
|
|
17
|
+
<Tag>Fragile</Tag>
|
|
18
|
+
<Tag>Priority shipping</Tag>
|
|
19
|
+
</TagGroup>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
12
22
|
```
|
|
13
23
|
|
|
14
24
|
## Props
|
|
@@ -17,7 +27,7 @@ Excerpt — not a complete module
|
|
|
17
27
|
|
|
18
28
|
| Name | Type | Default | Applies to | Description |
|
|
19
29
|
| --- | --- | --- | --- | --- |
|
|
20
|
-
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | Tag | Which of the
|
|
30
|
+
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | Tag | Which of the six semantic colors the tag speaks in |
|
|
21
31
|
| `variant` | `'solid' \| 'soft' \| 'outline' \| 'dashed'` | soft | Tag | How that color is painted: filled, tinted, an edge alone, or that edge in dashes. A selected tag fills whatever its variant |
|
|
22
32
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | Tag | Type, glyph and gap come from the control scale, so a tag shrinks with density beside the controls it sits with |
|
|
23
33
|
| `shape` | `'pill' \| 'square'` | pill | Tag | A rounded chip, or a rectangle with the small corner radius |
|
|
@@ -25,7 +35,7 @@ Excerpt — not a complete module
|
|
|
25
35
|
| `end` | `ReactNode` | — | Tag | A glyph after the words, wrapped in the end part |
|
|
26
36
|
| `disabled` | `boolean` | false | Tag | Refuses every interaction the tag offers, including its removal |
|
|
27
37
|
| `onRemove` | `(request: TagRemoveRequest) => void` | — | Tag | Asks to be removed. The remove control is rendered only when this is present. request.reason is remove for the control and keyboard for Backspace or Delete; request.cancel() refuses it, and the group then leaves focus where it is |
|
|
28
|
-
| `messages` | `Partial<TagMessages>` | — | Tag |
|
|
38
|
+
| `messages` | `Partial<TagMessages>` | — | Tag | Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design” |
|
|
29
39
|
| `removeDisabled` | `boolean` | false | Tag | Refuses the removal while the rest of the tag stays operable |
|
|
30
40
|
| `orientation` | `'horizontal' \| 'vertical'` | horizontal | TagGroup | Which way the run reads. vertical also writes aria-orientation |
|
|
31
41
|
| `loop` | `boolean` | true | TagGroup | Whether the arrow keys wrap past the ends of the run |
|
|
@@ -39,7 +49,7 @@ Excerpt — not a complete module
|
|
|
39
49
|
|
|
40
50
|
| Name | Type | Default | Applies to | Description |
|
|
41
51
|
| --- | --- | --- | --- | --- |
|
|
42
|
-
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | TagButton | Which of the
|
|
52
|
+
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | TagButton | Which of the six semantic colors the tag speaks in |
|
|
43
53
|
| `variant` | `'solid' \| 'soft' \| 'outline' \| 'dashed'` | soft | TagButton | How that color is painted: filled, tinted, an edge alone, or that edge in dashes. A selected tag fills whatever its variant |
|
|
44
54
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | TagButton | Type, glyph and gap come from the control scale, so a tag shrinks with density beside the controls it sits with |
|
|
45
55
|
| `shape` | `'pill' \| 'square'` | pill | TagButton | A rounded chip, or a rectangle with the small corner radius |
|
|
@@ -47,7 +57,7 @@ Excerpt — not a complete module
|
|
|
47
57
|
| `end` | `ReactNode` | — | TagButton | A glyph after the words, wrapped in the end part |
|
|
48
58
|
| `disabled` | `boolean` | false | TagButton | Refuses every interaction the tag offers, including its removal |
|
|
49
59
|
| `onRemove` | `(request: TagRemoveRequest) => void` | — | TagButton | Asks to be removed. The remove control is rendered only when this is present. request.reason is remove for the control and keyboard for Backspace or Delete; request.cancel() refuses it, and the group then leaves focus where it is |
|
|
50
|
-
| `messages` | `Partial<TagMessages>` | — | TagButton |
|
|
60
|
+
| `messages` | `Partial<TagMessages>` | — | TagButton | Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design” |
|
|
51
61
|
| `removeDisabled` | `boolean` | false | TagButton | Refuses the removal while the rest of the tag stays operable |
|
|
52
62
|
| `onClick` | `(event) => void` | — | TagButton | The command. It lands on the button the chip’s body is, so type, form and every native button prop reach the element that owns them |
|
|
53
63
|
|
|
@@ -55,7 +65,7 @@ Excerpt — not a complete module
|
|
|
55
65
|
|
|
56
66
|
| Name | Type | Default | Applies to | Description |
|
|
57
67
|
| --- | --- | --- | --- | --- |
|
|
58
|
-
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | TagLink | Which of the
|
|
68
|
+
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | TagLink | Which of the six semantic colors the tag speaks in |
|
|
59
69
|
| `variant` | `'solid' \| 'soft' \| 'outline' \| 'dashed'` | soft | TagLink | How that color is painted: filled, tinted, an edge alone, or that edge in dashes. A selected tag fills whatever its variant |
|
|
60
70
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | TagLink | Type, glyph and gap come from the control scale, so a tag shrinks with density beside the controls it sits with |
|
|
61
71
|
| `shape` | `'pill' \| 'square'` | pill | TagLink | A rounded chip, or a rectangle with the small corner radius |
|
|
@@ -63,7 +73,7 @@ Excerpt — not a complete module
|
|
|
63
73
|
| `end` | `ReactNode` | — | TagLink | A glyph after the words, wrapped in the end part |
|
|
64
74
|
| `disabled` | `boolean` | false | TagLink | Refuses every interaction the tag offers, including its removal |
|
|
65
75
|
| `onRemove` | `(request: TagRemoveRequest) => void` | — | TagLink | Asks to be removed. The remove control is rendered only when this is present. request.reason is remove for the control and keyboard for Backspace or Delete; request.cancel() refuses it, and the group then leaves focus where it is |
|
|
66
|
-
| `messages` | `Partial<TagMessages>` | — | TagLink |
|
|
76
|
+
| `messages` | `Partial<TagMessages>` | — | TagLink | Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design” |
|
|
67
77
|
| `removeDisabled` | `boolean` | false | TagLink | Refuses the removal while the rest of the tag stays operable |
|
|
68
78
|
| `href` | `string` | — | TagLink | The destination. A disabled TagLink loses it and announces aria-disabled, because an anchor without a destination is not a link |
|
|
69
79
|
|
|
@@ -71,7 +81,7 @@ Excerpt — not a complete module
|
|
|
71
81
|
|
|
72
82
|
| Name | Type | Default | Applies to | Description |
|
|
73
83
|
| --- | --- | --- | --- | --- |
|
|
74
|
-
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | TagToggle | Which of the
|
|
84
|
+
| `tone` | `'accent' \| 'secondary' \| 'info' \| 'success' \| 'warning' \| 'danger'` | secondary | TagToggle | Which of the six semantic colors the tag speaks in |
|
|
75
85
|
| `variant` | `'solid' \| 'soft' \| 'outline' \| 'dashed'` | soft | TagToggle | How that color is painted: filled, tinted, an edge alone, or that edge in dashes. A selected tag fills whatever its variant |
|
|
76
86
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | TagToggle | Type, glyph and gap come from the control scale, so a tag shrinks with density beside the controls it sits with |
|
|
77
87
|
| `shape` | `'pill' \| 'square'` | pill | TagToggle | A rounded chip, or a rectangle with the small corner radius |
|
|
@@ -79,7 +89,7 @@ Excerpt — not a complete module
|
|
|
79
89
|
| `end` | `ReactNode` | — | TagToggle | A glyph after the words, wrapped in the end part |
|
|
80
90
|
| `disabled` | `boolean` | false | TagToggle | Refuses every interaction the tag offers, including its removal |
|
|
81
91
|
| `onRemove` | `(request: TagRemoveRequest) => void` | — | TagToggle | Asks to be removed. The remove control is rendered only when this is present. request.reason is remove for the control and keyboard for Backspace or Delete; request.cancel() refuses it, and the group then leaves focus where it is |
|
|
82
|
-
| `messages` | `Partial<TagMessages>` | — | TagToggle |
|
|
92
|
+
| `messages` | `Partial<TagMessages>` | — | TagToggle | Overrides for the strings of the language in force, by key: remove is the word the remove control announces before the tag’s own label, so it reads “Remove Design” |
|
|
83
93
|
| `removeDisabled` | `boolean` | false | TagToggle | Refuses the removal while the rest of the tag stays operable |
|
|
84
94
|
| `selected` | `boolean` | false | TagToggle | The selection the consumer owns. Passing it puts the tag in controlled mode for good |
|
|
85
95
|
| `defaultSelected` | `boolean` | — | TagToggle | The selection an uncontrolled tag starts from, read once. A later change to it is not silently adopted |
|
|
@@ -97,23 +107,23 @@ Excerpt — not a complete module
|
|
|
97
107
|
|
|
98
108
|
## Rules
|
|
99
109
|
|
|
100
|
-
-
|
|
110
|
+
- The WAI-ARIA Authoring Practices define no tag or chip pattern. The group follows the Toolbar pattern, a chip that acts and the remove control follow the Button pattern, a chip that navigates follows the Link pattern, and a chip that holds a selection uses aria-pressed from WAI-ARIA 1.2.
|
|
101
111
|
- The chip box is never the interactive element. A button cannot contain a button and an anchor cannot contain either, so a chip that both acts and removes puts its two controls side by side: the body is the primary target and the remove control is its sibling.
|
|
102
112
|
- The remove control’s name is composed, not repeated: aria-labelledby joins a hidden word to the tag’s own label, so it announces “Remove Design” rather than “Remove”. Text referenced by aria-labelledby counts even when the element holding it is hidden.
|
|
103
|
-
- Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.
|
|
104
|
-
- The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus.
|
|
113
|
+
- Backspace and Delete on any control inside a removable tag ask for the same removal the X does, and the request says which of the two it was.
|
|
114
|
+
- The focus ring is drawn on the control, never on the chip: a chip can hold two controls, and a ring around the whole box could not say which one has focus. The ring is inset, so it does not cover the remove control beside the body or touch the next tag in a wrapped run.
|
|
105
115
|
- The remove control is as tall as the chip and as wide as its glyph plus a step of air on each side, floored at the WCAG 2.2 2.5.8 minimum of 24 CSS pixels, which carries it past that minimum in both axes at every size and every density. The chip’s own height is floored at that minimum for the same reason.
|
|
106
116
|
- A tag is one line. A value too long for its container is clipped with an ellipsis rather than reflowed, and the clipping is visual only: text-overflow shortens nothing, so the whole value stays in the DOM, stays in the accessibility tree, and a page search still finds it.
|
|
107
117
|
- The label is a bidi isolate whose direction comes from its own first strong character, so an Arabic value inside an English page reads right to left and is clipped at its own end.
|
|
108
|
-
- Under forced colors every tone ground becomes one system color, so
|
|
118
|
+
- Under forced colors every tone ground becomes one system color, so tag draws its edge in currentColor there, and a selected chip takes the system’s own Highlight pair — its whole signal is a ground the system has replaced.
|
|
109
119
|
- A static tag carries no role of its own. What a value means comes from where it sits, and a role invented here would be wrong more often than right.
|
|
110
120
|
- A group of static tags is written role="list", which announces its length and turns the arrow keys off — a list is a structure rather than a widget.
|
|
111
121
|
- The command is a real button, so Enter and Space both activate it and the platform supplies the rest.
|
|
112
122
|
- A disabled TagButton is natively disabled. Reach for aria-disabled through rootProps only when the chip has to stay in the tab sequence to explain itself.
|
|
113
123
|
- The destination is a real anchor, so middle click, the context menu, download and “open in new tab” all keep working.
|
|
114
124
|
- A chip that navigates to another origin says so in its own words or in a visually hidden sentence. The external marker belongs to the link family, on a link.
|
|
115
|
-
- A selected tag announces aria-pressed, not aria-selected. aria-selected is only valid inside a listbox, a grid or a tree, and an option may not contain the remove control
|
|
116
|
-
- The label never changes with the state, which is the APG’s rule for a toggle: “
|
|
125
|
+
- A selected tag announces aria-pressed, not aria-selected. aria-selected is only valid inside a listbox, a grid or a tree, and an option may not contain the remove control that tag puts beside the label.
|
|
126
|
+
- The label never changes with the state, which is the APG’s rule for a toggle: “Open” stays “Open” and the state is announced beside it.
|
|
117
127
|
- Selection is not color alone. The chip fills, and a check grows into the label beside the words — WCAG 2.2 1.4.1.
|
|
118
128
|
|
|
119
129
|
## Tokens
|
|
@@ -122,125 +132,4 @@ Excerpt — not a complete module
|
|
|
122
132
|
|
|
123
133
|
## Examples
|
|
124
134
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Excerpt — not a complete module
|
|
128
|
-
|
|
129
|
-
```tsx
|
|
130
|
-
<TagGroup aria-label="Labels">
|
|
131
|
-
{labels.map((label) => (
|
|
132
|
-
<Tag key={label} onRemove={() => setLabels(labels.filter((it) => it !== label))}>
|
|
133
|
-
{label}
|
|
134
|
-
</Tag>
|
|
135
|
-
))}
|
|
136
|
-
</TagGroup>;
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
### A removal the application refuses until it is confirmed
|
|
140
|
-
|
|
141
|
-
Excerpt — not a complete module
|
|
142
|
-
|
|
143
|
-
```tsx
|
|
144
|
-
<Tag
|
|
145
|
-
onRemove={(request) => {
|
|
146
|
-
if (!confirmed) {
|
|
147
|
-
request.cancel();
|
|
148
|
-
askForConfirmation(request.reason);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
remove();
|
|
152
|
-
}}
|
|
153
|
-
>
|
|
154
|
-
Production
|
|
155
|
-
</Tag>;
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### A run of values that are not controls
|
|
159
|
-
|
|
160
|
-
Excerpt — not a complete module
|
|
161
|
-
|
|
162
|
-
```tsx
|
|
163
|
-
<TagGroup aria-label="Tecnologias" role="list">
|
|
164
|
-
<Tag>TypeScript</Tag>
|
|
165
|
-
<Tag>Angular</Tag>
|
|
166
|
-
<Tag>React</Tag>
|
|
167
|
-
</TagGroup>;
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
### One decision for every tag in the application
|
|
171
|
-
|
|
172
|
-
Excerpt — not a complete module
|
|
173
|
-
|
|
174
|
-
```tsx
|
|
175
|
-
<TagDefaultsProvider size="sm">
|
|
176
|
-
<App />
|
|
177
|
-
</TagDefaultsProvider>;
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### A chip that runs a command
|
|
181
|
-
|
|
182
|
-
Excerpt — not a complete module
|
|
183
|
-
|
|
184
|
-
```tsx
|
|
185
|
-
<TagButton onClick={() => openAssignee()}>Assign owner</TagButton>;
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### The remaining values, behind one more chip
|
|
189
|
-
|
|
190
|
-
Excerpt — not a complete module
|
|
191
|
-
|
|
192
|
-
```tsx
|
|
193
|
-
<TagGroup aria-label="Participantes">
|
|
194
|
-
{people.slice(0, 5).map((person) => (
|
|
195
|
-
<Tag key={person.id}>{person.name}</Tag>
|
|
196
|
-
))}
|
|
197
|
-
{people.length > 5 ? (
|
|
198
|
-
<TagButton onClick={showAll} variant="outline">
|
|
199
|
-
+{people.length - 5}
|
|
200
|
-
</TagButton>
|
|
201
|
-
) : null}
|
|
202
|
-
</TagGroup>;
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
### A chip that navigates
|
|
206
|
-
|
|
207
|
-
Excerpt — not a complete module
|
|
208
|
-
|
|
209
|
-
```tsx
|
|
210
|
-
<TagLink href="/equipes/plataforma">#plataforma</TagLink>;
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### A destination the router owns
|
|
214
|
-
|
|
215
|
-
Excerpt — not a complete module
|
|
216
|
-
|
|
217
|
-
```tsx
|
|
218
|
-
<TagLink render={(props) => <Link {...props} to="/equipes/plataforma" />}>#plataforma</TagLink>;
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### A filter that remembers its own state
|
|
222
|
-
|
|
223
|
-
Excerpt — not a complete module
|
|
224
|
-
|
|
225
|
-
```tsx
|
|
226
|
-
<TagToggle defaultSelected>Somente abertos</TagToggle>;
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
### A set of filters the application owns
|
|
230
|
-
|
|
231
|
-
Excerpt — not a complete module
|
|
232
|
-
|
|
233
|
-
```tsx
|
|
234
|
-
<TagGroup aria-label="Filtros">
|
|
235
|
-
{facets.map((facet) => (
|
|
236
|
-
<TagToggle
|
|
237
|
-
key={facet}
|
|
238
|
-
onSelectedChange={(next) => setChosen(toggle(chosen, facet, next))}
|
|
239
|
-
selected={chosen.has(facet)}
|
|
240
|
-
tone="accent"
|
|
241
|
-
>
|
|
242
|
-
{facet}
|
|
243
|
-
</TagToggle>
|
|
244
|
-
))}
|
|
245
|
-
</TagGroup>;
|
|
246
|
-
```
|
|
135
|
+
See [tag.examples.md](./tag.examples.md).
|