@kerfjs/ui 5.0.0-beta.94 → 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 +99 -57
- 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 +57 -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 +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/catalog.md +41 -0
- 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/vite-ux-review.d.mts +39 -0
- package/vite-ux-review.mjs +75 -20
- 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
package/dist/split-view.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
|
3
3
|
import { N as NavStackProps, a as NavStackView } from './nav-stack-BvSKY448.js';
|
|
4
4
|
import { ResizableRegionProps } from './resizable-region.js';
|
|
5
5
|
import './list.js';
|
|
6
|
+
import './extension-attributes-mu8MFUl0.js';
|
|
6
7
|
import './flex-alignment-4ms8ZbV8.js';
|
|
7
8
|
import './sides-BPSWde0A.js';
|
|
8
9
|
import './css-values.js';
|
|
@@ -38,6 +39,17 @@ interface SplitViewCompactStack extends Pick<NavStackProps, 'toolbarConfig' | 'b
|
|
|
38
39
|
/** Toolbar content for the pushed detail view. */
|
|
39
40
|
detail?: SplitViewCompactViewToolbars;
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* The fixed list column's width: a size in CSS pixels, or that size capped
|
|
44
|
+
* at a fraction of the SplitView's own width so a narrow container (a
|
|
45
|
+
* dialog, a small window) always leaves the detail in view.
|
|
46
|
+
*/
|
|
47
|
+
type SplitViewListWidth = number | {
|
|
48
|
+
/** Preferred width in CSS pixels. */
|
|
49
|
+
size: number;
|
|
50
|
+
/** Largest share of the SplitView's width, greater than 0 and at most 1. */
|
|
51
|
+
maxFraction?: number;
|
|
52
|
+
};
|
|
41
53
|
interface SplitViewProps {
|
|
42
54
|
id: string;
|
|
43
55
|
label: string;
|
|
@@ -63,6 +75,12 @@ interface SplitViewProps {
|
|
|
63
75
|
compactStack?: SplitViewCompactStack;
|
|
64
76
|
/** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */
|
|
65
77
|
resizable?: SplitViewResizable;
|
|
78
|
+
/**
|
|
79
|
+
* The fixed split's list column width (default 320px). A number is CSS
|
|
80
|
+
* pixels; `{ size, maxFraction }` caps it at that share of the SplitView's
|
|
81
|
+
* width. A resizable split sizes its list with `resizable` instead.
|
|
82
|
+
*/
|
|
83
|
+
listWidth?: SplitViewListWidth;
|
|
66
84
|
className?: string;
|
|
67
85
|
/** Native named-slot assignment when composed inside a web component. */
|
|
68
86
|
slot?: string;
|
|
@@ -74,6 +92,6 @@ interface SplitViewProps {
|
|
|
74
92
|
* resizable wiring with `wireResizableRegions` and the compact back with
|
|
75
93
|
* `wireNavStack`.
|
|
76
94
|
*/
|
|
77
|
-
declare function SplitView({ id, label, list, detail, compact, detailActive, listTitle, detailTitle, backLabel, compactStack, resizable, className, slot, }: SplitViewProps): kerfjs.SafeHtml;
|
|
95
|
+
declare function SplitView({ id, label, list, detail, compact, detailActive, listTitle, detailTitle, backLabel, compactStack, resizable, listWidth, className, slot, }: SplitViewProps): kerfjs.SafeHtml;
|
|
78
96
|
|
|
79
|
-
export { SplitView, type SplitViewCompactStack, type SplitViewCompactViewToolbars, type SplitViewProps, type SplitViewResizable };
|
|
97
|
+
export { SplitView, type SplitViewCompactStack, type SplitViewCompactViewToolbars, type SplitViewListWidth, type SplitViewProps, type SplitViewResizable };
|
package/dist/split-view.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NavStack } from './chunk-
|
|
1
|
+
import { NavStack } from './chunk-AYHC62OZ.js';
|
|
2
2
|
|
|
3
3
|
import { ResizableRegion } from './chunk-Y6KT7ZTR.js';
|
|
4
4
|
|
|
@@ -11,9 +11,23 @@ import { ResizableRegion } from './chunk-Y6KT7ZTR.js';
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
import { remify, pct } from './chunk-U657IHFB.js';
|
|
14
15
|
|
|
15
16
|
import { jsx, jsxs } from 'kerfjs/jsx-runtime';
|
|
16
17
|
|
|
18
|
+
function listWidthValue(listWidth) {
|
|
19
|
+
const { size, maxFraction } = typeof listWidth === "number" ? { size: listWidth, maxFraction: void 0 } : listWidth;
|
|
20
|
+
if (!Number.isFinite(size) || size <= 0)
|
|
21
|
+
throw new RangeError(
|
|
22
|
+
"SplitView listWidth size must be a positive number of pixels"
|
|
23
|
+
);
|
|
24
|
+
if (maxFraction !== void 0 && (!Number.isFinite(maxFraction) || maxFraction <= 0 || maxFraction > 1))
|
|
25
|
+
throw new RangeError(
|
|
26
|
+
"SplitView listWidth maxFraction must be greater than 0 and at most 1"
|
|
27
|
+
);
|
|
28
|
+
const preferred = remify(size);
|
|
29
|
+
return maxFraction === void 0 ? preferred : `min(${preferred}, ${pct(maxFraction * 100)})`;
|
|
30
|
+
}
|
|
17
31
|
function SplitView({
|
|
18
32
|
id,
|
|
19
33
|
label,
|
|
@@ -26,9 +40,15 @@ function SplitView({
|
|
|
26
40
|
backLabel = "Back",
|
|
27
41
|
compactStack = {},
|
|
28
42
|
resizable,
|
|
43
|
+
listWidth,
|
|
29
44
|
className = "",
|
|
30
45
|
slot
|
|
31
46
|
}) {
|
|
47
|
+
if (listWidth !== void 0 && resizable)
|
|
48
|
+
throw new RangeError(
|
|
49
|
+
"SplitView listWidth applies to a fixed split; size a resizable list with resizable.size, min, and max"
|
|
50
|
+
);
|
|
51
|
+
const listWidthStyle = listWidth === void 0 ? void 0 : `--kui-split-view-list-width:${listWidthValue(listWidth)}`;
|
|
32
52
|
if (compact) {
|
|
33
53
|
const listView = {
|
|
34
54
|
...compactStack.list,
|
|
@@ -114,6 +134,7 @@ function SplitView({
|
|
|
114
134
|
"data-component": "split-view",
|
|
115
135
|
"data-split-mode": "split",
|
|
116
136
|
"aria-label": label,
|
|
137
|
+
style: listWidthStyle,
|
|
117
138
|
slot,
|
|
118
139
|
children: [
|
|
119
140
|
listPane,
|
package/dist/split-view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/split-view/split-view.tsx"],"names":[],"mappings":"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","file":"split-view.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n NavStack,\n type NavStackProps,\n type NavStackView,\n} from '../../navigation/nav-stack/nav-stack.js';\nimport {\n ResizableRegion,\n type ResizableRegionProps,\n} from '../resizable-region/resizable-region.js';\n\n/**\n * The roomy list pane's `ResizableRegion`: its committed `size` and `min` /\n * `max` limits, plus the region configuration that forwards unchanged\n * (`separator`, `handleIcon`, `contentOverflow`, and collapse:\n * `collapsed`, `transitioning`, `collapseMotion`, `restoreControl`,\n * `restorePosition`). Omitted options keep the region's defaults.\n */\nexport interface SplitViewResizable extends Pick<\n ResizableRegionProps,\n | 'separator'\n | 'handleIcon'\n | 'contentOverflow'\n | 'collapsed'\n | 'transitioning'\n | 'collapseMotion'\n | 'restoreControl'\n | 'restorePosition'\n> {\n size: number;\n min: number;\n max: number;\n}\n\n/** One compact view's top- and bottom-toolbar content (see `NavStackView`). */\nexport type SplitViewCompactViewToolbars = Pick<\n NavStackView,\n 'toolbar' | 'bottomToolbar'\n>;\n\n/**\n * The compact `NavStack`'s configuration: its toolbar configuration, back\n * control, persistent bottom toolbar, and chrome dividers forward to the\n * stack, and `list` / `detail` give each view its own toolbar groups.\n */\nexport interface SplitViewCompactStack extends Pick<\n NavStackProps,\n | 'toolbarConfig'\n | 'backIcon'\n | 'backText'\n | 'hideToolbar'\n | 'bottomToolbar'\n | 'chromeDividers'\n> {\n /** Toolbar content for the list (root) view. */\n list?: SplitViewCompactViewToolbars;\n /** Toolbar content for the pushed detail view. */\n detail?: SplitViewCompactViewToolbars;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: KerfUiContent;\n /** The detail (secondary) pane. */\n detail: KerfUiContent;\n /**\n * Compact (\"one pane at a time\") classes — a handset or portrait tablet.\n * Derive from `deviceClass().value.compact`. When true the split collapses to\n * a `NavStack`: the list is the root and the detail is pushed over it.\n */\n compact?: boolean;\n /** In compact mode, whether the detail is currently pushed over the list. */\n detailActive?: boolean;\n /** Title/label for the list (compact NavStack root + region label). */\n listTitle?: string;\n /** Title/label for the detail (compact NavStack pushed view + region label). */\n detailTitle?: string;\n /** Back label for the compact NavStack (default \"Back\"). */\n backLabel?: string;\n /** Compact NavStack configuration and per-view toolbars. */\n compactStack?: SplitViewCompactStack;\n /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A list-detail split. On roomy classes it shows both panes side\n * by side with an optional resizable separator; on compact classes it collapses\n * to a `NavStack` (list → detail). See `docs/23-app-layouts.md` §3.2. Compose the\n * resizable wiring with `wireResizableRegions` and the compact back with\n * `wireNavStack`.\n */\nexport function SplitView({\n id,\n label,\n list,\n detail,\n compact = false,\n detailActive = false,\n listTitle = '',\n detailTitle = '',\n backLabel = 'Back',\n compactStack = {},\n resizable,\n className = '',\n slot,\n}: SplitViewProps) {\n if (compact) {\n const listView: NavStackView = {\n ...compactStack.list,\n key: 'list',\n toolbar: { ...compactStack.list?.toolbar, title: listTitle },\n content: list,\n };\n const views: NavStackView[] = detailActive\n ? [\n listView,\n {\n ...compactStack.detail,\n key: 'detail',\n toolbar: { ...compactStack.detail?.toolbar, title: detailTitle },\n content: detail,\n },\n ]\n : [listView];\n return (\n <div\n class={`kui-split-view kui-split-view--compact ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"compact\"\n slot={slot}\n >\n <NavStack\n id={`${id}-stack`}\n label={label}\n views={views}\n backLabel={backLabel}\n backIcon={compactStack.backIcon}\n backText={compactStack.backText}\n toolbarConfig={compactStack.toolbarConfig}\n hideToolbar={compactStack.hideToolbar}\n bottomToolbar={compactStack.bottomToolbar}\n chromeDividers={compactStack.chromeDividers}\n />\n </div>\n );\n }\n const listPane = resizable ? (\n <ResizableRegion\n id={`${id}-list`}\n label={listTitle || 'List'}\n size={resizable.size}\n min={resizable.min}\n max={resizable.max}\n separator={resizable.separator}\n handleIcon={resizable.handleIcon}\n contentOverflow={resizable.contentOverflow}\n collapsed={resizable.collapsed}\n transitioning={resizable.transitioning}\n collapseMotion={resizable.collapseMotion}\n restoreControl={resizable.restoreControl}\n restorePosition={resizable.restorePosition}\n >\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"true\"\n >\n {list}\n </div>\n </ResizableRegion>\n ) : (\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"false\"\n >\n {list}\n </div>\n );\n return (\n <div\n class={`kui-split-view ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"split\"\n aria-label={label}\n slot={slot}\n >\n {listPane}\n <div\n class=\"kui-split-view__detail kui-pane\"\n data-split-detail\n aria-label={detailTitle || undefined}\n >\n {detail}\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/split-view/split-view.tsx"],"names":[],"mappings":"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","file":"split-view.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { pct, remify } from '../../../shared/styles/css-values.js';\nimport {\n NavStack,\n type NavStackProps,\n type NavStackView,\n} from '../../navigation/nav-stack/nav-stack.js';\nimport {\n ResizableRegion,\n type ResizableRegionProps,\n} from '../resizable-region/resizable-region.js';\n\n/**\n * The roomy list pane's `ResizableRegion`: its committed `size` and `min` /\n * `max` limits, plus the region configuration that forwards unchanged\n * (`separator`, `handleIcon`, `contentOverflow`, and collapse:\n * `collapsed`, `transitioning`, `collapseMotion`, `restoreControl`,\n * `restorePosition`). Omitted options keep the region's defaults.\n */\nexport interface SplitViewResizable extends Pick<\n ResizableRegionProps,\n | 'separator'\n | 'handleIcon'\n | 'contentOverflow'\n | 'collapsed'\n | 'transitioning'\n | 'collapseMotion'\n | 'restoreControl'\n | 'restorePosition'\n> {\n size: number;\n min: number;\n max: number;\n}\n\n/** One compact view's top- and bottom-toolbar content (see `NavStackView`). */\nexport type SplitViewCompactViewToolbars = Pick<\n NavStackView,\n 'toolbar' | 'bottomToolbar'\n>;\n\n/**\n * The compact `NavStack`'s configuration: its toolbar configuration, back\n * control, persistent bottom toolbar, and chrome dividers forward to the\n * stack, and `list` / `detail` give each view its own toolbar groups.\n */\nexport interface SplitViewCompactStack extends Pick<\n NavStackProps,\n | 'toolbarConfig'\n | 'backIcon'\n | 'backText'\n | 'hideToolbar'\n | 'bottomToolbar'\n | 'chromeDividers'\n> {\n /** Toolbar content for the list (root) view. */\n list?: SplitViewCompactViewToolbars;\n /** Toolbar content for the pushed detail view. */\n detail?: SplitViewCompactViewToolbars;\n}\n\n/**\n * The fixed list column's width: a size in CSS pixels, or that size capped\n * at a fraction of the SplitView's own width so a narrow container (a\n * dialog, a small window) always leaves the detail in view.\n */\nexport type SplitViewListWidth =\n | number\n | {\n /** Preferred width in CSS pixels. */\n size: number;\n /** Largest share of the SplitView's width, greater than 0 and at most 1. */\n maxFraction?: number;\n };\n\n/** The list-width custom property value for a fixed split. */\nfunction listWidthValue(listWidth: SplitViewListWidth): string {\n const { size, maxFraction } =\n typeof listWidth === 'number'\n ? { size: listWidth, maxFraction: undefined }\n : listWidth;\n if (!Number.isFinite(size) || size <= 0)\n throw new RangeError(\n 'SplitView listWidth size must be a positive number of pixels',\n );\n if (\n maxFraction !== undefined &&\n (!Number.isFinite(maxFraction) || maxFraction <= 0 || maxFraction > 1)\n )\n throw new RangeError(\n 'SplitView listWidth maxFraction must be greater than 0 and at most 1',\n );\n const preferred = remify(size);\n return maxFraction === undefined\n ? preferred\n : `min(${preferred}, ${pct(maxFraction * 100)})`;\n}\n\nexport interface SplitViewProps {\n id: string;\n label: string;\n /** The list (primary) pane. */\n list: KerfUiContent;\n /** The detail (secondary) pane. */\n detail: KerfUiContent;\n /**\n * Compact (\"one pane at a time\") classes — a handset or portrait tablet.\n * Derive from `deviceClass().value.compact`. When true the split collapses to\n * a `NavStack`: the list is the root and the detail is pushed over it.\n */\n compact?: boolean;\n /** In compact mode, whether the detail is currently pushed over the list. */\n detailActive?: boolean;\n /** Title/label for the list (compact NavStack root + region label). */\n listTitle?: string;\n /** Title/label for the detail (compact NavStack pushed view + region label). */\n detailTitle?: string;\n /** Back label for the compact NavStack (default \"Back\"). */\n backLabel?: string;\n /** Compact NavStack configuration and per-view toolbars. */\n compactStack?: SplitViewCompactStack;\n /** A resizable separator on roomy classes (min/max px). Omit for a fixed split. */\n resizable?: SplitViewResizable;\n /**\n * The fixed split's list column width (default 320px). A number is CSS\n * pixels; `{ size, maxFraction }` caps it at that share of the SplitView's\n * width. A resizable split sizes its list with `resizable` instead.\n */\n listWidth?: SplitViewListWidth;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A list-detail split. On roomy classes it shows both panes side\n * by side with an optional resizable separator; on compact classes it collapses\n * to a `NavStack` (list → detail). See `docs/23-app-layouts.md` §3.2. Compose the\n * resizable wiring with `wireResizableRegions` and the compact back with\n * `wireNavStack`.\n */\nexport function SplitView({\n id,\n label,\n list,\n detail,\n compact = false,\n detailActive = false,\n listTitle = '',\n detailTitle = '',\n backLabel = 'Back',\n compactStack = {},\n resizable,\n listWidth,\n className = '',\n slot,\n}: SplitViewProps) {\n if (listWidth !== undefined && resizable)\n throw new RangeError(\n 'SplitView listWidth applies to a fixed split; size a resizable list with resizable.size, min, and max',\n );\n const listWidthStyle =\n listWidth === undefined\n ? undefined\n : `--kui-split-view-list-width:${listWidthValue(listWidth)}`;\n if (compact) {\n const listView: NavStackView = {\n ...compactStack.list,\n key: 'list',\n toolbar: { ...compactStack.list?.toolbar, title: listTitle },\n content: list,\n };\n const views: NavStackView[] = detailActive\n ? [\n listView,\n {\n ...compactStack.detail,\n key: 'detail',\n toolbar: { ...compactStack.detail?.toolbar, title: detailTitle },\n content: detail,\n },\n ]\n : [listView];\n return (\n <div\n class={`kui-split-view kui-split-view--compact ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"compact\"\n slot={slot}\n >\n <NavStack\n id={`${id}-stack`}\n label={label}\n views={views}\n backLabel={backLabel}\n backIcon={compactStack.backIcon}\n backText={compactStack.backText}\n toolbarConfig={compactStack.toolbarConfig}\n hideToolbar={compactStack.hideToolbar}\n bottomToolbar={compactStack.bottomToolbar}\n chromeDividers={compactStack.chromeDividers}\n />\n </div>\n );\n }\n const listPane = resizable ? (\n <ResizableRegion\n id={`${id}-list`}\n label={listTitle || 'List'}\n size={resizable.size}\n min={resizable.min}\n max={resizable.max}\n separator={resizable.separator}\n handleIcon={resizable.handleIcon}\n contentOverflow={resizable.contentOverflow}\n collapsed={resizable.collapsed}\n transitioning={resizable.transitioning}\n collapseMotion={resizable.collapseMotion}\n restoreControl={resizable.restoreControl}\n restorePosition={resizable.restorePosition}\n >\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"true\"\n >\n {list}\n </div>\n </ResizableRegion>\n ) : (\n <div\n class=\"kui-split-view__list kui-pane\"\n data-split-list\n data-resizable=\"false\"\n >\n {list}\n </div>\n );\n return (\n <div\n class={`kui-split-view ${className}`.trim()}\n id={id}\n data-component=\"split-view\"\n data-split-mode=\"split\"\n aria-label={label}\n style={listWidthStyle}\n slot={slot}\n >\n {listPane}\n <div\n class=\"kui-split-view__detail kui-pane\"\n data-split-detail\n aria-label={detailTitle || undefined}\n >\n {detail}\n </div>\n </div>\n );\n}\n"]}
|
package/dist/state-banner.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SafeHtml } from 'kerfjs';
|
|
2
2
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
|
+
import { S as Sides } from './sides-BPSWde0A.js';
|
|
3
4
|
import { S as SemanticTone } from './semantic-tone-CdW013KF.js';
|
|
4
5
|
|
|
5
6
|
/** @deprecated Use SemanticTone. */
|
|
@@ -7,6 +8,7 @@ type StateBannerTone = SemanticTone;
|
|
|
7
8
|
type StateBannerUrgency = 'status' | 'alert';
|
|
8
9
|
type StateBannerCopyLayout = 'inline' | 'stacked';
|
|
9
10
|
type StateBannerActionPlacement = 'trailing' | 'below';
|
|
11
|
+
type StateBannerPresentation = 'card' | 'strip';
|
|
10
12
|
interface StateBannerProps {
|
|
11
13
|
title: string;
|
|
12
14
|
detail?: string;
|
|
@@ -20,12 +22,25 @@ interface StateBannerProps {
|
|
|
20
22
|
copyLayout?: StateBannerCopyLayout;
|
|
21
23
|
/** Place the action beside the copy or on a separate trailing row. */
|
|
22
24
|
actionPlacement?: StateBannerActionPlacement;
|
|
25
|
+
/**
|
|
26
|
+
* `card` (the default) is an inset, rounded, fully bordered banner beside
|
|
27
|
+
* the affected work. `strip` is a full-width band at a layout edge, such as
|
|
28
|
+
* above a workspace: square corners, no inline margin, inline padding on the
|
|
29
|
+
* shared content-text column, and only the tone-colored `dividerSides` edges.
|
|
30
|
+
*/
|
|
31
|
+
presentation?: StateBannerPresentation;
|
|
32
|
+
/**
|
|
33
|
+
* Physical tone-colored divider edges of a `strip`, in canonical
|
|
34
|
+
* top/right/bottom/left order. Defaults to the bottom edge; `''` draws none.
|
|
35
|
+
* A `card` keeps its full border and ignores this.
|
|
36
|
+
*/
|
|
37
|
+
dividerSides?: Sides;
|
|
23
38
|
className?: string;
|
|
24
39
|
/** 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. */
|
|
25
40
|
placeholder?: boolean;
|
|
26
41
|
/** Native named-slot assignment when composed inside a web component. */
|
|
27
42
|
slot?: string;
|
|
28
43
|
}
|
|
29
|
-
declare function StateBanner({ title, detail, badge, icon, action, tone, urgency, copyLayout, actionPlacement, className, placeholder, slot, }: StateBannerProps): SafeHtml;
|
|
44
|
+
declare function StateBanner({ title, detail, badge, icon, action, tone, urgency, copyLayout, actionPlacement, presentation, dividerSides, className, placeholder, slot, }: StateBannerProps): SafeHtml;
|
|
30
45
|
|
|
31
|
-
export { SemanticTone, StateBanner, type StateBannerActionPlacement, type StateBannerCopyLayout, type StateBannerProps, type StateBannerTone, type StateBannerUrgency };
|
|
46
|
+
export { SemanticTone, StateBanner, type StateBannerActionPlacement, type StateBannerCopyLayout, type StateBannerPresentation, type StateBannerProps, type StateBannerTone, type StateBannerUrgency };
|
package/dist/state-banner.js
CHANGED
package/dist/styles/badge.css
CHANGED
|
@@ -23,6 +23,33 @@
|
|
|
23
23
|
white-space: nowrap;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/* A leading icon sits 4px before the text and inherits the badge's color. */
|
|
27
|
+
.kui-badge[data-has-icon="true"] {
|
|
28
|
+
gap: 0.25rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* maxWidth caps the badge; the label truncates with an ellipsis and the
|
|
32
|
+
badge may shrink below the cap in a tight flex row. */
|
|
33
|
+
.kui-badge[data-truncate="true"] {
|
|
34
|
+
max-width: var(--_kui-badge-max-width);
|
|
35
|
+
flex: 0 1 auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.kui-badge__label {
|
|
39
|
+
min-width: 0;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.kui-badge__icon {
|
|
45
|
+
display: inline-grid;
|
|
46
|
+
width: 1em;
|
|
47
|
+
height: 1em;
|
|
48
|
+
color: inherit;
|
|
49
|
+
place-items: center;
|
|
50
|
+
flex: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
26
53
|
.kui-badge[data-tone="info"] {
|
|
27
54
|
--_kui-badge-fill-quiet: var(--kui-color-brand-fill-quiet);
|
|
28
55
|
--_kui-badge-fill-solid: var(--kui-color-brand-on-fill);
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.kui-catalog-example__viewport[data-surface="lowered"] {
|
|
111
|
-
background: var(--kui-
|
|
111
|
+
background: var(--kui-sunken-surface);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.kui-catalog-example__viewport[data-overflow="hidden"] {
|
|
@@ -151,13 +151,17 @@
|
|
|
151
151
|
|
|
152
152
|
/* Bare specimens use a small inset to align with the surrounding examples. */
|
|
153
153
|
.kui-catalog-example[data-align="glyph"]
|
|
154
|
-
> :not([data-catalog-example-label]):not([data-catalog-example-note])
|
|
154
|
+
> :not([data-catalog-example-label]):not([data-catalog-example-note]):not(
|
|
155
|
+
:popover-open
|
|
156
|
+
) {
|
|
155
157
|
--kui-catalog-example-align: 1rem;
|
|
156
158
|
margin-inline-start: var(--kui-catalog-example-align);
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
.kui-catalog-example[data-align="inline-control"]
|
|
160
|
-
> :not([data-catalog-example-label]):not([data-catalog-example-note])
|
|
162
|
+
> :not([data-catalog-example-label]):not([data-catalog-example-note]):not(
|
|
163
|
+
:popover-open
|
|
164
|
+
) {
|
|
161
165
|
--kui-catalog-example-align: 0.5rem;
|
|
162
166
|
margin-inline-start: var(--kui-catalog-example-align);
|
|
163
167
|
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/* ChoiceChips: separated pills that wrap with the control gap. Each pill is a
|
|
2
|
+
<label> around a native radio, so the radio owns focus, arrow keys, and the
|
|
3
|
+
form value; the pill paints the radio's state through :has(). */
|
|
4
|
+
.kui-choice-chips {
|
|
5
|
+
display: flex;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: var(--kui-layout-control-gap, 0.5rem);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.kui-choice-chips__chip {
|
|
14
|
+
--_kui-choice-chips-border: var(--kui-color-neutral-border-normal);
|
|
15
|
+
|
|
16
|
+
position: relative;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
min-height: 2rem;
|
|
20
|
+
padding-inline: 0.75rem;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
border: 1px solid var(--_kui-choice-chips-border);
|
|
23
|
+
border-radius: var(--kui-layout-pill-radius, calc(1px + 1.3125rem));
|
|
24
|
+
color: var(--kui-color-text);
|
|
25
|
+
background: var(--kui-color-surface);
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 0.375rem;
|
|
28
|
+
font-size: var(--kui-font-s);
|
|
29
|
+
font-weight: var(--kui-font-weight-semibold, 600);
|
|
30
|
+
line-height: 1;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
user-select: none;
|
|
34
|
+
transition-property: background, border-color, box-shadow;
|
|
35
|
+
transition-duration: 120ms;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.kui-choice-chips[data-size="compact"] .kui-choice-chips__chip {
|
|
39
|
+
min-height: 1.5rem;
|
|
40
|
+
padding-inline: 0.5rem;
|
|
41
|
+
gap: 0.25rem;
|
|
42
|
+
font-size: var(--kui-font-xs);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* The native radio covers the pill so a pointer press lands on it directly,
|
|
46
|
+
but paints nothing: the pill draws its checked and focus state. */
|
|
47
|
+
.kui-choice-chips__input {
|
|
48
|
+
position: absolute;
|
|
49
|
+
inset: 0;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
margin: 0;
|
|
53
|
+
border-radius: inherit;
|
|
54
|
+
opacity: 0;
|
|
55
|
+
cursor: inherit;
|
|
56
|
+
appearance: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.kui-choice-chips__chip:hover:not([data-disabled]):not(
|
|
60
|
+
:has(> .kui-choice-chips__input:checked)
|
|
61
|
+
) {
|
|
62
|
+
background: var(--kui-color-neutral-fill-quiet);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.kui-choice-chips__chip:has(> .kui-choice-chips__input:checked) {
|
|
66
|
+
--_kui-choice-chips-border: var(--kui-color-brand-border-loud);
|
|
67
|
+
|
|
68
|
+
color: var(--kui-color-brand-on-fill);
|
|
69
|
+
background: var(--kui-color-brand-fill-normal);
|
|
70
|
+
/* A second pixel of border marks the selection without relying on hue. */
|
|
71
|
+
box-shadow: inset 0 0 0 1px var(--_kui-choice-chips-border);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.kui-choice-chips__chip:has(> .kui-choice-chips__input:focus-visible) {
|
|
75
|
+
outline: var(--kui-focus-ring);
|
|
76
|
+
outline-offset: 2px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.kui-choice-chips__chip[data-disabled] {
|
|
80
|
+
opacity: 0.45;
|
|
81
|
+
cursor: not-allowed;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.kui-choice-chips__swatch {
|
|
85
|
+
width: 0.75rem;
|
|
86
|
+
height: 0.75rem;
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
background: var(--_kui-choice-chips-swatch, transparent);
|
|
90
|
+
/* An inner edge keeps a pale swatch visible against the pill. */
|
|
91
|
+
box-shadow: inset 0 0 0 1px
|
|
92
|
+
color-mix(in srgb, var(--kui-color-text) 20%, transparent);
|
|
93
|
+
flex: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.kui-choice-chips[data-size="compact"] .kui-choice-chips__swatch {
|
|
97
|
+
width: 0.625rem;
|
|
98
|
+
height: 0.625rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* The no-color swatch: an outlined dot struck through from corner to corner. */
|
|
102
|
+
.kui-choice-chips__swatch[data-swatch="transparent"] {
|
|
103
|
+
position: relative;
|
|
104
|
+
box-shadow: inset 0 0 0 1px var(--kui-color-neutral-border-loud);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.kui-choice-chips__swatch[data-swatch="transparent"]::after {
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 0;
|
|
110
|
+
left: calc(50% - 0.75px);
|
|
111
|
+
width: 1.5px;
|
|
112
|
+
height: 100%;
|
|
113
|
+
border-radius: 1px;
|
|
114
|
+
background: var(--kui-color-danger-on-quiet);
|
|
115
|
+
content: "";
|
|
116
|
+
transform: rotate(45deg);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.kui-choice-chips__icon {
|
|
120
|
+
display: inline-grid;
|
|
121
|
+
width: 1em;
|
|
122
|
+
height: 1em;
|
|
123
|
+
color: inherit;
|
|
124
|
+
place-items: center;
|
|
125
|
+
flex: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.kui-choice-chips__label {
|
|
129
|
+
min-width: 0;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
text-overflow: ellipsis;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@media (forced-colors: active) {
|
|
135
|
+
.kui-choice-chips__chip {
|
|
136
|
+
border-color: ButtonBorder;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.kui-choice-chips__chip:has(> .kui-choice-chips__input:checked) {
|
|
140
|
+
border-color: Highlight;
|
|
141
|
+
color: HighlightText;
|
|
142
|
+
background: Highlight;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.kui-choice-chips__swatch {
|
|
146
|
+
forced-color-adjust: none;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@media (prefers-reduced-motion: reduce) {
|
|
151
|
+
.kui-choice-chips__chip {
|
|
152
|
+
transition: none;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* The track is the sideways scroll owner and fills its parent's height; the
|
|
2
|
+
columns sit flush in one row and own their insets and vertical scrolling. */
|
|
3
|
+
.kui-column-track {
|
|
4
|
+
--_kui-column-track-min-width: 15.625rem;
|
|
5
|
+
--_kui-column-track-peek: 1.5rem;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
min-height: 0;
|
|
9
|
+
padding-inline: var(--kui-layout-inline-margin, 0.5rem);
|
|
10
|
+
overflow-x: auto;
|
|
11
|
+
overflow-y: hidden;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
overscroll-behavior-x: contain;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Equal columns that never shrink below the minimum: a narrow track scrolls
|
|
17
|
+
instead of crushing them. */
|
|
18
|
+
.kui-column-track__columns {
|
|
19
|
+
display: grid;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
min-height: 0;
|
|
23
|
+
grid-auto-columns: minmax(var(--_kui-column-track-min-width), 1fr);
|
|
24
|
+
grid-auto-flow: column;
|
|
25
|
+
grid-template-rows: minmax(0, 1fr);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Paged: each column is nearly the visible width so the next one peeks in,
|
|
29
|
+
and mandatory snapping settles a swipe or momentum scroll on a column
|
|
30
|
+
start. Trailing room lets the last column snap to the leading inset. */
|
|
31
|
+
.kui-column-track[data-layout="paged"] {
|
|
32
|
+
container-type: inline-size;
|
|
33
|
+
scroll-behavior: smooth;
|
|
34
|
+
scroll-padding-inline: var(--kui-layout-inline-margin, 0.5rem);
|
|
35
|
+
scroll-snap-type: x mandatory;
|
|
36
|
+
scrollbar-width: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.kui-column-track[data-layout="paged"]::-webkit-scrollbar {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.kui-column-track[data-layout="paged"] > .kui-column-track__columns {
|
|
44
|
+
width: max-content;
|
|
45
|
+
padding-inline-end: var(--_kui-column-track-peek);
|
|
46
|
+
grid-auto-columns: calc(100cqi - var(--_kui-column-track-peek));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.kui-column-track[data-layout="paged"] > .kui-column-track__columns > * {
|
|
50
|
+
scroll-snap-align: start;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (prefers-reduced-motion: reduce) {
|
|
54
|
+
.kui-column-track[data-layout="paged"] {
|
|
55
|
+
scroll-behavior: auto;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* A field label, the themed input with its listbox, and an optional hint,
|
|
2
|
+
aligned like a Web Awesome form field: label and hint sit on the value's
|
|
3
|
+
text column (1px border + 8px padding). */
|
|
4
|
+
.kui-combobox {
|
|
5
|
+
display: grid;
|
|
6
|
+
min-width: 0;
|
|
7
|
+
gap: var(--kui-space-2xs);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.kui-combobox__label,
|
|
11
|
+
.kui-combobox__hint {
|
|
12
|
+
padding-inline: calc(1px + var(--kui-layout-item-padding, 0.5rem));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.kui-combobox__label {
|
|
16
|
+
color: var(--kui-color-neutral-on-quiet);
|
|
17
|
+
font-size: var(--kui-font-xs);
|
|
18
|
+
font-weight: 650;
|
|
19
|
+
letter-spacing: 0.04em;
|
|
20
|
+
line-height: 1.2;
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.kui-combobox__hint {
|
|
25
|
+
color: var(--kui-color-text-quiet);
|
|
26
|
+
font-size: var(--kui-font-s);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.kui-combobox__control {
|
|
30
|
+
position: relative;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* The same chrome as a themed wa-input: 44px, 1px border, 8px inset. */
|
|
35
|
+
.kui-combobox__input {
|
|
36
|
+
width: 100%;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
height: 2.75rem;
|
|
39
|
+
margin: 0;
|
|
40
|
+
padding: 0 var(--kui-layout-item-padding, 0.5rem);
|
|
41
|
+
box-sizing: border-box;
|
|
42
|
+
border: 1px solid var(--kui-color-neutral-border-normal);
|
|
43
|
+
border-radius: var(--kui-layout-rounded-radius, calc(1px + 0.6875rem));
|
|
44
|
+
color: var(--kui-color-text);
|
|
45
|
+
background: var(--kui-color-surface);
|
|
46
|
+
font: inherit;
|
|
47
|
+
font-size: var(--kui-font-s);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.kui-combobox__input::placeholder {
|
|
51
|
+
color: var(--kui-color-text-quiet);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.kui-combobox__input:focus-visible {
|
|
55
|
+
border-color: var(--kui-color-text-link);
|
|
56
|
+
outline: none;
|
|
57
|
+
box-shadow: 0 0 0 3px
|
|
58
|
+
color-mix(in srgb, var(--kui-color-text-link) 22%, transparent);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.kui-combobox[data-disabled="true"] {
|
|
62
|
+
opacity: 0.55;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* A touch field below 16px makes iOS magnify the page on focus. */
|
|
66
|
+
@media (hover: none) and (pointer: coarse) {
|
|
67
|
+
.kui-combobox__input {
|
|
68
|
+
font-size: max(16px, var(--kui-font-s));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* The suggestion list drops below the field over the content that follows. */
|
|
73
|
+
.kui-combobox__listbox {
|
|
74
|
+
position: absolute;
|
|
75
|
+
z-index: var(--kui-combobox-z-index, 20);
|
|
76
|
+
inset: calc(100% + var(--kui-space-2xs)) 0 auto;
|
|
77
|
+
max-height: 15rem;
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding: var(--kui-space-2xs);
|
|
80
|
+
overflow-y: auto;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
border: 1px solid var(--kui-color-neutral-border-normal);
|
|
83
|
+
border-radius: var(--kui-layout-rounded-radius, calc(1px + 0.6875rem));
|
|
84
|
+
background: var(--kui-color-surface-raised);
|
|
85
|
+
box-shadow: var(--kui-shadow-l);
|
|
86
|
+
list-style: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.kui-combobox__listbox[hidden] {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.kui-combobox__option {
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: var(--kui-space-xs);
|
|
96
|
+
border-radius: max(
|
|
97
|
+
0px,
|
|
98
|
+
calc(var(--kui-layout-rounded-radius, 0.75rem) - var(--kui-space-2xs))
|
|
99
|
+
);
|
|
100
|
+
color: var(--kui-color-text);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
font-size: var(--kui-font-s);
|
|
103
|
+
overflow-wrap: anywhere;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.kui-combobox__option:hover,
|
|
107
|
+
.kui-combobox__option[aria-selected="true"] {
|
|
108
|
+
background: var(--kui-color-brand-fill-quiet);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.kui-combobox__option[data-create] {
|
|
112
|
+
color: var(--kui-color-text-link);
|
|
113
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* Web Awesome's own icon-button geometry, for a lone LucideIcon: a square one
|
|
2
|
+
form control height on each side with the glyph centered. Web Awesome
|
|
3
|
+
applies it only to a lone wa-icon. */
|
|
4
|
+
.kui-icon-button::part(base) {
|
|
5
|
+
width: var(--wa-form-control-height);
|
|
6
|
+
min-width: var(--wa-form-control-height);
|
|
7
|
+
padding: 0;
|
|
8
|
+
aspect-ratio: 1;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.kui-icon-button::part(label) {
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Beside a field in a ListInsetControl, the square keeps its size instead of
|
|
18
|
+
growing to share the row, and lines up with the field below its label. */
|
|
19
|
+
.kui-list-inset-control > .kui-icon-button {
|
|
20
|
+
flex: none;
|
|
21
|
+
align-self: flex-end;
|
|
22
|
+
}
|