@slotted/react 0.1.0-beta.40 → 0.1.0-beta.42
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/{accordion-n5D6mcmS.js → accordion-xW-aFeGb.js} +1 -1
- package/dist/accordion.js +1 -1
- package/dist/{action-bar-Cq4dt4hP.js → action-bar-BSUuY6pJ.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{action-sheet-dNnB26br.js → action-sheet-BouG2qh_.js} +1 -1
- package/dist/action-sheet.js +1 -1
- package/dist/{app-shell-ClwskWBN.js → app-shell-D54YkU7E.js} +127 -111
- package/dist/app-shell.js +2 -2
- package/dist/{attachment-AAjprQyU.js → attachment-MqczA38F.js} +1 -1
- package/dist/attachment.js +1 -1
- package/dist/{badge-pgYVOnZO.js → badge-DFskjsxA.js} +21 -20
- package/dist/badge.js +1 -1
- package/dist/calendar-YQ784o4d.js +617 -0
- package/dist/calendar.js +1 -1
- package/dist/{cascader-CivJ76VR.js → cascader-fq8fNWSr.js} +1 -1
- package/dist/cascader.js +1 -1
- package/dist/chart-vedR0BDN.js +1055 -0
- package/dist/chart.js +1 -1
- package/dist/{checkbox-D3E4gzMe.js → checkbox-DsJhlB5c.js} +3 -3
- package/dist/{checkbox-group-Dg5YN3fx.js → checkbox-group-pvX9R_yS.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{collapsible-CT4_3aXm.js → collapsible-KzBs5HvA.js} +2 -2
- package/dist/collapsible.js +1 -1
- package/dist/{color-picker-CaLcV-63.js → color-picker-i-MJ5VVs.js} +9 -9
- package/dist/color-picker.js +1 -1
- package/dist/column-manager-D028QbfO.js +586 -0
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-C2qlkTw6.js → combobox-599heRN_.js} +1 -1
- package/dist/combobox.js +1 -1
- package/dist/{context-menu-WiKS4Zwv.js → context-menu-WM_tT9hz.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field-BO2P6FPd.js → currency-field-rS36pjCO.js} +182 -145
- package/dist/currency-field.js +1 -1
- package/dist/dashboard-grid-Dh2Q3IQv.js +1201 -0
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-B7UuUvBH.js → data-grid-D106baPp.js} +1425 -1399
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-CyEq7M2D.js → data-list-BA0xrySM.js} +2 -2
- package/dist/data-list.js +1 -1
- package/dist/{date-field-CxubN_3u.js → date-field-BZ5JcvXJ.js} +1 -1
- package/dist/date-field.js +1 -1
- package/dist/{date-picker-DMcMFW_N.js → date-picker-BvEbsbJC.js} +29 -27
- package/dist/date-picker.js +2 -2
- package/dist/{date-range-picker-D9zo93NE.js → date-range-picker-uIr-yReE.js} +169 -164
- package/dist/date-range-picker.js +1 -1
- package/dist/{datetime-field-GMIqBuTa.js → datetime-field-DDs3mV9Z.js} +1 -1
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-lOXZbAx_.js → datetime-picker-DDYXqrjm.js} +175 -164
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-DU5ctZbm.js → datetime-range-picker-CFTHW771.js} +194 -183
- package/dist/datetime-range-picker.js +1 -1
- package/dist/{detail-panel-DLgRhEFO.js → detail-panel-EImAtksY.js} +3 -3
- package/dist/detail-panel.js +1 -1
- package/dist/docs/accordion.examples.md +743 -0
- package/dist/docs/accordion.json +84 -28
- package/dist/docs/accordion.md +56 -152
- package/dist/docs/action-sheet.examples.md +771 -0
- package/dist/docs/action-sheet.json +91 -51
- package/dist/docs/action-sheet.md +72 -233
- package/dist/docs/app-shell.json +7 -0
- package/dist/docs/app-shell.md +1 -0
- package/dist/docs/badge.json +8 -0
- package/dist/docs/badge.md +1 -0
- package/dist/docs/breadcrumb.json +64 -16
- package/dist/docs/breadcrumb.md +489 -56
- package/dist/docs/calendar.json +8 -1
- package/dist/docs/calendar.md +2 -1
- package/dist/docs/chart.examples.md +48 -0
- package/dist/docs/chart.json +60 -7
- package/dist/docs/chart.md +9 -5
- package/dist/docs/collapsible.examples.md +575 -0
- package/dist/docs/collapsible.json +89 -49
- package/dist/docs/collapsible.md +47 -197
- package/dist/docs/context-menu.json +58 -18
- package/dist/docs/context-menu.md +442 -77
- package/dist/docs/currency-field.examples.md +1 -1
- package/dist/docs/currency-field.json +4 -4
- package/dist/docs/currency-field.md +3 -3
- package/dist/docs/data-grid.json +15 -1
- package/dist/docs/data-grid.md +1 -1
- package/dist/docs/data-grid.props.md +2 -0
- package/dist/docs/date-picker.json +9 -2
- package/dist/docs/date-picker.md +3 -2
- package/dist/docs/date-range-picker.json +9 -2
- package/dist/docs/date-range-picker.md +3 -2
- package/dist/docs/datetime-picker.json +9 -2
- package/dist/docs/datetime-picker.md +3 -2
- package/dist/docs/datetime-range-picker.json +9 -2
- package/dist/docs/datetime-range-picker.md +3 -2
- package/dist/docs/field.json +15 -1
- package/dist/docs/field.md +3 -1
- package/dist/docs/floating-panel.json +56 -0
- package/dist/docs/floating-panel.md +329 -8
- package/dist/docs/guidelines/async-feedback.md +11 -1
- package/dist/docs/guidelines/index.md +1 -0
- package/dist/docs/hover-card.json +65 -17
- package/dist/docs/hover-card.md +422 -64
- package/dist/docs/loading-overlay.examples.md +577 -0
- package/dist/docs/loading-overlay.json +55 -23
- package/dist/docs/loading-overlay.md +49 -168
- package/dist/docs/menu.json +67 -0
- package/dist/docs/menu.md +8 -1
- package/dist/docs/menubar.json +55 -15
- package/dist/docs/menubar.md +488 -42
- package/dist/docs/pagination.json +89 -33
- package/dist/docs/pagination.md +462 -55
- package/dist/docs/popover.json +41 -3
- package/dist/docs/popover.md +5 -2
- package/dist/docs/section.json +1 -1
- package/dist/docs/section.md +1 -1
- package/dist/docs/select.json +55 -1
- package/dist/docs/select.md +7 -2
- package/dist/docs/skills/theme-app/SKILL.md +3 -2
- package/dist/docs/skills/waiting-states/SKILL.md +4 -1
- package/dist/docs/stat-card.json +9 -1
- package/dist/docs/stat-card.md +2 -1
- package/dist/docs/switch.json +12 -5
- package/dist/docs/switch.md +5 -4
- package/dist/docs/tag.json +8 -0
- package/dist/docs/tag.md +1 -0
- package/dist/docs/time-picker.json +1 -1
- package/dist/docs/time-picker.md +1 -1
- package/dist/docs/time-range-picker.json +1 -1
- package/dist/docs/time-range-picker.md +1 -1
- package/dist/docs/toggle-group.examples.md +584 -0
- package/dist/docs/toggle-group.json +84 -20
- package/dist/docs/toggle-group.md +17 -182
- package/dist/docs/toggle.json +93 -37
- package/dist/docs/toggle.md +304 -51
- package/dist/{drawer-Du1aC1px.js → drawer-CQagePr_.js} +256 -256
- package/dist/drawer.js +1 -1
- package/dist/{entity-picker-BwJX0gNJ.js → entity-picker-CC4VoC3p.js} +2 -2
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-biSTH0yK.js → event-calendar-CjmF_e0H.js} +6 -6
- package/dist/event-calendar.js +1 -1
- package/dist/field-C-HRhke0.js +421 -0
- package/dist/{field-group-7zV68b3d.js → field-group-CU0PasvW.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/{filter-bar-BQZFgV0A.js → filter-bar-B3QJD7SZ.js} +25 -25
- package/dist/filter-bar.js +1 -1
- package/dist/{hover-card-D8OyhmEG.js → hover-card-CTItbEfH.js} +2 -2
- package/dist/hover-card.js +1 -1
- package/dist/{import-export-center-DWSEOV5Z.js → import-export-center-CW8YVZev.js} +3 -3
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +132 -132
- package/dist/{listbox-CWU3DiEt.js → listbox-ZqiJ2yer.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{loading-overlay-BLIrcaoj.js → loading-overlay-BxIktMtQ.js} +1 -1
- package/dist/loading-overlay.js +1 -1
- package/dist/{markdown-7wOBMXTl.js → markdown-BdskE4-L.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/menu-parts-DXs5YuUA.js +932 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-k8Q4_p9l.js → menubar-CVoAFc6r.js} +2 -2
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-DEd_92BC.js → multi-select-Dc2d6dDB.js} +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/{number-field-BJKoidAE.js → number-field-BQ54hXmk.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-Czz9Z6dQ.js → otp-input-DRooqa3f.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{page-header-NN3Jq5vb.js → page-header-DmwBGwlm.js} +1 -1
- package/dist/page-header.js +1 -1
- package/dist/{pagination-D0PUAFYm.js → pagination-BRXuyPzo.js} +1 -1
- package/dist/pagination.js +1 -1
- package/dist/{picker-frame-_9ZqQOjf.js → picker-frame-B6sPCP5Y.js} +1 -1
- package/dist/popover-1DlOu95x.js +576 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-indicator-D0acshNn.js → progress-indicator-DRr0Gj6w.js} +1 -0
- package/dist/progress-indicator.js +1 -1
- package/dist/{prompt-composer-Lsfcz_i9.js → prompt-composer-tYIs39rn.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-_ZRUgcI5.js → radio-group-AW3xcYYh.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-C6AkIIUi.js → rating-h3qdHLNi.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/{saved-views-BvRFgSdg.js → saved-views-nqn0SDXn.js} +8 -8
- package/dist/saved-views.js +1 -1
- package/dist/{section-CQPQf6RU.js → section-D_qOfdxR.js} +1 -0
- package/dist/section.js +1 -1
- package/dist/{segmented-control-D52GeOlS.js → segmented-control-CbK7SurB.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/select-d448Wkzb.js +1124 -0
- package/dist/select.js +1 -1
- package/dist/{side-navigation-Cwi2FHOz.js → side-navigation-CKRETc8E.js} +99 -99
- package/dist/side-navigation.js +1 -1
- package/dist/{slider-DQqQ0skr.js → slider-DQ2CnxTO.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-BYowsA6Q.js → split-button-D4MPKSB2.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/{stat-card-CmpabaTc.js → stat-card-CL3Xe6pV.js} +4 -1
- package/dist/stat-card.js +1 -1
- package/dist/styles/action-bar.css +2 -2
- package/dist/styles/app-shell.css +4 -2
- package/dist/styles/attachment.css +3 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/cascader.css +3 -1
- package/dist/styles/chart.css +3 -1
- package/dist/styles/checkbox-group.css +2 -0
- package/dist/styles/checkbox.css +2 -0
- package/dist/styles/color-picker.css +3 -3
- package/dist/styles/column-manager.css +3 -3
- package/dist/styles/combobox.css +2 -0
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/currency-field.css +2 -0
- package/dist/styles/dashboard-grid.css +3 -3
- package/dist/styles/data-grid.css +8 -8
- package/dist/styles/data-list.css +3 -1
- package/dist/styles/date-field.css +2 -0
- package/dist/styles/date-picker.css +4 -2
- package/dist/styles/date-range-picker.css +4 -2
- package/dist/styles/datetime-field.css +2 -0
- package/dist/styles/datetime-picker.css +4 -2
- package/dist/styles/datetime-range-picker.css +4 -2
- package/dist/styles/detail-panel.css +5 -3
- package/dist/styles/entity-picker.css +4 -2
- package/dist/styles/event-calendar.css +5 -3
- package/dist/styles/field-group.css +2 -0
- package/dist/styles/field.css +2 -0
- package/dist/styles/filter-bar.css +7 -7
- package/dist/styles/floating-panel.css +1 -1
- package/dist/styles/hover-card.css +1 -1
- package/dist/styles/import-export-center.css +9 -7
- package/dist/styles/index.css +22 -20
- package/dist/styles/listbox.css +2 -0
- package/dist/styles/loading-overlay.css +3 -1
- package/dist/styles/markdown.css +2 -0
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/multi-select.css +3 -1
- package/dist/styles/number-field.css +2 -0
- package/dist/styles/otp-input.css +2 -0
- package/dist/styles/page-header.css +3 -1
- package/dist/styles/pagination.css +1 -1
- package/dist/styles/popover.css +1 -1
- package/dist/styles/progress-indicator.css +3 -1
- package/dist/styles/prompt-composer.css +2 -0
- package/dist/styles/radio-group.css +2 -0
- package/dist/styles/rating.css +2 -0
- package/dist/styles/saved-views.css +3 -3
- package/dist/styles/section.css +1 -1
- package/dist/styles/segmented-control.css +2 -0
- package/dist/styles/select.css +4 -2
- package/dist/styles/side-navigation.css +4 -2
- package/dist/styles/slider.css +2 -0
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/stat-card.css +1 -1
- package/dist/styles/switch.css +9 -1
- package/dist/styles/table.css +6 -6
- package/dist/styles/tag.css +1 -1
- package/dist/styles/tags-input.css +3 -1
- package/dist/styles/text-field.css +2 -0
- package/dist/styles/textarea.css +3 -1
- package/dist/styles/time-field.css +2 -0
- package/dist/styles/time-picker.css +3 -1
- package/dist/styles/time-range-picker.css +3 -1
- package/dist/styles/toast.css +3 -1
- package/dist/styles/toggle-group.css +3 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/top-navigation.css +4 -2
- package/dist/styles/transfer.css +2 -0
- package/dist/styles/upload.css +5 -1
- package/dist/styles/wizard.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch-DxMukg7F.js +154 -0
- package/dist/switch.js +1 -1
- package/dist/{table-MGb3iZY_.js → table-BecApjeD.js} +50 -50
- package/dist/table.js +1 -1
- package/dist/{tag-BYzDYvM_.js → tag-DCMsVXN6.js} +31 -28
- package/dist/tag.js +1 -1
- package/dist/{tags-input-O87zTh7h.js → tags-input-CqCeLtk-.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-Cnjc7LB5.js → text-field-CMOkJ9Z6.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DcA7jwOM.js → textarea-DfqPfXTr.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-field-BanhrUvf.js → time-field-GyLQsxcc.js} +1 -1
- package/dist/time-field.js +1 -1
- package/dist/time-picker-CGHPnust.js +315 -0
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-ar40oPcf.js → time-range-picker-BMRtAqPy.js} +119 -117
- package/dist/time-range-picker.js +1 -1
- package/dist/{toast-Cg28GkqX.js → toast-aM_ga1mc.js} +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-zDTD5G3H.js → toggle-DSEEtL3Y.js} +7 -2
- package/dist/{toggle-group-D7GQyNQP.js → toggle-group-DZEWkVRo.js} +8 -3
- package/dist/toggle-group.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/{toolbar-DOV4BKY8.js → toolbar-BP7ka6lN.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{top-navigation-C73WDqLg.js → top-navigation-D8IHPOmm.js} +1 -1
- package/dist/top-navigation.js +1 -1
- package/dist/{transfer-CuLlF_nY.js → transfer-sKUvmEKe.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/types/app-shell/app-shell-parts.d.ts +7 -0
- package/dist/types/app-shell/app-shell-parts.d.ts.map +1 -1
- package/dist/types/app-shell/index.d.ts +1 -1
- package/dist/types/app-shell/index.d.ts.map +1 -1
- package/dist/types/badge/badge.d.ts +1 -1
- package/dist/types/badge/badge.d.ts.map +1 -1
- package/dist/types/badge/badge.types.d.ts +6 -0
- 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-defaults.d.ts +1 -1
- package/dist/types/calendar/calendar-defaults.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 +8 -0
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/calendar/use-clock-today.d.ts +10 -0
- package/dist/types/calendar/use-clock-today.d.ts.map +1 -0
- package/dist/types/chart/chart-help.d.ts +11 -0
- package/dist/types/chart/chart-help.d.ts.map +1 -0
- package/dist/types/chart/chart.d.ts.map +1 -1
- package/dist/types/chart/index.d.ts +1 -1
- package/dist/types/chart/index.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.d.ts +3 -3
- package/dist/types/currency-field/currency-field.d.ts.map +1 -1
- package/dist/types/currency-field/currency-field.types.d.ts +4 -3
- package/dist/types/currency-field/currency-field.types.d.ts.map +1 -1
- package/dist/types/dashboard-grid/dashboard-widget-help.d.ts +3 -1
- package/dist/types/dashboard-grid/dashboard-widget-help.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-body.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-context.d.ts +4 -0
- package/dist/types/data-grid/data-grid-context.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-header.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid.d.ts +1 -1
- package/dist/types/data-grid/data-grid.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid.types.d.ts +13 -0
- package/dist/types/data-grid/data-grid.types.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker-defaults.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker-panel.d.ts +2 -0
- package/dist/types/date-picker/date-picker-panel.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.types.d.ts +9 -0
- package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
- package/dist/types/date-picker/use-date-picker.d.ts +6 -3
- package/dist/types/date-picker/use-date-picker.d.ts.map +1 -1
- package/dist/types/date-range-picker/date-range-panel.d.ts +2 -0
- package/dist/types/date-range-picker/date-range-panel.d.ts.map +1 -1
- package/dist/types/date-range-picker/date-range-picker-defaults.d.ts.map +1 -1
- 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 +9 -0
- package/dist/types/date-range-picker/date-range-picker.types.d.ts.map +1 -1
- package/dist/types/date-range-picker/use-date-range-picker.d.ts +1 -0
- package/dist/types/date-range-picker/use-date-range-picker.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker-defaults.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker-panel.d.ts +2 -0
- package/dist/types/datetime-picker/datetime-picker-panel.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker.types.d.ts +9 -0
- package/dist/types/datetime-picker/datetime-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-picker/use-datetime-picker.d.ts +2 -1
- package/dist/types/datetime-picker/use-datetime-picker.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-panel.d.ts +2 -0
- package/dist/types/datetime-range-picker/datetime-range-panel.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/datetime-range-picker-defaults.d.ts.map +1 -1
- 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 +9 -0
- package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts +2 -1
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts.map +1 -1
- package/dist/types/field/field-defaults.d.ts +1 -1
- package/dist/types/field/field-defaults.d.ts.map +1 -1
- package/dist/types/field/field-help-sheet.d.ts +15 -0
- package/dist/types/field/field-help-sheet.d.ts.map +1 -0
- package/dist/types/field/field-parts.d.ts +1 -1
- package/dist/types/field/field-parts.d.ts.map +1 -1
- package/dist/types/field/field.types.d.ts +11 -0
- package/dist/types/field/field.types.d.ts.map +1 -1
- package/dist/types/field/index.d.ts +1 -1
- package/dist/types/field/index.d.ts.map +1 -1
- package/dist/types/menu/index.d.ts +1 -1
- package/dist/types/menu/index.d.ts.map +1 -1
- package/dist/types/menu/menu-defaults.d.ts.map +1 -1
- package/dist/types/menu/menu-parts.d.ts.map +1 -1
- package/dist/types/menu/menu-sheet-step.d.ts +6 -0
- package/dist/types/menu/menu-sheet-step.d.ts.map +1 -0
- package/dist/types/menu/menu.d.ts +1 -1
- package/dist/types/menu/menu.d.ts.map +1 -1
- package/dist/types/menu/menu.types.d.ts +15 -0
- package/dist/types/menu/menu.types.d.ts.map +1 -1
- package/dist/types/menu/use-menu-sheet.d.ts +9 -0
- package/dist/types/menu/use-menu-sheet.d.ts.map +1 -0
- package/dist/types/pagination/pagination-parts.d.ts.map +1 -1
- package/dist/types/picker-panel/picker-footer.d.ts +8 -2
- package/dist/types/picker-panel/picker-footer.d.ts.map +1 -1
- package/dist/types/picker-panel/picker-layer.d.ts +4 -1
- package/dist/types/picker-panel/picker-layer.d.ts.map +1 -1
- package/dist/types/picker-panel/use-media-query.d.ts +2 -2
- package/dist/types/picker-panel/use-media-query.d.ts.map +1 -1
- package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -1
- package/dist/types/popover/index.d.ts +1 -1
- package/dist/types/popover/index.d.ts.map +1 -1
- package/dist/types/popover/popover-parts.d.ts +2 -1
- package/dist/types/popover/popover-parts.d.ts.map +1 -1
- package/dist/types/popover/popover.d.ts +4 -2
- package/dist/types/popover/popover.d.ts.map +1 -1
- package/dist/types/popover/popover.types.d.ts +17 -0
- package/dist/types/popover/popover.types.d.ts.map +1 -1
- package/dist/types/progress-indicator/loader.d.ts +1 -0
- package/dist/types/progress-indicator/loader.d.ts.map +1 -1
- package/dist/types/section/section.d.ts.map +1 -1
- package/dist/types/section/section.types.d.ts +4 -2
- package/dist/types/section/section.types.d.ts.map +1 -1
- package/dist/types/select/index.d.ts +1 -1
- package/dist/types/select/index.d.ts.map +1 -1
- package/dist/types/select/select-defaults.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/select/select.d.ts +6 -2
- package/dist/types/select/select.d.ts.map +1 -1
- package/dist/types/select/select.types.d.ts +9 -0
- package/dist/types/select/select.types.d.ts.map +1 -1
- package/dist/types/select/use-select-sheet.d.ts +9 -0
- package/dist/types/select/use-select-sheet.d.ts.map +1 -0
- package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
- package/dist/types/switch/switch-defaults.d.ts.map +1 -1
- package/dist/types/switch/switch.d.ts +2 -1
- package/dist/types/switch/switch.d.ts.map +1 -1
- package/dist/types/switch/switch.types.d.ts +9 -0
- package/dist/types/switch/switch.types.d.ts.map +1 -1
- package/dist/types/tag/tag-chip.d.ts +4 -1
- package/dist/types/tag/tag-chip.d.ts.map +1 -1
- package/dist/types/tag/tag.d.ts +1 -1
- package/dist/types/tag/tag.d.ts.map +1 -1
- package/dist/types/tag/tag.types.d.ts +6 -0
- package/dist/types/tag/tag.types.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker-panel.d.ts +3 -1
- package/dist/types/time-picker/time-picker-panel.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-panel.d.ts +2 -0
- package/dist/types/time-range-picker/time-range-panel.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/types/toggle/toggle.d.ts.map +1 -1
- package/dist/types/toggle/toggle.types.d.ts +4 -1
- package/dist/types/toggle/toggle.types.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group-parts.d.ts.map +1 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts +4 -1
- package/dist/types/toggle-group/toggle-group.types.d.ts.map +1 -1
- package/dist/{upload-DggJrkQ7.js → upload-CuMOaPK3.js} +2 -2
- package/dist/upload.js +1 -1
- package/dist/use-date-picker-DdSX3RE4.js +137 -0
- package/dist/use-media-query-DJY5h_K5.js +15 -0
- package/dist/use-picker-draft-I_pxqYsc.js +384 -0
- package/dist/{wizard-BokOrtwq.js → wizard-4c0X7Bx_.js} +1 -1
- package/dist/wizard.js +1 -1
- package/package.json +6 -6
- package/dist/calendar-D3QZDlm0.js +0 -598
- package/dist/chart-DwXqQZjQ.js +0 -1027
- package/dist/column-manager-BBGczWQe.js +0 -586
- package/dist/dashboard-grid-DAY_CjCW.js +0 -1191
- package/dist/field-vOVzvq5t.js +0 -368
- package/dist/menu-parts-DgL617_H.js +0 -814
- package/dist/picker-jump-BcTRIJs6.js +0 -70
- package/dist/popover-BfEn2wdZ.js +0 -500
- package/dist/select-BkUuIVBK.js +0 -1017
- package/dist/switch-C2krbZHI.js +0 -147
- package/dist/time-picker-z4GSRuha.js +0 -313
- package/dist/use-date-picker-DL8tRXji.js +0 -63
- package/dist/use-picker-draft-Bw8VFaj0.js +0 -377
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"part": "scrim",
|
|
97
97
|
"element": "div",
|
|
98
98
|
"required": true,
|
|
99
|
-
"purpose": "The wash, the one-cell grid that centers the panel, and the query container. In the document for the life of the
|
|
99
|
+
"purpose": "The wash, the one-cell grid that centers the panel, and the query container. In the document for the life of the overlay, so both directions of the fade are transitions."
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
"part": "panel",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"type": "boolean",
|
|
136
136
|
"defaultValue": "true",
|
|
137
137
|
"appliesTo": "LoadingOverlay",
|
|
138
|
-
"description": "Whether the data is still on its way. The consumer’s own fact: the
|
|
138
|
+
"description": "Whether the data is still on its way. The consumer’s own fact: the overlay never moves it, so there is no controlled and uncontrolled pair"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"name": "scope",
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
"type": "(props) => ReactNode",
|
|
250
250
|
"defaultValue": "—",
|
|
251
251
|
"appliesTo": "LoadingOverlay",
|
|
252
|
-
"description": "Substitutes the control. The
|
|
252
|
+
"description": "Substitutes the control. The overlay’s own control paint is written :not([data-ui]), so a Button here keeps its own"
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
255
|
"name": "ref",
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
{
|
|
271
271
|
"name": "onCancel",
|
|
272
272
|
"payload": "{ reason: \"dismiss\" | \"escape\"; source: Event }",
|
|
273
|
-
"when": "The reader presses the control or the Escape key. The
|
|
273
|
+
"when": "The reader presses the control or the Escape key. The overlay commits nothing — it does not lower loading and does not hide itself — because the operation has not stopped until the application has stopped it."
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
"name": "onReveal",
|
|
@@ -279,8 +279,8 @@
|
|
|
279
279
|
}
|
|
280
280
|
],
|
|
281
281
|
"accessibility": [
|
|
282
|
-
"The covered content carries inert while the layer blocks, which takes it out of the tab order and out of the accessibility tree.
|
|
283
|
-
"The region carries aria-busy=\"true\" while it waits, which is the platform’s own answer: ARIA 1.2 asks an author to set it on the region until it is finished loading. Page scope writes it nowhere, because the busy region would be the document root and
|
|
282
|
+
"The covered content carries inert while the layer blocks, which takes it out of the tab order and out of the accessibility tree. A covered control is neither focusable nor announced, so the reader does not reach a field the wait has made unsafe to edit.",
|
|
283
|
+
"The region carries aria-busy=\"true\" while it waits, which is the platform’s own answer: ARIA 1.2 asks an author to set it on the region until it is finished loading. Page scope writes it nowhere, because the busy region would be the document root and LoadingOverlay owns no part of it.",
|
|
284
284
|
"One overlay is one announcement. A visually-hidden role=\"status\" holds the label while waiting and is emptied afterwards, and emptying a live region announces nothing, so a wait says one thing. The two painted lines carry aria-hidden, so the same sentence is not heard twice.",
|
|
285
285
|
"Focus is read before the content goes inert. If it was inside, it moves to the control or to the panel itself — the container destination the APG advises for content that must be read before it is operated — and returns to where it came from when the wait ends. Focus that was elsewhere is never moved: a background save does not take the caret out of another form.",
|
|
286
286
|
"There is no APG pattern for a loading overlay: the pattern index holds none for a busy region or a blocking layer, and claiming the Dialog pattern would import aria-modal and a close affordance into something that is neither. Page scope makes the rest of the document inert instead, which is what ARIA 1.2 asks of a modal element, and writes no aria-modal because that property inherits only into dialog and alertdialog.",
|
|
@@ -358,24 +358,24 @@
|
|
|
358
358
|
"title": "When the whole application waits",
|
|
359
359
|
"note": "scope=\"page\" portals the layer, makes every sibling of the portal root inert and locks the document scroll. Reach for it only when partial interaction would be unsafe — a month-end close, not a row that is saving.",
|
|
360
360
|
"language": "tsx",
|
|
361
|
-
"source": "<LoadingOverlay\n
|
|
362
|
-
"verdict": "
|
|
361
|
+
"source": "import { useRef, useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport { Inline } from '@slotted/react/inline';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\n\nexport default function LoadingOverlayPage() {\n const [closing, setClosing] = useState(false);\n const timer = useRef<number | undefined>(undefined);\n\n const close = () => {\n setClosing(true);\n timer.current = window.setTimeout(() => setClosing(false), 4000);\n };\n const stop = () => {\n window.clearTimeout(timer.current);\n setClosing(false);\n };\n\n return (\n <>\n <Inline>\n <Button onClick={close}>Close March period</Button>\n </Inline>\n <LoadingOverlay\n cancellable\n description=\"Keep this tab open.\"\n loading={closing}\n messages={{ label: 'Closing the accounting period' }}\n onCancel={stop}\n scope=\"page\"\n />\n </>\n );\n}\n",
|
|
362
|
+
"verdict": "example"
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
"id": "veil",
|
|
366
366
|
"title": "Three ways to say out of reach",
|
|
367
367
|
"note": "wash is the theme’s own scrim; blur adds a backdrop filter, so text stops being legible before it stops being visible; none blocks exactly as much and dims nothing, for a wait short enough that a wash would read as a flash.",
|
|
368
368
|
"language": "tsx",
|
|
369
|
-
"source": "
|
|
370
|
-
"verdict": "
|
|
369
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nconst VEILS = [\n { veil: 'wash', title: 'Open invoices', value: '14 invoices, $48,210.00' },\n { veil: 'blur', title: 'Overdue balance', value: '3 customers, $6,940.50' },\n { veil: 'none', title: 'Pending refunds', value: '2 orders, $318.00' },\n] as const;\n\nexport default function LoadingOverlayVeil() {\n return (\n <Stack gap={4}>\n {VEILS.map(({ veil, title, value }) => (\n <LoadingOverlay\n description={veil}\n key={veil}\n messages={{ label: 'Refreshing balances' }}\n veil={veil}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n {title}\n </Heading>\n <Text>{value}</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n ))}\n </Stack>\n );\n}\n",
|
|
370
|
+
"verdict": "example"
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
"id": "sizes",
|
|
374
374
|
"title": "Three steps, and each moves three things",
|
|
375
375
|
"note": "The mark grows on the control-height scale, the two lines on the control type scale, and the panel on the space scale. Switch the toolbar to dense: the type and the mark shrink together and the meaning does not change.",
|
|
376
376
|
"language": "tsx",
|
|
377
|
-
"source": "
|
|
378
|
-
"verdict": "
|
|
377
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nconst SIZES = [\n { size: 'sm', title: 'Bank statement', value: '312 lines, 18 unmatched' },\n { size: 'md', title: 'Card payouts', value: '41 payouts, 2 on hold' },\n { size: 'lg', title: 'Supplier invoices', value: '27 invoices, 5 due this week' },\n] as const;\n\nexport default function LoadingOverlaySizes() {\n return (\n <Stack gap={4}>\n {SIZES.map(({ size, title, value }) => (\n <LoadingOverlay\n description={size}\n key={size}\n messages={{ label: 'Reconciling' }}\n size={size}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n {title}\n </Heading>\n <Text>{value}</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n ))}\n </Stack>\n );\n}\n",
|
|
378
|
+
"verdict": "example"
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"id": "shapes",
|
|
@@ -390,16 +390,16 @@
|
|
|
390
390
|
"title": "Two flashes, and the two durations that prevent them",
|
|
391
391
|
"note": "delay is the wait before anything is painted, so data that arrives in eighty milliseconds draws nothing. minDuration holds a layer that did appear, so it is not taken away thirty milliseconds later. Both default to zero and cost no timer.",
|
|
392
392
|
"language": "tsx",
|
|
393
|
-
"source": "<
|
|
394
|
-
"verdict": "
|
|
393
|
+
"source": "import { useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function LoadingOverlayTiming() {\n const [loading, setLoading] = useState(false);\n const [shown, setShown] = useState(0);\n\n const look = (ms: number) => {\n setLoading(true);\n setTimeout(() => setLoading(false), ms);\n };\n\n return (\n <Stack gap={4}>\n <Inline gap={2}>\n <Button onClick={() => look(100)} variant=\"outline\">\n Fast lookup (100 ms)\n </Button>\n <Button onClick={() => look(500)}>Slower lookup (500 ms)</Button>\n </Inline>\n <LoadingOverlay\n delay={300}\n loading={loading}\n messages={{ label: 'Looking up rates' }}\n minDuration={600}\n onReveal={() => setShown((count) => count + 1)}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Exchange rates\n </Heading>\n <Text>1 EUR = 1.08 USD, 1 GBP = 1.27 USD.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n <Text size=\"sm\" tone=\"muted\">\n Layers drawn: {shown}\n </Text>\n </Stack>\n );\n}\n",
|
|
394
|
+
"verdict": "example"
|
|
395
395
|
},
|
|
396
396
|
{
|
|
397
397
|
"id": "cancel",
|
|
398
398
|
"title": "A wait that has gone wrong",
|
|
399
399
|
"note": "cancellable renders the control and binds Escape to it. The request carries the reason and commits nothing: abort the work and lower loading when it has actually stopped, which is what the second card is showing.",
|
|
400
400
|
"language": "tsx",
|
|
401
|
-
"source": "
|
|
402
|
-
"verdict": "
|
|
401
|
+
"source": "import { useRef, useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function LoadingOverlayCancel() {\n const [importing, setImporting] = useState(false);\n const [outcome, setOutcome] = useState('No import has run yet.');\n const timer = useRef<number | undefined>(undefined);\n\n const start = () => {\n setImporting(true);\n setOutcome('Importing.');\n timer.current = window.setTimeout(() => {\n setImporting(false);\n setOutcome('Imported 4 812 rows.');\n }, 6000);\n };\n const stop = (reason: string) => {\n window.clearTimeout(timer.current);\n setImporting(false);\n setOutcome(`Import stopped (reason: ${reason}).`);\n };\n\n return (\n <Stack gap={4}>\n <Inline>\n <Button onClick={start}>Import price list</Button>\n </Inline>\n <LoadingOverlay\n cancellable\n loading={importing}\n messages={{ label: 'Importing 4 812 rows' }}\n onCancel={(request) => stop(request.reason)}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Price list\n </Heading>\n <Text>4 812 rows, last updated 12 Nov.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n <Text size=\"sm\" tone=\"muted\">\n {outcome}\n </Text>\n </Stack>\n );\n}\n",
|
|
402
|
+
"verdict": "example"
|
|
403
403
|
},
|
|
404
404
|
{
|
|
405
405
|
"id": "focus",
|
|
@@ -412,23 +412,23 @@
|
|
|
412
412
|
{
|
|
413
413
|
"id": "indicator",
|
|
414
414
|
"title": "A wait with a number on it",
|
|
415
|
-
"note": "The mark is a slot. The default is the contained loader; a determinate import passes a ProgressBar with its own value, and
|
|
415
|
+
"note": "The mark is a slot. The default is the contained loader; a determinate import passes a ProgressBar with its own value, and progress-indicator owns the measured quantity and draws it.",
|
|
416
416
|
"language": "tsx",
|
|
417
|
-
"source": "
|
|
418
|
-
"verdict": "
|
|
417
|
+
"source": "import { useRef, useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { ProgressBar } from '@slotted/react/progress-indicator';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function LoadingOverlayIndicator() {\n const [progress, setProgress] = useState<number | null>(null);\n const timer = useRef<number | undefined>(undefined);\n\n const upload = () => {\n setProgress(0);\n timer.current = window.setInterval(() => {\n setProgress((value) => {\n const next = (value ?? 0) + 10;\n if (next < 100) return next;\n window.clearInterval(timer.current);\n return null;\n });\n }, 400);\n };\n\n return (\n <Stack gap={4}>\n <Inline>\n <Button onClick={upload}>Upload manifest</Button>\n </Inline>\n <LoadingOverlay\n indicator={<ProgressBar hideLabel label=\"Uploaded\" value={progress ?? 100} />}\n loading={progress !== null}\n messages={{ label: 'Uploading carrier-manifest.csv' }}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Carrier manifest\n </Heading>\n <Text>Pickup list for 14 Nov, 38 shipments.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n </Stack>\n );\n}\n",
|
|
418
|
+
"verdict": "example"
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
421
|
"id": "content",
|
|
422
|
-
"title": "Words the
|
|
422
|
+
"title": "Words the overlay did not choose",
|
|
423
423
|
"note": "A translated sentence is longer than the English one that was measured. The panel wraps it, keeps its own measure, and never truncates: the announcement holds the same sentence whole for the reader who would otherwise lose it.",
|
|
424
424
|
"language": "tsx",
|
|
425
|
-
"source": "<LoadingOverlay\n
|
|
426
|
-
"verdict": "
|
|
425
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function LoadingOverlayContent() {\n return (\n <LoadingOverlay\n cancellable\n description=\"Stopping now would leave half the period reconciled.\"\n messages={{\n cancel: 'Stop reconciling',\n label: 'Reconciling the period entries against the bank statement',\n }}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n March close\n </Heading>\n <Text>1 204 entries, 37 without a bank match.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n );\n}\n",
|
|
426
|
+
"verdict": "example"
|
|
427
427
|
},
|
|
428
428
|
{
|
|
429
429
|
"id": "composition",
|
|
430
430
|
"title": "The parts a consumer owns",
|
|
431
|
-
"note": "render puts the region on the element the page already has. renderCancel puts this library’s own Button in the slot, and the
|
|
431
|
+
"note": "render puts the region on the element the page already has. renderCancel puts this library’s own Button in the slot, and the overlay’s control paint steps back for it — the part stays the part, and only the paint is the consumer’s.",
|
|
432
432
|
"language": "tsx",
|
|
433
433
|
"source": "<LoadingOverlay\n render={(props) => <section {...props} />}\n renderCancel={(props) => <Button {...props} variant=\"outline\" size=\"sm\" />}\n cancellable\n>\n {rows}\n</LoadingOverlay>;\n",
|
|
434
434
|
"verdict": "excerpt"
|
|
@@ -440,6 +440,38 @@
|
|
|
440
440
|
"language": "tsx",
|
|
441
441
|
"source": "<LoadingOverlay messages={{ label: 'Saving changes' }} loadedLabel=\"Changes saved\">\n {fields}\n</LoadingOverlay>;\n",
|
|
442
442
|
"verdict": "excerpt"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"id": "announce",
|
|
446
|
+
"title": "announce.tsx",
|
|
447
|
+
"note": null,
|
|
448
|
+
"language": "tsx",
|
|
449
|
+
"source": "import { useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function LoadingOverlayAnnounce() {\n const [saving, setSaving] = useState(false);\n const [refreshing, setRefreshing] = useState(false);\n\n const save = () => {\n setSaving(true);\n setTimeout(() => setSaving(false), 2500);\n };\n const refresh = () => {\n setRefreshing(true);\n setTimeout(() => setRefreshing(false), 2500);\n };\n\n return (\n <Stack gap={4}>\n <Inline gap={2}>\n <Button onClick={save}>Save prices</Button>\n <Button onClick={refresh} variant=\"outline\">\n Refresh stock\n </Button>\n </Inline>\n <LoadingOverlay\n loadedLabel=\"Prices saved\"\n loading={saving}\n messages={{ label: 'Saving prices' }}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Price list\n </Heading>\n <Text>Announces the wait and the result.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n <LoadingOverlay live=\"off\" loading={refreshing} messages={{ label: 'Refreshing stock' }}>\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Stock levels\n </Heading>\n <Text>Announces nothing: the page says it elsewhere.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n </Stack>\n );\n}\n",
|
|
450
|
+
"verdict": "example"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"id": "basic",
|
|
454
|
+
"title": "basic.tsx",
|
|
455
|
+
"note": null,
|
|
456
|
+
"language": "tsx",
|
|
457
|
+
"source": "import { useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport { Card, CardBody, CardHeader } from '@slotted/react/card';\nimport { Field, FieldLabel } from '@slotted/react/field';\nimport { Inline } from '@slotted/react/inline';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { TextField } from '@slotted/react/text-field';\nimport { Heading } from '@slotted/react/typography';\n\nexport default function LoadingOverlayBasic() {\n const [saving, setSaving] = useState(false);\n\n const save = () => {\n setSaving(true);\n setTimeout(() => setSaving(false), 2500);\n };\n\n return (\n <LoadingOverlay loading={saving} messages={{ label: 'Saving the customer' }}>\n <Card>\n <CardHeader>\n <Heading level={3} size=\"md\">\n Customer profile\n </Heading>\n </CardHeader>\n <CardBody>\n <Stack gap={4}>\n <Field>\n <FieldLabel>Company</FieldLabel>\n <TextField defaultValue=\"Northwind Traders\" />\n </Field>\n <Inline>\n <Button onClick={save}>Save customer</Button>\n </Inline>\n </Stack>\n </CardBody>\n </Card>\n </LoadingOverlay>\n );\n}\n",
|
|
458
|
+
"verdict": "example"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"id": "compose",
|
|
462
|
+
"title": "compose.tsx",
|
|
463
|
+
"note": null,
|
|
464
|
+
"language": "tsx",
|
|
465
|
+
"source": "import { useState } from 'react';\n\nimport { Button } from '@slotted/react/button';\nimport { Card, CardBody } from '@slotted/react/card';\nimport { Inline } from '@slotted/react/inline';\nimport { LoadingOverlay } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function LoadingOverlayCompose() {\n const [syncing, setSyncing] = useState(true);\n\n return (\n <Stack gap={4}>\n <Inline>\n <Button onClick={() => setSyncing(true)} variant=\"outline\">\n Sync again\n </Button>\n </Inline>\n <LoadingOverlay\n cancellable\n loading={syncing}\n messages={{ label: 'Syncing the warehouse feed' }}\n onCancel={() => setSyncing(false)}\n render={(props) => <section {...props} />}\n renderCancel={(props) => <Button {...props} size=\"sm\" variant=\"outline\" />}\n >\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Warehouse feed\n </Heading>\n <Text>Lisbon and Rotterdam, 6 docks.</Text>\n <Text>Last sync at 09:40, 212 pallets received.</Text>\n <Text>Next sync at 10:10.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n </Stack>\n );\n}\n",
|
|
466
|
+
"verdict": "example"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"id": "defaults",
|
|
470
|
+
"title": "defaults.tsx",
|
|
471
|
+
"note": null,
|
|
472
|
+
"language": "tsx",
|
|
473
|
+
"source": "import { Card, CardBody } from '@slotted/react/card';\nimport { LoadingOverlay, LoadingOverlayDefaultsProvider } from '@slotted/react/loading-overlay';\nimport { Stack } from '@slotted/react/stack';\nimport { Heading, Text } from '@slotted/react/typography';\n\nexport default function LoadingOverlayDefaults() {\n return (\n <LoadingOverlayDefaultsProvider delay={200} minDuration={400} size=\"sm\" veil=\"blur\">\n <Stack gap={4}>\n <LoadingOverlay messages={{ label: 'Loading orders' }}>\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Open orders\n </Heading>\n <Text>Takes the blur and the small step from the provider.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n <LoadingOverlay messages={{ label: 'Loading returns' }} veil=\"wash\">\n <Card>\n <CardBody>\n <Heading level={3} size=\"md\">\n Returns\n </Heading>\n <Text>Keeps the small step and sets its own veil.</Text>\n </CardBody>\n </Card>\n </LoadingOverlay>\n </Stack>\n </LoadingOverlayDefaultsProvider>\n );\n}\n",
|
|
474
|
+
"verdict": "example"
|
|
443
475
|
}
|
|
444
476
|
]
|
|
445
477
|
}
|
|
@@ -11,12 +11,51 @@ import { LoadingOverlay, LoadingOverlayDefaultsProvider } from '@slotted/react';
|
|
|
11
11
|
|
|
12
12
|
## Minimal example
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Example
|
|
15
15
|
|
|
16
16
|
```tsx
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import { useState } from 'react';
|
|
18
|
+
|
|
19
|
+
import { Button } from '@slotted/react/button';
|
|
20
|
+
import { Card, CardBody, CardHeader } from '@slotted/react/card';
|
|
21
|
+
import { Field, FieldLabel } from '@slotted/react/field';
|
|
22
|
+
import { Inline } from '@slotted/react/inline';
|
|
23
|
+
import { LoadingOverlay } from '@slotted/react/loading-overlay';
|
|
24
|
+
import { Stack } from '@slotted/react/stack';
|
|
25
|
+
import { TextField } from '@slotted/react/text-field';
|
|
26
|
+
import { Heading } from '@slotted/react/typography';
|
|
27
|
+
|
|
28
|
+
export default function LoadingOverlayBasic() {
|
|
29
|
+
const [saving, setSaving] = useState(false);
|
|
30
|
+
|
|
31
|
+
const save = () => {
|
|
32
|
+
setSaving(true);
|
|
33
|
+
setTimeout(() => setSaving(false), 2500);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<LoadingOverlay loading={saving} messages={{ label: 'Saving the customer' }}>
|
|
38
|
+
<Card>
|
|
39
|
+
<CardHeader>
|
|
40
|
+
<Heading level={3} size="md">
|
|
41
|
+
Customer profile
|
|
42
|
+
</Heading>
|
|
43
|
+
</CardHeader>
|
|
44
|
+
<CardBody>
|
|
45
|
+
<Stack gap={4}>
|
|
46
|
+
<Field>
|
|
47
|
+
<FieldLabel>Company</FieldLabel>
|
|
48
|
+
<TextField defaultValue="Northwind Traders" />
|
|
49
|
+
</Field>
|
|
50
|
+
<Inline>
|
|
51
|
+
<Button onClick={save}>Save customer</Button>
|
|
52
|
+
</Inline>
|
|
53
|
+
</Stack>
|
|
54
|
+
</CardBody>
|
|
55
|
+
</Card>
|
|
56
|
+
</LoadingOverlay>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
20
59
|
```
|
|
21
60
|
|
|
22
61
|
## Anatomy
|
|
@@ -37,7 +76,7 @@ Excerpt — not a complete module
|
|
|
37
76
|
|
|
38
77
|
| Name | Type | Default | Applies to | Description |
|
|
39
78
|
| --- | --- | --- | --- | --- |
|
|
40
|
-
| `loading` | `boolean` | true | LoadingOverlay | Whether the data is still on its way. The consumer’s own fact: the
|
|
79
|
+
| `loading` | `boolean` | true | LoadingOverlay | Whether the data is still on its way. The consumer’s own fact: the overlay never moves it, so there is no controlled and uncontrolled pair |
|
|
41
80
|
| `scope` | `'region' \| 'page'` | region | LoadingOverlay | What is covered. region is the box this element wraps; page is the whole viewport, portalled and modal |
|
|
42
81
|
| `veil` | `'wash' \| 'blur' \| 'none'` | wash | LoadingOverlay | How the covered content is obscured. none blocks exactly as much and dims nothing |
|
|
43
82
|
| `size` | `'sm' \| 'md' \| 'lg'` | md | LoadingOverlay | The panel’s step: its padding, its type, and the size of the default mark |
|
|
@@ -53,7 +92,7 @@ Excerpt — not a complete module
|
|
|
53
92
|
| `children` | `ReactNode` | — | LoadingOverlay | Covered rather than replaced: the content keeps its geometry, stays measured, and goes inert while the layer blocks |
|
|
54
93
|
| `indicator` | `ReactNode` | — | LoadingOverlay | Replaces the mark. A determinate wait passes progress-indicator’s own ProgressBar with a value |
|
|
55
94
|
| `render` | `(props) => ReactNode` | — | LoadingOverlay | Substitutes the region’s element. Every data attribute, the ref and aria-busy are handed to it |
|
|
56
|
-
| `renderCancel` | `(props) => ReactNode` | — | LoadingOverlay | Substitutes the control. The
|
|
95
|
+
| `renderCancel` | `(props) => ReactNode` | — | LoadingOverlay | Substitutes the control. The overlay’s own control paint is written :not([data-ui]), so a Button here keeps its own |
|
|
57
96
|
| `ref` | `Ref<HTMLDivElement>` | — | LoadingOverlay | Reaches the region element; the props are that element’s, extended |
|
|
58
97
|
| `LoadingOverlayDefaultsProvider` | `LoadingOverlayDefaults` | — | Application | Sets veil, size, live, loadedLabel, delay and minDuration once for everything below it; a prop still wins |
|
|
59
98
|
|
|
@@ -61,7 +100,7 @@ Excerpt — not a complete module
|
|
|
61
100
|
|
|
62
101
|
| Name | Payload | When |
|
|
63
102
|
| --- | --- | --- |
|
|
64
|
-
| `onCancel` | `{ reason: "dismiss" \| "escape"; source: Event }` | The reader presses the control or the Escape key. The
|
|
103
|
+
| `onCancel` | `{ reason: "dismiss" \| "escape"; source: Event }` | The reader presses the control or the Escape key. The overlay commits nothing — it does not lower loading and does not hide itself — because the operation has not stopped until the application has stopped it. |
|
|
65
104
|
| `onReveal` | `void` | The covered content is reachable again, which is later than loading turning false whenever minDuration is still holding the layer. It is the moment an application moves focus on. |
|
|
66
105
|
|
|
67
106
|
## Axes and defaults
|
|
@@ -75,8 +114,8 @@ Excerpt — not a complete module
|
|
|
75
114
|
|
|
76
115
|
## Rules
|
|
77
116
|
|
|
78
|
-
- The covered content carries inert while the layer blocks, which takes it out of the tab order and out of the accessibility tree.
|
|
79
|
-
- The region carries aria-busy="true" while it waits, which is the platform’s own answer: ARIA 1.2 asks an author to set it on the region until it is finished loading. Page scope writes it nowhere, because the busy region would be the document root and
|
|
117
|
+
- The covered content carries inert while the layer blocks, which takes it out of the tab order and out of the accessibility tree. A covered control is neither focusable nor announced, so the reader does not reach a field the wait has made unsafe to edit.
|
|
118
|
+
- The region carries aria-busy="true" while it waits, which is the platform’s own answer: ARIA 1.2 asks an author to set it on the region until it is finished loading. Page scope writes it nowhere, because the busy region would be the document root and LoadingOverlay owns no part of it.
|
|
80
119
|
- One overlay is one announcement. A visually-hidden role="status" holds the label while waiting and is emptied afterwards, and emptying a live region announces nothing, so a wait says one thing. The two painted lines carry aria-hidden, so the same sentence is not heard twice.
|
|
81
120
|
- Focus is read before the content goes inert. If it was inside, it moves to the control or to the panel itself — the container destination the APG advises for content that must be read before it is operated — and returns to where it came from when the wait ends. Focus that was elsewhere is never moved: a background save does not take the caret out of another form.
|
|
82
121
|
- There is no APG pattern for a loading overlay: the pattern index holds none for a busy region or a blocking layer, and claiming the Dialog pattern would import aria-modal and a close affordance into something that is neither. Page scope makes the rest of the document inert instead, which is what ARIA 1.2 asks of a modal element, and writes no aria-modal because that property inherits only into dialog and alertdialog.
|
|
@@ -88,162 +127,4 @@ Excerpt — not a complete module
|
|
|
88
127
|
|
|
89
128
|
## Examples
|
|
90
129
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
The covered card keeps its height, so nothing below it moves twice per save. Tab from the button above: focus walks past the covered fields, because they are inert rather than merely dimmed.
|
|
94
|
-
|
|
95
|
-
Excerpt — not a complete module
|
|
96
|
-
|
|
97
|
-
```tsx
|
|
98
|
-
<LoadingOverlay loading={saving} messages={{ label: 'Saving changes' }}>
|
|
99
|
-
<Card>
|
|
100
|
-
<CardBody>{fields}</CardBody>
|
|
101
|
-
</Card>
|
|
102
|
-
</LoadingOverlay>;
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### When the whole application waits
|
|
106
|
-
|
|
107
|
-
scope="page" portals the layer, makes every sibling of the portal root inert and locks the document scroll. Reach for it only when partial interaction would be unsafe — a month-end close, not a row that is saving.
|
|
108
|
-
|
|
109
|
-
Excerpt — not a complete module
|
|
110
|
-
|
|
111
|
-
```tsx
|
|
112
|
-
<LoadingOverlay
|
|
113
|
-
scope="page"
|
|
114
|
-
loading={closing}
|
|
115
|
-
messages={{ label: 'Closing the accounting period' }}
|
|
116
|
-
description="Do not close this tab."
|
|
117
|
-
/>;
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
### Three ways to say out of reach
|
|
121
|
-
|
|
122
|
-
wash is the theme’s own scrim; blur adds a backdrop filter, so text stops being legible before it stops being visible; none blocks exactly as much and dims nothing, for a wait short enough that a wash would read as a flash.
|
|
123
|
-
|
|
124
|
-
Excerpt — not a complete module
|
|
125
|
-
|
|
126
|
-
```tsx
|
|
127
|
-
<LoadingOverlay veil="wash">{rows}</LoadingOverlay>;
|
|
128
|
-
<LoadingOverlay veil="blur">{rows}</LoadingOverlay>;
|
|
129
|
-
<LoadingOverlay veil="none">{rows}</LoadingOverlay>;
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Three steps, and each moves three things
|
|
133
|
-
|
|
134
|
-
The mark grows on the control-height scale, the two lines on the control type scale, and the panel on the space scale. Switch the toolbar to dense: the type and the mark shrink together and the meaning does not change.
|
|
135
|
-
|
|
136
|
-
Excerpt — not a complete module
|
|
137
|
-
|
|
138
|
-
```tsx
|
|
139
|
-
<LoadingOverlay size="sm" messages={{ label: 'Reconciling' }} />;
|
|
140
|
-
<LoadingOverlay size="md" messages={{ label: 'Reconciling' }} />;
|
|
141
|
-
<LoadingOverlay size="lg" messages={{ label: 'Reconciling' }} />;
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### The panel answers the region, not the viewport
|
|
145
|
-
|
|
146
|
-
A tall region gets a column, a short one gets a bar carrying the same four things, and a small one gets the mark alone. Nothing is lost in the third: the words are in the live region, which is where they were doing the work.
|
|
147
|
-
|
|
148
|
-
Excerpt — not a complete module
|
|
149
|
-
|
|
150
|
-
```tsx
|
|
151
|
-
<LoadingOverlay messages={{ label: 'Updating the row' }} cancellable>
|
|
152
|
-
<TableRow />
|
|
153
|
-
</LoadingOverlay>;
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### Two flashes, and the two durations that prevent them
|
|
157
|
-
|
|
158
|
-
delay is the wait before anything is painted, so data that arrives in eighty milliseconds draws nothing. minDuration holds a layer that did appear, so it is not taken away thirty milliseconds later. Both default to zero and cost no timer.
|
|
159
|
-
|
|
160
|
-
Excerpt — not a complete module
|
|
161
|
-
|
|
162
|
-
```tsx
|
|
163
|
-
<LoadingOverlayDefaultsProvider delay={200} minDuration={400}>
|
|
164
|
-
<App />
|
|
165
|
-
</LoadingOverlayDefaultsProvider>;
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### A wait that has gone wrong
|
|
169
|
-
|
|
170
|
-
cancellable renders the control and binds Escape to it. The request carries the reason and commits nothing: abort the work and lower loading when it has actually stopped, which is what the second card is showing.
|
|
171
|
-
|
|
172
|
-
Excerpt — not a complete module
|
|
173
|
-
|
|
174
|
-
```tsx
|
|
175
|
-
<LoadingOverlay
|
|
176
|
-
loading={importing}
|
|
177
|
-
cancellable
|
|
178
|
-
messages={{ label: 'Importing 4 812 rows' }}
|
|
179
|
-
onCancel={(request) => abort(request.reason)}
|
|
180
|
-
>
|
|
181
|
-
{rows}
|
|
182
|
-
</LoadingOverlay>;
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### Where the keyboard goes
|
|
186
|
-
|
|
187
|
-
Put the caret in the field and press Save. Focus was inside the content that is about to go inert, so it moves to the panel; when the wait ends it returns to the field it came from. Focus that was elsewhere is never moved.
|
|
188
|
-
|
|
189
|
-
Excerpt — not a complete module
|
|
190
|
-
|
|
191
|
-
```tsx
|
|
192
|
-
<LoadingOverlay loading={saving} cancellable>
|
|
193
|
-
<form>{fields}</form>
|
|
194
|
-
</LoadingOverlay>;
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### A wait with a number on it
|
|
198
|
-
|
|
199
|
-
The mark is a slot. The default is the contained loader; a determinate import passes a ProgressBar with its own value, and the family that owns a measured quantity draws it.
|
|
200
|
-
|
|
201
|
-
Excerpt — not a complete module
|
|
202
|
-
|
|
203
|
-
```tsx
|
|
204
|
-
<LoadingOverlay
|
|
205
|
-
messages={{ label: 'Uploading contrato.pdf' }}
|
|
206
|
-
indicator={<ProgressBar value={62} label="Uploaded" hideLabel />}
|
|
207
|
-
/>;
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### Words the family did not choose
|
|
211
|
-
|
|
212
|
-
A translated sentence is longer than the English one that was measured. The panel wraps it, keeps its own measure, and never truncates: the announcement holds the same sentence whole for the reader who would otherwise lose it.
|
|
213
|
-
|
|
214
|
-
Excerpt — not a complete module
|
|
215
|
-
|
|
216
|
-
```tsx
|
|
217
|
-
<LoadingOverlay
|
|
218
|
-
messages={{ label: 'Reconciling the period entries against the bank statement' }}
|
|
219
|
-
description="Stopping now would leave half the period reconciled."
|
|
220
|
-
/>;
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### The parts a consumer owns
|
|
224
|
-
|
|
225
|
-
render puts the region on the element the page already has. renderCancel puts this library’s own Button in the slot, and the family’s control paint steps back for it — the part stays the part, and only the paint is the consumer’s.
|
|
226
|
-
|
|
227
|
-
Excerpt — not a complete module
|
|
228
|
-
|
|
229
|
-
```tsx
|
|
230
|
-
<LoadingOverlay
|
|
231
|
-
render={(props) => <section {...props} />}
|
|
232
|
-
renderCancel={(props) => <Button {...props} variant="outline" size="sm" />}
|
|
233
|
-
cancellable
|
|
234
|
-
>
|
|
235
|
-
{rows}
|
|
236
|
-
</LoadingOverlay>;
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
### What a screen reader gets
|
|
240
|
-
|
|
241
|
-
aria-busy on the region, one role="status" holding one sentence, and the covered subtree out of the accessibility tree entirely. Emptying the live region announces nothing, so a wait says one thing unless loadedLabel asks for a second.
|
|
242
|
-
|
|
243
|
-
Excerpt — not a complete module
|
|
244
|
-
|
|
245
|
-
```tsx
|
|
246
|
-
<LoadingOverlay messages={{ label: 'Saving changes' }} loadedLabel="Changes saved">
|
|
247
|
-
{fields}
|
|
248
|
-
</LoadingOverlay>;
|
|
249
|
-
```
|
|
130
|
+
See [loading-overlay.examples.md](./loading-overlay.examples.md).
|
package/dist/docs/menu.json
CHANGED
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"shift": true,
|
|
104
104
|
"hideWhenDetached": true,
|
|
105
105
|
"portal": true,
|
|
106
|
+
"presentation": "popover",
|
|
106
107
|
"disabled": false,
|
|
107
108
|
"loading": false,
|
|
108
109
|
"sideOffset": 0,
|
|
@@ -136,7 +137,12 @@
|
|
|
136
137
|
],
|
|
137
138
|
"parts": [
|
|
138
139
|
"root",
|
|
140
|
+
"backdrop",
|
|
139
141
|
"content",
|
|
142
|
+
"grip",
|
|
143
|
+
"step",
|
|
144
|
+
"back",
|
|
145
|
+
"title",
|
|
140
146
|
"header",
|
|
141
147
|
"group",
|
|
142
148
|
"group-label",
|
|
@@ -164,12 +170,42 @@
|
|
|
164
170
|
"required": true,
|
|
165
171
|
"purpose": "The layer the menu is positioned on. It carries data-ui=\"menu\", the resolved size, side and align, and data-open while the menu is open. The gap between the trigger and the surface is the layer's own padding, so the pointer never crosses the page on its way into a submenu."
|
|
166
172
|
},
|
|
173
|
+
{
|
|
174
|
+
"part": "backdrop",
|
|
175
|
+
"element": "div",
|
|
176
|
+
"required": false,
|
|
177
|
+
"purpose": "The scrim over the page while the menu is a sheet (presentation=\"auto\" on a phone), aria-hidden. A press on it dismisses every step; on a second step it is clear, since the first already dims the page."
|
|
178
|
+
},
|
|
167
179
|
{
|
|
168
180
|
"part": "content",
|
|
169
181
|
"element": "div",
|
|
170
182
|
"required": true,
|
|
171
183
|
"purpose": "The painted surface, carrying role=\"menu\". It lays out the columns every item uses, is never taller than the room left in the window, and scrolls inside that height."
|
|
172
184
|
},
|
|
185
|
+
{
|
|
186
|
+
"part": "grip",
|
|
187
|
+
"element": "span",
|
|
188
|
+
"required": false,
|
|
189
|
+
"purpose": "The bar at the top of the sheet, aria-hidden. A pull down on it dismisses the step it belongs to."
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"part": "step",
|
|
193
|
+
"element": "div",
|
|
194
|
+
"required": false,
|
|
195
|
+
"purpose": "The head of a submenu drawn as the second step of a sheet: the back control, then the name of the item that opened it."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"part": "back",
|
|
199
|
+
"element": "button",
|
|
200
|
+
"required": false,
|
|
201
|
+
"purpose": "Returns to the first step of the sheet, named by messages.back, with focus on the item that opened the step."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"part": "title",
|
|
205
|
+
"element": "div",
|
|
206
|
+
"required": false,
|
|
207
|
+
"purpose": "The name of the item that opened the step, as a reader hears it."
|
|
208
|
+
},
|
|
173
209
|
{
|
|
174
210
|
"part": "header",
|
|
175
211
|
"element": "div",
|
|
@@ -433,6 +469,20 @@
|
|
|
433
469
|
"appliesTo": "Menu",
|
|
434
470
|
"description": "Whether the layer is rendered at the end of the document."
|
|
435
471
|
},
|
|
472
|
+
{
|
|
473
|
+
"name": "presentation",
|
|
474
|
+
"type": "'popover' | 'auto'",
|
|
475
|
+
"defaultValue": "popover",
|
|
476
|
+
"appliesTo": "Menu, MenuDefaultsProvider",
|
|
477
|
+
"description": "auto draws the menu as a bottom sheet under (max-width: 480px) and (pointer: coarse): modal, as ActionSheet draws its actions, every item at least --slotted-target-min tall, dismissed by its grip, its scrim, Escape and the platform’s way back, with focus given back to the trigger. A submenu opens as a second step of the same sheet. A menu on a bar stays anchored."
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "messages",
|
|
481
|
+
"type": "Partial<MenuMessages>",
|
|
482
|
+
"defaultValue": "—",
|
|
483
|
+
"appliesTo": "Menu",
|
|
484
|
+
"description": "Words laid over the catalog of the language in force: back, the name of the control that returns from a submenu step to the first step of a sheet."
|
|
485
|
+
},
|
|
436
486
|
{
|
|
437
487
|
"name": "disabled",
|
|
438
488
|
"type": "boolean",
|
|
@@ -643,6 +693,7 @@
|
|
|
643
693
|
}
|
|
644
694
|
},
|
|
645
695
|
"tokens": [
|
|
696
|
+
"--slotted-border-strong",
|
|
646
697
|
"--slotted-border-subtle",
|
|
647
698
|
"--slotted-border-width-thin",
|
|
648
699
|
"--slotted-control-font-size-lg",
|
|
@@ -663,6 +714,17 @@
|
|
|
663
714
|
"--slotted-control-transition-duration",
|
|
664
715
|
"--slotted-control-transition-easing",
|
|
665
716
|
"--slotted-disabled-foreground",
|
|
717
|
+
"--slotted-drawer-border-color",
|
|
718
|
+
"--slotted-drawer-radius",
|
|
719
|
+
"--slotted-drawer-resizer-line-color",
|
|
720
|
+
"--slotted-drawer-scrim",
|
|
721
|
+
"--slotted-drawer-scrim-backdrop-filter",
|
|
722
|
+
"--slotted-drawer-slide-duration",
|
|
723
|
+
"--slotted-drawer-slide-easing",
|
|
724
|
+
"--slotted-drawer-slide-exit-duration",
|
|
725
|
+
"--slotted-drawer-slide-exit-easing",
|
|
726
|
+
"--slotted-drawer-surface",
|
|
727
|
+
"--slotted-duration-long",
|
|
666
728
|
"--slotted-duration-medium",
|
|
667
729
|
"--slotted-duration-short",
|
|
668
730
|
"--slotted-easing-enter",
|
|
@@ -670,6 +732,7 @@
|
|
|
670
732
|
"--slotted-easing-standard",
|
|
671
733
|
"--slotted-focus-ring-color",
|
|
672
734
|
"--slotted-focus-ring-width",
|
|
735
|
+
"--slotted-font-family-heading",
|
|
673
736
|
"--slotted-font-family-sans",
|
|
674
737
|
"--slotted-font-size-xs",
|
|
675
738
|
"--slotted-font-weight-semibold",
|
|
@@ -696,12 +759,16 @@
|
|
|
696
759
|
"--slotted-menu-text-muted",
|
|
697
760
|
"--slotted-overlay-max-block-size",
|
|
698
761
|
"--slotted-radius-lg",
|
|
762
|
+
"--slotted-scrim",
|
|
763
|
+
"--slotted-shadow-lg",
|
|
699
764
|
"--slotted-shadow-md",
|
|
700
765
|
"--slotted-space-1",
|
|
766
|
+
"--slotted-space-11",
|
|
701
767
|
"--slotted-space-2",
|
|
702
768
|
"--slotted-space-5",
|
|
703
769
|
"--slotted-space-6",
|
|
704
770
|
"--slotted-surface-raised",
|
|
771
|
+
"--slotted-target-min",
|
|
705
772
|
"--slotted-text",
|
|
706
773
|
"--slotted-text-muted",
|
|
707
774
|
"--slotted-tone-accent-subtle-active",
|
package/dist/docs/menu.md
CHANGED
|
@@ -46,7 +46,12 @@ export default function MenuBasic() {
|
|
|
46
46
|
| Part | Element | Required |
|
|
47
47
|
| --- | --- | --- |
|
|
48
48
|
| `root` | div, or the element render returns | yes |
|
|
49
|
+
| `backdrop` | div | no |
|
|
49
50
|
| `content` | div | yes |
|
|
51
|
+
| `grip` | span | no |
|
|
52
|
+
| `step` | div | no |
|
|
53
|
+
| `back` | button | no |
|
|
54
|
+
| `title` | div | no |
|
|
50
55
|
| `header` | div | no |
|
|
51
56
|
| `group` | div | no |
|
|
52
57
|
| `group-label` | div | no |
|
|
@@ -91,6 +96,8 @@ export default function MenuBasic() {
|
|
|
91
96
|
| `shift` | `boolean` | true | Menu | Whether the surface slides along its edge to stay in the window. |
|
|
92
97
|
| `hideWhenDetached` | `boolean` | true | Menu | Whether the surface hides once its trigger has scrolled out of view. |
|
|
93
98
|
| `portal` | `boolean` | true | Menu | Whether the layer is rendered at the end of the document. |
|
|
99
|
+
| `presentation` | `'popover' \| 'auto'` | popover | Menu, MenuDefaultsProvider | auto draws the menu as a bottom sheet under (max-width: 480px) and (pointer: coarse): modal, as ActionSheet draws its actions, every item at least --slotted-target-min tall, dismissed by its grip, its scrim, Escape and the platform’s way back, with focus given back to the trigger. A submenu opens as a second step of the same sheet. A menu on a bar stays anchored. |
|
|
100
|
+
| `messages` | `Partial<MenuMessages>` | — | Menu | Words laid over the catalog of the language in force: back, the name of the control that returns from a submenu step to the first step of a sheet. |
|
|
94
101
|
| `disabled` | `boolean` | false | Menu, MenuItem | A disabled menu never opens, and its trigger keeps aria-expanded="false". A disabled item stays focusable and runs nothing. |
|
|
95
102
|
| `loading` | `boolean` | false | MenuContent | Whether the items are on their way. The surface keeps its width, sets aria-busy and shows the MenuEmpty message. |
|
|
96
103
|
| `sideOffset` | `number` | 0 | Menu | Extra distance from the trigger, in pixels, beyond the layer's own gap. |
|
|
@@ -158,7 +165,7 @@ export default function MenuBasic() {
|
|
|
158
165
|
|
|
159
166
|
## Tokens
|
|
160
167
|
|
|
161
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-font-size-xs`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-menu-backdrop-filter`, `--slotted-menu-border-color`, `--slotted-menu-gap`, `--slotted-menu-group-label-height`, `--slotted-menu-highlight`, `--slotted-menu-highlight-active`, `--slotted-menu-item-radius`, `--slotted-menu-measure`, `--slotted-menu-measure-lg`, `--slotted-menu-measure-sm`, `--slotted-menu-min-measure`, `--slotted-menu-padding-block`, `--slotted-menu-padding-inline`, `--slotted-menu-radius`, `--slotted-menu-separator-color`, `--slotted-menu-shadow`, `--slotted-menu-surface`, `--slotted-menu-text`, `--slotted-menu-text-muted`, `--slotted-overlay-max-block-size`, `--slotted-radius-lg`, `--slotted-shadow-md`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-surface-raised`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-subtle-active`, `--slotted-tone-danger-surface`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-surface`, `--slotted-tone-secondary-text`, `--slotted-tone-success-subtle-active`, `--slotted-tone-success-surface`, `--slotted-tone-success-text`, `--slotted-tone-warning-subtle-active`, `--slotted-tone-warning-surface`, `--slotted-tone-warning-text`, `--slotted-z-index-popover`
|
|
168
|
+
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-foreground`, `--slotted-drawer-border-color`, `--slotted-drawer-radius`, `--slotted-drawer-resizer-line-color`, `--slotted-drawer-scrim`, `--slotted-drawer-scrim-backdrop-filter`, `--slotted-drawer-slide-duration`, `--slotted-drawer-slide-easing`, `--slotted-drawer-slide-exit-duration`, `--slotted-drawer-slide-exit-easing`, `--slotted-drawer-surface`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-xs`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-menu-backdrop-filter`, `--slotted-menu-border-color`, `--slotted-menu-gap`, `--slotted-menu-group-label-height`, `--slotted-menu-highlight`, `--slotted-menu-highlight-active`, `--slotted-menu-item-radius`, `--slotted-menu-measure`, `--slotted-menu-measure-lg`, `--slotted-menu-measure-sm`, `--slotted-menu-min-measure`, `--slotted-menu-padding-block`, `--slotted-menu-padding-inline`, `--slotted-menu-radius`, `--slotted-menu-separator-color`, `--slotted-menu-shadow`, `--slotted-menu-surface`, `--slotted-menu-text`, `--slotted-menu-text-muted`, `--slotted-overlay-max-block-size`, `--slotted-radius-lg`, `--slotted-scrim`, `--slotted-shadow-lg`, `--slotted-shadow-md`, `--slotted-space-1`, `--slotted-space-11`, `--slotted-space-2`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-surface-raised`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-subtle-active`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-subtle-active`, `--slotted-tone-danger-surface`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-tone-secondary-surface`, `--slotted-tone-secondary-text`, `--slotted-tone-success-subtle-active`, `--slotted-tone-success-surface`, `--slotted-tone-success-text`, `--slotted-tone-warning-subtle-active`, `--slotted-tone-warning-surface`, `--slotted-tone-warning-text`, `--slotted-z-index-popover`
|
|
162
169
|
|
|
163
170
|
## Examples
|
|
164
171
|
|