@kerfjs/ui 5.0.0-beta.104 → 5.0.0-beta.106
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 +155 -116
- package/ai/application-ui-profile.defaults.json +125 -4
- package/ai/compile-time-contracts-v1.json +11 -11
- package/ai/component-catalog.json +2606 -628
- package/ai/component-composition-rules.json +10 -10
- package/ai/component-composition.json +1688 -300
- package/ai/components/README.md +66 -48
- package/ai/components/application-tabs.md +4 -4
- package/ai/components/badge.md +1 -0
- package/ai/components/button.md +91 -0
- package/ai/components/checkbox.md +89 -0
- package/ai/components/choice-chips.md +9 -3
- package/ai/components/color-field.md +92 -0
- package/ai/components/color-picker.md +90 -0
- package/ai/components/color-swatches.md +82 -0
- package/ai/components/combobox.md +6 -4
- package/ai/components/content-item.md +5 -2
- package/ai/components/disclosure.md +83 -0
- package/ai/components/file-picker.md +1 -0
- package/ai/components/foundation.md +1 -1
- package/ai/components/list-action-row.md +3 -3
- package/ai/components/list-detail-dialog.md +90 -0
- package/ai/components/list.md +2 -0
- package/ai/components/lucide-icon.md +2 -0
- package/ai/components/{composer.md → message-composer.md} +17 -16
- package/ai/components/pane.md +3 -1
- package/ai/components/popup-menu.md +12 -9
- package/ai/components/progress-bar.md +82 -0
- package/ai/components/progress-ring.md +80 -0
- package/ai/components/radio-group.md +88 -0
- package/ai/components/recipe-list-detail-dialog.md +5 -5
- package/ai/components/{token-search-field.md → search-field.md} +23 -23
- package/ai/components/select.md +15 -13
- package/ai/components/slider.md +84 -0
- package/ai/components/surface-scaffold.md +16 -13
- package/ai/components/switch.md +81 -0
- package/ai/components/tab-bar.md +6 -6
- package/ai/components/tab-navigator.md +2 -2
- package/ai/components/tabs.md +7 -7
- package/ai/components/tag-field.md +86 -0
- package/ai/components/text-field.md +98 -0
- package/ai/components/text.md +1 -0
- package/ai/components/toast.md +85 -0
- package/ai/components/toolbar-control-group.md +3 -3
- package/ai/components/tooltip.md +81 -0
- package/ai/components/wa-accordion-item.md +11 -5
- package/ai/components/wa-accordion.md +11 -5
- package/ai/components/wa-animated-image.md +2 -1
- package/ai/components/wa-animation.md +1 -0
- package/ai/components/wa-avatar.md +1 -0
- package/ai/components/wa-badge.md +10 -3
- package/ai/components/wa-breadcrumb-item.md +1 -0
- package/ai/components/wa-breadcrumb.md +1 -0
- package/ai/components/wa-button-group.md +6 -4
- package/ai/components/wa-button.md +7 -5
- package/ai/components/wa-callout.md +7 -5
- package/ai/components/wa-card.md +12 -4
- package/ai/components/wa-carousel-item.md +1 -0
- package/ai/components/wa-carousel.md +1 -0
- package/ai/components/wa-checkbox-group.md +11 -4
- package/ai/components/wa-checkbox.md +10 -4
- package/ai/components/wa-color-picker.md +13 -5
- package/ai/components/wa-comparison.md +2 -1
- package/ai/components/wa-copy-button.md +1 -0
- package/ai/components/wa-details.md +11 -5
- package/ai/components/wa-dialog.md +10 -4
- package/ai/components/wa-divider.md +1 -0
- package/ai/components/wa-drawer.md +12 -5
- package/ai/components/wa-dropdown-item.md +8 -6
- package/ai/components/wa-dropdown.md +8 -6
- package/ai/components/wa-format-bytes.md +1 -0
- package/ai/components/wa-format-date.md +1 -0
- package/ai/components/wa-format-number.md +1 -0
- package/ai/components/wa-icon.md +2 -1
- package/ai/components/wa-include.md +6 -4
- package/ai/components/wa-input.md +9 -6
- package/ai/components/wa-intersection-observer.md +1 -0
- package/ai/components/wa-known-date.md +1 -0
- package/ai/components/wa-markdown.md +1 -0
- package/ai/components/wa-mutation-observer.md +1 -0
- package/ai/components/wa-number-input.md +1 -0
- package/ai/components/wa-option.md +7 -5
- package/ai/components/wa-otp-input.md +1 -0
- package/ai/components/wa-page.md +13 -4
- package/ai/components/wa-pagination.md +1 -0
- package/ai/components/wa-popover.md +11 -5
- package/ai/components/wa-popup.md +11 -4
- package/ai/components/wa-progress-bar.md +11 -4
- package/ai/components/wa-progress-ring.md +11 -4
- package/ai/components/wa-qr-code.md +1 -0
- package/ai/components/wa-radio-group.md +12 -4
- package/ai/components/wa-radio.md +10 -4
- package/ai/components/wa-random-content.md +1 -0
- package/ai/components/wa-rating.md +1 -0
- package/ai/components/wa-relative-time.md +1 -0
- package/ai/components/wa-resize-observer.md +1 -0
- package/ai/components/wa-scroller.md +12 -4
- package/ai/components/wa-select.md +7 -5
- package/ai/components/wa-skeleton.md +10 -3
- package/ai/components/wa-slider.md +11 -5
- package/ai/components/wa-spinner.md +7 -5
- package/ai/components/wa-split-panel.md +7 -5
- package/ai/components/wa-step.md +56 -0
- package/ai/components/wa-stepper.md +56 -0
- package/ai/components/wa-switch.md +10 -3
- package/ai/components/wa-tab-group.md +8 -6
- package/ai/components/wa-tab-panel.md +7 -5
- package/ai/components/wa-tab.md +8 -6
- package/ai/components/wa-tag-input.md +62 -0
- package/ai/components/wa-tag.md +9 -6
- package/ai/components/wa-textarea.md +10 -3
- package/ai/components/wa-time-input.md +1 -0
- package/ai/components/wa-toast-item.md +9 -7
- package/ai/components/wa-toast.md +9 -7
- package/ai/components/wa-tooltip.md +11 -5
- package/ai/components/wa-tree-item.md +2 -1
- package/ai/components/wa-tree.md +2 -1
- package/ai/components/wa-zoomable-frame.md +2 -1
- package/ai/components/workbench-dialog.md +90 -0
- package/ai/public-api-signatures-v1.md +1579 -247
- package/ai/skill.md +83 -50
- package/ai/webawesome-jsx-signatures-v1.md +4 -1
- package/dist/badge.d.ts +9 -1
- package/dist/badge.js +1 -1
- package/dist/browser/button.js +5 -0
- package/dist/browser/catalog.js +3 -2
- package/dist/browser/{icon-button.js → checkbox.js} +2 -2
- package/dist/browser/color-field.js +4 -0
- package/dist/browser/color-picker.js +5 -0
- package/dist/browser/color-swatches.js +3 -0
- package/dist/browser/disclosure.js +5 -0
- package/dist/browser/list-action-row.js +1 -0
- package/dist/browser/list-detail-dialog.js +14 -0
- package/dist/browser/message-composer.js +5 -0
- package/dist/browser/popup-menu.js +1 -0
- package/dist/browser/progress-bar.js +3 -0
- package/dist/browser/progress-ring.js +3 -0
- package/dist/browser/radio-group.js +3 -0
- package/dist/browser/search-field.js +4 -0
- package/dist/browser/slider.js +3 -0
- package/dist/browser/surface-scaffold.js +1 -0
- package/dist/browser/switch.js +3 -0
- package/dist/browser/tab-bar-item.js +4 -0
- package/dist/browser/tag-field.js +5 -0
- package/dist/browser/text-field.js +4 -0
- package/dist/browser/workbench-dialog.js +15 -0
- package/dist/button.d.ts +108 -0
- package/dist/button.js +7 -0
- package/dist/button.js.map +1 -0
- package/dist/catalog-resources.d.ts +1 -1
- package/dist/catalog.d.ts +3 -3
- package/dist/catalog.js +57 -27
- package/dist/catalog.js.map +1 -1
- package/dist/checkbox.d.ts +45 -0
- package/dist/checkbox.js +6 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/choice-chips.d.ts +49 -15
- package/dist/choice-chips.js +1 -1
- package/dist/chunk-23PPPNH6.js +93 -0
- package/dist/chunk-23PPPNH6.js.map +1 -0
- package/dist/{chunk-FNZQOUZ5.js → chunk-2FW7D4IG.js} +2 -2
- package/dist/{chunk-FNZQOUZ5.js.map → chunk-2FW7D4IG.js.map} +1 -1
- package/dist/{chunk-ZYU5WRC3.js → chunk-3GLYIIFR.js} +2 -2
- package/dist/{chunk-ZYU5WRC3.js.map → chunk-3GLYIIFR.js.map} +1 -1
- package/dist/{chunk-5NQF35VO.js → chunk-4RECPEHI.js} +2 -2
- package/dist/{chunk-5NQF35VO.js.map → chunk-4RECPEHI.js.map} +1 -1
- package/dist/{chunk-7IUEBNCO.js → chunk-5USKCWGL.js} +8 -3
- package/dist/chunk-5USKCWGL.js.map +1 -0
- package/dist/chunk-6VVIW7VB.js +69 -0
- package/dist/chunk-6VVIW7VB.js.map +1 -0
- package/dist/{chunk-LL45C7BB.js → chunk-7K6U6FCN.js} +1 -1
- package/dist/chunk-7K6U6FCN.js.map +1 -0
- package/dist/{chunk-HQZYKJ56.js → chunk-7W3GKMN4.js} +110 -74
- package/dist/chunk-7W3GKMN4.js.map +1 -0
- package/dist/chunk-ACUKTVS3.js +371 -0
- package/dist/chunk-ACUKTVS3.js.map +1 -0
- package/dist/{chunk-YQ2AC4E2.js → chunk-AMIHGFLP.js} +2 -2
- package/dist/{chunk-YQ2AC4E2.js.map → chunk-AMIHGFLP.js.map} +1 -1
- package/dist/chunk-ATGAJVZ6.js +268 -0
- package/dist/chunk-ATGAJVZ6.js.map +1 -0
- package/dist/chunk-AYPGXR2E.js +20 -0
- package/dist/chunk-AYPGXR2E.js.map +1 -0
- package/dist/{chunk-ETCWQLJV.js → chunk-BKUMG2KB.js} +38 -28
- package/dist/chunk-BKUMG2KB.js.map +1 -0
- package/dist/chunk-C26Q6P4Q.js +76 -0
- package/dist/chunk-C26Q6P4Q.js.map +1 -0
- package/dist/chunk-C3RLKKFQ.js +452 -0
- package/dist/chunk-C3RLKKFQ.js.map +1 -0
- package/dist/{chunk-T5BJBMW7.js → chunk-CIAUILRR.js} +5 -5
- package/dist/chunk-CIAUILRR.js.map +1 -0
- package/dist/chunk-CNM6ZWP2.js +38 -0
- package/dist/chunk-CNM6ZWP2.js.map +1 -0
- package/dist/{chunk-LPHU44S3.js → chunk-CTQUDCY5.js} +3 -1
- package/dist/chunk-CTQUDCY5.js.map +1 -0
- package/dist/{chunk-MXNIVEVL.js → chunk-D4MXSAMI.js} +5 -3
- package/dist/chunk-D4MXSAMI.js.map +1 -0
- package/dist/{chunk-YBWQR2OK.js → chunk-DDSCVEO5.js} +10 -9
- package/dist/chunk-DDSCVEO5.js.map +1 -0
- package/dist/{chunk-SIW64V65.js → chunk-DF2YKGIX.js} +3 -3
- package/dist/{chunk-SIW64V65.js.map → chunk-DF2YKGIX.js.map} +1 -1
- package/dist/{chunk-3SKAEPPZ.js → chunk-ECFCAKWE.js} +4 -4
- package/dist/{chunk-3SKAEPPZ.js.map → chunk-ECFCAKWE.js.map} +1 -1
- package/dist/chunk-EKBMUXFV.js +298 -0
- package/dist/chunk-EKBMUXFV.js.map +1 -0
- package/dist/{chunk-IXLUZHGT.js → chunk-FG6U7KQQ.js} +5 -5
- package/dist/{chunk-IXLUZHGT.js.map → chunk-FG6U7KQQ.js.map} +1 -1
- package/dist/chunk-FKKJHGN5.js +147 -0
- package/dist/chunk-FKKJHGN5.js.map +1 -0
- package/dist/{chunk-FDZNYD4C.js → chunk-GCAK23PU.js} +34 -3
- package/dist/chunk-GCAK23PU.js.map +1 -0
- package/dist/chunk-GXSX6Q6O.js +42 -0
- package/dist/chunk-GXSX6Q6O.js.map +1 -0
- package/dist/{chunk-LOSRXZAH.js → chunk-HJXVVFBT.js} +14 -6
- package/dist/chunk-HJXVVFBT.js.map +1 -0
- package/dist/{chunk-M5KZ26VV.js → chunk-HQZG3OFL.js} +11 -1
- package/dist/chunk-HQZG3OFL.js.map +1 -0
- package/dist/{chunk-ELCMSQNJ.js → chunk-HTERKONR.js} +8 -8
- package/dist/chunk-HTERKONR.js.map +1 -0
- package/dist/chunk-HYORKKYP.js +8 -0
- package/dist/chunk-HYORKKYP.js.map +1 -0
- package/dist/chunk-IO27YTL3.js +73 -0
- package/dist/chunk-IO27YTL3.js.map +1 -0
- package/dist/chunk-ITUQC4FW.js +163 -0
- package/dist/chunk-ITUQC4FW.js.map +1 -0
- package/dist/chunk-K57NINLH.js +137 -0
- package/dist/chunk-K57NINLH.js.map +1 -0
- package/dist/chunk-KC6WUSNS.js +34 -0
- package/dist/chunk-KC6WUSNS.js.map +1 -0
- package/dist/{chunk-W4IK7AWD.js → chunk-KDQZ3E5C.js} +3 -1
- package/dist/chunk-KDQZ3E5C.js.map +1 -0
- package/dist/{chunk-2MSPNRWJ.js → chunk-KK3S5OTW.js} +27 -11
- package/dist/chunk-KK3S5OTW.js.map +1 -0
- package/dist/chunk-LTBVP6VN.js +59 -0
- package/dist/chunk-LTBVP6VN.js.map +1 -0
- package/dist/chunk-OHPYT2BH.js +82 -0
- package/dist/chunk-OHPYT2BH.js.map +1 -0
- package/dist/{chunk-HZPHCSCS.js → chunk-OY2MXIBB.js} +8 -2
- package/dist/chunk-OY2MXIBB.js.map +1 -0
- package/dist/chunk-PE2KPZDW.js +85 -0
- package/dist/chunk-PE2KPZDW.js.map +1 -0
- package/dist/{chunk-QTSMHH5J.js → chunk-QPTJ5DOO.js} +5 -3
- package/dist/chunk-QPTJ5DOO.js.map +1 -0
- package/dist/{chunk-JOR5LGYE.js → chunk-RFLW4FPL.js} +1 -1
- package/dist/chunk-RFLW4FPL.js.map +1 -0
- package/dist/{chunk-U6QYTMDB.js → chunk-RMWNO6BA.js} +6 -2
- package/dist/chunk-RMWNO6BA.js.map +1 -0
- package/dist/{chunk-TDMHA7C3.js → chunk-SQ2Q3OQI.js} +112 -63
- package/dist/chunk-SQ2Q3OQI.js.map +1 -0
- package/dist/{chunk-K4AT3V3J.js → chunk-T74YB76U.js} +13 -11
- package/dist/chunk-T74YB76U.js.map +1 -0
- package/dist/{chunk-BYFTHA4I.js → chunk-TAHR457X.js} +53 -6
- package/dist/chunk-TAHR457X.js.map +1 -0
- package/dist/{chunk-3VXDSIBJ.js → chunk-TKNVL53O.js} +2 -2
- package/dist/{chunk-3VXDSIBJ.js.map → chunk-TKNVL53O.js.map} +1 -1
- package/dist/chunk-TNJLNLVE.js +115 -0
- package/dist/chunk-TNJLNLVE.js.map +1 -0
- package/dist/chunk-TUID42UE.js +15 -0
- package/dist/chunk-TUID42UE.js.map +1 -0
- package/dist/{chunk-CR5U5FV6.js → chunk-UMNHJSIO.js} +93 -80
- package/dist/chunk-UMNHJSIO.js.map +1 -0
- package/dist/chunk-UTCAOOXU.js +116 -0
- package/dist/chunk-UTCAOOXU.js.map +1 -0
- package/dist/{chunk-ZJC5ND3M.js → chunk-VEME3D7K.js} +35 -35
- package/dist/chunk-VEME3D7K.js.map +1 -0
- package/dist/{chunk-HLDRH23D.js → chunk-WJKHLOP5.js} +2 -2
- package/dist/{chunk-HLDRH23D.js.map → chunk-WJKHLOP5.js.map} +1 -1
- package/dist/chunk-WU57BYYM.js +115 -0
- package/dist/chunk-WU57BYYM.js.map +1 -0
- package/dist/{chunk-TGLUDQP2.js → chunk-ZCDRLN3B.js} +11 -11
- package/dist/chunk-ZCDRLN3B.js.map +1 -0
- package/dist/chunk-ZX2QQJXD.js +249 -0
- package/dist/chunk-ZX2QQJXD.js.map +1 -0
- package/dist/{chunk-6E2H2E5A.js → chunk-ZXZAECHZ.js} +6 -6
- package/dist/{chunk-6E2H2E5A.js.map → chunk-ZXZAECHZ.js.map} +1 -1
- package/dist/collapsible-panel.js +3 -3
- package/dist/color-field.d.ts +51 -0
- package/dist/color-field.js +92 -0
- package/dist/color-field.js.map +1 -0
- package/dist/color-picker.d.ts +88 -0
- package/dist/color-picker.js +8 -0
- package/dist/color-picker.js.map +1 -0
- package/dist/color-swatches.d.ts +56 -0
- package/dist/color-swatches.js +4 -0
- package/dist/color-swatches.js.map +1 -0
- package/dist/combobox.js +1 -1
- package/dist/content-item.d.ts +13 -1
- package/dist/content-item.js +1 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/disclosure.d.ts +57 -0
- package/dist/disclosure.js +51 -0
- package/dist/disclosure.js.map +1 -0
- package/dist/file-picker.d.ts +7 -0
- package/dist/file-picker.js +1 -1
- package/dist/help-tags-register.d.ts +8 -8
- package/dist/help-tags-register.js +3 -2
- package/dist/help-tags-register.js.map +1 -1
- package/dist/index.d.ts +16 -9
- package/dist/index.js +58 -46
- package/dist/list-action-row.js +4 -1
- package/dist/list-detail-dialog.d.ts +117 -0
- package/dist/list-detail-dialog.js +165 -0
- package/dist/list-detail-dialog.js.map +1 -0
- package/dist/list-header.js +1 -1
- package/dist/list-item.js +1 -1
- package/dist/list.d.ts +17 -2
- package/dist/list.js +1 -1
- package/dist/lucide-icon.d.ts +9 -1
- package/dist/lucide-icon.js +1 -1
- package/dist/{composer.d.ts → message-composer.d.ts} +20 -12
- package/dist/message-composer.js +6 -0
- package/dist/message-composer.js.map +1 -0
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +36 -3
- package/dist/pane.js +1 -1
- package/dist/popup-menu-register.d.ts +6 -5
- package/dist/popup-menu-register.js +3 -326
- package/dist/popup-menu-register.js.map +1 -1
- package/dist/popup-menu.d.ts +41 -23
- package/dist/popup-menu.js +5 -1
- package/dist/progress-bar.d.ts +52 -0
- package/dist/progress-bar.js +68 -0
- package/dist/progress-bar.js.map +1 -0
- package/dist/progress-ring.d.ts +44 -0
- package/dist/progress-ring.js +73 -0
- package/dist/progress-ring.js.map +1 -0
- package/dist/radio-group.d.ts +62 -0
- package/dist/radio-group.js +4 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/row.js +1 -1
- package/dist/{token-search-model-JA1i8z4D.d.ts → search-field-CrGTN5sa.d.ts} +45 -45
- package/dist/search-field-model.d.ts +3 -0
- package/dist/search-field-model.js +3 -0
- package/dist/search-field-model.js.map +1 -0
- package/dist/search-field.d.ts +3 -0
- package/dist/search-field.js +5 -0
- package/dist/search-field.js.map +1 -0
- package/dist/select-register.d.ts +6 -3
- package/dist/select-register.js +383 -241
- package/dist/select-register.js.map +1 -1
- package/dist/select.d.ts +30 -6
- package/dist/select.js +3 -1
- package/dist/selection.d.ts +54 -0
- package/dist/selection.js +3 -0
- package/dist/selection.js.map +1 -0
- package/dist/slider.d.ts +74 -0
- package/dist/slider.js +103 -0
- package/dist/slider.js.map +1 -0
- package/dist/split-button.js +1 -1
- package/dist/split-view.d.ts +5 -2
- package/dist/split-view.js +18 -159
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.js +1 -1
- package/dist/styles/badge.css +18 -6
- package/dist/styles/button.css +230 -0
- package/dist/styles/catalog/components/catalog-example.css +13 -4
- package/dist/styles/checkbox.css +121 -0
- package/dist/styles/choice-chips.css +58 -7
- package/dist/styles/color-field.css +125 -0
- package/dist/styles/color-picker.css +331 -0
- package/dist/styles/color-swatches.css +122 -0
- package/dist/styles/combobox.css +7 -5
- package/dist/styles/components/actions/button/button.css +230 -0
- package/dist/styles/components/actions/popup-menu/popup-menu.css +326 -198
- package/dist/styles/components/actions/toolbar/toolbar.css +10 -3
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +67 -104
- package/dist/styles/components/actions/toolbar-text/toolbar-text.css +5 -18
- package/dist/styles/components/collections/list/list.css +37 -0
- package/dist/styles/components/feedback/badge/badge.css +18 -6
- package/dist/styles/components/feedback/progress-bar/progress-bar.css +168 -0
- package/dist/styles/components/feedback/progress-ring/progress-ring.css +91 -0
- package/dist/styles/components/feedback/state-banner/state-banner.css +18 -3
- package/dist/styles/components/forms/checkbox/checkbox.css +121 -0
- package/dist/styles/components/forms/choice-chips/choice-chips.css +58 -7
- package/dist/styles/components/forms/color-field/color-field.css +125 -0
- package/dist/styles/components/forms/color-picker/color-picker.css +331 -0
- package/dist/styles/components/forms/color-swatches/color-swatches.css +122 -0
- package/dist/styles/components/forms/combobox/combobox.css +7 -5
- package/dist/styles/components/forms/{composer/composer.css → message-composer/message-composer.css} +17 -33
- package/dist/styles/components/forms/radio-group/radio-group.css +156 -0
- package/dist/styles/{token-search-field.css → components/forms/search-field/search-field.css} +111 -102
- package/dist/styles/components/forms/select/select.css +370 -249
- package/dist/styles/components/forms/slider/slider.css +241 -0
- package/dist/styles/components/forms/switch/switch.css +132 -0
- package/dist/styles/components/forms/tag-field/tag-field.css +8 -0
- package/dist/styles/components/forms/text-field/text-field.css +193 -0
- package/dist/styles/components/layout/pane/pane.css +254 -0
- package/dist/styles/components/layout/resizable-region/resizable-region.css +3 -2
- package/dist/styles/components/layout/row/row.css +11 -0
- package/dist/styles/components/layout/split-view/split-view.css +25 -0
- package/dist/styles/components/layout/workbench/workbench.css +12 -4
- package/dist/styles/components/navigation/disclosure-arrow/disclosure-arrow.css +20 -0
- package/dist/styles/components/navigation/tab-bar/tab-bar.css +7 -7
- package/dist/styles/components/navigation/{app-tab/app-tab.css → tab-bar-item/tab-bar-item.css} +95 -90
- package/dist/styles/components/surfaces/disclosure/disclosure.css +98 -0
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +263 -116
- package/dist/styles/components/typography/text/text.css +14 -12
- package/dist/styles/disclosure-arrow.css +20 -0
- package/dist/styles/disclosure.css +98 -0
- package/dist/styles/foundation.css +6 -4
- package/dist/styles/list-detail-dialog.css +11 -0
- package/dist/styles/list.css +37 -0
- package/dist/styles/{composer.css → message-composer.css} +17 -33
- package/dist/styles/overlay-toast.css +149 -0
- package/dist/styles/overlay-tooltip.css +55 -0
- package/dist/styles/pane.css +254 -0
- package/dist/styles/popup-menu.css +326 -198
- package/dist/styles/progress-bar.css +168 -0
- package/dist/styles/progress-ring.css +91 -0
- package/dist/styles/radio-group.css +156 -0
- package/dist/styles/resizable-region.css +3 -2
- package/dist/styles/row.css +11 -0
- package/dist/styles/{components/forms/token-search-field/token-search-field.css → search-field.css} +111 -102
- package/dist/styles/select.css +370 -249
- package/dist/styles/slider.css +241 -0
- package/dist/styles/split-view.css +25 -0
- package/dist/styles/state-banner.css +18 -3
- package/dist/styles/styles.css +16 -5
- package/dist/styles/surface-scaffold.css +263 -116
- package/dist/styles/switch.css +132 -0
- package/dist/styles/{app-tab.css → tab-bar-item.css} +95 -90
- package/dist/styles/tab-bar.css +7 -7
- package/dist/styles/tag-field.css +8 -0
- package/dist/styles/text-field.css +193 -0
- package/dist/styles/text.css +14 -12
- package/dist/styles/toolbar-control-group.css +67 -104
- package/dist/styles/toolbar-text.css +5 -18
- package/dist/styles/toolbar.css +10 -3
- package/dist/styles/webawesome.css +9 -0
- package/dist/styles/workbench-dialog.css +10 -0
- package/dist/styles/workbench.css +12 -4
- package/dist/surface-scaffold-register.d.ts +7 -5
- package/dist/surface-scaffold-register.js +2 -246
- package/dist/surface-scaffold-register.js.map +1 -1
- package/dist/surface-scaffold.d.ts +70 -7
- package/dist/surface-scaffold.js +5 -1
- package/dist/switch.d.ts +38 -0
- package/dist/switch.js +4 -0
- package/dist/switch.js.map +1 -0
- package/dist/{app-tab.d.ts → tab-bar-item.d.ts} +11 -11
- package/dist/tab-bar-item.js +6 -0
- package/dist/tab-bar-item.js.map +1 -0
- package/dist/tab-bar.d.ts +3 -3
- package/dist/tab-bar.js +1 -1
- package/dist/tab-navigator.js +1 -1
- package/dist/tag-field.d.ts +52 -0
- package/dist/tag-field.js +6 -0
- package/dist/tag-field.js.map +1 -0
- package/dist/text-field.d.ts +83 -0
- package/dist/text-field.js +6 -0
- package/dist/text-field.js.map +1 -0
- package/dist/text.d.ts +6 -1
- package/dist/text.js +1 -1
- package/dist/{types-CVgIwSdq.d.ts → types-DmHWkSd6.d.ts} +19 -1
- package/dist/webawesome.d.ts +3 -0
- package/dist/wire-catalog.d.ts +8 -2
- package/dist/wire-catalog.js +16 -4
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-checkboxes.d.ts +10 -0
- package/dist/wire-checkboxes.js +3 -0
- package/dist/{wire-composers.js.map → wire-checkboxes.js.map} +1 -1
- package/dist/wire-choice-chips.d.ts +17 -0
- package/dist/wire-choice-chips.js +4 -0
- package/dist/{wire-token-search-fields.js.map → wire-choice-chips.js.map} +1 -1
- package/dist/wire-color-fields.d.ts +33 -0
- package/dist/wire-color-fields.js +82 -0
- package/dist/wire-color-fields.js.map +1 -0
- package/dist/wire-color-pickers.d.ts +34 -0
- package/dist/wire-color-pickers.js +9 -0
- package/dist/wire-color-pickers.js.map +1 -0
- package/dist/wire-comboboxes.js +2 -1
- package/dist/wire-content-items.d.ts +5 -1
- package/dist/wire-content-items.js +84 -15
- package/dist/wire-content-items.js.map +1 -1
- package/dist/wire-file-pickers.d.ts +3 -2
- package/dist/wire-file-pickers.js +1 -1
- package/dist/{wire-composers.d.ts → wire-message-composers.d.ts} +5 -4
- package/dist/wire-message-composers.js +3 -0
- package/dist/wire-message-composers.js.map +1 -0
- package/dist/wire-overlay-sheets.js +1 -1
- package/dist/wire-pane-chrome.d.ts +21 -0
- package/dist/wire-pane-chrome.js +67 -0
- package/dist/wire-pane-chrome.js.map +1 -0
- package/dist/{wire-token-search-fields.d.ts → wire-search-fields.d.ts} +25 -25
- package/dist/wire-search-fields.js +6 -0
- package/dist/wire-search-fields.js.map +1 -0
- package/dist/wire-sliders.d.ts +12 -0
- package/dist/wire-sliders.js +31 -0
- package/dist/wire-sliders.js.map +1 -0
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tag-fields.d.ts +41 -0
- package/dist/wire-tag-fields.js +258 -0
- package/dist/wire-tag-fields.js.map +1 -0
- package/dist/wire-text-fields.d.ts +12 -0
- package/dist/wire-text-fields.js +3 -0
- package/dist/wire-text-fields.js.map +1 -0
- package/dist/workbench-dialog.d.ts +97 -0
- package/dist/workbench-dialog.js +124 -0
- package/dist/workbench-dialog.js.map +1 -0
- package/dist/workbench.d.ts +5 -0
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +181 -97
- package/docs/anchored-surface.md +8 -7
- package/docs/app-layouts.md +28 -0
- package/docs/catalog.md +14 -5
- package/docs/color-field.md +65 -0
- package/docs/color-picker.md +71 -0
- package/docs/color-swatches.md +46 -0
- package/docs/component-contract.md +31 -32
- package/docs/component-selection.md +228 -164
- package/docs/design/templates/button/emphasis-dark.svg +1 -0
- package/docs/design/templates/button/emphasis.svg +1 -0
- package/docs/design/templates/button/icons-dark.svg +1 -0
- package/docs/design/templates/button/icons.svg +1 -0
- package/docs/design/templates/button/pill-dark.svg +1 -0
- package/docs/design/templates/button/pill.svg +1 -0
- package/docs/design/templates/button/states-dark.svg +1 -0
- package/docs/design/templates/button/states.svg +1 -0
- package/docs/design/templates/button/toggles-dark.svg +1 -0
- package/docs/design/templates/button/toggles.svg +1 -0
- package/docs/design/templates/button/tones-dark.svg +1 -0
- package/docs/design/templates/button/tones.svg +1 -0
- package/docs/design/templates/button-dark.svg +1 -0
- package/docs/design/templates/button.svg +1 -0
- package/docs/design/templates/checkbox/compact-dark.svg +1 -0
- package/docs/design/templates/checkbox/compact.svg +1 -0
- package/docs/design/templates/checkbox/error-dark.svg +1 -0
- package/docs/design/templates/checkbox/error.svg +1 -0
- package/docs/design/templates/checkbox/mixed-dark.svg +1 -0
- package/docs/design/templates/checkbox/mixed.svg +1 -0
- package/docs/design/templates/checkbox/states-dark.svg +1 -0
- package/docs/design/templates/checkbox/states.svg +1 -0
- package/docs/design/templates/checkbox-dark.svg +1 -0
- package/docs/design/templates/checkbox.svg +1 -0
- package/docs/design/templates/choice-chips/color-palette-dark.svg +1 -1
- package/docs/design/templates/choice-chips/color-palette.svg +1 -1
- package/docs/design/templates/choice-chips/compact-icons-dark.svg +1 -1
- package/docs/design/templates/choice-chips/compact-icons.svg +1 -1
- package/docs/design/templates/choice-chips/multiple-dark.svg +1 -1
- package/docs/design/templates/choice-chips/multiple.svg +1 -1
- package/docs/design/templates/choice-chips-dark.svg +1 -1
- package/docs/design/templates/choice-chips.svg +1 -1
- package/docs/design/templates/color-field/compact-dark.svg +1 -0
- package/docs/design/templates/color-field/compact.svg +1 -0
- package/docs/design/templates/color-field/error-dark.svg +1 -0
- package/docs/design/templates/color-field/error.svg +1 -0
- package/docs/design/templates/color-field/hint-dark.svg +1 -0
- package/docs/design/templates/color-field/hint.svg +1 -0
- package/docs/design/templates/color-field-dark.svg +1 -0
- package/docs/design/templates/color-field.svg +1 -0
- package/docs/design/templates/color-picker/gray-dark.svg +1 -0
- package/docs/design/templates/color-picker/gray.svg +1 -0
- package/docs/design/templates/color-picker/rgb-dark.svg +1 -0
- package/docs/design/templates/color-picker/rgb.svg +1 -0
- package/docs/design/templates/color-picker-dark.svg +1 -0
- package/docs/design/templates/color-picker.svg +1 -0
- package/docs/design/templates/color-swatches/palette-dark.svg +1 -0
- package/docs/design/templates/color-swatches/palette.svg +1 -0
- package/docs/design/templates/color-swatches-dark.svg +1 -0
- package/docs/design/templates/color-swatches.svg +1 -0
- package/docs/design/templates/disclosure/framed-sunken-dark.svg +1 -0
- package/docs/design/templates/disclosure/framed-sunken.svg +1 -0
- package/docs/design/templates/disclosure/plain-dark.svg +1 -0
- package/docs/design/templates/disclosure/plain.svg +1 -0
- package/docs/design/templates/disclosure-dark.svg +1 -0
- package/docs/design/templates/disclosure.svg +1 -0
- package/docs/design/templates/list-header/size-l-dark.svg +1 -1
- package/docs/design/templates/list-header/size-l.svg +1 -1
- package/docs/design/templates/list-header/size-m-dark.svg +1 -1
- package/docs/design/templates/list-header/size-m.svg +1 -1
- package/docs/design/templates/list-header/size-xl-dark.svg +1 -1
- package/docs/design/templates/list-header/size-xl.svg +1 -1
- package/docs/design/templates/list-header-dark.svg +1 -1
- package/docs/design/templates/list-header.svg +1 -1
- package/docs/design/templates/message-composer/chat-dark.svg +1 -0
- package/docs/design/templates/message-composer/chat.svg +1 -0
- package/docs/design/templates/{composer → message-composer}/prompt-dark.svg +1 -1
- package/docs/design/templates/{composer → message-composer}/prompt.svg +1 -1
- package/docs/design/templates/message-composer-dark.svg +1 -0
- package/docs/design/templates/message-composer.svg +1 -0
- package/docs/design/templates/progress-bar/determinate-dark.svg +1 -0
- package/docs/design/templates/progress-bar/determinate.svg +1 -0
- package/docs/design/templates/progress-bar/tones-dark.svg +1 -0
- package/docs/design/templates/progress-bar/tones.svg +1 -0
- package/docs/design/templates/progress-bar-dark.svg +1 -0
- package/docs/design/templates/progress-bar.svg +1 -0
- package/docs/design/templates/progress-ring/sizes-dark.svg +1 -0
- package/docs/design/templates/progress-ring/sizes.svg +1 -0
- package/docs/design/templates/progress-ring/tones-dark.svg +1 -0
- package/docs/design/templates/progress-ring/tones.svg +1 -0
- package/docs/design/templates/progress-ring-dark.svg +1 -0
- package/docs/design/templates/progress-ring.svg +1 -0
- package/docs/design/templates/radio-group/horizontal-dark.svg +1 -0
- package/docs/design/templates/radio-group/horizontal.svg +1 -0
- package/docs/design/templates/radio-group/vertical-dark.svg +1 -0
- package/docs/design/templates/radio-group/vertical.svg +1 -0
- package/docs/design/templates/radio-group-dark.svg +1 -0
- package/docs/design/templates/radio-group.svg +1 -0
- package/docs/design/templates/segmented-control/equal-dark.svg +1 -1
- package/docs/design/templates/segmented-control/equal.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small-dark.svg +1 -1
- package/docs/design/templates/segmented-control/pill-small.svg +1 -1
- package/docs/design/templates/segmented-control-dark.svg +1 -1
- package/docs/design/templates/segmented-control.svg +1 -1
- package/docs/design/templates/select/compact-dark.svg +1 -0
- package/docs/design/templates/select/compact.svg +1 -0
- package/docs/design/templates/select/form-dark.svg +1 -0
- package/docs/design/templates/select/form.svg +1 -0
- package/docs/design/templates/select/icons-dark.svg +1 -0
- package/docs/design/templates/select/icons.svg +1 -0
- package/docs/design/templates/select-dark.svg +1 -0
- package/docs/design/templates/select.svg +1 -0
- package/docs/design/templates/slider/compact-dark.svg +1 -0
- package/docs/design/templates/slider/compact.svg +1 -0
- package/docs/design/templates/slider/readout-dark.svg +1 -0
- package/docs/design/templates/slider/readout.svg +1 -0
- package/docs/design/templates/slider/ticks-dark.svg +1 -0
- package/docs/design/templates/slider/ticks.svg +1 -0
- package/docs/design/templates/slider-dark.svg +1 -0
- package/docs/design/templates/slider.svg +1 -0
- package/docs/design/templates/switch/compact-dark.svg +1 -0
- package/docs/design/templates/switch/compact.svg +1 -0
- package/docs/design/templates/switch/states-dark.svg +1 -0
- package/docs/design/templates/switch/states.svg +1 -0
- package/docs/design/templates/switch-dark.svg +1 -0
- package/docs/design/templates/switch.svg +1 -0
- package/docs/design/templates/tag-field/error-dark.svg +1 -0
- package/docs/design/templates/tag-field/error.svg +1 -0
- package/docs/design/templates/tag-field/tags-dark.svg +1 -0
- package/docs/design/templates/tag-field/tags.svg +1 -0
- package/docs/design/templates/tag-field-dark.svg +1 -0
- package/docs/design/templates/tag-field.svg +1 -0
- package/docs/design/templates/text-field/compact-dark.svg +1 -0
- package/docs/design/templates/text-field/compact.svg +1 -0
- package/docs/design/templates/text-field/error-dark.svg +1 -0
- package/docs/design/templates/text-field/error.svg +1 -0
- package/docs/design/templates/text-field/labeled-dark.svg +1 -0
- package/docs/design/templates/text-field/labeled.svg +1 -0
- package/docs/design/templates/text-field/multiline-dark.svg +1 -0
- package/docs/design/templates/text-field/multiline.svg +1 -0
- package/docs/design/templates/text-field/search-dark.svg +1 -0
- package/docs/design/templates/text-field/search.svg +1 -0
- package/docs/design/templates/text-field-dark.svg +1 -0
- package/docs/design/templates/text-field.svg +1 -0
- package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-320-dark.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-320.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-600-dark.svg +1 -1
- package/docs/design/templates/toolbar/width-visibility-600.svg +1 -1
- package/docs/design/templates/toolbar-dark.svg +1 -1
- package/docs/design/templates/toolbar.svg +1 -1
- package/docs/design/templates/value-table/details-dark.svg +1 -1
- package/docs/design/templates/value-table/details.svg +1 -1
- package/docs/design/templates/value-table-dark.svg +1 -1
- package/docs/design/templates/value-table.svg +1 -1
- package/docs/design/templates.md +19 -6
- package/docs/design-philosophy.md +6 -6
- package/docs/disclosure.md +63 -0
- package/docs/examples/component-catalog-extension.json +2 -2
- package/docs/layout.md +16 -7
- package/docs/list-detail-dialog.md +96 -0
- package/docs/manual-test-plan.md +1 -1
- package/docs/{composer.md → message-composer.md} +41 -28
- package/docs/overlay-toast.md +62 -0
- package/docs/overlay-tooltip.md +53 -0
- package/docs/progress.md +62 -0
- package/docs/recipes.md +15 -21
- package/docs/slider.md +64 -0
- package/docs/surface-scaffold.md +155 -88
- package/docs/tag-field.md +66 -0
- package/docs/type-contracts.md +8 -8
- package/docs/ui-analyzer.md +1 -1
- package/docs/ui-doctor.md +11 -6
- package/docs/ux-demo.md +6 -6
- package/docs/webawesome-migration.md +80 -0
- package/docs/webawesome-theme.md +57 -35
- package/docs/workbench-dialog.md +85 -0
- package/docs/workbench.md +10 -6
- package/docs/writing.md +10 -8
- package/doctor/copy-capitalization-checks.mjs +18 -9
- package/llms.txt +127 -57
- package/package.json +156 -39
- package/ux-demo/recipes/composer-form.tsx +18 -19
- package/ux-demo/recipes/list-detail-dialog.tsx +55 -162
- package/ux-demo/recipes/mount-recipe.ts +7 -6
- package/ux-demo/recipes/types.ts +1 -0
- package/ai/components/icon-button.md +0 -82
- package/ai/components/icon-toggle-button.md +0 -80
- package/dist/app-tab.js +0 -6
- package/dist/app-tab.js.map +0 -1
- package/dist/browser/app-tab.js +0 -4
- package/dist/browser/composer.js +0 -4
- package/dist/browser/icon-toggle-button.js +0 -4
- package/dist/browser/token-search-field.js +0 -4
- package/dist/chunk-2MSPNRWJ.js.map +0 -1
- package/dist/chunk-7IUEBNCO.js.map +0 -1
- package/dist/chunk-AV7CPAPT.js +0 -82
- package/dist/chunk-AV7CPAPT.js.map +0 -1
- package/dist/chunk-BYFTHA4I.js.map +0 -1
- package/dist/chunk-CA7LNX3J.js +0 -44
- package/dist/chunk-CA7LNX3J.js.map +0 -1
- package/dist/chunk-CR5U5FV6.js.map +0 -1
- package/dist/chunk-ELCMSQNJ.js.map +0 -1
- package/dist/chunk-ETCWQLJV.js.map +0 -1
- package/dist/chunk-FDZNYD4C.js.map +0 -1
- package/dist/chunk-FR76ZJQC.js +0 -90
- package/dist/chunk-FR76ZJQC.js.map +0 -1
- package/dist/chunk-HQZYKJ56.js.map +0 -1
- package/dist/chunk-HZPHCSCS.js.map +0 -1
- package/dist/chunk-JOR5LGYE.js.map +0 -1
- package/dist/chunk-K4AT3V3J.js.map +0 -1
- package/dist/chunk-LL45C7BB.js.map +0 -1
- package/dist/chunk-LOSRXZAH.js.map +0 -1
- package/dist/chunk-LPHU44S3.js.map +0 -1
- package/dist/chunk-M5KZ26VV.js.map +0 -1
- package/dist/chunk-MXNIVEVL.js.map +0 -1
- package/dist/chunk-NS762OVM.js +0 -222
- package/dist/chunk-NS762OVM.js.map +0 -1
- package/dist/chunk-QTSMHH5J.js.map +0 -1
- package/dist/chunk-T5BJBMW7.js.map +0 -1
- package/dist/chunk-TDMHA7C3.js.map +0 -1
- package/dist/chunk-TGLUDQP2.js.map +0 -1
- package/dist/chunk-U6QYTMDB.js.map +0 -1
- package/dist/chunk-VFYO3UGZ.js +0 -45
- package/dist/chunk-VFYO3UGZ.js.map +0 -1
- package/dist/chunk-W4IK7AWD.js.map +0 -1
- package/dist/chunk-YBWQR2OK.js.map +0 -1
- package/dist/chunk-ZJC5ND3M.js.map +0 -1
- package/dist/composer.js +0 -5
- package/dist/composer.js.map +0 -1
- package/dist/icon-button.d.ts +0 -46
- package/dist/icon-button.js +0 -6
- package/dist/icon-button.js.map +0 -1
- package/dist/icon-toggle-button.d.ts +0 -42
- package/dist/icon-toggle-button.js +0 -6
- package/dist/icon-toggle-button.js.map +0 -1
- package/dist/styles/components/actions/icon-button/icon-button.css +0 -22
- package/dist/styles/components/actions/icon-toggle-button/icon-toggle-button.css +0 -83
- package/dist/styles/icon-button.css +0 -22
- package/dist/styles/icon-toggle-button.css +0 -83
- package/dist/token-search-field.d.ts +0 -3
- package/dist/token-search-field.js +0 -5
- package/dist/token-search-field.js.map +0 -1
- package/dist/token-search-model.d.ts +0 -3
- package/dist/token-search-model.js +0 -3
- package/dist/token-search-model.js.map +0 -1
- package/dist/wire-composers.js +0 -3
- package/dist/wire-token-search-fields.js +0 -6
- package/docs/design/templates/composer/chat-dark.svg +0 -1
- package/docs/design/templates/composer/chat.svg +0 -1
- package/docs/design/templates/composer-dark.svg +0 -1
- package/docs/design/templates/composer.svg +0 -1
- /package/docs/design/templates/{token-search-field → search-field}/empty-dark.svg +0 -0
- /package/docs/design/templates/{token-search-field → search-field}/empty.svg +0 -0
- /package/docs/design/templates/{token-search-field → search-field}/tokens-dark.svg +0 -0
- /package/docs/design/templates/{token-search-field → search-field}/tokens.svg +0 -0
- /package/docs/design/templates/{token-search-field-dark.svg → search-field-dark.svg} +0 -0
- /package/docs/design/templates/{token-search-field.svg → search-field.svg} +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Disclosure
|
|
2
|
+
|
|
3
|
+
`@kerfjs/ui/disclosure` shows and hides content under a summary row. It is a
|
|
4
|
+
native `<details>` with a `<summary>` that carries a `DisclosureArrow`, the
|
|
5
|
+
title, and an optional quiet detail, on the shared content-item geometry.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Disclosure } from "@kerfjs/ui/disclosure";
|
|
9
|
+
|
|
10
|
+
<Disclosure title="Advanced Settings" detail="3 options">
|
|
11
|
+
<Text>Proxy, request timeout, and retry limits.</Text>
|
|
12
|
+
</Disclosure>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Geometry
|
|
16
|
+
|
|
17
|
+
The root takes the content-item geometry: an 8px inline margin, a 1px border
|
|
18
|
+
(transparent unless framed), and the rounded radius. The summary row has the
|
|
19
|
+
8px inset and a 42px minimum height. The content area is offset by the arrow
|
|
20
|
+
column only, so Kerf block content, which brings the shared 1px + 8px inset
|
|
21
|
+
(`Text`, a `List`, a `ValueTable`), lands on the title's text column. Wrap
|
|
22
|
+
prose in `Text` rather than passing a bare string.
|
|
23
|
+
|
|
24
|
+
- `appearance="plain"` (default) sits on the surrounding surface.
|
|
25
|
+
- `appearance="framed"` draws the standard neutral border. Frame one only when
|
|
26
|
+
it marks a real distinction.
|
|
27
|
+
- `appearance="sunken"` draws the border on the lowered, textured work surface,
|
|
28
|
+
for something like a log.
|
|
29
|
+
|
|
30
|
+
## Open state
|
|
31
|
+
|
|
32
|
+
The open state belongs to the native `<details>` once it is on the page. A
|
|
33
|
+
person toggles it with a press, Enter, or Space; `open` renders it open, and a
|
|
34
|
+
re-render that passes `open` opens it. A re-render never closes it, because
|
|
35
|
+
kerf's morph leaves a `<details>` element's live `open` alone. To close it
|
|
36
|
+
from code, set `element.open = false`. The arrow follows the live state.
|
|
37
|
+
|
|
38
|
+
To react to a toggle, give it a `toggleAction` (a `data-action` on the root)
|
|
39
|
+
and listen for the native `toggle` event. It does not bubble, so listen in
|
|
40
|
+
the capture phase, for example with `delegateCapture`, and read
|
|
41
|
+
`event.newState` (`open` or `closed`).
|
|
42
|
+
|
|
43
|
+
## Accordions
|
|
44
|
+
|
|
45
|
+
Disclosures that share a `name` form an exclusive group: opening one closes
|
|
46
|
+
the others. This is the native `<details name>` attribute.
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
{faqs.map((faq) => (
|
|
50
|
+
<Disclosure title={faq.title} name="faq" appearance="framed">
|
|
51
|
+
<Text>{faq.answer}</Text>
|
|
52
|
+
</Disclosure>
|
|
53
|
+
))}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Accessibility
|
|
57
|
+
|
|
58
|
+
The summary is the platform's disclosure button: Enter and Space toggle it,
|
|
59
|
+
and it reports its expanded state. The arrow is decorative. Keep the title a
|
|
60
|
+
short, meaningful name for what it hides.
|
|
61
|
+
|
|
62
|
+
Use this instead of `wa-details`, `wa-accordion`, and `wa-accordion-item`,
|
|
63
|
+
which are Discouraged.
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"id": "acme-filter-chip",
|
|
9
9
|
"name": "FilterChip",
|
|
10
10
|
"kind": "component",
|
|
11
|
-
"purpose": "A removable application filter displayed inside a
|
|
11
|
+
"purpose": "A removable application filter displayed inside a search-field workflow.",
|
|
12
12
|
"useWhen": [
|
|
13
13
|
"A saved application filter needs a compact visible label and remove action."
|
|
14
14
|
],
|
|
15
15
|
"avoidWhen": [
|
|
16
|
-
"The value belongs to
|
|
16
|
+
"The value belongs to SearchField's own controlled token collection."
|
|
17
17
|
],
|
|
18
18
|
"publicClasses": ["acme-filter-chip"],
|
|
19
19
|
"publicTokens": ["--acme-filter-chip-accent"],
|
package/docs/layout.md
CHANGED
|
@@ -88,7 +88,7 @@ For custom chrome colors in auto mode, set `--kui-pane-chrome-background`
|
|
|
88
88
|
on the Pane; it defaults to `--kui-color-surface`.
|
|
89
89
|
|
|
90
90
|
```tsx
|
|
91
|
-
<Pane appearance="sunken" footer={<
|
|
91
|
+
<Pane appearance="sunken" footer={<MessageComposer />}>
|
|
92
92
|
<Conversation />
|
|
93
93
|
</Pane>
|
|
94
94
|
```
|
|
@@ -526,7 +526,7 @@ Toolbar groups reserve a real 1px outer border around a 42px inner area, even
|
|
|
526
526
|
when their border and background are transparent.
|
|
527
527
|
A `Toolbar` lays its zones out against one 44px control band at its top: an
|
|
528
528
|
ordinary `ToolbarText`, `ToolbarControlGroup`, or standalone trailing
|
|
529
|
-
`
|
|
529
|
+
`Button` no taller than the band is centered in it by its own size, and a
|
|
530
530
|
taller one (a wrapped title, a second trailing row) starts at the band's top
|
|
531
531
|
and grows down, so it never moves the other controls. A wrapped `ToolbarText`
|
|
532
532
|
centers its first line in the band. Other direct zone content centers against
|
|
@@ -795,10 +795,13 @@ defaults to `hAlign="left"`, `vAlign="full"`, `gap="xs"`, and no wrapping;
|
|
|
795
795
|
Both components accept the same physical-axis vocabulary, with baseline
|
|
796
796
|
alignment additionally available on the horizontal `Row` cross axis:
|
|
797
797
|
|
|
798
|
-
| Axis | Values and aliases
|
|
799
|
-
| ---------- |
|
|
800
|
-
| Horizontal | `left` / `l` / `flex-start`; `center` / `c
|
|
801
|
-
| Vertical | `top` / `t` / `flex-start`; `middle` / `m` / `c
|
|
798
|
+
| Axis | Values and aliases | Flex behavior |
|
|
799
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
800
|
+
| Horizontal | `left` / `l` / `flex-start`; `center` / `c`; `space-around`; `right` / `r` / `flex-end`; `full` / `f` / `space-between` | Distributes a Row's children; aligns a List's children across its width. |
|
|
801
|
+
| Vertical | `top` / `t` / `flex-start`; `middle` / `m` / `c`; `space-around`; `bottom` / `b` / `flex-end`; `full` / `f` / `space-between`; Row-only `baseline` | Aligns a Row's children across its height; distributes a List's children. |
|
|
802
|
+
|
|
803
|
+
`center` and `middle` gather the children in the middle and keep their `gap`;
|
|
804
|
+
`space-around` spreads equal space around each child instead.
|
|
802
805
|
|
|
803
806
|
Cross-axis `space-around` and `space-between` are not valid `align-items`
|
|
804
807
|
values. Kerf therefore maps `middle` to centered items and `full` to stretched
|
|
@@ -913,6 +916,12 @@ For long reading content, such as a reader view, pass `inset="document"`: 24px
|
|
|
913
916
|
block and 32px inline on all four sides, narrowing to 16px inline below 576px.
|
|
914
917
|
It replaces any `textInsets`/`controlInsets` on that List.
|
|
915
918
|
|
|
919
|
+
For a page's content column (a settings page, a setup form), pass
|
|
920
|
+
`contentWidth`: `compact` (440px), `medium` (640px), or `wide` (864px) of
|
|
921
|
+
content, plus the List's own insets, so it composes with `inset="document"`.
|
|
922
|
+
The column is centered by default; `contentAlign="start"` keeps it at the
|
|
923
|
+
leading edge. Never cap and center a page column with application CSS.
|
|
924
|
+
|
|
916
925
|
A List is transparent by default. Pass `surface="base"` (the page surface) or
|
|
917
926
|
`surface="raised"` to paint a solid background behind the stack and its
|
|
918
927
|
insets — for example a banner strip above a sunken work area, which otherwise
|
|
@@ -961,7 +970,7 @@ instance's value.
|
|
|
961
970
|
default to `trbl`. The text wrapper applies its complete 8/1/8 geometry only on
|
|
962
971
|
selected sides; the control wrapper applies its 8px outer margin only on
|
|
963
972
|
selected sides. Every direct child of `ListInsetControl` grows to fill the row
|
|
964
|
-
(a `Select`, a `
|
|
973
|
+
(a `Select`, a `TextField`, or a `Button` spans the full inset width), and
|
|
965
974
|
several children share the row with an 8px gap; stack controls vertically with
|
|
966
975
|
a `List` using `controlInsets` instead. Pass `sides="rl"` for tight text that
|
|
967
976
|
keeps the horizontal inset without adding vertical box space.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# List-detail dialog
|
|
2
|
+
|
|
3
|
+
`@kerfjs/ui/list-detail-dialog` is the modal form of a list-detail layout: a
|
|
4
|
+
list column beside the selected item's detail, each running the dialog's full
|
|
5
|
+
height. It is one of three dialog types:
|
|
6
|
+
|
|
7
|
+
| Type | Use it for |
|
|
8
|
+
| -------------------------------------------------------------- | -------------------------------------------------------- |
|
|
9
|
+
| `DialogSurface` ([surface-scaffold.md](surface-scaffold.md)) | One pane: a title, a body, and footer buttons. |
|
|
10
|
+
| `ListDetailDialog` (this page) | Pick a record from a list and show its detail beside it. |
|
|
11
|
+
| `WorkbenchDialog` ([workbench-dialog.md](workbench-dialog.md)) | An editing task with side panels. |
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import {
|
|
15
|
+
ListDetailDialog,
|
|
16
|
+
openDialog,
|
|
17
|
+
} from "@kerfjs/ui/list-detail-dialog";
|
|
18
|
+
import { deviceClass } from "@kerfjs/ui/device-class";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
In a browser bundler that honors the `browser` export condition, the import
|
|
22
|
+
also loads the stylesheets of every component it renders (DialogSurface,
|
|
23
|
+
SplitView, NavStack, Pane, and the toolbar components). Without that
|
|
24
|
+
condition, import `@kerfjs/ui/list-detail-dialog.css`, which pulls in the same
|
|
25
|
+
stylesheets, or `@kerfjs/ui/styles.css`.
|
|
26
|
+
|
|
27
|
+
## Where things go
|
|
28
|
+
|
|
29
|
+
- **The detail column owns the dialog's identity.** Its header toolbar carries
|
|
30
|
+
the primary title (an xl level-2 heading, with an optional `description`
|
|
31
|
+
line), the `actions` you pass, and the close control, last. Record actions go
|
|
32
|
+
in the detail `footer`, pinned below the scrolling detail.
|
|
33
|
+
- **The list column is secondary.** Its header carries `list.title` at the
|
|
34
|
+
default toolbar size, so it reads as pane identity beside the primary title,
|
|
35
|
+
followed by your `list.toolbar` controls. An add control or count can go in
|
|
36
|
+
`list.footer`.
|
|
37
|
+
- **The surface draws no header.** Both columns start at the dialog's top
|
|
38
|
+
edge, so the divider between them runs the dialog's full height.
|
|
39
|
+
|
|
40
|
+
Each column is a `Pane`: its header and footer stay pinned and its content
|
|
41
|
+
scrolls on its own. Pass content that owns its geometry, usually a `List`.
|
|
42
|
+
|
|
43
|
+
## Responsive by device class
|
|
44
|
+
|
|
45
|
+
The component is declarative. The app derives `compact` from the device class
|
|
46
|
+
and tracks its own selection and, on compact devices, whether the detail is
|
|
47
|
+
pushed:
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
const device = deviceClass();
|
|
51
|
+
const selected = signal("atlas");
|
|
52
|
+
const detailOpen = signal(false);
|
|
53
|
+
|
|
54
|
+
<ListDetailDialog
|
|
55
|
+
id="projects"
|
|
56
|
+
label="Project Details"
|
|
57
|
+
compact={device.value.compact}
|
|
58
|
+
detailActive={detailOpen.value}
|
|
59
|
+
backLabel="Back to Projects"
|
|
60
|
+
list={{
|
|
61
|
+
title: "Recent Projects",
|
|
62
|
+
content: <List>{rows}</List>,
|
|
63
|
+
}}
|
|
64
|
+
detail={{
|
|
65
|
+
title: project.name,
|
|
66
|
+
content: <List>{details}</List>,
|
|
67
|
+
footer: actions,
|
|
68
|
+
}}
|
|
69
|
+
/>;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- **Roomy** (`compact: false`): a modal of `size` `large` with a definite
|
|
73
|
+
height (default 560px, bounded by the viewport; pass `maxHeight` instead to
|
|
74
|
+
size it to its content). The list column is 280px, at most 40% of the
|
|
75
|
+
dialog, by default; set `list.width` like SplitView's `listWidth`.
|
|
76
|
+
- **Compact** (`compact: true`): the dialog fills the screen and becomes a
|
|
77
|
+
`NavStack`. The list is the root view (titled `list.title`, with its toolbar
|
|
78
|
+
controls); `detailActive` pushes the detail (titled `detail.title`, with its
|
|
79
|
+
`actions`). Every view keeps the close control, and each view's `footer` is
|
|
80
|
+
pinned below it. The stack's back control dispatches `nav-back`; set
|
|
81
|
+
`detailActive` back to `false` in response. Wire `wireNavStack` above it for
|
|
82
|
+
the push and pop motion.
|
|
83
|
+
|
|
84
|
+
Render one `ListDetailDialog` for both presentations, so crossing the compact
|
|
85
|
+
breakpoint while it is open morphs it in place and it stays open.
|
|
86
|
+
|
|
87
|
+
## Opening and closing
|
|
88
|
+
|
|
89
|
+
It is a `DialogSurface` underneath: open it with `openDialog(element)` and close
|
|
90
|
+
it with `closeDialog(element)`, the close control, Escape, an element with
|
|
91
|
+
`data-dialog-close`, or (with `lightDismiss`) a press on the backdrop. Both
|
|
92
|
+
functions are re-exported from this subpath. Give sibling dialogs distinct
|
|
93
|
+
`rootAttributes['data-key']` values so a re-render morphs each into itself.
|
|
94
|
+
|
|
95
|
+
See the [list-detail dialog recipe](recipes.md#list-detail-dialog) for a
|
|
96
|
+
complete, production-backed example.
|
package/docs/manual-test-plan.md
CHANGED
|
@@ -21,7 +21,7 @@ an iPhone (Safari) and an Android phone (Chrome).
|
|
|
21
21
|
between its minimum height and the screen less the top safe area.
|
|
22
22
|
|
|
23
23
|
Playwright cannot raise a virtual keyboard; the overlap formula is unit-tested
|
|
24
|
-
(`tests/unit/dialog-
|
|
24
|
+
(`tests/unit/dialog-surface-controller.test.tsx`) and a simulated keyboard is covered
|
|
25
25
|
in `tests/browser/dialog-bottom-sheet.spec.ts`.
|
|
26
26
|
|
|
27
27
|
## Automated coverage summary
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# MessageComposer
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`MessageComposer` (`@kerfjs/ui/message-composer`, CSS `@kerfjs/ui/message-composer.css`) is the chat
|
|
4
4
|
or prompt composer: the place a person writes a message, assistant prompt, or
|
|
5
5
|
reply and sends it with a trailing action. It replaces app-owned composer
|
|
6
6
|
chrome, such as a `wa-textarea` and a button wrapped in application CSS that
|
|
@@ -9,7 +9,7 @@ draws a frame, a focus border, and a shadow.
|
|
|
9
9
|
## Contract
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
|
-
<
|
|
12
|
+
<MessageComposer
|
|
13
13
|
id="assistant-message"
|
|
14
14
|
name="message"
|
|
15
15
|
label="Message"
|
|
@@ -17,10 +17,10 @@ draws a frame, a focus border, and a shadow.
|
|
|
17
17
|
hint="Answers use the latest nightly build."
|
|
18
18
|
minRows={1}
|
|
19
19
|
maxRows={8}
|
|
20
|
-
|
|
21
|
-
<
|
|
20
|
+
trailing={
|
|
21
|
+
<Button tone="brand" action="send-message">
|
|
22
22
|
Send
|
|
23
|
-
</
|
|
23
|
+
</Button>
|
|
24
24
|
}
|
|
25
25
|
/>
|
|
26
26
|
```
|
|
@@ -34,18 +34,24 @@ draws a frame, a focus border, and a shadow.
|
|
|
34
34
|
- **Field.** A native, borderless `<textarea>` named by `label`. It sizes to
|
|
35
35
|
its content with `field-sizing: content`, between `minRows` (default 1) and
|
|
36
36
|
`maxRows` (default 8) lines, and scrolls past the maximum. Both bounds are
|
|
37
|
-
positive integers, and `maxRows` is at least `minRows`; otherwise `
|
|
37
|
+
positive integers, and `maxRows` is at least `minRows`; otherwise `MessageComposer`
|
|
38
38
|
throws a `RangeError`. In an engine without `field-sizing`, the field keeps
|
|
39
39
|
a fixed height of three lines, clamped to the bounds, and scrolls.
|
|
40
|
-
- **Action row.** Below the field
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
- **Action row.** Below the field, a compact `Toolbar` (footer semantics,
|
|
41
|
+
named "<label> Actions") that the composer insets for you. Its leading zone
|
|
42
|
+
holds optional `leading` controls, such as an attach button or a model
|
|
43
|
+
`Select` in a `ToolbarControlGroup`, then the optional quiet `hint`; its
|
|
44
|
+
trailing zone holds `trailing`, normally one brand Send `Button`. Every
|
|
45
|
+
toolbar convention applies, from control groups to responsive relocation.
|
|
46
|
+
With an `id`, the hint is the field's accessible description
|
|
47
|
+
(`<id>-hint`).
|
|
43
48
|
- **Value.** `value` seeds the field (a restored draft, or `''`). The app
|
|
44
49
|
reads the textarea in its send action, clears it, and re-renders.
|
|
45
50
|
- **Disabled.** `disabled` disables the field; the app disables or marks busy
|
|
46
51
|
its own actions.
|
|
47
|
-
- **Placement.**
|
|
48
|
-
|
|
52
|
+
- **Placement.** Pass it as a `DialogSurface`'s `footer`, or use `slot` to
|
|
53
|
+
assign it to a web component slot. `rootAttributes` takes safe `data-*`
|
|
54
|
+
identity.
|
|
49
55
|
- **Enter to send.** `submitOnEnter` opts in to the keyboard contract below;
|
|
50
56
|
it marks the root `data-submit-on-enter="true"` (protected from
|
|
51
57
|
`rootAttributes`) and gives the field `aria-keyshortcuts="Enter"`.
|
|
@@ -55,13 +61,13 @@ like, and where the composer sits.
|
|
|
55
61
|
|
|
56
62
|
## Enter to send
|
|
57
63
|
|
|
58
|
-
Set `submitOnEnter` and call `
|
|
64
|
+
Set `submitOnEnter` and call `wireMessageComposers` once over an ancestor of every
|
|
59
65
|
such composer; it returns a disposer:
|
|
60
66
|
|
|
61
67
|
```ts
|
|
62
|
-
import {
|
|
68
|
+
import { wireMessageComposers } from '@kerfjs/ui/wire-message-composers';
|
|
63
69
|
|
|
64
|
-
const
|
|
70
|
+
const stopMessageComposers = wireMessageComposers(app);
|
|
65
71
|
```
|
|
66
72
|
|
|
67
73
|
In an opted-in composer's field:
|
|
@@ -74,14 +80,14 @@ In an opted-in composer's field:
|
|
|
74
80
|
| Enter on an empty or whitespace-only message | Nothing: no send and no newline. |
|
|
75
81
|
| Auto-repeating Enter (key held down) | Nothing. |
|
|
76
82
|
|
|
77
|
-
The first trailing action is the first `
|
|
83
|
+
The first trailing action is the first `button` (a `Button`), `wa-button`, or
|
|
78
84
|
`[data-action]` element inside `actions`. Clicking it means the keyboard send
|
|
79
85
|
runs the same delegated `data-action` handler as a pointer send, so the app
|
|
80
86
|
writes one send handler that reads the field, clears it, and re-renders. The
|
|
81
87
|
click does not move focus, so the person keeps typing. Nothing is sent while
|
|
82
88
|
the field is `disabled`, or while that action has a `disabled` attribute or
|
|
83
|
-
property,
|
|
84
|
-
`aria-disabled="true"`; the Enter is still suppressed, so a message waiting on
|
|
89
|
+
property, `aria-busy="true"` (a busy `Button`), a `loading` attribute (a busy
|
|
90
|
+
`wa-button`), or `aria-disabled="true"`; the Enter is still suppressed, so a message waiting on
|
|
85
91
|
a busy Send does not gain a newline.
|
|
86
92
|
|
|
87
93
|
Leave `submitOnEnter` off for a long-form prompt where Enter should be a
|
|
@@ -98,12 +104,19 @@ with `bodyLayout="fill-last"` and `footerPresentation="floating"` (and
|
|
|
98
104
|
composer into the footer:
|
|
99
105
|
|
|
100
106
|
```tsx
|
|
101
|
-
<DialogSurface
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
<DialogSurface
|
|
108
|
+
id="assistant"
|
|
109
|
+
label="Assistant"
|
|
110
|
+
height={remify(560)}
|
|
111
|
+
bodyInset="none"
|
|
112
|
+
bodyLayout="fill-last"
|
|
113
|
+
footerPresentation="floating"
|
|
114
|
+
footerOffset={remify(8)}
|
|
115
|
+
footerInset="none"
|
|
116
|
+
footer={<MessageComposer submitOnEnter id="assistant-message" name="message" label="Message" placeholder="Ask about this build" trailing={send} />}
|
|
117
|
+
>
|
|
118
|
+
<StateBanner title="Answers use the latest nightly build." tone="neutral" />
|
|
119
|
+
<List gap="xs" controlInsets="tb" scrollable scrollClearance="block-end">{messages}</List>
|
|
107
120
|
</DialogSurface>;
|
|
108
121
|
```
|
|
109
122
|
|
|
@@ -121,14 +134,14 @@ instead.
|
|
|
121
134
|
- Style its field, frame, or action row from application CSS. A variation it
|
|
122
135
|
does not offer is a component gap.
|
|
123
136
|
- Use it for an ordinary form field submitted with the rest of a form; use
|
|
124
|
-
`
|
|
137
|
+
a `multiline` `TextField`.
|
|
125
138
|
|
|
126
139
|
## Verification
|
|
127
140
|
|
|
128
|
-
`tests/unit/composer.test.tsx` covers serialization, the hint description,
|
|
129
|
-
row bounds, and protected attributes; `tests/unit/wire-composers.test.tsx`
|
|
141
|
+
`tests/unit/message-composer.test.tsx` covers serialization, the hint description,
|
|
142
|
+
row bounds, and protected attributes; `tests/unit/wire-message-composers.test.tsx`
|
|
130
143
|
covers the Enter-to-send matrix (modifiers, IME, empty, repeat, disabled
|
|
131
|
-
field and actions, first action only, disposal). `tests/browser/composer.spec.ts` covers
|
|
144
|
+
field and actions, first action only, disposal). `tests/browser/message-composer.spec.ts` covers
|
|
132
145
|
the focus-within border, growth up to `maxRows` and then scrolling, the action
|
|
133
146
|
row geometry, and the send flow at wide and phone widths, and, in Chromium,
|
|
134
147
|
Firefox, and WebKit, Enter, Shift+Enter, Cmd/Ctrl+Enter, empty messages, and
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Toasts
|
|
2
|
+
|
|
3
|
+
`kerfjs/overlay`'s `toast()` shows a brief, auto-dismissing notification in
|
|
4
|
+
one body-level live region. The core ships no CSS. Import
|
|
5
|
+
`@kerfjs/ui/overlay-toast.css` once and every toast takes Kerf's look:
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import "@kerfjs/ui/overlay-toast.css";
|
|
9
|
+
import { toast } from "kerfjs/overlay";
|
|
10
|
+
|
|
11
|
+
const exit = { exitClass: "kui-toast-exit", exitDuration: 200 };
|
|
12
|
+
|
|
13
|
+
toast("Draft saved.", exit);
|
|
14
|
+
toast("Project published.", { ...exit, variant: "success" });
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What the stylesheet does
|
|
18
|
+
|
|
19
|
+
- **Placement.** The region (`.kerf-toasts`) sits above the bottom edge,
|
|
20
|
+
centered, 16px from the viewport edge plus the bottom safe area, at most
|
|
21
|
+
480px wide. It never blocks the page; only the toasts take presses.
|
|
22
|
+
- **Stacking.** Toasts stack newest last with an 8px gap.
|
|
23
|
+
- **Surface.** Each toast (`.kerf-toast`) is the raised surface with a neutral
|
|
24
|
+
border, the rounded radius, and the large shadow.
|
|
25
|
+
- **Tones.** `variant: 'info' | 'success' | 'warning'` lays the brand,
|
|
26
|
+
success, or warning quiet fill over the opaque surface, with the matching
|
|
27
|
+
border and text.
|
|
28
|
+
- **StateBanner content.** A toast whose only content is a `StateBanner` takes
|
|
29
|
+
the banner's tone, border, and inset, and keeps its own elevation:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
toast(
|
|
33
|
+
() => <StateBanner title="Export Finished" detail="report.csv is ready." tone="success" />,
|
|
34
|
+
{ ...exit, duration: 6000 },
|
|
35
|
+
);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- **Motion.** A new toast rises and fades in on its own (no `enterClass`
|
|
39
|
+
needed). Pass `exitClass: 'kui-toast-exit'` with `exitDuration: 200` and it
|
|
40
|
+
sinks and fades out before removal. Under `prefers-reduced-motion` or
|
|
41
|
+
`:root[data-kui-effects="static"]` it only fades, or not at all.
|
|
42
|
+
- **Forced colors.** Toasts draw a `CanvasText` border on `Canvas`.
|
|
43
|
+
|
|
44
|
+
## Choices the app owns
|
|
45
|
+
|
|
46
|
+
- What to say and when: a toast confirms a completed action (saved, copied,
|
|
47
|
+
published) or reports a status. An error the person must act on, or a
|
|
48
|
+
decision, belongs in a `StateBanner` in the affected surface or a
|
|
49
|
+
`DialogSurface`, not a toast that disappears.
|
|
50
|
+
- `duration` (default 4000ms; `0` keeps it until you call `dismiss()`), and
|
|
51
|
+
`mode: 'replace'` to collapse a rapid sequence to the latest message.
|
|
52
|
+
- Top-edge stacking: pass your own region as `container` with
|
|
53
|
+
`data-placement="top"` (and the `kerf-toasts` class); it stacks from the top
|
|
54
|
+
safe area down.
|
|
55
|
+
- Stacking order above other layers: set `--kui-overlay-toast-z-index`
|
|
56
|
+
(default 1100).
|
|
57
|
+
|
|
58
|
+
The region is `aria-live="polite"` and each toast is `role="status"`, so a
|
|
59
|
+
screen reader announces it without moving focus. Never make a toast the only
|
|
60
|
+
path to an action.
|
|
61
|
+
|
|
62
|
+
Use this instead of `wa-toast` and `wa-toast-item`, which are Discouraged.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Tooltips
|
|
2
|
+
|
|
3
|
+
`kerfjs/overlay`'s `tooltip(anchor, content, options?)` shows a hover and
|
|
4
|
+
keyboard-focus tooltip beside any element and positions it there. The core
|
|
5
|
+
ships no CSS. Import `@kerfjs/ui/overlay-tooltip.css` once and every tooltip
|
|
6
|
+
takes the help tag's look:
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import "@kerfjs/ui/overlay-tooltip.css";
|
|
10
|
+
import { tooltip } from "kerfjs/overlay";
|
|
11
|
+
|
|
12
|
+
const stop = tooltip(
|
|
13
|
+
deployButton,
|
|
14
|
+
"Builds the current branch and deploys it to staging.",
|
|
15
|
+
{ exitClass: "kui-tooltip-exit", exitDuration: 100 },
|
|
16
|
+
);
|
|
17
|
+
// Later: stop() removes the listeners and any shown tooltip.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What the stylesheet does
|
|
21
|
+
|
|
22
|
+
- **Look.** The `.kerf-tooltip` wrapper takes the loud neutral fill with
|
|
23
|
+
on-loud text at 14px and a 3px radius: the same look as the help tags that
|
|
24
|
+
icon-only Kerf controls show.
|
|
25
|
+
- **Width.** It sizes to its text and wraps at 40 characters, staying 8px
|
|
26
|
+
inside a narrow viewport.
|
|
27
|
+
- **Pointer.** It never takes the pointer, so it cannot block the control
|
|
28
|
+
beneath it.
|
|
29
|
+
- **Motion.** It fades in on its own (no `enterClass` needed). Pass
|
|
30
|
+
`exitClass: 'kui-tooltip-exit'` with `exitDuration: 100` and it fades out as
|
|
31
|
+
it hides. Under `prefers-reduced-motion` or
|
|
32
|
+
`:root[data-kui-effects="static"]` it appears and leaves at once.
|
|
33
|
+
- **Forced colors.** It draws `CanvasText` on `Canvas`.
|
|
34
|
+
- **Stacking.** Set `--kui-overlay-tooltip-z-index` (default 1200) to change
|
|
35
|
+
its stacking order. With `native: true` it is in the top layer instead.
|
|
36
|
+
|
|
37
|
+
Structured content from a render function inherits the tooltip's colors, so
|
|
38
|
+
use plain inline markup (`<strong>`, a line break) rather than components that
|
|
39
|
+
set their own text color.
|
|
40
|
+
|
|
41
|
+
## When to use it
|
|
42
|
+
|
|
43
|
+
- A control or value needs a short explanation on hover and focus: a longer
|
|
44
|
+
description of an action, a chart point, or a truncated label.
|
|
45
|
+
- Not for icon-only Kerf controls: `@kerfjs/ui/help-tags-register` already
|
|
46
|
+
shows their help tag.
|
|
47
|
+
- Not for interactive content or the only copy of important information. Use an
|
|
48
|
+
`AnchoredSurface` the person opens, or visible text.
|
|
49
|
+
|
|
50
|
+
Keep the anchor's accessible name complete without the tooltip; the wrapper is
|
|
51
|
+
`role="tooltip"` and appears on keyboard focus as well as hover.
|
|
52
|
+
|
|
53
|
+
Use this instead of `wa-tooltip`, which is Discouraged.
|
package/docs/progress.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Progress
|
|
2
|
+
|
|
3
|
+
Two components show progress: `ProgressBar` (`@kerfjs/ui/progress-bar`), a
|
|
4
|
+
linear bar on the native `<progress>` element, and `ProgressRing`
|
|
5
|
+
(`@kerfjs/ui/progress-ring`), a compact circle for a line of text, a row, or a
|
|
6
|
+
toolbar. Both are determinate (`value` of `max`, default `max` 1) or, without a
|
|
7
|
+
`value`, indeterminate.
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { ProgressBar } from "@kerfjs/ui/progress-bar";
|
|
11
|
+
import { ProgressRing } from "@kerfjs/ui/progress-ring";
|
|
12
|
+
|
|
13
|
+
<ProgressBar
|
|
14
|
+
id="upload"
|
|
15
|
+
label="Uploading Files"
|
|
16
|
+
value={3}
|
|
17
|
+
max={12}
|
|
18
|
+
valueText="3 of 12 files"
|
|
19
|
+
showValue
|
|
20
|
+
/>;
|
|
21
|
+
<ProgressRing label="Claim Time Remaining" value={0.75} valueText="45 minutes left" />;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## ProgressBar
|
|
25
|
+
|
|
26
|
+
- **Name.** `label` is a visible line above the bar that also names it (with
|
|
27
|
+
an `id`, through `aria-labelledby`); `ariaLabel` names a bar without one.
|
|
28
|
+
- **Readout.** `showValue` puts the percentage, or `valueText`, at the end of
|
|
29
|
+
the label row. `valueText` also replaces the spoken percentage.
|
|
30
|
+
- **Indeterminate.** Omit `value` and a band sweeps across the track. It holds
|
|
31
|
+
still under `prefers-reduced-motion` or the static-effects switch.
|
|
32
|
+
- **Tone and size.** `tone` is `brand` (default), `success`, `warning`, or
|
|
33
|
+
`danger`; `size="compact"` is a 4px track for a row or table cell (default
|
|
34
|
+
6px).
|
|
35
|
+
|
|
36
|
+
The bar takes the full available width and the shared block-content inset (a
|
|
37
|
+
transparent 1px border and 8px padding), so its label sits on the same text
|
|
38
|
+
column as `Text`.
|
|
39
|
+
|
|
40
|
+
## ProgressRing
|
|
41
|
+
|
|
42
|
+
- **Name.** `label` is required: the ring is `role="progressbar"` with
|
|
43
|
+
`aria-valuenow` as a percentage, or `valueText`.
|
|
44
|
+
- **Size.** `small` (16px) for a line of text, `medium` (24px, the default)
|
|
45
|
+
beside an icon in a row or toolbar, `large` (40px) on its own. Its box is
|
|
46
|
+
exactly its diameter, so it aligns with icons of the same size.
|
|
47
|
+
- **Indeterminate.** Omit `value` and it spins a quarter arc, which holds still
|
|
48
|
+
under reduced motion.
|
|
49
|
+
- **Tone.** The same tones as the bar.
|
|
50
|
+
|
|
51
|
+
## Choosing
|
|
52
|
+
|
|
53
|
+
- A measurable task with room for a label row: `ProgressBar`.
|
|
54
|
+
- Compact progress beside an item: `ProgressRing`.
|
|
55
|
+
- A brief busy glyph inside a control: `LoadingSpinner`.
|
|
56
|
+
- App-wide progress with no home beside the work: `CornerStatus` or
|
|
57
|
+
`EdgeActivityIndicator`.
|
|
58
|
+
- A reading on a scale that is not progress (a rating, a level): a native
|
|
59
|
+
`<meter>`.
|
|
60
|
+
|
|
61
|
+
Forced colors draw the fills in `Highlight`. Use these instead of
|
|
62
|
+
`wa-progress-bar` and `wa-progress-ring`, which are Discouraged.
|
package/docs/recipes.md
CHANGED
|
@@ -77,27 +77,21 @@ controls relocate without changing focus order.
|
|
|
77
77
|
|
|
78
78
|
[Open the recipe](../ux-demo/?component=recipe-list-detail-dialog) · [TSX source](../ux-demo/recipes/list-detail-dialog.tsx)
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
roomy devices the list
|
|
82
|
-
|
|
83
|
-
carries its quiet default-size title
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
On compact devices the dialog becomes a full-screen sheet
|
|
96
|
-
with its own labeled header and footer actions, and `SplitView` becomes a
|
|
97
|
-
`NavStack` drill-down whose back control the application pops. The
|
|
98
|
-
application owns open state, selection, the pushed detail, dismissal policy,
|
|
99
|
-
and record actions. Do not put the primary title in a header spanning both
|
|
100
|
-
columns, rebuild the dialog, or reach into private shadow parts.
|
|
80
|
+
The recipe renders `ListDetailDialog` (`@kerfjs/ui/list-detail-dialog`). On
|
|
81
|
+
roomy devices the list and the detail are full-height columns, each a `Pane`
|
|
82
|
+
with its own top `Toolbar`, so the divider runs the dialog's full height. The
|
|
83
|
+
list column's toolbar carries its quiet default-size title; the detail
|
|
84
|
+
column's toolbar carries the dialog's primary extra-large title and the close
|
|
85
|
+
control, and its pinned footer carries the record actions. The surface draws
|
|
86
|
+
no header of its own, and its label still names the modal. Its explicit 16px
|
|
87
|
+
`viewportGutter` bounds the roomy modal to the dynamic viewport. On compact
|
|
88
|
+
devices the same component fills the screen and becomes a `NavStack`
|
|
89
|
+
drill-down whose back control the application pops; every view keeps the
|
|
90
|
+
close control and the detail keeps its pinned actions. The application owns
|
|
91
|
+
open state, selection, the pushed detail, dismissal policy, and record
|
|
92
|
+
actions. Do not compose `DialogSurface` around a `SplitView` by hand for this
|
|
93
|
+
layout: the surface header would span both columns and stop the divider below
|
|
94
|
+
it. See [ListDetailDialog](./list-detail-dialog.md).
|
|
101
95
|
|
|
102
96
|
## Composer Form
|
|
103
97
|
|