@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
package/dist/docs/hover-card.md
CHANGED
|
@@ -6,21 +6,46 @@
|
|
|
6
6
|
## Import
|
|
7
7
|
|
|
8
8
|
```tsx
|
|
9
|
-
import { HoverCard, HoverCardTrigger, HoverCardContent, HoverCardDefaultsProvider } from '@slotted/react';
|
|
10
|
-
import { PopoverBody, PopoverTitle, PopoverFooter } from '@slotted/react';
|
|
9
|
+
import { HoverCard, HoverCardTrigger, HoverCardContent, HoverCardDefaultsProvider } from '@slotted/react/hover-card';
|
|
10
|
+
import { PopoverBody, PopoverTitle, PopoverFooter } from '@slotted/react/popover';
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Minimal example
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Example
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
import { Avatar } from '@slotted/react/avatar';
|
|
19
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
20
|
+
import { Inline } from '@slotted/react/inline';
|
|
21
|
+
import { PopoverBody } from '@slotted/react/popover';
|
|
22
|
+
import { Stack } from '@slotted/react/stack';
|
|
23
|
+
import { Text } from '@slotted/react/typography';
|
|
24
|
+
|
|
25
|
+
export default function HoverCardBasic() {
|
|
26
|
+
return (
|
|
27
|
+
<Text>
|
|
28
|
+
The pricing table is ready for review. Ask{' '}
|
|
29
|
+
<HoverCard>
|
|
30
|
+
<HoverCardTrigger href="/people/nancy.davolio">@nancy.davolio</HoverCardTrigger>
|
|
31
|
+
<HoverCardContent>
|
|
32
|
+
<PopoverBody>
|
|
33
|
+
<Inline align="center" gap={3}>
|
|
34
|
+
<Avatar name="Nancy Davolio" />
|
|
35
|
+
<Stack gap={1}>
|
|
36
|
+
<Text weight="semibold">Nancy Davolio</Text>
|
|
37
|
+
<Text size="sm" tone="muted">
|
|
38
|
+
Sales Representative, Seattle
|
|
39
|
+
</Text>
|
|
40
|
+
</Stack>
|
|
41
|
+
</Inline>
|
|
42
|
+
</PopoverBody>
|
|
43
|
+
</HoverCardContent>
|
|
44
|
+
</HoverCard>{' '}
|
|
45
|
+
about the carrier rates.
|
|
46
|
+
</Text>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
24
49
|
```
|
|
25
50
|
|
|
26
51
|
## Anatomy
|
|
@@ -40,14 +65,14 @@ Excerpt — not a complete module
|
|
|
40
65
|
| `closeDelay` | `number` | 300 | HoverCard | Milliseconds after the pointer has left trigger and card before it closes; a pointer on its way to the card is not counted as gone. |
|
|
41
66
|
| `navigable` | `boolean` | false | HoverCard | Whether the card holds controls a keyboard reader can reach. On, the panel is a dialog, the link announces it and Tab enters it; off, the panel is presentation. |
|
|
42
67
|
| `disabled` | `boolean` | false | HoverCard | The card never opens. The link keeps working, and carries no disabled state. |
|
|
43
|
-
| `sideOffset` | `number` | 4 | HoverCard | The popover’s own axis, with the
|
|
44
|
-
| `side, align, size, width, arrow, mount, …` | `PopoverProps` | — | HoverCard | Every prop of Popover except autoFocus, which the
|
|
68
|
+
| `sideOffset` | `number` | 4 | HoverCard | The popover’s own axis, with the hover card’s default: the halo the open mark draws plus the same again of air, so the arrow’s tip stands off the word. |
|
|
69
|
+
| `side, align, size, width, arrow, mount, …` | `PopoverProps` | — | HoverCard | Every prop of Popover except autoFocus, which the hover card forces off, reaches the popover it renders. |
|
|
45
70
|
| `render` | `(props) => ReactNode` | — | HoverCardTrigger | Renders the consumer's own element as the trigger — a Link, an avatar button — with the identity, the state and the listeners on it. |
|
|
46
71
|
| `HoverCardDefaultsProvider` | `component` | — | Application | Sets openDelay, closeDelay, navigable and disabled once for a subtree. A card that states one itself still wins. The panel reads PopoverDefaultsProvider. |
|
|
47
72
|
| `PopoverHeader, PopoverTitle, PopoverBody, PopoverFooter, PopoverClose, …` | `components` | — | Inside HoverCardContent | The card is the popover family unchanged, and nothing is re-exported: its title names a navigable card, its Close is the touch reader’s Escape. |
|
|
48
|
-
| `HoverCardContent` | `component` | — | Inside a HoverCard | The popover’s layer and panel in one, with the
|
|
73
|
+
| `HoverCardContent` | `component` | — | Inside a HoverCard | The popover’s layer and panel in one, with the hover card’s pointer handlers on the layer and the panel’s role decided by navigable. Its props reach the panel; the arrow is rendered under the popover’s arrow axis. |
|
|
49
74
|
| `ref` | `prop` | — | HoverCard | A PopoverHandle carrying open(), close() and reposition(). |
|
|
50
|
-
| `native props` | `attributes` | — | HoverCardTrigger | Anything an anchor takes — href, rel, target — reaches the link, and a consumer's own onPointerEnter or onFocus runs before the
|
|
75
|
+
| `native props` | `attributes` | — | HoverCardTrigger | Anything an anchor takes — href, rel, target — reaches the link, and a consumer's own onPointerEnter or onFocus runs before the hover card's own; preventDefault from it stops the hover card's handler. |
|
|
51
76
|
|
|
52
77
|
## Events
|
|
53
78
|
|
|
@@ -65,9 +90,9 @@ Excerpt — not a complete module
|
|
|
65
90
|
## Rules
|
|
66
91
|
|
|
67
92
|
- The platform supplies the link: it is a native anchor, so Enter follows it, a middle click opens it in a tab and a screen reader hears a link. The card never takes focus when it opens — autoFocus is forced off on the popover it holds — so the reader’s focus stays on the word under the pointer.
|
|
68
|
-
- The
|
|
69
|
-
- A card the keyboard cannot enter is role="presentation" and the link says nothing about it
|
|
70
|
-
- Focus the
|
|
93
|
+
- The hover card answers WCAG 2.2 SC 1.4.13 item by item: the card is dismissible with Escape and no pointer movement, hoverable because the pointer may move onto it and the grace area keeps it open on the way, and persistent because it stays until hover and focus have left both link and card.
|
|
94
|
+
- A popup that assistive technology cannot reach is not announced: a card the keyboard cannot enter is role="presentation", and the link says nothing about it. A navigable card is the APG’s non-modal dialog, named by its title, with aria-haspopup="dialog", aria-expanded and aria-controls on the link, and Tab from the link enters it.
|
|
95
|
+
- Focus that the hover card itself puts back on the link — after Escape inside the card, after a focus guard — does not reopen the card; the link holds the reopening back until focus has left it once. Without that rule a guard would close the card, focus the link, and open the card again.
|
|
71
96
|
|
|
72
97
|
## Tokens
|
|
73
98
|
|
|
@@ -75,6 +100,21 @@ Excerpt — not a complete module
|
|
|
75
100
|
|
|
76
101
|
## Examples
|
|
77
102
|
|
|
103
|
+
### Playground
|
|
104
|
+
|
|
105
|
+
Rest the pointer on the mention, or Tab to it: the card opens after the delay under the pointer and at once under focus. The controls under the canvas move both delays and make the card navigable.
|
|
106
|
+
|
|
107
|
+
Excerpt — not a complete module
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
<HoverCard>
|
|
111
|
+
<HoverCardTrigger href="/people/ana">@ana.souza</HoverCardTrigger>
|
|
112
|
+
<HoverCardContent>
|
|
113
|
+
<PopoverBody>…</PopoverBody>
|
|
114
|
+
</HoverCardContent>
|
|
115
|
+
</HoverCard>;
|
|
116
|
+
```
|
|
117
|
+
|
|
78
118
|
### A person
|
|
79
119
|
|
|
80
120
|
The card a review thread shows for a handle: avatar, name, team and what they own, under the word it is about. While it shows, the word carries a tint and a halo that grow the inline box without moving the line — the sentence under it has not shifted.
|
|
@@ -96,42 +136,86 @@ Excerpt — not a complete module
|
|
|
96
136
|
|
|
97
137
|
The card a link to a spec shows: its title, who touched it last and its first lines. The trigger stays a link — Enter follows it, a middle click opens it in a tab — and the card adds nothing the destination does not have.
|
|
98
138
|
|
|
99
|
-
|
|
139
|
+
Example
|
|
100
140
|
|
|
101
141
|
```tsx
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
142
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
143
|
+
import {
|
|
144
|
+
PopoverBody,
|
|
145
|
+
PopoverDescription,
|
|
146
|
+
PopoverHeader,
|
|
147
|
+
PopoverTitle,
|
|
148
|
+
} from '@slotted/react/popover';
|
|
149
|
+
import { Text } from '@slotted/react/typography';
|
|
150
|
+
|
|
151
|
+
export default function HoverCardLinkPreview() {
|
|
152
|
+
return (
|
|
153
|
+
<Text>
|
|
154
|
+
Freight for October follows the{' '}
|
|
155
|
+
<HoverCard>
|
|
156
|
+
<HoverCardTrigger href="/documents/q4-carrier-rate-card">
|
|
157
|
+
Q4 carrier rate card
|
|
158
|
+
</HoverCardTrigger>
|
|
159
|
+
<HoverCardContent>
|
|
160
|
+
<PopoverHeader>
|
|
161
|
+
<PopoverTitle>Q4 carrier rate card</PopoverTitle>
|
|
162
|
+
<PopoverDescription>Spreadsheet, updated 2 hours ago</PopoverDescription>
|
|
163
|
+
</PopoverHeader>
|
|
164
|
+
<PopoverBody>
|
|
165
|
+
<Text size="sm">
|
|
166
|
+
Freight rates by carrier and zone for October through December, with the fuel
|
|
167
|
+
surcharge from Oct 1.
|
|
168
|
+
</Text>
|
|
169
|
+
</PopoverBody>
|
|
170
|
+
</HoverCardContent>
|
|
171
|
+
</HoverCard>
|
|
172
|
+
, which Federal Shipping has already signed.
|
|
173
|
+
</Text>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
114
176
|
```
|
|
115
177
|
|
|
116
178
|
### Navigable
|
|
117
179
|
|
|
118
180
|
The card holds a control, so the page says so with navigable: the panel becomes a dialog named by its title, the link announces the popup, and Tab from the open link enters the card. Past its last control a focus guard closes it and puts focus back on the link, which does not reopen.
|
|
119
181
|
|
|
120
|
-
|
|
182
|
+
Example
|
|
121
183
|
|
|
122
184
|
```tsx
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
185
|
+
import { Button } from '@slotted/react/button';
|
|
186
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
187
|
+
import {
|
|
188
|
+
PopoverBody,
|
|
189
|
+
PopoverDescription,
|
|
190
|
+
PopoverFooter,
|
|
191
|
+
PopoverHeader,
|
|
192
|
+
PopoverTitle,
|
|
193
|
+
} from '@slotted/react/popover';
|
|
194
|
+
import { Text } from '@slotted/react/typography';
|
|
195
|
+
|
|
196
|
+
export default function HoverCardNavigable() {
|
|
197
|
+
return (
|
|
198
|
+
<Text>
|
|
199
|
+
The credit limit for Around the Horn is waiting on{' '}
|
|
200
|
+
<HoverCard navigable>
|
|
201
|
+
<HoverCardTrigger href="/people/andrew.fuller">@andrew.fuller</HoverCardTrigger>
|
|
202
|
+
<HoverCardContent>
|
|
203
|
+
<PopoverHeader>
|
|
204
|
+
<PopoverTitle>Andrew Fuller</PopoverTitle>
|
|
205
|
+
<PopoverDescription>Vice President, Sales</PopoverDescription>
|
|
206
|
+
</PopoverHeader>
|
|
207
|
+
<PopoverBody>
|
|
208
|
+
<Text size="sm">Approves credit limits above $25,000.</Text>
|
|
209
|
+
</PopoverBody>
|
|
210
|
+
<PopoverFooter>
|
|
211
|
+
<Button size="sm">Send message</Button>
|
|
212
|
+
</PopoverFooter>
|
|
213
|
+
</HoverCardContent>
|
|
214
|
+
</HoverCard>
|
|
215
|
+
.
|
|
216
|
+
</Text>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
135
219
|
```
|
|
136
220
|
|
|
137
221
|
### The delays
|
|
@@ -152,30 +236,87 @@ Excerpt — not a complete module
|
|
|
152
236
|
|
|
153
237
|
### One card, many mentions
|
|
154
238
|
|
|
155
|
-
A thread with four handles and one HoverCard around all of them. The mention the pointer rests on registers itself as the anchor, and the request carries the event whose
|
|
239
|
+
A thread with four handles and one HoverCard around all of them. The mention the pointer rests on registers itself as the anchor, and the request carries the event whose target sits inside the mention that names the person, so the card fills from one state instead of mounting four.
|
|
156
240
|
|
|
157
|
-
|
|
241
|
+
Example
|
|
158
242
|
|
|
159
243
|
```tsx
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
244
|
+
import { useState } from 'react';
|
|
245
|
+
|
|
246
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
247
|
+
import type { HoverCardChangeRequest } from '@slotted/react/hover-card';
|
|
248
|
+
import {
|
|
249
|
+
PopoverBody,
|
|
250
|
+
PopoverDescription,
|
|
251
|
+
PopoverHeader,
|
|
252
|
+
PopoverTitle,
|
|
253
|
+
} from '@slotted/react/popover';
|
|
254
|
+
import { Text } from '@slotted/react/typography';
|
|
255
|
+
|
|
256
|
+
interface Person {
|
|
257
|
+
handle: string;
|
|
258
|
+
name: string;
|
|
259
|
+
role: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const nancy: Person = {
|
|
263
|
+
handle: 'nancy.davolio',
|
|
264
|
+
name: 'Nancy Davolio',
|
|
265
|
+
role: 'Sales Representative, Seattle',
|
|
266
|
+
};
|
|
267
|
+
const andrew: Person = {
|
|
268
|
+
handle: 'andrew.fuller',
|
|
269
|
+
name: 'Andrew Fuller',
|
|
270
|
+
role: 'Vice President, Sales',
|
|
271
|
+
};
|
|
272
|
+
const janet: Person = {
|
|
273
|
+
handle: 'janet.leverling',
|
|
274
|
+
name: 'Janet Leverling',
|
|
275
|
+
role: 'Sales Representative, Kirkland',
|
|
276
|
+
};
|
|
277
|
+
const people = [nancy, andrew, janet];
|
|
278
|
+
|
|
279
|
+
export default function HoverCardShared() {
|
|
280
|
+
const [person, setPerson] = useState(nancy);
|
|
281
|
+
|
|
282
|
+
function handleOpenChange(open: boolean, request: HoverCardChangeRequest) {
|
|
283
|
+
const target = request.source instanceof Event ? request.source.target : null;
|
|
284
|
+
const trigger = target instanceof Element ? target.closest<HTMLElement>('[data-handle]') : null;
|
|
285
|
+
if (!open || trigger === null) return;
|
|
286
|
+
|
|
287
|
+
const next = people.find((candidate) => candidate.handle === trigger.dataset['handle']);
|
|
288
|
+
if (next !== undefined) setPerson(next);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return (
|
|
292
|
+
<HoverCard onOpenChange={handleOpenChange}>
|
|
293
|
+
<Text>
|
|
294
|
+
The pricing table was drafted by{' '}
|
|
295
|
+
<HoverCardTrigger data-handle={nancy.handle} href="/people/nancy.davolio">
|
|
296
|
+
@nancy.davolio
|
|
297
|
+
</HoverCardTrigger>
|
|
298
|
+
, approved by{' '}
|
|
299
|
+
<HoverCardTrigger data-handle={andrew.handle} href="/people/andrew.fuller">
|
|
300
|
+
@andrew.fuller
|
|
301
|
+
</HoverCardTrigger>{' '}
|
|
302
|
+
and handed to{' '}
|
|
303
|
+
<HoverCardTrigger data-handle={janet.handle} href="/people/janet.leverling">
|
|
304
|
+
@janet.leverling
|
|
305
|
+
</HoverCardTrigger>{' '}
|
|
306
|
+
for the carrier terms.
|
|
307
|
+
</Text>
|
|
308
|
+
<HoverCardContent>
|
|
309
|
+
<PopoverHeader>
|
|
310
|
+
<PopoverTitle>{person.name}</PopoverTitle>
|
|
311
|
+
<PopoverDescription>{person.role}</PopoverDescription>
|
|
312
|
+
</PopoverHeader>
|
|
313
|
+
<PopoverBody>
|
|
314
|
+
<Text size="sm">@{person.handle}</Text>
|
|
315
|
+
</PopoverBody>
|
|
316
|
+
</HoverCardContent>
|
|
317
|
+
</HoverCard>
|
|
318
|
+
);
|
|
319
|
+
}
|
|
179
320
|
```
|
|
180
321
|
|
|
181
322
|
### On touch
|
|
@@ -193,7 +334,7 @@ Excerpt — not a complete module
|
|
|
193
334
|
|
|
194
335
|
### On another family’s link
|
|
195
336
|
|
|
196
|
-
The trigger rendered onto Link: the link keeps its own paint and its identity, and takes only the state and the listeners from
|
|
337
|
+
The trigger rendered onto Link: the link keeps its own paint and its identity, and takes only the state and the listeners from the hover card. The Close part inside the card is the popover’s, and it is what a touch reader has in place of Escape.
|
|
197
338
|
|
|
198
339
|
Excerpt — not a complete module
|
|
199
340
|
|
|
@@ -223,3 +364,220 @@ Excerpt — not a complete module
|
|
|
223
364
|
<HoverCardContent>…</HoverCardContent>
|
|
224
365
|
</HoverCard>;
|
|
225
366
|
```
|
|
367
|
+
|
|
368
|
+
### controlled.tsx
|
|
369
|
+
|
|
370
|
+
Example
|
|
371
|
+
|
|
372
|
+
```tsx
|
|
373
|
+
import { useState } from 'react';
|
|
374
|
+
|
|
375
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
376
|
+
import type { HoverCardChangeRequest } from '@slotted/react/hover-card';
|
|
377
|
+
import {
|
|
378
|
+
PopoverBody,
|
|
379
|
+
PopoverDescription,
|
|
380
|
+
PopoverHeader,
|
|
381
|
+
PopoverTitle,
|
|
382
|
+
} from '@slotted/react/popover';
|
|
383
|
+
import { Stack } from '@slotted/react/stack';
|
|
384
|
+
import { Text } from '@slotted/react/typography';
|
|
385
|
+
|
|
386
|
+
export default function HoverCardControlled() {
|
|
387
|
+
const [open, setOpen] = useState(false);
|
|
388
|
+
const [reason, setReason] = useState('none');
|
|
389
|
+
|
|
390
|
+
function handleOpenChange(next: boolean, request: HoverCardChangeRequest) {
|
|
391
|
+
setOpen(next);
|
|
392
|
+
setReason(request.reason);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return (
|
|
396
|
+
<Stack gap={3}>
|
|
397
|
+
<Text>
|
|
398
|
+
Stock for order 10251 ships from the{' '}
|
|
399
|
+
<HoverCard open={open} onOpenChange={handleOpenChange}>
|
|
400
|
+
<HoverCardTrigger href="/warehouses/seattle">Seattle warehouse</HoverCardTrigger>
|
|
401
|
+
<HoverCardContent>
|
|
402
|
+
<PopoverHeader>
|
|
403
|
+
<PopoverTitle>Seattle warehouse</PopoverTitle>
|
|
404
|
+
<PopoverDescription>400 Pine Street, Dock 3</PopoverDescription>
|
|
405
|
+
</PopoverHeader>
|
|
406
|
+
<PopoverBody>
|
|
407
|
+
<Text size="sm">Pickups close at 4:30 PM, Monday to Friday.</Text>
|
|
408
|
+
</PopoverBody>
|
|
409
|
+
</HoverCardContent>
|
|
410
|
+
</HoverCard>
|
|
411
|
+
.
|
|
412
|
+
</Text>
|
|
413
|
+
<Text size="sm" tone="muted">
|
|
414
|
+
Card {open ? 'open' : 'closed'}. Last request: {reason}.
|
|
415
|
+
</Text>
|
|
416
|
+
</Stack>
|
|
417
|
+
);
|
|
418
|
+
}
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### defaults.tsx
|
|
422
|
+
|
|
423
|
+
Example
|
|
424
|
+
|
|
425
|
+
```tsx
|
|
426
|
+
import {
|
|
427
|
+
HoverCard,
|
|
428
|
+
HoverCardContent,
|
|
429
|
+
HoverCardDefaultsProvider,
|
|
430
|
+
HoverCardTrigger,
|
|
431
|
+
} from '@slotted/react/hover-card';
|
|
432
|
+
import { PopoverBody } from '@slotted/react/popover';
|
|
433
|
+
import { Text } from '@slotted/react/typography';
|
|
434
|
+
|
|
435
|
+
export default function HoverCardDefaults() {
|
|
436
|
+
return (
|
|
437
|
+
<HoverCardDefaultsProvider openDelay={200} closeDelay={200}>
|
|
438
|
+
<Text>
|
|
439
|
+
Escalate to{' '}
|
|
440
|
+
<HoverCard>
|
|
441
|
+
<HoverCardTrigger href="/people/steven.buchanan">@steven.buchanan</HoverCardTrigger>
|
|
442
|
+
<HoverCardContent>
|
|
443
|
+
<PopoverBody>
|
|
444
|
+
<Text size="sm">Steven Buchanan, Sales Manager, London.</Text>
|
|
445
|
+
</PopoverBody>
|
|
446
|
+
</HoverCardContent>
|
|
447
|
+
</HoverCard>{' '}
|
|
448
|
+
or, for returns, to{' '}
|
|
449
|
+
<HoverCard closeDelay={1000}>
|
|
450
|
+
<HoverCardTrigger href="/people/margaret.peacock">@margaret.peacock</HoverCardTrigger>
|
|
451
|
+
<HoverCardContent>
|
|
452
|
+
<PopoverBody>
|
|
453
|
+
<Text size="sm">Margaret Peacock, Sales Representative, Redmond.</Text>
|
|
454
|
+
</PopoverBody>
|
|
455
|
+
</HoverCardContent>
|
|
456
|
+
</HoverCard>
|
|
457
|
+
.
|
|
458
|
+
</Text>
|
|
459
|
+
</HoverCardDefaultsProvider>
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### delays.tsx
|
|
465
|
+
|
|
466
|
+
Example
|
|
467
|
+
|
|
468
|
+
```tsx
|
|
469
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
470
|
+
import { PopoverBody } from '@slotted/react/popover';
|
|
471
|
+
import { Stack } from '@slotted/react/stack';
|
|
472
|
+
import { Text } from '@slotted/react/typography';
|
|
473
|
+
|
|
474
|
+
export default function HoverCardDelays() {
|
|
475
|
+
return (
|
|
476
|
+
<Stack gap={4}>
|
|
477
|
+
<Text>
|
|
478
|
+
Default delays, 600 ms to open and 300 ms to close:{' '}
|
|
479
|
+
<HoverCard>
|
|
480
|
+
<HoverCardTrigger href="/orders/10248">Order 10248</HoverCardTrigger>
|
|
481
|
+
<HoverCardContent>
|
|
482
|
+
<PopoverBody>
|
|
483
|
+
<Text size="sm">Vins et alcools Chevalier, $440.00, shipped Jul 16.</Text>
|
|
484
|
+
</PopoverBody>
|
|
485
|
+
</HoverCardContent>
|
|
486
|
+
</HoverCard>
|
|
487
|
+
</Text>
|
|
488
|
+
<Text>
|
|
489
|
+
Immediate open, closes after 1 second:{' '}
|
|
490
|
+
<HoverCard openDelay={0} closeDelay={1000}>
|
|
491
|
+
<HoverCardTrigger href="/orders/10249">Order 10249</HoverCardTrigger>
|
|
492
|
+
<HoverCardContent>
|
|
493
|
+
<PopoverBody>
|
|
494
|
+
<Text size="sm">Toms Spezialitäten, $1,863.40, shipped Jul 10.</Text>
|
|
495
|
+
</PopoverBody>
|
|
496
|
+
</HoverCardContent>
|
|
497
|
+
</HoverCard>
|
|
498
|
+
</Text>
|
|
499
|
+
</Stack>
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### disabled.tsx
|
|
505
|
+
|
|
506
|
+
Example
|
|
507
|
+
|
|
508
|
+
```tsx
|
|
509
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
510
|
+
import { PopoverBody } from '@slotted/react/popover';
|
|
511
|
+
import { Text } from '@slotted/react/typography';
|
|
512
|
+
|
|
513
|
+
export default function HoverCardDisabled() {
|
|
514
|
+
return (
|
|
515
|
+
<Text>
|
|
516
|
+
Territory handoff from{' '}
|
|
517
|
+
<HoverCard>
|
|
518
|
+
<HoverCardTrigger href="/people/nancy.davolio">@nancy.davolio</HoverCardTrigger>
|
|
519
|
+
<HoverCardContent>
|
|
520
|
+
<PopoverBody>
|
|
521
|
+
<Text size="sm">Nancy Davolio, Sales Representative, Seattle.</Text>
|
|
522
|
+
</PopoverBody>
|
|
523
|
+
</HoverCardContent>
|
|
524
|
+
</HoverCard>{' '}
|
|
525
|
+
to{' '}
|
|
526
|
+
<HoverCard disabled>
|
|
527
|
+
<HoverCardTrigger href="/people/robert.king">@robert.king</HoverCardTrigger>
|
|
528
|
+
<HoverCardContent>
|
|
529
|
+
<PopoverBody>
|
|
530
|
+
<Text size="sm">Robert King, Sales Representative, London.</Text>
|
|
531
|
+
</PopoverBody>
|
|
532
|
+
</HoverCardContent>
|
|
533
|
+
</HoverCard>
|
|
534
|
+
, whose profile is archived.
|
|
535
|
+
</Text>
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
### placement.tsx
|
|
541
|
+
|
|
542
|
+
Example
|
|
543
|
+
|
|
544
|
+
```tsx
|
|
545
|
+
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@slotted/react/hover-card';
|
|
546
|
+
import { PopoverBody } from '@slotted/react/popover';
|
|
547
|
+
import { Text } from '@slotted/react/typography';
|
|
548
|
+
|
|
549
|
+
export default function HoverCardPlacement() {
|
|
550
|
+
return (
|
|
551
|
+
<Text>
|
|
552
|
+
Reorder{' '}
|
|
553
|
+
<HoverCard side="top" align="center">
|
|
554
|
+
<HoverCardTrigger href="/products/1001">Chai</HoverCardTrigger>
|
|
555
|
+
<HoverCardContent>
|
|
556
|
+
<PopoverBody>
|
|
557
|
+
<Text size="sm">NW-1001, 39 units on hand.</Text>
|
|
558
|
+
</PopoverBody>
|
|
559
|
+
</HoverCardContent>
|
|
560
|
+
</HoverCard>
|
|
561
|
+
,{' '}
|
|
562
|
+
<HoverCard>
|
|
563
|
+
<HoverCardTrigger href="/products/1002">Chang</HoverCardTrigger>
|
|
564
|
+
<HoverCardContent>
|
|
565
|
+
<PopoverBody>
|
|
566
|
+
<Text size="sm">NW-1002, 17 units on hand.</Text>
|
|
567
|
+
</PopoverBody>
|
|
568
|
+
</HoverCardContent>
|
|
569
|
+
</HoverCard>{' '}
|
|
570
|
+
and{' '}
|
|
571
|
+
<HoverCard side="inline-end" align="center">
|
|
572
|
+
<HoverCardTrigger href="/products/1003">Aniseed Syrup</HoverCardTrigger>
|
|
573
|
+
<HoverCardContent>
|
|
574
|
+
<PopoverBody>
|
|
575
|
+
<Text size="sm">NW-1003, 13 units on hand.</Text>
|
|
576
|
+
</PopoverBody>
|
|
577
|
+
</HoverCardContent>
|
|
578
|
+
</HoverCard>{' '}
|
|
579
|
+
before Friday.
|
|
580
|
+
</Text>
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
```
|