@kerfjs/ui 5.0.0-beta.131 → 5.0.0-beta.132
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 +0 -13
- package/ai/application-ui-profile-sync.cjs +5 -14
- package/ai/application-ui-profile.d.ts +0 -2
- package/ai/application-ui-profile.defaults.json +0 -4
- package/ai/application-ui-profile.mjs +5 -14
- package/ai/application-ui-profile.schema.json +0 -4
- package/ai/component-catalog.json +9 -7
- package/ai/component-composition-rules.json +2 -10
- package/ai/component-composition.d.ts +0 -17
- package/ai/component-composition.json +3 -11
- package/ai/component-composition.schema.json +0 -59
- package/ai/components/disclosure.md +2 -0
- package/ai/components/form.md +1 -2
- package/ai/components/tab-panel.md +0 -1
- package/ai/components/toolbar-control-group.md +2 -2
- package/ai/public-api-signatures-v1.md +170 -197
- package/ai/skill.md +3 -20
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/backdrop-image.d.ts +1 -1
- package/dist/backdrop-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +1 -1
- package/dist/catalog-resources.d.ts +2 -2
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +16 -16
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip.js +1 -1
- package/dist/choice-chips.d.ts +3 -3
- package/dist/choice-chips.js +1 -1
- package/dist/{chunk-Q5BPZPCO.js → chunk-22T7FFCL.js} +2 -2
- package/dist/{chunk-Q5BPZPCO.js.map → chunk-22T7FFCL.js.map} +1 -1
- package/dist/{chunk-BCHK33XL.js → chunk-27NEAPV7.js} +2 -2
- package/dist/{chunk-BCHK33XL.js.map → chunk-27NEAPV7.js.map} +1 -1
- package/dist/{chunk-76BLSFEA.js → chunk-2OYMXGW2.js} +6 -5
- package/dist/chunk-2OYMXGW2.js.map +1 -0
- package/dist/{chunk-EHR7R7YP.js → chunk-3DPHCZQB.js} +2 -2
- package/dist/{chunk-EHR7R7YP.js.map → chunk-3DPHCZQB.js.map} +1 -1
- package/dist/{chunk-RPJOLDSR.js → chunk-3UIZ36BP.js} +3 -3
- package/dist/{chunk-RPJOLDSR.js.map → chunk-3UIZ36BP.js.map} +1 -1
- package/dist/{chunk-QZA75NOK.js → chunk-42NLFCIN.js} +6 -6
- package/dist/{chunk-QZA75NOK.js.map → chunk-42NLFCIN.js.map} +1 -1
- package/dist/{chunk-UPHPFKAD.js → chunk-4GGIML4E.js} +2 -2
- package/dist/{chunk-UPHPFKAD.js.map → chunk-4GGIML4E.js.map} +1 -1
- package/dist/{chunk-LET362AM.js → chunk-4YXKDS6I.js} +2 -2
- package/dist/{chunk-LET362AM.js.map → chunk-4YXKDS6I.js.map} +1 -1
- package/dist/{chunk-5KWXM5O7.js → chunk-5C34PAUY.js} +2 -2
- package/dist/{chunk-5KWXM5O7.js.map → chunk-5C34PAUY.js.map} +1 -1
- package/dist/{chunk-S7QB5KMM.js → chunk-5L3MLWD5.js} +19 -55
- package/dist/chunk-5L3MLWD5.js.map +1 -0
- package/dist/{chunk-6PHG2DMG.js → chunk-6OH734CG.js} +2 -2
- package/dist/{chunk-6PHG2DMG.js.map → chunk-6OH734CG.js.map} +1 -1
- package/dist/{chunk-E7ZRBMVQ.js → chunk-7XIY7G4K.js} +3 -3
- package/dist/{chunk-E7ZRBMVQ.js.map → chunk-7XIY7G4K.js.map} +1 -1
- package/dist/{chunk-OKZTLRGG.js → chunk-B5Q3KE4Z.js} +2 -2
- package/dist/{chunk-OKZTLRGG.js.map → chunk-B5Q3KE4Z.js.map} +1 -1
- package/dist/{chunk-SGYBIKQA.js → chunk-BADEZQ3V.js} +4 -4
- package/dist/chunk-BADEZQ3V.js.map +1 -0
- package/dist/{chunk-CJAKN2KZ.js → chunk-BLBMUD2W.js} +2 -2
- package/dist/{chunk-CJAKN2KZ.js.map → chunk-BLBMUD2W.js.map} +1 -1
- package/dist/{chunk-TRJS7M2H.js → chunk-BNRH7XG5.js} +2 -2
- package/dist/{chunk-TRJS7M2H.js.map → chunk-BNRH7XG5.js.map} +1 -1
- package/dist/{chunk-NA4LKVPX.js → chunk-BNXJQB2Y.js} +2 -2
- package/dist/{chunk-NA4LKVPX.js.map → chunk-BNXJQB2Y.js.map} +1 -1
- package/dist/{chunk-CCPWJDRW.js → chunk-BQHGXQVA.js} +2 -2
- package/dist/{chunk-CCPWJDRW.js.map → chunk-BQHGXQVA.js.map} +1 -1
- package/dist/{chunk-COQI4OMZ.js → chunk-BRDTP3RT.js} +1 -1
- package/dist/chunk-BRDTP3RT.js.map +1 -0
- package/dist/{chunk-RGB4DPMN.js → chunk-DGYGRMES.js} +3 -3
- package/dist/chunk-DGYGRMES.js.map +1 -0
- package/dist/{chunk-V3IXAI4L.js → chunk-DNNHT7RB.js} +2 -2
- package/dist/{chunk-V3IXAI4L.js.map → chunk-DNNHT7RB.js.map} +1 -1
- package/dist/{chunk-UU37OR3D.js → chunk-DT7KOBQJ.js} +1 -1
- package/dist/chunk-DT7KOBQJ.js.map +1 -0
- package/dist/{chunk-CUUW57WB.js → chunk-DUKE3PLH.js} +2 -2
- package/dist/chunk-DUKE3PLH.js.map +1 -0
- package/dist/{chunk-IPYQYLSX.js → chunk-EWCTBJ5O.js} +6 -6
- package/dist/{chunk-IPYQYLSX.js.map → chunk-EWCTBJ5O.js.map} +1 -1
- package/dist/{chunk-4OH6JSGU.js → chunk-F25UMYDX.js} +2 -2
- package/dist/{chunk-4OH6JSGU.js.map → chunk-F25UMYDX.js.map} +1 -1
- package/dist/{chunk-C4FBYP2D.js → chunk-FJAAOIMP.js} +2 -2
- package/dist/{chunk-C4FBYP2D.js.map → chunk-FJAAOIMP.js.map} +1 -1
- package/dist/{chunk-RHMY45DK.js → chunk-H2XGWH4V.js} +5 -5
- package/dist/{chunk-RHMY45DK.js.map → chunk-H2XGWH4V.js.map} +1 -1
- package/dist/{chunk-76VCWWUA.js → chunk-HSMSTCNZ.js} +2 -2
- package/dist/{chunk-76VCWWUA.js.map → chunk-HSMSTCNZ.js.map} +1 -1
- package/dist/{chunk-ECVTRAXN.js → chunk-IQOO3ZQK.js} +2 -2
- package/dist/{chunk-ECVTRAXN.js.map → chunk-IQOO3ZQK.js.map} +1 -1
- package/dist/{chunk-DBP3N6E5.js → chunk-JBL6SCNN.js} +3 -3
- package/dist/{chunk-DBP3N6E5.js.map → chunk-JBL6SCNN.js.map} +1 -1
- package/dist/{chunk-7KN5OQVN.js → chunk-JNQBPRAA.js} +2 -2
- package/dist/{chunk-7KN5OQVN.js.map → chunk-JNQBPRAA.js.map} +1 -1
- package/dist/{chunk-CPTQABDQ.js → chunk-JNSPYECP.js} +2 -2
- package/dist/{chunk-CPTQABDQ.js.map → chunk-JNSPYECP.js.map} +1 -1
- package/dist/{chunk-E7Q6UNCB.js → chunk-KBDYXGYT.js} +2 -2
- package/dist/{chunk-E7Q6UNCB.js.map → chunk-KBDYXGYT.js.map} +1 -1
- package/dist/{chunk-WVQDIOD7.js → chunk-KKMZP3YL.js} +2 -2
- package/dist/{chunk-WVQDIOD7.js.map → chunk-KKMZP3YL.js.map} +1 -1
- package/dist/{chunk-WSPXSWFG.js → chunk-KZEHTRPC.js} +3 -3
- package/dist/chunk-KZEHTRPC.js.map +1 -0
- package/dist/{chunk-KACJOE2N.js → chunk-LH5V6XGH.js} +2 -2
- package/dist/{chunk-KACJOE2N.js.map → chunk-LH5V6XGH.js.map} +1 -1
- package/dist/{chunk-VBXKYT4O.js → chunk-LH7YRRY7.js} +2 -2
- package/dist/{chunk-VBXKYT4O.js.map → chunk-LH7YRRY7.js.map} +1 -1
- package/dist/{chunk-QXXLDY6I.js → chunk-LI7AQ5NQ.js} +4 -4
- package/dist/{chunk-QXXLDY6I.js.map → chunk-LI7AQ5NQ.js.map} +1 -1
- package/dist/{chunk-CAB5IWV7.js → chunk-LSFPZR52.js} +4 -4
- package/dist/{chunk-CAB5IWV7.js.map → chunk-LSFPZR52.js.map} +1 -1
- package/dist/{chunk-CRHKWHTA.js → chunk-LUWZ7UZQ.js} +4 -4
- package/dist/{chunk-CRHKWHTA.js.map → chunk-LUWZ7UZQ.js.map} +1 -1
- package/dist/{chunk-CMG4OZPV.js → chunk-LWWIBUDK.js} +2 -2
- package/dist/{chunk-CMG4OZPV.js.map → chunk-LWWIBUDK.js.map} +1 -1
- package/dist/{chunk-LOW7J7SE.js → chunk-MHF2NK7F.js} +4 -4
- package/dist/{chunk-LOW7J7SE.js.map → chunk-MHF2NK7F.js.map} +1 -1
- package/dist/{chunk-JHUEYWWI.js → chunk-MPM6YBOM.js} +2 -2
- package/dist/{chunk-JHUEYWWI.js.map → chunk-MPM6YBOM.js.map} +1 -1
- package/dist/{chunk-3UEMBHBK.js → chunk-MPT6Y7Z2.js} +2 -2
- package/dist/{chunk-3UEMBHBK.js.map → chunk-MPT6Y7Z2.js.map} +1 -1
- package/dist/{chunk-OZKBIPXU.js → chunk-NO2XO7S6.js} +3 -3
- package/dist/{chunk-OZKBIPXU.js.map → chunk-NO2XO7S6.js.map} +1 -1
- package/dist/{chunk-FQETQ7CM.js → chunk-NSNQWDJ4.js} +2 -2
- package/dist/{chunk-FQETQ7CM.js.map → chunk-NSNQWDJ4.js.map} +1 -1
- package/dist/{chunk-UOBC36FL.js → chunk-OW2ODKHN.js} +2 -2
- package/dist/{chunk-UOBC36FL.js.map → chunk-OW2ODKHN.js.map} +1 -1
- package/dist/{chunk-PVKAIVKE.js → chunk-P427MACE.js} +63 -74
- package/dist/chunk-P427MACE.js.map +1 -0
- package/dist/{chunk-FR5G77K5.js → chunk-PJKH2GZ3.js} +2 -2
- package/dist/{chunk-FR5G77K5.js.map → chunk-PJKH2GZ3.js.map} +1 -1
- package/dist/{chunk-FNJA4S6J.js → chunk-QNA27ABY.js} +3 -3
- package/dist/{chunk-FNJA4S6J.js.map → chunk-QNA27ABY.js.map} +1 -1
- package/dist/{chunk-6BXPN5SC.js → chunk-RO3TSZ5W.js} +3 -3
- package/dist/{chunk-6BXPN5SC.js.map → chunk-RO3TSZ5W.js.map} +1 -1
- package/dist/{chunk-4IXG6XCT.js → chunk-RUCUU7Z7.js} +2 -2
- package/dist/{chunk-4IXG6XCT.js.map → chunk-RUCUU7Z7.js.map} +1 -1
- package/dist/{chunk-2FA3SX57.js → chunk-RYBJ7OZB.js} +4 -4
- package/dist/{chunk-2FA3SX57.js.map → chunk-RYBJ7OZB.js.map} +1 -1
- package/dist/{chunk-QSJAIXLM.js → chunk-SDQZYSCA.js} +3 -3
- package/dist/{chunk-QSJAIXLM.js.map → chunk-SDQZYSCA.js.map} +1 -1
- package/dist/{chunk-3XSY5LAB.js → chunk-SXZTDJMG.js} +4 -4
- package/dist/{chunk-3XSY5LAB.js.map → chunk-SXZTDJMG.js.map} +1 -1
- package/dist/{chunk-LJV2FNOC.js → chunk-T7M5FKCE.js} +3 -3
- package/dist/{chunk-LJV2FNOC.js.map → chunk-T7M5FKCE.js.map} +1 -1
- package/dist/{chunk-KS7EXW4P.js → chunk-TIRBSPP2.js} +2 -2
- package/dist/{chunk-KS7EXW4P.js.map → chunk-TIRBSPP2.js.map} +1 -1
- package/dist/{chunk-XO5IOPM5.js → chunk-TNJGPG6R.js} +8 -8
- package/dist/{chunk-XO5IOPM5.js.map → chunk-TNJGPG6R.js.map} +1 -1
- package/dist/{chunk-2GEGIPDR.js → chunk-U5SQOZNK.js} +4 -4
- package/dist/{chunk-2GEGIPDR.js.map → chunk-U5SQOZNK.js.map} +1 -1
- package/dist/{chunk-Y4VR6VNM.js → chunk-UPOS666Q.js} +2 -2
- package/dist/{chunk-Y4VR6VNM.js.map → chunk-UPOS666Q.js.map} +1 -1
- package/dist/{chunk-YE6KCAIN.js → chunk-USSGJ3MD.js} +2 -2
- package/dist/{chunk-YE6KCAIN.js.map → chunk-USSGJ3MD.js.map} +1 -1
- package/dist/{chunk-4UWLHKNU.js → chunk-UWLJ7UEK.js} +3 -3
- package/dist/{chunk-4UWLHKNU.js.map → chunk-UWLJ7UEK.js.map} +1 -1
- package/dist/{chunk-SNUDT6AX.js → chunk-VHAYQGWR.js} +2 -2
- package/dist/{chunk-SNUDT6AX.js.map → chunk-VHAYQGWR.js.map} +1 -1
- package/dist/{chunk-DV6GE57V.js → chunk-VWGRAE2Q.js} +2 -2
- package/dist/chunk-VWGRAE2Q.js.map +1 -0
- package/dist/{chunk-4L5ZIKDZ.js → chunk-W7J3MQNV.js} +2 -2
- package/dist/{chunk-4L5ZIKDZ.js.map → chunk-W7J3MQNV.js.map} +1 -1
- package/dist/{chunk-MVWR5WRX.js → chunk-WWDDKUDW.js} +3 -3
- package/dist/{chunk-MVWR5WRX.js.map → chunk-WWDDKUDW.js.map} +1 -1
- package/dist/{chunk-WEQNPYVA.js → chunk-XXKRHKFH.js} +2 -2
- package/dist/{chunk-WEQNPYVA.js.map → chunk-XXKRHKFH.js.map} +1 -1
- package/dist/{chunk-OQFWF7Q7.js → chunk-XZ253TGP.js} +3 -3
- package/dist/{chunk-OQFWF7Q7.js.map → chunk-XZ253TGP.js.map} +1 -1
- package/dist/{chunk-3TBMGGTA.js → chunk-Y672Z7QY.js} +2 -2
- package/dist/{chunk-3TBMGGTA.js.map → chunk-Y672Z7QY.js.map} +1 -1
- package/dist/{chunk-MMOQR426.js → chunk-YS3H6DEQ.js} +2 -2
- package/dist/{chunk-MMOQR426.js.map → chunk-YS3H6DEQ.js.map} +1 -1
- package/dist/{chunk-QR7MGGOM.js → chunk-YVGHWCMY.js} +3 -3
- package/dist/{chunk-QR7MGGOM.js.map → chunk-YVGHWCMY.js.map} +1 -1
- package/dist/{chunk-4CYCJ3NY.js → chunk-Z4PGAYO7.js} +10 -10
- package/dist/{chunk-4CYCJ3NY.js.map → chunk-Z4PGAYO7.js.map} +1 -1
- package/dist/{chunk-JAC6AVZN.js → chunk-ZIZXXYXM.js} +3 -3
- package/dist/{chunk-JAC6AVZN.js.map → chunk-ZIZXXYXM.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +5 -5
- package/dist/collapsible-panel.js +4 -4
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/color-field.js +2 -2
- package/dist/color-picker.js +1 -1
- package/dist/color-swatches.js +1 -1
- package/dist/column-explorer.d.ts +2 -2
- package/dist/column-explorer.js +166 -21
- package/dist/column-explorer.js.map +1 -1
- package/dist/column-track.d.ts +1 -1
- package/dist/column-track.js +1 -1
- package/dist/combobox.d.ts +3 -3
- package/dist/combobox.js +1 -1
- package/dist/content-item.d.ts +1 -1
- package/dist/content-item.js +1 -1
- package/dist/content-swap.d.ts +3 -3
- package/dist/content-swap.js +1 -1
- package/dist/corner-status.d.ts +3 -3
- package/dist/corner-status.js +1 -1
- package/dist/device-class.js +101 -1
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.d.ts +3 -3
- package/dist/disclosure-arrow.js +1 -1
- package/dist/disclosure.d.ts +14 -2
- package/dist/disclosure.js +13 -4
- package/dist/disclosure.js.map +1 -1
- package/dist/edge-activity-indicator.d.ts +3 -3
- package/dist/edge-activity-indicator.js +1 -1
- package/dist/empty-state.d.ts +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/{extension-attributes-IJ4decoa.d.ts → extension-attributes-CnqvBmj3.d.ts} +1 -1
- package/dist/file-picker.d.ts +3 -3
- package/dist/file-picker.js +1 -1
- package/dist/floating-toolbar.d.ts +3 -3
- package/dist/floating-toolbar.js +1 -1
- package/dist/form.d.ts +3 -3
- package/dist/form.js +1 -1
- package/dist/framed-list.js +1 -1
- package/dist/gauge.js +1 -1
- package/dist/grid.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +68 -68
- package/dist/list-action-row.js +1 -1
- package/dist/list-detail-dialog.d.ts +3 -3
- package/dist/list-detail-dialog.js +7 -7
- package/dist/list-detail-dialog.js.map +1 -1
- package/dist/list-header.d.ts +1 -1
- package/dist/list-header.js +1 -1
- package/dist/list-inset-control.d.ts +3 -3
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.d.ts +1 -1
- package/dist/list.js +1 -1
- package/dist/loading-spinner.d.ts +3 -3
- package/dist/loading-spinner.js +1 -1
- package/dist/lucide-icon.d.ts +3 -3
- package/dist/lucide-icon.js +1 -1
- package/dist/message-composer.js +1 -1
- package/dist/{nav-stack-DKrvqFjA.d.ts → nav-stack-IKSMxo2A.d.ts} +3 -3
- package/dist/nav-stack.d.ts +2 -2
- package/dist/nav-stack.js +1 -1
- package/dist/paged-view.d.ts +3 -3
- package/dist/paged-view.js +1 -1
- package/dist/paged-view.js.map +1 -1
- package/dist/pane.js +1 -1
- package/dist/popup-menu-register.js +1 -1
- package/dist/popup-menu.d.ts +1 -20
- package/dist/popup-menu.js +1 -1
- package/dist/progress-bar.js +1 -1
- package/dist/progress-ring.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/resizable-region.d.ts +3 -3
- package/dist/resizable-region.js +1 -1
- package/dist/row.d.ts +1 -1
- package/dist/row.js +1 -1
- package/dist/scroll-effect.d.ts +1 -1
- package/dist/scroll-effect.js +1 -1
- package/dist/{search-field-7wLt3Bd5.d.ts → search-field-BA48RaJY.d.ts} +3 -3
- package/dist/search-field-model.d.ts +2 -2
- package/dist/search-field.d.ts +2 -2
- package/dist/search-field.js +1 -1
- package/dist/segmented-control.d.ts +3 -3
- package/dist/segmented-control.js +1 -1
- package/dist/select-register.js +2 -2
- package/dist/select-register.js.map +1 -1
- package/dist/select.d.ts +3 -13
- package/dist/select.js +1 -1
- package/dist/sized-region.d.ts +3 -3
- package/dist/sized-region.js +1 -1
- package/dist/skeleton.d.ts +3 -3
- package/dist/skeleton.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/spacer.d.ts +3 -3
- package/dist/spacer.js +1 -1
- package/dist/split-button.js +1 -1
- package/dist/split-view.d.ts +4 -4
- package/dist/split-view.js +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/components/actions/popup-menu/popup-menu.css +0 -124
- package/dist/styles/components/actions/toolbar/toolbar.css +0 -7
- package/dist/styles/components/forms/select/select.css +0 -60
- package/dist/styles/components/forms/text-field/text-field.css +1 -1
- package/dist/styles/components/surfaces/disclosure/disclosure.css +24 -4
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +1 -1
- package/dist/styles/disclosure.css +24 -4
- package/dist/styles/popup-menu.css +0 -124
- package/dist/styles/select.css +0 -60
- package/dist/styles/surface-scaffold.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/toolbar.css +0 -7
- package/dist/styles/webawesome.css +7 -0
- package/dist/summary-row.js +1 -1
- package/dist/sunken-panel.d.ts +3 -3
- package/dist/sunken-panel.js +1 -1
- package/dist/surface-scaffold.d.ts +9 -5
- package/dist/surface-scaffold.js +1 -1
- package/dist/switch.js +1 -1
- package/dist/tab-bar-item.js +1 -1
- package/dist/tab-bar.d.ts +3 -3
- package/dist/tab-bar.js +1 -1
- package/dist/tab-navigator.d.ts +3 -3
- package/dist/tab-navigator.js +2 -2
- package/dist/tab-navigator.js.map +1 -1
- package/dist/tab-panel.d.ts +3 -3
- package/dist/tab-panel.js +1 -1
- package/dist/tag-field.d.ts +3 -3
- package/dist/tag-field.js +1 -1
- package/dist/text-field.d.ts +2 -2
- package/dist/text-field.js +1 -1
- package/dist/text.d.ts +1 -1
- package/dist/text.js +1 -1
- package/dist/toolbar-control-group.d.ts +7 -7
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +3 -3
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +3 -3
- package/dist/toolbar.js +1 -1
- package/dist/tree-list.d.ts +3 -3
- package/dist/tree-list.js +151 -3
- package/dist/tree-list.js.map +1 -1
- package/dist/{tree-rows-Bms5QJvG.d.ts → tree-rows-BXChApji.d.ts} +1 -1
- package/dist/value-preview.d.ts +3 -3
- package/dist/value-preview.js +1 -1
- package/dist/value-table.d.ts +5 -5
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +2 -2
- package/dist/wire-catalog.js +2 -2
- package/dist/wire-color-fields.js +73 -2
- package/dist/wire-color-fields.js.map +1 -1
- package/dist/wire-color-pickers.js +1 -1
- package/dist/wire-column-explorer.js +92 -1
- package/dist/wire-column-explorer.js.map +1 -1
- package/dist/wire-content-items.js +204 -1
- package/dist/wire-content-items.js.map +1 -1
- package/dist/wire-nav-stack.js +423 -1
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-search-fields.d.ts +2 -2
- package/dist/wire-search-fields.js +1 -1
- package/dist/wire-sidebar.js +228 -1
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-sliders.js +29 -1
- package/dist/wire-sliders.js.map +1 -1
- package/dist/wire-tab-bars.d.ts +1 -1
- package/dist/wire-tab-navigator.js +150 -1
- package/dist/wire-tab-navigator.js.map +1 -1
- package/dist/wire-tag-fields.js +252 -2
- package/dist/wire-tag-fields.js.map +1 -1
- package/dist/wire-tree-list.js +186 -1
- package/dist/wire-tree-list.js.map +1 -1
- package/dist/wire-workbench.js +1 -1
- package/dist/workbench-dialog.d.ts +3 -3
- package/dist/workbench-dialog.js +5 -5
- package/dist/workbench-dialog.js.map +1 -1
- package/dist/workbench.d.ts +4 -4
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +1 -1
- package/docs/component-contract.md +4 -3
- package/docs/component-selection.md +1 -1
- package/docs/disclosure.md +22 -0
- package/docs/list-detail-dialog.md +2 -3
- package/docs/scroll-effect.md +2 -2
- package/docs/surface-scaffold.md +5 -6
- package/docs/workbench-dialog.md +2 -3
- package/llms.txt +3 -44
- package/package.json +3 -33
- package/ux-demo/recipes/app-shell.tsx +141 -48
- package/ux-demo/recipes/collapsible-sidebar.tsx +169 -43
- package/ux-demo/recipes/compact-toolbar.tsx +114 -22
- package/ux-demo/recipes/composer-form.tsx +104 -14
- package/ux-demo/recipes/list-detail-dialog.tsx +84 -38
- package/ux-demo/recipes/list-workspace-states.tsx +152 -29
- package/ux-demo/recipes/loading-inspector.tsx +174 -30
- package/ux-demo/recipes/media-detail.tsx +146 -29
- package/ux-demo/recipes/navigation-sidebar.tsx +113 -24
- package/ux-demo/recipes/navigation-stack.tsx +43 -7
- package/ux-demo/recipes/workspace-header.tsx +66 -2
- package/ai/component-props-overlay.json +0 -8910
- package/ai/component-props-overlay.schema.json +0 -82
- package/ai/component-props.json +0 -34289
- package/ai/component-props.schema.json +0 -408
- package/ai/view-document.schema.json +0 -467
- package/dist/browser/editor.js +0 -50
- package/dist/chunk-3K5V3ZSD.js +0 -77
- package/dist/chunk-3K5V3ZSD.js.map +0 -1
- package/dist/chunk-63TJH2RF.js +0 -231
- package/dist/chunk-63TJH2RF.js.map +0 -1
- package/dist/chunk-6V6UHPJD.js +0 -153
- package/dist/chunk-6V6UHPJD.js.map +0 -1
- package/dist/chunk-76BLSFEA.js.map +0 -1
- package/dist/chunk-COQI4OMZ.js.map +0 -1
- package/dist/chunk-CUUW57WB.js.map +0 -1
- package/dist/chunk-D2KHQNJ6.js +0 -155
- package/dist/chunk-D2KHQNJ6.js.map +0 -1
- package/dist/chunk-DV6GE57V.js.map +0 -1
- package/dist/chunk-FCO7BT4P.js +0 -256
- package/dist/chunk-FCO7BT4P.js.map +0 -1
- package/dist/chunk-GHV36C6I.js +0 -94
- package/dist/chunk-GHV36C6I.js.map +0 -1
- package/dist/chunk-HPOXLOVC.js +0 -184
- package/dist/chunk-HPOXLOVC.js.map +0 -1
- package/dist/chunk-I2K4OQKB.js +0 -426
- package/dist/chunk-I2K4OQKB.js.map +0 -1
- package/dist/chunk-PVKAIVKE.js.map +0 -1
- package/dist/chunk-RGB4DPMN.js.map +0 -1
- package/dist/chunk-S7QB5KMM.js.map +0 -1
- package/dist/chunk-SGYBIKQA.js.map +0 -1
- package/dist/chunk-TXBNPEIJ.js +0 -31
- package/dist/chunk-TXBNPEIJ.js.map +0 -1
- package/dist/chunk-UU37OR3D.js.map +0 -1
- package/dist/chunk-WCMGPAY2.js +0 -103
- package/dist/chunk-WCMGPAY2.js.map +0 -1
- package/dist/chunk-WSPXSWFG.js.map +0 -1
- package/dist/chunk-X43QQWVC.js +0 -208
- package/dist/chunk-X43QQWVC.js.map +0 -1
- package/dist/chunk-YA6OAJY6.js +0 -155
- package/dist/chunk-YA6OAJY6.js.map +0 -1
- package/dist/editor.d.ts +0 -447
- package/dist/editor.js +0 -15608
- package/dist/editor.js.map +0 -1
- package/dist/styles/editor/editor.css +0 -585
- package/dist/styles/editor.css +0 -4
- package/dist/view-runtime.d.ts +0 -9
- package/dist/view-runtime.js +0 -8
- package/dist/view-runtime.js.map +0 -1
- package/docs/editor-host.md +0 -397
- package/docs/view.md +0 -314
- package/props/cli.d.mts +0 -1
- package/props/cli.mjs +0 -142
- package/props/component-props.d.mts +0 -180
- package/props/component-props.mjs +0 -1208
- package/view/catalog.mjs +0 -229
- package/view/child-kind.mjs +0 -22
- package/view/cli.d.mts +0 -18
- package/view/cli.mjs +0 -316
- package/view/contract.mjs +0 -418
- package/view/css-grammar.mjs +0 -93
- package/view/generate.d.mts +0 -16
- package/view/generate.mjs +0 -739
- package/view/index.d.mts +0 -491
- package/view/index.mjs +0 -36
- package/view/interpret.mjs +0 -339
- package/view/project-types-worker.mjs +0 -55
- package/view/project-types.d.mts +0 -43
- package/view/project-types.mjs +0 -618
- package/view/type-expression.d.mts +0 -15
- package/view/type-expression.mjs +0 -162
- package/view/types.mjs +0 -165
- package/view/validate-move.mjs +0 -353
- package/view/validate.mjs +0 -1649
- package/vite-editor.d.mts +0 -173
- package/vite-editor.mjs +0 -548
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/value-table/internal/value-table-row.tsx","../src/components/data-display/value-table/value-table.tsx"],"names":["jsx"],"mappings":";;;;;AAuBA,IAAM,yBAAA,uBAAgC,GAAA,CAAI;AAAA,EACxC,gBAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,CAAC,CAAA;AAEM,SAAS,aAAA,CAAc;AAAA,EAC5B,KAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA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A,GAAY,EAAA;AAAA,EACZ,QAAA;AAAA,EACA,IAAA;AAAA,EACA,iBAAiB;AACnB,CAAA,EAAoB;AAClB,EAAA,uBACEA,GAAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,qBAAqB,CAAA;AAAA,MAC9D,KAAA,EAAO,CAAA,gBAAA,EAAmB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MAC3C,gBAAA,EAAe,aAAA;AAAA,MACf,cAAA,EAAc,OAAA;AAAA,MACd,mBAAA,EAAmB,YAAA;AAAA,MACnB,kBAAA,EAAkB,UAAA;AAAA,MAClB,kBAAA,EAAkB,UAAA,KAAe,MAAA,GAAY,MAAA,GAAY,EAAA;AAAA,MACzD,KAAA,EACE,UAAA,KAAe,MAAA,GACX,MAAA,GACA,gCAAgC,UAAU,CAAA,CAAA;AAAA,MAEhD,YAAA,EAAY,KAAA;AAAA,MACZ,IAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"chunk-KZEHTRPC.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../../shared/dom/extension-attributes.js';\nimport { em } from '../../../../shared/styles/css-values.js';\nimport { Skeleton } from '../../../feedback/skeleton/skeleton.js';\n\nexport interface ValueTableRowProps {\n label: string | SafeHtml;\n value: string | SafeHtml;\n icon?: SafeHtml;\n className?: string;\n /** Render the value as an unanimated loading skeleton, keeping the field label. */\n placeholder?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\nconst VALUE_TABLE_ROW_PROTECTED = new Set([\n 'data-component',\n 'data-has-icon',\n 'data-placeholder',\n]);\n\nexport function ValueTableRow({\n label,\n value,\n icon,\n className = '',\n placeholder = false,\n slot,\n rootAttributes = {},\n}: ValueTableRowProps) {\n return (\n <div\n {...filterDataAttributes(rootAttributes, VALUE_TABLE_ROW_PROTECTED)}\n class={`kui-value-table__row ${className}`.trim()}\n data-has-icon={String(Boolean(icon))}\n data-placeholder={placeholder ? 'true' : undefined}\n slot={slot}\n >\n <dt>\n {icon && <span class=\"kui-value-table__icon\">{icon}</span>}\n <span class=\"kui-value-table__label\">{label}</span>\n </dt>\n <dd>{placeholder ? <Skeleton width={em(10)} /> : value}</dd>\n </div>\n );\n}\n","import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport type { CssLength } from '../../../shared/styles/css-values.js';\n\nexport {\n ValueTableRow,\n type ValueTableRowProps,\n} from './internal/value-table-row.js';\n\n/** `columns` keeps label and value side by side; `stacked` puts each value under its label. */\nexport type ValueTablePresentation = 'columns' | 'stacked';\n/** Table width below which columns stack: `compact` is 512px, `narrow` 576px. */\nexport type ValueTableStackBelow = 'compact' | 'narrow';\n\nexport interface ValueTableProps {\n label: string;\n /** Compact row spacing for metadata-dense surfaces. */\n density?: 'default' | 'compact';\n /**\n * Minimum width of the label column (for example `px(160)`); the value then\n * takes the rest of the row. Omitted, label and value share the row by\n * content.\n */\n labelWidth?: CssLength;\n /** Side-by-side columns (default) or values stacked under their labels. */\n presentation?: ValueTablePresentation;\n /**\n * Stack the rows only while the table itself is narrower than the preset,\n * so one table reads as columns in a wide dialog and stacks on a phone.\n */\n stackBelow?: ValueTableStackBelow;\n className?: string;\n children: KerfUiContent;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\nconst VALUE_TABLE_PROTECTED = new Set([\n 'data-component',\n 'data-density',\n 'data-label-width',\n 'data-presentation',\n 'data-stack-below',\n]);\n\nexport function ValueTable({\n label,\n density = 'default',\n labelWidth,\n presentation = 'columns',\n stackBelow,\n className = '',\n children,\n slot,\n rootAttributes = {},\n}: ValueTableProps) {\n return (\n <dl\n {...filterDataAttributes(rootAttributes, VALUE_TABLE_PROTECTED)}\n class={`kui-value-table ${className}`.trim()}\n data-component=\"value-table\"\n data-density={density}\n data-presentation={presentation}\n data-stack-below={stackBelow}\n data-label-width={labelWidth === undefined ? undefined : ''}\n style={\n labelWidth === undefined\n ? undefined\n : `--_kui-value-table-label-min:${labelWidth}`\n }\n aria-label={label}\n slot={slot}\n >\n {children}\n </dl>\n );\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { checkedAnchorName } from './chunk-DKPYHVIV.js';
|
|
|
2
2
|
import { scrollEdgeAttributes } from './chunk-IRC5N7FA.js';
|
|
3
3
|
import { ensureSunkenTexture } from './chunk-IKS72C6P.js';
|
|
4
4
|
import { surfaceTintAttributes, joinStyles } from './chunk-M72QLDUO.js';
|
|
5
|
-
import { filterDataAttributes } from './chunk-
|
|
5
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'kerfjs/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var paneProtectedAttributes = /* @__PURE__ */ new Set([
|
|
@@ -167,4 +167,4 @@ function Pane({
|
|
|
167
167
|
|
|
168
168
|
export { Pane };
|
|
169
169
|
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-LH5V6XGH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/layout/pane/pane.tsx"],"names":[],"mappings":";;;;;;;AAiCA,IAAM,uBAAA,uBAA8B,GAAA,CAAI;AAAA,EACtC,gBAAA;AAAA,EACA,uBAAA;AAAA,EACA,WAAA;AAAA,EACA,uBAAA;AAAA,EACA,qBAAA;AAAA,EACA,qBAAA;AAAA,EACA,0BAAA;AAAA,EACA,0BAAA;AAAA,EACA,sBAAA;AAAA,EACA,iBAAA;AAAA,EACA,iBAAA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AAA,CAAO,UAAA,CAAW,QAAA,CAAS,YAAY,CAAC,CAAA;AAAA,IACrE,4BAAA,EAA8B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,aAAa,CAAC,CAAA;AAAA,IAC1E,0BAAA,EAA4B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,WAAW,CAAC,CAAA;AAAA,IACtE,6BAAA,EAA+B,MAAA;AAAA,MAC7B,aAAA,CAAc,SAAS,cAAc;AAAA,KACvC;AAAA,IACA,2BAAA,EAA6B,MAAA,CAAO,aAAA,CAAc,QAAA,CAAS,YAAY,CAAC,CAAA;AAAA,IACxE,YAAA,EAAc,KAAA;AAAA,IACd,QAAA,EAAU,QAAA;AAAA,IACV;AAAA,GACF;AAEA,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,IAAI,YAAY,OAAA,EAAS,2BAAQ,OAAA,EAAA,EAAO,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC7D,EAAA,IAAI,YAAY,MAAA,EAAQ,2BAAQ,MAAA,EAAA,EAAM,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AAC3D,EAAA,IAAI,YAAY,SAAA,EAAW,2BAAQ,SAAA,EAAA,EAAS,GAAG,YAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACjE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,UAAA,EAAa,QAAA,EAAA,IAAA,EAAK,CAAA;AACpC","file":"chunk-KACJOE2N.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nimport {\n type ScrollEdge,\n scrollEdgeAttributes,\n} from '../../../shared/layout/scroll-edge.js';\nimport {\n type AnchorName,\n checkedAnchorName,\n} from '../../../shared/styles/anchor-name.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport {\n joinStyles,\n type SurfaceTint,\n surfaceTintAttributes,\n type SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n\n/**\n * Logical pane sides: where a {@link Pane} can show a separator and where it can\n * compensate for a device safe-area inset.\n */\nexport type PaneSeparatorSide =\n 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\n\n/** Semantic root elements supported by {@link Pane}. */\nexport type PaneElement = 'article' | 'aside' | 'div' | 'main' | 'section';\n\n/** Semantic elements supported by the scrolling content slot. */\nexport type PaneContentElement = 'div' | 'main' | 'nav' | 'section';\n\nconst paneProtectedAttributes = new Set([\n 'data-component',\n 'data-scroll-anchoring',\n 'data-fill',\n 'data-chrome-placement',\n 'data-compact-header',\n 'data-compact-footer',\n 'data-compact-header-open',\n 'data-compact-footer-open',\n 'data-chrome-dividers',\n 'data-appearance',\n 'data-background',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n 'data-deep-inset',\n 'data-outlined',\n 'data-scroll-clearance',\n 'data-header-presentation',\n 'data-header-material',\n 'data-scroll-edge',\n 'data-scroll-edge-distance',\n 'data-header-overlay',\n 'data-separator-block-start',\n 'data-separator-block-end',\n 'data-separator-inline-start',\n 'data-separator-inline-end',\n 'data-safe-area-block-start',\n 'data-safe-area-block-end',\n 'data-safe-area-inline-start',\n 'data-safe-area-inline-end',\n]);\n\nconst allPaneSides: readonly PaneSeparatorSide[] = [\n 'block-start',\n 'block-end',\n 'inline-start',\n 'inline-end',\n];\n\ntype PaneRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-fill'?: never;\n 'data-separator-block-start'?: never;\n 'data-separator-block-end'?: never;\n 'data-separator-inline-start'?: never;\n 'data-separator-inline-end'?: never;\n 'data-safe-area-block-start'?: never;\n 'data-safe-area-block-end'?: never;\n 'data-safe-area-inline-start'?: never;\n 'data-safe-area-inline-end'?: never;\n 'data-chrome-placement'?: never;\n 'data-chrome-dividers'?: never;\n 'data-appearance'?: never;\n 'data-background'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n 'data-deep-inset'?: never;\n 'data-outlined'?: never;\n 'data-scroll-clearance'?: never;\n 'data-header-presentation'?: never;\n 'data-header-material'?: never;\n 'data-scroll-edge'?: never;\n 'data-scroll-edge-distance'?: never;\n 'data-header-overlay'?: never;\n 'data-compact-header'?: never;\n 'data-compact-footer'?: never;\n 'data-compact-header-open'?: never;\n 'data-compact-footer-open'?: never;\n }\n>;\n\n/** How a Pane's header and footer relate to its scrolling content. */\nexport type PaneChromePlacement = 'fixed' | 'auto';\n\n/**\n * How a header or footer behaves when the pane's container presents\n * compactly (a `NavStack` view, a `TabNavigator` scene, a full-screen dialog,\n * or a compact `Workbench`): `fixed` stays docked and shrinks the content\n * area; `scroll` sits inline with the content (a footer settles at the end\n * and scrolls past when the content is longer); `overlay` lies over the\n * content on the chrome material, shown only while the app opens it.\n */\nexport type PaneCompactChrome = 'fixed' | 'scroll' | 'overlay';\n\n/** The compact chrome policy for a Pane's header and footer. */\nexport interface PaneCompactChromePolicy {\n header?: PaneCompactChrome;\n footer?: PaneCompactChrome;\n}\n\n/**\n * When a Pane draws the divider between its pinned header or footer and its\n * scrolling content: `scroll` while content is scrolled away beneath that\n * chrome, as `wireScrollDividers` reports; `always`; or `none`.\n */\nexport type PaneChromeDividers = 'scroll' | 'always' | 'none';\n\n/**\n * How a Pane's header relates to its scrolling content: `docked` in its own\n * row above the content, or `overlay` laid over the content's top edge on the\n * translucent chrome material, so content scrolls visibly beneath it.\n * `clear` lays it over\n * the same edge fully transparent, for chrome over imagery: legibility comes\n * from glass control groups or a scrim, and with `scrollEdge=\"material\"` the\n * chrome material fades in once content scrolls beneath it.\n */\nexport type PaneHeaderPresentation = 'docked' | 'overlay' | 'clear';\n\n/** Background treatment of the Pane's scrolling work surface. */\nexport type PaneAppearance = 'default' | 'sunken';\n\n/** Whether a Pane's scrolling content keeps the browser's scroll anchoring. */\nexport type PaneScrollAnchoring = 'auto' | 'none';\n\nexport interface PaneProps {\n /** Optional fixed chrome above the scrolling content, arranged vertically. */\n header?: KerfUiContent;\n /** The pane's primary vertical, scrolling content stack. */\n children?: KerfUiContent;\n /** Optional fixed chrome below the scrolling content. */\n footer?: KerfUiContent;\n /**\n * Fill the height of a parent with a definite height, such as an app root\n * (`.kui-app-root`), a `SizedRegion`, or a grid cell, or take the rest of a\n * flex column. The header and footer stay pinned and the content scrolls\n * between them, as in a NavStack view or Workbench region (which fill their\n * Pane without this prop). Defaults to false: the pane takes its content's\n * height.\n */\n fill?: boolean;\n /**\n * Whether the header and footer stay pinned around the scrolling content.\n * `fixed` (default) always pins them. `auto` pins them while the pane is\n * tall enough, and below 480px of height (30rem, so it scales with the text\n * size) lets the whole pane scroll as one column, so tall chrome can never\n * squeeze the content to nothing.\n */\n chromePlacement?: PaneChromePlacement;\n /**\n * The divider under the header and over the footer, where they meet the\n * scrolling content. Omitted defaults to `scroll` for a plain pane and\n * `always` for `appearance=\"sunken\"`. `scroll` shows the header's divider only\n * while the content is scrolled down, and the footer's only while more\n * content lies below — never when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane; unwired, neither shows. `always` shows both; `none` neither.\n * The line is drawn inside the chrome, so no state moves the content.\n */\n chromeDividers?: PaneChromeDividers;\n /**\n * `docked` (default) gives the header its own row above the scrolling\n * content. `overlay` lays the header over the content's top edge on the\n * translucent chrome material (`--kui-chrome-material`, opaque under\n * `prefers-reduced-transparency`, forced colors, or without\n * `backdrop-filter`), so content scrolls visibly beneath it. Once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane it measures the header and publishes its height as the\n * `--kui-scroll-clearance-block-start` context, which the content adds to\n * its block-start padding and `scroll-padding` without any\n * `scrollClearance` prop, so the first item, and anything focused or\n * scrolled into view, rests clear of the header. Until then, and with\n * `chromePlacement=\"auto\"`, the header stays docked. Keep overlay header\n * text in the normal text color: quiet text can fall below AA over the\n * content passing beneath it.\n */\n /**\n * What the header and footer do when the pane's container presents\n * compactly (default `fixed`); roomy containers ignore it. The container\n * interprets it, so set it on panes inside a `NavStack`, `TabNavigator`,\n * full-screen dialog, or `Workbench`.\n */\n compactChrome?: PaneCompactChromePolicy;\n /**\n * Which `overlay` compact chrome is showing. The app owns it and flips it\n * from a control the person can reach while the chrome is hidden.\n */\n compactChromeOpen?: { header?: boolean; footer?: boolean };\n headerPresentation?: PaneHeaderPresentation;\n /**\n * With `headerPresentation=\"clear\"`, `material` fades the chrome material\n * in behind the header once content scrolls beneath it (default `none`).\n */\n scrollEdge?: ScrollEdge;\n /**\n * The scroll distance, in CSS pixels, over which the scroll edge fades in\n * (default 60).\n */\n scrollEdgeDistance?: number;\n /** Paint the scrolling work surface with the shared lowered-surface color. */\n appearance?: PaneAppearance;\n /**\n * Paint the whole pane, header and footer included, in an app-chosen color\n * (`uiColor('surface-raised')`, `fillColor('#1f2a44')`, or `colorVar(…)`\n * from `@kerfjs/ui/css-values`). It replaces the appearance's fill: a sunken\n * pane drops its lowered color and grain. Omitted, the pane keeps its\n * default (transparent, or the sunken surface). Forced colors paint\n * `Canvas`. Keep text at AA over the color; a dark color needs a matching\n * tint or dark tones for its content.\n */\n background?: CssColor;\n /**\n * A scoped tint: `{ color, scheme }`, the app's color and the scheme it\n * belongs to. The pane paints the tinted surface (unless `background` is\n * set) and its whole subtree, chrome material and quiet fills included,\n * re-derives its surface and text tokens from the color with lightness\n * clamped to keep text at WCAG AA. Without relative color syntax, or under\n * `prefers-contrast: more`, the scope keeps the plain palette in the\n * declared scheme.\n */\n tint?: SurfaceTint;\n /**\n * Scope this surface and its subtree to the light or dark palette, whatever\n * the page's scheme (a light card on a dark page). A `tint` already sets\n * its scheme; pass `scheme` alone for the plain palette, or with a tint\n * only when they agree.\n */\n scheme?: SurfaceTintScheme;\n /**\n * Clear chrome that lies over the scrolling content's block-start and/or\n * block-end edge, such as a `DialogSurface` floating footer over a filling\n * Pane. The content scroller adds the inherited\n * `--kui-scroll-clearance-block-*` context that chrome publishes to its block\n * padding and `scroll-padding`, so content scrolls visibly beneath the chrome\n * while its first and last items (and anything focused or scrolled into\n * view) can still rest clear of it. Defaults to none.\n */\n scrollClearance?: ScrollClearance;\n /** Add 8px to every side of scrolling content (default: false). */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the Pane root. */\n tabIndex?: 0 | -1;\n /**\n * Names the Pane root as a CSS anchor (`anchor-name`): a dashed ident such\n * as `--app-main`. A surface that docks to a named anchor, such as a\n * `PopoverDialogSurface` with the same `anchorName`, then docks to this\n * pane, so the app names its main column without CSS. A Workbench work\n * area, panel, or NavStack view takes it through its `PaneConfig`.\n */\n anchorName?: AnchorName;\n /**\n * The scrolling content's CSS scroll anchoring (`overflow-anchor`). `auto`\n * (the default) keeps the browser's anchoring, which holds visible content\n * still when something above it grows or shrinks. `none` opts the pane\n * out: use it for a pane whose own edits insert or remove rows above the\n * reader, where Safari can apply a late anchoring jump on an unrelated\n * reflow, such as an inspector. A Workbench panel, work area, or NavStack\n * view takes it through its `PaneConfig`.\n */\n scrollAnchoring?: PaneScrollAnchoring;\n /** Keep the standard focus outline visible, such as for a drop target. */\n outlined?: boolean;\n /** Root semantics. Defaults to `div`. */\n element?: PaneElement;\n /** Scrolling content semantics. Defaults to `div`. */\n contentElement?: PaneContentElement;\n /** Independent logical-edge separator lines. Defaults to none. */\n separators?: readonly PaneSeparatorSide[];\n /**\n * Sides on which the pane may compensate for a device safe-area inset.\n * Defaults to every side: the pane pads its slots for each side that still\n * reaches an unsafe screen edge, as its surrounding layout reports, while its\n * background and separators paint through. List only the sides an app-owned\n * layout places at a screen edge, or pass `[]` to opt out.\n */\n safeAreaEdges?: readonly PaneSeparatorSide[];\n id?: string;\n /** Accessible name for a landmark root such as `aside` or `main`. */\n label?: string;\n /** Accessible name for a landmark scrolling slot such as `nav`. */\n contentLabel?: string;\n className?: string;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n /** Safe `data-*` metadata; Pane-owned structural attributes remain protected. */\n rootAttributes?: PaneRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A pane's configuration, apart from its content and styling hooks: the props a\n * composite that renders a `Pane` for the app (a Workbench panel or work area,\n * or a CollapsiblePanel) forwards, so the app configures that pane instead of\n * styling it. An omitted or `undefined` field keeps the composite's default.\n */\nexport type PaneConfig = Pick<\n PaneProps,\n | 'contentElement'\n | 'contentLabel'\n | 'separators'\n | 'safeAreaEdges'\n | 'chromeDividers'\n | 'compactChrome'\n | 'compactChromeOpen'\n | 'headerPresentation'\n | 'scrollEdge'\n | 'scrollEdgeDistance'\n | 'appearance'\n | 'background'\n | 'tint'\n | 'deepInset'\n | 'scrollClearance'\n | 'tabIndex'\n | 'outlined'\n | 'anchorName'\n | 'scrollAnchoring'\n>;\n\nfunction paneContent(\n element: PaneContentElement,\n children: KerfUiContent,\n className: string,\n label: string | undefined,\n) {\n const attributes = {\n class: `kui-pane__content kui-content ${className}`.trim(),\n 'aria-label': label,\n };\n if (element === 'main') return <main {...attributes}>{children}</main>;\n if (element === 'nav') return <nav {...attributes}>{children}</nav>;\n if (element === 'section')\n return <section {...attributes}>{children}</section>;\n return <div {...attributes}>{children}</div>;\n}\n\n/**\n * An unpadded application column with optional fixed header/footer slots and one\n * scrolling vertical content owner. Separator lines are independently opt-in on\n * each logical edge, so the same component works as a sidebar, main area,\n * inspector, or dialog column.\n */\nexport function Pane({\n header,\n children,\n footer,\n fill = false,\n chromePlacement = 'fixed',\n chromeDividers,\n compactChrome = {},\n compactChromeOpen = {},\n headerPresentation = 'docked',\n scrollEdge = 'none',\n scrollEdgeDistance,\n appearance = 'default',\n background,\n tint,\n scheme,\n deepInset = false,\n scrollClearance,\n tabIndex,\n anchorName,\n scrollAnchoring = 'auto',\n outlined = false,\n element = 'div',\n contentElement = 'div',\n separators = [],\n safeAreaEdges = allPaneSides,\n id,\n label,\n contentLabel,\n className = '',\n headerClassName = '',\n contentClassName = '',\n footerClassName = '',\n rootAttributes = {},\n slot,\n}: PaneProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n paneProtectedAttributes,\n );\n const content = paneContent(\n contentElement,\n children,\n contentClassName,\n contentLabel,\n );\n const resolvedChromeDividers =\n chromeDividers ?? (appearance === 'sunken' ? 'always' : 'scroll');\n if (appearance === 'sunken' && background === undefined)\n ensureSunkenTexture();\n const tinted = surfaceTintAttributes(tint, scheme);\n const clearHeader = headerPresentation === 'clear' && header !== undefined;\n const body = (\n <>\n {header === undefined ? null : (\n <header\n class={`kui-pane__header kui-pane__toolbar ${headerClassName}`.trim()}\n >\n {header}\n </header>\n )}\n {content}\n {footer === undefined ? null : (\n <footer class={`kui-pane__footer ${footerClassName}`.trim()}>\n {footer}\n </footer>\n )}\n </>\n );\n const attributes = {\n ...safeRootAttributes,\n class: `kui-pane ${tinted.className} ${className}`\n .replace(/\\s+/g, ' ')\n .trim(),\n id,\n 'data-component': 'pane',\n 'data-fill': fill ? 'true' : undefined,\n 'data-appearance': appearance === 'sunken' ? 'sunken' : undefined,\n 'data-background': background === undefined ? undefined : '',\n 'data-kui-tint': tinted['data-kui-tint'],\n 'data-kui-tint-accent': tinted['data-kui-tint-accent'],\n 'data-kui-scheme': tinted['data-kui-scheme'],\n style: joinStyles(\n background === undefined\n ? undefined\n : `--_kui-pane-background:${background}`,\n tinted.style,\n anchorName === undefined\n ? undefined\n : `anchor-name:${checkedAnchorName(anchorName, 'Pane anchorName')}`,\n ),\n 'data-deep-inset': deepInset ? 'true' : undefined,\n 'data-outlined': outlined ? 'true' : undefined,\n 'data-scroll-anchoring': scrollAnchoring === 'none' ? 'none' : undefined,\n 'data-scroll-clearance': scrollClearance,\n 'data-header-presentation':\n headerPresentation !== 'docked' && header !== undefined\n ? 'overlay'\n : undefined,\n 'data-header-material': clearHeader ? 'clear' : undefined,\n ...scrollEdgeAttributes(scrollEdge, scrollEdgeDistance, clearHeader),\n 'data-chrome-placement': chromePlacement === 'auto' ? 'auto' : undefined,\n 'data-compact-header':\n header !== undefined && compactChrome.header !== 'fixed'\n ? compactChrome.header\n : undefined,\n 'data-compact-footer':\n footer !== undefined && compactChrome.footer !== 'fixed'\n ? compactChrome.footer\n : undefined,\n 'data-compact-header-open':\n compactChrome.header === 'overlay' && compactChromeOpen.header\n ? ''\n : undefined,\n 'data-compact-footer-open':\n compactChrome.footer === 'overlay' && compactChromeOpen.footer\n ? ''\n : undefined,\n 'data-chrome-dividers':\n resolvedChromeDividers === 'always' || resolvedChromeDividers === 'none'\n ? resolvedChromeDividers\n : undefined,\n 'data-separator-block-start': String(separators.includes('block-start')),\n 'data-separator-block-end': String(separators.includes('block-end')),\n 'data-separator-inline-start': String(separators.includes('inline-start')),\n 'data-separator-inline-end': String(separators.includes('inline-end')),\n 'data-safe-area-block-start': String(safeAreaEdges.includes('block-start')),\n 'data-safe-area-block-end': String(safeAreaEdges.includes('block-end')),\n 'data-safe-area-inline-start': String(\n safeAreaEdges.includes('inline-start'),\n ),\n 'data-safe-area-inline-end': String(safeAreaEdges.includes('inline-end')),\n 'aria-label': label,\n tabindex: tabIndex,\n slot,\n };\n\n if (element === 'article') return <article {...attributes}>{body}</article>;\n if (element === 'aside') return <aside {...attributes}>{body}</aside>;\n if (element === 'main') return <main {...attributes}>{body}</main>;\n if (element === 'section') return <section {...attributes}>{body}</section>;\n return <div {...attributes}>{body}</div>;\n}\n\nexport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nexport type { ScrollEdge } from '../../../shared/layout/scroll-edge.js';\nexport type {\n SurfaceTint,\n SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/layout/pane/pane.tsx"],"names":[],"mappings":";;;;;;;AAiCA,IAAM,uBAAA,uBAA8B,GA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ent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nimport {\n type ScrollEdge,\n scrollEdgeAttributes,\n} from '../../../shared/layout/scroll-edge.js';\nimport {\n type AnchorName,\n checkedAnchorName,\n} from '../../../shared/styles/anchor-name.js';\nimport type { CssColor } from '../../../shared/styles/css-values.js';\nimport { ensureSunkenTexture } from '../../../shared/styles/sunken-texture.js';\nimport {\n joinStyles,\n type SurfaceTint,\n surfaceTintAttributes,\n type SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n\n/**\n * Logical pane sides: where a {@link Pane} can show a separator and where it can\n * compensate for a device safe-area inset.\n */\nexport type PaneSeparatorSide =\n 'block-start' | 'block-end' | 'inline-start' | 'inline-end';\n\n/** Semantic root elements supported by {@link Pane}. */\nexport type PaneElement = 'article' | 'aside' | 'div' | 'main' | 'section';\n\n/** Semantic elements supported by the scrolling content slot. */\nexport type PaneContentElement = 'div' | 'main' | 'nav' | 'section';\n\nconst paneProtectedAttributes = new Set([\n 'data-component',\n 'data-scroll-anchoring',\n 'data-fill',\n 'data-chrome-placement',\n 'data-compact-header',\n 'data-compact-footer',\n 'data-compact-header-open',\n 'data-compact-footer-open',\n 'data-chrome-dividers',\n 'data-appearance',\n 'data-background',\n 'data-kui-tint',\n 'data-kui-tint-accent',\n 'data-deep-inset',\n 'data-outlined',\n 'data-scroll-clearance',\n 'data-header-presentation',\n 'data-header-material',\n 'data-scroll-edge',\n 'data-scroll-edge-distance',\n 'data-header-overlay',\n 'data-separator-block-start',\n 'data-separator-block-end',\n 'data-separator-inline-start',\n 'data-separator-inline-end',\n 'data-safe-area-block-start',\n 'data-safe-area-block-end',\n 'data-safe-area-inline-start',\n 'data-safe-area-inline-end',\n]);\n\nconst allPaneSides: readonly PaneSeparatorSide[] = [\n 'block-start',\n 'block-end',\n 'inline-start',\n 'inline-end',\n];\n\ntype PaneRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-fill'?: never;\n 'data-separator-block-start'?: never;\n 'data-separator-block-end'?: never;\n 'data-separator-inline-start'?: never;\n 'data-separator-inline-end'?: never;\n 'data-safe-area-block-start'?: never;\n 'data-safe-area-block-end'?: never;\n 'data-safe-area-inline-start'?: never;\n 'data-safe-area-inline-end'?: never;\n 'data-chrome-placement'?: never;\n 'data-chrome-dividers'?: never;\n 'data-appearance'?: never;\n 'data-background'?: never;\n 'data-kui-tint'?: never;\n 'data-kui-tint-accent'?: never;\n 'data-deep-inset'?: never;\n 'data-outlined'?: never;\n 'data-scroll-clearance'?: never;\n 'data-header-presentation'?: never;\n 'data-header-material'?: never;\n 'data-scroll-edge'?: never;\n 'data-scroll-edge-distance'?: never;\n 'data-header-overlay'?: never;\n 'data-compact-header'?: never;\n 'data-compact-footer'?: never;\n 'data-compact-header-open'?: never;\n 'data-compact-footer-open'?: never;\n }\n>;\n\n/** How a Pane's header and footer relate to its scrolling content. */\nexport type PaneChromePlacement = 'fixed' | 'auto';\n\n/**\n * How a header or footer behaves when the pane's container presents\n * compactly (a `NavStack` view, a `TabNavigator` scene, a full-screen dialog,\n * or a compact `Workbench`): `fixed` stays docked and shrinks the content\n * area; `scroll` sits inline with the content (a footer settles at the end\n * and scrolls past when the content is longer); `overlay` lies over the\n * content on the chrome material, shown only while the app opens it.\n */\nexport type PaneCompactChrome = 'fixed' | 'scroll' | 'overlay';\n\n/** The compact chrome policy for a Pane's header and footer. */\nexport interface PaneCompactChromePolicy {\n header?: PaneCompactChrome;\n footer?: PaneCompactChrome;\n}\n\n/**\n * When a Pane draws the divider between its pinned header or footer and its\n * scrolling content: `scroll` while content is scrolled away beneath that\n * chrome, as `wireScrollDividers` reports; `always`; or `none`.\n */\nexport type PaneChromeDividers = 'scroll' | 'always' | 'none';\n\n/**\n * How a Pane's header relates to its scrolling content: `docked` in its own\n * row above the content, or `overlay` laid over the content's top edge on the\n * translucent chrome material, so content scrolls visibly beneath it.\n * `clear` lays it over\n * the same edge fully transparent, for chrome over imagery: legibility comes\n * from glass control groups or a scrim, and with `scrollEdge=\"material\"` the\n * chrome material fades in once content scrolls beneath it.\n */\nexport type PaneHeaderPresentation = 'docked' | 'overlay' | 'clear';\n\n/** Background treatment of the Pane's scrolling work surface. */\nexport type PaneAppearance = 'default' | 'sunken';\n\n/** Whether a Pane's scrolling content keeps the browser's scroll anchoring. */\nexport type PaneScrollAnchoring = 'auto' | 'none';\n\nexport interface PaneProps {\n /** Optional fixed chrome above the scrolling content, arranged vertically. */\n header?: KerfUiContent;\n /** The pane's primary vertical, scrolling content stack. */\n children?: KerfUiContent;\n /** Optional fixed chrome below the scrolling content. */\n footer?: KerfUiContent;\n /**\n * Fill the height of a parent with a definite height, such as an app root\n * (`.kui-app-root`), a `SizedRegion`, or a grid cell, or take the rest of a\n * flex column. The header and footer stay pinned and the content scrolls\n * between them, as in a NavStack view or Workbench region (which fill their\n * Pane without this prop). Defaults to false: the pane takes its content's\n * height.\n */\n fill?: boolean;\n /**\n * Whether the header and footer stay pinned around the scrolling content.\n * `fixed` (default) always pins them. `auto` pins them while the pane is\n * tall enough, and below 480px of height (30rem, so it scales with the text\n * size) lets the whole pane scroll as one column, so tall chrome can never\n * squeeze the content to nothing.\n */\n chromePlacement?: PaneChromePlacement;\n /**\n * The divider under the header and over the footer, where they meet the\n * scrolling content. Omitted defaults to `scroll` for a plain pane and\n * `always` for `appearance=\"sunken\"`. `scroll` shows the header's divider only\n * while the content is scrolled down, and the footer's only while more\n * content lies below — never when the content fits — once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane; unwired, neither shows. `always` shows both; `none` neither.\n * The line is drawn inside the chrome, so no state moves the content.\n */\n chromeDividers?: PaneChromeDividers;\n /**\n * `docked` (default) gives the header its own row above the scrolling\n * content. `overlay` lays the header over the content's top edge on the\n * translucent chrome material (`--kui-chrome-material`, opaque under\n * `prefers-reduced-transparency`, forced colors, or without\n * `backdrop-filter`), so content scrolls visibly beneath it. Once\n * `wireScrollDividers` (`@kerfjs/ui/wire-scroll-dividers`) is wired above\n * the pane it measures the header and publishes its height as the\n * `--kui-scroll-clearance-block-start` context, which the content adds to\n * its block-start padding and `scroll-padding` without any\n * `scrollClearance` prop, so the first item, and anything focused or\n * scrolled into view, rests clear of the header. Until then, and with\n * `chromePlacement=\"auto\"`, the header stays docked. Keep overlay header\n * text in the normal text color: quiet text can fall below AA over the\n * content passing beneath it.\n */\n /**\n * What the header and footer do when the pane's container presents\n * compactly (default `fixed`); roomy containers ignore it. The container\n * interprets it, so set it on panes inside a `NavStack`, `TabNavigator`,\n * full-screen dialog, or `Workbench`.\n */\n compactChrome?: PaneCompactChromePolicy;\n /**\n * Which `overlay` compact chrome is showing. The app owns it and flips it\n * from a control the person can reach while the chrome is hidden.\n */\n compactChromeOpen?: { header?: boolean; footer?: boolean };\n headerPresentation?: PaneHeaderPresentation;\n /**\n * With `headerPresentation=\"clear\"`, `material` fades the chrome material\n * in behind the header once content scrolls beneath it (default `none`).\n */\n scrollEdge?: ScrollEdge;\n /**\n * The scroll distance, in CSS pixels, over which the scroll edge fades in\n * (default 60).\n */\n scrollEdgeDistance?: number;\n /** Paint the scrolling work surface with the shared lowered-surface color. */\n appearance?: PaneAppearance;\n /**\n * Paint the whole pane, header and footer included, in an app-chosen color\n * (`uiColor('surface-raised')`, `fillColor('#1f2a44')`, or `colorVar(…)`\n * from `@kerfjs/ui/css-values`). It replaces the appearance's fill: a sunken\n * pane drops its lowered color and grain. Omitted, the pane keeps its\n * default (transparent, or the sunken surface). Forced colors paint\n * `Canvas`. Keep text at AA over the color; a dark color needs a matching\n * tint or dark tones for its content.\n */\n background?: CssColor;\n /**\n * A scoped tint: `{ color, scheme }`, the app's color and the scheme it\n * belongs to. The pane paints the tinted surface (unless `background` is\n * set) and its whole subtree, chrome material and quiet fills included,\n * re-derives its surface and text tokens from the color with lightness\n * clamped to keep text at WCAG AA. Without relative color syntax, or under\n * `prefers-contrast: more`, the scope keeps the plain palette in the\n * declared scheme.\n */\n tint?: SurfaceTint;\n /**\n * Scope this surface and its subtree to the light or dark palette, whatever\n * the page's scheme (a light card on a dark page). A `tint` already sets\n * its scheme; pass `scheme` alone for the plain palette, or with a tint\n * only when they agree.\n */\n scheme?: SurfaceTintScheme;\n /**\n * Clear chrome that lies over the scrolling content's block-start and/or\n * block-end edge, such as a `DialogSurface` floating footer over a filling\n * Pane. The content scroller adds the inherited\n * `--kui-scroll-clearance-block-*` context that chrome publishes to its block\n * padding and `scroll-padding`, so content scrolls visibly beneath the chrome\n * while its first and last items (and anything focused or scrolled into\n * view) can still rest clear of it. Defaults to none.\n */\n scrollClearance?: ScrollClearance;\n /** Add 8px to every side of scrolling content (default: false). */\n deepInset?: boolean;\n /** Opt into keyboard (`0`) or programmatic (`-1`) focus on the Pane root. */\n tabIndex?: 0 | -1;\n /**\n * Names the Pane root as a CSS anchor (`anchor-name`): a dashed ident such\n * as `--app-main`. A surface that docks to a named anchor, such as a\n * `PopoverDialogSurface` with the same `anchorName`, then docks to this\n * pane, so the app names its main column without CSS. A Workbench work\n * area, panel, or NavStack view takes it through its `PaneConfig`.\n */\n anchorName?: AnchorName;\n /**\n * The scrolling content's CSS scroll anchoring (`overflow-anchor`). `auto`\n * (the default) keeps the browser's anchoring, which holds visible content\n * still when something above it grows or shrinks. `none` opts the pane\n * out: use it for a pane whose own edits insert or remove rows above the\n * reader, where Safari can apply a late anchoring jump on an unrelated\n * reflow, such as an inspector. A Workbench panel, work area, or NavStack\n * view takes it through its `PaneConfig`.\n */\n scrollAnchoring?: PaneScrollAnchoring;\n /** Keep the standard focus outline visible, such as for a drop target. */\n outlined?: boolean;\n /** Root semantics. Defaults to `div`. */\n element?: PaneElement;\n /** Scrolling content semantics. Defaults to `div`. */\n contentElement?: PaneContentElement;\n /** Independent logical-edge separator lines. Defaults to none. */\n separators?: readonly PaneSeparatorSide[];\n /**\n * Sides on which the pane may compensate for a device safe-area inset.\n * Defaults to every side: the pane pads its slots for each side that still\n * reaches an unsafe screen edge, as its surrounding layout reports, while its\n * background and separators paint through. List only the sides an app-owned\n * layout places at a screen edge, or pass `[]` to opt out.\n */\n safeAreaEdges?: readonly PaneSeparatorSide[];\n id?: string;\n /** Accessible name for a landmark root such as `aside` or `main`. */\n label?: string;\n /** Accessible name for a landmark scrolling slot such as `nav`. */\n contentLabel?: string;\n className?: string;\n headerClassName?: string;\n contentClassName?: string;\n footerClassName?: string;\n /** Safe `data-*` metadata; Pane-owned structural attributes remain protected. */\n rootAttributes?: PaneRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A pane's configuration, apart from its content and styling hooks: the props a\n * composite that renders a `Pane` for the app (a Workbench panel or work area,\n * or a CollapsiblePanel) forwards, so the app configures that pane instead of\n * styling it. An omitted or `undefined` field keeps the composite's default.\n */\nexport type PaneConfig = Pick<\n PaneProps,\n | 'contentElement'\n | 'contentLabel'\n | 'separators'\n | 'safeAreaEdges'\n | 'chromeDividers'\n | 'compactChrome'\n | 'compactChromeOpen'\n | 'headerPresentation'\n | 'scrollEdge'\n | 'scrollEdgeDistance'\n | 'appearance'\n | 'background'\n | 'tint'\n | 'deepInset'\n | 'scrollClearance'\n | 'tabIndex'\n | 'outlined'\n | 'anchorName'\n | 'scrollAnchoring'\n>;\n\nfunction paneContent(\n element: PaneContentElement,\n children: KerfUiContent,\n className: string,\n label: string | undefined,\n) {\n const attributes = {\n class: `kui-pane__content kui-content ${className}`.trim(),\n 'aria-label': label,\n };\n if (element === 'main') return <main {...attributes}>{children}</main>;\n if (element === 'nav') return <nav {...attributes}>{children}</nav>;\n if (element === 'section')\n return <section {...attributes}>{children}</section>;\n return <div {...attributes}>{children}</div>;\n}\n\n/**\n * An unpadded application column with optional fixed header/footer slots and one\n * scrolling vertical content owner. Separator lines are independently opt-in on\n * each logical edge, so the same component works as a sidebar, main area,\n * inspector, or dialog column.\n */\nexport function Pane({\n header,\n children,\n footer,\n fill = false,\n chromePlacement = 'fixed',\n chromeDividers,\n compactChrome = {},\n compactChromeOpen = {},\n headerPresentation = 'docked',\n scrollEdge = 'none',\n scrollEdgeDistance,\n appearance = 'default',\n background,\n tint,\n scheme,\n deepInset = false,\n scrollClearance,\n tabIndex,\n anchorName,\n scrollAnchoring = 'auto',\n outlined = false,\n element = 'div',\n contentElement = 'div',\n separators = [],\n safeAreaEdges = allPaneSides,\n id,\n label,\n contentLabel,\n className = '',\n headerClassName = '',\n contentClassName = '',\n footerClassName = '',\n rootAttributes = {},\n slot,\n}: PaneProps) {\n const safeRootAttributes = filterDataAttributes(\n rootAttributes,\n paneProtectedAttributes,\n );\n const content = paneContent(\n contentElement,\n children,\n contentClassName,\n contentLabel,\n );\n const resolvedChromeDividers =\n chromeDividers ?? (appearance === 'sunken' ? 'always' : 'scroll');\n if (appearance === 'sunken' && background === undefined)\n ensureSunkenTexture();\n const tinted = surfaceTintAttributes(tint, scheme);\n const clearHeader = headerPresentation === 'clear' && header !== undefined;\n const body = (\n <>\n {header === undefined ? null : (\n <header\n class={`kui-pane__header kui-pane__toolbar ${headerClassName}`.trim()}\n >\n {header}\n </header>\n )}\n {content}\n {footer === undefined ? null : (\n <footer class={`kui-pane__footer ${footerClassName}`.trim()}>\n {footer}\n </footer>\n )}\n </>\n );\n const attributes = {\n ...safeRootAttributes,\n class: `kui-pane ${tinted.className} ${className}`\n .replace(/\\s+/g, ' ')\n .trim(),\n id,\n 'data-component': 'pane',\n 'data-fill': fill ? 'true' : undefined,\n 'data-appearance': appearance === 'sunken' ? 'sunken' : undefined,\n 'data-background': background === undefined ? undefined : '',\n 'data-kui-tint': tinted['data-kui-tint'],\n 'data-kui-tint-accent': tinted['data-kui-tint-accent'],\n 'data-kui-scheme': tinted['data-kui-scheme'],\n style: joinStyles(\n background === undefined\n ? undefined\n : `--_kui-pane-background:${background}`,\n tinted.style,\n anchorName === undefined\n ? undefined\n : `anchor-name:${checkedAnchorName(anchorName, 'Pane anchorName')}`,\n ),\n 'data-deep-inset': deepInset ? 'true' : undefined,\n 'data-outlined': outlined ? 'true' : undefined,\n 'data-scroll-anchoring': scrollAnchoring === 'none' ? 'none' : undefined,\n 'data-scroll-clearance': scrollClearance,\n 'data-header-presentation':\n headerPresentation !== 'docked' && header !== undefined\n ? 'overlay'\n : undefined,\n 'data-header-material': clearHeader ? 'clear' : undefined,\n ...scrollEdgeAttributes(scrollEdge, scrollEdgeDistance, clearHeader),\n 'data-chrome-placement': chromePlacement === 'auto' ? 'auto' : undefined,\n 'data-compact-header':\n header !== undefined && compactChrome.header !== 'fixed'\n ? compactChrome.header\n : undefined,\n 'data-compact-footer':\n footer !== undefined && compactChrome.footer !== 'fixed'\n ? compactChrome.footer\n : undefined,\n 'data-compact-header-open':\n compactChrome.header === 'overlay' && compactChromeOpen.header\n ? ''\n : undefined,\n 'data-compact-footer-open':\n compactChrome.footer === 'overlay' && compactChromeOpen.footer\n ? ''\n : undefined,\n 'data-chrome-dividers':\n resolvedChromeDividers === 'always' || resolvedChromeDividers === 'none'\n ? resolvedChromeDividers\n : undefined,\n 'data-separator-block-start': String(separators.includes('block-start')),\n 'data-separator-block-end': String(separators.includes('block-end')),\n 'data-separator-inline-start': String(separators.includes('inline-start')),\n 'data-separator-inline-end': String(separators.includes('inline-end')),\n 'data-safe-area-block-start': String(safeAreaEdges.includes('block-start')),\n 'data-safe-area-block-end': String(safeAreaEdges.includes('block-end')),\n 'data-safe-area-inline-start': String(\n safeAreaEdges.includes('inline-start'),\n ),\n 'data-safe-area-inline-end': String(safeAreaEdges.includes('inline-end')),\n 'aria-label': label,\n tabindex: tabIndex,\n slot,\n };\n\n if (element === 'article') return <article {...attributes}>{body}</article>;\n if (element === 'aside') return <aside {...attributes}>{body}</aside>;\n if (element === 'main') return <main {...attributes}>{body}</main>;\n if (element === 'section') return <section {...attributes}>{body}</section>;\n return <div {...attributes}>{body}</div>;\n}\n\nexport type { ScrollClearance } from '../../../shared/layout/scroll-clearance.js';\nexport type { ScrollEdge } from '../../../shared/layout/scroll-edge.js';\nexport type {\n SurfaceTint,\n SurfaceTintScheme,\n} from '../../../shared/styles/surface-tint.js';\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pct } from './chunk-IQSRHXZR.js';
|
|
2
|
-
import { filterDataAttributes } from './chunk-
|
|
2
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
3
3
|
import { jsx } from 'kerfjs/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
function blockStyle(width, height, radius) {
|
|
@@ -68,4 +68,4 @@ function Skeleton({
|
|
|
68
68
|
|
|
69
69
|
export { Skeleton };
|
|
70
70
|
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-LH7YRRY7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/feedback/skeleton/skeleton.tsx"],"names":[],"mappings":";;;;AAiCA,SAAS,UAAA,CACP,KAAA,EACA,MAAA,EACA,MAAA,EACoB;AACpB,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,KAAA,IAAS,SAAS,KAAK,CAAA,CAAA;AAAA,IACvB,MAAA,IAAU,UAAU,MAAM,CAAA,CAAA;AAAA,IAC1B,MAAA,IAAU,yBAAyB,MAAM,CAAA;AAAA,GAC3C,CAAE,OAAO,OAAO,CAAA;AAChB,EAAA,OAAO,KAAA,CAAM,MAAA,GAAS,KAAA,CAAM,IAAA,CAAK,GAAG,CAAA,GAAI,MAAA;AAC1C;AAEA,IAAM,qCAAqB,IAAI,GAAA,CAAI,CAAC,YAAA,EAAc,gBAAgB,CAAC,CAAA;AAQ5D,SAAS,QAAA,CAAS;AAAA,EACvB,KAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA,GAAQ,KAAA;AAAA,EACR,KAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,IAAA;AAAA,EAC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A;AAAA,QAC3D,KAAA,EAAO,CAAA,mBAAA,EAAsB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,QAC9C,gBAAA,EAAe,UAAA;AAAA,QACf,KAAA,EAAO,KAAA,GAAQ,CAAA,MAAA,EAAS,KAAK,CAAA,CAAA,GAAK,MAAA;AAAA,QACjC,GAAG,IAAA;AAAA,QACJ,IAAA;AAAA,QAEC,QAAA,EAAA,KAAA,CAAM,KAAK,EAAE,MAAA,EAAQ,OAAM,EAAG,CAAC,GAAG,KAAA,qBACjC,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,cAAA;AAAA,YACN,aAAA,EAAY,MAAA;AAAA,YACZ,KAAA,EAAO,UAAA;AAAA,cACL,KAAA,KAAU,KAAA,GAAQ,CAAA,GAAI,GAAA,CAAI,EAAE,CAAA,GAAI,MAAA;AAAA,cAChC,MAAA;AAAA,cACA;AAAA;AACF;AAAA,SAEH;AAAA;AAAA,KACH;AAAA,EAEJ;AACA,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACE,GAAG,oBAAA,CAAqB,cAAA,EAAgB,kBAAkB,CAAA;AAAA,MAC3D,KAAA,EAAO,CAAA,aAAA,EAAgB,SAAS,CAAA,CAAA,CAAG,IAAA,EAAK;AAAA,MACxC,gBAAA,EAAe,UAAA;AAAA,MACf,YAAA,EAAY,QAAQ,MAAA,GAAS,MAAA;AAAA,MAC7B,KAAA,EAAO,UAAA,CAAW,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAA;AAAA,MACtC,GAAG,IAAA;AAAA,MACJ;AAAA;AAAA,GACF;AAEJ","file":"chunk-LH7YRRY7.js","sourcesContent":["import {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport {\n type CssLength,\n type CssSize,\n pct,\n} from '../../../shared/styles/css-values.js';\n\nexport interface SkeletonProps {\n /** Typed width or intrinsic sizing keyword. Defaults to filling its slot. */\n width?: CssSize;\n /** Typed height or intrinsic sizing keyword. Defaults to a single text line. */\n height?: CssSize;\n /** Typed corner-radius override. Defaults to the small radius token. */\n radius?: CssLength;\n /** Render this many stacked lines (the last one shorter), for multi-line text. */\n lines?: number;\n /** Lay the block out as `display: block` instead of the default\n * `inline-block`, so it takes no text line of its own: no baseline gap\n * below it, and it centers like an icon in a slot. Defaults to `false`. */\n block?: boolean;\n /** Accessible label. Omit to keep the block decorative (`aria-hidden`). */\n label?: string;\n className?: string;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\nfunction blockStyle(\n width?: CssSize,\n height?: CssSize,\n radius?: CssLength,\n): string | undefined {\n const parts = [\n width && `width:${width}`,\n height && `height:${height}`,\n radius && `--kui-skeleton-radius:${radius}`,\n ].filter(Boolean);\n return parts.length ? parts.join(';') : undefined;\n}\n\nconst SKELETON_PROTECTED = new Set(['data-block', 'data-component']);\n\n/**\n * A subtle, deliberately **unanimated** loading placeholder block. Use it for a\n * value slot whose content is not yet known, on its own or via a component's\n * `placeholder` prop. Decorative by default (`aria-hidden`); pass `label` to\n * announce it. Sizes to its slot unless `width`/`height` are given.\n */\nexport function Skeleton({\n width,\n height,\n radius,\n lines,\n block = false,\n label,\n className = '',\n slot,\n rootAttributes = {},\n}: SkeletonProps) {\n const a11y = {\n role: label ? 'img' : undefined,\n 'aria-label': label,\n 'aria-hidden': label ? undefined : ('true' as const),\n };\n if (lines && lines > 1) {\n return (\n <span\n {...filterDataAttributes(rootAttributes, SKELETON_PROTECTED)}\n class={`kui-skeleton-lines ${className}`.trim()}\n data-component=\"skeleton\"\n style={width ? `width:${width}` : undefined}\n {...a11y}\n slot={slot}\n >\n {Array.from({ length: lines }, (_, index) => (\n <span\n class=\"kui-skeleton\"\n aria-hidden=\"true\"\n style={blockStyle(\n index === lines - 1 ? pct(60) : undefined,\n height,\n radius,\n )}\n />\n ))}\n </span>\n );\n }\n return (\n <span\n {...filterDataAttributes(rootAttributes, SKELETON_PROTECTED)}\n class={`kui-skeleton ${className}`.trim()}\n data-component=\"skeleton\"\n data-block={block ? 'true' : undefined}\n style={blockStyle(width, height, radius)}\n {...a11y}\n slot={slot}\n />\n );\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { badgeText, badgeShows } from './chunk-TBVSPSGX.js';
|
|
2
|
-
import { LoadingSpinner } from './chunk-
|
|
3
|
-
import { Badge } from './chunk-
|
|
4
|
-
import { filterDataAttributes } from './chunk-
|
|
2
|
+
import { LoadingSpinner } from './chunk-DNNHT7RB.js';
|
|
3
|
+
import { Badge } from './chunk-VHAYQGWR.js';
|
|
4
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'kerfjs/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var BUTTON_PROTECTED = /* @__PURE__ */ new Set([
|
|
@@ -161,4 +161,4 @@ function resolveLink(link, href, target) {
|
|
|
161
161
|
|
|
162
162
|
export { Button };
|
|
163
163
|
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-LI7AQ5NQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/actions/button/button.tsx"],"names":[],"mappings":";;;;;;AAwCA,IAAM,gBAAA,uBAAuB,GAAA,CAAI;AAAA,EAC/B,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,WAAA;AAAA,EACA,eAAA;AAAA,EACA,WAAA;AAAA,EACA,cAAA;AAAA,EACA,gBAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA;AAAA,EACA;AACF,CAAC,CAAA;AA8IM,SAAS,MAAA,CAAO;AAAA,EACrB,QAAA;AAAA,EACA,IAAA,GAAO,SAAA;AAAA,EACP,QAAA,GAAW,SAAA;AAAA,EACX,IAAA,GAAO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,EAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACA,EAAA,uBACE,GAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACE,GAAG,MAAA;AAAA,MACJ,IAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,QAAA;AAAA,MACA,cAAA,EAAc,OAAA,KAAY,MAAA,GAAY,MAAA,GAAY,OAAO,OAAO,CAAA;AAAA,MAChE,eAAA,EAAe,QAAA,KAAa,MAAA,GAAY,MAAA,GAAY,OAAO,QAAQ,CAAA;AAAA,MACnE,aAAA;AAAA,MACA,mBAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;AAOA,SAAS,WAAA,CACP,IAAA,EACA,IAAA,EACA,MAAA,EACoE;AACpE,EAAA,IAAI,IAAA,KAAS,MAAA,EAAW,OAAO,EAAE,MAAM,MAAA,EAAO;AAC9C,EAAA,IAAI,IAAA,KAAS,UAAa,MAAA,KAAW,MAAA;AACnC,IAAA,MAAM,IAAI,SAAA;AAAA,MACR;AAAA,KACF;AACF,EAAA,IAAI,OAAO,SAAS,QAAA,EAAU,OAAO,EAAE,IAAA,EAAM,IAAA,EAAM,QAAQ,MAAA,EAAU;AAErE,EAAA,MAAM,cAAc,IAAA,CAAK,IAAA;AACzB,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,OAAO,WAAA,KAAgB,QAAA,GAAW,cAAc,WAAA,CAAY,IAAA;AAAA,IAClE,MAAA,EAAQ,QAAA,IAAY,IAAA,GAAO,IAAA,CAAK,MAAA,GAAS;AAAA,GAC3C;AACF","file":"chunk-QXXLDY6I.js","sourcesContent":["import { badgeShows, badgeText } from '../../../shared/content/badge-text.js';\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport { Badge, type BadgeTone } from '../../feedback/badge/badge.js';\nimport { LoadingSpinner } from '../../feedback/loading-spinner/loading-spinner.js';\n\n/** The color family: `neutral` (default), `brand` for the main action, `success` for a positive one, `danger` for a destructive one. */\nexport type ButtonTone = 'neutral' | 'brand' | 'success' | 'danger';\n\n/**\n * How loudly it asks: `primary` (default) fills the button, `secondary`\n * outlines it, `plain` shows only its text until hovered, and `link` draws it\n * as an inline text link (the tone's link color, underlined, no box). Any\n * Button takes any emphasis, whether it renders a `<button>` or a link.\n */\nexport type ButtonEmphasis = 'primary' | 'secondary' | 'plain' | 'link';\n\n/** Where a link Button opens. */\nexport type ButtonLinkTarget = '_self' | '_blank' | '_parent' | '_top';\n\n/**\n * A link Button's destination: a URL (a `URL` or a string), or a URL with\n * the `target` it opens in. A `URL` is written as its `.href`.\n */\nexport type ButtonLink =\n | URL\n | string\n | {\n readonly href: URL | string;\n readonly target?: ButtonLinkTarget;\n };\n\n/** `default` is the 44px control height; `compact` is 33px with smaller text. */\nexport type ButtonSize = 'default' | 'compact';\n\n/** Corner shape: the shared `rounded` control radius (default) or a full `pill`. */\nexport type ButtonShape = 'rounded' | 'pill';\n/** What a form button does: `button` (default), `submit`, or `reset`. */\nexport type ButtonType = 'button' | 'submit' | 'reset';\n\nconst BUTTON_PROTECTED = new Set([\n 'data-component',\n 'data-action',\n 'data-tone',\n 'data-emphasis',\n 'data-size',\n 'data-loading',\n 'data-icon-only',\n 'data-shape',\n 'data-fill',\n 'data-focus-ring-inset',\n]);\n\n/** Application `data-*` metadata; the Button's own markers stay protected. */\nexport type ButtonRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined>\n>;\n\n/** A Button's visible label: text or rendered content, never empty. */\nexport type ButtonLabel =\n string | Exclude<KerfUiContent, null | undefined | boolean>;\n\n/**\n * A labeled button (its label names it; `ariaLabel` only when the label is\n * not enough), or an icon-only square named by `ariaLabel`.\n */\nexport type ButtonContent =\n | {\n /** The label. */\n children: ButtonLabel;\n /** A leading icon, such as a `LucideIcon`; it is decorative. */\n icon?: KerfUiContent;\n ariaLabel?: string;\n }\n | {\n children?: undefined;\n /** The icon of an icon-only square button. */\n icon: KerfUiContent;\n /** The accessible name an icon-only button needs. */\n ariaLabel: string;\n };\n\nexport type ButtonProps = ButtonContent & ButtonOptions;\n\nexport interface ButtonOptions {\n tone?: ButtonTone;\n emphasis?: ButtonEmphasis;\n size?: ButtonSize;\n /** Corner shape (default `rounded`). */\n shape?: ButtonShape;\n /**\n * Span the full width of the parent instead of sizing to the label, as on\n * `SplitButton`. The label stays centered and ellipsizes when it no longer\n * fits.\n */\n fill?: boolean;\n /**\n * Make it a toggle: `aria-pressed` reports the state, and a pressed look is\n * drawn on top of the tone and emphasis. The application owns the state and\n * flips it in its `action` handler. A link (`link` or `href`) cannot be a\n * toggle, and neither can a Button with the `link` emphasis.\n */\n pressed?: boolean;\n /**\n * Make it a disclosure control: `aria-expanded` reports whether the\n * content it shows or hides is open (KF-DE348P). The application owns the\n * state and flips it in its `action` handler; pair it with a\n * `DisclosureArrow` icon. A link (`link` or `href`) cannot take it.\n */\n expanded?: boolean;\n /** Mark the current step in a sequence with `aria-current=\"step\"`. */\n currentStep?: boolean;\n /**\n * Busy: a spinner replaces the label (which still names it) and the button\n * reports `aria-busy`. Presses still reach it; the application decides\n * what a press does while it is busy.\n */\n loading?: boolean;\n disabled?: boolean;\n /** A form button's behavior (default `button`, which never submits). */\n type?: ButtonType;\n name?: string;\n value?: string;\n /** The id of the form it belongs to, when it sits outside that form. */\n form?: string;\n /**\n * Render a link instead of a `<button>`: a URL, or `{ href, target }`. The\n * Button keeps its emphasis (set `emphasis=\"link\"` for a text link). The\n * preferred spelling of `href` + `target`; give one or the other, not both.\n */\n link?: ButtonLink;\n /** Render a link instead of a `<button>`; `link` is the preferred form. */\n href?: string;\n /** Where an `href` link opens; with `link`, pass `{ href, target }`. */\n target?: ButtonLinkTarget;\n /** Delegated `data-action` the application handles. */\n action?: string;\n /**\n * The id of a native `popover` element this button opens or closes (the\n * Popover API's invoker; KF-PAMQNM). A link Button cannot take it.\n */\n popoverTarget?: string;\n /** What the button does to its `popoverTarget`; the browser default is `toggle`. */\n popoverTargetAction?: 'toggle' | 'show' | 'hide';\n /** The kind of popup the button opens, reported as `aria-haspopup`. */\n ariaHasPopup?: 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n /**\n * Keep the button's focus ring inside its box when an ancestor clips\n * overflow. The inset ring is two-tone, a surface-colored line inside the\n * ring color, so it stays visible on a loud fill of the ring's own hue.\n */\n focusRingInset?: boolean;\n /**\n * A count, short text, or `true` for a text-free dot over the button's\n * top-trailing corner, such as how many items a filter hides. A count of 0\n * or less, or empty text, shows no badge; a count past `badgeMax` shows\n * `99+`. It stays out of the accessible name unless `badgeLabel` names it.\n */\n badge?: number | string | true;\n /** The largest count shown before `badgeMax+` (default 99). */\n badgeMax?: number;\n /**\n * Words for the badge (\"3 hidden\"), added to the button's name while the\n * badge shows.\n */\n badgeLabel?: string;\n /** The badge's tone (default `danger`). */\n badgeTone?: BadgeTone;\n /**\n * Native hover text that says more than the name, such as \"More Actions\n * for report.pdf\". An icon-only Button already gets a help tag with its\n * `ariaLabel` (with `@kerfjs/ui/help-tags-register`); a `title` replaces\n * that tag.\n */\n title?: string;\n id?: string;\n className?: string;\n /** Safe `data-*` metadata (a `data-key`, `data-dialog-close`). */\n rootAttributes?: ButtonRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A standalone action button: a native `<button>` (or a link with `link`)\n * in one of four tones and four emphases, including an inline text link, at the 44px control height or\n * compact, with a label or as an icon-only square, rounded or pill-shaped,\n * sized to its label or filling its parent's width, and optionally a\n * `pressed` toggle or `currentStep` marker. Inside a\n * `ToolbarControlGroup`, use a plain `<button>`, which the group styles; use\n * Button for a dialog footer, a form, or a standalone action beside other\n * content.\n */\nexport function Button({\n children,\n tone = 'neutral',\n emphasis = 'primary',\n size = 'default',\n shape = 'rounded',\n fill = false,\n pressed,\n expanded,\n currentStep = false,\n icon,\n loading = false,\n disabled = false,\n type = 'button',\n name,\n value,\n form,\n link,\n href: hrefProp,\n target: targetProp,\n action,\n popoverTarget,\n popoverTargetAction,\n ariaHasPopup,\n focusRingInset = false,\n badge,\n badgeMax = 99,\n badgeLabel,\n badgeTone = 'danger',\n ariaLabel,\n title,\n id,\n className = '',\n rootAttributes = {},\n slot,\n}: ButtonProps) {\n const { href, target } = resolveLink(link, hrefProp, targetProp);\n // KF-RESJ2S: the link look marks no toggle state.\n if (emphasis === 'link' && pressed !== undefined)\n throw new TypeError(\n 'A Button with the link emphasis cannot be a toggle (pressed).',\n );\n // KF-78EZ8Q: the same count rules as ToolbarButton.\n const shownBadge = badgeText(badge, badgeMax);\n const badgeVisible = badgeShows(badge, badgeMax);\n const shared = {\n ...filterDataAttributes(rootAttributes, BUTTON_PROTECTED),\n id,\n class: `kui-button ${className}`.trim(),\n 'data-component': 'button',\n 'data-tone': tone,\n 'data-emphasis': emphasis,\n 'data-size': size,\n 'data-loading': loading ? '' : undefined,\n 'data-icon-only': children === undefined ? '' : undefined,\n 'data-shape': shape === 'pill' ? 'pill' : undefined,\n 'data-fill': fill ? 'true' : undefined,\n 'data-focus-ring-inset': focusRingInset ? 'true' : undefined,\n 'data-action': action,\n 'aria-label':\n ariaLabel && badgeVisible && badgeLabel\n ? `${ariaLabel}, ${badgeLabel}`\n : ariaLabel,\n title,\n 'aria-haspopup': ariaHasPopup,\n 'aria-busy': loading ? 'true' : undefined,\n 'aria-current': currentStep ? 'step' : undefined,\n slot,\n };\n const content = (\n <>\n {icon === undefined ? null : (\n <span class=\"kui-button__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {children === undefined ? null : (\n <span class=\"kui-button__label\">{children}</span>\n )}\n {badge === true ? (\n <Badge\n tone={badgeTone}\n size=\"dot\"\n placement=\"corner\"\n {...(ariaLabel || !badgeLabel\n ? { ariaHidden: true as const }\n : { label: badgeLabel })}\n />\n ) : shownBadge === undefined ? null : (\n <Badge\n tone={badgeTone}\n appearance=\"solid\"\n size=\"compact\"\n placement=\"corner\"\n {...(ariaLabel || !badgeLabel\n ? { ariaHidden: true as const }\n : { label: badgeLabel })}\n >\n {shownBadge}\n </Badge>\n )}\n {loading ? (\n <span class=\"kui-button__spinner\" aria-hidden=\"true\">\n <LoadingSpinner />\n </span>\n ) : null}\n </>\n );\n // A disabled link has no destination and is announced as disabled.\n if (href !== undefined) {\n if (pressed !== undefined)\n throw new TypeError('A link Button cannot be a toggle (pressed).');\n if (expanded !== undefined)\n throw new TypeError(\n 'A link Button cannot be a disclosure control (expanded).',\n );\n if (popoverTarget !== undefined)\n throw new TypeError(\n 'A link Button cannot open a popover (popoverTarget).',\n );\n return (\n <a\n {...shared}\n href={disabled ? undefined : href}\n target={disabled ? undefined : target}\n // KF-6GBJBP: a new-tab link gets Chip `external`'s rel, so the opened\n // page can't reach window.opener or see this page as its referrer.\n rel={\n disabled || target !== '_blank' ? undefined : 'noopener noreferrer'\n }\n role={disabled ? 'link' : undefined}\n aria-disabled={disabled ? 'true' : undefined}\n >\n {content}\n </a>\n );\n }\n return (\n <button\n {...shared}\n type={type}\n name={name}\n value={value}\n form={form}\n disabled={disabled}\n aria-pressed={pressed === undefined ? undefined : String(pressed)}\n aria-expanded={expanded === undefined ? undefined : String(expanded)}\n popoverTarget={popoverTarget}\n popoverTargetAction={popoverTargetAction}\n >\n {content}\n </button>\n );\n}\n\n/**\n * KF-RESJ2S: `link` is sugar over `href` + `target`. A string or `URL` is the\n * destination; an object adds where it opens. Both forms at once throw rather\n * than silently preferring one.\n */\nfunction resolveLink(\n link: ButtonLink | undefined,\n href: string | undefined,\n target: ButtonLinkTarget | undefined,\n): { href: string | undefined; target: ButtonLinkTarget | undefined } {\n if (link === undefined) return { href, target };\n if (href !== undefined || target !== undefined)\n throw new TypeError(\n 'Give a Button either link or href and target, not both.',\n );\n if (typeof link === 'string') return { href: link, target: undefined };\n // A URL and the object form both carry `href`; only the object a target.\n const destination = link.href;\n return {\n href: typeof destination === 'string' ? destination : destination.href,\n target: 'target' in link ? link.target : undefined,\n };\n}\n"]}
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EAAA,OAAO;AAAA,IACL,IAAA,EAAM,OAAO,WAAA,KAAgB,QAAA,GAAW,cAAc,WAAA,CAAY,IAAA;AAAA,IAClE,MAAA,EAAQ,QAAA,IAAY,IAAA,GAAO,IAAA,CAAK,MAAA,GAAS;AAAA,GAC3C;AACF","file":"chunk-LI7AQ5NQ.js","sourcesContent":["import { badgeShows, badgeText } from '../../../shared/content/badge-text.js';\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport { Badge, type BadgeTone } from '../../feedback/badge/badge.js';\nimport { LoadingSpinner } from '../../feedback/loading-spinner/loading-spinner.js';\n\n/** The color family: `neutral` (default), `brand` for the main action, `success` for a positive one, `danger` for a destructive one. */\nexport type ButtonTone = 'neutral' | 'brand' | 'success' | 'danger';\n\n/**\n * How loudly it asks: `primary` (default) fills the button, `secondary`\n * outlines it, `plain` shows only its text until hovered, and `link` draws it\n * as an inline text link (the tone's link color, underlined, no box). Any\n * Button takes any emphasis, whether it renders a `<button>` or a link.\n */\nexport type ButtonEmphasis = 'primary' | 'secondary' | 'plain' | 'link';\n\n/** Where a link Button opens. */\nexport type ButtonLinkTarget = '_self' | '_blank' | '_parent' | '_top';\n\n/**\n * A link Button's destination: a URL (a `URL` or a string), or a URL with\n * the `target` it opens in. A `URL` is written as its `.href`.\n */\nexport type ButtonLink =\n | URL\n | string\n | {\n readonly href: URL | string;\n readonly target?: ButtonLinkTarget;\n };\n\n/** `default` is the 44px control height; `compact` is 33px with smaller text. */\nexport type ButtonSize = 'default' | 'compact';\n\n/** Corner shape: the shared `rounded` control radius (default) or a full `pill`. */\nexport type ButtonShape = 'rounded' | 'pill';\n/** What a form button does: `button` (default), `submit`, or `reset`. */\nexport type ButtonType = 'button' | 'submit' | 'reset';\n\nconst BUTTON_PROTECTED = new Set([\n 'data-component',\n 'data-action',\n 'data-tone',\n 'data-emphasis',\n 'data-size',\n 'data-loading',\n 'data-icon-only',\n 'data-shape',\n 'data-fill',\n 'data-focus-ring-inset',\n]);\n\n/** Application `data-*` metadata; the Button's own markers stay protected. */\nexport type ButtonRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined>\n>;\n\n/** A Button's visible label: text or rendered content, never empty. */\nexport type ButtonLabel =\n string | Exclude<KerfUiContent, null | undefined | boolean>;\n\n/**\n * A labeled button (its label names it; `ariaLabel` only when the label is\n * not enough), or an icon-only square named by `ariaLabel`.\n */\nexport type ButtonContent =\n | {\n /** The label. */\n children: ButtonLabel;\n /** A leading icon, such as a `LucideIcon`; it is decorative. */\n icon?: KerfUiContent;\n ariaLabel?: string;\n }\n | {\n children?: undefined;\n /** The icon of an icon-only square button. */\n icon: KerfUiContent;\n /** The accessible name an icon-only button needs. */\n ariaLabel: string;\n };\n\nexport type ButtonProps = ButtonContent & ButtonOptions;\n\nexport interface ButtonOptions {\n tone?: ButtonTone;\n emphasis?: ButtonEmphasis;\n size?: ButtonSize;\n /** Corner shape (default `rounded`). */\n shape?: ButtonShape;\n /**\n * Span the full width of the parent instead of sizing to the label, as on\n * `SplitButton`. The label stays centered and ellipsizes when it no longer\n * fits.\n */\n fill?: boolean;\n /**\n * Make it a toggle: `aria-pressed` reports the state, and a pressed look is\n * drawn on top of the tone and emphasis. The application owns the state and\n * flips it in its `action` handler. A link (`link` or `href`) cannot be a\n * toggle, and neither can a Button with the `link` emphasis.\n */\n pressed?: boolean;\n /**\n * Make it a disclosure control: `aria-expanded` reports whether the\n * content it shows or hides is open (KF-DE348P). The application owns the\n * state and flips it in its `action` handler; pair it with a\n * `DisclosureArrow` icon. A link (`link` or `href`) cannot take it.\n */\n expanded?: boolean;\n /** Mark the current step in a sequence with `aria-current=\"step\"`. */\n currentStep?: boolean;\n /**\n * Busy: a spinner replaces the label (which still names it) and the button\n * reports `aria-busy`. Presses still reach it; the application decides\n * what a press does while it is busy.\n */\n loading?: boolean;\n disabled?: boolean;\n /** A form button's behavior (default `button`, which never submits). */\n type?: ButtonType;\n name?: string;\n value?: string;\n /** The id of the form it belongs to, when it sits outside that form. */\n form?: string;\n /**\n * Render a link instead of a `<button>`: a URL, or `{ href, target }`. The\n * Button keeps its emphasis (set `emphasis=\"link\"` for a text link). The\n * preferred spelling of `href` + `target`; give one or the other, not both.\n */\n link?: ButtonLink;\n /** Render a link instead of a `<button>`; `link` is the preferred form. */\n href?: string;\n /** Where an `href` link opens; with `link`, pass `{ href, target }`. */\n target?: ButtonLinkTarget;\n /** Delegated `data-action` the application handles. */\n action?: string;\n /**\n * The id of a native `popover` element this button opens or closes (the\n * Popover API's invoker; KF-PAMQNM). A link Button cannot take it.\n */\n popoverTarget?: string;\n /** What the button does to its `popoverTarget`; the browser default is `toggle`. */\n popoverTargetAction?: 'toggle' | 'show' | 'hide';\n /** The kind of popup the button opens, reported as `aria-haspopup`. */\n ariaHasPopup?: 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n /**\n * Keep the button's focus ring inside its box when an ancestor clips\n * overflow. The inset ring is two-tone, a surface-colored line inside the\n * ring color, so it stays visible on a loud fill of the ring's own hue.\n */\n focusRingInset?: boolean;\n /**\n * A count, short text, or `true` for a text-free dot over the button's\n * top-trailing corner, such as how many items a filter hides. A count of 0\n * or less, or empty text, shows no badge; a count past `badgeMax` shows\n * `99+`. It stays out of the accessible name unless `badgeLabel` names it.\n */\n badge?: number | string | true;\n /** The largest count shown before `badgeMax+` (default 99). */\n badgeMax?: number;\n /**\n * Words for the badge (\"3 hidden\"), added to the button's name while the\n * badge shows.\n */\n badgeLabel?: string;\n /** The badge's tone (default `danger`). */\n badgeTone?: BadgeTone;\n /**\n * Native hover text that says more than the name, such as \"More Actions\n * for report.pdf\". An icon-only Button already gets a help tag with its\n * `ariaLabel` (with `@kerfjs/ui/help-tags-register`); a `title` replaces\n * that tag.\n */\n title?: string;\n id?: string;\n className?: string;\n /** Safe `data-*` metadata (a `data-key`, `data-dialog-close`). */\n rootAttributes?: ButtonRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A standalone action button: a native `<button>` (or a link with `link`)\n * in one of four tones and four emphases, including an inline text link, at the 44px control height or\n * compact, with a label or as an icon-only square, rounded or pill-shaped,\n * sized to its label or filling its parent's width, and optionally a\n * `pressed` toggle or `currentStep` marker. Inside a\n * `ToolbarControlGroup`, use a plain `<button>`, which the group styles; use\n * Button for a dialog footer, a form, or a standalone action beside other\n * content.\n */\nexport function Button({\n children,\n tone = 'neutral',\n emphasis = 'primary',\n size = 'default',\n shape = 'rounded',\n fill = false,\n pressed,\n expanded,\n currentStep = false,\n icon,\n loading = false,\n disabled = false,\n type = 'button',\n name,\n value,\n form,\n link,\n href: hrefProp,\n target: targetProp,\n action,\n popoverTarget,\n popoverTargetAction,\n ariaHasPopup,\n focusRingInset = false,\n badge,\n badgeMax = 99,\n badgeLabel,\n badgeTone = 'danger',\n ariaLabel,\n title,\n id,\n className = '',\n rootAttributes = {},\n slot,\n}: ButtonProps) {\n const { href, target } = resolveLink(link, hrefProp, targetProp);\n // KF-RESJ2S: the link look marks no toggle state.\n if (emphasis === 'link' && pressed !== undefined)\n throw new TypeError(\n 'A Button with the link emphasis cannot be a toggle (pressed).',\n );\n // KF-78EZ8Q: the same count rules as ToolbarButton.\n const shownBadge = badgeText(badge, badgeMax);\n const badgeVisible = badgeShows(badge, badgeMax);\n const shared = {\n ...filterDataAttributes(rootAttributes, BUTTON_PROTECTED),\n id,\n class: `kui-button ${className}`.trim(),\n 'data-component': 'button',\n 'data-tone': tone,\n 'data-emphasis': emphasis,\n 'data-size': size,\n 'data-loading': loading ? '' : undefined,\n 'data-icon-only': children === undefined ? '' : undefined,\n 'data-shape': shape === 'pill' ? 'pill' : undefined,\n 'data-fill': fill ? 'true' : undefined,\n 'data-focus-ring-inset': focusRingInset ? 'true' : undefined,\n 'data-action': action,\n 'aria-label':\n ariaLabel && badgeVisible && badgeLabel\n ? `${ariaLabel}, ${badgeLabel}`\n : ariaLabel,\n title,\n 'aria-haspopup': ariaHasPopup,\n 'aria-busy': loading ? 'true' : undefined,\n 'aria-current': currentStep ? 'step' : undefined,\n slot,\n };\n const content = (\n <>\n {icon === undefined ? null : (\n <span class=\"kui-button__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {children === undefined ? null : (\n <span class=\"kui-button__label\">{children}</span>\n )}\n {badge === true ? (\n <Badge\n tone={badgeTone}\n size=\"dot\"\n placement=\"corner\"\n {...(ariaLabel || !badgeLabel\n ? { ariaHidden: true as const }\n : { label: badgeLabel })}\n />\n ) : shownBadge === undefined ? null : (\n <Badge\n tone={badgeTone}\n appearance=\"solid\"\n size=\"compact\"\n placement=\"corner\"\n {...(ariaLabel || !badgeLabel\n ? { ariaHidden: true as const }\n : { label: badgeLabel })}\n >\n {shownBadge}\n </Badge>\n )}\n {loading ? (\n <span class=\"kui-button__spinner\" aria-hidden=\"true\">\n <LoadingSpinner />\n </span>\n ) : null}\n </>\n );\n // A disabled link has no destination and is announced as disabled.\n if (href !== undefined) {\n if (pressed !== undefined)\n throw new TypeError('A link Button cannot be a toggle (pressed).');\n if (expanded !== undefined)\n throw new TypeError(\n 'A link Button cannot be a disclosure control (expanded).',\n );\n if (popoverTarget !== undefined)\n throw new TypeError(\n 'A link Button cannot open a popover (popoverTarget).',\n );\n return (\n <a\n {...shared}\n href={disabled ? undefined : href}\n target={disabled ? undefined : target}\n // KF-6GBJBP: a new-tab link gets Chip `external`'s rel, so the opened\n // page can't reach window.opener or see this page as its referrer.\n rel={\n disabled || target !== '_blank' ? undefined : 'noopener noreferrer'\n }\n role={disabled ? 'link' : undefined}\n aria-disabled={disabled ? 'true' : undefined}\n >\n {content}\n </a>\n );\n }\n return (\n <button\n {...shared}\n type={type}\n name={name}\n value={value}\n form={form}\n disabled={disabled}\n aria-pressed={pressed === undefined ? undefined : String(pressed)}\n aria-expanded={expanded === undefined ? undefined : String(expanded)}\n popoverTarget={popoverTarget}\n popoverTargetAction={popoverTargetAction}\n >\n {content}\n </button>\n );\n}\n\n/**\n * KF-RESJ2S: `link` is sugar over `href` + `target`. A string or `URL` is the\n * destination; an object adds where it opens. Both forms at once throw rather\n * than silently preferring one.\n */\nfunction resolveLink(\n link: ButtonLink | undefined,\n href: string | undefined,\n target: ButtonLinkTarget | undefined,\n): { href: string | undefined; target: ButtonLinkTarget | undefined } {\n if (link === undefined) return { href, target };\n if (href !== undefined || target !== undefined)\n throw new TypeError(\n 'Give a Button either link or href and target, not both.',\n );\n if (typeof link === 'string') return { href: link, target: undefined };\n // A URL and the object form both carry `href`; only the object a target.\n const destination = link.href;\n return {\n href: typeof destination === 'string' ? destination : destination.href,\n target: 'target' in link ? link.target : undefined,\n };\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Toolbar } from './chunk-
|
|
2
|
-
import { Text } from './chunk-
|
|
3
|
-
import { filterDataAttributes } from './chunk-
|
|
1
|
+
import { Toolbar } from './chunk-XXKRHKFH.js';
|
|
2
|
+
import { Text } from './chunk-OW2ODKHN.js';
|
|
3
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'kerfjs/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
var COMPOSER_PROTECTED = /* @__PURE__ */ new Set([
|
|
@@ -90,4 +90,4 @@ function MessageComposer({
|
|
|
90
90
|
|
|
91
91
|
export { MessageComposer };
|
|
92
92
|
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-LSFPZR52.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/forms/message-composer/message-composer.tsx"],"names":[],"mappings":";;;;;AAkEA,IAAM,kBAAA,uBAAyB,GAAA,CAAI;AAAA,EACjC,gBAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,CAAC,CAAA;AAED,SAAS,QAAA,CAAS,OAAe,IAAA,EAAsB;AACrD,EAAA,IAAI,CAAC,MAAA,CAAO,SAAA,CAAU,KAAK,K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BAAgB,MAAA,GAAS,MAAA;AAAA,MAC/C,KAAA,EAAO,CAAA,iCAAA,EAAoC,GAAG,CAAA,kCAAA,EAAqC,GAAG,CAAA,CAAA;AAAA,MACtF,IAAA;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,KAAA,EAAM,6BAAA;AAAA,YACN,EAAA;AAAA,YACA,IAAA;AAAA,YACA,IAAA,EAAM,GAAA;AAAA,YACN,YAAA,EAAY,KAAA;AAAA,YACZ,oBAAkB,MAAA,IAAU,MAAA;AAAA,YAC5B,mBAAA,EAAmB,gBAAgB,OAAA,GAAU,MAAA;AAAA,YAC7C,WAAA;AAAA,YACA,QAAA;AAAA,YAEC,QAAA,EAAA;AAAA;AAAA,SACH;AAAA,wBACA,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,QAAA,EAAS,QAAA;AAAA,YACT,OAAA,EAAQ,SAAA;AAAA,YACR,KAAA,EAAO,GAAG,KAAK,CAAA,QAAA,CAAA;AAAA,YACf,SACE,OAAA,KAAY,MAAA,IAAa,IAAA,KAAS,MAAA,GAAY,yBAC5C,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,cAAA,OAAA;AAAA,cACA,IAAA,KAAS,SAAY,IAAA,mBACpB,GAAA;AAAA,gBAAC,IAAA;AAAA,gBAAA;AAAA,kBACC,OAAA,EAAQ,MAAA;AAAA,kBACR,IAAA,EAAK,OAAA;AAAA,kBACL,IAAA,EAAK,SAAA;AAAA,kBACL,IAAI,MAAA,IAAU,MAAA;AAAA,kBAEb,QAAA,EAAA;AAAA;AAAA;AACH,aAAA,EAEJ,CAAA;AAAA,YAGJ;AAAA;AAAA;AACF;AAAA;AAAA,GACF;AAEJ","file":"chunk-LSFPZR52.js","sourcesContent":["import type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport { Toolbar } from '../../actions/toolbar/toolbar.js';\nimport { Text } from '../../typography/text/text.js';\n\n/**\n * Application `data-*` identity on the MessageComposer root, such as `data-key`;\n * the composer's own configuration attributes stay protected.\n */\nexport type MessageComposerRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined>\n>;\n\nexport interface MessageComposerProps {\n /** The message field's accessible name, in title style (\"Message\"). */\n label: string;\n /** Native textarea `name`: the form field the message submits under. */\n name: string;\n /**\n * The textarea id. With a `hint`, the hint takes `<id>-hint` and becomes\n * the field's accessible description.\n */\n id?: string;\n /** The field's text: a draft to restore, or `''` after sending. */\n value?: string;\n /** Sentence-style example of what to write (\"Ask about this build\"). */\n placeholder?: string;\n /**\n * Visible lines while the field is empty or short (default 1). The field\n * grows with its content from here.\n */\n minRows?: number;\n /**\n * Lines the field grows to before it scrolls (default 8). At least\n * `minRows`.\n */\n maxRows?: number;\n /**\n * Quiet, sentence-style supporting copy in the action row's leading zone,\n * after any `leading` controls.\n */\n hint?: string;\n /**\n * Controls at the start of the action row, such as an attach button or a\n * model `Select`, normally in a `ToolbarControlGroup`.\n */\n leading?: KerfUiContent;\n /** Trailing controls in the action row, normally one brand Send button. */\n trailing: KerfUiContent;\n /** Disable the field; the app disables its own actions. */\n disabled?: boolean;\n /**\n * Opt in to Enter-to-send: with `wireMessageComposers` running over an ancestor,\n * Enter (or Cmd/Ctrl+Enter) in the field activates the first trailing\n * action, Shift+Enter inserts a newline, and an Enter that commits an IME\n * composition or meets an empty message does not send. The field announces\n * the shortcut with `aria-keyshortcuts`.\n */\n submitOnEnter?: boolean;\n /** Safe `data-*` identity on the root. */\n rootAttributes?: MessageComposerRootAttributes;\n className?: string;\n /** Native named-slot assignment, such as a `wa-dialog`'s `footer`. */\n slot?: string;\n}\n\nconst COMPOSER_PROTECTED = new Set([\n 'data-component',\n 'data-disabled',\n 'data-submit-on-enter',\n]);\n\nfunction rowCount(value: number, name: string): number {\n if (!Number.isInteger(value) || value < 1)\n throw new RangeError(`MessageComposer ${name} must be a positive integer.`);\n return value;\n}\n\n/**\n * A chat or prompt composer: a raised frame whose border turns brand while\n * focus is within, holding a borderless message field that grows with its\n * content between `minRows` and `maxRows` lines, above a compact `Toolbar`\n * action row: optional `leading` controls and `hint`, then `trailing` actions. The app owns the value and sending;\n * `submitOnEnter` with `wireMessageComposers` adds Enter-to-send.\n */\nexport function MessageComposer({\n label,\n name,\n id,\n value = '',\n placeholder,\n minRows = 1,\n maxRows = 8,\n hint,\n leading,\n trailing,\n disabled = false,\n submitOnEnter = false,\n rootAttributes = {},\n className = '',\n slot,\n}: MessageComposerProps) {\n const min = rowCount(minRows, 'minRows');\n const max = rowCount(maxRows, 'maxRows');\n if (max < min)\n throw new RangeError('MessageComposer maxRows must be at least minRows.');\n const hintId = hint !== undefined && id !== undefined ? `${id}-hint` : '';\n return (\n <div\n {...filterDataAttributes(rootAttributes, COMPOSER_PROTECTED)}\n class={`kui-message-composer ${className}`.trim()}\n data-component=\"message-composer\"\n data-disabled={disabled ? 'true' : undefined}\n data-submit-on-enter={submitOnEnter ? 'true' : undefined}\n style={`--_kui-message-composer-min-rows:${min};--_kui-message-composer-max-rows:${max}`}\n slot={slot}\n >\n <textarea\n class=\"kui-message-composer__field\"\n id={id}\n name={name}\n rows={min}\n aria-label={label}\n aria-describedby={hintId || undefined}\n aria-keyshortcuts={submitOnEnter ? 'Enter' : undefined}\n placeholder={placeholder}\n disabled={disabled}\n >\n {value}\n </textarea>\n <Toolbar\n position=\"footer\"\n density=\"compact\"\n label={`${label} Actions`}\n leading={\n leading === undefined && hint === undefined ? undefined : (\n <>\n {leading}\n {hint === undefined ? null : (\n <Text\n variant=\"span\"\n tone=\"quiet\"\n size=\"compact\"\n id={hintId || undefined}\n >\n {hint}\n </Text>\n )}\n </>\n )\n }\n trailing={trailing}\n />\n </div>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LoadingSpinner } from './chunk-
|
|
2
|
-
import { LucideIcon } from './chunk-
|
|
3
|
-
import { filterDataAttributes } from './chunk-
|
|
1
|
+
import { LoadingSpinner } from './chunk-DNNHT7RB.js';
|
|
2
|
+
import { LucideIcon } from './chunk-LWWIBUDK.js';
|
|
3
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
4
4
|
import { ChevronDown } from 'lucide';
|
|
5
5
|
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
6
6
|
|
|
@@ -87,4 +87,4 @@ function SplitButton({
|
|
|
87
87
|
|
|
88
88
|
export { SplitButton };
|
|
89
89
|
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-LUWZ7UZQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/actions/split-button/split-button.tsx"],"names":[],"mappings":";;;;;;AAcA,IAAM,oBAAA,uBAA2B,GAAA,CAAI;AAAA,EACnC,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAAC,CAAA;AAkEM,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA,GAAkB,KAAA;AAAA,EAClB,YAAA,GAAe,MAAA;AAAA,EACf,eAAA;AAAA,EACA,IAAA,GAAO,OAAA;AAAA,EACP,IAAA,GAAO,KAAA;AAAA,EACP,KAAA,GAAQ,SAAA;AAAA,EACR,cAAA,GAAiB,KAAA;AAAA,EACjB,IAAA,GAAO,KAAA;AAAA,EACP,QAAA,GAAW,KAAA;AAAA,EACX,eAAA,GAAkB,KAAA;AAAA,EAClB,KAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,iBAAiB,EAAC;AAAA,EAClB;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,OAAA,GAAU,IAAA,mBAAO,GAAA,CAAC,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,YACb,YAAA,EAAY,YAAA;AAAA,YACZ,eAAA,EAAe,YAAA;AAAA,YACf,eAAA,EAAe,kBAAkB,MAAA,GAAS,OAAA;AAAA,YAC1C,eAAA,EAAe,eAAA;AAAA,YACf,KAAA,EAAO,YAAA;AAAA,YACP,QAAA,EAAU,eAAA;AAAA,YAEV,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,WAAA,EAAa,MAAK,cAAA,EAAe;AAAA;AAAA;AACrD;AAAA;AAAA,GACF;AAEJ","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../src/components/actions/split-button/split-button.tsx"],"names":[],"mappings":";;;;;;AAcA,IAAM,oBAAA,uBAA2B,GAAA,CAAI;AAAA,EACnC,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAAC,CAAA;AAkEM,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA;AAAA,EACA,eAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,eAAA,GAAkB,KAAA;AAAA,EAClB,YAAA,GAAe,MAAA;AAAA,EACf,eAAA;AAAA,EACA,IAAA,GAAO,OAAA;AAAA,EACP,IAAA,GAAO,KAAA;AAAA,EACP,KAAA,GAAQ,SAAA;AAAA,EACR,cAAA,GAAiB,KAAA;AAAA,EACjB,IAAA,GAAO,KAAA;AAAA,EACP,QAAA,GAAW,KAAA;AAAA,EACX,eAAA,GAAkB,KAAA;AAAA,EAClB,KAAA;AAAA,EACA,SAAA,GAAY,EAAA;AAAA,EACZ,iBAAiB,EAAC;AAAA,EAClB;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,OAAA,GAAU,IAAA,mBAAO,GAAA,CAAC,cAAA,EAAA,EAAe,CAAA,GAAK,IAAA;AAC5C,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAA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S,OAAA;AAAA,YAC1C,eAAA,EAAe,eAAA;AAAA,YACf,KAAA,EAAO,YAAA;AAAA,YACP,QAAA,EAAU,eAAA;AAAA,YAEV,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,IAAA,EAAM,WAAA,EAAa,MAAK,cAAA,EAAe;AAAA;AAAA;AACrD;AAAA;AAAA,GACF;AAEJ","file":"chunk-LUWZ7UZQ.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport { ChevronDown } from 'lucide';\n\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport { LoadingSpinner } from '../../feedback/loading-spinner/loading-spinner.js';\nimport { LucideIcon } from '../../media/lucide-icon/lucide-icon.js';\n\n/** The loud fill the whole split button paints. */\nexport type SplitButtonTone =\n 'brand' | 'neutral' | 'success' | 'warning' | 'danger';\n\n/** Corner shape: the shared `rounded` control radius (default) or a full `pill`, as on `Button`. */\nexport type SplitButtonShape = 'rounded' | 'pill';\n\nconst splitButtonProtected = new Set([\n 'data-component',\n 'data-tone',\n 'data-fill',\n 'data-busy',\n 'data-shape',\n 'data-focus-ring-inset',\n]);\n\ntype SplitButtonRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-tone'?: never;\n 'data-fill'?: never;\n 'data-busy'?: never;\n 'data-shape'?: never;\n 'data-focus-ring-inset'?: never;\n }\n>;\n\nexport interface SplitButtonProps {\n /** Visible primary label. */\n label: string;\n /** Delegated `data-action` of the primary half. */\n action: string;\n /** Optional decorative leading icon of the primary half. */\n icon?: SafeHtml;\n /** Primary accessible name when it should say more than `label`. */\n accessibleLabel?: string;\n /** Accessible name (and tooltip) of the options trigger. */\n optionsLabel: string;\n /** Delegated `data-action` of the options trigger, which opens the app's menu. */\n optionsAction: string;\n /** Whether the options menu is open, exposed as `aria-expanded`. */\n optionsExpanded?: boolean;\n /** What the options trigger opens, exposed as `aria-haspopup`; defaults to `menu`. */\n optionsPopup?: 'menu' | 'dialog' | 'listbox';\n /** Element id the options trigger controls, exposed as `aria-controls`. */\n optionsControls?: string;\n /** The loud fill; defaults to `brand`. Switch it (for example to `neutral`) while running. */\n tone?: SplitButtonTone;\n /** Span the full width of the parent instead of sizing to the label. */\n fill?: boolean;\n /** Corner shape (default `rounded`); `pill` fully rounds both outer ends. */\n shape?: SplitButtonShape;\n /**\n * Keep each half's focus ring inside its box when an ancestor clips\n * overflow. The inset ring is two-tone, a surface-colored line inside the\n * ring color, so it stays visible on every loud fill.\n */\n focusRingInset?: boolean;\n /** Show work in progress: a spinner replaces the icon and the primary is `aria-busy`. */\n busy?: boolean;\n /** Disable the primary half. */\n disabled?: boolean;\n /** Disable the options trigger. */\n optionsDisabled?: boolean;\n /** Native tooltip of the primary half, for example why it is disabled. */\n title?: string;\n className?: string;\n /** Safe `data-*` metadata; SplitButton-owned markers stay protected. */\n rootAttributes?: SplitButtonRootAttributes;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\n/**\n * A primary action with an attached options trigger on one loud, semantic\n * fill (a \"Drive\" button with a provider menu). Both halves are native\n * buttons, so `aria-expanded` and the accessible names reach assistive\n * technology directly; the application opens its own menu from the options\n * action and owns the running state.\n */\nexport function SplitButton({\n label,\n action,\n icon,\n accessibleLabel,\n optionsLabel,\n optionsAction,\n optionsExpanded = false,\n optionsPopup = 'menu',\n optionsControls,\n tone = 'brand',\n fill = false,\n shape = 'rounded',\n focusRingInset = false,\n busy = false,\n disabled = false,\n optionsDisabled = false,\n title,\n className = '',\n rootAttributes = {},\n slot,\n}: SplitButtonProps) {\n const leading = busy ? <LoadingSpinner /> : icon;\n return (\n <div\n {...filterDataAttributes(rootAttributes, splitButtonProtected)}\n class={`kui-split-button ${className}`.trim()}\n data-component=\"split-button\"\n data-tone={tone}\n data-fill={fill ? 'true' : undefined}\n data-shape={shape === 'pill' ? 'pill' : undefined}\n data-busy={busy ? 'true' : undefined}\n data-focus-ring-inset={focusRingInset ? 'true' : undefined}\n role=\"group\"\n slot={slot}\n >\n <button\n type=\"button\"\n class=\"kui-split-button__primary\"\n data-action={action}\n aria-label={accessibleLabel}\n aria-busy={busy ? 'true' : undefined}\n title={title}\n disabled={disabled}\n >\n {leading && (\n <span class=\"kui-split-button__icon\" aria-hidden=\"true\">\n {leading}\n </span>\n )}\n <span class=\"kui-split-button__label\">{label}</span>\n </button>\n <button\n type=\"button\"\n class=\"kui-split-button__options\"\n data-action={optionsAction}\n aria-label={optionsLabel}\n aria-haspopup={optionsPopup}\n aria-expanded={optionsExpanded ? 'true' : 'false'}\n aria-controls={optionsControls}\n title={optionsLabel}\n disabled={optionsDisabled}\n >\n <LucideIcon icon={ChevronDown} name=\"chevron-down\" />\n </button>\n </div>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { remify } from './chunk-IQSRHXZR.js';
|
|
2
|
-
import { filterDataAttributes } from './chunk-
|
|
2
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
3
3
|
import { jsxs, Fragment, jsx } from 'kerfjs/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var lucideIconSizePixels = {
|
|
@@ -116,4 +116,4 @@ function LucideIcon({
|
|
|
116
116
|
|
|
117
117
|
export { LucideIcon };
|
|
118
118
|
|
|
119
|
-
//# sourceMappingURL=chunk-
|
|
119
|
+
//# sourceMappingURL=chunk-LWWIBUDK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/media/lucide-icon/lucide-icon.tsx"],"names":["Fragment","jsx"],"mappings":";;;;AAcA,IAAM,oBAAA,GAAuB;AAAA,EAC3B,EAAA,EAAI,EAAA;AAAA,EACJ,CAAA,EAAG,EAAA;AAAA,EACH,CAAA,EAAG,EAAA;AAAA,EACH,CAAA,EAAG,EAAA;AAAA,EACH,EAAA,EAAI;AACN,CAAA;AAuCA,IAAM,WAAA,uBAAkB,OAAA,EAA8B;AAEtD,SAAS,eAAe,IAAA,EAA4B;AAClD,EAA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ACpD,IAAA,IAAI,CAAC,QAAA,EAAU,UAAA,CAAW,GAAA,CAAI,MAAM,KAAK,CAAA;AACzC,IAAA,IAAI,MAAM,IAAA,IAAQ,yBAAA;AAChB,MAAA,KAAA,CAAM,OAAO,KAAA,CAAM,IAAA,EAAK,CAAE,IAAA,GAAO,KAAM,CAAA;AACzC,IAAA,KAAA,CAAM,GAAA,CAAI,KAAK,MAAM,CAAA;AAAA,EACvB;AACA,EAAA,OAAO,MAAA;AACT","file":"chunk-CMG4OZPV.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport { Fragment, jsx } from 'kerfjs/jsx-runtime';\nimport type { IconNode } from 'lucide';\n\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport type { CssForegroundColor } from '../../../shared/styles/css-values.js';\nimport { remify } from '../../../shared/styles/css-values.js';\n\nexport type LucideNode = IconNode;\nexport type LucideIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | number;\n\nconst lucideIconSizePixels = {\n xs: 12,\n s: 16,\n m: 20,\n l: 24,\n xl: 32,\n} as const satisfies Record<Exclude<LucideIconSize, number>, number>;\n\nexport interface LucideIconProps {\n icon: LucideNode;\n name: string;\n /** Outline by default; solid fills compatible glyphs with the current text color. */\n appearance?: 'outline' | 'solid';\n className?: string;\n /** Foreground color; omit to inherit the surrounding text color. */\n color?: CssForegroundColor;\n /** Flow with surrounding text instead of occupying a block. */\n inline?: boolean;\n /** The icon's accessible name; without it the icon is decorative. */\n label?: string;\n /**\n * Hover text, as an SVG `<title>`: a status icon's explanation (\"Session\n * halted\"). With `label`, the label stays the accessible name; alone, the\n * title also names the icon. The whole icon box shows it, not just its\n * strokes.\n */\n title?: string;\n /** Named icon scale or positive pixel size, converted to rem. Omit for 1em. */\n size?: LucideIconSize;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or an\n * editor node marker; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\n/**\n * Each icon node's rendered child markup. Lucide icon nodes are module-level\n * constants, so a list that re-renders the same glyph in every row serializes\n * (validates, screens, and escapes) its path data once instead of per render.\n * Keyed by node identity and held weakly, so an app-built node is collected\n * with it; treat a node as immutable once rendered. A node carrying anything\n * but string or number attribute values (outside the `IconNode` type) is\n * rendered fresh every time.\n */\nconst childMarkup = new WeakMap<LucideNode, SafeHtml>();\n\nfunction renderChildren(icon: LucideNode): SafeHtml {\n const cached = childMarkup.get(icon);\n if (cached) return cached;\n let cacheable = true;\n const markup = jsx(Fragment, {\n children: icon.map(([tag, attrs]) => {\n for (const value of Object.values(attrs))\n if (typeof value !== 'string' && typeof value !== 'number')\n cacheable = false;\n return jsx(tag, attrs);\n }),\n });\n if (cacheable) childMarkup.set(icon, markup);\n return markup;\n}\n\n/**\n * Each icon node's rendered icons, by their props. Rows that re-render the\n * same glyph with the same props get the identical `SafeHtml` back instead of\n * rebuilding the `<svg>` wrapper, and consumers that hash or compare icon\n * markup (PopupMenu's content key) see one string object. Bounded per node,\n * because a per-row `label` would otherwise grow it with the list; past the\n * bound the oldest variant is evicted. Only nodes whose child markup is\n * cacheable are cached.\n */\nconst iconMarkup = new WeakMap<LucideNode, Map<string, SafeHtml>>();\n\n/** Most rendered variants remembered per icon node. */\nconst LUCIDE_ICON_VARIANT_LIMIT = 64;\n\nfunction variantKey(parts: readonly (string | number | boolean | undefined)[]) {\n // U+0001 marks an omitted prop so it never equals an empty string.\n return parts\n .map((part) => (part === undefined ? '\\u0001' : String(part)))\n .join('\\u0000');\n}\n\nconst LUCIDE_ICON_PROTECTED = new Set([\n 'data-component',\n 'data-inline',\n 'data-lucide',\n 'data-size',\n]);\n\n/** Render a Lucide-compatible icon node without copying icon SVG strings. */\nexport function LucideIcon({\n icon,\n name,\n appearance = 'outline',\n className,\n color,\n inline = false,\n label,\n title,\n size,\n slot,\n rootAttributes,\n}: LucideIconProps) {\n if (typeof size === 'number' && (!Number.isFinite(size) || size <= 0))\n throw new RangeError(\n 'LucideIcon size must be a positive finite pixel value',\n );\n if (typeof size === 'string' && !Object.hasOwn(lucideIconSizePixels, size))\n throw new RangeError('LucideIcon size must use a named icon step');\n const rootData = rootAttributes\n ? filterDataAttributes(rootAttributes, LUCIDE_ICON_PROTECTED)\n : undefined;\n const key = variantKey([\n rootData ? JSON.stringify(rootData) : undefined,\n name,\n appearance,\n className,\n color,\n inline,\n label,\n title,\n size,\n slot,\n ]);\n const variants = iconMarkup.get(icon);\n const cached = variants?.get(key);\n if (cached) return cached;\n const pixels =\n typeof size === 'number' ? size : size && lucideIconSizePixels[size];\n const slotAttribute = { slot };\n const markup = (\n <svg\n {...rootData}\n {...slotAttribute}\n class={className}\n data-lucide={name}\n data-inline={inline ? 'true' : undefined}\n data-size={size === undefined ? undefined : String(size)}\n role={label || title ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label || title ? undefined : 'true'}\n viewBox=\"0 0 24 24\"\n fill={appearance === 'solid' ? 'currentColor' : 'none'}\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n style={\n [\n pixels === undefined\n ? undefined\n : `--_kui-lucide-size:${remify(pixels)}`,\n color === undefined ? undefined : `color:${color}`,\n ]\n .filter(Boolean)\n .join(';') || undefined\n }\n >\n {title ? (\n <>\n <title>{title}</title>\n {/* A transparent box, so hovering between strokes shows the title. */}\n <rect width=\"24\" height=\"24\" fill=\"transparent\" stroke=\"none\" />\n </>\n ) : null}\n {renderChildren(icon)}\n </svg>\n );\n if (childMarkup.has(icon)) {\n const known = variants ?? new Map<string, SafeHtml>();\n if (!variants) iconMarkup.set(icon, known);\n if (known.size >= LUCIDE_ICON_VARIANT_LIMIT)\n known.delete(known.keys().next().value!);\n known.set(key, markup);\n }\n return markup;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/media/lucide-icon/lucide-icon.tsx"],"names":["Fragment","jsx"],"mappings":";;;;AAcA,IAAM,oBAAA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,aAAA,EAAc,MAAA,EAAO,MAAA,EAAO;AAAA,SAAA,EAChE,CAAA,GACE,IAAA;AAAA,QACH,eAAe,IAAI;AAAA;AAAA;AAAA,GACtB;AAEF,EAAA,IAAI,WAAA,CAAY,GAAA,CAAI,IAAI,CAAA,EAAG;AACzB,IAAA,MAAM,KAAA,GAAQ,QAAA,oBAAY,IAAI,GAAA,EAAsB;AACpD,IAAA,IAAI,CAAC,QAAA,EAAU,UAAA,CAAW,GAAA,CAAI,MAAM,KAAK,CAAA;AACzC,IAAA,IAAI,MAAM,IAAA,IAAQ,yBAAA;AAChB,MAAA,KAAA,CAAM,OAAO,KAAA,CAAM,IAAA,EAAK,CAAE,IAAA,GAAO,KAAM,CAAA;AACzC,IAAA,KAAA,CAAM,GAAA,CAAI,KAAK,MAAM,CAAA;AAAA,EACvB;AACA,EAAA,OAAO,MAAA;AACT","file":"chunk-LWWIBUDK.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\nimport { Fragment, jsx } from 'kerfjs/jsx-runtime';\nimport type { IconNode } from 'lucide';\n\nimport {\n filterDataAttributes,\n type RootDataAttributes,\n} from '../../../shared/dom/extension-attributes.js';\nimport type { CssForegroundColor } from '../../../shared/styles/css-values.js';\nimport { remify } from '../../../shared/styles/css-values.js';\n\nexport type LucideNode = IconNode;\nexport type LucideIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | number;\n\nconst lucideIconSizePixels = {\n xs: 12,\n s: 16,\n m: 20,\n l: 24,\n xl: 32,\n} as const satisfies Record<Exclude<LucideIconSize, number>, number>;\n\nexport interface LucideIconProps {\n icon: LucideNode;\n name: string;\n /** Outline by default; solid fills compatible glyphs with the current text color. */\n appearance?: 'outline' | 'solid';\n className?: string;\n /** Foreground color; omit to inherit the surrounding text color. */\n color?: CssForegroundColor;\n /** Flow with surrounding text instead of occupying a block. */\n inline?: boolean;\n /** The icon's accessible name; without it the icon is decorative. */\n label?: string;\n /**\n * Hover text, as an SVG `<title>`: a status icon's explanation (\"Session\n * halted\"). With `label`, the label stays the accessible name; alone, the\n * title also names the icon. The whole icon box shows it, not just its\n * strokes.\n */\n title?: string;\n /** Named icon scale or positive pixel size, converted to rem. Omit for 1em. */\n size?: LucideIconSize;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n /** Application `data-*` metadata on the root, such as a row key or a\n * test hook; the component's own markers stay protected. */\n rootAttributes?: RootDataAttributes;\n}\n\n/**\n * Each icon node's rendered child markup. Lucide icon nodes are module-level\n * constants, so a list that re-renders the same glyph in every row serializes\n * (validates, screens, and escapes) its path data once instead of per render.\n * Keyed by node identity and held weakly, so an app-built node is collected\n * with it; treat a node as immutable once rendered. A node carrying anything\n * but string or number attribute values (outside the `IconNode` type) is\n * rendered fresh every time.\n */\nconst childMarkup = new WeakMap<LucideNode, SafeHtml>();\n\nfunction renderChildren(icon: LucideNode): SafeHtml {\n const cached = childMarkup.get(icon);\n if (cached) return cached;\n let cacheable = true;\n const markup = jsx(Fragment, {\n children: icon.map(([tag, attrs]) => {\n for (const value of Object.values(attrs))\n if (typeof value !== 'string' && typeof value !== 'number')\n cacheable = false;\n return jsx(tag, attrs);\n }),\n });\n if (cacheable) childMarkup.set(icon, markup);\n return markup;\n}\n\n/**\n * Each icon node's rendered icons, by their props. Rows that re-render the\n * same glyph with the same props get the identical `SafeHtml` back instead of\n * rebuilding the `<svg>` wrapper, and consumers that hash or compare icon\n * markup (PopupMenu's content key) see one string object. Bounded per node,\n * because a per-row `label` would otherwise grow it with the list; past the\n * bound the oldest variant is evicted. Only nodes whose child markup is\n * cacheable are cached.\n */\nconst iconMarkup = new WeakMap<LucideNode, Map<string, SafeHtml>>();\n\n/** Most rendered variants remembered per icon node. */\nconst LUCIDE_ICON_VARIANT_LIMIT = 64;\n\nfunction variantKey(parts: readonly (string | number | boolean | undefined)[]) {\n // U+0001 marks an omitted prop so it never equals an empty string.\n return parts\n .map((part) => (part === undefined ? '\\u0001' : String(part)))\n .join('\\u0000');\n}\n\nconst LUCIDE_ICON_PROTECTED = new Set([\n 'data-component',\n 'data-inline',\n 'data-lucide',\n 'data-size',\n]);\n\n/** Render a Lucide-compatible icon node without copying icon SVG strings. */\nexport function LucideIcon({\n icon,\n name,\n appearance = 'outline',\n className,\n color,\n inline = false,\n label,\n title,\n size,\n slot,\n rootAttributes,\n}: LucideIconProps) {\n if (typeof size === 'number' && (!Number.isFinite(size) || size <= 0))\n throw new RangeError(\n 'LucideIcon size must be a positive finite pixel value',\n );\n if (typeof size === 'string' && !Object.hasOwn(lucideIconSizePixels, size))\n throw new RangeError('LucideIcon size must use a named icon step');\n const rootData = rootAttributes\n ? filterDataAttributes(rootAttributes, LUCIDE_ICON_PROTECTED)\n : undefined;\n const key = variantKey([\n rootData ? JSON.stringify(rootData) : undefined,\n name,\n appearance,\n className,\n color,\n inline,\n label,\n title,\n size,\n slot,\n ]);\n const variants = iconMarkup.get(icon);\n const cached = variants?.get(key);\n if (cached) return cached;\n const pixels =\n typeof size === 'number' ? size : size && lucideIconSizePixels[size];\n const slotAttribute = { slot };\n const markup = (\n <svg\n {...rootData}\n {...slotAttribute}\n class={className}\n data-lucide={name}\n data-inline={inline ? 'true' : undefined}\n data-size={size === undefined ? undefined : String(size)}\n role={label || title ? 'img' : undefined}\n aria-label={label}\n aria-hidden={label || title ? undefined : 'true'}\n viewBox=\"0 0 24 24\"\n fill={appearance === 'solid' ? 'currentColor' : 'none'}\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n style={\n [\n pixels === undefined\n ? undefined\n : `--_kui-lucide-size:${remify(pixels)}`,\n color === undefined ? undefined : `color:${color}`,\n ]\n .filter(Boolean)\n .join(';') || undefined\n }\n >\n {title ? (\n <>\n <title>{title}</title>\n {/* A transparent box, so hovering between strokes shows the title. */}\n <rect width=\"24\" height=\"24\" fill=\"transparent\" stroke=\"none\" />\n </>\n ) : null}\n {renderChildren(icon)}\n </svg>\n );\n if (childMarkup.has(icon)) {\n const known = variants ?? new Map<string, SafeHtml>();\n if (!variants) iconMarkup.set(icon, known);\n if (known.size >= LUCIDE_ICON_VARIANT_LIMIT)\n known.delete(known.keys().next().value!);\n known.set(key, markup);\n }\n return markup;\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Skeleton } from './chunk-
|
|
2
|
-
import { Badge } from './chunk-
|
|
1
|
+
import { Skeleton } from './chunk-LH7YRRY7.js';
|
|
2
|
+
import { Badge } from './chunk-VHAYQGWR.js';
|
|
3
3
|
import { em } from './chunk-IQSRHXZR.js';
|
|
4
|
-
import { filterDataAttributes } from './chunk-
|
|
4
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
5
5
|
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var STATE_BANNER_PROTECTED = /* @__PURE__ */ new Set([
|
|
@@ -60,4 +60,4 @@ function StateBanner({
|
|
|
60
60
|
|
|
61
61
|
export { StateBanner };
|
|
62
62
|
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-MHF2NK7F.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/feedback/state-banner/state-banner.tsx"],"names":[],"mappings":";;;;;;AAkBA,IAAM,sBAAA,uBAA6B,GAAA,CAAI;AAAA,EACrC,gBAAA;AAAA,EACA,WAAA;AAAA,EACA,kBAAA;AAAA,EACA,uBAAA;AAAA,EACA,mBAAA;AAAA,EACA;AACF,CAAC,CAAA;AA6DM,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA;AAAA,EACA,MAAA;AAAA,EACA,KAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,IAAA,GAAO,MAAA;AAAA,EACP,OAAA,GAAU,QAAA;AAAA,EACV,UAAA,GAAa,QAAA;AAAA,EACb,eAAA,GAAkB,UAAA;AAAA,EAClB,YAAA,GAAe,MAAA;AAAA,EACf,YAAA,GAAe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A,WAAA,mBAAc,GAAA,CAAC,QAAA,EAAA,EAAS,OAAO,EAAA,CAAG,EAAE,CAAA,EAAG,CAAA,GAAK,QAAO,CAAA,EAC5D;AAAA,SAAA,EAEJ,CAAA;AAAA,QACC,MAAA,oBAAU,GAAA,CAAC,KAAA,EAAA,EAAI,KAAA,EAAM,4BAA4B,QAAA,EAAA,MAAA,EAAO;AAAA;AAAA;AAAA,GAC3D;AAEJ","file":"chunk-MHF2NK7F.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\nimport type { KerfUiContent } from '../../../shared/content/semantic-content.js';\nimport { filterDataAttributes } from '../../../shared/dom/extension-attributes.js';\nimport type { Sides } from '../../../shared/layout/sides.js';\nimport { em } from '../../../shared/styles/css-values.js';\nimport type { SemanticTone } from '../../../shared/styles/semantic-tone.js';\nimport { Badge } from '../badge/badge.js';\nimport { Skeleton } from '../skeleton/skeleton.js';\n\nexport type { SemanticTone } from '../../../shared/styles/semantic-tone.js';\n/** @deprecated Use SemanticTone. */\nexport type StateBannerTone = SemanticTone;\nexport type StateBannerUrgency = 'status' | 'alert';\nexport type StateBannerCopyLayout = 'inline' | 'stacked';\nexport type StateBannerActionPlacement = 'trailing' | 'below';\nexport type StateBannerPresentation = 'card' | 'strip';\n\nconst STATE_BANNER_PROTECTED = new Set([\n 'data-component',\n 'data-tone',\n 'data-copy-layout',\n 'data-action-placement',\n 'data-presentation',\n 'data-placeholder',\n]);\n\n/** Application `data-*` identity on the banner root; component markers stay protected. */\nexport type StateBannerRootAttributes = Readonly<\n Record<`data-${string}`, string | undefined> & {\n 'data-component'?: never;\n 'data-tone'?: never;\n 'data-copy-layout'?: never;\n 'data-action-placement'?: never;\n 'data-presentation'?: never;\n 'data-placeholder'?: never;\n }\n>;\n\nexport interface StateBannerProps {\n title: string;\n detail?: string;\n /** Optional compact status or count shown beside the title. */\n badge?: string;\n icon?: SafeHtml;\n /**\n * The banner's action: one or more controls, laid out as a wrapping,\n * end-aligned horizontal list. Use Kerf UI `Button`s (`size=\"compact\"`,\n * `shape=\"pill\"`); a neutral Button takes the banner's tone, while a brand,\n * success, or danger Button keeps its own. Other controls, such as a\n * `LoadingSpinner`, sit beside them.\n */\n action?: KerfUiContent;\n tone?: SemanticTone;\n urgency?: StateBannerUrgency;\n /** Keep the detail beside the title, or give it its own line. */\n copyLayout?: StateBannerCopyLayout;\n /**\n * `trailing` (the default) puts the action beside the copy while the copy\n * keeps its minimum readable width, and otherwise wraps it onto its own\n * end-aligned trailing row, at any viewport or container width. `below`\n * always gives the action that separate trailing row.\n */\n actionPlacement?: StateBannerActionPlacement;\n /**\n * `card` (the default) is an inset, rounded, fully bordered banner beside\n * the affected work. `strip` is a full-width band at a layout edge, such as\n * above a workspace: square corners, no inline margin, inline padding on the\n * shared content-text column, and only the tone-colored `dividerSides` edges.\n */\n presentation?: StateBannerPresentation;\n /**\n * Physical tone-colored divider edges of a `strip`, in canonical\n * top/right/bottom/left order. Defaults to the bottom edge; `''` draws none.\n * A `card` keeps its full border and ignores this.\n */\n dividerSides?: Sides;\n className?: string;\n /** Safe `data-*` identity, such as `data-key` for conditional siblings. */\n rootAttributes?: StateBannerRootAttributes;\n /** 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. */\n placeholder?: boolean;\n /** Native named-slot assignment when composed inside a web component. */\n slot?: string;\n}\n\nexport function StateBanner({\n title,\n detail,\n badge,\n icon,\n action,\n tone = 'info',\n urgency = 'status',\n copyLayout = 'inline',\n actionPlacement = 'trailing',\n presentation = 'card',\n dividerSides = 'b',\n className = '',\n rootAttributes = {},\n placeholder = false,\n slot,\n}: StateBannerProps) {\n return (\n <section\n {...filterDataAttributes(rootAttributes, STATE_BANNER_PROTECTED)}\n class={`kui-state-banner ${className}`.trim()}\n data-component=\"state-banner\"\n data-tone={tone}\n data-copy-layout={copyLayout}\n data-action-placement={actionPlacement}\n data-presentation={presentation}\n divider-sides={\n presentation === 'strip' ? dividerSides || undefined : undefined\n }\n data-placeholder={placeholder ? 'true' : undefined}\n role={urgency}\n aria-live={urgency === 'alert' ? 'assertive' : 'polite'}\n aria-busy={placeholder ? 'true' : undefined}\n slot={slot}\n >\n {icon && <span class=\"kui-state-banner__icon\">{icon}</span>}\n <div class=\"kui-state-banner__copy\">\n <strong>{placeholder ? <Skeleton width={em(10)} /> : title}</strong>\n {badge && (\n <Badge appearance=\"solid\" size=\"compact\" tone={tone}>\n {placeholder ? <Skeleton width={em(1.75)} /> : badge}\n </Badge>\n )}\n {detail && (\n <span class=\"kui-state-banner__detail\">\n <span>{placeholder ? <Skeleton width={em(16)} /> : detail}</span>\n </span>\n )}\n </div>\n {action && <div class=\"kui-state-banner__action\">{action}</div>}\n </section>\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nativeDraggable } from './chunk-OK7FUK7U.js';
|
|
2
|
-
import { filterDataAttributes } from './chunk-
|
|
2
|
+
import { filterDataAttributes } from './chunk-BRDTP3RT.js';
|
|
3
3
|
import { jsxs, jsx } from 'kerfjs/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var summaryRowProtected = /* @__PURE__ */ new Set([
|
|
@@ -71,4 +71,4 @@ function SummaryRow({
|
|
|
71
71
|
|
|
72
72
|
export { SummaryRow };
|
|
73
73
|
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
74
|
+
//# sourceMappingURL=chunk-MPM6YBOM.js.map
|