@kerfjs/ui 5.0.0-beta.95 → 5.0.0-beta.96
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/README.md +95 -55
- package/ai/component-catalog.json +1328 -94
- package/ai/component-composition-rules.json +11 -0
- package/ai/component-composition.d.ts +3 -0
- package/ai/component-composition.json +955 -23
- package/ai/component-composition.schema.json +4 -0
- package/ai/components/README.md +12 -0
- package/ai/components/badge.md +6 -2
- package/ai/components/choice-chips.md +80 -0
- package/ai/components/column-track.md +78 -0
- package/ai/components/combobox.md +88 -0
- package/ai/components/content-item.md +2 -0
- package/ai/components/content-swap.md +78 -0
- package/ai/components/corner-status.md +88 -0
- package/ai/components/document-baseline.md +3 -1
- package/ai/components/edge-activity-indicator.md +81 -0
- package/ai/components/file-picker.md +88 -0
- package/ai/components/foundation.md +1 -1
- package/ai/components/framed-list.md +80 -0
- package/ai/components/grid.md +2 -1
- package/ai/components/icon-button.md +82 -0
- package/ai/components/icon-toggle-button.md +80 -0
- package/ai/components/list-action-row.md +19 -7
- package/ai/components/list-item.md +16 -7
- package/ai/components/list.md +5 -2
- package/ai/components/nav-stack.md +2 -1
- package/ai/components/popup-menu.md +2 -2
- package/ai/components/row.md +1 -1
- package/ai/components/select.md +2 -1
- package/ai/components/split-button.md +80 -0
- package/ai/components/split-view.md +1 -1
- package/ai/components/state-banner.md +4 -2
- package/ai/components/summary-row.md +85 -0
- package/ai/components/sunken-panel.md +1 -1
- package/ai/components/surface-scaffold.md +8 -2
- package/ai/components/text.md +3 -0
- package/ai/components/toolbar-control-group.md +4 -2
- package/ai/components/toolbar-text.md +1 -0
- package/ai/components/toolbar.md +1 -0
- package/ai/components/value-table.md +9 -2
- package/ai/components/wa-button-group.md +2 -1
- package/ai/components/wa-button.md +5 -1
- package/ai/public-api-signatures-v1.md +1063 -52
- package/ai/skill.md +54 -52
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/anchored-surface.d.ts +13 -2
- package/dist/anchored-surface.js +1 -1
- package/dist/app-tab.js +1 -1
- package/dist/badge.d.ts +31 -2
- package/dist/badge.js +2 -1
- package/dist/browser/choice-chips.js +3 -0
- package/dist/browser/column-track.js +3 -0
- package/dist/browser/combobox.js +3 -0
- package/dist/browser/content-swap.js +3 -0
- package/dist/browser/corner-status.js +3 -0
- package/dist/browser/edge-activity-indicator.js +3 -0
- package/dist/browser/file-picker.js +3 -0
- package/dist/browser/framed-list.js +3 -0
- package/dist/browser/icon-button.js +4 -0
- package/dist/browser/icon-toggle-button.js +4 -0
- package/dist/browser/list-action-row.js +1 -0
- package/dist/browser/split-button.js +5 -0
- package/dist/browser/summary-row.js +3 -0
- package/dist/catalog-resources.d.ts +1 -0
- package/dist/catalog.d.ts +1 -0
- package/dist/catalog.js +16 -13
- package/dist/catalog.js.map +1 -1
- package/dist/chip.d.ts +1 -0
- package/dist/choice-chips.d.ts +58 -0
- package/dist/choice-chips.js +3 -0
- package/dist/choice-chips.js.map +1 -0
- package/dist/chunk-2MSPNRWJ.js +82 -0
- package/dist/chunk-2MSPNRWJ.js.map +1 -0
- package/dist/{chunk-3PO7JEK7.js → chunk-36TL6BCR.js} +18 -4
- package/dist/chunk-36TL6BCR.js.map +1 -0
- package/dist/{chunk-MORVLMDG.js → chunk-44A6LP54.js} +3 -3
- package/dist/chunk-44A6LP54.js.map +1 -0
- package/dist/{chunk-7QQ3HE47.js → chunk-4LOK4634.js} +7 -3
- package/dist/chunk-4LOK4634.js.map +1 -0
- package/dist/chunk-4UB5Z3ZZ.js +68 -0
- package/dist/chunk-4UB5Z3ZZ.js.map +1 -0
- package/dist/{chunk-PGL6TXFW.js → chunk-6BRRUPJY.js} +6 -2
- package/dist/chunk-6BRRUPJY.js.map +1 -0
- package/dist/{chunk-KAJVVN7Q.js → chunk-6NOLL5KG.js} +2 -2
- package/dist/{chunk-KAJVVN7Q.js.map → chunk-6NOLL5KG.js.map} +1 -1
- package/dist/{chunk-IOS2NXW7.js → chunk-76PWEN5Y.js} +13 -2
- package/dist/chunk-76PWEN5Y.js.map +1 -0
- package/dist/{chunk-B3TROLC2.js → chunk-7IUEBNCO.js} +7 -3
- package/dist/chunk-7IUEBNCO.js.map +1 -0
- package/dist/{chunk-75YOTZ25.js → chunk-AYHC62OZ.js} +10 -6
- package/dist/chunk-AYHC62OZ.js.map +1 -0
- package/dist/{chunk-RZYQFGMM.js → chunk-BBU2SPRE.js} +4 -4
- package/dist/{chunk-RZYQFGMM.js.map → chunk-BBU2SPRE.js.map} +1 -1
- package/dist/{chunk-QCLLBMLA.js → chunk-BU23Z5HZ.js} +37 -12
- package/dist/chunk-BU23Z5HZ.js.map +1 -0
- package/dist/{chunk-BYHGRKC3.js → chunk-CMLPFIC5.js} +3 -1
- package/dist/chunk-CMLPFIC5.js.map +1 -0
- package/dist/{chunk-3XPGJUUQ.js → chunk-D5RGM3XA.js} +3 -2
- package/dist/chunk-D5RGM3XA.js.map +1 -0
- package/dist/chunk-EIET4QLK.js +51 -0
- package/dist/chunk-EIET4QLK.js.map +1 -0
- package/dist/chunk-ETCWQLJV.js +85 -0
- package/dist/chunk-ETCWQLJV.js.map +1 -0
- package/dist/chunk-FDZNYD4C.js +138 -0
- package/dist/chunk-FDZNYD4C.js.map +1 -0
- package/dist/{chunk-XKZPBRU7.js → chunk-FOQK4F3L.js} +25 -5
- package/dist/chunk-FOQK4F3L.js.map +1 -0
- package/dist/{chunk-FL6J644M.js → chunk-GJYQ27C2.js} +4 -2
- package/dist/chunk-GJYQ27C2.js.map +1 -0
- package/dist/{chunk-DL55BSQX.js → chunk-GZE2XVKC.js} +8 -1
- package/dist/chunk-GZE2XVKC.js.map +1 -0
- package/dist/{chunk-YP2G67S7.js → chunk-HO6FU3G7.js} +2 -2
- package/dist/{chunk-YP2G67S7.js.map → chunk-HO6FU3G7.js.map} +1 -1
- package/dist/{chunk-3DXHNLME.js → chunk-IGTWXPTN.js} +25 -8
- package/dist/chunk-IGTWXPTN.js.map +1 -0
- package/dist/chunk-IKS72C6P.js +53 -0
- package/dist/chunk-IKS72C6P.js.map +1 -0
- package/dist/chunk-JYD7G4RG.js +130 -0
- package/dist/chunk-JYD7G4RG.js.map +1 -0
- package/dist/{chunk-LAZLBC2Q.js → chunk-KH4KEMSP.js} +33 -2
- package/dist/chunk-KH4KEMSP.js.map +1 -0
- package/dist/chunk-LL45C7BB.js +122 -0
- package/dist/chunk-LL45C7BB.js.map +1 -0
- package/dist/chunk-M2NRCFRO.js +45 -0
- package/dist/chunk-M2NRCFRO.js.map +1 -0
- package/dist/chunk-MJ5RU6XT.js +173 -0
- package/dist/chunk-MJ5RU6XT.js.map +1 -0
- package/dist/{chunk-GIUOXAVL.js → chunk-P74VXMB6.js} +39 -19
- package/dist/chunk-P74VXMB6.js.map +1 -0
- package/dist/{chunk-TKDDTLG5.js → chunk-PBT3CPPY.js} +31 -3
- package/dist/chunk-PBT3CPPY.js.map +1 -0
- package/dist/chunk-PRG4CL3Q.js +88 -0
- package/dist/chunk-PRG4CL3Q.js.map +1 -0
- package/dist/chunk-QH5KOFNS.js +39 -0
- package/dist/chunk-QH5KOFNS.js.map +1 -0
- package/dist/{chunk-CD5TOO22.js → chunk-QIAPOWHH.js} +2 -2
- package/dist/{chunk-CD5TOO22.js.map → chunk-QIAPOWHH.js.map} +1 -1
- package/dist/chunk-QQ3TTWFH.js +29 -0
- package/dist/chunk-QQ3TTWFH.js.map +1 -0
- package/dist/chunk-QYMJHS4K.js +36 -0
- package/dist/chunk-QYMJHS4K.js.map +1 -0
- package/dist/chunk-R42D2BAO.js +44 -0
- package/dist/chunk-R42D2BAO.js.map +1 -0
- package/dist/chunk-S2XULQEK.js +52 -0
- package/dist/chunk-S2XULQEK.js.map +1 -0
- package/dist/{chunk-NMWDHZVM.js → chunk-S4Y3YTAI.js} +2 -2
- package/dist/{chunk-NMWDHZVM.js.map → chunk-S4Y3YTAI.js.map} +1 -1
- package/dist/{chunk-O27D24CA.js → chunk-TDMHA7C3.js} +3 -2
- package/dist/chunk-TDMHA7C3.js.map +1 -0
- package/dist/chunk-U6QYTMDB.js +85 -0
- package/dist/chunk-U6QYTMDB.js.map +1 -0
- package/dist/{chunk-QQICWWNX.js → chunk-V6W56V3N.js} +18 -7
- package/dist/chunk-V6W56V3N.js.map +1 -0
- package/dist/chunk-W4IK7AWD.js +73 -0
- package/dist/chunk-W4IK7AWD.js.map +1 -0
- package/dist/{chunk-TNG3XKHB.js → chunk-Y3LC7JQO.js} +26 -8
- package/dist/chunk-Y3LC7JQO.js.map +1 -0
- package/dist/chunk-YWQGSUF2.js +84 -0
- package/dist/chunk-YWQGSUF2.js.map +1 -0
- package/dist/{chunk-MTCTX25G.js → chunk-YXOMI7ES.js} +1 -1
- package/dist/chunk-YXOMI7ES.js.map +1 -0
- package/dist/chunk-ZKKO4MHC.js +25 -0
- package/dist/chunk-ZKKO4MHC.js.map +1 -0
- package/dist/collapsible-panel.d.ts +10 -3
- package/dist/collapsible-panel.js +8 -5
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/column-track.d.ts +41 -0
- package/dist/column-track.js +4 -0
- package/dist/column-track.js.map +1 -0
- package/dist/combobox.d.ts +40 -0
- package/dist/combobox.js +3 -0
- package/dist/combobox.js.map +1 -0
- package/dist/content-item.d.ts +21 -4
- package/dist/content-item.js +1 -1
- package/dist/content-swap.d.ts +34 -0
- package/dist/content-swap.js +3 -0
- package/dist/content-swap.js.map +1 -0
- package/dist/corner-status.d.ts +36 -0
- package/dist/corner-status.js +3 -0
- package/dist/corner-status.js.map +1 -0
- package/dist/edge-activity-indicator.d.ts +28 -0
- package/dist/edge-activity-indicator.js +3 -0
- package/dist/edge-activity-indicator.js.map +1 -0
- package/dist/extension-attributes-mu8MFUl0.d.ts +13 -0
- package/dist/file-picker.d.ts +47 -0
- package/dist/file-picker.js +3 -0
- package/dist/file-picker.js.map +1 -0
- package/dist/framed-list.d.ts +47 -0
- package/dist/framed-list.js +4 -0
- package/dist/framed-list.js.map +1 -0
- package/dist/grid.js +1 -1
- package/dist/help-tags-register.js +1 -1
- package/dist/icon-button.d.ts +46 -0
- package/dist/icon-button.js +6 -0
- package/dist/icon-button.js.map +1 -0
- package/dist/icon-toggle-button.d.ts +42 -0
- package/dist/icon-toggle-button.js +6 -0
- package/dist/icon-toggle-button.js.map +1 -0
- package/dist/index.d.ts +23 -6
- package/dist/index.js +44 -27
- package/dist/list-action-row.d.ts +47 -10
- package/dist/list-action-row.js +2 -1
- package/dist/list-header.js +1 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.d.ts +10 -2
- package/dist/list-item.js +1 -1
- package/dist/list.d.ts +37 -5
- package/dist/list.js +1 -1
- package/dist/nav-stack.d.ts +1 -0
- package/dist/nav-stack.js +2 -1
- package/dist/pane.js +2 -1
- package/dist/popup-menu-register.js +18 -1
- package/dist/popup-menu-register.js.map +1 -1
- package/dist/popup-menu.d.ts +28 -3
- package/dist/popup-menu.js +1 -1
- package/dist/row.d.ts +6 -2
- package/dist/row.js +1 -1
- package/dist/select-register.js +1 -1
- package/dist/select.js +2 -1
- package/dist/split-button.d.ts +57 -0
- package/dist/split-button.js +7 -0
- package/dist/split-button.js.map +1 -0
- package/dist/split-view.d.ts +20 -2
- package/dist/split-view.js +22 -1
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +17 -2
- package/dist/state-banner.js +2 -1
- package/dist/styles/badge.css +27 -0
- package/dist/styles/catalog/components/catalog-example.css +7 -3
- package/dist/styles/choice-chips.css +154 -0
- package/dist/styles/column-track.css +57 -0
- package/dist/styles/combobox.css +113 -0
- package/dist/styles/components/actions/icon-button/icon-button.css +22 -0
- package/dist/styles/components/actions/icon-toggle-button/icon-toggle-button.css +83 -0
- package/dist/styles/components/actions/popup-menu/popup-menu.css +69 -1
- package/dist/styles/components/actions/split-button/split-button.css +95 -0
- package/dist/styles/components/actions/toolbar/toolbar.css +16 -9
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +144 -48
- package/dist/styles/components/actions/toolbar-text/toolbar-text.css +23 -0
- package/dist/styles/components/collections/framed-list/framed-list.css +47 -0
- package/dist/styles/components/collections/list/list.css +44 -0
- package/dist/styles/components/collections/list-action-row/list-action-row.css +39 -0
- package/dist/styles/components/collections/list-item/list-item.css +45 -0
- package/dist/styles/components/collections/summary-row/summary-row.css +161 -0
- package/dist/styles/components/data-display/value-table/value-table.css +76 -0
- package/dist/styles/components/feedback/badge/badge.css +27 -0
- package/dist/styles/components/feedback/corner-status/corner-status.css +60 -0
- package/dist/styles/components/feedback/edge-activity-indicator/edge-activity-indicator.css +127 -0
- package/dist/styles/components/feedback/state-banner/state-banner.css +38 -0
- package/dist/styles/components/forms/choice-chips/choice-chips.css +154 -0
- package/dist/styles/components/forms/combobox/combobox.css +113 -0
- package/dist/styles/components/forms/file-picker/file-picker.css +81 -0
- package/dist/styles/components/forms/token-search-field/token-search-field.css +12 -1
- package/dist/styles/components/layout/column-track/column-track.css +57 -0
- package/dist/styles/components/layout/content-swap/content-swap.css +154 -0
- package/dist/styles/components/layout/pane/pane.css +2 -8
- package/dist/styles/components/layout/workbench/workbench.css +2 -8
- package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +1 -4
- package/dist/styles/components/surfaces/content-item/content-item.css +18 -0
- package/dist/styles/components/surfaces/sunken-panel/sunken-panel.css +1 -4
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +119 -0
- package/dist/styles/components/typography/text/text.css +62 -0
- package/dist/styles/content-item.css +18 -0
- package/dist/styles/content-swap.css +154 -0
- package/dist/styles/corner-status.css +60 -0
- package/dist/styles/document.css +65 -0
- package/dist/styles/edge-activity-indicator.css +127 -0
- package/dist/styles/file-picker.css +81 -0
- package/dist/styles/foundation.css +8 -0
- package/dist/styles/framed-list.css +47 -0
- package/dist/styles/icon-button.css +22 -0
- package/dist/styles/icon-toggle-button.css +83 -0
- package/dist/styles/list-action-row.css +39 -0
- package/dist/styles/list-item.css +45 -0
- package/dist/styles/list.css +44 -0
- package/dist/styles/pane.css +2 -8
- package/dist/styles/popup-menu.css +69 -1
- package/dist/styles/split-button.css +95 -0
- package/dist/styles/state-banner.css +38 -0
- package/dist/styles/styles.css +12 -0
- package/dist/styles/summary-row.css +161 -0
- package/dist/styles/sunken-panel.css +1 -4
- package/dist/styles/surface-scaffold.css +119 -0
- package/dist/styles/tab-navigator.css +1 -4
- package/dist/styles/text.css +62 -0
- package/dist/styles/token-search-field.css +12 -1
- package/dist/styles/toolbar-control-group.css +144 -48
- package/dist/styles/toolbar-text.css +23 -0
- package/dist/styles/toolbar.css +16 -9
- package/dist/styles/value-table.css +76 -0
- package/dist/styles/webawesome.css +4 -4
- package/dist/styles/workbench.css +2 -8
- package/dist/summary-row.d.ts +56 -0
- package/dist/summary-row.js +4 -0
- package/dist/summary-row.js.map +1 -0
- package/dist/sunken-panel.d.ts +8 -1
- package/dist/sunken-panel.js +2 -1
- package/dist/surface-scaffold-register.js +7 -1
- package/dist/surface-scaffold-register.js.map +1 -1
- package/dist/surface-scaffold.d.ts +75 -2
- package/dist/surface-scaffold.js +2 -1
- package/dist/tab-navigator.js +4 -1
- package/dist/tab-navigator.js.map +1 -1
- package/dist/text.d.ts +39 -4
- package/dist/text.js +1 -1
- package/dist/toolbar-control-group.d.ts +8 -1
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +14 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +14 -3
- package/dist/toolbar.js +1 -1
- package/dist/value-table.d.ts +20 -2
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +1 -0
- package/dist/wire-comboboxes.d.ts +26 -0
- package/dist/wire-comboboxes.js +3 -0
- package/dist/wire-comboboxes.js.map +1 -0
- package/dist/wire-corner-status.d.ts +11 -0
- package/dist/wire-corner-status.js +3 -0
- package/dist/wire-corner-status.js.map +1 -0
- package/dist/wire-file-pickers.d.ts +26 -0
- package/dist/wire-file-pickers.js +3 -0
- package/dist/wire-file-pickers.js.map +1 -0
- package/dist/wire-list-reorder.d.ts +41 -0
- package/dist/wire-list-reorder.js +3 -0
- package/dist/wire-list-reorder.js.map +1 -0
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.d.ts +1 -0
- package/dist/workbench.js +2 -1
- package/docs/accessibility.md +45 -2
- package/docs/anchored-surface.md +15 -7
- package/docs/app-layouts.md +2 -1
- package/docs/component-contract.md +26 -6
- package/docs/component-selection.md +149 -13
- package/docs/design/templates/choice-chips/color-palette-dark.svg +1 -0
- package/docs/design/templates/choice-chips/color-palette.svg +1 -0
- package/docs/design/templates/choice-chips/compact-icons-dark.svg +1 -0
- package/docs/design/templates/choice-chips/compact-icons.svg +1 -0
- package/docs/design/templates/choice-chips-dark.svg +1 -0
- package/docs/design/templates/choice-chips.svg +1 -0
- package/docs/design/templates/list-action-row/trailing-menu-dark.svg +1 -0
- package/docs/design/templates/list-action-row/trailing-menu.svg +1 -0
- package/docs/design/templates/list-action-row-dark.svg +1 -1
- package/docs/design/templates/list-action-row.svg +1 -1
- package/docs/design/templates/state-banner/strip-dark.svg +1 -0
- package/docs/design/templates/state-banner/strip.svg +1 -0
- package/docs/design/templates/state-banner-dark.svg +1 -1
- package/docs/design/templates/state-banner.svg +1 -1
- package/docs/design/templates.md +1 -1
- package/docs/document-baseline.md +51 -0
- package/docs/layout.md +52 -1
- package/docs/split-view.md +20 -2
- package/docs/sunken-panel.md +13 -0
- package/docs/surface-scaffold.md +66 -1
- package/docs/ux-demo.md +1 -0
- package/docs/webawesome-theme.md +6 -2
- package/llms.txt +125 -16
- package/package.json +89 -1
- package/dist/chunk-3DXHNLME.js.map +0 -1
- package/dist/chunk-3PO7JEK7.js.map +0 -1
- package/dist/chunk-3XPGJUUQ.js.map +0 -1
- package/dist/chunk-4Y4L5YEI.js +0 -66
- package/dist/chunk-4Y4L5YEI.js.map +0 -1
- package/dist/chunk-75YOTZ25.js.map +0 -1
- package/dist/chunk-7QQ3HE47.js.map +0 -1
- package/dist/chunk-A7DYEERU.js +0 -59
- package/dist/chunk-A7DYEERU.js.map +0 -1
- package/dist/chunk-B3TROLC2.js.map +0 -1
- package/dist/chunk-BYHGRKC3.js.map +0 -1
- package/dist/chunk-DL55BSQX.js.map +0 -1
- package/dist/chunk-FL6J644M.js.map +0 -1
- package/dist/chunk-GIUOXAVL.js.map +0 -1
- package/dist/chunk-IOS2NXW7.js.map +0 -1
- package/dist/chunk-J3AWE5I4.js +0 -50
- package/dist/chunk-J3AWE5I4.js.map +0 -1
- package/dist/chunk-LAZLBC2Q.js.map +0 -1
- package/dist/chunk-MORVLMDG.js.map +0 -1
- package/dist/chunk-MTCTX25G.js.map +0 -1
- package/dist/chunk-O27D24CA.js.map +0 -1
- package/dist/chunk-PGL6TXFW.js.map +0 -1
- package/dist/chunk-QCLLBMLA.js.map +0 -1
- package/dist/chunk-QQICWWNX.js.map +0 -1
- package/dist/chunk-TKDDTLG5.js.map +0 -1
- package/dist/chunk-TNG3XKHB.js.map +0 -1
- package/dist/chunk-XKZPBRU7.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Public API signatures for the UI authoring corpus
|
|
2
2
|
|
|
3
|
-
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.
|
|
3
|
+
Generated from emitted declarations for `@kerfjs/ui@5.0.0-beta.96` and `kerfjs@5.0.0-beta.96`. This bounded reference covers only APIs used by the seven-task corpus. It is interface evidence, not an implementation or runtime guarantee.
|
|
4
4
|
|
|
5
5
|
## `@kerfjs/ui/css-values`
|
|
6
6
|
|
|
@@ -159,6 +159,8 @@ import { S as Sides } from './sides-BPSWde0A.js';
|
|
|
159
159
|
import { PaneSeparatorSide } from './pane.js';
|
|
160
160
|
|
|
161
161
|
type ToolbarPosition = 'header' | 'footer';
|
|
162
|
+
/** Control-band density: `default` (60px with 44px groups) or `compact`. */
|
|
163
|
+
type ToolbarDensity = 'default' | 'compact';
|
|
162
164
|
interface ToolbarProps {
|
|
163
165
|
leading?: KerfUiContent;
|
|
164
166
|
center?: KerfUiContent;
|
|
@@ -166,6 +168,15 @@ interface ToolbarProps {
|
|
|
166
168
|
label?: string;
|
|
167
169
|
/** Use footer semantics for a bottom toolbar; defaults to header. */
|
|
168
170
|
position?: ToolbarPosition;
|
|
171
|
+
/**
|
|
172
|
+
* `compact` sizes the toolbar to a 34px control band with 3px block
|
|
173
|
+
* insets — 40px tall — for a header embedded in a panel or card. Fill it
|
|
174
|
+
* with `ToolbarControlGroup size="compact"` groups; inline insets and the
|
|
175
|
+
* gap between zones are unchanged. Composites that render a Toolbar from a
|
|
176
|
+
* `ToolbarConfig` (Workbench, CollapsiblePanel, NavStack, SplitView) forward
|
|
177
|
+
* it and size the groups they compose to match. Defaults to `default`.
|
|
178
|
+
*/
|
|
179
|
+
density?: ToolbarDensity;
|
|
169
180
|
/**
|
|
170
181
|
* Physical divider edges in canonical top/right/bottom/left order, drawn
|
|
171
182
|
* always. Defaults to none: a toolbar pinned over or under scrolling content
|
|
@@ -214,10 +225,10 @@ interface ToolbarProps {
|
|
|
214
225
|
* that renders a `Toolbar` for the app (a Workbench or CollapsiblePanel
|
|
215
226
|
* toolbar) forwards, so the app configures that toolbar instead of styling it.
|
|
216
227
|
*/
|
|
217
|
-
type ToolbarConfig = Pick<ToolbarProps, 'dividerSides' | 'centerAlign' | 'responsive' | 'responsiveAt' | 'safeAreaEdges'>;
|
|
218
|
-
declare function Toolbar({ leading, center, trailing, label, position, dividerSides, centerAlign, responsive, responsiveAt, safeAreaEdges, className, slot, }: ToolbarProps): kerfjs.SafeHtml;
|
|
228
|
+
type ToolbarConfig = Pick<ToolbarProps, 'density' | 'dividerSides' | 'centerAlign' | 'responsive' | 'responsiveAt' | 'safeAreaEdges'>;
|
|
229
|
+
declare function Toolbar({ leading, center, trailing, label, position, density, dividerSides, centerAlign, responsive, responsiveAt, safeAreaEdges, className, slot, }: ToolbarProps): kerfjs.SafeHtml;
|
|
219
230
|
|
|
220
|
-
export { Sides, Toolbar, type ToolbarConfig, type ToolbarPosition, type ToolbarProps };
|
|
231
|
+
export { Sides, Toolbar, type ToolbarConfig, type ToolbarDensity, type ToolbarPosition, type ToolbarProps };
|
|
221
232
|
```
|
|
222
233
|
|
|
223
234
|
## `@kerfjs/ui/toolbar-text`
|
|
@@ -271,6 +282,17 @@ type ToolbarTextProps = ToolbarTextBaseProps & (({
|
|
|
271
282
|
headingLevel?: HeadingLevel;
|
|
272
283
|
/** Render an unanimated loading skeleton instead of the text. */
|
|
273
284
|
placeholder?: boolean;
|
|
285
|
+
/**
|
|
286
|
+
* Quiet, single-line supporting copy under the title ("Changes save
|
|
287
|
+
* automatically."), truncating with an ellipsis. Title and description
|
|
288
|
+
* share the toolbar's control band and the same text start, with or
|
|
289
|
+
* without a leading icon group. With a description, `id` and
|
|
290
|
+
* `headingLevel` apply to the title alone, so a dialog's
|
|
291
|
+
* `aria-labelledby` names only the title.
|
|
292
|
+
*/
|
|
293
|
+
description?: string;
|
|
294
|
+
/** Id for the description, for a dialog's `aria-describedby`. */
|
|
295
|
+
descriptionId?: string;
|
|
274
296
|
} & ToolbarTextWrappingProps) | {
|
|
275
297
|
/** Render a native button with this delegated action; the app owns editing. */
|
|
276
298
|
action: string;
|
|
@@ -278,8 +300,10 @@ type ToolbarTextProps = ToolbarTextBaseProps & (({
|
|
|
278
300
|
placeholder?: never;
|
|
279
301
|
wrap?: never;
|
|
280
302
|
maxLines?: never;
|
|
303
|
+
description?: never;
|
|
304
|
+
descriptionId?: never;
|
|
281
305
|
});
|
|
282
|
-
declare function ToolbarText({ text, size, tone, hideBelow, showBelow, className, id, headingLevel, placeholder, wrap, ellipsis, maxLines, fill, slot, action, }: ToolbarTextProps): kerfjs.SafeHtml;
|
|
306
|
+
declare function ToolbarText({ text, size, tone, hideBelow, showBelow, className, id, headingLevel, placeholder, wrap, ellipsis, maxLines, fill, slot, action, description, descriptionId, }: ToolbarTextProps): kerfjs.SafeHtml;
|
|
283
307
|
|
|
284
308
|
export { type HeadingLevel, ToolbarText, type ToolbarTextProps, type ToolbarTextSize, type ToolbarTextTone };
|
|
285
309
|
```
|
|
@@ -301,7 +325,7 @@ type ToolbarControlGroupSize = 'default' | 'compact';
|
|
|
301
325
|
type ToolbarControlGroupDensity = 'comfortable' | 'tight';
|
|
302
326
|
type ToolbarControlGroupContent = 'icon' | 'text' | 'mixed' | 'avatar' | 'search';
|
|
303
327
|
type ToolbarControlGroupFocusRing = 'control' | 'outline' | 'halo';
|
|
304
|
-
type ToolbarControlGroupSelectedChrome = 'raised' | 'filled' | 'outline';
|
|
328
|
+
type ToolbarControlGroupSelectedChrome = 'raised' | 'filled' | 'outline' | 'none';
|
|
305
329
|
type ToolbarControlGroupSelectedTone = 'brand' | 'neutral' | 'pop';
|
|
306
330
|
type ToolbarControlGroupOverflow = 'visible' | 'scroll' | 'wrap';
|
|
307
331
|
type ToolbarControlGroupExpandedOverflow = 'clip' | 'visible';
|
|
@@ -343,6 +367,13 @@ interface ToolbarControlGroupProps {
|
|
|
343
367
|
content?: ToolbarControlGroupContent;
|
|
344
368
|
/** Whether controls paint focus individually or the group paints an outline/halo on focus-within. */
|
|
345
369
|
focusRing?: ToolbarControlGroupFocusRing;
|
|
370
|
+
/**
|
|
371
|
+
* Chrome a pressed (`aria-pressed="true"`) control paints. `none` keeps a
|
|
372
|
+
* pressed control looking like its neighbors, for an icon-state toggle whose
|
|
373
|
+
* glyph already shows the state (an empty or filled star); hover and the
|
|
374
|
+
* focus ring are unchanged. One control can opt out alone with
|
|
375
|
+
* `data-selected-chrome="none"` on its own button.
|
|
376
|
+
*/
|
|
346
377
|
selectedChrome?: ToolbarControlGroupSelectedChrome;
|
|
347
378
|
selectedTone?: ToolbarControlGroupSelectedTone;
|
|
348
379
|
/** Size a nested Web Awesome dropdown trigger as part of this group. */
|
|
@@ -501,11 +532,23 @@ type PopupMenuTriggerName = {
|
|
|
501
532
|
*/
|
|
502
533
|
label: string;
|
|
503
534
|
};
|
|
535
|
+
/** A context PopupMenu's viewport anchor point. */
|
|
536
|
+
interface PopupMenuAnchor {
|
|
537
|
+
x: number;
|
|
538
|
+
y: number;
|
|
539
|
+
}
|
|
504
540
|
type PopupMenuTrigger = (PopupMenuTriggerName & {
|
|
505
541
|
context?: false;
|
|
542
|
+
anchor?: never;
|
|
506
543
|
}) | {
|
|
507
544
|
context: true;
|
|
508
545
|
label: string;
|
|
546
|
+
/**
|
|
547
|
+
* The viewport point (CSS pixels, as in `MouseEvent.clientX/Y`) the
|
|
548
|
+
* menu opens from. Rendered into the menu itself, so it survives
|
|
549
|
+
* re-renders and replacement; open it with `openPopupMenu`.
|
|
550
|
+
*/
|
|
551
|
+
anchor?: PopupMenuAnchor;
|
|
509
552
|
text?: never;
|
|
510
553
|
icon?: never;
|
|
511
554
|
caret?: never;
|
|
@@ -529,8 +572,21 @@ type PopupMenuProps = PopupMenuTrigger & {
|
|
|
529
572
|
type PopupMenuElement = HTMLElement & {
|
|
530
573
|
open: boolean;
|
|
531
574
|
};
|
|
532
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* Open a PopupMenu at viewport pointer coordinates. A `context` menu rendered
|
|
577
|
+
* without `anchor` moves its invisible anchor there (a menu rendered with
|
|
578
|
+
* `anchor` opens with `openPopupMenu` instead). A button-triggered menu (such as a `ListActionRow`
|
|
579
|
+
* trailing menu) anchors its popup at the point, opening `bottom-start` like a
|
|
580
|
+
* context menu, for this opening only; once the menu has closed it returns to
|
|
581
|
+
* its trigger and placement. Before Web Awesome upgrades it, the menu opens at
|
|
582
|
+
* its trigger.
|
|
583
|
+
*/
|
|
533
584
|
declare function openPopupMenuAt(menu: PopupMenuElement, x: number, y: number): void;
|
|
585
|
+
/**
|
|
586
|
+
* Open a context PopupMenu at the `anchor` it was rendered with (or the
|
|
587
|
+
* point a previous `openPopupMenuAt` set).
|
|
588
|
+
*/
|
|
589
|
+
declare function openPopupMenu(menu: PopupMenuElement): void;
|
|
534
590
|
/** Close a programmatically opened PopupMenu. */
|
|
535
591
|
declare function closePopupMenu(menu: PopupMenuElement): void;
|
|
536
592
|
/**
|
|
@@ -542,9 +598,9 @@ declare function closePopupMenu(menu: PopupMenuElement): void;
|
|
|
542
598
|
* the Web Awesome elements. At viewport widths up to 480px, submenus appear
|
|
543
599
|
* above or below their parent menu so their rows do not cover the parent list.
|
|
544
600
|
*/
|
|
545
|
-
declare function PopupMenu({ text, label, icon, items, placement, caret, disabled, rootAttributes, slot, context, }: PopupMenuProps): SafeHtml;
|
|
601
|
+
declare function PopupMenu({ text, label, icon, items, placement, caret, disabled, rootAttributes, slot, context, anchor, }: PopupMenuProps): SafeHtml;
|
|
546
602
|
|
|
547
|
-
export { PopupMenu, type PopupMenuDivider, type PopupMenuElement, type PopupMenuEntry, type PopupMenuHeading, type PopupMenuItem, type PopupMenuPlacement, type PopupMenuProps, closePopupMenu, openPopupMenuAt };
|
|
603
|
+
export { PopupMenu, type PopupMenuAnchor, type PopupMenuDivider, type PopupMenuElement, type PopupMenuEntry, type PopupMenuHeading, type PopupMenuItem, type PopupMenuPlacement, type PopupMenuProps, closePopupMenu, openPopupMenu, openPopupMenuAt };
|
|
548
604
|
```
|
|
549
605
|
|
|
550
606
|
## `@kerfjs/ui/list-header`
|
|
@@ -655,13 +711,14 @@ export { ListHeader, type ListHeaderProps };
|
|
|
655
711
|
```ts
|
|
656
712
|
import * as kerfjs from 'kerfjs';
|
|
657
713
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
714
|
+
import { S as StructuralRootAttributes } from './extension-attributes-mu8MFUl0.js';
|
|
658
715
|
import { H as HorizontalAlignment, L as ListVerticalAlignment } from './flex-alignment-4ms8ZbV8.js';
|
|
659
716
|
export { V as VerticalAlignment } from './flex-alignment-4ms8ZbV8.js';
|
|
660
717
|
import { S as Sides } from './sides-BPSWde0A.js';
|
|
661
718
|
import { UiGap, CssFlexKeyword, CssFlex } from './css-values.js';
|
|
662
719
|
export { CssLength, UiGapValue, UiSpaceName } from './css-values.js';
|
|
663
720
|
|
|
664
|
-
type ListRootAttributes =
|
|
721
|
+
type ListRootAttributes = StructuralRootAttributes & Readonly<{
|
|
665
722
|
'data-component'?: never;
|
|
666
723
|
'data-gap'?: never;
|
|
667
724
|
'data-flex'?: never;
|
|
@@ -669,9 +726,23 @@ type ListRootAttributes = Readonly<Record<`data-${string}`, string | undefined>
|
|
|
669
726
|
'data-h-align'?: never;
|
|
670
727
|
'data-v-align'?: never;
|
|
671
728
|
'data-scrollable'?: never;
|
|
729
|
+
'data-surface'?: never;
|
|
730
|
+
'data-inset'?: never;
|
|
672
731
|
'data-text-insets'?: never;
|
|
673
732
|
'data-control-insets'?: never;
|
|
674
733
|
}>;
|
|
734
|
+
/**
|
|
735
|
+
* A solid surface painted behind a List: `base` is the page surface
|
|
736
|
+
* (`--kui-color-surface`), `raised` the raised surface
|
|
737
|
+
* (`--kui-color-surface-raised`). A lowered region is a `SunkenPanel`.
|
|
738
|
+
*/
|
|
739
|
+
type ListSurface = 'base' | 'raised';
|
|
740
|
+
/**
|
|
741
|
+
* A preset inset on all four sides. `document` is the reading inset for long
|
|
742
|
+
* content such as a reader view: 24px block and 32px inline, narrowing to
|
|
743
|
+
* 16px inline below 576px. It replaces any `textInsets`/`controlInsets`.
|
|
744
|
+
*/
|
|
745
|
+
type ListInset = 'document';
|
|
675
746
|
interface ListProps {
|
|
676
747
|
children?: KerfUiContent;
|
|
677
748
|
/** Make this list a labeled multi-select grid for `ContentItem selectionMode="multiple"` rows. */
|
|
@@ -692,16 +763,33 @@ interface ListProps {
|
|
|
692
763
|
hAlign?: HorizontalAlignment;
|
|
693
764
|
/** Vertical distribution. Defaults to top. */
|
|
694
765
|
vAlign?: ListVerticalAlignment;
|
|
695
|
-
/**
|
|
766
|
+
/**
|
|
767
|
+
* Own vertical scrolling and overscroll containment. Children keep their
|
|
768
|
+
* natural height and scroll instead of shrinking. To bound the list by a
|
|
769
|
+
* `max-height` ancestor (no definite height), give that ancestor a flex
|
|
770
|
+
* column and use `flex`; `fill` needs a definite-height parent.
|
|
771
|
+
*/
|
|
696
772
|
scrollable?: boolean;
|
|
773
|
+
/**
|
|
774
|
+
* Paint a solid surface behind the stack, including its insets: for a strip
|
|
775
|
+
* of chrome (a banner above a sunken work area) that must not show the
|
|
776
|
+
* lowered tint around its content. Omitted, the List is transparent.
|
|
777
|
+
*/
|
|
778
|
+
surface?: ListSurface;
|
|
697
779
|
/** Physical divider edges in canonical top/right/bottom/left order. */
|
|
698
780
|
dividerSides?: Sides;
|
|
781
|
+
/** A preset four-sided inset; see `ListInset`. */
|
|
782
|
+
inset?: ListInset;
|
|
699
783
|
/** Physical sides that receive the standard 17px text inset. */
|
|
700
784
|
textInsets?: Sides;
|
|
701
785
|
/** Physical sides that receive the standard 8px control inset. Text insets win on overlap. */
|
|
702
786
|
controlInsets?: Sides;
|
|
703
787
|
className?: string;
|
|
704
|
-
/**
|
|
788
|
+
/**
|
|
789
|
+
* Safe `data-*`, `aria-*`, and structural `role` metadata (a named drop
|
|
790
|
+
* `region`, `aria-busy`); List-owned structural attributes remain
|
|
791
|
+
* protected, and a multi-select List owns its grid role and name.
|
|
792
|
+
*/
|
|
705
793
|
rootAttributes?: ListRootAttributes;
|
|
706
794
|
/** Native named-slot assignment when composed inside a web component. */
|
|
707
795
|
slot?: string;
|
|
@@ -714,15 +802,17 @@ interface ListProps {
|
|
|
714
802
|
*/
|
|
715
803
|
type ListConfig = Pick<ListProps, 'gap' | 'hAlign' | 'vAlign' | 'dividerSides' | 'textInsets' | 'controlInsets'>;
|
|
716
804
|
/** A stretch-aligned vertical stack with optional gap, flex, fill, scroll, and dividers. */
|
|
717
|
-
declare function List({ children, selectionMode, ariaLabel, gap, flex, fill, hAlign, vAlign, scrollable, dividerSides, textInsets, controlInsets, className, rootAttributes, slot, }: ListProps): kerfjs.SafeHtml;
|
|
805
|
+
declare function List({ children, selectionMode, ariaLabel, gap, flex, fill, hAlign, vAlign, scrollable, surface, inset, dividerSides, textInsets, controlInsets, className, rootAttributes, slot, }: ListProps): kerfjs.SafeHtml;
|
|
718
806
|
|
|
719
|
-
export { CssFlex, CssFlexKeyword, HorizontalAlignment, List, type ListConfig, type ListProps, ListVerticalAlignment, Sides, UiGap };
|
|
807
|
+
export { CssFlex, CssFlexKeyword, HorizontalAlignment, List, type ListConfig, type ListInset, type ListProps, type ListSurface, ListVerticalAlignment, Sides, UiGap };
|
|
720
808
|
```
|
|
721
809
|
|
|
722
810
|
## `@kerfjs/ui/list-action-row`
|
|
723
811
|
|
|
724
812
|
```ts
|
|
725
813
|
import { SafeHtml } from 'kerfjs';
|
|
814
|
+
import { PopupMenuEntry, PopupMenuPlacement } from './popup-menu.js';
|
|
815
|
+
import './semantic-content-BbzjvSu9.js';
|
|
726
816
|
|
|
727
817
|
type ListActionRowRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
728
818
|
'data-component'?: never;
|
|
@@ -737,6 +827,8 @@ type ListActionRowRootAttributes = Readonly<Record<`data-${string}`, string | un
|
|
|
737
827
|
'data-state'?: never;
|
|
738
828
|
'data-selected'?: never;
|
|
739
829
|
'data-pressed'?: never;
|
|
830
|
+
'data-dragging'?: never;
|
|
831
|
+
'data-drop-position'?: never;
|
|
740
832
|
}>;
|
|
741
833
|
type ListActionRowTrailingAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
742
834
|
'data-component'?: never;
|
|
@@ -748,7 +840,39 @@ type ListActionRowTrailingAttributes = Readonly<Record<`data-${string}`, string
|
|
|
748
840
|
'aria-controls'?: string;
|
|
749
841
|
'aria-haspopup'?: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | 'true';
|
|
750
842
|
}>;
|
|
751
|
-
|
|
843
|
+
/** A trailing overflow `PopupMenu` rendered as the row's sibling trailing control. */
|
|
844
|
+
interface ListActionRowTrailingMenu {
|
|
845
|
+
/** Accessible name of the icon-only menu trigger, such as `Actions for report.json`. */
|
|
846
|
+
label: string;
|
|
847
|
+
/** Decorative trigger icon, typically a `MoreHorizontal` `LucideIcon`. */
|
|
848
|
+
icon: SafeHtml;
|
|
849
|
+
/** The menu's commands, headings, and dividers; items dispatch their own `data-action`s. */
|
|
850
|
+
items: readonly PopupMenuEntry[];
|
|
851
|
+
/** Where the menu opens relative to its trigger. Defaults to `bottom-end`. */
|
|
852
|
+
placement?: PopupMenuPlacement;
|
|
853
|
+
disabled?: boolean;
|
|
854
|
+
}
|
|
855
|
+
interface ListActionRowTrailingButtonProps {
|
|
856
|
+
trailingAction: string;
|
|
857
|
+
trailingActionLabel: string;
|
|
858
|
+
/** Decorative dormant content for the trailing button. Must not contain interactive descendants. */
|
|
859
|
+
trailingActionIcon: SafeHtml;
|
|
860
|
+
trailingActionDisabled?: boolean;
|
|
861
|
+
trailingActionTitle?: string;
|
|
862
|
+
trailingActionAttributes?: ListActionRowTrailingAttributes;
|
|
863
|
+
trailingMenu?: never;
|
|
864
|
+
}
|
|
865
|
+
interface ListActionRowTrailingMenuProps {
|
|
866
|
+
/** A trailing overflow menu in place of the trailing button. Import `@kerfjs/ui/popup-menu/register` once. */
|
|
867
|
+
trailingMenu: ListActionRowTrailingMenu;
|
|
868
|
+
trailingAction?: never;
|
|
869
|
+
trailingActionLabel?: never;
|
|
870
|
+
trailingActionIcon?: never;
|
|
871
|
+
trailingActionDisabled?: never;
|
|
872
|
+
trailingActionTitle?: never;
|
|
873
|
+
trailingActionAttributes?: never;
|
|
874
|
+
}
|
|
875
|
+
interface ListActionRowCommonProps {
|
|
752
876
|
/** Visible dormant content for the primary button. Must not contain interactive descendants. */
|
|
753
877
|
label: string | SafeHtml;
|
|
754
878
|
description?: string | SafeHtml;
|
|
@@ -770,22 +894,23 @@ interface ListActionRowProps {
|
|
|
770
894
|
tabIndex?: number;
|
|
771
895
|
/** Render as an unanimated loading skeleton, disabling both actions: label, description, icon, and status text become skeletons; the `busy` indicator stays live. */
|
|
772
896
|
placeholder?: boolean;
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
897
|
+
/** Native HTML drag source (`draggable="true"` on the row root); a placeholder is never draggable. Pair with `wireListReorder` for pointer and keyboard reordering. */
|
|
898
|
+
draggable?: boolean;
|
|
899
|
+
/** Dim this row as one of the rows being dragged. */
|
|
900
|
+
dragging?: boolean;
|
|
901
|
+
/** Draw the insertion line at this row's leading (`before`) or trailing (`after`) block edge. */
|
|
902
|
+
dropPosition?: 'before' | 'after';
|
|
779
903
|
trailingActionVisibility?: 'always' | 'interaction';
|
|
780
904
|
className?: string;
|
|
781
905
|
rootAttributes?: ListActionRowRootAttributes;
|
|
782
|
-
trailingActionAttributes?: ListActionRowTrailingAttributes;
|
|
783
906
|
/** Native named-slot assignment when composed inside a web component. */
|
|
784
907
|
slot?: string;
|
|
785
908
|
}
|
|
786
|
-
|
|
909
|
+
/** Exactly one trailing control: a native button (`trailingAction*`) or an overflow menu (`trailingMenu`). */
|
|
910
|
+
type ListActionRowProps = ListActionRowCommonProps & (ListActionRowTrailingButtonProps | ListActionRowTrailingMenuProps);
|
|
911
|
+
declare function ListActionRow({ label, description, status, busy, density, divider, icon, action, itemId, selected, pressed, accessibleLabel, title, multiline, state, disabled, tabIndex, placeholder, draggable, dragging, dropPosition, trailingAction, trailingActionLabel, trailingActionIcon, trailingActionDisabled, trailingActionTitle, trailingActionVisibility, trailingMenu, className, rootAttributes, trailingActionAttributes, slot, }: ListActionRowProps): SafeHtml;
|
|
787
912
|
|
|
788
|
-
export { ListActionRow, type ListActionRowProps };
|
|
913
|
+
export { ListActionRow, type ListActionRowProps, type ListActionRowTrailingMenu };
|
|
789
914
|
```
|
|
790
915
|
|
|
791
916
|
## `@kerfjs/ui/list-item`
|
|
@@ -807,6 +932,8 @@ type ListItemRootAttributes = Readonly<Record<`data-${string}`, string | undefin
|
|
|
807
932
|
'data-state'?: never;
|
|
808
933
|
'data-kui-disabled'?: never;
|
|
809
934
|
'data-icon-align'?: never;
|
|
935
|
+
'data-dragging'?: never;
|
|
936
|
+
'data-drop-position'?: never;
|
|
810
937
|
}>;
|
|
811
938
|
interface ListItemProps {
|
|
812
939
|
label: string | SafeHtml;
|
|
@@ -836,6 +963,12 @@ interface ListItemProps {
|
|
|
836
963
|
tabIndex?: number;
|
|
837
964
|
/** Render the row as an unanimated loading skeleton, disabling its action: label, description, icon, status, and trailing content become skeletons; the `busy` indicator stays live. */
|
|
838
965
|
placeholder?: boolean;
|
|
966
|
+
/** Native HTML drag source (`draggable="true"`); a placeholder is never draggable. Pair with `wireListReorder` for pointer and keyboard reordering. */
|
|
967
|
+
draggable?: boolean;
|
|
968
|
+
/** Dim this row as one of the rows being dragged. */
|
|
969
|
+
dragging?: boolean;
|
|
970
|
+
/** Draw the insertion line at this row's leading (`before`) or trailing (`after`) block edge. */
|
|
971
|
+
dropPosition?: 'before' | 'after';
|
|
839
972
|
rootAttributes?: ListItemRootAttributes;
|
|
840
973
|
/** Native named-slot assignment when composed inside a web component. */
|
|
841
974
|
slot?: string;
|
|
@@ -848,9 +981,9 @@ interface ListItemLinkProps extends Omit<ListItemProps, 'action' | 'pressed'> {
|
|
|
848
981
|
action?: never;
|
|
849
982
|
pressed?: never;
|
|
850
983
|
}
|
|
851
|
-
declare function ListItem({ label, description, icon, trailing, status, busy, density, divider, selected, action, itemId, className, pressed, accessibleLabel, title, multiline, multilineIconAlign, state, disabled, tabIndex, placeholder, rootAttributes, slot, }: ListItemProps): SafeHtml;
|
|
984
|
+
declare function ListItem({ label, description, icon, trailing, status, busy, density, divider, selected, action, itemId, className, pressed, accessibleLabel, title, multiline, multilineIconAlign, state, disabled, tabIndex, placeholder, draggable, dragging, dropPosition, rootAttributes, slot, }: ListItemProps): SafeHtml;
|
|
852
985
|
/** A navigation row with native link activation and ListItem geometry. */
|
|
853
|
-
declare function ListItemLink({ href, external, label, description, icon, trailing, status, busy, density, divider, selected, itemId, className, accessibleLabel, title, multiline, multilineIconAlign, state, disabled, tabIndex, placeholder, rootAttributes, slot, }: ListItemLinkProps): SafeHtml;
|
|
986
|
+
declare function ListItemLink({ href, external, label, description, icon, trailing, status, busy, density, divider, selected, itemId, className, accessibleLabel, title, multiline, multilineIconAlign, state, disabled, tabIndex, placeholder, draggable, dragging, dropPosition, rootAttributes, slot, }: ListItemLinkProps): SafeHtml;
|
|
854
987
|
|
|
855
988
|
export { ListItem, ListItemLink, type ListItemLinkProps, type ListItemProps };
|
|
856
989
|
```
|
|
@@ -924,8 +1057,17 @@ import * as kerfjs from 'kerfjs';
|
|
|
924
1057
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
925
1058
|
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
926
1059
|
|
|
927
|
-
/**
|
|
928
|
-
|
|
1060
|
+
/**
|
|
1061
|
+
* Base surface treatment, semantic status colors, or `brand-loud`: the solid
|
|
1062
|
+
* brand fill with its on-loud foreground (a transcript's own messages).
|
|
1063
|
+
*/
|
|
1064
|
+
type ContentItemAppearance = 'transparent' | 'surface' | 'brand-loud' | SemanticTone;
|
|
1065
|
+
/**
|
|
1066
|
+
* A chat-bubble layout for transcripts: the item fits its content up to 80%
|
|
1067
|
+
* of the row and sits at the `start` (other participants) or `end` (the
|
|
1068
|
+
* person's own messages) of the line.
|
|
1069
|
+
*/
|
|
1070
|
+
type ContentItemBubble = 'start' | 'end';
|
|
929
1071
|
/** Whether the item's always-reserved 1px border is transparent or visible. */
|
|
930
1072
|
type ContentItemFrame = 'none' | 'framed';
|
|
931
1073
|
/** Corner shape: the 12px rounded rectangle or the 22px pill. */
|
|
@@ -936,11 +1078,13 @@ type ContentItemRootAttributes = Readonly<Record<`data-${string}`, string | unde
|
|
|
936
1078
|
'data-component'?: never;
|
|
937
1079
|
'data-appearance'?: never;
|
|
938
1080
|
'data-outlined'?: never;
|
|
1081
|
+
'data-bubble'?: never;
|
|
939
1082
|
}>;
|
|
940
1083
|
type ContentItemInteractiveRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
941
1084
|
'data-component'?: never;
|
|
942
1085
|
'data-appearance'?: never;
|
|
943
1086
|
'data-outlined'?: never;
|
|
1087
|
+
'data-bubble'?: never;
|
|
944
1088
|
'data-action'?: never;
|
|
945
1089
|
'data-item-id'?: never;
|
|
946
1090
|
'data-interactive'?: never;
|
|
@@ -968,6 +1112,12 @@ interface ContentItemBaseProps {
|
|
|
968
1112
|
flush?: boolean;
|
|
969
1113
|
/** Corner shape. Defaults to `rounded`. */
|
|
970
1114
|
shape?: ContentItemShape;
|
|
1115
|
+
/**
|
|
1116
|
+
* Lay the item out as a chat bubble: content width up to 80% of the row,
|
|
1117
|
+
* at the `start` or `end` of the line. Pair `end` with `brand-loud` for the
|
|
1118
|
+
* person's own messages. Omit for an ordinary full-width item.
|
|
1119
|
+
*/
|
|
1120
|
+
bubble?: ContentItemBubble;
|
|
971
1121
|
/** Native hover tooltip. */
|
|
972
1122
|
title?: string;
|
|
973
1123
|
/**
|
|
@@ -1016,9 +1166,9 @@ type ContentItemProps = ContentItemBaseProps & ({
|
|
|
1016
1166
|
* border (transparent unless `framed`), 8px padding, and a rounded or pill
|
|
1017
1167
|
* radius. It owns that whole geometry, so wrappers must not add more.
|
|
1018
1168
|
*/
|
|
1019
|
-
declare function ContentItem({ appearance, children, frame, flush, shape, title, ariaLabel, focusTarget, outlined, tabIndex, interactive, action, itemId, selectionMode, selected, disabled, className, rootAttributes, slot, }: ContentItemProps): kerfjs.SafeHtml;
|
|
1169
|
+
declare function ContentItem({ appearance, children, frame, flush, shape, bubble, title, ariaLabel, focusTarget, outlined, tabIndex, interactive, action, itemId, selectionMode, selected, disabled, className, rootAttributes, slot, }: ContentItemProps): kerfjs.SafeHtml;
|
|
1020
1170
|
|
|
1021
|
-
export { ContentItem, type ContentItemAppearance, type ContentItemFrame, type ContentItemProps, type ContentItemSelectionMode, type ContentItemShape, SemanticTone };
|
|
1171
|
+
export { ContentItem, type ContentItemAppearance, type ContentItemBubble, type ContentItemFrame, type ContentItemProps, type ContentItemSelectionMode, type ContentItemShape, SemanticTone };
|
|
1022
1172
|
```
|
|
1023
1173
|
|
|
1024
1174
|
## `@kerfjs/ui/value-table`
|
|
@@ -1027,6 +1177,7 @@ export { ContentItem, type ContentItemAppearance, type ContentItemFrame, type Co
|
|
|
1027
1177
|
import * as kerfjs from 'kerfjs';
|
|
1028
1178
|
import { SafeHtml } from 'kerfjs';
|
|
1029
1179
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
1180
|
+
import { CssLength } from './css-values.js';
|
|
1030
1181
|
|
|
1031
1182
|
interface ValueTableRowProps {
|
|
1032
1183
|
label: string | SafeHtml;
|
|
@@ -1040,18 +1191,35 @@ interface ValueTableRowProps {
|
|
|
1040
1191
|
}
|
|
1041
1192
|
declare function ValueTableRow({ label, value, icon, className, placeholder, slot, }: ValueTableRowProps): SafeHtml;
|
|
1042
1193
|
|
|
1194
|
+
/** `columns` keeps label and value side by side; `stacked` puts each value under its label. */
|
|
1195
|
+
type ValueTablePresentation = 'columns' | 'stacked';
|
|
1196
|
+
/** Table width below which columns stack: `compact` is 512px, `narrow` 576px. */
|
|
1197
|
+
type ValueTableStackBelow = 'compact' | 'narrow';
|
|
1043
1198
|
interface ValueTableProps {
|
|
1044
1199
|
label: string;
|
|
1045
1200
|
/** Compact row spacing for metadata-dense surfaces. */
|
|
1046
1201
|
density?: 'default' | 'compact';
|
|
1202
|
+
/**
|
|
1203
|
+
* Minimum width of the label column (for example `px(160)`); the value then
|
|
1204
|
+
* takes the rest of the row. Omitted, label and value share the row by
|
|
1205
|
+
* content.
|
|
1206
|
+
*/
|
|
1207
|
+
labelWidth?: CssLength;
|
|
1208
|
+
/** Side-by-side columns (default) or values stacked under their labels. */
|
|
1209
|
+
presentation?: ValueTablePresentation;
|
|
1210
|
+
/**
|
|
1211
|
+
* Stack the rows only while the table itself is narrower than the preset,
|
|
1212
|
+
* so one table reads as columns in a wide dialog and stacks on a phone.
|
|
1213
|
+
*/
|
|
1214
|
+
stackBelow?: ValueTableStackBelow;
|
|
1047
1215
|
className?: string;
|
|
1048
1216
|
children: KerfUiContent;
|
|
1049
1217
|
/** Native named-slot assignment when composed inside a web component. */
|
|
1050
1218
|
slot?: string;
|
|
1051
1219
|
}
|
|
1052
|
-
declare function ValueTable({ label, density, className, children, slot, }: ValueTableProps): kerfjs.SafeHtml;
|
|
1220
|
+
declare function ValueTable({ label, density, labelWidth, presentation, stackBelow, className, children, slot, }: ValueTableProps): kerfjs.SafeHtml;
|
|
1053
1221
|
|
|
1054
|
-
export { ValueTable, type ValueTableProps, ValueTableRow, type ValueTableRowProps };
|
|
1222
|
+
export { ValueTable, type ValueTablePresentation, type ValueTableProps, ValueTableRow, type ValueTableRowProps, type ValueTableStackBelow };
|
|
1055
1223
|
```
|
|
1056
1224
|
|
|
1057
1225
|
## `@kerfjs/ui/app-tab`
|
|
@@ -1298,6 +1466,52 @@ declare function wireScrollDividers(root: Root, { targets }?: WireScrollDividers
|
|
|
1298
1466
|
export { type ScrollDividerTarget, type WireScrollDividersOptions, wireScrollDividers };
|
|
1299
1467
|
```
|
|
1300
1468
|
|
|
1469
|
+
## `@kerfjs/ui/wire-list-reorder`
|
|
1470
|
+
|
|
1471
|
+
```ts
|
|
1472
|
+
/** Which edge of the target row the moved rows land beside. */
|
|
1473
|
+
type ListDropPosition = 'before' | 'after';
|
|
1474
|
+
/** How the person asked for the move. */
|
|
1475
|
+
type ListReorderSource = 'pointer' | 'keyboard';
|
|
1476
|
+
/** The row the moved rows land beside, and on which side of it. */
|
|
1477
|
+
interface ListReorderTarget {
|
|
1478
|
+
id: string;
|
|
1479
|
+
position: ListDropPosition;
|
|
1480
|
+
}
|
|
1481
|
+
/** One requested reorder. The application applies it to its own ordered state. */
|
|
1482
|
+
interface ListReorder {
|
|
1483
|
+
/** The containing list's `data-list-id`, when it has one. */
|
|
1484
|
+
listId?: string;
|
|
1485
|
+
/** The moved rows' `itemId`s, in their current order. */
|
|
1486
|
+
sourceIds: string[];
|
|
1487
|
+
target: ListReorderTarget;
|
|
1488
|
+
source: ListReorderSource;
|
|
1489
|
+
}
|
|
1490
|
+
interface WireListReorderOptions {
|
|
1491
|
+
/** Apply the change synchronously (for example with `reorderListItems`) and re-render. */
|
|
1492
|
+
onReorder: (change: ListReorder) => void;
|
|
1493
|
+
}
|
|
1494
|
+
/**
|
|
1495
|
+
* Move `sourceIds` (kept in their current relative order) to `target`'s side
|
|
1496
|
+
* of the target row. Returns a new array; an unknown target, a target that is
|
|
1497
|
+
* itself being moved, or no known sources leave the order unchanged.
|
|
1498
|
+
*/
|
|
1499
|
+
declare function reorderListItems<T>(items: readonly T[], getId: (item: T) => string, sourceIds: readonly string[], target: ListReorderTarget): T[];
|
|
1500
|
+
/**
|
|
1501
|
+
* Wire native drag-and-drop and Alt+Shift+ArrowUp/ArrowDown reordering for
|
|
1502
|
+
* draggable `ListItem`, `ListItemLink`, and `ListActionRow` rows below `root`.
|
|
1503
|
+
* Rows reorder within their `List` (or parent element) and are identified by
|
|
1504
|
+
* `itemId`. Dragging a selected or pressed row moves every selected row of
|
|
1505
|
+
* its list. While a pointer drag is in progress the wiring paints the same
|
|
1506
|
+
* `data-dragging` / `data-drop-position` attributes the rows' `dragging` and
|
|
1507
|
+
* `dropPosition` props render. Order stays application state: `onReorder`
|
|
1508
|
+
* reports the change and the application re-renders. Returns a disposer.
|
|
1509
|
+
*/
|
|
1510
|
+
declare function wireListReorder(root: HTMLElement | Document, { onReorder }: WireListReorderOptions): () => void;
|
|
1511
|
+
|
|
1512
|
+
export { type ListDropPosition, type ListReorder, type ListReorderSource, type ListReorderTarget, type WireListReorderOptions, reorderListItems, wireListReorder };
|
|
1513
|
+
```
|
|
1514
|
+
|
|
1301
1515
|
## `@kerfjs/ui/nav-stack`
|
|
1302
1516
|
|
|
1303
1517
|
```ts
|
|
@@ -1305,6 +1519,7 @@ export { c as NavStack, N as NavStackProps, d as NavStackToolbarConfig, a as Nav
|
|
|
1305
1519
|
import 'kerfjs';
|
|
1306
1520
|
import './semantic-content-BbzjvSu9.js';
|
|
1307
1521
|
import './list.js';
|
|
1522
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
1308
1523
|
import './flex-alignment-4ms8ZbV8.js';
|
|
1309
1524
|
import './sides-BPSWde0A.js';
|
|
1310
1525
|
import './css-values.js';
|
|
@@ -1347,6 +1562,7 @@ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
|
1347
1562
|
import { N as NavStackProps, a as NavStackView } from './nav-stack-BvSKY448.js';
|
|
1348
1563
|
import { ResizableRegionProps } from './resizable-region.js';
|
|
1349
1564
|
import './list.js';
|
|
1565
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
1350
1566
|
import './flex-alignment-4ms8ZbV8.js';
|
|
1351
1567
|
import './sides-BPSWde0A.js';
|
|
1352
1568
|
import './css-values.js';
|
|
@@ -1382,6 +1598,17 @@ interface SplitViewCompactStack extends Pick<NavStackProps, 'toolbarConfig' | 'b
|
|
|
1382
1598
|
/** Toolbar content for the pushed detail view. */
|
|
1383
1599
|
detail?: SplitViewCompactViewToolbars;
|
|
1384
1600
|
}
|
|
1601
|
+
/**
|
|
1602
|
+
* The fixed list column's width: a size in CSS pixels, or that size capped
|
|
1603
|
+
* at a fraction of the SplitView's own width so a narrow container (a
|
|
1604
|
+
* dialog, a small window) always leaves the detail in view.
|
|
1605
|
+
*/
|
|
1606
|
+
type SplitViewListWidth = number | {
|
|
1607
|
+
/** Preferred width in CSS pixels. */
|
|
1608
|
+
size: number;
|
|
1609
|
+
/** Largest share of the SplitView's width, greater than 0 and at most 1. */
|
|
1610
|
+
maxFraction?: number;
|
|
1611
|
+
};
|
|
1385
1612
|
interface SplitViewProps {
|
|
1386
1613
|
id: string;
|
|
1387
1614
|
label: string;
|
|
@@ -1407,6 +1634,12 @@ interface SplitViewProps {
|
|
|
1407
1634
|
compactStack?: SplitViewCompactStack;
|
|
1408
1635
|
/** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */
|
|
1409
1636
|
resizable?: SplitViewResizable;
|
|
1637
|
+
/**
|
|
1638
|
+
* The fixed split's list column width (default 320px). A number is CSS
|
|
1639
|
+
* pixels; `{ size, maxFraction }` caps it at that share of the SplitView's
|
|
1640
|
+
* width. A resizable split sizes its list with `resizable` instead.
|
|
1641
|
+
*/
|
|
1642
|
+
listWidth?: SplitViewListWidth;
|
|
1410
1643
|
className?: string;
|
|
1411
1644
|
/** Native named-slot assignment when composed inside a web component. */
|
|
1412
1645
|
slot?: string;
|
|
@@ -1418,9 +1651,9 @@ interface SplitViewProps {
|
|
|
1418
1651
|
* resizable wiring with `wireResizableRegions` and the compact back with
|
|
1419
1652
|
* `wireNavStack`.
|
|
1420
1653
|
*/
|
|
1421
|
-
declare function SplitView({ id, label, list, detail, compact, detailActive, listTitle, detailTitle, backLabel, compactStack, resizable, className, slot, }: SplitViewProps): kerfjs.SafeHtml;
|
|
1654
|
+
declare function SplitView({ id, label, list, detail, compact, detailActive, listTitle, detailTitle, backLabel, compactStack, resizable, listWidth, className, slot, }: SplitViewProps): kerfjs.SafeHtml;
|
|
1422
1655
|
|
|
1423
|
-
export { SplitView, type SplitViewCompactStack, type SplitViewCompactViewToolbars, type SplitViewProps, type SplitViewResizable };
|
|
1656
|
+
export { SplitView, type SplitViewCompactStack, type SplitViewCompactViewToolbars, type SplitViewListWidth, type SplitViewProps, type SplitViewResizable };
|
|
1424
1657
|
```
|
|
1425
1658
|
|
|
1426
1659
|
## `@kerfjs/ui/pane`
|
|
@@ -1557,6 +1790,7 @@ import { a as PanelToolbar, c as PanelBottomToolbar, b as PanelChromePlacement,
|
|
|
1557
1790
|
import { ToolbarConfig } from './toolbar.js';
|
|
1558
1791
|
import './toolbar-text.js';
|
|
1559
1792
|
import './css-values.js';
|
|
1793
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
1560
1794
|
import './flex-alignment-4ms8ZbV8.js';
|
|
1561
1795
|
import './sides-BPSWde0A.js';
|
|
1562
1796
|
import './lucide-icon.js';
|
|
@@ -1947,14 +2181,15 @@ import { SafeHtml } from 'kerfjs';
|
|
|
1947
2181
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
1948
2182
|
import { P as PanelSide, a as PanelToolbar, b as PanelChromePlacement, c as PanelBottomToolbar, d as PanelToggle } from './panel-toolbar-CL9tYOkh.js';
|
|
1949
2183
|
export { e as collapsiblePanelToggleIcon } from './panel-toolbar-CL9tYOkh.js';
|
|
2184
|
+
import { ToolbarConfig } from './toolbar.js';
|
|
1950
2185
|
import { ListConfig } from './list.js';
|
|
1951
2186
|
import { PaneConfig } from './pane.js';
|
|
1952
2187
|
import { ResizableRegionSeparator, ResizableRegionCollapseMotion, ResizableRegionContentOverflow, ResizableRegionPresentation, ResizableRegionRestorePosition } from './resizable-region.js';
|
|
1953
|
-
import './toolbar.js';
|
|
1954
|
-
import './sides-BPSWde0A.js';
|
|
1955
2188
|
import './lucide-icon.js';
|
|
1956
2189
|
import 'lucide';
|
|
1957
2190
|
import './css-values.js';
|
|
2191
|
+
import './sides-BPSWde0A.js';
|
|
2192
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
1958
2193
|
import './flex-alignment-4ms8ZbV8.js';
|
|
1959
2194
|
|
|
1960
2195
|
/** Which edge a {@link CollapsiblePanel} docks to. */
|
|
@@ -2068,6 +2303,12 @@ interface CollapsiblePanelRelocatedProps {
|
|
|
2068
2303
|
collapsed: boolean;
|
|
2069
2304
|
/** The same `toolbar` the panel receives. */
|
|
2070
2305
|
toolbar: CollapsiblePanelToolbar;
|
|
2306
|
+
/**
|
|
2307
|
+
* Density of the toolbar the groups are placed in, so the standard toggle
|
|
2308
|
+
* fits it (`compact` in a `density="compact"` toolbar). Defaults to
|
|
2309
|
+
* `default`.
|
|
2310
|
+
*/
|
|
2311
|
+
density?: ToolbarConfig['density'];
|
|
2071
2312
|
}
|
|
2072
2313
|
/**
|
|
2073
2314
|
* A collapsed {@link CollapsiblePanel}'s marked groups and standard
|
|
@@ -2077,7 +2318,7 @@ interface CollapsiblePanelRelocatedProps {
|
|
|
2077
2318
|
* `restoreControl`) for a bottom drawer. `wireSidebar` hands focus to it when
|
|
2078
2319
|
* the panel closes from its own toggle.
|
|
2079
2320
|
*/
|
|
2080
|
-
declare function CollapsiblePanelRelocated({ panelId, side, collapsed, toolbar, }: CollapsiblePanelRelocatedProps): SafeHtml;
|
|
2321
|
+
declare function CollapsiblePanelRelocated({ panelId, side, collapsed, toolbar, density, }: CollapsiblePanelRelocatedProps): SafeHtml;
|
|
2081
2322
|
|
|
2082
2323
|
export { CollapsiblePanel, type CollapsiblePanelBottomToolbar, type CollapsiblePanelChromePlacement, type CollapsiblePanelProps, CollapsiblePanelRelocated, type CollapsiblePanelRelocatedProps, type CollapsiblePanelSide, CollapsiblePanelToggle, type CollapsiblePanelToggleProps, type CollapsiblePanelToolbar, type CollapsiblePanelToolbarToggle };
|
|
2083
2324
|
```
|
|
@@ -2423,6 +2664,7 @@ import './pane.js';
|
|
|
2423
2664
|
import './workbench.js';
|
|
2424
2665
|
import './nav-stack-BvSKY448.js';
|
|
2425
2666
|
import './list.js';
|
|
2667
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
2426
2668
|
import './flex-alignment-4ms8ZbV8.js';
|
|
2427
2669
|
import './css-values.js';
|
|
2428
2670
|
import './panel-toolbar-CL9tYOkh.js';
|
|
@@ -2546,6 +2788,7 @@ import './pane.js';
|
|
|
2546
2788
|
import './workbench.js';
|
|
2547
2789
|
import './nav-stack-BvSKY448.js';
|
|
2548
2790
|
import './list.js';
|
|
2791
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
2549
2792
|
import './flex-alignment-4ms8ZbV8.js';
|
|
2550
2793
|
import './css-values.js';
|
|
2551
2794
|
import './panel-toolbar-CL9tYOkh.js';
|
|
@@ -2599,6 +2842,7 @@ import './pane.js';
|
|
|
2599
2842
|
import './workbench.js';
|
|
2600
2843
|
import './nav-stack-BvSKY448.js';
|
|
2601
2844
|
import './list.js';
|
|
2845
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
2602
2846
|
import './flex-alignment-4ms8ZbV8.js';
|
|
2603
2847
|
import './css-values.js';
|
|
2604
2848
|
import './panel-toolbar-CL9tYOkh.js';
|
|
@@ -2760,6 +3004,69 @@ declare function SegmentedControl<Value extends string>({ id, label, value, choi
|
|
|
2760
3004
|
export { SegmentedControl, type SegmentedControlAppearance, type SegmentedControlChoice, type SegmentedControlLayout, type SegmentedControlProps, type SegmentedControlShape, type SegmentedControlSize };
|
|
2761
3005
|
```
|
|
2762
3006
|
|
|
3007
|
+
## `@kerfjs/ui/choice-chips`
|
|
3008
|
+
|
|
3009
|
+
```ts
|
|
3010
|
+
import { SafeHtml } from 'kerfjs';
|
|
3011
|
+
import { CssColor } from './css-values.js';
|
|
3012
|
+
|
|
3013
|
+
type ChoiceChipsSize = 'default' | 'compact';
|
|
3014
|
+
/**
|
|
3015
|
+
* A leading color dot: a {@link CssColor} from `uiColor()`, `colorVar()`, or
|
|
3016
|
+
* `foregroundColor()`, or `'transparent'` for the no-color swatch (an outlined
|
|
3017
|
+
* dot struck through by a diagonal line).
|
|
3018
|
+
*/
|
|
3019
|
+
type ChoiceChipsSwatch = CssColor | 'transparent';
|
|
3020
|
+
interface ChoiceChipsChoice<Value extends string = string> {
|
|
3021
|
+
value: Value;
|
|
3022
|
+
/** Visible label; it is also the radio's accessible name. */
|
|
3023
|
+
label: string;
|
|
3024
|
+
/** Leading color dot. Mutually exclusive with `icon`. */
|
|
3025
|
+
swatch?: ChoiceChipsSwatch;
|
|
3026
|
+
/** Decorative leading icon, normally an unsized LucideIcon. */
|
|
3027
|
+
icon?: SafeHtml;
|
|
3028
|
+
/** Supplementary tooltip; never the only place a choice is described. */
|
|
3029
|
+
title?: string;
|
|
3030
|
+
disabled?: boolean;
|
|
3031
|
+
}
|
|
3032
|
+
interface ChoiceChipsCommonProps<Value extends string> {
|
|
3033
|
+
/** Native radio `name`: the form field the selected value submits under. */
|
|
3034
|
+
name: string;
|
|
3035
|
+
/** The selected value. Omit (or pass `undefined`) for no selection. */
|
|
3036
|
+
value?: NoInfer<Value>;
|
|
3037
|
+
choices: readonly ChoiceChipsChoice<Value>[];
|
|
3038
|
+
/** Delegated `data-action` on every radio; listen for `change`. */
|
|
3039
|
+
action?: string;
|
|
3040
|
+
size?: ChoiceChipsSize;
|
|
3041
|
+
/** Disable the whole group. */
|
|
3042
|
+
disabled?: boolean;
|
|
3043
|
+
/** Require a selection for native form validation. */
|
|
3044
|
+
required?: boolean;
|
|
3045
|
+
/** Associate the radios with a form outside their ancestor chain. */
|
|
3046
|
+
form?: string;
|
|
3047
|
+
id?: string;
|
|
3048
|
+
className?: string;
|
|
3049
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
3050
|
+
slot?: string;
|
|
3051
|
+
}
|
|
3052
|
+
/** A radio group is named either by a string or by a visible heading's id. */
|
|
3053
|
+
type ChoiceChipsProps<Value extends string = string> = ChoiceChipsCommonProps<Value> & ({
|
|
3054
|
+
label: string;
|
|
3055
|
+
labelledBy?: never;
|
|
3056
|
+
} | {
|
|
3057
|
+
labelledBy: string;
|
|
3058
|
+
label?: never;
|
|
3059
|
+
});
|
|
3060
|
+
/**
|
|
3061
|
+
* An exclusive, wrapping set of pill chips backed by native radios: one Tab
|
|
3062
|
+
* stop, arrow-key selection, and a real form value. Each choice may lead with
|
|
3063
|
+
* a color swatch (including a struck-through transparent swatch) or an icon.
|
|
3064
|
+
*/
|
|
3065
|
+
declare function ChoiceChips<Value extends string>({ name, value, choices, action, size, disabled, required, form, id, className, slot, label, labelledBy, }: ChoiceChipsProps<Value>): SafeHtml;
|
|
3066
|
+
|
|
3067
|
+
export { ChoiceChips, type ChoiceChipsChoice, type ChoiceChipsProps, type ChoiceChipsSize, type ChoiceChipsSwatch };
|
|
3068
|
+
```
|
|
3069
|
+
|
|
2763
3070
|
## `@kerfjs/ui/select`
|
|
2764
3071
|
|
|
2765
3072
|
```ts
|
|
@@ -2896,6 +3203,7 @@ export { Select, type SelectChoice, type SelectFocusRingOwner, type SelectMultip
|
|
|
2896
3203
|
```ts
|
|
2897
3204
|
import { SafeHtml } from 'kerfjs';
|
|
2898
3205
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3206
|
+
import { S as Sides } from './sides-BPSWde0A.js';
|
|
2899
3207
|
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
2900
3208
|
|
|
2901
3209
|
/** @deprecated Use SemanticTone. */
|
|
@@ -2903,6 +3211,7 @@ type StateBannerTone = SemanticTone;
|
|
|
2903
3211
|
type StateBannerUrgency = 'status' | 'alert';
|
|
2904
3212
|
type StateBannerCopyLayout = 'inline' | 'stacked';
|
|
2905
3213
|
type StateBannerActionPlacement = 'trailing' | 'below';
|
|
3214
|
+
type StateBannerPresentation = 'card' | 'strip';
|
|
2906
3215
|
interface StateBannerProps {
|
|
2907
3216
|
title: string;
|
|
2908
3217
|
detail?: string;
|
|
@@ -2916,15 +3225,28 @@ interface StateBannerProps {
|
|
|
2916
3225
|
copyLayout?: StateBannerCopyLayout;
|
|
2917
3226
|
/** Place the action beside the copy or on a separate trailing row. */
|
|
2918
3227
|
actionPlacement?: StateBannerActionPlacement;
|
|
3228
|
+
/**
|
|
3229
|
+
* `card` (the default) is an inset, rounded, fully bordered banner beside
|
|
3230
|
+
* the affected work. `strip` is a full-width band at a layout edge, such as
|
|
3231
|
+
* above a workspace: square corners, no inline margin, inline padding on the
|
|
3232
|
+
* shared content-text column, and only the tone-colored `dividerSides` edges.
|
|
3233
|
+
*/
|
|
3234
|
+
presentation?: StateBannerPresentation;
|
|
3235
|
+
/**
|
|
3236
|
+
* Physical tone-colored divider edges of a `strip`, in canonical
|
|
3237
|
+
* top/right/bottom/left order. Defaults to the bottom edge; `''` draws none.
|
|
3238
|
+
* A `card` keeps its full border and ignores this.
|
|
3239
|
+
*/
|
|
3240
|
+
dividerSides?: Sides;
|
|
2919
3241
|
className?: string;
|
|
2920
3242
|
/** Render the title, badge, and detail as unanimated loading skeletons, keeping the icon and tone. The detail line appears only when `detail` is set, as in the live banner. */
|
|
2921
3243
|
placeholder?: boolean;
|
|
2922
3244
|
/** Native named-slot assignment when composed inside a web component. */
|
|
2923
3245
|
slot?: string;
|
|
2924
3246
|
}
|
|
2925
|
-
declare function StateBanner({ title, detail, badge, icon, action, tone, urgency, copyLayout, actionPlacement, className, placeholder, slot, }: StateBannerProps): SafeHtml;
|
|
3247
|
+
declare function StateBanner({ title, detail, badge, icon, action, tone, urgency, copyLayout, actionPlacement, presentation, dividerSides, className, placeholder, slot, }: StateBannerProps): SafeHtml;
|
|
2926
3248
|
|
|
2927
|
-
export { SemanticTone, StateBanner, type StateBannerActionPlacement, type StateBannerCopyLayout, type StateBannerProps, type StateBannerTone, type StateBannerUrgency };
|
|
3249
|
+
export { SemanticTone, StateBanner, type StateBannerActionPlacement, type StateBannerCopyLayout, type StateBannerPresentation, type StateBannerProps, type StateBannerTone, type StateBannerUrgency };
|
|
2928
3250
|
```
|
|
2929
3251
|
|
|
2930
3252
|
## `@kerfjs/ui/empty-state`
|
|
@@ -3016,6 +3338,13 @@ import * as kerfjs from 'kerfjs';
|
|
|
3016
3338
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3017
3339
|
import { CssFlexKeyword, CssFlex } from './css-values.js';
|
|
3018
3340
|
|
|
3341
|
+
/**
|
|
3342
|
+
* Generate the sunken texture once for a document. Sunken surfaces call this
|
|
3343
|
+
* as they render; it is idempotent, and on a server (no document) or without
|
|
3344
|
+
* a 2D canvas it does nothing, leaving the flat lowered surface.
|
|
3345
|
+
*/
|
|
3346
|
+
declare function ensureSunkenTexture(doc?: Document | undefined): void;
|
|
3347
|
+
|
|
3019
3348
|
type SunkenPanelShape = 'rounded' | 'square';
|
|
3020
3349
|
interface SunkenPanelProps {
|
|
3021
3350
|
children?: KerfUiContent;
|
|
@@ -3042,7 +3371,7 @@ interface SunkenPanelProps {
|
|
|
3042
3371
|
*/
|
|
3043
3372
|
declare function SunkenPanel({ children, ariaLabel, shape, flex, fill, tabIndex, outlined, className, slot, }: SunkenPanelProps): kerfjs.SafeHtml;
|
|
3044
3373
|
|
|
3045
|
-
export { SunkenPanel, type SunkenPanelProps, type SunkenPanelShape };
|
|
3374
|
+
export { SunkenPanel, type SunkenPanelProps, type SunkenPanelShape, ensureSunkenTexture };
|
|
3046
3375
|
```
|
|
3047
3376
|
|
|
3048
3377
|
## `@kerfjs/ui/token-search-field`
|
|
@@ -3254,6 +3583,7 @@ export { type ActionHandler, type DelegateActionsOptions, action, delegateAction
|
|
|
3254
3583
|
|
|
3255
3584
|
```ts
|
|
3256
3585
|
import { SafeHtml } from 'kerfjs';
|
|
3586
|
+
import { CssLength } from './css-values.js';
|
|
3257
3587
|
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
3258
3588
|
|
|
3259
3589
|
/** @deprecated Use SemanticTone. */
|
|
@@ -3262,8 +3592,22 @@ type BadgeAppearance = 'quiet' | 'solid' | 'outline';
|
|
|
3262
3592
|
type BadgeShape = 'pill' | 'rounded';
|
|
3263
3593
|
/** Size of a text badge. A text-free dot is the separate `size: 'dot'` form. */
|
|
3264
3594
|
type BadgeSize = 'compact' | 'default';
|
|
3595
|
+
/** Application `data-*` identity on the badge root; Badge-owned markers stay protected. */
|
|
3596
|
+
type BadgeRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
3597
|
+
'data-component'?: never;
|
|
3598
|
+
'data-tone'?: never;
|
|
3599
|
+
'data-appearance'?: never;
|
|
3600
|
+
'data-shape'?: never;
|
|
3601
|
+
'data-size'?: never;
|
|
3602
|
+
'data-has-icon'?: never;
|
|
3603
|
+
'data-truncate'?: never;
|
|
3604
|
+
}>;
|
|
3265
3605
|
interface BadgeCommonProps {
|
|
3266
3606
|
tone?: SemanticTone;
|
|
3607
|
+
/** Native tooltip text that explains the badge on hover. */
|
|
3608
|
+
title?: string;
|
|
3609
|
+
/** Safe `data-*` identity, such as a status band, on the badge root. */
|
|
3610
|
+
rootAttributes?: BadgeRootAttributes;
|
|
3267
3611
|
className?: string;
|
|
3268
3612
|
/** Native named-slot assignment when composed inside a web component. */
|
|
3269
3613
|
slot?: string;
|
|
@@ -3271,10 +3615,23 @@ interface BadgeCommonProps {
|
|
|
3271
3615
|
/** A badge that shows a short status, count, or category as visible text. */
|
|
3272
3616
|
interface BadgeTextProps extends BadgeCommonProps {
|
|
3273
3617
|
children: SafeHtml | string | number;
|
|
3618
|
+
/** Decorative leading icon, normally an unsized LucideIcon, 4px before the text. */
|
|
3619
|
+
icon?: SafeHtml;
|
|
3274
3620
|
appearance?: BadgeAppearance;
|
|
3275
3621
|
shape?: BadgeShape;
|
|
3276
3622
|
size?: BadgeSize;
|
|
3277
|
-
/**
|
|
3623
|
+
/**
|
|
3624
|
+
* Cap the badge's width and truncate longer text with an ellipsis, for
|
|
3625
|
+
* app-supplied text such as a tag or category name. String and number
|
|
3626
|
+
* content becomes the native `title` tooltip unless `title` is supplied, so
|
|
3627
|
+
* the full text stays available on hover; SafeHtml content needs `title`.
|
|
3628
|
+
*/
|
|
3629
|
+
maxWidth?: CssLength;
|
|
3630
|
+
/**
|
|
3631
|
+
* Accessible name that replaces the visible content when it is abbreviated
|
|
3632
|
+
* or symbolic (`"82% confidence"` for `82`); the badge is then exposed as a
|
|
3633
|
+
* labeled image.
|
|
3634
|
+
*/
|
|
3278
3635
|
label?: string;
|
|
3279
3636
|
/** Hide a repeated visual badge from assistive technology. */
|
|
3280
3637
|
ariaHidden?: boolean;
|
|
@@ -3301,12 +3658,13 @@ type BadgeDotProps = BadgeCommonProps & {
|
|
|
3301
3658
|
children?: never;
|
|
3302
3659
|
appearance?: never;
|
|
3303
3660
|
shape?: never;
|
|
3661
|
+
maxWidth?: never;
|
|
3304
3662
|
} & (BadgeDotLabeled | BadgeDotDecorative);
|
|
3305
3663
|
type BadgeProps = BadgeTextProps | BadgeDotProps;
|
|
3306
3664
|
/** Compact, non-interactive metadata whose tone, emphasis, and shape are configured by props. */
|
|
3307
3665
|
declare function Badge(props: BadgeProps): SafeHtml;
|
|
3308
3666
|
|
|
3309
|
-
export { Badge, type BadgeAppearance, type BadgeDotProps, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeTextProps, type BadgeTone, SemanticTone };
|
|
3667
|
+
export { Badge, type BadgeAppearance, type BadgeDotProps, type BadgeProps, type BadgeRootAttributes, type BadgeShape, type BadgeSize, type BadgeTextProps, type BadgeTone, SemanticTone };
|
|
3310
3668
|
```
|
|
3311
3669
|
|
|
3312
3670
|
## `@kerfjs/ui/chip`
|
|
@@ -3315,6 +3673,7 @@ export { Badge, type BadgeAppearance, type BadgeDotProps, type BadgeProps, type
|
|
|
3315
3673
|
import { SafeHtml } from 'kerfjs';
|
|
3316
3674
|
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
3317
3675
|
import { BadgeAppearance, BadgeShape, BadgeSize } from './badge.js';
|
|
3676
|
+
import './css-values.js';
|
|
3318
3677
|
|
|
3319
3678
|
interface ChipCommonProps {
|
|
3320
3679
|
/** Decorative leading icon, normally an unsized LucideIcon. */
|
|
@@ -3410,6 +3769,19 @@ type DialogSurfaceSize = 'small' | 'medium' | 'large';
|
|
|
3410
3769
|
type DialogSurfacePresentation = 'modal' | 'side-sheet' | 'fullscreen';
|
|
3411
3770
|
type SurfaceInset = 'none' | 'compact' | 'comfortable';
|
|
3412
3771
|
type DialogSurfaceMaxHeight = CssLength | 'viewport';
|
|
3772
|
+
/** A definite modal height: a length or the full viewport, minus both gutters. */
|
|
3773
|
+
type DialogSurfaceHeight = CssLength | 'viewport';
|
|
3774
|
+
/**
|
|
3775
|
+
* How the dialog body lays out its children: `flow` (default) scrolls ordinary
|
|
3776
|
+
* content in the body; `fill` gives one child the body's whole height and
|
|
3777
|
+
* lets it own scrolling (a SplitView, a Pane, an editor).
|
|
3778
|
+
*/
|
|
3779
|
+
type DialogSurfaceBodyLayout = 'flow' | 'fill';
|
|
3780
|
+
/**
|
|
3781
|
+
* Application `data-*` identity on the DialogSurface root, such as
|
|
3782
|
+
* `data-key`; the surface's own configuration attributes stay protected.
|
|
3783
|
+
*/
|
|
3784
|
+
type DialogSurfaceRootAttributes = Readonly<Record<`data-${string}`, string | undefined>>;
|
|
3413
3785
|
interface DialogSurfaceProps {
|
|
3414
3786
|
children: KerfUiContent;
|
|
3415
3787
|
size?: DialogSurfaceSize;
|
|
@@ -3422,12 +3794,72 @@ interface DialogSurfaceProps {
|
|
|
3422
3794
|
viewportGutter?: CssLength;
|
|
3423
3795
|
/** Modal height cap, bounded by the dynamic viewport minus both gutters. */
|
|
3424
3796
|
maxHeight?: DialogSurfaceMaxHeight;
|
|
3797
|
+
/**
|
|
3798
|
+
* Modal definite height, bounded the same way, so a filling child has a
|
|
3799
|
+
* height to fill. Takes precedence over `maxHeight`.
|
|
3800
|
+
*/
|
|
3801
|
+
height?: DialogSurfaceHeight;
|
|
3802
|
+
/** Body layout (default `flow`); `fill` lets one child own the body. */
|
|
3803
|
+
bodyLayout?: DialogSurfaceBodyLayout;
|
|
3804
|
+
/**
|
|
3805
|
+
* Safe `data-*` identity on the root. Give sibling dialogs distinct
|
|
3806
|
+
* `data-key`s so a re-render morphs each surface into itself instead of
|
|
3807
|
+
* reusing one dialog's element for another (structurally identical roots
|
|
3808
|
+
* are otherwise matched by position).
|
|
3809
|
+
*/
|
|
3810
|
+
rootAttributes?: DialogSurfaceRootAttributes;
|
|
3425
3811
|
className?: string;
|
|
3426
3812
|
/** Native named-slot assignment when composed inside a web component. */
|
|
3427
3813
|
slot?: string;
|
|
3428
3814
|
}
|
|
3429
3815
|
/** Configure recurring Web Awesome dialog geometry without consumer ::part() CSS. */
|
|
3430
|
-
declare function DialogSurface({ children, size, presentation, preferredWidth, bodyInset, footerInset, viewportGutter, maxHeight, className, slot, }: DialogSurfaceProps): kerfjs.SafeHtml;
|
|
3816
|
+
declare function DialogSurface({ children, size, presentation, preferredWidth, bodyInset, footerInset, viewportGutter, maxHeight, height, bodyLayout, rootAttributes, className, slot, }: DialogSurfaceProps): kerfjs.SafeHtml;
|
|
3817
|
+
/** Where a PopoverDialogSurface appears: the top layer, or in flow. */
|
|
3818
|
+
type PopoverDialogSurfacePresentation = 'overlay' | 'embedded';
|
|
3819
|
+
/** Application `data-*` metadata on the surface root. */
|
|
3820
|
+
type PopoverDialogSurfaceDataAttributes = Readonly<Record<`data-${string}`, string>>;
|
|
3821
|
+
type PopoverDialogSurfaceName = {
|
|
3822
|
+
label: string;
|
|
3823
|
+
labelledBy?: never;
|
|
3824
|
+
} | {
|
|
3825
|
+
label?: never;
|
|
3826
|
+
labelledBy: string;
|
|
3827
|
+
};
|
|
3828
|
+
type PopoverDialogSurfaceProps = PopoverDialogSurfaceName & {
|
|
3829
|
+
/** The root id: what an opening control's `popovertarget` names. */
|
|
3830
|
+
id?: string;
|
|
3831
|
+
children: KerfUiContent;
|
|
3832
|
+
/**
|
|
3833
|
+
* `overlay` (default) is a native `popover="auto"` in the top layer:
|
|
3834
|
+
* non-modal, light dismiss (Escape or a press outside), nothing inert.
|
|
3835
|
+
* `embedded` renders the same surface in flow for a catalog or inline use.
|
|
3836
|
+
*/
|
|
3837
|
+
presentation?: PopoverDialogSurfacePresentation;
|
|
3838
|
+
/** Preferred width preset: 400px, 560px (default), or 800px. */
|
|
3839
|
+
size?: DialogSurfaceSize;
|
|
3840
|
+
/** Preferred width; takes precedence over `size`, within the viewport cap. */
|
|
3841
|
+
preferredWidth?: CssLength;
|
|
3842
|
+
/** Definite height, bounded by the dynamic viewport minus both gutters. */
|
|
3843
|
+
height?: DialogSurfaceHeight;
|
|
3844
|
+
/** Height cap, bounded the same way, for a surface that sizes to content. */
|
|
3845
|
+
maxHeight?: DialogSurfaceMaxHeight;
|
|
3846
|
+
/** Edge clearance on each side of the viewport (default 16px). */
|
|
3847
|
+
viewportGutter?: CssLength;
|
|
3848
|
+
/** Body layout (default `flow`); `fill` lets one child own the surface. */
|
|
3849
|
+
bodyLayout?: DialogSurfaceBodyLayout;
|
|
3850
|
+
rootAttributes?: PopoverDialogSurfaceDataAttributes;
|
|
3851
|
+
className?: string;
|
|
3852
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
3853
|
+
slot?: string;
|
|
3854
|
+
};
|
|
3855
|
+
/**
|
|
3856
|
+
* A non-modal dialog surface on the native Popover API: Kerf's dialog chrome,
|
|
3857
|
+
* viewport-bounded size, and single-child fill without application CSS.
|
|
3858
|
+
* Open it with a `popovertarget` control or `showPopover()`; it light
|
|
3859
|
+
* dismisses and leaves the page interactive. Use `DialogSurface` with
|
|
3860
|
+
* `wa-dialog` when the task must block the page.
|
|
3861
|
+
*/
|
|
3862
|
+
declare function PopoverDialogSurface({ id, children, label, labelledBy, presentation, size, preferredWidth, height, maxHeight, viewportGutter, bodyLayout, rootAttributes, className, slot, }: PopoverDialogSurfaceProps): kerfjs.SafeHtml;
|
|
3431
3863
|
type PopupSurfaceInset = 'standard' | 'compact' | 'list-zero';
|
|
3432
3864
|
interface PopupSurfaceProps {
|
|
3433
3865
|
children: KerfUiContent;
|
|
@@ -3439,7 +3871,7 @@ interface PopupSurfaceProps {
|
|
|
3439
3871
|
/** Configure recurring Web Awesome dropdown-menu geometry without consumer ::part() CSS. */
|
|
3440
3872
|
declare function PopupSurface({ children, inset, className, slot, }: PopupSurfaceProps): kerfjs.SafeHtml;
|
|
3441
3873
|
|
|
3442
|
-
export { DialogSurface, type DialogSurfaceMaxHeight, type DialogSurfacePresentation, type DialogSurfaceProps, type DialogSurfaceSize, PopupSurface, type PopupSurfaceInset, type PopupSurfaceProps, type SurfaceInset };
|
|
3874
|
+
export { DialogSurface, type DialogSurfaceBodyLayout, type DialogSurfaceHeight, type DialogSurfaceMaxHeight, type DialogSurfacePresentation, type DialogSurfaceProps, type DialogSurfaceRootAttributes, type DialogSurfaceSize, PopoverDialogSurface, type PopoverDialogSurfaceDataAttributes, type PopoverDialogSurfacePresentation, type PopoverDialogSurfaceProps, PopupSurface, type PopupSurfaceInset, type PopupSurfaceProps, type SurfaceInset };
|
|
3443
3875
|
```
|
|
3444
3876
|
|
|
3445
3877
|
## `@kerfjs/ui/text`
|
|
@@ -3466,6 +3898,19 @@ type TextFont = 'default' | 'monospace';
|
|
|
3466
3898
|
type TextBorder = 'transparent' | 'none';
|
|
3467
3899
|
type TextLineHeight = 'default' | 'tight';
|
|
3468
3900
|
type TextWrap = 'normal' | 'anywhere' | 'nowrap' | 'truncate';
|
|
3901
|
+
/** Inline alignment of the text's lines, in logical (writing-direction) terms. */
|
|
3902
|
+
type TextAlign = 'start' | 'center' | 'end';
|
|
3903
|
+
/**
|
|
3904
|
+
* Where `wrap="truncate"` places its ellipsis: `end` (default) keeps the
|
|
3905
|
+
* start, `start` keeps the tail (branch names, the end of an identifier), and
|
|
3906
|
+
* `middle` keeps both the start and a suffix (file paths).
|
|
3907
|
+
*/
|
|
3908
|
+
type TextTruncate = 'end' | 'middle' | 'start';
|
|
3909
|
+
/**
|
|
3910
|
+
* The suffix `truncate="middle"` always keeps: a number of trailing
|
|
3911
|
+
* characters, or `segment` for the last path segment with its separator.
|
|
3912
|
+
*/
|
|
3913
|
+
type TextTruncateKeep = number | 'segment';
|
|
3469
3914
|
type TextContent = KerfUiContent | string | number | readonly TextContent[];
|
|
3470
3915
|
type TextCommonProps = Omit<KerfBaseAttrs, 'children' | 'class' | 'className'> & {
|
|
3471
3916
|
/** Native heading, paragraph, or inline span element to render. Defaults to `p`. */
|
|
@@ -3486,6 +3931,8 @@ type TextCommonProps = Omit<KerfBaseAttrs, 'children' | 'class' | 'className'> &
|
|
|
3486
3931
|
flush?: boolean;
|
|
3487
3932
|
/** Use compact leading for short dialog or metadata copy. */
|
|
3488
3933
|
lineHeight?: TextLineHeight;
|
|
3934
|
+
/** Inline alignment of the lines (default `start`), for centered status copy. */
|
|
3935
|
+
align?: TextAlign;
|
|
3489
3936
|
children: TextContent;
|
|
3490
3937
|
class?: string;
|
|
3491
3938
|
className?: string;
|
|
@@ -3495,19 +3942,152 @@ type TextProps = TextCommonProps & ({
|
|
|
3495
3942
|
wrap?: 'normal' | 'anywhere';
|
|
3496
3943
|
/** Cap wrapped text to this positive number of lines. */
|
|
3497
3944
|
maxLines?: number;
|
|
3945
|
+
truncate?: never;
|
|
3946
|
+
truncateKeep?: never;
|
|
3498
3947
|
} | {
|
|
3499
|
-
/** Keep one line
|
|
3500
|
-
wrap: 'nowrap'
|
|
3948
|
+
/** Keep one line without an ellipsis. */
|
|
3949
|
+
wrap: 'nowrap';
|
|
3501
3950
|
maxLines?: never;
|
|
3951
|
+
truncate?: never;
|
|
3952
|
+
truncateKeep?: never;
|
|
3953
|
+
} | {
|
|
3954
|
+
/** Keep one line with an ellipsis. */
|
|
3955
|
+
wrap: 'truncate';
|
|
3956
|
+
maxLines?: never;
|
|
3957
|
+
/**
|
|
3958
|
+
* Where the ellipsis goes (default `end`). `start` and `middle` are
|
|
3959
|
+
* for left-to-right identifiers and paths, and `middle` requires
|
|
3960
|
+
* string or number children so it can split them.
|
|
3961
|
+
*/
|
|
3962
|
+
truncate?: TextTruncate;
|
|
3963
|
+
/**
|
|
3964
|
+
* The suffix `truncate="middle"` keeps (default `segment`: the last
|
|
3965
|
+
* path segment, or the last 10 characters when there is no `/` or
|
|
3966
|
+
* `\\` separator).
|
|
3967
|
+
*/
|
|
3968
|
+
truncateKeep?: TextTruncateKeep;
|
|
3502
3969
|
});
|
|
3503
3970
|
/**
|
|
3504
3971
|
* Semantic heading, paragraph, or inline text. Block variants use the standard
|
|
3505
3972
|
* content-item padding; `span` adds no box geometry.
|
|
3506
3973
|
* All ordinary native heading/paragraph attributes pass through to the element.
|
|
3507
3974
|
*/
|
|
3508
|
-
declare function Text({ variant: Variant, tone, color, size, font, border, flush, controlMargins, lineHeight, wrap, maxLines, children, class: classValue, className, style, ...attributes }: TextProps): kerfjs.SafeHtml;
|
|
3975
|
+
declare function Text({ variant: Variant, tone, color, size, font, border, flush, controlMargins, lineHeight, align, wrap, maxLines, truncate, truncateKeep, children, class: classValue, className, style, ...attributes }: TextProps): kerfjs.SafeHtml;
|
|
3509
3976
|
|
|
3510
|
-
export { FieldLabel, type FieldLabelProps, Sides, Text, type TextBorder, type TextContent, type TextFont, type TextLineHeight, type TextProps, type TextSize, type TextTone, type TextVariant, type TextWrap };
|
|
3977
|
+
export { FieldLabel, type FieldLabelProps, Sides, Text, type TextAlign, type TextBorder, type TextContent, type TextFont, type TextLineHeight, type TextProps, type TextSize, type TextTone, type TextTruncate, type TextTruncateKeep, type TextVariant, type TextWrap };
|
|
3978
|
+
```
|
|
3979
|
+
|
|
3980
|
+
## `@kerfjs/ui/framed-list`
|
|
3981
|
+
|
|
3982
|
+
```ts
|
|
3983
|
+
import * as kerfjs from 'kerfjs';
|
|
3984
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3985
|
+
|
|
3986
|
+
/** The frame's fill: the lowered surface (as `ValueTable`), or the page surface. */
|
|
3987
|
+
type FramedListSurface = 'lowered' | 'base';
|
|
3988
|
+
type FramedListRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
3989
|
+
'data-component'?: never;
|
|
3990
|
+
'data-surface'?: never;
|
|
3991
|
+
}>;
|
|
3992
|
+
type FramedListRowRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
3993
|
+
'data-component'?: never;
|
|
3994
|
+
'data-highlighted'?: never;
|
|
3995
|
+
}>;
|
|
3996
|
+
interface FramedListProps {
|
|
3997
|
+
/** `FramedListRow` children. */
|
|
3998
|
+
children: KerfUiContent;
|
|
3999
|
+
/** Accessible name for the list, when no heading names it. */
|
|
4000
|
+
label?: string;
|
|
4001
|
+
/** Frame fill; defaults to `lowered`, matching `ValueTable`. */
|
|
4002
|
+
surface?: FramedListSurface;
|
|
4003
|
+
id?: string;
|
|
4004
|
+
className?: string;
|
|
4005
|
+
/** Safe `data-*` metadata; FramedList-owned markers stay protected. */
|
|
4006
|
+
rootAttributes?: FramedListRootAttributes;
|
|
4007
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
4008
|
+
slot?: string;
|
|
4009
|
+
}
|
|
4010
|
+
interface FramedListRowProps {
|
|
4011
|
+
/** Arbitrary row content: a `Row` of copy and controls, a keycap, … */
|
|
4012
|
+
children: KerfUiContent;
|
|
4013
|
+
/** Tint the row (the row being edited or the current item). */
|
|
4014
|
+
highlighted?: boolean;
|
|
4015
|
+
id?: string;
|
|
4016
|
+
className?: string;
|
|
4017
|
+
/** Safe `data-*` metadata; FramedListRow-owned markers stay protected. */
|
|
4018
|
+
rootAttributes?: FramedListRowRootAttributes;
|
|
4019
|
+
}
|
|
4020
|
+
/**
|
|
4021
|
+
* An inset-grouped list (the settings-list pattern): one rounded, bordered
|
|
4022
|
+
* frame with 1px dividers between rows of arbitrary content. `ValueTable` is
|
|
4023
|
+
* the same frame for label/value facts; this one takes any row content.
|
|
4024
|
+
*/
|
|
4025
|
+
declare function FramedList({ children, label, surface, id, className, rootAttributes, slot, }: FramedListProps): kerfjs.SafeHtml;
|
|
4026
|
+
/** One row of a `FramedList`; it owns the row inset and the divider above it. */
|
|
4027
|
+
declare function FramedListRow({ children, highlighted, id, className, rootAttributes, }: FramedListRowProps): kerfjs.SafeHtml;
|
|
4028
|
+
|
|
4029
|
+
export { FramedList, type FramedListProps, FramedListRow, type FramedListRowProps, type FramedListSurface };
|
|
4030
|
+
```
|
|
4031
|
+
|
|
4032
|
+
## `@kerfjs/ui/summary-row`
|
|
4033
|
+
|
|
4034
|
+
```ts
|
|
4035
|
+
import { SafeHtml } from 'kerfjs';
|
|
4036
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
4037
|
+
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
4038
|
+
|
|
4039
|
+
/** `row` for a list section; `card` for a board column. */
|
|
4040
|
+
type SummaryRowPresentation = 'row' | 'card';
|
|
4041
|
+
/** A row's place in a rounded list section, so its corners match. */
|
|
4042
|
+
type SummaryRowListEdge = 'start' | 'end' | 'only';
|
|
4043
|
+
type SummaryRowRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4044
|
+
'data-component'?: never;
|
|
4045
|
+
'data-presentation'?: never;
|
|
4046
|
+
'data-list-edge'?: never;
|
|
4047
|
+
'data-rail'?: never;
|
|
4048
|
+
'data-selected'?: never;
|
|
4049
|
+
'data-dimmed'?: never;
|
|
4050
|
+
}>;
|
|
4051
|
+
interface SummaryRowProps {
|
|
4052
|
+
/** The identity line: an identifier, inline status glyphs, and the title. */
|
|
4053
|
+
title: KerfUiContent;
|
|
4054
|
+
/** Optional leading glyph, such as a category icon. */
|
|
4055
|
+
leading?: SafeHtml;
|
|
4056
|
+
/** Quiet text at the end of the title line, such as a relative time. */
|
|
4057
|
+
trailingMeta?: string | SafeHtml;
|
|
4058
|
+
/** A wrapping line of badges, chips, and quiet text below the title. */
|
|
4059
|
+
metadata?: KerfUiContent;
|
|
4060
|
+
/** `row` (default) or `card`. */
|
|
4061
|
+
presentation?: SummaryRowPresentation;
|
|
4062
|
+
/** Title lines before clipping; default 2 for a row and 4 for a card. */
|
|
4063
|
+
titleLines?: number;
|
|
4064
|
+
/** A leading state rail in a semantic tone (Up Next, blocked, …). */
|
|
4065
|
+
rail?: SemanticTone;
|
|
4066
|
+
/** Selected state, exposed as `aria-selected`. */
|
|
4067
|
+
selected?: boolean;
|
|
4068
|
+
/** Dim a finished or cut item; hover and selection restore it. */
|
|
4069
|
+
dimmed?: boolean;
|
|
4070
|
+
/** Round the corners that meet a rounded list section's edge. */
|
|
4071
|
+
listEdge?: SummaryRowListEdge;
|
|
4072
|
+
/** Skip rendering while off screen in long lists (`content-visibility`). */
|
|
4073
|
+
deferRendering?: boolean;
|
|
4074
|
+
/** Accessible name when the visible content is not a good one. */
|
|
4075
|
+
ariaLabel?: string;
|
|
4076
|
+
id?: string;
|
|
4077
|
+
className?: string;
|
|
4078
|
+
/** Safe `data-*` identity (an item id or delegated action) on the option. */
|
|
4079
|
+
rootAttributes?: SummaryRowRootAttributes;
|
|
4080
|
+
}
|
|
4081
|
+
/**
|
|
4082
|
+
* A selectable, keyboard-focusable summary of one item, as a list row or a
|
|
4083
|
+
* board card: an optional leading glyph and state rail, a clamped identity line
|
|
4084
|
+
* with trailing quiet metadata, and a wrapping metadata line. It is a
|
|
4085
|
+
* `role="option"`; place rows in a labeled `role="listbox"` and own selection
|
|
4086
|
+
* and keyboard movement in the application.
|
|
4087
|
+
*/
|
|
4088
|
+
declare function SummaryRow({ title, leading, trailingMeta, metadata, presentation, titleLines, rail, selected, dimmed, listEdge, deferRendering, ariaLabel, id, className, rootAttributes, }: SummaryRowProps): SafeHtml;
|
|
4089
|
+
|
|
4090
|
+
export { SummaryRow, type SummaryRowListEdge, type SummaryRowPresentation, type SummaryRowProps };
|
|
3511
4091
|
```
|
|
3512
4092
|
|
|
3513
4093
|
## `@kerfjs/ui/row`
|
|
@@ -3515,12 +4095,13 @@ export { FieldLabel, type FieldLabelProps, Sides, Text, type TextBorder, type Te
|
|
|
3515
4095
|
```ts
|
|
3516
4096
|
import * as kerfjs from 'kerfjs';
|
|
3517
4097
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
4098
|
+
import { S as StructuralRootAttributes } from './extension-attributes-mu8MFUl0.js';
|
|
3518
4099
|
import { H as HorizontalAlignment, V as VerticalAlignment } from './flex-alignment-4ms8ZbV8.js';
|
|
3519
4100
|
import { S as Sides } from './sides-BPSWde0A.js';
|
|
3520
4101
|
import { UiGap, CssFlexKeyword, CssFlex } from './css-values.js';
|
|
3521
4102
|
export { CssLength, UiGapValue, UiSpaceName } from './css-values.js';
|
|
3522
4103
|
|
|
3523
|
-
type RowRootAttributes =
|
|
4104
|
+
type RowRootAttributes = StructuralRootAttributes & Readonly<{
|
|
3524
4105
|
'data-component'?: never;
|
|
3525
4106
|
'data-h-align'?: never;
|
|
3526
4107
|
'data-v-align'?: never;
|
|
@@ -3553,7 +4134,10 @@ interface RowProps {
|
|
|
3553
4134
|
/** Physical sides that receive the standard 8px control inset. Text insets win on overlap. */
|
|
3554
4135
|
controlInsets?: Sides;
|
|
3555
4136
|
className?: string;
|
|
3556
|
-
/**
|
|
4137
|
+
/**
|
|
4138
|
+
* Safe `data-*`, `aria-*`, and structural `role` metadata (a named
|
|
4139
|
+
* `region`, a `group`); Row-owned structural attributes remain protected.
|
|
4140
|
+
*/
|
|
3557
4141
|
rootAttributes?: RowRootAttributes;
|
|
3558
4142
|
/** Native named-slot assignment when composed inside a web component. */
|
|
3559
4143
|
slot?: string;
|
|
@@ -3627,6 +4211,91 @@ declare function Grid({ children, selectionMode, ariaLabel, columns, minColumnWi
|
|
|
3627
4211
|
export { CssFlex, CssFlexKeyword, CssLength, Grid, type GridProps, Sides, UiGap };
|
|
3628
4212
|
```
|
|
3629
4213
|
|
|
4214
|
+
## `@kerfjs/ui/column-track`
|
|
4215
|
+
|
|
4216
|
+
```ts
|
|
4217
|
+
import * as kerfjs from 'kerfjs';
|
|
4218
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
4219
|
+
import { S as StructuralRootAttributes } from './extension-attributes-mu8MFUl0.js';
|
|
4220
|
+
import { CssLength } from './css-values.js';
|
|
4221
|
+
|
|
4222
|
+
/** `scroll` keeps equal min-width columns; `paged` shows one near-full-width column per page. */
|
|
4223
|
+
type ColumnTrackLayout = 'scroll' | 'paged';
|
|
4224
|
+
type ColumnTrackRootAttributes = StructuralRootAttributes & Readonly<{
|
|
4225
|
+
'data-component'?: never;
|
|
4226
|
+
'data-layout'?: never;
|
|
4227
|
+
}>;
|
|
4228
|
+
interface ColumnTrackProps {
|
|
4229
|
+
/** The columns, in order; each owns its own inset and scrolling. */
|
|
4230
|
+
children: KerfUiContent;
|
|
4231
|
+
/**
|
|
4232
|
+
* `scroll` (default): equal columns that never shrink below
|
|
4233
|
+
* `minColumnWidth`, so a narrow track scrolls sideways instead of crushing
|
|
4234
|
+
* them. `paged`: each column is nearly the visible width, the next one peeks
|
|
4235
|
+
* in, and scrolling snaps to column starts.
|
|
4236
|
+
*/
|
|
4237
|
+
layout?: ColumnTrackLayout;
|
|
4238
|
+
/** Narrowest a `scroll` column gets before the track scrolls; default 250px. */
|
|
4239
|
+
minColumnWidth?: CssLength;
|
|
4240
|
+
/** How much of the next column a `paged` track shows; default 24px. */
|
|
4241
|
+
peek?: CssLength;
|
|
4242
|
+
id?: string;
|
|
4243
|
+
className?: string;
|
|
4244
|
+
/** Safe `data-*`, `aria-*`, and structural `role` metadata on the scroller. */
|
|
4245
|
+
rootAttributes?: ColumnTrackRootAttributes;
|
|
4246
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
4247
|
+
slot?: string;
|
|
4248
|
+
}
|
|
4249
|
+
/**
|
|
4250
|
+
* A horizontal track of columns (a kanban board): the track is the sideways
|
|
4251
|
+
* scroll owner and fills its parent's height; columns sit flush and own their
|
|
4252
|
+
* insets and vertical scrolling. Kerf owns the overflow, the paged snapping,
|
|
4253
|
+
* and reduced motion.
|
|
4254
|
+
*/
|
|
4255
|
+
declare function ColumnTrack({ children, layout, minColumnWidth, peek, id, className, rootAttributes, slot, }: ColumnTrackProps): kerfjs.SafeHtml;
|
|
4256
|
+
|
|
4257
|
+
export { ColumnTrack, type ColumnTrackLayout, type ColumnTrackProps };
|
|
4258
|
+
```
|
|
4259
|
+
|
|
4260
|
+
## `@kerfjs/ui/content-swap`
|
|
4261
|
+
|
|
4262
|
+
```ts
|
|
4263
|
+
import * as kerfjs from 'kerfjs';
|
|
4264
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
4265
|
+
|
|
4266
|
+
type ContentSwapSide = 'a' | 'b';
|
|
4267
|
+
type ContentSwapTransition = 'none' | 'crossfade' | 'push';
|
|
4268
|
+
/** `forward` pushes the incoming side in from the inline end; `backward` from the start. */
|
|
4269
|
+
type ContentSwapDirection = 'forward' | 'backward';
|
|
4270
|
+
interface ContentSwapProps {
|
|
4271
|
+
/** Which side is shown. Changing it runs the transition. */
|
|
4272
|
+
active: ContentSwapSide;
|
|
4273
|
+
a: KerfUiContent;
|
|
4274
|
+
b: KerfUiContent;
|
|
4275
|
+
/** `push` (default) slides the sides, `crossfade` fades them, `none` swaps instantly. */
|
|
4276
|
+
transition?: ContentSwapTransition;
|
|
4277
|
+
/** Push direction; mirrors in right-to-left documents. Default `forward`. */
|
|
4278
|
+
direction?: ContentSwapDirection;
|
|
4279
|
+
/** Accessible name; when set, the swap is a named region. */
|
|
4280
|
+
label?: string;
|
|
4281
|
+
/** Span the full width of its slot (a dialog label or footer) instead of its content. */
|
|
4282
|
+
fill?: boolean;
|
|
4283
|
+
className?: string;
|
|
4284
|
+
/** Native named-slot assignment, such as a dialog's `label` or `footer`. */
|
|
4285
|
+
slot?: string;
|
|
4286
|
+
}
|
|
4287
|
+
/**
|
|
4288
|
+
* Two content sides sharing one cell (a dialog body that steps to a second
|
|
4289
|
+
* page, a footer whose actions change), with the swap animated in place.
|
|
4290
|
+
* Kerf owns the motion, the reduced-motion fallback, and the inactive side's
|
|
4291
|
+
* `inert`/`aria-hidden`. Use `NavStack` for full views with their own
|
|
4292
|
+
* toolbars.
|
|
4293
|
+
*/
|
|
4294
|
+
declare function ContentSwap({ active, a, b, transition, direction, label, fill, className, slot, }: ContentSwapProps): kerfjs.SafeHtml;
|
|
4295
|
+
|
|
4296
|
+
export { ContentSwap, type ContentSwapDirection, type ContentSwapProps, type ContentSwapSide, type ContentSwapTransition };
|
|
4297
|
+
```
|
|
4298
|
+
|
|
3630
4299
|
## `@kerfjs/ui/spacer`
|
|
3631
4300
|
|
|
3632
4301
|
```ts
|
|
@@ -3658,21 +4327,77 @@ import 'kerfjs';
|
|
|
3658
4327
|
import './semantic-content-BbzjvSu9.js';
|
|
3659
4328
|
```
|
|
3660
4329
|
|
|
4330
|
+
## `@kerfjs/ui/combobox`
|
|
4331
|
+
|
|
4332
|
+
```ts
|
|
4333
|
+
import * as kerfjs from 'kerfjs';
|
|
4334
|
+
|
|
4335
|
+
/** A suggestion: a plain string, or a value with a distinct visible label. */
|
|
4336
|
+
type ComboboxSuggestion = string | {
|
|
4337
|
+
value: string;
|
|
4338
|
+
label: string;
|
|
4339
|
+
};
|
|
4340
|
+
interface ComboboxProps {
|
|
4341
|
+
/** Unique id; it also identifies the field in `wireComboboxes` reports. */
|
|
4342
|
+
id: string;
|
|
4343
|
+
/** Visible field label. */
|
|
4344
|
+
label: string;
|
|
4345
|
+
/** Suggestions to filter as the person types. */
|
|
4346
|
+
suggestions: readonly ComboboxSuggestion[];
|
|
4347
|
+
/** Initial text; the field owns its text while the person types. */
|
|
4348
|
+
value?: string;
|
|
4349
|
+
placeholder?: string;
|
|
4350
|
+
/** Optional hint below the field, such as "Press Enter to add". */
|
|
4351
|
+
hint?: string;
|
|
4352
|
+
/** Form field name. */
|
|
4353
|
+
name?: string;
|
|
4354
|
+
/**
|
|
4355
|
+
* Offer to create the typed text when it matches no suggestion; the option
|
|
4356
|
+
* reads `createLabel` with `{value}` replaced. Omit to only allow
|
|
4357
|
+
* suggestions. Default `Create “{value}”`.
|
|
4358
|
+
*/
|
|
4359
|
+
createLabel?: string | false;
|
|
4360
|
+
disabled?: boolean;
|
|
4361
|
+
className?: string;
|
|
4362
|
+
}
|
|
4363
|
+
/**
|
|
4364
|
+
* A free-text field with a filtered suggestion list that can also create a new
|
|
4365
|
+
* value: the ARIA combobox pattern on a native input with the themed Web
|
|
4366
|
+
* Awesome field chrome. `wireComboboxes` filters, moves the active option,
|
|
4367
|
+
* and reports commits (Enter, comma, or a click). Use `Select` when only
|
|
4368
|
+
* existing values are allowed and nothing is typed.
|
|
4369
|
+
*/
|
|
4370
|
+
declare function Combobox({ id, label, suggestions, value, placeholder, hint, name, createLabel, disabled, className, }: ComboboxProps): kerfjs.SafeHtml;
|
|
4371
|
+
|
|
4372
|
+
export { Combobox, type ComboboxProps, type ComboboxSuggestion };
|
|
4373
|
+
```
|
|
4374
|
+
|
|
3661
4375
|
## `@kerfjs/ui/anchored-surface`
|
|
3662
4376
|
|
|
3663
4377
|
```ts
|
|
3664
4378
|
import { PopoverOptions, OverlayContent, OverlayHandle } from 'kerfjs/overlay';
|
|
3665
4379
|
|
|
3666
4380
|
/** App-facing options for a non-modal, arbitrary-content help surface. */
|
|
3667
|
-
interface AnchoredSurfaceOptions extends Pick<PopoverOptions, 'placement' | 'align' | 'gap' | 'dismiss' | 'initialFocus' | 'onDismiss' | 'outsideIgnore'> {
|
|
4381
|
+
interface AnchoredSurfaceOptions extends Pick<PopoverOptions, 'placement' | 'align' | 'gap' | 'dismiss' | 'initialFocus' | 'onDismiss' | 'outsideIgnore' | 'container'> {
|
|
3668
4382
|
/** Accessible name for the non-modal dialog. */
|
|
3669
4383
|
label: string;
|
|
4384
|
+
/**
|
|
4385
|
+
* Where to append the surface. Default: inside the anchor's open modal
|
|
4386
|
+
* dialog — a native `<dialog>`'s host slot, or a slot kerf creates in a
|
|
4387
|
+
* `wa-dialog` / `wa-drawer` — so the surface stays interactive there;
|
|
4388
|
+
* otherwise `document.body`. Pass an element only for a modal context kerf
|
|
4389
|
+
* cannot resolve; an element inside an open modal closes the surface with it.
|
|
4390
|
+
*/
|
|
4391
|
+
container?: Element;
|
|
3670
4392
|
}
|
|
3671
4393
|
/** A viewport pointer location; `context` is the element under the pointer. */
|
|
3672
4394
|
interface AnchoredSurfacePoint {
|
|
3673
4395
|
x: number;
|
|
3674
4396
|
y: number;
|
|
3675
|
-
/**
|
|
4397
|
+
/**
|
|
4398
|
+
* Pass the event target when opening from inside a modal dialog, native or
|
|
4399
|
+
* Web Awesome (`wa-dialog`, `wa-drawer`).
|
|
4400
|
+
*/
|
|
3676
4401
|
context?: Element;
|
|
3677
4402
|
}
|
|
3678
4403
|
/**
|
|
@@ -3692,3 +4417,289 @@ declare function openAnchoredSurfaceAt(point: AnchoredSurfacePoint, content: Ove
|
|
|
3692
4417
|
|
|
3693
4418
|
export { type AnchoredSurfaceOptions, type AnchoredSurfacePoint, openAnchoredSurface, openAnchoredSurfaceAt };
|
|
3694
4419
|
```
|
|
4420
|
+
|
|
4421
|
+
## `@kerfjs/ui/icon-button`
|
|
4422
|
+
|
|
4423
|
+
```ts
|
|
4424
|
+
import * as kerfjs from 'kerfjs';
|
|
4425
|
+
import { LucideNode } from './lucide-icon.js';
|
|
4426
|
+
import 'lucide';
|
|
4427
|
+
import './css-values.js';
|
|
4428
|
+
|
|
4429
|
+
type IconButtonAppearance = 'accent' | 'filled' | 'outlined' | 'filled-outlined' | 'plain';
|
|
4430
|
+
type IconButtonVariant = 'neutral' | 'brand' | 'success' | 'warning' | 'danger';
|
|
4431
|
+
type IconButtonSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
4432
|
+
type IconButtonRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4433
|
+
'data-component'?: never;
|
|
4434
|
+
'data-action'?: never;
|
|
4435
|
+
}>;
|
|
4436
|
+
interface IconButtonProps {
|
|
4437
|
+
/** The Lucide-compatible icon node shown alone in the button. */
|
|
4438
|
+
icon: LucideNode;
|
|
4439
|
+
/** The icon's stable name, as `LucideIcon` takes it. */
|
|
4440
|
+
iconName: string;
|
|
4441
|
+
/** Accessible name; the button has no visible text, so it is required. */
|
|
4442
|
+
label: string;
|
|
4443
|
+
/** Delegated `data-action` the application handles. */
|
|
4444
|
+
action?: string;
|
|
4445
|
+
/** Web Awesome appearance; defaults to Web Awesome's own. */
|
|
4446
|
+
appearance?: IconButtonAppearance;
|
|
4447
|
+
/** Web Awesome semantic variant; defaults to Web Awesome's own. */
|
|
4448
|
+
variant?: IconButtonVariant;
|
|
4449
|
+
/** Web Awesome control size; the square follows its control height. */
|
|
4450
|
+
size?: IconButtonSize;
|
|
4451
|
+
type?: 'button' | 'submit' | 'reset';
|
|
4452
|
+
disabled?: boolean;
|
|
4453
|
+
id?: string;
|
|
4454
|
+
className?: string;
|
|
4455
|
+
/** Safe `data-*` metadata; `data-component` and `data-action` stay owned. */
|
|
4456
|
+
rootAttributes?: IconButtonRootAttributes;
|
|
4457
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
4458
|
+
slot?: string;
|
|
4459
|
+
}
|
|
4460
|
+
/**
|
|
4461
|
+
* An icon-only Web Awesome button with a `LucideIcon`: square, one form
|
|
4462
|
+
* control height on each side, so it matches an adjacent `wa-input` or
|
|
4463
|
+
* `Select`. Web Awesome squares a button only for a lone `wa-icon`; this is
|
|
4464
|
+
* the Kerf form for Lucide icons. Register `wa-button` once
|
|
4465
|
+
* (`@awesome.me/webawesome/dist/components/button/button.js`).
|
|
4466
|
+
*/
|
|
4467
|
+
declare function IconButton({ icon, iconName, label, action, appearance, variant, size, type, disabled, id, className, rootAttributes, slot, }: IconButtonProps): kerfjs.SafeHtml;
|
|
4468
|
+
|
|
4469
|
+
export { IconButton, type IconButtonAppearance, type IconButtonProps, type IconButtonSize, type IconButtonVariant };
|
|
4470
|
+
```
|
|
4471
|
+
|
|
4472
|
+
## `@kerfjs/ui/icon-toggle-button`
|
|
4473
|
+
|
|
4474
|
+
```ts
|
|
4475
|
+
import * as kerfjs from 'kerfjs';
|
|
4476
|
+
import { LucideNode } from './lucide-icon.js';
|
|
4477
|
+
import 'lucide';
|
|
4478
|
+
import './css-values.js';
|
|
4479
|
+
|
|
4480
|
+
/** Corner shape: fully round `pill` (default) or a softer `rounded` square. */
|
|
4481
|
+
type IconToggleButtonShape = 'pill' | 'rounded';
|
|
4482
|
+
type IconToggleButtonRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4483
|
+
'data-component'?: never;
|
|
4484
|
+
'data-action'?: never;
|
|
4485
|
+
'data-shape'?: never;
|
|
4486
|
+
}>;
|
|
4487
|
+
interface IconToggleButtonProps {
|
|
4488
|
+
/** The Lucide-compatible icon node. */
|
|
4489
|
+
icon: LucideNode;
|
|
4490
|
+
/** The icon's stable name, as `LucideIcon` takes it. */
|
|
4491
|
+
iconName: string;
|
|
4492
|
+
/** Accessible name and hover help tag; required because no text is shown. */
|
|
4493
|
+
label: string;
|
|
4494
|
+
/** Pressed state, exposed as `aria-pressed`; the application owns it. */
|
|
4495
|
+
pressed: boolean;
|
|
4496
|
+
/** Delegated `data-action` the application handles to flip `pressed`. */
|
|
4497
|
+
action?: string;
|
|
4498
|
+
shape?: IconToggleButtonShape;
|
|
4499
|
+
disabled?: boolean;
|
|
4500
|
+
id?: string;
|
|
4501
|
+
className?: string;
|
|
4502
|
+
/** Safe `data-*` metadata; IconToggleButton-owned markers stay protected. */
|
|
4503
|
+
rootAttributes?: IconToggleButtonRootAttributes;
|
|
4504
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
4505
|
+
slot?: string;
|
|
4506
|
+
}
|
|
4507
|
+
/**
|
|
4508
|
+
* A standalone, icon-only toggle: a native `<button aria-pressed>` with the
|
|
4509
|
+
* geometry and pressed chrome of a single contained `ToolbarControlGroup`
|
|
4510
|
+
* (44px, a 2px-inset face that rises when pressed), for content and pane
|
|
4511
|
+
* footers where no `Toolbar` belongs. Inside a toolbar, use a
|
|
4512
|
+
* `ToolbarControlGroup` instead.
|
|
4513
|
+
*/
|
|
4514
|
+
declare function IconToggleButton({ icon, iconName, label, pressed, action, shape, disabled, id, className, rootAttributes, slot, }: IconToggleButtonProps): kerfjs.SafeHtml;
|
|
4515
|
+
|
|
4516
|
+
export { IconToggleButton, type IconToggleButtonProps, type IconToggleButtonShape };
|
|
4517
|
+
```
|
|
4518
|
+
|
|
4519
|
+
## `@kerfjs/ui/split-button`
|
|
4520
|
+
|
|
4521
|
+
```ts
|
|
4522
|
+
import { SafeHtml } from 'kerfjs';
|
|
4523
|
+
|
|
4524
|
+
/** The loud fill the whole split button paints. */
|
|
4525
|
+
type SplitButtonTone = 'brand' | 'neutral' | 'success' | 'warning' | 'danger';
|
|
4526
|
+
type SplitButtonRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
4527
|
+
'data-component'?: never;
|
|
4528
|
+
'data-tone'?: never;
|
|
4529
|
+
'data-fill'?: never;
|
|
4530
|
+
'data-busy'?: never;
|
|
4531
|
+
}>;
|
|
4532
|
+
interface SplitButtonProps {
|
|
4533
|
+
/** Visible primary label. */
|
|
4534
|
+
label: string;
|
|
4535
|
+
/** Delegated `data-action` of the primary half. */
|
|
4536
|
+
action: string;
|
|
4537
|
+
/** Optional decorative leading icon of the primary half. */
|
|
4538
|
+
icon?: SafeHtml;
|
|
4539
|
+
/** Primary accessible name when it should say more than `label`. */
|
|
4540
|
+
accessibleLabel?: string;
|
|
4541
|
+
/** Accessible name (and tooltip) of the options trigger. */
|
|
4542
|
+
optionsLabel: string;
|
|
4543
|
+
/** Delegated `data-action` of the options trigger, which opens the app's menu. */
|
|
4544
|
+
optionsAction: string;
|
|
4545
|
+
/** Whether the options menu is open, exposed as `aria-expanded`. */
|
|
4546
|
+
optionsExpanded?: boolean;
|
|
4547
|
+
/** What the options trigger opens, exposed as `aria-haspopup`; defaults to `menu`. */
|
|
4548
|
+
optionsPopup?: 'menu' | 'dialog' | 'listbox';
|
|
4549
|
+
/** Element id the options trigger controls, exposed as `aria-controls`. */
|
|
4550
|
+
optionsControls?: string;
|
|
4551
|
+
/** The loud fill; defaults to `brand`. Switch it (for example to `neutral`) while running. */
|
|
4552
|
+
tone?: SplitButtonTone;
|
|
4553
|
+
/** Span the full width of the parent instead of sizing to the label. */
|
|
4554
|
+
fill?: boolean;
|
|
4555
|
+
/** Show work in progress: a spinner replaces the icon and the primary is `aria-busy`. */
|
|
4556
|
+
busy?: boolean;
|
|
4557
|
+
/** Disable the primary half. */
|
|
4558
|
+
disabled?: boolean;
|
|
4559
|
+
/** Disable the options trigger. */
|
|
4560
|
+
optionsDisabled?: boolean;
|
|
4561
|
+
/** Native tooltip of the primary half, for example why it is disabled. */
|
|
4562
|
+
title?: string;
|
|
4563
|
+
className?: string;
|
|
4564
|
+
/** Safe `data-*` metadata; SplitButton-owned markers stay protected. */
|
|
4565
|
+
rootAttributes?: SplitButtonRootAttributes;
|
|
4566
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
4567
|
+
slot?: string;
|
|
4568
|
+
}
|
|
4569
|
+
/**
|
|
4570
|
+
* A primary action with an attached options trigger on one loud, semantic
|
|
4571
|
+
* fill (a "Drive" button with a provider menu). Both halves are native
|
|
4572
|
+
* buttons, so `aria-expanded` and the accessible names reach assistive
|
|
4573
|
+
* technology directly; the application opens its own menu from the options
|
|
4574
|
+
* action and owns the running state.
|
|
4575
|
+
*/
|
|
4576
|
+
declare function SplitButton({ label, action, icon, accessibleLabel, optionsLabel, optionsAction, optionsExpanded, optionsPopup, optionsControls, tone, fill, busy, disabled, optionsDisabled, title, className, rootAttributes, slot, }: SplitButtonProps): SafeHtml;
|
|
4577
|
+
|
|
4578
|
+
export { SplitButton, type SplitButtonProps, type SplitButtonTone };
|
|
4579
|
+
```
|
|
4580
|
+
|
|
4581
|
+
## `@kerfjs/ui/file-picker`
|
|
4582
|
+
|
|
4583
|
+
```ts
|
|
4584
|
+
import { SafeHtml } from 'kerfjs';
|
|
4585
|
+
|
|
4586
|
+
interface FileInputProps {
|
|
4587
|
+
/** Accepted types, as the native `accept` attribute (`.png,image/*`). */
|
|
4588
|
+
accept?: string;
|
|
4589
|
+
/** Allow several files at once. */
|
|
4590
|
+
multiple?: boolean;
|
|
4591
|
+
/** Form field name of the native file input. */
|
|
4592
|
+
name?: string;
|
|
4593
|
+
/** Identifies this picker in `wireFilePickers` reports. */
|
|
4594
|
+
pickerId?: string;
|
|
4595
|
+
disabled?: boolean;
|
|
4596
|
+
className?: string;
|
|
4597
|
+
}
|
|
4598
|
+
interface FilePickerTriggerProps extends FileInputProps {
|
|
4599
|
+
/** Visible trigger text, such as "Add". */
|
|
4600
|
+
label: string;
|
|
4601
|
+
/** Accessible name of the file input when it should say more than `label`. */
|
|
4602
|
+
accessibleLabel?: string;
|
|
4603
|
+
/** Optional decorative leading icon, normally an unsized LucideIcon. */
|
|
4604
|
+
icon?: SafeHtml;
|
|
4605
|
+
}
|
|
4606
|
+
interface FileDropZoneProps extends FileInputProps {
|
|
4607
|
+
/** Primary copy, such as "Drop attachments here or browse". */
|
|
4608
|
+
title: string;
|
|
4609
|
+
/** Optional secondary copy, such as accepted types or a size limit. */
|
|
4610
|
+
detail?: string;
|
|
4611
|
+
/** Optional decorative icon above the copy, normally an unsized LucideIcon. */
|
|
4612
|
+
icon?: SafeHtml;
|
|
4613
|
+
/** Accessible name of the file input when it should say more than `title`. */
|
|
4614
|
+
accessibleLabel?: string;
|
|
4615
|
+
}
|
|
4616
|
+
/**
|
|
4617
|
+
* A compact, link-toned trigger that opens the native file chooser: a label
|
|
4618
|
+
* around a visually hidden `<input type="file">`, so a click or keyboard
|
|
4619
|
+
* activation reaches the input without script. Report choices with
|
|
4620
|
+
* `wireFilePickers`.
|
|
4621
|
+
*/
|
|
4622
|
+
declare function FilePickerTrigger(props: FilePickerTriggerProps): SafeHtml;
|
|
4623
|
+
/**
|
|
4624
|
+
* A dashed drop target that also opens the file chooser when clicked. While
|
|
4625
|
+
* files are dragged over it, `wireFilePickers` sets `data-dragging` and Kerf
|
|
4626
|
+
* highlights it; dropped and chosen files are reported the same way.
|
|
4627
|
+
*/
|
|
4628
|
+
declare function FileDropZone(props: FileDropZoneProps): SafeHtml;
|
|
4629
|
+
|
|
4630
|
+
export { FileDropZone, type FileDropZoneProps, FilePickerTrigger, type FilePickerTriggerProps };
|
|
4631
|
+
```
|
|
4632
|
+
|
|
4633
|
+
## `@kerfjs/ui/corner-status`
|
|
4634
|
+
|
|
4635
|
+
```ts
|
|
4636
|
+
import * as kerfjs from 'kerfjs';
|
|
4637
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
4638
|
+
|
|
4639
|
+
/** The viewport corner a CornerStatus occupies, in logical (RTL-aware) terms. */
|
|
4640
|
+
type CornerStatusPlacement = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
4641
|
+
/** Where a CornerStatus appears: the top layer, or in flow. */
|
|
4642
|
+
type CornerStatusPresentation = 'overlay' | 'embedded';
|
|
4643
|
+
interface CornerStatusProps {
|
|
4644
|
+
/** The root id: what a `popovertarget` control or `getElementById` names. */
|
|
4645
|
+
id?: string;
|
|
4646
|
+
/** One or more `StateBanner`s, typically `urgency="status"`; they stack. */
|
|
4647
|
+
children: KerfUiContent;
|
|
4648
|
+
/** Viewport corner; defaults to `bottom-end`. */
|
|
4649
|
+
placement?: CornerStatusPlacement;
|
|
4650
|
+
/**
|
|
4651
|
+
* `overlay` (default) is a native `popover="manual"` host in the top layer,
|
|
4652
|
+
* opened by `wireCornerStatus`: above fixed and z-indexed page chrome,
|
|
4653
|
+
* never focused, and with no close button, light dismiss, or Escape.
|
|
4654
|
+
* `embedded` renders the same stack in flow for a catalog or inline use.
|
|
4655
|
+
*/
|
|
4656
|
+
presentation?: CornerStatusPresentation;
|
|
4657
|
+
className?: string;
|
|
4658
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
4659
|
+
slot?: string;
|
|
4660
|
+
}
|
|
4661
|
+
/**
|
|
4662
|
+
* A non-dismissible status surface pinned to a viewport corner — "Loading…",
|
|
4663
|
+
* "Updating tickets… 3 of 12" — for app-level progress that has no better
|
|
4664
|
+
* home beside the affected work. The application owns its lifetime: render it
|
|
4665
|
+
* while the work runs and remove it when the work ends. It carries no role of
|
|
4666
|
+
* its own; the composed `StateBanner` is the polite live region. Use a toast
|
|
4667
|
+
* for transient, dismissible confirmation instead.
|
|
4668
|
+
*/
|
|
4669
|
+
declare function CornerStatus({ id, children, placement, presentation, className, slot, }: CornerStatusProps): kerfjs.SafeHtml;
|
|
4670
|
+
|
|
4671
|
+
export { CornerStatus, type CornerStatusPlacement, type CornerStatusPresentation, type CornerStatusProps };
|
|
4672
|
+
```
|
|
4673
|
+
|
|
4674
|
+
## `@kerfjs/ui/edge-activity-indicator`
|
|
4675
|
+
|
|
4676
|
+
```ts
|
|
4677
|
+
import * as kerfjs from 'kerfjs';
|
|
4678
|
+
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
4679
|
+
|
|
4680
|
+
interface EdgeActivityIndicatorProps {
|
|
4681
|
+
/** Whether work is in progress; shows the strip and runs its wave. */
|
|
4682
|
+
busy: boolean;
|
|
4683
|
+
/**
|
|
4684
|
+
* Optional status shown in a small pill hanging from the edge while busy.
|
|
4685
|
+
* The pill is a polite live region; omit it for a purely decorative strip.
|
|
4686
|
+
*/
|
|
4687
|
+
message?: string;
|
|
4688
|
+
/** Strip and pill color; defaults to `info`. */
|
|
4689
|
+
tone?: SemanticTone;
|
|
4690
|
+
/** Clear the device's top safe area (default) or sit at the very edge. */
|
|
4691
|
+
inset?: 'safe-area' | 'none';
|
|
4692
|
+
className?: string;
|
|
4693
|
+
}
|
|
4694
|
+
/**
|
|
4695
|
+
* A layout-free activity strip pinned to the top edge of the viewport: a row
|
|
4696
|
+
* of thin bars that ripple in a traveling wave while `busy`, plus an optional
|
|
4697
|
+
* hanging status pill. It allocates no layout, ignores the pointer, and its
|
|
4698
|
+
* bars are hidden from assistive technology; only the pill announces.
|
|
4699
|
+
* Kerf owns the motion: it scales in from the edge and, under reduced motion,
|
|
4700
|
+
* only fades.
|
|
4701
|
+
*/
|
|
4702
|
+
declare function EdgeActivityIndicator({ busy, message, tone, inset, className, }: EdgeActivityIndicatorProps): kerfjs.SafeHtml;
|
|
4703
|
+
|
|
4704
|
+
export { EdgeActivityIndicator, type EdgeActivityIndicatorProps };
|
|
4705
|
+
```
|