@kerfjs/ui 5.0.0-beta.95 → 5.0.0-beta.97
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 +1330 -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 +20 -7
- package/ai/components/list-item.md +17 -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 +55 -53
- 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 +152 -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 +53 -0
- package/dist/styles/components/collections/list-item/list-item.css +59 -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 +30 -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 +53 -0
- package/dist/styles/list-item.css +59 -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 +30 -1
- package/dist/styles/toolbar-control-group.css +152 -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 +30 -6
- package/docs/component-selection.md +165 -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 +138 -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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { SafeHtml } from 'kerfjs';
|
|
2
|
+
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
|
+
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
4
|
+
|
|
5
|
+
/** `row` for a list section; `card` for a board column. */
|
|
6
|
+
type SummaryRowPresentation = 'row' | 'card';
|
|
7
|
+
/** A row's place in a rounded list section, so its corners match. */
|
|
8
|
+
type SummaryRowListEdge = 'start' | 'end' | 'only';
|
|
9
|
+
type SummaryRowRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
10
|
+
'data-component'?: never;
|
|
11
|
+
'data-presentation'?: never;
|
|
12
|
+
'data-list-edge'?: never;
|
|
13
|
+
'data-rail'?: never;
|
|
14
|
+
'data-selected'?: never;
|
|
15
|
+
'data-dimmed'?: never;
|
|
16
|
+
}>;
|
|
17
|
+
interface SummaryRowProps {
|
|
18
|
+
/** The identity line: an identifier, inline status glyphs, and the title. */
|
|
19
|
+
title: KerfUiContent;
|
|
20
|
+
/** Optional leading glyph, such as a category icon. */
|
|
21
|
+
leading?: SafeHtml;
|
|
22
|
+
/** Quiet text at the end of the title line, such as a relative time. */
|
|
23
|
+
trailingMeta?: string | SafeHtml;
|
|
24
|
+
/** A wrapping line of badges, chips, and quiet text below the title. */
|
|
25
|
+
metadata?: KerfUiContent;
|
|
26
|
+
/** `row` (default) or `card`. */
|
|
27
|
+
presentation?: SummaryRowPresentation;
|
|
28
|
+
/** Title lines before clipping; default 2 for a row and 4 for a card. */
|
|
29
|
+
titleLines?: number;
|
|
30
|
+
/** A leading state rail in a semantic tone (Up Next, blocked, …). */
|
|
31
|
+
rail?: SemanticTone;
|
|
32
|
+
/** Selected state, exposed as `aria-selected`. */
|
|
33
|
+
selected?: boolean;
|
|
34
|
+
/** Dim a finished or cut item; hover and selection restore it. */
|
|
35
|
+
dimmed?: boolean;
|
|
36
|
+
/** Round the corners that meet a rounded list section's edge. */
|
|
37
|
+
listEdge?: SummaryRowListEdge;
|
|
38
|
+
/** Skip rendering while off screen in long lists (`content-visibility`). */
|
|
39
|
+
deferRendering?: boolean;
|
|
40
|
+
/** Accessible name when the visible content is not a good one. */
|
|
41
|
+
ariaLabel?: string;
|
|
42
|
+
id?: string;
|
|
43
|
+
className?: string;
|
|
44
|
+
/** Safe `data-*` identity (an item id or delegated action) on the option. */
|
|
45
|
+
rootAttributes?: SummaryRowRootAttributes;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A selectable, keyboard-focusable summary of one item, as a list row or a
|
|
49
|
+
* board card: an optional leading glyph and state rail, a clamped identity line
|
|
50
|
+
* with trailing quiet metadata, and a wrapping metadata line. It is a
|
|
51
|
+
* `role="option"`; place rows in a labeled `role="listbox"` and own selection
|
|
52
|
+
* and keyboard movement in the application.
|
|
53
|
+
*/
|
|
54
|
+
declare function SummaryRow({ title, leading, trailingMeta, metadata, presentation, titleLines, rail, selected, dimmed, listEdge, deferRendering, ariaLabel, id, className, rootAttributes, }: SummaryRowProps): SafeHtml;
|
|
55
|
+
|
|
56
|
+
export { SummaryRow, type SummaryRowListEdge, type SummaryRowPresentation, type SummaryRowProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"summary-row.js"}
|
package/dist/sunken-panel.d.ts
CHANGED
|
@@ -2,6 +2,13 @@ import * as kerfjs from 'kerfjs';
|
|
|
2
2
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
3
|
import { CssFlexKeyword, CssFlex } from './css-values.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Generate the sunken texture once for a document. Sunken surfaces call this
|
|
7
|
+
* as they render; it is idempotent, and on a server (no document) or without
|
|
8
|
+
* a 2D canvas it does nothing, leaving the flat lowered surface.
|
|
9
|
+
*/
|
|
10
|
+
declare function ensureSunkenTexture(doc?: Document | undefined): void;
|
|
11
|
+
|
|
5
12
|
type SunkenPanelShape = 'rounded' | 'square';
|
|
6
13
|
interface SunkenPanelProps {
|
|
7
14
|
children?: KerfUiContent;
|
|
@@ -28,4 +35,4 @@ interface SunkenPanelProps {
|
|
|
28
35
|
*/
|
|
29
36
|
declare function SunkenPanel({ children, ariaLabel, shape, flex, fill, tabIndex, outlined, className, slot, }: SunkenPanelProps): kerfjs.SafeHtml;
|
|
30
37
|
|
|
31
|
-
export { SunkenPanel, type SunkenPanelProps, type SunkenPanelShape };
|
|
38
|
+
export { SunkenPanel, type SunkenPanelProps, type SunkenPanelShape, ensureSunkenTexture };
|
package/dist/sunken-panel.js
CHANGED
|
@@ -18,7 +18,7 @@ function installDialogLabel(prototype) {
|
|
|
18
18
|
observed.add(this);
|
|
19
19
|
new MutationObserver(() => syncDialogLabel(this)).observe(this, {
|
|
20
20
|
attributes: true,
|
|
21
|
-
attributeFilter: ["aria-label"]
|
|
21
|
+
attributeFilter: ["aria-label", "role"]
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
syncDialogLabel(this);
|
|
@@ -29,6 +29,12 @@ function syncDialogLabel(host) {
|
|
|
29
29
|
const panel = host.dialog;
|
|
30
30
|
if (!panel) return;
|
|
31
31
|
const previous = ownedNames.get(panel);
|
|
32
|
+
if (/^(alert)?dialog$/.test(host.getAttribute("role")?.trim() ?? "")) {
|
|
33
|
+
if (previous && panel.getAttribute(previous.attribute) === previous.value)
|
|
34
|
+
panel.removeAttribute(previous.attribute);
|
|
35
|
+
ownedNames.delete(panel);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
32
38
|
const externalName = ["aria-label", "aria-labelledby"].some((attribute2) => {
|
|
33
39
|
const value2 = panel.getAttribute(attribute2);
|
|
34
40
|
return value2 !== null && !(previous?.attribute === attribute2 && previous.value === value2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/surfaces/surface-scaffold/internal/install-dialog-label.ts","../src/components/surfaces/surface-scaffold/register/surface-scaffold-register.ts"],"names":["attribute","value"],"mappings":";;;;;AAOA,IAAM,SAAA,uBAAgB,OAAA,EAAgB;AACtC,IAAM,QAAA,uBAAe,OAAA,EAAqB;AAC1C,IAAM,UAAA,uBAAiB,OAAA,EAGrB;AAGK,SAAS,mBAAmB,SAAA,EAAyB;AAC1D,EAAA,IAAI,SAAA,CAAU,GAAA,CAAI,SAAS,CAAA,EAAG;AAC9B,EAAA,SAAA,CAAU,IAAI,SAAS,CAAA;AACvB,EAAA,MAAM,MAAA,GAAS,SAAA;AACf,EAAA,MAAM,SAAS,MAAA,CAAO,MAAA;AACtB,EAAA,MAAA,CAAO,MAAA,GAAS,SAA6B,OAAA,EAAwB;AACnE,IAAA,MAAA,CAAO,IAAA,CAAK,MAAM,OAAO,CAAA;AACzB,IAAA,IAAI,CAAC,IAAA,CAAK,aAAA,EAAe,SAAA,CAAU,QAAA,CAAS,oBAAoB,CAAA,EAAG;AACnE,IAAA,IAAI,CAAC,QAAA,CAAS,GAAA,CAAI,IAAI,CAAA,EAAG;AACvB,MAAA,QAAA,CAAS,IAAI,IAAI,CAAA;AACjB,MAAA,IAAI,iBAAiB,MAAM,eAAA,CAAgB,IAAI,CAAC,CAAA,CAAE,QAAQ,IAAA,EAAM;AAAA,QAC9D,UAAA,EAAY,IAAA;AAAA,QACZ,eAAA,EAAiB,CAAC,
|
|
1
|
+
{"version":3,"sources":["../src/components/surfaces/surface-scaffold/internal/install-dialog-label.ts","../src/components/surfaces/surface-scaffold/register/surface-scaffold-register.ts"],"names":["attribute","value"],"mappings":";;;;;AAOA,IAAM,SAAA,uBAAgB,OAAA,EAAgB;AACtC,IAAM,QAAA,uBAAe,OAAA,EAAqB;AAC1C,IAAM,UAAA,uBAAiB,OAAA,EAGrB;AAGK,SAAS,mBAAmB,SAAA,EAAyB;AAC1D,EAAA,IAAI,SAAA,CAAU,GAAA,CAAI,SAAS,CAAA,EAAG;AAC9B,EAAA,SAAA,CAAU,IAAI,SAAS,CAAA;AACvB,EAAA,MAAM,MAAA,GAAS,SAAA;AACf,EAAA,MAAM,SAAS,MAAA,CAAO,MAAA;AACtB,EAAA,MAAA,CAAO,MAAA,GAAS,SAA6B,OAAA,EAAwB;AACnE,IAAA,MAAA,CAAO,IAAA,CAAK,MAAM,OAAO,CAAA;AACzB,IAAA,IAAI,CAAC,IAAA,CAAK,aAAA,EAAe,SAAA,CAAU,QAAA,CAAS,oBAAoB,CAAA,EAAG;AACnE,IAAA,IAAI,CAAC,QAAA,CAAS,GAAA,CAAI,IAAI,CAAA,EAAG;AACvB,MAAA,QAAA,CAAS,IAAI,IAAI,CAAA;AACjB,MAAA,IAAI,iBAAiB,MAAM,eAAA,CAAgB,IAAI,CAAC,CAAA,CAAE,QAAQ,IAAA,EAAM;AAAA,QAC9D,UAAA,EAAY,IAAA;AAAA,QACZ,eAAA,EAAiB,CAAC,YAAA,EAAc,MAAM;AAAA,OACvC,CAAA;AAAA,IACH;AACA,IAAA,eAAA,CAAgB,IAAI,CAA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AA,EAAK;AACvD,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,UAAA,EAAY,cAAA,CAAe,OAAO,CAAA;AACrD,EAAA,MAAM,YACJ,CAAC,QAAA,IAAY,CAAC,IAAA,CAAK,aAAA,IAAiB,QAChC,iBAAA,GACA,YAAA;AACN,EAAA,MAAM,KAAA,GACJ,SAAA,KAAc,iBAAA,GAAoB,OAAA,GAAU,YAAY,IAAA,CAAK,KAAA;AAC/D,EAAA,IAAI,QAAA,IAAY,SAAS,SAAA,KAAc,SAAA;AACrC,IAAA,KAAA,CAAM,eAAA,CAAgB,SAAS,SAAS,CAAA;AAC1C,EAAA,IAAI,KAAA,CAAM,YAAA,CAAa,SAAS,CAAA,KAAM,KAAA;AACpC,IAAA,KAAA,CAAM,YAAA,CAAa,WAAW,KAAK,CAAA;AACrC,EAAA,UAAA,CAAW,GAAA,CAAI,KAAA,EAAO,EAAE,SAAA,EAAW,OAAO,CAAA;AAC5C;;;ACtEA,kBAAA,CAAmB,SAAS,SAAS,CAAA;AAG9B,IAAM,iCAAA,GAAoC","file":"surface-scaffold-register.js","sourcesContent":["interface NamedDialog extends HTMLElement {\n dialog?: HTMLDialogElement;\n label: string;\n withoutHeader: boolean;\n update(changed: unknown): void;\n}\n\nconst installed = new WeakSet<object>();\nconst observed = new WeakSet<HTMLElement>();\nconst ownedNames = new WeakMap<\n HTMLElement,\n { attribute: string; value: string }\n>();\n\n/** Repair Web Awesome's missing native dialog name before its first modal open. */\nexport function installDialogLabel(prototype: object): void {\n if (installed.has(prototype)) return;\n installed.add(prototype);\n const target = prototype as NamedDialog;\n const update = target.update;\n target.update = function (this: NamedDialog, changed: unknown): void {\n update.call(this, changed);\n if (!this.parentElement?.classList.contains('kui-dialog-surface')) return;\n if (!observed.has(this)) {\n observed.add(this);\n new MutationObserver(() => syncDialogLabel(this)).observe(this, {\n attributes: true,\n attributeFilter: ['aria-label', 'role'],\n });\n }\n syncDialogLabel(this);\n };\n}\n\nfunction syncDialogLabel(host: NamedDialog): void {\n if (!host.parentElement?.classList.contains('kui-dialog-surface')) return;\n const panel = host.dialog;\n if (!panel) return;\n const previous = ownedNames.get(panel);\n // A host that is itself the named dialog (an explicit role=\"dialog\" plus\n // its own name) owns that name; naming the panel too would expose two\n // dialogs with one name.\n if (/^(alert)?dialog$/.test(host.getAttribute('role')?.trim() ?? '')) {\n if (previous && panel.getAttribute(previous.attribute) === previous.value)\n panel.removeAttribute(previous.attribute);\n ownedNames.delete(panel);\n return;\n }\n const externalName = ['aria-label', 'aria-labelledby'].some((attribute) => {\n const value = panel.getAttribute(attribute);\n return (\n value !== null &&\n !(previous?.attribute === attribute && previous.value === value)\n );\n });\n if (externalName) {\n if (previous && panel.getAttribute(previous.attribute) === previous.value)\n panel.removeAttribute(previous.attribute);\n ownedNames.delete(panel);\n return;\n }\n const explicit = host.getAttribute('aria-label')?.trim();\n const title = host.shadowRoot?.getElementById('title');\n const attribute =\n !explicit && !host.withoutHeader && title\n ? 'aria-labelledby'\n : 'aria-label';\n const value =\n attribute === 'aria-labelledby' ? 'title' : explicit || host.label;\n if (previous && previous.attribute !== attribute)\n panel.removeAttribute(previous.attribute);\n if (panel.getAttribute(attribute) !== value)\n panel.setAttribute(attribute, value);\n ownedNames.set(panel, { attribute, value });\n}\n","import WaDialog from '@awesome.me/webawesome/dist/components/dialog/dialog.js';\n\nimport { installDialogLabel } from '../internal/install-dialog-label.js';\n\ninstallDialogLabel(WaDialog.prototype);\n\n/** Importing this module registers wa-dialog and repairs wrapped native names. */\nexport const surfaceScaffoldElementsRegistered = true;\n"]}
|
|
@@ -6,6 +6,19 @@ type DialogSurfaceSize = 'small' | 'medium' | 'large';
|
|
|
6
6
|
type DialogSurfacePresentation = 'modal' | 'side-sheet' | 'fullscreen';
|
|
7
7
|
type SurfaceInset = 'none' | 'compact' | 'comfortable';
|
|
8
8
|
type DialogSurfaceMaxHeight = CssLength | 'viewport';
|
|
9
|
+
/** A definite modal height: a length or the full viewport, minus both gutters. */
|
|
10
|
+
type DialogSurfaceHeight = CssLength | 'viewport';
|
|
11
|
+
/**
|
|
12
|
+
* How the dialog body lays out its children: `flow` (default) scrolls ordinary
|
|
13
|
+
* content in the body; `fill` gives one child the body's whole height and
|
|
14
|
+
* lets it own scrolling (a SplitView, a Pane, an editor).
|
|
15
|
+
*/
|
|
16
|
+
type DialogSurfaceBodyLayout = 'flow' | 'fill';
|
|
17
|
+
/**
|
|
18
|
+
* Application `data-*` identity on the DialogSurface root, such as
|
|
19
|
+
* `data-key`; the surface's own configuration attributes stay protected.
|
|
20
|
+
*/
|
|
21
|
+
type DialogSurfaceRootAttributes = Readonly<Record<`data-${string}`, string | undefined>>;
|
|
9
22
|
interface DialogSurfaceProps {
|
|
10
23
|
children: KerfUiContent;
|
|
11
24
|
size?: DialogSurfaceSize;
|
|
@@ -18,12 +31,72 @@ interface DialogSurfaceProps {
|
|
|
18
31
|
viewportGutter?: CssLength;
|
|
19
32
|
/** Modal height cap, bounded by the dynamic viewport minus both gutters. */
|
|
20
33
|
maxHeight?: DialogSurfaceMaxHeight;
|
|
34
|
+
/**
|
|
35
|
+
* Modal definite height, bounded the same way, so a filling child has a
|
|
36
|
+
* height to fill. Takes precedence over `maxHeight`.
|
|
37
|
+
*/
|
|
38
|
+
height?: DialogSurfaceHeight;
|
|
39
|
+
/** Body layout (default `flow`); `fill` lets one child own the body. */
|
|
40
|
+
bodyLayout?: DialogSurfaceBodyLayout;
|
|
41
|
+
/**
|
|
42
|
+
* Safe `data-*` identity on the root. Give sibling dialogs distinct
|
|
43
|
+
* `data-key`s so a re-render morphs each surface into itself instead of
|
|
44
|
+
* reusing one dialog's element for another (structurally identical roots
|
|
45
|
+
* are otherwise matched by position).
|
|
46
|
+
*/
|
|
47
|
+
rootAttributes?: DialogSurfaceRootAttributes;
|
|
21
48
|
className?: string;
|
|
22
49
|
/** Native named-slot assignment when composed inside a web component. */
|
|
23
50
|
slot?: string;
|
|
24
51
|
}
|
|
25
52
|
/** Configure recurring Web Awesome dialog geometry without consumer ::part() CSS. */
|
|
26
|
-
declare function DialogSurface({ children, size, presentation, preferredWidth, bodyInset, footerInset, viewportGutter, maxHeight, className, slot, }: DialogSurfaceProps): kerfjs.SafeHtml;
|
|
53
|
+
declare function DialogSurface({ children, size, presentation, preferredWidth, bodyInset, footerInset, viewportGutter, maxHeight, height, bodyLayout, rootAttributes, className, slot, }: DialogSurfaceProps): kerfjs.SafeHtml;
|
|
54
|
+
/** Where a PopoverDialogSurface appears: the top layer, or in flow. */
|
|
55
|
+
type PopoverDialogSurfacePresentation = 'overlay' | 'embedded';
|
|
56
|
+
/** Application `data-*` metadata on the surface root. */
|
|
57
|
+
type PopoverDialogSurfaceDataAttributes = Readonly<Record<`data-${string}`, string>>;
|
|
58
|
+
type PopoverDialogSurfaceName = {
|
|
59
|
+
label: string;
|
|
60
|
+
labelledBy?: never;
|
|
61
|
+
} | {
|
|
62
|
+
label?: never;
|
|
63
|
+
labelledBy: string;
|
|
64
|
+
};
|
|
65
|
+
type PopoverDialogSurfaceProps = PopoverDialogSurfaceName & {
|
|
66
|
+
/** The root id: what an opening control's `popovertarget` names. */
|
|
67
|
+
id?: string;
|
|
68
|
+
children: KerfUiContent;
|
|
69
|
+
/**
|
|
70
|
+
* `overlay` (default) is a native `popover="auto"` in the top layer:
|
|
71
|
+
* non-modal, light dismiss (Escape or a press outside), nothing inert.
|
|
72
|
+
* `embedded` renders the same surface in flow for a catalog or inline use.
|
|
73
|
+
*/
|
|
74
|
+
presentation?: PopoverDialogSurfacePresentation;
|
|
75
|
+
/** Preferred width preset: 400px, 560px (default), or 800px. */
|
|
76
|
+
size?: DialogSurfaceSize;
|
|
77
|
+
/** Preferred width; takes precedence over `size`, within the viewport cap. */
|
|
78
|
+
preferredWidth?: CssLength;
|
|
79
|
+
/** Definite height, bounded by the dynamic viewport minus both gutters. */
|
|
80
|
+
height?: DialogSurfaceHeight;
|
|
81
|
+
/** Height cap, bounded the same way, for a surface that sizes to content. */
|
|
82
|
+
maxHeight?: DialogSurfaceMaxHeight;
|
|
83
|
+
/** Edge clearance on each side of the viewport (default 16px). */
|
|
84
|
+
viewportGutter?: CssLength;
|
|
85
|
+
/** Body layout (default `flow`); `fill` lets one child own the surface. */
|
|
86
|
+
bodyLayout?: DialogSurfaceBodyLayout;
|
|
87
|
+
rootAttributes?: PopoverDialogSurfaceDataAttributes;
|
|
88
|
+
className?: string;
|
|
89
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
90
|
+
slot?: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* A non-modal dialog surface on the native Popover API: Kerf's dialog chrome,
|
|
94
|
+
* viewport-bounded size, and single-child fill without application CSS.
|
|
95
|
+
* Open it with a `popovertarget` control or `showPopover()`; it light
|
|
96
|
+
* dismisses and leaves the page interactive. Use `DialogSurface` with
|
|
97
|
+
* `wa-dialog` when the task must block the page.
|
|
98
|
+
*/
|
|
99
|
+
declare function PopoverDialogSurface({ id, children, label, labelledBy, presentation, size, preferredWidth, height, maxHeight, viewportGutter, bodyLayout, rootAttributes, className, slot, }: PopoverDialogSurfaceProps): kerfjs.SafeHtml;
|
|
27
100
|
type PopupSurfaceInset = 'standard' | 'compact' | 'list-zero';
|
|
28
101
|
interface PopupSurfaceProps {
|
|
29
102
|
children: KerfUiContent;
|
|
@@ -35,4 +108,4 @@ interface PopupSurfaceProps {
|
|
|
35
108
|
/** Configure recurring Web Awesome dropdown-menu geometry without consumer ::part() CSS. */
|
|
36
109
|
declare function PopupSurface({ children, inset, className, slot, }: PopupSurfaceProps): kerfjs.SafeHtml;
|
|
37
110
|
|
|
38
|
-
export { DialogSurface, type DialogSurfaceMaxHeight, type DialogSurfacePresentation, type DialogSurfaceProps, type DialogSurfaceSize, PopupSurface, type PopupSurfaceInset, type PopupSurfaceProps, type SurfaceInset };
|
|
111
|
+
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 };
|
package/dist/surface-scaffold.js
CHANGED
package/dist/tab-navigator.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Badge } from './chunk-
|
|
1
|
+
import { Badge } from './chunk-U6QYTMDB.js';
|
|
2
|
+
import { ensureSunkenTexture } from './chunk-IKS72C6P.js';
|
|
3
|
+
|
|
2
4
|
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
3
5
|
|
|
4
6
|
function TabNavigator({
|
|
@@ -11,6 +13,7 @@ function TabNavigator({
|
|
|
11
13
|
className = "",
|
|
12
14
|
slot
|
|
13
15
|
}) {
|
|
16
|
+
if (tabs.some((tab) => tab.appearance === "sunken")) ensureSunkenTexture();
|
|
14
17
|
return /* @__PURE__ */ jsxs(
|
|
15
18
|
"section",
|
|
16
19
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/navigation/tab-navigator/tab-navigator.tsx"],"names":[],"mappings":";;;AAmGO,SAAS,YAAA,CAAgC;AAAA,EAC9C,EAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA,GAAY,MAAA;AAAA,EACZ,cAAA,GAAiB,QAAA;AAAA,EACjB,SAAA,GAAY,EAAA;AAAA,EACZ;AACF,CAAA,EAA0B;AACxB,EAAA,uBACE,IAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,CAAA,iBAAA,EAAoB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC5C,EAAA;AAAA,MACA,gBAAA,EAAe,cAAA;AAAA,MACf,sBAAA,EAAsB,EAAA;AAAA,MACtB,gBAAA,EAAgB,SAAA;AAAA,MAChB,sBAA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K,UAAU,CAAA,CAAA;AAAA,cAEjC,gBAAA,EAAgB,WAAW,MAAA,GAAS,MAAA;AAAA,cAEnC,QAAA,EAAA;AAAA,gBAAA,GAAA,CAAI,uBACH,IAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,4BAAA,EAA6B,eAAY,MAAA,EAClD,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAI,IAAA;AAAA,kBACJ;AAAA,iBAAA,EACH,CAAA,GAEA,KAAA;AAAA,gCAEF,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,6BAAA,EAA+B,cAAI,KAAA,EAAM;AAAA;AAAA;AAAA,WACvD;AAAA,QAEJ,CAAC,CAAA,EACH;AAAA;AAAA;AAAA,GACF;AAEJ;AAEA,SAAS,eACP,KAAA,EACoB;AACpB,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA;AACnB,IAAA,OAAO,OAAO,QAAA,CAAS,KAAK,CAAA,GAAI,MAAA,CAAO,KAAK,CAAA,GAAI,MAAA;AAClD,EAAA,IAAI,OAAO,UAAU,QAAA,IAAY,KAAA,CAAM,MAAK,EAAG,OAAO,MAAM,IAAA,EAAK;AACjE,EAAA,OAAO,MAAA;AACT","file":"tab-navigator.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { Badge } from '../../feedback/badge/badge.js';\nimport type { PaneAppearance } from '../../layout/pane/pane.js';\n\ninterface TabNavigatorTabBase<Id extends string> {\n id: Id;\n label: string;\n /** Decorative icon shown above the label in the bottom bar. */\n icon?: SafeHtml;\n /** The tab's content — typically a `NavStack` so each tab keeps its own stack. */\n content: KerfUiContent;\n /** Background of this scene's scrolling work surface. */\n appearance?: PaneAppearance;\n /** Add 8px to every side of a plain scene's scrolling content. */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on this scene. */\n tabIndex?: 0 | -1;\n /** Keep the standard focus outline visible while this scene is active. */\n outlined?: boolean;\n}\n\n/** A tab with an optional count or short-status badge. */\ninterface TabNavigatorTabCountBadge {\n /**\n * Optional count or short status shown as a solid danger `Badge` at the\n * top-trailing corner of the tab icon (the iOS tab-bar badge). Omitted, `''`,\n * or non-finite numbers render no badge. The visual badge is `aria-hidden`;\n * its meaning reaches assistive technology through `badgeLabel`.\n *\n * Pass `true` instead for the text-free dot (new content without a count).\n */\n badge?: string | number;\n /**\n * Localized phrase folded into the tab's accessible name as\n * `\"<label>, <badgeLabel>\"` (for example `\"3 unread\"` → `\"Inbox, 3 unread\"`).\n * Defaults to the badge text itself. Ignored when no badge renders.\n */\n badgeLabel?: string;\n}\n\n/** A tab with the text-free dot badge (new content without a count). */\ninterface TabNavigatorTabDotBadge {\n /**\n * `true` shows a solid danger dot `Badge` at the top-trailing corner of the\n * tab icon — the iOS tab-bar dot for new content without a count.\n */\n badge: true;\n /**\n * Required localized phrase folded into the tab's accessible name as\n * `\"<label>, <badgeLabel>\"` (for example `\"New activity\"` →\n * `\"Feed, New activity\"`). A dot has no text, so this is its only meaning.\n */\n badgeLabel: string;\n}\n\n/** One bottom-bar destination: its label, optional icon and badge, and content. */\nexport type TabNavigatorTab<Id extends string = string> =\n TabNavigatorTabBase<Id> &\n (TabNavigatorTabCountBadge | TabNavigatorTabDotBadge);\n\nexport interface TabNavigatorProps<Id extends string = string> {\n id: string;\n /** Accessible name for the tab bar. */\n label: string;\n tabs: readonly TabNavigatorTab<Id>[];\n /** The controlled active tab id (the app owns selection). */\n active: NoInfer<Id>;\n /**\n * The bar's top separator. `auto` (default) draws it against a sunken active\n * work surface and otherwise follows `chromeDividers`; `hidden` suppresses\n * the line, including a scroll divider.\n */\n separator?: 'auto' | 'hidden';\n /**\n * The line over the tab bar, where it meets the active scene. `scroll`\n * (default) shows it only while more of the scene's content lies below —\n * never at the scroll end or when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the scaffold; unwired, it does not show. `always` shows it without the\n * wiring; `none` suppresses that scroll divider. A sunken active work\n * surface still draws the separator unless `separator=\"hidden\"`. The line\n * is the bar's own 1px top border, so no state moves the bar or a tab.\n */\n chromeDividers?: 'scroll' | 'always' | 'none';\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A mobile-first, iOS-like bottom tab navigator: a bottom tab bar that switches\n * between major sections, each tab keeping its own content (usually a `NavStack`)\n * mounted so its stack and scroll survive a switch. Controlled — the app owns\n * `active`; wire selection with `@kerfjs/ui/wire-tab-navigator`'s `wireTabNavigator`.\n * On larger classes, promote the tabs to a `Workbench` rail or sidebar instead of\n * a bottom bar. See `docs/23-app-layouts.md` §3.4.\n */\nexport function TabNavigator<Id extends string>({\n id,\n label,\n tabs,\n active,\n separator = 'auto',\n chromeDividers = 'scroll',\n className = '',\n slot,\n}: TabNavigatorProps<Id>) {\n return (\n <section\n class={`kui-tab-scaffold ${className}`.trim()}\n id={id}\n data-component=\"tab-scaffold\"\n data-tab-scaffold-id={id}\n data-separator={separator}\n data-chrome-dividers={\n chromeDividers === 'always' || chromeDividers === 'none'\n ? chromeDividers\n : undefined\n }\n slot={slot}\n >\n <div class=\"kui-tab-scaffold__scenes\">\n {tabs.map((tab) => (\n <div\n class=\"kui-tab-scaffold__scene\"\n data-tab-scaffold-scene={tab.id}\n data-active={String(tab.id === active)}\n data-appearance={tab.appearance === 'sunken' ? 'sunken' : undefined}\n data-deep-inset={tab.deepInset ? 'true' : undefined}\n data-outlined={\n tab.id === active && tab.outlined ? 'true' : undefined\n }\n role={tab.tabIndex === undefined ? undefined : 'tabpanel'}\n aria-label={tab.tabIndex === undefined ? undefined : tab.label}\n aria-hidden={String(tab.id !== active)}\n tabindex={\n tab.id === active\n ? tab.tabIndex\n : tab.tabIndex === undefined\n ? undefined\n : -1\n }\n >\n {tab.content}\n </div>\n ))}\n </div>\n <nav class=\"kui-tab-scaffold__bar\" role=\"tablist\" aria-label={label}>\n {tabs.map((tab) => {\n const dot = tab.badge === true;\n const badgeText = dot ? undefined : normalizeBadge(tab.badge);\n const hasBadge = dot || badgeText !== undefined;\n const badge = hasBadge && (\n <span\n class=\"kui-tab-scaffold__tab-badge\"\n data-badge-kind={dot ? 'dot' : 'text'}\n >\n {badgeText === undefined ? (\n <Badge tone=\"danger\" size=\"dot\" ariaHidden />\n ) : (\n <Badge\n tone=\"danger\"\n appearance=\"solid\"\n size=\"compact\"\n ariaHidden\n >\n {badgeText}\n </Badge>\n )}\n </span>\n );\n // A dot has no text fallback: without a usable badgeLabel (reachable\n // only from untyped callers) the tab keeps its plain accessible name.\n const badgeLabel = hasBadge\n ? tab.badgeLabel?.trim() || badgeText\n : undefined;\n return (\n <button\n type=\"button\"\n class=\"kui-tab-scaffold__tab\"\n role=\"tab\"\n data-tab-scaffold-tab={tab.id}\n aria-selected={String(tab.id === active)}\n tabindex={tab.id === active ? '0' : '-1'}\n aria-label={\n badgeLabel === undefined\n ? undefined\n : `${tab.label}, ${badgeLabel}`\n }\n data-has-badge={hasBadge ? 'true' : undefined}\n >\n {tab.icon ? (\n <span class=\"kui-tab-scaffold__tab-icon\" aria-hidden=\"true\">\n {tab.icon}\n {badge}\n </span>\n ) : (\n badge\n )}\n <span class=\"kui-tab-scaffold__tab-label\">{tab.label}</span>\n </button>\n );\n })}\n </nav>\n </section>\n );\n}\n\nfunction normalizeBadge(\n badge: string | number | undefined,\n): string | undefined {\n if (typeof badge === 'number')\n return Number.isFinite(badge) ? String(badge) : undefined;\n if (typeof badge === 'string' && badge.trim()) return badge.trim();\n return undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/navigation/tab-navigator/tab-navigator.tsx"],"names":[],"mappings":";;;;;AAoGO,SAAS,YAAA,CAAgC;AAAA,EAC9C,EAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA,GAAY,MAAA;AAAA,EACZ,cAAA,GAAiB,QAAA;AAAA,EACjB,SAAA,GAAY,EAAA;A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E,IAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,IAAA,EAAK,QAAA;AAAA,cACL,KAAA,EAAM,uBAAA;AAAA,cACN,IAAA,EAAK,KAAA;AAAA,cACL,yBAAuB,GAAA,CAAI,EAAA;AAAA,cAC3B,eAAA,EAAe,MAAA,CAAO,GAAA,CAAI,EAAA,KAAO,MAAM,CAAA;AAAA,cACvC,QAAA,EAAU,GAAA,CAAI,EAAA,KAAO,MAAA,GAAS,GAAA,GAAM,IAAA;AAAA,cACpC,YAAA,EACE,eAAe,MAAA,GACX,MAAA,GACA,GAAG,GAAA,CAAI,KAAK,KAAK,UAAU,CAAA,CAAA;AAAA,cAEjC,gBAAA,EAAgB,WAAW,MAAA,GAAS,MAAA;AAAA,cAEnC,QAAA,EAAA;AAAA,gBAAA,GAAA,CAAI,uBACH,IAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,4BAAA,EAA6B,eAAY,MAAA,EAClD,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAI,IAAA;AAAA,kBACJ;AAAA,iBAAA,EACH,CAAA,GAEA,KAAA;AAAA,gCAEF,GAAA,CAAC,MAAA,EAAA,EAAK,KAAA,EAAM,6BAAA,EAA+B,cAAI,KAAA,EAAM;AAAA;AAAA;AAAA,WACvD;AAAA,QAEJ,CAAC,CAAA,EACH;AAAA;AAAA;AAAA,GACF;AAEJ;AAEA,SAAS,eACP,KAAA,EACoB;AACpB,EAAA,IAAI,OAAO,KAAA,KAAU,QAAA;AACnB,IAAA,OAAO,OAAO,QAAA,CAAS,KAAK,CAAA,GAAI,MAAA,CAAO,KAAK,CAAA,GAAI,MAAA;AAClD,EAAA,IAAI,OAAO,UAAU,QAAA,IAAY,KAAA,CAAM,MAAK,EAAG,OAAO,MAAM,IAAA,EAAK;AACjE,EAAA,OAAO,MAAA;AACT","file":"tab-navigator.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport { Badge } from '../../feedback/badge/badge.js';\nimport type { PaneAppearance } from '../../layout/pane/pane.js';\n\ninterface TabNavigatorTabBase<Id extends string> {\n id: Id;\n label: string;\n /** Decorative icon shown above the label in the bottom bar. */\n icon?: SafeHtml;\n /** The tab's content — typically a `NavStack` so each tab keeps its own stack. */\n content: KerfUiContent;\n /** Background of this scene's scrolling work surface. */\n appearance?: PaneAppearance;\n /** Add 8px to every side of a plain scene's scrolling content. */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on this scene. */\n tabIndex?: 0 | -1;\n /** Keep the standard focus outline visible while this scene is active. */\n outlined?: boolean;\n}\n\n/** A tab with an optional count or short-status badge. */\ninterface TabNavigatorTabCountBadge {\n /**\n * Optional count or short status shown as a solid danger `Badge` at the\n * top-trailing corner of the tab icon (the iOS tab-bar badge). Omitted, `''`,\n * or non-finite numbers render no badge. The visual badge is `aria-hidden`;\n * its meaning reaches assistive technology through `badgeLabel`.\n *\n * Pass `true` instead for the text-free dot (new content without a count).\n */\n badge?: string | number;\n /**\n * Localized phrase folded into the tab's accessible name as\n * `\"<label>, <badgeLabel>\"` (for example `\"3 unread\"` → `\"Inbox, 3 unread\"`).\n * Defaults to the badge text itself. Ignored when no badge renders.\n */\n badgeLabel?: string;\n}\n\n/** A tab with the text-free dot badge (new content without a count). */\ninterface TabNavigatorTabDotBadge {\n /**\n * `true` shows a solid danger dot `Badge` at the top-trailing corner of the\n * tab icon — the iOS tab-bar dot for new content without a count.\n */\n badge: true;\n /**\n * Required localized phrase folded into the tab's accessible name as\n * `\"<label>, <badgeLabel>\"` (for example `\"New activity\"` →\n * `\"Feed, New activity\"`). A dot has no text, so this is its only meaning.\n */\n badgeLabel: string;\n}\n\n/** One bottom-bar destination: its label, optional icon and badge, and content. */\nexport type TabNavigatorTab<Id extends string = string> =\n TabNavigatorTabBase<Id> &\n (TabNavigatorTabCountBadge | TabNavigatorTabDotBadge);\n\nexport interface TabNavigatorProps<Id extends string = string> {\n id: string;\n /** Accessible name for the tab bar. */\n label: string;\n tabs: readonly TabNavigatorTab<Id>[];\n /** The controlled active tab id (the app owns selection). */\n active: NoInfer<Id>;\n /**\n * The bar's top separator. `auto` (default) draws it against a sunken active\n * work surface and otherwise follows `chromeDividers`; `hidden` suppresses\n * the line, including a scroll divider.\n */\n separator?: 'auto' | 'hidden';\n /**\n * The line over the tab bar, where it meets the active scene. `scroll`\n * (default) shows it only while more of the scene's content lies below —\n * never at the scroll end or when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the scaffold; unwired, it does not show. `always` shows it without the\n * wiring; `none` suppresses that scroll divider. A sunken active work\n * surface still draws the separator unless `separator=\"hidden\"`. The line\n * is the bar's own 1px top border, so no state moves the bar or a tab.\n */\n chromeDividers?: 'scroll' | 'always' | 'none';\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A mobile-first, iOS-like bottom tab navigator: a bottom tab bar that switches\n * between major sections, each tab keeping its own content (usually a `NavStack`)\n * mounted so its stack and scroll survive a switch. Controlled — the app owns\n * `active`; wire selection with `@kerfjs/ui/wire-tab-navigator`'s `wireTabNavigator`.\n * On larger classes, promote the tabs to a `Workbench` rail or sidebar instead of\n * a bottom bar. See `docs/23-app-layouts.md` §3.4.\n */\nexport function TabNavigator<Id extends string>({\n id,\n label,\n tabs,\n active,\n separator = 'auto',\n chromeDividers = 'scroll',\n className = '',\n slot,\n}: TabNavigatorProps<Id>) {\n if (tabs.some((tab) => tab.appearance === 'sunken')) ensureSunkenTexture();\n return (\n <section\n class={`kui-tab-scaffold ${className}`.trim()}\n id={id}\n data-component=\"tab-scaffold\"\n data-tab-scaffold-id={id}\n data-separator={separator}\n data-chrome-dividers={\n chromeDividers === 'always' || chromeDividers === 'none'\n ? chromeDividers\n : undefined\n }\n slot={slot}\n >\n <div class=\"kui-tab-scaffold__scenes\">\n {tabs.map((tab) => (\n <div\n class=\"kui-tab-scaffold__scene\"\n data-tab-scaffold-scene={tab.id}\n data-active={String(tab.id === active)}\n data-appearance={tab.appearance === 'sunken' ? 'sunken' : undefined}\n data-deep-inset={tab.deepInset ? 'true' : undefined}\n data-outlined={\n tab.id === active && tab.outlined ? 'true' : undefined\n }\n role={tab.tabIndex === undefined ? undefined : 'tabpanel'}\n aria-label={tab.tabIndex === undefined ? undefined : tab.label}\n aria-hidden={String(tab.id !== active)}\n tabindex={\n tab.id === active\n ? tab.tabIndex\n : tab.tabIndex === undefined\n ? undefined\n : -1\n }\n >\n {tab.content}\n </div>\n ))}\n </div>\n <nav class=\"kui-tab-scaffold__bar\" role=\"tablist\" aria-label={label}>\n {tabs.map((tab) => {\n const dot = tab.badge === true;\n const badgeText = dot ? undefined : normalizeBadge(tab.badge);\n const hasBadge = dot || badgeText !== undefined;\n const badge = hasBadge && (\n <span\n class=\"kui-tab-scaffold__tab-badge\"\n data-badge-kind={dot ? 'dot' : 'text'}\n >\n {badgeText === undefined ? (\n <Badge tone=\"danger\" size=\"dot\" ariaHidden />\n ) : (\n <Badge\n tone=\"danger\"\n appearance=\"solid\"\n size=\"compact\"\n ariaHidden\n >\n {badgeText}\n </Badge>\n )}\n </span>\n );\n // A dot has no text fallback: without a usable badgeLabel (reachable\n // only from untyped callers) the tab keeps its plain accessible name.\n const badgeLabel = hasBadge\n ? tab.badgeLabel?.trim() || badgeText\n : undefined;\n return (\n <button\n type=\"button\"\n class=\"kui-tab-scaffold__tab\"\n role=\"tab\"\n data-tab-scaffold-tab={tab.id}\n aria-selected={String(tab.id === active)}\n tabindex={tab.id === active ? '0' : '-1'}\n aria-label={\n badgeLabel === undefined\n ? undefined\n : `${tab.label}, ${badgeLabel}`\n }\n data-has-badge={hasBadge ? 'true' : undefined}\n >\n {tab.icon ? (\n <span class=\"kui-tab-scaffold__tab-icon\" aria-hidden=\"true\">\n {tab.icon}\n {badge}\n </span>\n ) : (\n badge\n )}\n <span class=\"kui-tab-scaffold__tab-label\">{tab.label}</span>\n </button>\n );\n })}\n </nav>\n </section>\n );\n}\n\nfunction normalizeBadge(\n badge: string | number | undefined,\n): string | undefined {\n if (typeof badge === 'number')\n return Number.isFinite(badge) ? String(badge) : undefined;\n if (typeof badge === 'string' && badge.trim()) return badge.trim();\n return undefined;\n}\n"]}
|
package/dist/text.d.ts
CHANGED
|
@@ -19,6 +19,19 @@ type TextFont = 'default' | 'monospace';
|
|
|
19
19
|
type TextBorder = 'transparent' | 'none';
|
|
20
20
|
type TextLineHeight = 'default' | 'tight';
|
|
21
21
|
type TextWrap = 'normal' | 'anywhere' | 'nowrap' | 'truncate';
|
|
22
|
+
/** Inline alignment of the text's lines, in logical (writing-direction) terms. */
|
|
23
|
+
type TextAlign = 'start' | 'center' | 'end';
|
|
24
|
+
/**
|
|
25
|
+
* Where `wrap="truncate"` places its ellipsis: `end` (default) keeps the
|
|
26
|
+
* start, `start` keeps the tail (branch names, the end of an identifier), and
|
|
27
|
+
* `middle` keeps both the start and a suffix (file paths).
|
|
28
|
+
*/
|
|
29
|
+
type TextTruncate = 'end' | 'middle' | 'start';
|
|
30
|
+
/**
|
|
31
|
+
* The suffix `truncate="middle"` always keeps: a number of trailing
|
|
32
|
+
* characters, or `segment` for the last path segment with its separator.
|
|
33
|
+
*/
|
|
34
|
+
type TextTruncateKeep = number | 'segment';
|
|
22
35
|
type TextContent = KerfUiContent | string | number | readonly TextContent[];
|
|
23
36
|
type TextCommonProps = Omit<KerfBaseAttrs, 'children' | 'class' | 'className'> & {
|
|
24
37
|
/** Native heading, paragraph, or inline span element to render. Defaults to `p`. */
|
|
@@ -39,6 +52,8 @@ type TextCommonProps = Omit<KerfBaseAttrs, 'children' | 'class' | 'className'> &
|
|
|
39
52
|
flush?: boolean;
|
|
40
53
|
/** Use compact leading for short dialog or metadata copy. */
|
|
41
54
|
lineHeight?: TextLineHeight;
|
|
55
|
+
/** Inline alignment of the lines (default `start`), for centered status copy. */
|
|
56
|
+
align?: TextAlign;
|
|
42
57
|
children: TextContent;
|
|
43
58
|
class?: string;
|
|
44
59
|
className?: string;
|
|
@@ -48,16 +63,36 @@ type TextProps = TextCommonProps & ({
|
|
|
48
63
|
wrap?: 'normal' | 'anywhere';
|
|
49
64
|
/** Cap wrapped text to this positive number of lines. */
|
|
50
65
|
maxLines?: number;
|
|
66
|
+
truncate?: never;
|
|
67
|
+
truncateKeep?: never;
|
|
68
|
+
} | {
|
|
69
|
+
/** Keep one line without an ellipsis. */
|
|
70
|
+
wrap: 'nowrap';
|
|
71
|
+
maxLines?: never;
|
|
72
|
+
truncate?: never;
|
|
73
|
+
truncateKeep?: never;
|
|
51
74
|
} | {
|
|
52
|
-
/** Keep one line
|
|
53
|
-
wrap: '
|
|
75
|
+
/** Keep one line with an ellipsis. */
|
|
76
|
+
wrap: 'truncate';
|
|
54
77
|
maxLines?: never;
|
|
78
|
+
/**
|
|
79
|
+
* Where the ellipsis goes (default `end`). `start` and `middle` are
|
|
80
|
+
* for left-to-right identifiers and paths, and `middle` requires
|
|
81
|
+
* string or number children so it can split them.
|
|
82
|
+
*/
|
|
83
|
+
truncate?: TextTruncate;
|
|
84
|
+
/**
|
|
85
|
+
* The suffix `truncate="middle"` keeps (default `segment`: the last
|
|
86
|
+
* path segment, or the last 10 characters when there is no `/` or
|
|
87
|
+
* `\\` separator).
|
|
88
|
+
*/
|
|
89
|
+
truncateKeep?: TextTruncateKeep;
|
|
55
90
|
});
|
|
56
91
|
/**
|
|
57
92
|
* Semantic heading, paragraph, or inline text. Block variants use the standard
|
|
58
93
|
* content-item padding; `span` adds no box geometry.
|
|
59
94
|
* All ordinary native heading/paragraph attributes pass through to the element.
|
|
60
95
|
*/
|
|
61
|
-
declare function Text({ variant: Variant, tone, color, size, font, border, flush, controlMargins, lineHeight, wrap, maxLines, children, class: classValue, className, style, ...attributes }: TextProps): kerfjs.SafeHtml;
|
|
96
|
+
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;
|
|
62
97
|
|
|
63
|
-
export { FieldLabel, type FieldLabelProps, Sides, Text, type TextBorder, type TextContent, type TextFont, type TextLineHeight, type TextProps, type TextSize, type TextTone, type TextVariant, type TextWrap };
|
|
98
|
+
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 };
|
package/dist/text.js
CHANGED
|
@@ -12,7 +12,7 @@ type ToolbarControlGroupSize = 'default' | 'compact';
|
|
|
12
12
|
type ToolbarControlGroupDensity = 'comfortable' | 'tight';
|
|
13
13
|
type ToolbarControlGroupContent = 'icon' | 'text' | 'mixed' | 'avatar' | 'search';
|
|
14
14
|
type ToolbarControlGroupFocusRing = 'control' | 'outline' | 'halo';
|
|
15
|
-
type ToolbarControlGroupSelectedChrome = 'raised' | 'filled' | 'outline';
|
|
15
|
+
type ToolbarControlGroupSelectedChrome = 'raised' | 'filled' | 'outline' | 'none';
|
|
16
16
|
type ToolbarControlGroupSelectedTone = 'brand' | 'neutral' | 'pop';
|
|
17
17
|
type ToolbarControlGroupOverflow = 'visible' | 'scroll' | 'wrap';
|
|
18
18
|
type ToolbarControlGroupExpandedOverflow = 'clip' | 'visible';
|
|
@@ -54,6 +54,13 @@ interface ToolbarControlGroupProps {
|
|
|
54
54
|
content?: ToolbarControlGroupContent;
|
|
55
55
|
/** Whether controls paint focus individually or the group paints an outline/halo on focus-within. */
|
|
56
56
|
focusRing?: ToolbarControlGroupFocusRing;
|
|
57
|
+
/**
|
|
58
|
+
* Chrome a pressed (`aria-pressed="true"`) control paints. `none` keeps a
|
|
59
|
+
* pressed control looking like its neighbors, for an icon-state toggle whose
|
|
60
|
+
* glyph already shows the state (an empty or filled star); hover and the
|
|
61
|
+
* focus ring are unchanged. One control can opt out alone with
|
|
62
|
+
* `data-selected-chrome="none"` on its own button.
|
|
63
|
+
*/
|
|
57
64
|
selectedChrome?: ToolbarControlGroupSelectedChrome;
|
|
58
65
|
selectedTone?: ToolbarControlGroupSelectedTone;
|
|
59
66
|
/** Size a nested Web Awesome dropdown trigger as part of this group. */
|
package/dist/toolbar-text.d.ts
CHANGED
|
@@ -46,6 +46,17 @@ type ToolbarTextProps = ToolbarTextBaseProps & (({
|
|
|
46
46
|
headingLevel?: HeadingLevel;
|
|
47
47
|
/** Render an unanimated loading skeleton instead of the text. */
|
|
48
48
|
placeholder?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Quiet, single-line supporting copy under the title ("Changes save
|
|
51
|
+
* automatically."), truncating with an ellipsis. Title and description
|
|
52
|
+
* share the toolbar's control band and the same text start, with or
|
|
53
|
+
* without a leading icon group. With a description, `id` and
|
|
54
|
+
* `headingLevel` apply to the title alone, so a dialog's
|
|
55
|
+
* `aria-labelledby` names only the title.
|
|
56
|
+
*/
|
|
57
|
+
description?: string;
|
|
58
|
+
/** Id for the description, for a dialog's `aria-describedby`. */
|
|
59
|
+
descriptionId?: string;
|
|
49
60
|
} & ToolbarTextWrappingProps) | {
|
|
50
61
|
/** Render a native button with this delegated action; the app owns editing. */
|
|
51
62
|
action: string;
|
|
@@ -53,7 +64,9 @@ type ToolbarTextProps = ToolbarTextBaseProps & (({
|
|
|
53
64
|
placeholder?: never;
|
|
54
65
|
wrap?: never;
|
|
55
66
|
maxLines?: never;
|
|
67
|
+
description?: never;
|
|
68
|
+
descriptionId?: never;
|
|
56
69
|
});
|
|
57
|
-
declare function ToolbarText({ text, size, tone, hideBelow, showBelow, className, id, headingLevel, placeholder, wrap, ellipsis, maxLines, fill, slot, action, }: ToolbarTextProps): kerfjs.SafeHtml;
|
|
70
|
+
declare function ToolbarText({ text, size, tone, hideBelow, showBelow, className, id, headingLevel, placeholder, wrap, ellipsis, maxLines, fill, slot, action, description, descriptionId, }: ToolbarTextProps): kerfjs.SafeHtml;
|
|
58
71
|
|
|
59
72
|
export { type HeadingLevel, ToolbarText, type ToolbarTextProps, type ToolbarTextSize, type ToolbarTextTone };
|
package/dist/toolbar-text.js
CHANGED
package/dist/toolbar.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import { S as Sides } from './sides-BPSWde0A.js';
|
|
|
4
4
|
import { PaneSeparatorSide } from './pane.js';
|
|
5
5
|
|
|
6
6
|
type ToolbarPosition = 'header' | 'footer';
|
|
7
|
+
/** Control-band density: `default` (60px with 44px groups) or `compact`. */
|
|
8
|
+
type ToolbarDensity = 'default' | 'compact';
|
|
7
9
|
interface ToolbarProps {
|
|
8
10
|
leading?: KerfUiContent;
|
|
9
11
|
center?: KerfUiContent;
|
|
@@ -11,6 +13,15 @@ interface ToolbarProps {
|
|
|
11
13
|
label?: string;
|
|
12
14
|
/** Use footer semantics for a bottom toolbar; defaults to header. */
|
|
13
15
|
position?: ToolbarPosition;
|
|
16
|
+
/**
|
|
17
|
+
* `compact` sizes the toolbar to a 34px control band with 3px block
|
|
18
|
+
* insets — 40px tall — for a header embedded in a panel or card. Fill it
|
|
19
|
+
* with `ToolbarControlGroup size="compact"` groups; inline insets and the
|
|
20
|
+
* gap between zones are unchanged. Composites that render a Toolbar from a
|
|
21
|
+
* `ToolbarConfig` (Workbench, CollapsiblePanel, NavStack, SplitView) forward
|
|
22
|
+
* it and size the groups they compose to match. Defaults to `default`.
|
|
23
|
+
*/
|
|
24
|
+
density?: ToolbarDensity;
|
|
14
25
|
/**
|
|
15
26
|
* Physical divider edges in canonical top/right/bottom/left order, drawn
|
|
16
27
|
* always. Defaults to none: a toolbar pinned over or under scrolling content
|
|
@@ -59,7 +70,7 @@ interface ToolbarProps {
|
|
|
59
70
|
* that renders a `Toolbar` for the app (a Workbench or CollapsiblePanel
|
|
60
71
|
* toolbar) forwards, so the app configures that toolbar instead of styling it.
|
|
61
72
|
*/
|
|
62
|
-
type ToolbarConfig = Pick<ToolbarProps, 'dividerSides' | 'centerAlign' | 'responsive' | 'responsiveAt' | 'safeAreaEdges'>;
|
|
63
|
-
declare function Toolbar({ leading, center, trailing, label, position, dividerSides, centerAlign, responsive, responsiveAt, safeAreaEdges, className, slot, }: ToolbarProps): kerfjs.SafeHtml;
|
|
73
|
+
type ToolbarConfig = Pick<ToolbarProps, 'density' | 'dividerSides' | 'centerAlign' | 'responsive' | 'responsiveAt' | 'safeAreaEdges'>;
|
|
74
|
+
declare function Toolbar({ leading, center, trailing, label, position, density, dividerSides, centerAlign, responsive, responsiveAt, safeAreaEdges, className, slot, }: ToolbarProps): kerfjs.SafeHtml;
|
|
64
75
|
|
|
65
|
-
export { Sides, Toolbar, type ToolbarConfig, type ToolbarPosition, type ToolbarProps };
|
|
76
|
+
export { Sides, Toolbar, type ToolbarConfig, type ToolbarDensity, type ToolbarPosition, type ToolbarProps };
|
package/dist/toolbar.js
CHANGED
package/dist/value-table.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { SafeHtml } from 'kerfjs';
|
|
3
3
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
4
|
+
import { CssLength } from './css-values.js';
|
|
4
5
|
|
|
5
6
|
interface ValueTableRowProps {
|
|
6
7
|
label: string | SafeHtml;
|
|
@@ -14,15 +15,32 @@ interface ValueTableRowProps {
|
|
|
14
15
|
}
|
|
15
16
|
declare function ValueTableRow({ label, value, icon, className, placeholder, slot, }: ValueTableRowProps): SafeHtml;
|
|
16
17
|
|
|
18
|
+
/** `columns` keeps label and value side by side; `stacked` puts each value under its label. */
|
|
19
|
+
type ValueTablePresentation = 'columns' | 'stacked';
|
|
20
|
+
/** Table width below which columns stack: `compact` is 512px, `narrow` 576px. */
|
|
21
|
+
type ValueTableStackBelow = 'compact' | 'narrow';
|
|
17
22
|
interface ValueTableProps {
|
|
18
23
|
label: string;
|
|
19
24
|
/** Compact row spacing for metadata-dense surfaces. */
|
|
20
25
|
density?: 'default' | 'compact';
|
|
26
|
+
/**
|
|
27
|
+
* Minimum width of the label column (for example `px(160)`); the value then
|
|
28
|
+
* takes the rest of the row. Omitted, label and value share the row by
|
|
29
|
+
* content.
|
|
30
|
+
*/
|
|
31
|
+
labelWidth?: CssLength;
|
|
32
|
+
/** Side-by-side columns (default) or values stacked under their labels. */
|
|
33
|
+
presentation?: ValueTablePresentation;
|
|
34
|
+
/**
|
|
35
|
+
* Stack the rows only while the table itself is narrower than the preset,
|
|
36
|
+
* so one table reads as columns in a wide dialog and stacks on a phone.
|
|
37
|
+
*/
|
|
38
|
+
stackBelow?: ValueTableStackBelow;
|
|
21
39
|
className?: string;
|
|
22
40
|
children: KerfUiContent;
|
|
23
41
|
/** Native named-slot assignment when composed inside a web component. */
|
|
24
42
|
slot?: string;
|
|
25
43
|
}
|
|
26
|
-
declare function ValueTable({ label, density, className, children, slot, }: ValueTableProps): kerfjs.SafeHtml;
|
|
44
|
+
declare function ValueTable({ label, density, labelWidth, presentation, stackBelow, className, children, slot, }: ValueTableProps): kerfjs.SafeHtml;
|
|
27
45
|
|
|
28
|
-
export { ValueTable, type ValueTableProps, ValueTableRow, type ValueTableRowProps };
|
|
46
|
+
export { ValueTable, type ValueTablePresentation, type ValueTableProps, ValueTableRow, type ValueTableRowProps, type ValueTableStackBelow };
|
package/dist/value-table.js
CHANGED
package/dist/wire-catalog.d.ts
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type Root = HTMLElement | Document;
|
|
2
|
+
/** A committed combobox value. */
|
|
3
|
+
interface ComboboxCommit {
|
|
4
|
+
id: string;
|
|
5
|
+
value: string;
|
|
6
|
+
/** True when the value matched no suggestion (the person created it). */
|
|
7
|
+
created: boolean;
|
|
8
|
+
/** The field's input; clear or keep its text after applying the commit. */
|
|
9
|
+
input: HTMLInputElement;
|
|
10
|
+
}
|
|
11
|
+
interface WireComboboxesOptions {
|
|
12
|
+
onCommit: (commit: ComboboxCommit) => void;
|
|
13
|
+
/** Characters that commit the typed text besides Enter. Default `[',']`. */
|
|
14
|
+
commitKeys?: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Wire every `Combobox` below root: typing filters the suggestions (and offers
|
|
18
|
+
* to create the typed text), ArrowDown/ArrowUp move the active option, Enter or
|
|
19
|
+
* a commit key (comma by default) commits the active option or the typed text,
|
|
20
|
+
* a click commits an option, and Escape or leaving the field closes the list.
|
|
21
|
+
* Typed text that matches no suggestion commits only when the field offers
|
|
22
|
+
* creation; otherwise Enter commits the first matching suggestion. Dispose with the owning application.
|
|
23
|
+
*/
|
|
24
|
+
declare function wireComboboxes(root: Root, { onCommit, commitKeys }: WireComboboxesOptions): () => void;
|
|
25
|
+
|
|
26
|
+
export { type ComboboxCommit, type WireComboboxesOptions, wireComboboxes };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"wire-comboboxes.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Root = HTMLElement | Document;
|
|
2
|
+
/**
|
|
3
|
+
* Open every overlay `CornerStatus` below root in the top layer, now and as
|
|
4
|
+
* renders insert them. Opening never moves focus, and a manual popover has no
|
|
5
|
+
* light dismiss or Escape, so the status stays until the application removes
|
|
6
|
+
* it. Where the Popover API is missing the host stays a fixed-position
|
|
7
|
+
* element. Dispose with the owning application.
|
|
8
|
+
*/
|
|
9
|
+
declare function wireCornerStatus(root: Root): () => void;
|
|
10
|
+
|
|
11
|
+
export { wireCornerStatus };
|