@slotted/react 0.1.0-beta.46 → 0.1.0-beta.47
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/{action-bar-BSUuY6pJ.js → action-bar-CZAowvra.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/action-sheet-D5XBXFe2.js +359 -0
- package/dist/action-sheet.js +1 -1
- package/dist/{calendar-BO5teotM.js → calendar-MztDEqAz.js} +13 -12
- package/dist/calendar.js +1 -1
- package/dist/cascader-Bf0CzPu-.js +1305 -0
- package/dist/cascader.js +1 -1
- package/dist/{chart-sewqbbm-.js → chart-C6NdybXy.js} +6 -6
- package/dist/chart.js +1 -1
- package/dist/{checkbox-D8HZG0be.js → checkbox-Bv1b6qh_.js} +3 -3
- package/dist/{checkbox-group-5zuE2Kd1.js → checkbox-group-BnxPixJG.js} +2 -2
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{color-picker-fiLSUBjj.js → color-picker-B66gG2WU.js} +12 -11
- package/dist/color-picker.js +1 -1
- package/dist/column-manager-BtzX-KIk.js +589 -0
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-DMtXrMYE.js → combobox-BpBFn5wM.js} +2 -2
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-DwjkexvN.js → command-palette-Bk94SEuy.js} +2 -1
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-CRRp-PhP.js → context-menu-DoH2mtbN.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{currency-field-Cxr8MT75.js → currency-field-D7LKgNcS.js} +1 -1
- package/dist/currency-field.js +1 -1
- package/dist/{dashboard-grid-CBqqgiKr.js → dashboard-grid-C3XZRM2i.js} +8 -8
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-BlElqHOU.js → data-grid-udreCRZy.js} +1352 -1355
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-5zvM-DUz.js → data-list-BMIQwNKA.js} +13 -13
- package/dist/data-list.js +1 -1
- package/dist/date-field-BTbbf38h.js +313 -0
- package/dist/date-field.js +1 -1
- package/dist/date-picker-ClZMRCJ1.js +347 -0
- package/dist/date-picker.js +2 -2
- package/dist/{date-range-picker-DzuuvudX.js → date-range-picker-DN2It6LA.js} +75 -71
- package/dist/date-range-picker.js +1 -1
- package/dist/datetime-field-DmgZDYhb.js +438 -0
- package/dist/datetime-field.js +1 -1
- package/dist/{datetime-picker-BUhSr8yp.js → datetime-picker-vVXAefqf.js} +158 -154
- package/dist/datetime-picker.js +1 -1
- package/dist/{datetime-range-picker-DXllehEN.js → datetime-range-picker-B4GYh_jU.js} +149 -145
- package/dist/datetime-range-picker.js +1 -1
- package/dist/dialog-lceAPWMr.js +591 -0
- package/dist/dialog.js +1 -1
- package/dist/docs/action-sheet.json +1 -3
- package/dist/docs/action-sheet.md +1 -1
- package/dist/docs/calendar.json +1 -1
- package/dist/docs/calendar.md +1 -1
- package/dist/docs/cascader.json +73 -2
- package/dist/docs/cascader.md +10 -1
- package/dist/docs/collapsible.examples.md +1 -1
- package/dist/docs/collapsible.json +2 -2
- package/dist/docs/collapsible.md +1 -1
- package/dist/docs/color-picker.json +1 -1
- package/dist/docs/column-manager.json +6 -4
- package/dist/docs/column-manager.md +3 -3
- package/dist/docs/combobox.json +1 -0
- package/dist/docs/combobox.md +1 -1
- package/dist/docs/data-grid.json +2 -1
- package/dist/docs/data-grid.md +1 -1
- package/dist/docs/date-picker.json +10 -2
- package/dist/docs/date-picker.md +3 -2
- package/dist/docs/date-range-picker.json +10 -1
- package/dist/docs/date-range-picker.md +3 -2
- package/dist/docs/datetime-picker.json +9 -1
- package/dist/docs/datetime-picker.md +2 -1
- package/dist/docs/datetime-range-picker.json +10 -1
- package/dist/docs/datetime-range-picker.md +3 -2
- package/dist/docs/dialog.json +56 -8
- package/dist/docs/dialog.md +3 -0
- package/dist/docs/dialog.props.md +6 -2
- package/dist/docs/drawer.examples.md +108 -1
- package/dist/docs/drawer.json +70 -13
- package/dist/docs/drawer.md +31 -21
- package/dist/docs/entity-picker.examples.md +1 -1
- package/dist/docs/entity-picker.json +112 -4
- package/dist/docs/entity-picker.md +16 -2
- package/dist/docs/field.json +1 -1
- package/dist/docs/field.md +1 -1
- package/dist/docs/filter-bar.examples.md +215 -0
- package/dist/docs/filter-bar.json +232 -6
- package/dist/docs/filter-bar.md +32 -4
- package/dist/docs/guidelines/index.md +1 -0
- package/dist/docs/guidelines/shell-composition.md +13 -0
- package/dist/docs/list-item.examples.md +50 -0
- package/dist/docs/list-item.json +20 -3
- package/dist/docs/list-item.md +4 -3
- package/dist/docs/list.examples.md +93 -0
- package/dist/docs/list.json +41 -1
- package/dist/docs/list.md +4 -0
- package/dist/docs/menu.examples.md +39 -0
- package/dist/docs/menu.json +25 -12
- package/dist/docs/menu.md +3 -2
- package/dist/docs/multi-select.json +89 -3
- package/dist/docs/multi-select.md +14 -2
- package/dist/docs/popover.json +31 -14
- package/dist/docs/popover.md +5 -2
- package/dist/docs/saved-views.json +3 -3
- package/dist/docs/saved-views.md +1 -1
- package/dist/docs/select.examples.md +51 -0
- package/dist/docs/select.json +37 -15
- package/dist/docs/select.md +5 -3
- package/dist/docs/table.json +2 -1
- package/dist/docs/table.md +1 -1
- package/dist/docs/time-picker.json +9 -1
- package/dist/docs/time-picker.md +2 -1
- package/dist/docs/time-range-picker.json +10 -1
- package/dist/docs/time-range-picker.md +3 -2
- package/dist/docs/toast.examples.md +57 -1
- package/dist/docs/toast.json +15 -6
- package/dist/docs/toast.md +3 -3
- package/dist/drawer-Bx08Xyos.js +923 -0
- package/dist/drawer.js +2 -2
- package/dist/entity-picker-DFQxelpt.js +1499 -0
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-Bxx8eoGK.js → event-calendar-BkGLOaea.js} +527 -527
- package/dist/event-calendar.js +1 -1
- package/dist/{field-N0TiMbaI.js → field-C85R0vVs.js} +6 -6
- package/dist/{field-group-BrnE6FvP.js → field-group-QR1buowc.js} +1 -1
- package/dist/field-group.js +1 -1
- package/dist/field.js +1 -1
- package/dist/filter-bar-CQ0CjZCJ.js +1881 -0
- package/dist/filter-bar.js +1 -1
- package/dist/{hover-card-D9-rb9ts.js → hover-card-DCgVwHxC.js} +25 -25
- package/dist/hover-card.js +1 -1
- package/dist/{import-export-center-BpGga5jr.js → import-export-center-DycVct7z.js} +2 -2
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +132 -132
- package/dist/{list-CvwJXjA0.js → list-DBKKu3Ql.js} +26 -19
- package/dist/{list-item-DHKlkY65.js → list-item-B4W0cAQZ.js} +18 -9
- package/dist/list-item.js +2 -2
- package/dist/list.js +1 -1
- package/dist/{listbox-3XVusnCr.js → listbox-CHa-ekIV.js} +1 -1
- package/dist/listbox.js +1 -1
- package/dist/{markdown-BMda5ino.js → markdown-QdcPI0nq.js} +1 -1
- package/dist/markdown.js +1 -1
- package/dist/{media-viewer-C_cbuAq-.js → media-viewer-_hsM_dLR.js} +1 -1
- package/dist/media-viewer.js +1 -1
- package/dist/menu-parts-KmGR46Np.js +940 -0
- package/dist/menu.js +1 -1
- package/dist/{menubar-CVoAFc6r.js → menubar-3ij92kyN.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/multi-select-kY7LFJqS.js +1489 -0
- package/dist/multi-select.js +1 -1
- package/dist/{number-field-Cp33JMGB.js → number-field-D65B-uRs.js} +1 -1
- package/dist/number-field.js +1 -1
- package/dist/{otp-input-CEP60HOi.js → otp-input-DN8jHJnY.js} +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/{picker-frame-C3Fhjfaj.js → picker-frame--0zIvoSA.js} +1 -1
- package/dist/{picker-range-head-B4tsDOc5.js → picker-range-head-BLoTsTRu.js} +13 -5
- package/dist/popover-CUsTCP0m.js +632 -0
- package/dist/popover.js +2 -2
- package/dist/{prompt-composer-CwjvdgBR.js → prompt-composer-i5y3qaDA.js} +1 -1
- package/dist/prompt-composer.js +1 -1
- package/dist/{radio-group-D6bOV_ea.js → radio-group-DLr2C-XS.js} +2 -2
- package/dist/radio-group.js +1 -1
- package/dist/{rating-D8BvDdjM.js → rating-Bb5srSz4.js} +1 -1
- package/dist/rating.js +1 -1
- package/dist/saved-views-w9GpSo76.js +526 -0
- package/dist/saved-views.js +1 -1
- package/dist/{segmented-control-BLcGhQ4J.js → segmented-control-Cpx_RYQ6.js} +2 -2
- package/dist/segmented-control.js +1 -1
- package/dist/select-CAUuknw3.js +1160 -0
- package/dist/select.js +1 -1
- package/dist/{slider-COLWTaxi.js → slider-CAd6tQlw.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/{split-button-Czr2D3HP.js → split-button-CNNYK9zU.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles/action-bar.css +3 -1
- package/dist/styles/action-sheet.css +4 -2
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/cascader.css +4 -2
- package/dist/styles/chart.css +3 -1
- package/dist/styles/checkbox-group.css +3 -1
- package/dist/styles/checkbox.css +3 -1
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/color-picker.css +5 -3
- package/dist/styles/column-manager.css +6 -4
- package/dist/styles/combobox.css +4 -2
- package/dist/styles/command-palette.css +8 -4
- package/dist/styles/context-menu.css +3 -1
- package/dist/styles/currency-field.css +3 -1
- package/dist/styles/dashboard-grid.css +4 -2
- package/dist/styles/data-grid.css +15 -13
- package/dist/styles/data-list.css +6 -4
- package/dist/styles/date-field.css +4 -2
- package/dist/styles/date-picker.css +6 -4
- package/dist/styles/date-range-picker.css +7 -5
- package/dist/styles/datetime-field.css +4 -2
- package/dist/styles/datetime-picker.css +7 -5
- package/dist/styles/datetime-range-picker.css +7 -5
- package/dist/styles/dialog.css +7 -1
- package/dist/styles/drawer.css +3 -1
- package/dist/styles/entity-picker.css +8 -6
- package/dist/styles/event-calendar.css +5 -3
- package/dist/styles/field-group.css +3 -1
- package/dist/styles/field.css +3 -1
- package/dist/styles/filter-bar.css +18 -16
- package/dist/styles/hover-card.css +3 -1
- package/dist/styles/import-export-center.css +14 -12
- package/dist/styles/index.css +31 -29
- package/dist/styles/list-item.css +2 -2
- package/dist/styles/list.css +1 -1
- package/dist/styles/listbox.css +3 -1
- package/dist/styles/markdown.css +3 -1
- package/dist/styles/media-viewer.css +7 -1
- package/dist/styles/menu.css +3 -1
- package/dist/styles/menubar.css +3 -1
- package/dist/styles/multi-select.css +7 -5
- package/dist/styles/number-field.css +3 -1
- package/dist/styles/otp-input.css +3 -1
- package/dist/styles/popover.css +3 -1
- package/dist/styles/prompt-composer.css +3 -1
- package/dist/styles/radio-group.css +3 -1
- package/dist/styles/rating.css +3 -1
- package/dist/styles/saved-views.css +7 -3
- package/dist/styles/segmented-control.css +3 -1
- package/dist/styles/select.css +7 -5
- package/dist/styles/slider.css +3 -1
- package/dist/styles/split-button.css +3 -1
- package/dist/styles/switch.css +3 -1
- package/dist/styles/table.css +13 -11
- package/dist/styles/tags-input.css +3 -1
- package/dist/styles/text-field.css +3 -1
- package/dist/styles/textarea.css +3 -1
- package/dist/styles/time-field.css +4 -2
- package/dist/styles/time-picker.css +5 -3
- package/dist/styles/time-range-picker.css +6 -4
- package/dist/styles/toast.css +1 -1
- package/dist/styles/toggle-group.css +3 -1
- package/dist/styles/toolbar.css +3 -1
- package/dist/styles/transfer.css +3 -1
- package/dist/styles/upload.css +4 -2
- package/dist/styles.css +1 -1
- package/dist/{switch-CEbZkLlX.js → switch-DQF6Qg4y.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{table-BU7XsbQX.js → table-BHTF9AZK.js} +302 -290
- package/dist/table.js +1 -1
- package/dist/{tags-input-BdjkB19P.js → tags-input-Dp_9HJjh.js} +1 -1
- package/dist/tags-input.js +1 -1
- package/dist/{text-field-QJnu-rln.js → text-field-CEBNOMlK.js} +1 -1
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DsrXI3xB.js → textarea-B9hyx3D3.js} +1 -1
- package/dist/textarea.js +1 -1
- package/dist/time-field-B8KPjZBf.js +380 -0
- package/dist/time-field.js +1 -1
- package/dist/{time-picker-WmeCIySv.js → time-picker-aw-WIlPe.js} +35 -31
- package/dist/time-picker.js +1 -1
- package/dist/{time-range-picker-CwSbsJPt.js → time-range-picker-BN5speYJ.js} +106 -102
- package/dist/time-range-picker.js +1 -1
- package/dist/toast-D7G0-9nW.js +467 -0
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-SP_W-yeh.js → toggle-group-K1U5TQ5h.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{toolbar-BniP4i1C.js → toolbar-B6ijf51c.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{transfer-DX6umI2M.js → transfer-A6dqhEGq.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/types/action-sheet/action-sheet-parts.d.ts.map +1 -1
- package/dist/types/calendar/calendar.d.ts.map +1 -1
- package/dist/types/calendar/calendar.types.d.ts +6 -3
- package/dist/types/calendar/calendar.types.d.ts.map +1 -1
- package/dist/types/cascader/cascader-defaults.d.ts.map +1 -1
- package/dist/types/cascader/cascader-sheet-panel.d.ts +29 -0
- package/dist/types/cascader/cascader-sheet-panel.d.ts.map +1 -0
- package/dist/types/cascader/cascader.d.ts +1 -0
- package/dist/types/cascader/cascader.d.ts.map +1 -1
- package/dist/types/cascader/cascader.types.d.ts +8 -0
- package/dist/types/cascader/cascader.types.d.ts.map +1 -1
- package/dist/types/cascader/index.d.ts +1 -1
- package/dist/types/cascader/index.d.ts.map +1 -1
- package/dist/types/cascader/use-cascader-sheet.d.ts +25 -0
- package/dist/types/cascader/use-cascader-sheet.d.ts.map +1 -0
- package/dist/types/color-picker/color-picker.d.ts +1 -1
- package/dist/types/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/column-manager/column-manager.d.ts.map +1 -1
- package/dist/types/column-manager/column-manager.types.d.ts +5 -2
- package/dist/types/column-manager/column-manager.types.d.ts.map +1 -1
- package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
- package/dist/types/command-palette/command-palette.d.ts.map +1 -1
- package/dist/types/data-grid/data-grid-filter.d.ts.map +1 -1
- package/dist/types/date-field/date-field.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.d.ts.map +1 -1
- package/dist/types/date-picker/date-picker.types.d.ts +5 -0
- package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
- package/dist/types/date-picker/index.d.ts +1 -1
- package/dist/types/date-picker/index.d.ts.map +1 -1
- package/dist/types/date-picker/use-date-picker.d.ts +2 -1
- package/dist/types/date-picker/use-date-picker.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 +5 -0
- package/dist/types/date-range-picker/date-range-picker.types.d.ts.map +1 -1
- package/dist/types/date-range-picker/index.d.ts +1 -1
- package/dist/types/date-range-picker/index.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-field/datetime-field.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.d.ts.map +1 -1
- package/dist/types/datetime-picker/datetime-picker.types.d.ts +5 -0
- package/dist/types/datetime-picker/datetime-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-picker/index.d.ts +1 -1
- package/dist/types/datetime-picker/index.d.ts.map +1 -1
- package/dist/types/datetime-picker/use-datetime-picker.d.ts +1 -0
- package/dist/types/datetime-picker/use-datetime-picker.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 +5 -0
- package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/index.d.ts +1 -1
- package/dist/types/datetime-range-picker/index.d.ts.map +1 -1
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts +1 -0
- package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts.map +1 -1
- package/dist/types/dialog/dialog-defaults.d.ts.map +1 -1
- package/dist/types/dialog/dialog-parts.d.ts +1 -1
- package/dist/types/dialog/dialog-parts.d.ts.map +1 -1
- package/dist/types/dialog/dialog-sheet-footer.d.ts +7 -0
- package/dist/types/dialog/dialog-sheet-footer.d.ts.map +1 -0
- package/dist/types/dialog/dialog.d.ts +1 -0
- package/dist/types/dialog/dialog.d.ts.map +1 -1
- package/dist/types/dialog/dialog.types.d.ts +25 -0
- package/dist/types/dialog/dialog.types.d.ts.map +1 -1
- package/dist/types/dialog/index.d.ts +1 -1
- package/dist/types/dialog/index.d.ts.map +1 -1
- package/dist/types/dialog/use-dialog-sheet.d.ts +8 -0
- package/dist/types/dialog/use-dialog-sheet.d.ts.map +1 -0
- package/dist/types/drawer/drawer-parts.d.ts +10 -2
- package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
- package/dist/types/drawer/drawer.d.ts +2 -1
- package/dist/types/drawer/drawer.d.ts.map +1 -1
- package/dist/types/drawer/drawer.types.d.ts +21 -0
- package/dist/types/drawer/drawer.types.d.ts.map +1 -1
- package/dist/types/drawer/index.d.ts +2 -2
- package/dist/types/drawer/index.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker-defaults.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker-popup.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker-sheet-panel.d.ts +17 -0
- package/dist/types/entity-picker/entity-picker-sheet-panel.d.ts.map +1 -0
- package/dist/types/entity-picker/entity-picker.d.ts +3 -0
- package/dist/types/entity-picker/entity-picker.d.ts.map +1 -1
- package/dist/types/entity-picker/entity-picker.types.d.ts +8 -0
- package/dist/types/entity-picker/entity-picker.types.d.ts.map +1 -1
- package/dist/types/entity-picker/index.d.ts +1 -1
- package/dist/types/entity-picker/index.d.ts.map +1 -1
- package/dist/types/entity-picker/sheet-keys.d.ts +9 -0
- package/dist/types/entity-picker/sheet-keys.d.ts.map +1 -0
- package/dist/types/entity-picker/use-entity-picker-sheet.d.ts +16 -0
- package/dist/types/entity-picker/use-entity-picker-sheet.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet-editor.d.ts +21 -0
- package/dist/types/filter-bar/filter-bar-sheet-editor.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet-list.d.ts +19 -0
- package/dist/types/filter-bar/filter-bar-sheet-list.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet-notice.d.ts +17 -0
- package/dist/types/filter-bar/filter-bar-sheet-notice.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet-operands.d.ts +22 -0
- package/dist/types/filter-bar/filter-bar-sheet-operands.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet-option.d.ts +12 -0
- package/dist/types/filter-bar/filter-bar-sheet-option.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet-row.d.ts +15 -0
- package/dist/types/filter-bar/filter-bar-sheet-row.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet-words.d.ts +11 -0
- package/dist/types/filter-bar/filter-bar-sheet-words.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar-sheet.d.ts +36 -0
- package/dist/types/filter-bar/filter-bar-sheet.d.ts.map +1 -0
- package/dist/types/filter-bar/filter-bar.d.ts +1 -1
- package/dist/types/filter-bar/filter-bar.d.ts.map +1 -1
- package/dist/types/filter-bar/filter-bar.types.d.ts +59 -1
- package/dist/types/filter-bar/filter-bar.types.d.ts.map +1 -1
- package/dist/types/filter-bar/index.d.ts +1 -1
- package/dist/types/filter-bar/index.d.ts.map +1 -1
- package/dist/types/filter-bar/use-sheet-draft.d.ts +12 -0
- package/dist/types/filter-bar/use-sheet-draft.d.ts.map +1 -0
- package/dist/types/list/index.d.ts +1 -1
- package/dist/types/list/index.d.ts.map +1 -1
- package/dist/types/list/list-defaults.d.ts.map +1 -1
- package/dist/types/list/list.d.ts +1 -1
- package/dist/types/list/list.d.ts.map +1 -1
- package/dist/types/list/list.types.d.ts +28 -0
- package/dist/types/list/list.types.d.ts.map +1 -1
- package/dist/types/list-item/index.d.ts +1 -1
- package/dist/types/list-item/index.d.ts.map +1 -1
- package/dist/types/list-item/list-item-parts.d.ts +7 -0
- package/dist/types/list-item/list-item-parts.d.ts.map +1 -1
- package/dist/types/list-item/list-item.d.ts.map +1 -1
- package/dist/types/menu/menu-parts.d.ts.map +1 -1
- package/dist/types/menu/menu.d.ts +1 -0
- package/dist/types/menu/menu.d.ts.map +1 -1
- package/dist/types/menu/menu.types.d.ts +6 -2
- package/dist/types/menu/menu.types.d.ts.map +1 -1
- package/dist/types/menu/use-menu-sheet.d.ts +7 -5
- package/dist/types/menu/use-menu-sheet.d.ts.map +1 -1
- package/dist/types/multi-select/index.d.ts +1 -1
- package/dist/types/multi-select/index.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-chips.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-defaults.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-items.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select-sheet-panel.d.ts +21 -0
- package/dist/types/multi-select/multi-select-sheet-panel.d.ts.map +1 -0
- package/dist/types/multi-select/multi-select.d.ts +5 -0
- package/dist/types/multi-select/multi-select.d.ts.map +1 -1
- package/dist/types/multi-select/multi-select.types.d.ts +7 -0
- package/dist/types/multi-select/multi-select.types.d.ts.map +1 -1
- package/dist/types/multi-select/use-multi-select-sheet.d.ts +16 -0
- package/dist/types/multi-select/use-multi-select-sheet.d.ts.map +1 -0
- package/dist/types/picker-panel/picker-layer.d.ts +1 -0
- package/dist/types/picker-panel/picker-layer.d.ts.map +1 -1
- package/dist/types/picker-panel/use-picker-layer.d.ts +2 -0
- package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -1
- package/dist/types/popover/index.d.ts +2 -2
- package/dist/types/popover/index.d.ts.map +1 -1
- package/dist/types/popover/popover-parts.d.ts +4 -2
- package/dist/types/popover/popover-parts.d.ts.map +1 -1
- package/dist/types/popover/popover.d.ts +1 -0
- package/dist/types/popover/popover.d.ts.map +1 -1
- package/dist/types/popover/popover.types.d.ts +10 -0
- package/dist/types/popover/popover.types.d.ts.map +1 -1
- package/dist/types/saved-views/saved-views-name-field.d.ts +11 -0
- package/dist/types/saved-views/saved-views-name-field.d.ts.map +1 -0
- package/dist/types/saved-views/saved-views-name-sheet.d.ts +23 -0
- package/dist/types/saved-views/saved-views-name-sheet.d.ts.map +1 -0
- package/dist/types/saved-views/saved-views.d.ts.map +1 -1
- package/dist/types/select/select-parts.d.ts.map +1 -1
- package/dist/types/select/select-sheet-panel.d.ts +21 -0
- package/dist/types/select/select-sheet-panel.d.ts.map +1 -0
- package/dist/types/select/select.d.ts +2 -1
- package/dist/types/select/select.d.ts.map +1 -1
- package/dist/types/select/select.types.d.ts +3 -3
- package/dist/types/select/use-select-sheet.d.ts +7 -3
- package/dist/types/select/use-select-sheet.d.ts.map +1 -1
- package/dist/types/sheet/use-sheet.d.ts +22 -0
- package/dist/types/sheet/use-sheet.d.ts.map +1 -0
- package/dist/types/table/table-filter.d.ts.map +1 -1
- package/dist/types/time-field/time-field.d.ts.map +1 -1
- package/dist/types/time-picker/index.d.ts +1 -1
- package/dist/types/time-picker/index.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker-defaults.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker.d.ts.map +1 -1
- package/dist/types/time-picker/time-picker.types.d.ts +5 -0
- package/dist/types/time-picker/time-picker.types.d.ts.map +1 -1
- package/dist/types/time-picker/use-time-picker.d.ts +1 -0
- package/dist/types/time-picker/use-time-picker.d.ts.map +1 -1
- package/dist/types/time-range-picker/index.d.ts +1 -1
- package/dist/types/time-range-picker/index.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker-defaults.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
- package/dist/types/time-range-picker/time-range-picker.types.d.ts +5 -0
- package/dist/types/time-range-picker/time-range-picker.types.d.ts.map +1 -1
- package/dist/types/time-range-picker/use-time-range-picker.d.ts +1 -0
- package/dist/types/time-range-picker/use-time-range-picker.d.ts.map +1 -1
- package/dist/types/toast/toast-parts.d.ts.map +1 -1
- package/dist/types/toast/toast.d.ts.map +1 -1
- package/dist/types/toast/toast.types.d.ts +6 -2
- package/dist/types/toast/toast.types.d.ts.map +1 -1
- package/dist/types/toast/use-toast-keyboard-inset.d.ts +7 -0
- package/dist/types/toast/use-toast-keyboard-inset.d.ts.map +1 -0
- package/dist/types/toast/use-toast-reach.d.ts +28 -0
- package/dist/types/toast/use-toast-reach.d.ts.map +1 -0
- package/dist/types/toast/use-toast-swipe.d.ts +6 -0
- package/dist/types/toast/use-toast-swipe.d.ts.map +1 -0
- package/dist/{upload-BtD1nLHa.js → upload-BUNMpgbU.js} +2 -2
- package/dist/upload.js +1 -1
- package/dist/{use-date-picker-CwH791Jm.js → use-date-picker-CXtGSr7_.js} +5 -2
- package/dist/{use-picker-draft-BnLS4lDY.js → use-picker-draft-DBzDfMwd.js} +110 -109
- package/dist/use-sheet-DFy3znDR.js +44 -0
- package/package.json +13 -8
- package/dist/action-sheet-q1UXXruJ.js +0 -360
- package/dist/cascader-BbhADVGt.js +0 -1160
- package/dist/column-manager-Cc72e1j-.js +0 -586
- package/dist/date-field-CjlOWVRA.js +0 -299
- package/dist/date-picker-BoIHK8_U.js +0 -346
- package/dist/datetime-field-PSEOgzfN.js +0 -424
- package/dist/dialog-CjOBjHrL.js +0 -537
- package/dist/drawer-JP3p-QZB.js +0 -879
- package/dist/entity-picker-BWpuo-mp.js +0 -1292
- package/dist/filter-bar-nQH58RVl.js +0 -1358
- package/dist/menu-parts-DXs5YuUA.js +0 -932
- package/dist/multi-select-IpsZvoQ2.js +0 -1259
- package/dist/popover-DED1MTi-.js +0 -615
- package/dist/saved-views-D-CP7JIE.js +0 -459
- package/dist/select-Dbc3ng0M.js +0 -1124
- package/dist/time-field-DlZdMsNw.js +0 -366
- package/dist/toast-C3xLEFDE.js +0 -474
|
@@ -98,7 +98,16 @@ export default function EntityPickerBasicExample() {
|
|
|
98
98
|
| `arrow` | span | no |
|
|
99
99
|
| `busy` | span, a Spinner | no |
|
|
100
100
|
| `positioner` | div, portalled | yes |
|
|
101
|
-
| `
|
|
101
|
+
| `backdrop` | div | no |
|
|
102
|
+
| `content` | div with role="listbox", or role="dialog" in the sheet | yes |
|
|
103
|
+
| `grip` | span | no |
|
|
104
|
+
| `header` | div | no |
|
|
105
|
+
| `title` | div | no |
|
|
106
|
+
| `search` | div, drawn only in the sheet | no |
|
|
107
|
+
| `search-icon` | span, aria-hidden | no |
|
|
108
|
+
| `search-input` | input with role="combobox" | no |
|
|
109
|
+
| `list` | div with role="listbox", drawn only in the sheet | no |
|
|
110
|
+
| `footer` | footer, drawn only in the sheet of a multiple picker | no |
|
|
102
111
|
| `group` | div | no |
|
|
103
112
|
| `group-label` | div | no |
|
|
104
113
|
| `item` | div | no |
|
|
@@ -109,6 +118,9 @@ export default function EntityPickerBasicExample() {
|
|
|
109
118
|
| `meta` | span | no |
|
|
110
119
|
| `indicator` | span | no |
|
|
111
120
|
| `error` | div | no |
|
|
121
|
+
| `error-mark` | span | no |
|
|
122
|
+
| `error-title` | span | no |
|
|
123
|
+
| `error-hint` | span | no |
|
|
112
124
|
| `empty` | div | no |
|
|
113
125
|
| `placeholder` | div | no |
|
|
114
126
|
| `more` | div | no |
|
|
@@ -158,6 +170,7 @@ export default function EntityPickerBasicExample() {
|
|
|
158
170
|
| `loop` | `boolean` | false | EntityPicker | The arrows wrap past the ends |
|
|
159
171
|
| `highlightMatch` | `boolean` | true | EntityPicker | Marks the span the query found |
|
|
160
172
|
| `portal` | `boolean` | true | EntityPicker | false keeps the layer in the DOM of the picker, where the nearest ancestor with overflow clips it. Inside another layer (Popover, Dialog) keep the default: a choice in the portalled list is not an outside press of the parent layer |
|
|
173
|
+
| `presentation` | `'popover' \| 'auto'` | auto | EntityPicker | auto, the default, draws the list in a bottom sheet under (max-width: 480px) and (pointer: coarse): modal, headed by the field’s label and a search field of its own, at the full height of the screen less a strip of scrim, every option at least --slotted-target-min tall, moved as every bottom sheet is. A single picker closes on a choice; a multiple picker stays open and ends in Done. A release past the threshold, the scrim, Escape and the platform’s way back close it, each by one slide down in the --slotted-sheet-* tokens. The list holds focus as it opens, so the keyboard rises on a touch on the field. popover keeps the anchored list on every screen |
|
|
161
174
|
| `fullWidth` | `boolean` | true | EntityPicker | false sizes the root to its content |
|
|
162
175
|
| `disabled` | `boolean` | false | EntityPicker | Also read from a Field or a disabled fieldset |
|
|
163
176
|
| `readOnly` | `boolean` | false | EntityPicker | Keeps the text, withholds the popup and the removals |
|
|
@@ -198,6 +211,7 @@ export default function EntityPickerBasicExample() {
|
|
|
198
211
|
| `loop` | `true`, `false` | `false` |
|
|
199
212
|
| `highlightMatch` | `true`, `false` | `true` |
|
|
200
213
|
| `portal` | `true`, `false` | `true` |
|
|
214
|
+
| `presentation` | `popover`, `auto` | `auto` |
|
|
201
215
|
| `fullWidth` | `true`, `false` | `true` |
|
|
202
216
|
| `disabled` | `true`, `false` | `false` |
|
|
203
217
|
| `readOnly` | `true`, `false` | `false` |
|
|
@@ -214,7 +228,7 @@ export default function EntityPickerBasicExample() {
|
|
|
214
228
|
|
|
215
229
|
## Tokens
|
|
216
230
|
|
|
217
|
-
`--slotted-avatar-size-md`, `--slotted-avatar-size-sm`, `--slotted-avatar-size-xs`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-focus-ring-offset`, `--slotted-control-font-family`, `--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-inner-size-lg`, `--slotted-control-inner-size-md`, `--slotted-control-inner-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-entity-picker-action-active-background`, `--slotted-entity-picker-action-color`, `--slotted-entity-picker-action-hover-background`, `--slotted-entity-picker-action-size`, `--slotted-entity-picker-autofill-background`, `--slotted-entity-picker-background`, `--slotted-entity-picker-border-color`, `--slotted-entity-picker-color`, `--slotted-entity-picker-content-backdrop-filter`, `--slotted-entity-picker-content-border-color`, `--slotted-entity-picker-content-radius`, `--slotted-entity-picker-content-shadow`, `--slotted-entity-picker-content-text`, `--slotted-entity-picker-content-text-muted`, `--slotted-entity-picker-disabled-background`, `--slotted-entity-picker-disabled-border-color`, `--slotted-entity-picker-disabled-color`, `--slotted-entity-picker-error-color`, `--slotted-entity-picker-field-basis`, `--slotted-entity-picker-field-min`, `--slotted-entity-picker-group-label-height`, `--slotted-entity-picker-group-label-stuck-backdrop-filter`, `--slotted-entity-picker-group-label-stuck-surface`, `--slotted-entity-picker-highlight`, `--slotted-entity-picker-highlight-active`, `--slotted-entity-picker-highlight-ring`, `--slotted-entity-picker-hover-border-color`, `--slotted-entity-picker-icon-size-min`, `--slotted-entity-picker-invalid-border-color`, `--slotted-entity-picker-invalid-edge-width`, `--slotted-entity-picker-invalid-focus-ring-color`, `--slotted-entity-picker-item-radius`, `--slotted-entity-picker-measure`, `--slotted-entity-picker-meta-measure`, `--slotted-entity-picker-offer-color`, `--slotted-entity-picker-open-border-color`, `--slotted-entity-picker-placeholder-color`, `--slotted-entity-picker-plain-hover-background`, `--slotted-entity-picker-radius`, `--slotted-entity-picker-readonly-background`, `--slotted-entity-picker-scope-inline-size`, `--slotted-entity-picker-selected-color`, `--slotted-entity-picker-shadow`, `--slotted-entity-picker-subtle-background`, `--slotted-entity-picker-subtle-border-color`, `--slotted-entity-picker-subtle-hover-background`, `--slotted-entity-picker-surface`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-sans`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-overlay-max-block-size`, `--slotted-radius-lg`, `--slotted-radius-none`, `--slotted-shadow-md`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
231
|
+
`--slotted-avatar-size-md`, `--slotted-avatar-size-sm`, `--slotted-avatar-size-xs`, `--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-border-color`, `--slotted-control-border-width`, `--slotted-control-focus-ring-offset`, `--slotted-control-font-family`, `--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-inner-size-lg`, `--slotted-control-inner-size-md`, `--slotted-control-inner-size-sm`, `--slotted-control-invalid-edge-width`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-shadow`, `--slotted-control-shadow-focus-geometry`, `--slotted-control-surface`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-long`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-easing-exit`, `--slotted-easing-standard`, `--slotted-entity-picker-action-active-background`, `--slotted-entity-picker-action-color`, `--slotted-entity-picker-action-hover-background`, `--slotted-entity-picker-action-size`, `--slotted-entity-picker-autofill-background`, `--slotted-entity-picker-background`, `--slotted-entity-picker-border-color`, `--slotted-entity-picker-color`, `--slotted-entity-picker-content-backdrop-filter`, `--slotted-entity-picker-content-border-color`, `--slotted-entity-picker-content-radius`, `--slotted-entity-picker-content-shadow`, `--slotted-entity-picker-content-text`, `--slotted-entity-picker-content-text-muted`, `--slotted-entity-picker-disabled-background`, `--slotted-entity-picker-disabled-border-color`, `--slotted-entity-picker-disabled-color`, `--slotted-entity-picker-error-color`, `--slotted-entity-picker-error-surface`, `--slotted-entity-picker-field-basis`, `--slotted-entity-picker-field-min`, `--slotted-entity-picker-group-label-height`, `--slotted-entity-picker-group-label-stuck-backdrop-filter`, `--slotted-entity-picker-group-label-stuck-surface`, `--slotted-entity-picker-highlight`, `--slotted-entity-picker-highlight-active`, `--slotted-entity-picker-highlight-ring`, `--slotted-entity-picker-hover-border-color`, `--slotted-entity-picker-icon-size-min`, `--slotted-entity-picker-invalid-border-color`, `--slotted-entity-picker-invalid-edge-width`, `--slotted-entity-picker-invalid-focus-ring-color`, `--slotted-entity-picker-item-radius`, `--slotted-entity-picker-measure`, `--slotted-entity-picker-meta-measure`, `--slotted-entity-picker-offer-color`, `--slotted-entity-picker-open-border-color`, `--slotted-entity-picker-placeholder-color`, `--slotted-entity-picker-plain-hover-background`, `--slotted-entity-picker-radius`, `--slotted-entity-picker-readonly-background`, `--slotted-entity-picker-scope-inline-size`, `--slotted-entity-picker-selected-color`, `--slotted-entity-picker-shadow`, `--slotted-entity-picker-subtle-background`, `--slotted-entity-picker-subtle-border-color`, `--slotted-entity-picker-subtle-hover-background`, `--slotted-entity-picker-surface`, `--slotted-focus-ring-color`, `--slotted-focus-ring-color-invalid`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-md`, `--slotted-font-size-xs`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-overlay-max-block-size`, `--slotted-radius-lg`, `--slotted-radius-none`, `--slotted-scrim`, `--slotted-shadow-md`, `--slotted-sheet-scrim`, `--slotted-space-1`, `--slotted-space-12`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-space-7`, `--slotted-space-8`, `--slotted-surface-raised`, `--slotted-surface-sunken`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-border`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-danger-border`, `--slotted-tone-danger-surface`, `--slotted-tone-danger-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-z-index-popover`
|
|
218
232
|
|
|
219
233
|
## Examples
|
|
220
234
|
|
package/dist/docs/field.json
CHANGED
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
"type": "'toggletip' | 'auto'",
|
|
232
232
|
"defaultValue": "toggletip",
|
|
233
233
|
"appliesTo": "FieldHelp",
|
|
234
|
-
"description": "auto draws the hint as a bottom sheet under (max-width: 480px) and (pointer: coarse): modal, headed by the field’s label beside a close control,
|
|
234
|
+
"description": "auto draws the hint as a bottom sheet under (max-width: 480px) and (pointer: coarse): modal, headed by the field’s label beside a close control, moved as every bottom sheet is and closed by a release past the threshold, its scrim, Escape and the platform’s way back, with focus given back to the help button. Anywhere else it is the toggletip."
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
"name": "helpPresentation",
|
package/dist/docs/field.md
CHANGED
|
@@ -71,7 +71,7 @@ export default function FieldBasic() {
|
|
|
71
71
|
| `children` | `ReactNode` | — | FieldHelp | The help text. Written once, it reaches the tooltip and the hidden node that describes the button and the control. |
|
|
72
72
|
| `open` | `boolean` | — | FieldHelp | Whether the hint is showing, controlled. Pair it with onOpenChange; leave both unset and FieldHelp owns the state. |
|
|
73
73
|
| `defaultOpen` | `boolean` | false | FieldHelp | Whether the hint starts open, read once when FieldHelp owns the state. |
|
|
74
|
-
| `presentation` | `'toggletip' \| 'auto'` | toggletip | FieldHelp | auto draws the hint as a bottom sheet under (max-width: 480px) and (pointer: coarse): modal, headed by the field’s label beside a close control,
|
|
74
|
+
| `presentation` | `'toggletip' \| 'auto'` | toggletip | FieldHelp | auto draws the hint as a bottom sheet under (max-width: 480px) and (pointer: coarse): modal, headed by the field’s label beside a close control, moved as every bottom sheet is and closed by a release past the threshold, its scrim, Escape and the platform’s way back, with focus given back to the help button. Anywhere else it is the toggletip. |
|
|
75
75
|
| `helpPresentation` | `'toggletip' \| 'auto'` | toggletip | FieldDefaultsProvider | The presentation of every FieldHelp inside, unless a FieldHelp states its own. |
|
|
76
76
|
| `side` | `'top' \| 'bottom' \| 'inline-start' \| 'inline-end' \| 'left' \| 'right'` | top | FieldHelp | Where the hint opens. It flips to the opposite side when there is no room. |
|
|
77
77
|
| `aria-label` | `string` | messages.help | FieldHelp | The accessible name of the help button. Unset, it is the field’s help message; set, it applies to this button alone. |
|
|
@@ -717,6 +717,221 @@ Excerpt — not a complete module
|
|
|
717
717
|
<FilterBar fields={FIELDS} onValueChange={(next, request) => request.reason === 'remove'} />;
|
|
718
718
|
```
|
|
719
719
|
|
|
720
|
+
### sheet-editor.tsx
|
|
721
|
+
|
|
722
|
+
Example
|
|
723
|
+
|
|
724
|
+
```tsx
|
|
725
|
+
import type { FilterDescriptor, FilterGroup } from '@slotted/core/filter';
|
|
726
|
+
import { FilterBar } from '@slotted/react/filter-bar';
|
|
727
|
+
import type { FilterBarField } from '@slotted/react/filter-bar';
|
|
728
|
+
import { Segment, SegmentedControl } from '@slotted/react/segmented-control';
|
|
729
|
+
import { Stack } from '@slotted/react/stack';
|
|
730
|
+
import { Text } from '@slotted/react/typography';
|
|
731
|
+
import { useState } from 'react';
|
|
732
|
+
|
|
733
|
+
/** The day the invoices are read on. */
|
|
734
|
+
const TODAY = '2026-09-30';
|
|
735
|
+
|
|
736
|
+
const PERIODS = { month: '2026-09-01', quarter: '2026-07-01', week: '2026-09-24' } as const;
|
|
737
|
+
|
|
738
|
+
const DAY = new Intl.DateTimeFormat('en-US', { day: 'numeric', month: 'short', timeZone: 'UTC' });
|
|
739
|
+
|
|
740
|
+
const FIELDS: FilterBarField[] = [
|
|
741
|
+
{
|
|
742
|
+
key: 'issued',
|
|
743
|
+
kind: 'date',
|
|
744
|
+
label: 'Issued',
|
|
745
|
+
sheet: {
|
|
746
|
+
editor: ({ onValueChange, value }) => (
|
|
747
|
+
<SegmentedControl
|
|
748
|
+
aria-label="Issued"
|
|
749
|
+
onValueChange={(next) => onValueChange(issuedSince(next))}
|
|
750
|
+
value={periodOf(value)}
|
|
751
|
+
>
|
|
752
|
+
<Segment value="week">This week</Segment>
|
|
753
|
+
<Segment value="month">This month</Segment>
|
|
754
|
+
<Segment value="quarter">This quarter</Segment>
|
|
755
|
+
</SegmentedControl>
|
|
756
|
+
),
|
|
757
|
+
format: (value) => DAY.format(new Date(`${String(value)}T00:00:00Z`)),
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
];
|
|
761
|
+
|
|
762
|
+
export default function FilterBarSheetEditorExample() {
|
|
763
|
+
const [filter, setFilter] = useState<FilterGroup | null>(null);
|
|
764
|
+
|
|
765
|
+
return (
|
|
766
|
+
<Stack gap={4}>
|
|
767
|
+
<FilterBar fields={FIELDS} onValueChange={setFilter} presentation="sheet" value={filter} />
|
|
768
|
+
|
|
769
|
+
<Text size="sm" tone="muted">
|
|
770
|
+
{filter ? JSON.stringify(filter.rules[0]) : 'No period chosen'}
|
|
771
|
+
</Text>
|
|
772
|
+
</Stack>
|
|
773
|
+
);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
function issuedSince(period: string | undefined): FilterDescriptor | null {
|
|
777
|
+
const from = PERIODS[period as keyof typeof PERIODS];
|
|
778
|
+
|
|
779
|
+
return from
|
|
780
|
+
? { conditions: [{ end: TODAY, operator: 'between', value: from }], join: 'and', kind: 'date' }
|
|
781
|
+
: null;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
function periodOf(value: FilterDescriptor | null): string | undefined {
|
|
785
|
+
const from = value?.conditions[0]?.value;
|
|
786
|
+
|
|
787
|
+
return Object.keys(PERIODS).find((key) => PERIODS[key as keyof typeof PERIODS] === from);
|
|
788
|
+
}
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
### sheet-status.tsx
|
|
792
|
+
|
|
793
|
+
Example
|
|
794
|
+
|
|
795
|
+
```tsx
|
|
796
|
+
import type { FilterBarField, FilterBarFieldStatus } from '@slotted/react/filter-bar';
|
|
797
|
+
import { FilterBar } from '@slotted/react/filter-bar';
|
|
798
|
+
import { useEffect, useState } from 'react';
|
|
799
|
+
|
|
800
|
+
const CARRIERS = [
|
|
801
|
+
{ label: 'DHL Express', value: 'dhl' },
|
|
802
|
+
{ label: 'FedEx Ground', value: 'fedex' },
|
|
803
|
+
{ label: 'UPS Standard', value: 'ups' },
|
|
804
|
+
{ label: 'USPS Priority', value: 'usps' },
|
|
805
|
+
];
|
|
806
|
+
|
|
807
|
+
export default function FilterBarSheetStatusExample() {
|
|
808
|
+
const [attempt, setAttempt] = useState(0);
|
|
809
|
+
const [status, setStatus] = useState<FilterBarFieldStatus>('loading');
|
|
810
|
+
|
|
811
|
+
/* The first request fails after a moment; Try again succeeds. */
|
|
812
|
+
useEffect(() => {
|
|
813
|
+
if (status !== 'loading') return;
|
|
814
|
+
|
|
815
|
+
const timer = setTimeout(() => setStatus(attempt === 0 ? 'error' : 'ready'), 1200);
|
|
816
|
+
|
|
817
|
+
return () => clearTimeout(timer);
|
|
818
|
+
}, [attempt, status]);
|
|
819
|
+
|
|
820
|
+
function handleRetry() {
|
|
821
|
+
setAttempt((count) => count + 1);
|
|
822
|
+
setStatus('loading');
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
const fields: FilterBarField[] = [
|
|
826
|
+
{
|
|
827
|
+
key: 'carrier',
|
|
828
|
+
kind: 'set',
|
|
829
|
+
label: 'Carrier',
|
|
830
|
+
onRetry: handleRetry,
|
|
831
|
+
options: status === 'ready' ? CARRIERS : [],
|
|
832
|
+
status,
|
|
833
|
+
},
|
|
834
|
+
];
|
|
835
|
+
|
|
836
|
+
return <FilterBar fields={fields} presentation="sheet" />;
|
|
837
|
+
}
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
### sheet.tsx
|
|
841
|
+
|
|
842
|
+
Example
|
|
843
|
+
|
|
844
|
+
```tsx
|
|
845
|
+
import { createFilterGroupPredicate } from '@slotted/core/filter';
|
|
846
|
+
import type { FilterGroup } from '@slotted/core/filter';
|
|
847
|
+
import { FilterBar } from '@slotted/react/filter-bar';
|
|
848
|
+
import type { FilterBarField } from '@slotted/react/filter-bar';
|
|
849
|
+
import { Stack } from '@slotted/react/stack';
|
|
850
|
+
import { Text } from '@slotted/react/typography';
|
|
851
|
+
import { useState } from 'react';
|
|
852
|
+
|
|
853
|
+
interface Invoice {
|
|
854
|
+
amount: number;
|
|
855
|
+
customer: string;
|
|
856
|
+
id: string;
|
|
857
|
+
status: string;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
const USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });
|
|
861
|
+
|
|
862
|
+
const FIELDS: FilterBarField[] = [
|
|
863
|
+
{
|
|
864
|
+
key: 'customer',
|
|
865
|
+
kind: 'set',
|
|
866
|
+
label: 'Customer',
|
|
867
|
+
multiple: false,
|
|
868
|
+
options: [
|
|
869
|
+
{ context: 'Germany', group: 'Wholesale', label: 'Alfreds Futterkiste', value: 'alfreds' },
|
|
870
|
+
{ context: 'Austria', group: 'Wholesale', label: 'Ernst Handel', value: 'ernst' },
|
|
871
|
+
{ context: 'France', group: 'Retail', label: 'Bon app', value: 'bon-app' },
|
|
872
|
+
{ context: 'Sweden', group: 'Retail', label: 'Folk och fa HB', value: 'folk' },
|
|
873
|
+
{ context: 'United Kingdom', group: 'Retail', label: 'Island Trading', value: 'island' },
|
|
874
|
+
],
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
key: 'status',
|
|
878
|
+
kind: 'set',
|
|
879
|
+
label: 'Status',
|
|
880
|
+
options: [
|
|
881
|
+
{ label: 'Paid', value: 'paid' },
|
|
882
|
+
{ label: 'Pending', value: 'pending' },
|
|
883
|
+
{ label: 'Overdue', value: 'overdue' },
|
|
884
|
+
{ label: 'Refunded', value: 'refunded' },
|
|
885
|
+
],
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
key: 'amount',
|
|
889
|
+
kind: 'number',
|
|
890
|
+
label: 'Amount',
|
|
891
|
+
min: 0,
|
|
892
|
+
sheet: { format: (value) => USD.format(Number(value)) },
|
|
893
|
+
},
|
|
894
|
+
];
|
|
895
|
+
|
|
896
|
+
const INVOICES: Invoice[] = [
|
|
897
|
+
{ amount: 1240, customer: 'alfreds', id: 'INV-2041', status: 'paid' },
|
|
898
|
+
{ amount: 860.5, customer: 'bon-app', id: 'INV-2042', status: 'pending' },
|
|
899
|
+
{ amount: 3410.25, customer: 'ernst', id: 'INV-2043', status: 'overdue' },
|
|
900
|
+
{ amount: 512, customer: 'folk', id: 'INV-2044', status: 'refunded' },
|
|
901
|
+
{ amount: 2088.9, customer: 'island', id: 'INV-2045', status: 'paid' },
|
|
902
|
+
{ amount: 975, customer: 'ernst', id: 'INV-2046', status: 'pending' },
|
|
903
|
+
];
|
|
904
|
+
|
|
905
|
+
const read = (row: Invoice, field: string): unknown => row[field as keyof Invoice];
|
|
906
|
+
|
|
907
|
+
export default function FilterBarSheetExample() {
|
|
908
|
+
const [filter, setFilter] = useState<FilterGroup | null>(null);
|
|
909
|
+
|
|
910
|
+
const keep = createFilterGroupPredicate(filter, read);
|
|
911
|
+
const kept = INVOICES.filter((row) => keep(row));
|
|
912
|
+
|
|
913
|
+
return (
|
|
914
|
+
<Stack gap={4}>
|
|
915
|
+
<FilterBar
|
|
916
|
+
count={kept.length}
|
|
917
|
+
fields={FIELDS}
|
|
918
|
+
onValueChange={setFilter}
|
|
919
|
+
presentation="sheet"
|
|
920
|
+
value={filter}
|
|
921
|
+
/>
|
|
922
|
+
|
|
923
|
+
<Stack gap={2}>
|
|
924
|
+
{kept.map((row) => (
|
|
925
|
+
<Text key={row.id} size="sm">
|
|
926
|
+
{row.id} - {USD.format(row.amount)} - {row.status}
|
|
927
|
+
</Text>
|
|
928
|
+
))}
|
|
929
|
+
</Stack>
|
|
930
|
+
</Stack>
|
|
931
|
+
);
|
|
932
|
+
}
|
|
933
|
+
```
|
|
934
|
+
|
|
720
935
|
### sizes.tsx
|
|
721
936
|
|
|
722
937
|
Example
|
|
@@ -19,6 +19,16 @@
|
|
|
19
19
|
"sm",
|
|
20
20
|
"md",
|
|
21
21
|
"lg"
|
|
22
|
+
],
|
|
23
|
+
"presentation": [
|
|
24
|
+
"builder",
|
|
25
|
+
"sheet",
|
|
26
|
+
"auto"
|
|
27
|
+
],
|
|
28
|
+
"chips": [
|
|
29
|
+
"inline",
|
|
30
|
+
"none",
|
|
31
|
+
"auto"
|
|
22
32
|
]
|
|
23
33
|
},
|
|
24
34
|
"members": {
|
|
@@ -98,7 +108,31 @@
|
|
|
98
108
|
"add-rule",
|
|
99
109
|
"add-group",
|
|
100
110
|
"remove-group",
|
|
101
|
-
"save-preset"
|
|
111
|
+
"save-preset",
|
|
112
|
+
"sheet",
|
|
113
|
+
"sheet-locked",
|
|
114
|
+
"sheet-row",
|
|
115
|
+
"sheet-label",
|
|
116
|
+
"sheet-value",
|
|
117
|
+
"sheet-mark",
|
|
118
|
+
"sheet-clear",
|
|
119
|
+
"sheet-actions",
|
|
120
|
+
"sheet-more",
|
|
121
|
+
"sheet-show",
|
|
122
|
+
"sheet-list",
|
|
123
|
+
"sheet-search",
|
|
124
|
+
"sheet-options",
|
|
125
|
+
"sheet-group",
|
|
126
|
+
"sheet-option",
|
|
127
|
+
"sheet-option-label",
|
|
128
|
+
"sheet-option-context",
|
|
129
|
+
"sheet-option-check",
|
|
130
|
+
"sheet-placeholder",
|
|
131
|
+
"sheet-notice",
|
|
132
|
+
"sheet-editor",
|
|
133
|
+
"sheet-range",
|
|
134
|
+
"sheet-remove",
|
|
135
|
+
"sheet-apply"
|
|
102
136
|
]
|
|
103
137
|
}
|
|
104
138
|
},
|
|
@@ -112,7 +146,7 @@
|
|
|
112
146
|
"part": "root",
|
|
113
147
|
"element": "div",
|
|
114
148
|
"required": true,
|
|
115
|
-
"purpose": "The role=\"search\" landmark named by the bar message. Carries data-ui=\"filter-bar\", data-apply, data-size, data-dirty, data-open, data-sticky, data-readonly, data-disabled, data-loading. It is the query container; nothing on it changes grid."
|
|
149
|
+
"purpose": "The role=\"search\" landmark named by the bar message. Carries data-ui=\"filter-bar\", data-apply, data-chips, data-size, data-dirty, data-open, data-sticky, data-readonly, data-disabled, data-loading. It is the query container; nothing on it changes grid."
|
|
116
150
|
},
|
|
117
151
|
{
|
|
118
152
|
"part": "frame",
|
|
@@ -178,7 +212,7 @@
|
|
|
178
212
|
"part": "summary",
|
|
179
213
|
"element": "button",
|
|
180
214
|
"required": true,
|
|
181
|
-
"purpose": "First on the bar,
|
|
215
|
+
"purpose": "First on the bar: \"Filters\", or \"Filters (n)\" with n conditions applied, in the accent tone under the sheet. It opens the builder or the sheet. Drawn below 36rem, and at every width while the bar draws no chips; elsewhere it is hidden and out of the focus ring."
|
|
182
216
|
},
|
|
183
217
|
{
|
|
184
218
|
"part": "end",
|
|
@@ -317,6 +351,150 @@
|
|
|
317
351
|
"element": "button",
|
|
318
352
|
"required": false,
|
|
319
353
|
"purpose": "Asks the application to save the tree as a view, when onPresetSave exists. The application asks for the name."
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"part": "sheet",
|
|
357
|
+
"element": "div",
|
|
358
|
+
"required": false,
|
|
359
|
+
"purpose": "The body of the sheet presentation, in a bottom drawer at its content’s height: one sheet-row per field the sheet shows, in sheet.order. It carries data-ui=\"filter-bar\" of its own, because the drawer renders outside the root."
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"part": "sheet-locked",
|
|
363
|
+
"element": "p",
|
|
364
|
+
"required": false,
|
|
365
|
+
"purpose": "Drawn over the rows when the tree is more than one rule per field joined by and: every row is then read-only, and Clear is the edit left."
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"part": "sheet-row",
|
|
369
|
+
"element": "button",
|
|
370
|
+
"required": false,
|
|
371
|
+
"purpose": "One field: its label, its value and a chevron, at --slotted-filter-bar-sheet-row-height. Opens the field’s list or screen over the sheet. A row the sheet cannot write is a div with data-readonly that opens nothing."
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"part": "sheet-label",
|
|
375
|
+
"element": "span",
|
|
376
|
+
"required": false,
|
|
377
|
+
"purpose": "The field’s label, never cut, trimmed to its capitals so it centres on the chevron in any face."
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"part": "sheet-value",
|
|
381
|
+
"element": "span",
|
|
382
|
+
"required": false,
|
|
383
|
+
"purpose": "What the field holds, at the end of the row: the anyValue word while empty, the option labels, a range, or sheet.format. data-set while the field holds a condition. A long value ends with an ellipsis."
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"part": "sheet-mark",
|
|
387
|
+
"element": "span",
|
|
388
|
+
"required": false,
|
|
389
|
+
"purpose": "The chevron, in a column every row keeps, so each value ends on the same line."
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"part": "sheet-clear",
|
|
393
|
+
"element": "button",
|
|
394
|
+
"required": false,
|
|
395
|
+
"purpose": "In the sheet’s header actions while a shown field holds a condition. Clears every field the sheet shows, with the reason clear, and keeps a hidden field’s rule and the query."
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"part": "sheet-actions",
|
|
399
|
+
"element": "div",
|
|
400
|
+
"required": false,
|
|
401
|
+
"purpose": "The sheet’s footer: sheet-more over sheet-show, each at its full width."
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"part": "sheet-more",
|
|
405
|
+
"element": "button",
|
|
406
|
+
"required": false,
|
|
407
|
+
"purpose": "More options: the builder on the sheet’s tree, under presentation=\"auto\", on a fine pointer or for a tree the sheet cannot write."
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"part": "sheet-show",
|
|
411
|
+
"element": "button",
|
|
412
|
+
"required": false,
|
|
413
|
+
"purpose": "The primary action, sheetShow or sheetShowCount while count is given and the bar is not loading. Closes the sheet with the reason submit, and applies the draft under apply=\"manual\"."
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"part": "sheet-list",
|
|
417
|
+
"element": "div",
|
|
418
|
+
"required": false,
|
|
419
|
+
"purpose": "The list of a set field, in a full-height drawer over the sheet whose header starts with a way back."
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"part": "sheet-search",
|
|
423
|
+
"element": "div",
|
|
424
|
+
"required": false,
|
|
425
|
+
"purpose": "The list’s search, a wrapped text-field that takes no focus when the list opens. It compares the label and searchText."
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"part": "sheet-options",
|
|
429
|
+
"element": "div",
|
|
430
|
+
"required": false,
|
|
431
|
+
"purpose": "The options, role=\"radiogroup\" for multiple: false and role=\"group\" otherwise: the all option first, then the options under their group headings."
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"part": "sheet-group",
|
|
435
|
+
"element": "div",
|
|
436
|
+
"required": false,
|
|
437
|
+
"purpose": "A group heading, at --slotted-filter-bar-sheet-group-height, from groupLabels or the group key."
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"part": "sheet-option",
|
|
441
|
+
"element": "button",
|
|
442
|
+
"required": false,
|
|
443
|
+
"purpose": "One option, role=\"radio\" or role=\"checkbox\" with aria-checked, at --slotted-filter-bar-sheet-option-height whatever is chosen."
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"part": "sheet-option-label",
|
|
447
|
+
"element": "span",
|
|
448
|
+
"required": false,
|
|
449
|
+
"purpose": "The option’s label, cut with an ellipsis when long."
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"part": "sheet-option-context",
|
|
453
|
+
"element": "span",
|
|
454
|
+
"required": false,
|
|
455
|
+
"purpose": "The option’s context, muted, at the end."
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"part": "sheet-option-check",
|
|
459
|
+
"element": "span",
|
|
460
|
+
"required": false,
|
|
461
|
+
"purpose": "The check of a chosen option, in a column every option keeps."
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"part": "sheet-placeholder",
|
|
465
|
+
"element": "div",
|
|
466
|
+
"required": false,
|
|
467
|
+
"purpose": "One of seven option-shaped placeholders while the field’s status is loading."
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"part": "sheet-notice",
|
|
471
|
+
"element": "div",
|
|
472
|
+
"required": false,
|
|
473
|
+
"purpose": "In place of the options: loadFailed with Try again while the status is error, or noMatch with Clear search."
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"part": "sheet-editor",
|
|
477
|
+
"element": "div",
|
|
478
|
+
"required": false,
|
|
479
|
+
"purpose": "A field’s screen for any operator but a set’s, in a drawer at its content’s height: sheet-range, one control, or the field’s own editor."
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"part": "sheet-range",
|
|
483
|
+
"element": "div",
|
|
484
|
+
"required": false,
|
|
485
|
+
"purpose": "From and To side by side at equal width, each a field with its label above; the error under To while To is below From."
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"part": "sheet-remove",
|
|
489
|
+
"element": "button",
|
|
490
|
+
"required": false,
|
|
491
|
+
"purpose": "Removes the field’s rule, with the reason remove. Drawn while the field holds a condition."
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"part": "sheet-apply",
|
|
495
|
+
"element": "button",
|
|
496
|
+
"required": false,
|
|
497
|
+
"purpose": "Writes the screen’s rule, with the reason submit. Refused while To is below From, or a range of days lacks an end."
|
|
320
498
|
}
|
|
321
499
|
],
|
|
322
500
|
"api": [
|
|
@@ -325,7 +503,7 @@
|
|
|
325
503
|
"type": "FilterBarField[]",
|
|
326
504
|
"defaultValue": "—",
|
|
327
505
|
"appliesTo": "FilterBar",
|
|
328
|
-
"description": "The filterable fields: key, label, kind, icon (glyph name or node), operators, pinned, required, defaultValue, section, options,
|
|
506
|
+
"description": "The filterable fields: key, label, kind, icon (glyph name or node), operators, pinned, required, defaultValue, section, searchable, options (value, label, group, context, searchText), multiple, sheet (hidden, order, operator, format, editor), status and onRetry"
|
|
329
507
|
},
|
|
330
508
|
{
|
|
331
509
|
"name": "value",
|
|
@@ -411,6 +589,20 @@
|
|
|
411
589
|
"appliesTo": "FilterBar",
|
|
412
590
|
"description": "Requests on every edit, or edits a draft until Apply"
|
|
413
591
|
},
|
|
592
|
+
{
|
|
593
|
+
"name": "presentation",
|
|
594
|
+
"type": "'builder' | 'sheet' | 'auto'",
|
|
595
|
+
"defaultValue": "auto",
|
|
596
|
+
"appliesTo": "FilterBar",
|
|
597
|
+
"description": "The builder, a sheet of one row per field, or the sheet below 36rem of viewport and the builder above"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "chips",
|
|
601
|
+
"type": "'inline' | 'none' | 'auto'",
|
|
602
|
+
"defaultValue": "auto",
|
|
603
|
+
"appliesTo": "FilterBar",
|
|
604
|
+
"description": "A chip per rule on the bar, none, or none under the sheet and inline under the builder"
|
|
605
|
+
},
|
|
414
606
|
{
|
|
415
607
|
"name": "sticky",
|
|
416
608
|
"type": "boolean",
|
|
@@ -430,7 +622,7 @@
|
|
|
430
622
|
"type": "'sm' | 'md' | 'lg'",
|
|
431
623
|
"defaultValue": "md",
|
|
432
624
|
"appliesTo": "FilterBar",
|
|
433
|
-
"description": "The step of the
|
|
625
|
+
"description": "The step of every control the bar draws: the search, the chips, the builder, the rule popover and their footers."
|
|
434
626
|
},
|
|
435
627
|
{
|
|
436
628
|
"name": "queryDelay",
|
|
@@ -479,7 +671,7 @@
|
|
|
479
671
|
"type": "number",
|
|
480
672
|
"defaultValue": "—",
|
|
481
673
|
"appliesTo": "FilterBar",
|
|
482
|
-
"description": "How many rows the filter kept"
|
|
674
|
+
"description": "How many rows the filter kept; the sheet’s primary action reads it"
|
|
483
675
|
},
|
|
484
676
|
{
|
|
485
677
|
"name": "total",
|
|
@@ -636,6 +828,9 @@
|
|
|
636
828
|
"--slotted-filter-bar-pill-border",
|
|
637
829
|
"--slotted-filter-bar-pill-radius",
|
|
638
830
|
"--slotted-filter-bar-search-max",
|
|
831
|
+
"--slotted-filter-bar-sheet-group-height",
|
|
832
|
+
"--slotted-filter-bar-sheet-option-height",
|
|
833
|
+
"--slotted-filter-bar-sheet-row-height",
|
|
639
834
|
"--slotted-filter-bar-surface",
|
|
640
835
|
"--slotted-filter-bar-value-max",
|
|
641
836
|
"--slotted-filter-bar-value-max-narrow",
|
|
@@ -643,6 +838,9 @@
|
|
|
643
838
|
"--slotted-focus-ring-offset",
|
|
644
839
|
"--slotted-focus-ring-width",
|
|
645
840
|
"--slotted-font-family-sans",
|
|
841
|
+
"--slotted-font-size-lg",
|
|
842
|
+
"--slotted-font-size-md",
|
|
843
|
+
"--slotted-font-size-sm",
|
|
646
844
|
"--slotted-font-size-xs",
|
|
647
845
|
"--slotted-font-weight-medium",
|
|
648
846
|
"--slotted-font-weight-regular",
|
|
@@ -656,12 +854,16 @@
|
|
|
656
854
|
"--slotted-space-3",
|
|
657
855
|
"--slotted-space-4",
|
|
658
856
|
"--slotted-space-5",
|
|
857
|
+
"--slotted-space-6",
|
|
858
|
+
"--slotted-space-7",
|
|
859
|
+
"--slotted-space-9",
|
|
659
860
|
"--slotted-surface",
|
|
660
861
|
"--slotted-surface-sunken",
|
|
661
862
|
"--slotted-target-comfortable",
|
|
662
863
|
"--slotted-target-min",
|
|
663
864
|
"--slotted-text",
|
|
664
865
|
"--slotted-text-muted",
|
|
866
|
+
"--slotted-tone-accent-text",
|
|
665
867
|
"--slotted-tone-danger-border",
|
|
666
868
|
"--slotted-tone-danger-text",
|
|
667
869
|
"--slotted-tone-secondary-subtle-active",
|
|
@@ -813,6 +1015,30 @@
|
|
|
813
1015
|
"source": "import { setFilter } from '@slotted/core/filter';\nimport type { FilterGroup } from '@slotted/core/filter';\nimport { FilterBar } from '@slotted/react/filter-bar';\nimport type { FilterBarField } from '@slotted/react/filter-bar';\n\nconst STATUSES = [\n { label: 'Paid', value: 'paid' },\n { label: 'Pending', value: 'pending' },\n { label: 'Overdue', value: 'overdue' },\n { label: 'Refunded', value: 'refunded' },\n];\n\nconst FIELDS: FilterBarField[] = [\n { icon: 'circle', key: 'status', kind: 'set', label: 'Status', options: STATUSES },\n { icon: 'person', key: 'customer', kind: 'text', label: 'Customer' },\n { key: 'amount', kind: 'number', label: 'Amount', min: 0 },\n { icon: 'calendar', key: 'due', kind: 'date', label: 'Due date' },\n { icon: 'star', key: 'priority', kind: 'boolean', label: 'Priority' },\n];\n\nconst VALUE: FilterGroup = {\n join: 'and',\n rules: [\n { field: 'status', filter: setFilter(['paid', 'refunded']) },\n {\n field: 'amount',\n filter: {\n kind: 'number',\n join: 'and',\n conditions: [{ operator: 'greaterThan', value: 1000 }],\n },\n },\n ],\n};\n\nexport default function FilterBarBasicExample() {\n return <FilterBar defaultValue={VALUE} fields={FIELDS} />;\n}\n",
|
|
814
1016
|
"verdict": "example"
|
|
815
1017
|
},
|
|
1018
|
+
{
|
|
1019
|
+
"id": "sheet-editor",
|
|
1020
|
+
"title": "sheet-editor.tsx",
|
|
1021
|
+
"note": null,
|
|
1022
|
+
"language": "tsx",
|
|
1023
|
+
"source": "import type { FilterDescriptor, FilterGroup } from '@slotted/core/filter';\nimport { FilterBar } from '@slotted/react/filter-bar';\nimport type { FilterBarField } from '@slotted/react/filter-bar';\nimport { Segment, SegmentedControl } from '@slotted/react/segmented-control';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\nimport { useState } from 'react';\n\n/** The day the invoices are read on. */\nconst TODAY = '2026-09-30';\n\nconst PERIODS = { month: '2026-09-01', quarter: '2026-07-01', week: '2026-09-24' } as const;\n\nconst DAY = new Intl.DateTimeFormat('en-US', { day: 'numeric', month: 'short', timeZone: 'UTC' });\n\nconst FIELDS: FilterBarField[] = [\n {\n key: 'issued',\n kind: 'date',\n label: 'Issued',\n sheet: {\n editor: ({ onValueChange, value }) => (\n <SegmentedControl\n aria-label=\"Issued\"\n onValueChange={(next) => onValueChange(issuedSince(next))}\n value={periodOf(value)}\n >\n <Segment value=\"week\">This week</Segment>\n <Segment value=\"month\">This month</Segment>\n <Segment value=\"quarter\">This quarter</Segment>\n </SegmentedControl>\n ),\n format: (value) => DAY.format(new Date(`${String(value)}T00:00:00Z`)),\n },\n },\n];\n\nexport default function FilterBarSheetEditorExample() {\n const [filter, setFilter] = useState<FilterGroup | null>(null);\n\n return (\n <Stack gap={4}>\n <FilterBar fields={FIELDS} onValueChange={setFilter} presentation=\"sheet\" value={filter} />\n\n <Text size=\"sm\" tone=\"muted\">\n {filter ? JSON.stringify(filter.rules[0]) : 'No period chosen'}\n </Text>\n </Stack>\n );\n}\n\nfunction issuedSince(period: string | undefined): FilterDescriptor | null {\n const from = PERIODS[period as keyof typeof PERIODS];\n\n return from\n ? { conditions: [{ end: TODAY, operator: 'between', value: from }], join: 'and', kind: 'date' }\n : null;\n}\n\nfunction periodOf(value: FilterDescriptor | null): string | undefined {\n const from = value?.conditions[0]?.value;\n\n return Object.keys(PERIODS).find((key) => PERIODS[key as keyof typeof PERIODS] === from);\n}\n",
|
|
1024
|
+
"verdict": "example"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"id": "sheet-status",
|
|
1028
|
+
"title": "sheet-status.tsx",
|
|
1029
|
+
"note": null,
|
|
1030
|
+
"language": "tsx",
|
|
1031
|
+
"source": "import type { FilterBarField, FilterBarFieldStatus } from '@slotted/react/filter-bar';\nimport { FilterBar } from '@slotted/react/filter-bar';\nimport { useEffect, useState } from 'react';\n\nconst CARRIERS = [\n { label: 'DHL Express', value: 'dhl' },\n { label: 'FedEx Ground', value: 'fedex' },\n { label: 'UPS Standard', value: 'ups' },\n { label: 'USPS Priority', value: 'usps' },\n];\n\nexport default function FilterBarSheetStatusExample() {\n const [attempt, setAttempt] = useState(0);\n const [status, setStatus] = useState<FilterBarFieldStatus>('loading');\n\n /* The first request fails after a moment; Try again succeeds. */\n useEffect(() => {\n if (status !== 'loading') return;\n\n const timer = setTimeout(() => setStatus(attempt === 0 ? 'error' : 'ready'), 1200);\n\n return () => clearTimeout(timer);\n }, [attempt, status]);\n\n function handleRetry() {\n setAttempt((count) => count + 1);\n setStatus('loading');\n }\n\n const fields: FilterBarField[] = [\n {\n key: 'carrier',\n kind: 'set',\n label: 'Carrier',\n onRetry: handleRetry,\n options: status === 'ready' ? CARRIERS : [],\n status,\n },\n ];\n\n return <FilterBar fields={fields} presentation=\"sheet\" />;\n}\n",
|
|
1032
|
+
"verdict": "example"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"id": "sheet",
|
|
1036
|
+
"title": "sheet.tsx",
|
|
1037
|
+
"note": null,
|
|
1038
|
+
"language": "tsx",
|
|
1039
|
+
"source": "import { createFilterGroupPredicate } from '@slotted/core/filter';\nimport type { FilterGroup } from '@slotted/core/filter';\nimport { FilterBar } from '@slotted/react/filter-bar';\nimport type { FilterBarField } from '@slotted/react/filter-bar';\nimport { Stack } from '@slotted/react/stack';\nimport { Text } from '@slotted/react/typography';\nimport { useState } from 'react';\n\ninterface Invoice {\n amount: number;\n customer: string;\n id: string;\n status: string;\n}\n\nconst USD = new Intl.NumberFormat('en-US', { currency: 'USD', style: 'currency' });\n\nconst FIELDS: FilterBarField[] = [\n {\n key: 'customer',\n kind: 'set',\n label: 'Customer',\n multiple: false,\n options: [\n { context: 'Germany', group: 'Wholesale', label: 'Alfreds Futterkiste', value: 'alfreds' },\n { context: 'Austria', group: 'Wholesale', label: 'Ernst Handel', value: 'ernst' },\n { context: 'France', group: 'Retail', label: 'Bon app', value: 'bon-app' },\n { context: 'Sweden', group: 'Retail', label: 'Folk och fa HB', value: 'folk' },\n { context: 'United Kingdom', group: 'Retail', label: 'Island Trading', value: 'island' },\n ],\n },\n {\n key: 'status',\n kind: 'set',\n label: 'Status',\n options: [\n { label: 'Paid', value: 'paid' },\n { label: 'Pending', value: 'pending' },\n { label: 'Overdue', value: 'overdue' },\n { label: 'Refunded', value: 'refunded' },\n ],\n },\n {\n key: 'amount',\n kind: 'number',\n label: 'Amount',\n min: 0,\n sheet: { format: (value) => USD.format(Number(value)) },\n },\n];\n\nconst INVOICES: Invoice[] = [\n { amount: 1240, customer: 'alfreds', id: 'INV-2041', status: 'paid' },\n { amount: 860.5, customer: 'bon-app', id: 'INV-2042', status: 'pending' },\n { amount: 3410.25, customer: 'ernst', id: 'INV-2043', status: 'overdue' },\n { amount: 512, customer: 'folk', id: 'INV-2044', status: 'refunded' },\n { amount: 2088.9, customer: 'island', id: 'INV-2045', status: 'paid' },\n { amount: 975, customer: 'ernst', id: 'INV-2046', status: 'pending' },\n];\n\nconst read = (row: Invoice, field: string): unknown => row[field as keyof Invoice];\n\nexport default function FilterBarSheetExample() {\n const [filter, setFilter] = useState<FilterGroup | null>(null);\n\n const keep = createFilterGroupPredicate(filter, read);\n const kept = INVOICES.filter((row) => keep(row));\n\n return (\n <Stack gap={4}>\n <FilterBar\n count={kept.length}\n fields={FIELDS}\n onValueChange={setFilter}\n presentation=\"sheet\"\n value={filter}\n />\n\n <Stack gap={2}>\n {kept.map((row) => (\n <Text key={row.id} size=\"sm\">\n {row.id} - {USD.format(row.amount)} - {row.status}\n </Text>\n ))}\n </Stack>\n </Stack>\n );\n}\n",
|
|
1040
|
+
"verdict": "example"
|
|
1041
|
+
},
|
|
816
1042
|
{
|
|
817
1043
|
"id": "sizes",
|
|
818
1044
|
"title": "sizes.tsx",
|