@public-ui/components 4.5.0-rc.6 → 4.5.0-rc.7
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/assets/kolicons/kolicons.eot +0 -0
- package/assets/kolicons/kolicons.ttf +0 -0
- package/assets/kolicons/kolicons.woff +0 -0
- package/assets/kolicons/kolicons.woff2 +0 -0
- package/assets/kolicons/style.css +6 -6
- package/custom-elements.json +1 -2
- package/dist/cjs/{Heading-Bck3PFpH.js → Heading-d30Feghg.js} +3 -3
- package/dist/cjs/{Heading-Bck3PFpH.js.map → Heading-d30Feghg.js.map} +1 -1
- package/dist/cjs/{api-BcNl2vZm.js → api-C8ZkIyx7.js} +8 -8
- package/dist/cjs/{api-BcNl2vZm.js.map → api-C8ZkIyx7.js.map} +1 -1
- package/dist/cjs/{api-LP3gnw7U.js → api-CRSjJs8P.js} +12 -12
- package/dist/cjs/{api-LP3gnw7U.js.map → api-CRSjJs8P.js.map} +1 -1
- package/dist/cjs/{app-globals-oR-jEiju.js → app-globals-B6wB2cXk.js} +4 -4
- package/dist/cjs/{app-globals-oR-jEiju.js.map → app-globals-B6wB2cXk.js.map} +1 -1
- package/dist/cjs/{base-CwXJywKD.js → base-C3MDHUog.js} +4 -4
- package/dist/cjs/{base-CwXJywKD.js.map → base-C3MDHUog.js.map} +1 -1
- package/dist/cjs/{base-DbfvhKRa.js → base-CyQnTxi6.js} +4 -4
- package/dist/cjs/{base-DbfvhKRa.js.map → base-CyQnTxi6.js.map} +1 -1
- package/dist/cjs/{base-DaK2F3pq.js → base-DgUZAiNc.js} +16 -16
- package/dist/cjs/{base-DaK2F3pq.js.map → base-DgUZAiNc.js.map} +1 -1
- package/dist/cjs/{base-BDGmLWVj.js → base-LmwA5h1k.js} +5 -5
- package/dist/cjs/{base-BDGmLWVj.js.map → base-LmwA5h1k.js.map} +1 -1
- package/dist/cjs/{base-web-component-C8MLLGxi.js → base-web-component-C-CwpVZw.js} +16 -9
- package/dist/cjs/base-web-component-C-CwpVZw.js.map +1 -0
- package/dist/cjs/{base-web-component-mmgXJMg0.js → base-web-component-d2k3Mc9P.js} +7 -7
- package/dist/cjs/{base-web-component-mmgXJMg0.js.map → base-web-component-d2k3Mc9P.js.map} +1 -1
- package/dist/cjs/{behavior-DWqrO2yi.js → behavior-C-BdOoSN.js} +3 -3
- package/dist/cjs/{behavior-DWqrO2yi.js.map → behavior-C-BdOoSN.js.map} +1 -1
- package/dist/cjs/{color-C9UZwMvC.js → color-CZiNkZFM.js} +3 -3
- package/dist/cjs/{color-C9UZwMvC.js.map → color-CZiNkZFM.js.map} +1 -1
- package/dist/cjs/{component-GfDUM7Um.js → component-B1kzY-J5.js} +4 -4
- package/dist/cjs/{component-GfDUM7Um.js.map → component-B1kzY-J5.js.map} +1 -1
- package/dist/cjs/{component-BT86Nj6R.js → component-B1zMXSkZ.js} +5 -5
- package/dist/cjs/{component-BT86Nj6R.js.map → component-B1zMXSkZ.js.map} +1 -1
- package/dist/cjs/{component-X_thXnkE.js → component-BHDnSaCH.js} +3 -3
- package/dist/cjs/{component-X_thXnkE.js.map → component-BHDnSaCH.js.map} +1 -1
- package/dist/cjs/{component-1NrcvQzp.js → component-BIz_gAas.js} +7 -7
- package/dist/cjs/{component-1NrcvQzp.js.map → component-BIz_gAas.js.map} +1 -1
- package/dist/cjs/{component-ZPvcKmPR.js → component-BairlFHi.js} +3 -3
- package/dist/cjs/{component-ZPvcKmPR.js.map → component-BairlFHi.js.map} +1 -1
- package/dist/cjs/{component-xIM903qi.js → component-CmyhDJ0r.js} +3 -3
- package/dist/cjs/{component-xIM903qi.js.map → component-CmyhDJ0r.js.map} +1 -1
- package/dist/cjs/{component-DNDfYzXZ.js → component-D2kI8uwF.js} +5 -5
- package/dist/cjs/{component-DNDfYzXZ.js.map → component-D2kI8uwF.js.map} +1 -1
- package/dist/cjs/{component-CmvG-auD.js → component-D33lYKYT.js} +3 -3
- package/dist/cjs/{component-CmvG-auD.js.map → component-D33lYKYT.js.map} +1 -1
- package/dist/cjs/{component-uHDfV5D8.js → component-DITtC2F9.js} +7 -7
- package/dist/cjs/{component-uHDfV5D8.js.map → component-DITtC2F9.js.map} +1 -1
- package/dist/cjs/{component-DuPEYx7z.js → component-DaAVlb5U.js} +4 -4
- package/dist/cjs/{component-DuPEYx7z.js.map → component-DaAVlb5U.js.map} +1 -1
- package/dist/cjs/{component-CtNPdMS0.js → component-KT0MKnL5.js} +5 -5
- package/dist/cjs/{component-CtNPdMS0.js.map → component-KT0MKnL5.js.map} +1 -1
- package/dist/cjs/{component-o3s7XplI.js → component-_jdRFw0Y.js} +4 -4
- package/dist/cjs/{component-o3s7XplI.js.map → component-_jdRFw0Y.js.map} +1 -1
- package/dist/cjs/{contrast-kLMuDQLl.js → contrast-CrL_sMV6.js} +3 -12
- package/dist/cjs/contrast-CrL_sMV6.js.map +1 -0
- package/dist/cjs/{dev.utils-BjrG4FNf.js → dev.utils-B1bWgxrQ.js} +3 -3
- package/dist/cjs/{dev.utils-BjrG4FNf.js.map → dev.utils-B1bWgxrQ.js.map} +1 -1
- package/dist/cjs/{devtools-D_afWgpU.js → devtools-DlcIXbRm.js} +4 -4
- package/dist/cjs/{devtools-D_afWgpU.js.map → devtools-DlcIXbRm.js.map} +1 -1
- package/dist/cjs/{field-control-DAHkvYr4.js → field-control-D0lryu2-.js} +8 -8
- package/dist/cjs/{field-control-DAHkvYr4.js.map → field-control-D0lryu2-.js.map} +1 -1
- package/dist/cjs/{group-DHYxVn2x.js → group-DIGY9sM6.js} +5 -5
- package/dist/cjs/{group-DHYxVn2x.js.map → group-DIGY9sM6.js.map} +1 -1
- package/dist/cjs/{index-BnEus4Y9.js → index-qcrGfEY6.js} +3 -3
- package/dist/cjs/{index-BnEus4Y9.js.map → index-qcrGfEY6.js.map} +1 -1
- package/dist/cjs/{input-eDaEE80n.js → input-BjNjOSo5.js} +5 -5
- package/dist/cjs/{input-eDaEE80n.js.map → input-BjNjOSo5.js.map} +1 -1
- package/dist/cjs/{input-container-Cye4qL9S.js → input-container-DghKiuUH.js} +7 -7
- package/dist/cjs/{input-container-Cye4qL9S.js.map → input-container-DghKiuUH.js.map} +1 -1
- package/dist/cjs/{item-C0yzJQUg.js → item-BKz8BDg2.js} +4 -4
- package/dist/cjs/{item-C0yzJQUg.js.map → item-BKz8BDg2.js.map} +1 -1
- package/dist/cjs/{item-wz0gBnmK.js → item-BMB6SaVm.js} +4 -4
- package/dist/cjs/{item-wz0gBnmK.js.map → item-BMB6SaVm.js.map} +1 -1
- package/dist/cjs/{item-Dflr47KV.js → item-CFojolE7.js} +8 -8
- package/dist/cjs/{item-Dflr47KV.js.map → item-CFojolE7.js.map} +1 -1
- package/dist/cjs/{item-BSdQbEav.js → item-DdnTb-BP.js} +3 -3
- package/dist/cjs/{item-BSdQbEav.js.map → item-DdnTb-BP.js.map} +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +2 -2
- package/dist/cjs/kol-accordion.cjs.entry.js +7 -7
- package/dist/cjs/kol-alert.cjs.entry.js +11 -11
- package/dist/cjs/kol-avatar.cjs.entry.js +3 -3
- package/dist/cjs/kol-badge.cjs.entry.js +12 -12
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +9 -9
- package/dist/cjs/kol-button-link.cjs.entry.js +10 -10
- package/dist/cjs/kol-button.cjs.entry.js +10 -10
- package/dist/cjs/kol-card.cjs.entry.js +11 -11
- package/dist/cjs/kol-click-button.cjs.entry.js +2 -2
- package/dist/cjs/kol-combobox.cjs.entry.js +18 -18
- package/dist/cjs/kol-details.cjs.entry.js +7 -7
- package/dist/cjs/kol-dialog.cjs.entry.js +13 -13
- package/dist/cjs/kol-drawer.cjs.entry.js +12 -12
- package/dist/cjs/kol-form.cjs.entry.js +12 -12
- package/dist/cjs/kol-heading.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +3 -3
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +17 -17
- package/dist/cjs/kol-input-color.cjs.entry.js +18 -18
- package/dist/cjs/kol-input-date.cjs.entry.js +18 -18
- package/dist/cjs/kol-input-email.cjs.entry.js +20 -20
- package/dist/cjs/kol-input-file.cjs.entry.js +17 -17
- package/dist/cjs/kol-input-number.cjs.entry.js +18 -18
- package/dist/cjs/kol-input-password.cjs.entry.js +22 -22
- package/dist/cjs/kol-input-password.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +17 -17
- package/dist/cjs/kol-input-range.cjs.entry.js +18 -18
- package/dist/cjs/kol-input-text.cjs.entry.js +20 -20
- package/dist/cjs/kol-kolibri.cjs.entry.js +2 -2
- package/dist/cjs/kol-link-button.cjs.entry.js +10 -10
- package/dist/cjs/kol-link.cjs.entry.js +10 -10
- package/dist/cjs/kol-meter.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +13 -13
- package/dist/cjs/kol-nav.cjs.entry.js +13 -13
- package/dist/cjs/kol-pagination.cjs.entry.js +18 -18
- package/dist/cjs/kol-popover-button.cjs.entry.js +12 -13
- package/dist/cjs/kol-popover-button.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +17 -17
- package/dist/cjs/kol-single-select.cjs.entry.js +18 -18
- package/dist/cjs/kol-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/kol-skip-nav.cjs.entry.js +9 -9
- package/dist/cjs/kol-spin.cjs.entry.js +3 -3
- package/dist/cjs/kol-split-button.cjs.entry.js +12 -12
- package/dist/cjs/kol-table-stateful.cjs.entry.js +25 -25
- package/dist/cjs/kol-table-stateless.cjs.entry.js +19 -19
- package/dist/cjs/kol-tabs.cjs.entry.js +9 -9
- package/dist/cjs/kol-textarea.cjs.entry.js +20 -20
- package/dist/cjs/kol-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +11 -11
- package/dist/cjs/kol-toolbar.cjs.entry.js +33 -14
- package/dist/cjs/kol-toolbar.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +4 -4
- package/dist/cjs/kol-tree-item.cjs.entry.js +9 -9
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +10 -10
- package/dist/cjs/kolibri.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{resolve-props-DOU1VJNL.js → resolve-props-pAyNSZMT.js} +3 -3
- package/dist/cjs/{resolve-props-DOU1VJNL.js.map → resolve-props-pAyNSZMT.js.map} +1 -1
- package/dist/cjs/{scroll-lock-C6dUw4on.js → scroll-lock-CNwobwd2.js} +3 -3
- package/dist/cjs/{scroll-lock-C6dUw4on.js.map → scroll-lock-CNwobwd2.js.map} +1 -1
- package/dist/cjs/{suggestions-0hcm13gT.js → suggestions-D4TMMZSv.js} +4 -4
- package/dist/cjs/{suggestions-0hcm13gT.js.map → suggestions-D4TMMZSv.js.map} +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/cjs/{toggle-handler-kOflG5om.js → toggle-handler-mIB8gvse.js} +5 -5
- package/dist/cjs/{toggle-handler-kOflG5om.js.map → toggle-handler-mIB8gvse.js.map} +1 -1
- package/dist/collection/components/accordion/style.css +2 -2
- package/dist/collection/components/alert/style.css +2 -2
- package/dist/collection/components/badge/style.css +2 -2
- package/dist/collection/components/breadcrumb/style.css +2 -2
- package/dist/collection/components/button/style.css +2 -2
- package/dist/collection/components/button-link/style.css +2 -2
- package/dist/collection/components/card/style.css +2 -2
- package/dist/collection/components/combobox/style.css +2 -2
- package/dist/collection/components/details/style.css +2 -2
- package/dist/collection/components/dialog/style.css +2 -2
- package/dist/collection/components/drawer/style.css +2 -2
- package/dist/collection/components/form/style.css +2 -2
- package/dist/collection/components/icon/style.css +2 -2
- package/dist/collection/components/input-checkbox/style.css +2 -2
- package/dist/collection/components/input-color/style.css +2 -2
- package/dist/collection/components/input-date/style.css +2 -2
- package/dist/collection/components/input-email/style.css +2 -2
- package/dist/collection/components/input-file/style.css +2 -2
- package/dist/collection/components/input-number/style.css +2 -2
- package/dist/collection/components/input-password/component.js +2 -2
- package/dist/collection/components/input-password/component.js.map +1 -1
- package/dist/collection/components/input-password/style.css +2 -2
- package/dist/collection/components/input-radio/style.css +2 -2
- package/dist/collection/components/input-range/style.css +2 -2
- package/dist/collection/components/input-text/style.css +2 -2
- package/dist/collection/components/link/style.css +2 -2
- package/dist/collection/components/link-button/style.css +2 -2
- package/dist/collection/components/modal/style.css +2 -2
- package/dist/collection/components/nav/style.css +2 -2
- package/dist/collection/components/pagination/style.css +2 -2
- package/dist/collection/components/popover-button/component.js +2 -4
- package/dist/collection/components/popover-button/component.js.map +1 -1
- package/dist/collection/components/popover-button/style.css +2 -2
- package/dist/collection/components/select/style.css +2 -2
- package/dist/collection/components/single-select/style.css +2 -2
- package/dist/collection/components/skip-nav/style.css +2 -2
- package/dist/collection/components/split-button/style.css +2 -2
- package/dist/collection/components/table-stateful/style.css +2 -2
- package/dist/collection/components/table-stateless/style.css +2 -2
- package/dist/collection/components/tabs/style.css +2 -2
- package/dist/collection/components/textarea/component.js +3 -3
- package/dist/collection/components/textarea/component.js.map +1 -1
- package/dist/collection/components/textarea/style.css +2 -2
- package/dist/collection/components/toaster/style.css +2 -2
- package/dist/collection/components/toolbar/component.js +1 -1
- package/dist/collection/components/toolbar/component.js.map +1 -1
- package/dist/collection/components/toolbar/style.css +9 -3
- package/dist/collection/components/tree-item/style.css +2 -2
- package/dist/collection/components/version/style.css +2 -2
- package/dist/collection/internal/functional-components/form-field/select-value.js +3 -1
- package/dist/collection/internal/functional-components/form-field/select-value.js.map +1 -1
- package/dist/collection/internal/functional-components/form-field/select.js +8 -3
- package/dist/collection/internal/functional-components/form-field/select.js.map +1 -1
- package/dist/collection/internal/functional-components/form-field/select.test.js +88 -0
- package/dist/collection/internal/functional-components/form-field/select.test.js.map +1 -1
- package/dist/collection/internal/functional-components/form-field/textarea.js.map +1 -1
- package/dist/collection/internal/functional-components/toolbar/api.js.map +1 -1
- package/dist/collection/internal/functional-components/toolbar/component.js +1 -1
- package/dist/collection/internal/functional-components/toolbar/component.js.map +1 -1
- package/dist/collection/internal/functional-components/toolbar/item.js +20 -1
- package/dist/collection/internal/functional-components/toolbar/item.js.map +1 -1
- package/dist/collection/schema/props/toolbar-items.js.map +1 -1
- package/dist/collection/schema/utils/contrast.js +2 -10
- package/dist/collection/schema/utils/contrast.js.map +1 -1
- package/dist/components/base-web-component4.js +11 -4
- package/dist/components/base-web-component4.js.map +1 -1
- package/dist/components/contrast.js +1 -10
- package/dist/components/contrast.js.map +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-alert.js +1 -1
- package/dist/components/kol-badge.js +1 -1
- package/dist/components/kol-breadcrumb.js +1 -1
- package/dist/components/kol-button-link.js +1 -1
- package/dist/components/kol-button.js +1 -1
- package/dist/components/kol-card.js +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-dialog.js +1 -1
- package/dist/components/kol-drawer.js +1 -1
- package/dist/components/kol-form.js +1 -1
- package/dist/components/kol-icon.js +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-password.js +3 -3
- package/dist/components/kol-input-password.js.map +1 -1
- package/dist/components/kol-input-radio.js +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-pagination.js +1 -1
- package/dist/components/kol-popover-button.js +2 -3
- package/dist/components/kol-popover-button.js.map +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-single-select.js +1 -1
- package/dist/components/kol-skip-nav.js +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-textarea.js +4 -4
- package/dist/components/kol-textarea.js.map +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toolbar.js +23 -4
- package/dist/components/kol-toolbar.js.map +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/components/kol-version.js +1 -1
- package/dist/esm/{Heading-DXl16qig.js → Heading-NHB1reiQ.js} +3 -3
- package/dist/esm/{Heading-DXl16qig.js.map → Heading-NHB1reiQ.js.map} +1 -1
- package/dist/esm/{api-C8TfIYlY.js → api-BAEPnyL7.js} +12 -12
- package/dist/{kolibri/api-C8TfIYlY.js.map → esm/api-BAEPnyL7.js.map} +1 -1
- package/dist/esm/{api-BA-AFr5H.js → api-CagcODCX.js} +8 -8
- package/dist/{kolibri/api-BA-AFr5H.js.map → esm/api-CagcODCX.js.map} +1 -1
- package/dist/esm/{app-globals-lFdBwFG2.js → app-globals-CwlOH1sO.js} +4 -4
- package/dist/esm/{app-globals-lFdBwFG2.js.map → app-globals-CwlOH1sO.js.map} +1 -1
- package/dist/esm/{base-BpqjfzG1.js → base-BFU17cMm.js} +16 -16
- package/dist/{kolibri/base-BpqjfzG1.js.map → esm/base-BFU17cMm.js.map} +1 -1
- package/dist/esm/{base-D8GcFhvD.js → base-BpKxLJ6r.js} +4 -4
- package/dist/{kolibri/base-D8GcFhvD.js.map → esm/base-BpKxLJ6r.js.map} +1 -1
- package/dist/esm/{base-DiSQvfGU.js → base-Cm_c8klt.js} +5 -5
- package/dist/esm/{base-DiSQvfGU.js.map → base-Cm_c8klt.js.map} +1 -1
- package/dist/esm/{base-B5F8ROuQ.js → base-DitGpYOV.js} +4 -4
- package/dist/{kolibri/base-B5F8ROuQ.js.map → esm/base-DitGpYOV.js.map} +1 -1
- package/dist/esm/{base-web-component-CkaKv7O0.js → base-web-component-6J5sCsnZ.js} +16 -9
- package/dist/esm/base-web-component-6J5sCsnZ.js.map +1 -0
- package/dist/esm/{base-web-component-BozlJoj7.js → base-web-component-BFCVvyYG.js} +7 -7
- package/dist/esm/{base-web-component-BozlJoj7.js.map → base-web-component-BFCVvyYG.js.map} +1 -1
- package/dist/esm/{behavior-BuNqmjz8.js → behavior-CH_2MMuX.js} +3 -3
- package/dist/esm/{behavior-BuNqmjz8.js.map → behavior-CH_2MMuX.js.map} +1 -1
- package/dist/esm/{color-Du3Ft0XV.js → color-QYuhlVFz.js} +3 -3
- package/dist/esm/{color-Du3Ft0XV.js.map → color-QYuhlVFz.js.map} +1 -1
- package/dist/esm/{component-C9DexidK.js → component-BF8FPuIW.js} +3 -3
- package/dist/esm/{component-C9DexidK.js.map → component-BF8FPuIW.js.map} +1 -1
- package/dist/esm/{component-Da5dJMKj.js → component-Ba4gjLBG.js} +5 -5
- package/dist/{kolibri/component-Da5dJMKj.js.map → esm/component-Ba4gjLBG.js.map} +1 -1
- package/dist/esm/{component-BjH8s4-t.js → component-BpOMe842.js} +3 -3
- package/dist/{kolibri/component-BjH8s4-t.js.map → esm/component-BpOMe842.js.map} +1 -1
- package/dist/esm/{component-BxKN0JbT.js → component-C3sXiwbS.js} +3 -3
- package/dist/esm/{component-BxKN0JbT.js.map → component-C3sXiwbS.js.map} +1 -1
- package/dist/esm/{component-Bd7PXqOG.js → component-C5BFsKau.js} +5 -5
- package/dist/esm/{component-Bd7PXqOG.js.map → component-C5BFsKau.js.map} +1 -1
- package/dist/esm/{component-C3aqLFK2.js → component-CBpYh2q-.js} +7 -7
- package/dist/esm/{component-C3aqLFK2.js.map → component-CBpYh2q-.js.map} +1 -1
- package/dist/esm/{component-D_58mw87.js → component-C_d54ujF.js} +4 -4
- package/dist/{kolibri/component-D_58mw87.js.map → esm/component-C_d54ujF.js.map} +1 -1
- package/dist/esm/{component-xrrwVuiI.js → component-CvCfEqSE.js} +4 -4
- package/dist/esm/{component-xrrwVuiI.js.map → component-CvCfEqSE.js.map} +1 -1
- package/dist/esm/{component-CWGVLsSH.js → component-DZbJLUju.js} +4 -4
- package/dist/{kolibri/component-CWGVLsSH.js.map → esm/component-DZbJLUju.js.map} +1 -1
- package/dist/esm/{component-BKOep2WQ.js → component-Dg6TIbeY.js} +5 -5
- package/dist/{kolibri/component-BKOep2WQ.js.map → esm/component-Dg6TIbeY.js.map} +1 -1
- package/dist/esm/{component-DD5QqT5m.js → component-Do9rjnte.js} +7 -7
- package/dist/{kolibri/component-DD5QqT5m.js.map → esm/component-Do9rjnte.js.map} +1 -1
- package/dist/esm/{component-De6Do_gt.js → component-DzoBgfR4.js} +3 -3
- package/dist/esm/{component-De6Do_gt.js.map → component-DzoBgfR4.js.map} +1 -1
- package/dist/esm/{contrast-BKAJJL2K.js → contrast-DMN9saXP.js} +3 -12
- package/dist/esm/contrast-DMN9saXP.js.map +1 -0
- package/dist/esm/{dev.utils-CYtV9X0K.js → dev.utils-CJMVCYWh.js} +3 -3
- package/dist/esm/{dev.utils-CYtV9X0K.js.map → dev.utils-CJMVCYWh.js.map} +1 -1
- package/dist/esm/{devtools-B0qRaQdp.js → devtools-rRHULXVr.js} +4 -4
- package/dist/{kolibri/devtools-B0qRaQdp.js.map → esm/devtools-rRHULXVr.js.map} +1 -1
- package/dist/esm/{field-control-C5hjw2Rb.js → field-control-DXxCMXvx.js} +8 -8
- package/dist/{kolibri/field-control-C5hjw2Rb.js.map → esm/field-control-DXxCMXvx.js.map} +1 -1
- package/dist/esm/{group-2hP8qbvk.js → group-CI4sSgiu.js} +5 -5
- package/dist/esm/{group-2hP8qbvk.js.map → group-CI4sSgiu.js.map} +1 -1
- package/dist/esm/{index-DsCeQ9Ys.js → index-DQdQBwMc.js} +3 -3
- package/dist/{kolibri/index-DsCeQ9Ys.js.map → esm/index-DQdQBwMc.js.map} +1 -1
- package/dist/esm/{input-Dp5NBocQ.js → input-CDtJZ2sy.js} +5 -5
- package/dist/esm/{input-Dp5NBocQ.js.map → input-CDtJZ2sy.js.map} +1 -1
- package/dist/esm/{input-container-QA8-0_0p.js → input-container-DROwwh7_.js} +7 -7
- package/dist/esm/{input-container-QA8-0_0p.js.map → input-container-DROwwh7_.js.map} +1 -1
- package/dist/esm/{item-CaxJw3ad.js → item-C6p5wW-z.js} +4 -4
- package/dist/esm/{item-CaxJw3ad.js.map → item-C6p5wW-z.js.map} +1 -1
- package/dist/esm/{item-CXyolUj2.js → item-CHP-bw8Q.js} +4 -4
- package/dist/{kolibri/item-CXyolUj2.js.map → esm/item-CHP-bw8Q.js.map} +1 -1
- package/dist/esm/{item-DY0fVVnj.js → item-Cbi_ZY6o.js} +3 -3
- package/dist/esm/{item-DY0fVVnj.js.map → item-Cbi_ZY6o.js.map} +1 -1
- package/dist/esm/{item-BIjqEkyy.js → item-ZjrNIhfW.js} +8 -8
- package/dist/{kolibri/item-BIjqEkyy.js.map → esm/item-ZjrNIhfW.js.map} +1 -1
- package/dist/esm/kol-abbr.entry.js +2 -2
- package/dist/esm/kol-accordion.entry.js +7 -7
- package/dist/esm/kol-alert.entry.js +11 -11
- package/dist/esm/kol-avatar.entry.js +3 -3
- package/dist/esm/kol-badge.entry.js +12 -12
- package/dist/esm/kol-breadcrumb.entry.js +9 -9
- package/dist/esm/kol-button-link.entry.js +10 -10
- package/dist/esm/kol-button.entry.js +10 -10
- package/dist/esm/kol-card.entry.js +11 -11
- package/dist/esm/kol-click-button.entry.js +2 -2
- package/dist/esm/kol-combobox.entry.js +18 -18
- package/dist/esm/kol-details.entry.js +7 -7
- package/dist/esm/kol-dialog.entry.js +13 -13
- package/dist/esm/kol-drawer.entry.js +12 -12
- package/dist/esm/kol-form.entry.js +12 -12
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +3 -3
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +17 -17
- package/dist/esm/kol-input-color.entry.js +18 -18
- package/dist/esm/kol-input-date.entry.js +18 -18
- package/dist/esm/kol-input-email.entry.js +20 -20
- package/dist/esm/kol-input-file.entry.js +17 -17
- package/dist/esm/kol-input-number.entry.js +18 -18
- package/dist/esm/kol-input-password.entry.js +22 -22
- package/dist/esm/kol-input-password.entry.js.map +1 -1
- package/dist/esm/kol-input-radio.entry.js +17 -17
- package/dist/esm/kol-input-range.entry.js +18 -18
- package/dist/esm/kol-input-text.entry.js +20 -20
- package/dist/esm/kol-kolibri.entry.js +2 -2
- package/dist/esm/kol-link-button.entry.js +10 -10
- package/dist/esm/kol-link.entry.js +10 -10
- package/dist/esm/kol-meter.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +13 -13
- package/dist/esm/kol-nav.entry.js +13 -13
- package/dist/esm/kol-pagination.entry.js +18 -18
- package/dist/esm/kol-popover-button.entry.js +12 -13
- package/dist/esm/kol-popover-button.entry.js.map +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +17 -17
- package/dist/esm/kol-single-select.entry.js +18 -18
- package/dist/esm/kol-skeleton.entry.js +2 -2
- package/dist/esm/kol-skip-nav.entry.js +9 -9
- package/dist/esm/kol-spin.entry.js +3 -3
- package/dist/esm/kol-split-button.entry.js +12 -12
- package/dist/esm/kol-table-stateful.entry.js +25 -25
- package/dist/esm/kol-table-stateless.entry.js +19 -19
- package/dist/esm/kol-tabs.entry.js +9 -9
- package/dist/esm/kol-textarea.entry.js +20 -20
- package/dist/esm/kol-textarea.entry.js.map +1 -1
- package/dist/esm/kol-toast-container.entry.js +11 -11
- package/dist/esm/kol-toolbar.entry.js +33 -14
- package/dist/esm/kol-toolbar.entry.js.map +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +4 -4
- package/dist/esm/kol-tree-item.entry.js +9 -9
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +10 -10
- package/dist/esm/kolibri.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{resolve-props-DJxTzf-G.js → resolve-props-CjBvvXId.js} +3 -3
- package/dist/{kolibri/resolve-props-DJxTzf-G.js.map → esm/resolve-props-CjBvvXId.js.map} +1 -1
- package/dist/esm/{scroll-lock-BN6ZnBdc.js → scroll-lock-6SV-XFXR.js} +3 -3
- package/dist/{kolibri/scroll-lock-BN6ZnBdc.js.map → esm/scroll-lock-6SV-XFXR.js.map} +1 -1
- package/dist/esm/{suggestions-DlpHvEGv.js → suggestions-BYMmW1aV.js} +4 -4
- package/dist/esm/{suggestions-DlpHvEGv.js.map → suggestions-BYMmW1aV.js.map} +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/esm/{toggle-handler-Xex3lIll.js → toggle-handler-D-yalcds.js} +5 -5
- package/dist/{kolibri/toggle-handler-Xex3lIll.js.map → esm/toggle-handler-D-yalcds.js.map} +1 -1
- package/dist/kolibri/{Heading-DXl16qig.js → Heading-NHB1reiQ.js} +2 -2
- package/dist/kolibri/{Heading-DXl16qig.js.map → Heading-NHB1reiQ.js.map} +1 -1
- package/dist/kolibri/api-BAEPnyL7.js +5 -0
- package/dist/{esm/api-C8TfIYlY.js.map → kolibri/api-BAEPnyL7.js.map} +1 -1
- package/dist/kolibri/api-CagcODCX.js +5 -0
- package/dist/{esm/api-BA-AFr5H.js.map → kolibri/api-CagcODCX.js.map} +1 -1
- package/dist/kolibri/app-globals-CwlOH1sO.js +5 -0
- package/dist/kolibri/{app-globals-lFdBwFG2.js.map → app-globals-CwlOH1sO.js.map} +1 -1
- package/dist/kolibri/base-BFU17cMm.js +5 -0
- package/dist/{esm/base-BpqjfzG1.js.map → kolibri/base-BFU17cMm.js.map} +1 -1
- package/dist/kolibri/{base-D8GcFhvD.js → base-BpKxLJ6r.js} +2 -2
- package/dist/{esm/base-D8GcFhvD.js.map → kolibri/base-BpKxLJ6r.js.map} +1 -1
- package/dist/kolibri/{base-DiSQvfGU.js → base-Cm_c8klt.js} +2 -2
- package/dist/kolibri/{base-DiSQvfGU.js.map → base-Cm_c8klt.js.map} +1 -1
- package/dist/kolibri/{base-B5F8ROuQ.js → base-DitGpYOV.js} +2 -2
- package/dist/{esm/base-B5F8ROuQ.js.map → kolibri/base-DitGpYOV.js.map} +1 -1
- package/dist/kolibri/base-web-component-6J5sCsnZ.js +5 -0
- package/dist/kolibri/base-web-component-6J5sCsnZ.js.map +1 -0
- package/dist/kolibri/{base-web-component-BozlJoj7.js → base-web-component-BFCVvyYG.js} +2 -2
- package/dist/kolibri/{base-web-component-BozlJoj7.js.map → base-web-component-BFCVvyYG.js.map} +1 -1
- package/dist/kolibri/{behavior-BuNqmjz8.js → behavior-CH_2MMuX.js} +2 -2
- package/dist/kolibri/{behavior-BuNqmjz8.js.map → behavior-CH_2MMuX.js.map} +1 -1
- package/dist/kolibri/{color-Du3Ft0XV.js → color-QYuhlVFz.js} +2 -2
- package/dist/kolibri/{color-Du3Ft0XV.js.map → color-QYuhlVFz.js.map} +1 -1
- package/dist/kolibri/{component-C9DexidK.js → component-BF8FPuIW.js} +2 -2
- package/dist/kolibri/{component-C9DexidK.js.map → component-BF8FPuIW.js.map} +1 -1
- package/dist/kolibri/component-Ba4gjLBG.js +5 -0
- package/dist/{esm/component-Da5dJMKj.js.map → kolibri/component-Ba4gjLBG.js.map} +1 -1
- package/dist/kolibri/{component-BjH8s4-t.js → component-BpOMe842.js} +2 -2
- package/dist/{esm/component-BjH8s4-t.js.map → kolibri/component-BpOMe842.js.map} +1 -1
- package/dist/kolibri/component-C3sXiwbS.js +5 -0
- package/dist/kolibri/{component-BxKN0JbT.js.map → component-C3sXiwbS.js.map} +1 -1
- package/dist/kolibri/component-C5BFsKau.js +5 -0
- package/dist/kolibri/{component-Bd7PXqOG.js.map → component-C5BFsKau.js.map} +1 -1
- package/dist/kolibri/component-CBpYh2q-.js +5 -0
- package/dist/kolibri/{component-C3aqLFK2.js.map → component-CBpYh2q-.js.map} +1 -1
- package/dist/kolibri/{component-D_58mw87.js → component-C_d54ujF.js} +2 -2
- package/dist/{esm/component-D_58mw87.js.map → kolibri/component-C_d54ujF.js.map} +1 -1
- package/dist/kolibri/component-CvCfEqSE.js +5 -0
- package/dist/kolibri/{component-xrrwVuiI.js.map → component-CvCfEqSE.js.map} +1 -1
- package/dist/kolibri/{component-CWGVLsSH.js → component-DZbJLUju.js} +2 -2
- package/dist/{esm/component-CWGVLsSH.js.map → kolibri/component-DZbJLUju.js.map} +1 -1
- package/dist/kolibri/{component-BKOep2WQ.js → component-Dg6TIbeY.js} +2 -2
- package/dist/{esm/component-BKOep2WQ.js.map → kolibri/component-Dg6TIbeY.js.map} +1 -1
- package/dist/kolibri/{component-DD5QqT5m.js → component-Do9rjnte.js} +2 -2
- package/dist/{esm/component-DD5QqT5m.js.map → kolibri/component-Do9rjnte.js.map} +1 -1
- package/dist/kolibri/component-DzoBgfR4.js +5 -0
- package/dist/kolibri/{component-De6Do_gt.js.map → component-DzoBgfR4.js.map} +1 -1
- package/dist/kolibri/contrast-DMN9saXP.js +5 -0
- package/dist/kolibri/contrast-DMN9saXP.js.map +1 -0
- package/dist/kolibri/{dev.utils-CYtV9X0K.js → dev.utils-CJMVCYWh.js} +2 -2
- package/dist/kolibri/{dev.utils-CYtV9X0K.js.map → dev.utils-CJMVCYWh.js.map} +1 -1
- package/dist/kolibri/{devtools-B0qRaQdp.js → devtools-rRHULXVr.js} +2 -2
- package/dist/{esm/devtools-B0qRaQdp.js.map → kolibri/devtools-rRHULXVr.js.map} +1 -1
- package/dist/kolibri/field-control-DXxCMXvx.js +5 -0
- package/dist/{esm/field-control-C5hjw2Rb.js.map → kolibri/field-control-DXxCMXvx.js.map} +1 -1
- package/dist/kolibri/{group-2hP8qbvk.js → group-CI4sSgiu.js} +2 -2
- package/dist/kolibri/{group-2hP8qbvk.js.map → group-CI4sSgiu.js.map} +1 -1
- package/dist/kolibri/{index-DsCeQ9Ys.js → index-DQdQBwMc.js} +2 -2
- package/dist/{esm/index-DsCeQ9Ys.js.map → kolibri/index-DQdQBwMc.js.map} +1 -1
- package/dist/kolibri/{input-Dp5NBocQ.js → input-CDtJZ2sy.js} +2 -2
- package/dist/kolibri/{input-Dp5NBocQ.js.map → input-CDtJZ2sy.js.map} +1 -1
- package/dist/kolibri/input-container-DROwwh7_.js +5 -0
- package/dist/kolibri/{input-container-QA8-0_0p.js.map → input-container-DROwwh7_.js.map} +1 -1
- package/dist/kolibri/item-C6p5wW-z.js +5 -0
- package/dist/kolibri/{item-CaxJw3ad.js.map → item-C6p5wW-z.js.map} +1 -1
- package/dist/kolibri/{item-CXyolUj2.js → item-CHP-bw8Q.js} +2 -2
- package/dist/{esm/item-CXyolUj2.js.map → kolibri/item-CHP-bw8Q.js.map} +1 -1
- package/dist/kolibri/item-Cbi_ZY6o.js +5 -0
- package/dist/kolibri/{item-DY0fVVnj.js.map → item-Cbi_ZY6o.js.map} +1 -1
- package/dist/kolibri/{item-BIjqEkyy.js → item-ZjrNIhfW.js} +2 -2
- package/dist/{esm/item-BIjqEkyy.js.map → kolibri/item-ZjrNIhfW.js.map} +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-click-button.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js.map +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-dialog.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js.map +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-meter.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-popover-button.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-skeleton.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js.map +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.js.map +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js.map +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/resolve-props-CjBvvXId.js +5 -0
- package/dist/{esm/resolve-props-DJxTzf-G.js.map → kolibri/resolve-props-CjBvvXId.js.map} +1 -1
- package/dist/kolibri/{scroll-lock-BN6ZnBdc.js → scroll-lock-6SV-XFXR.js} +2 -2
- package/dist/{esm/scroll-lock-BN6ZnBdc.js.map → kolibri/scroll-lock-6SV-XFXR.js.map} +1 -1
- package/dist/kolibri/suggestions-BYMmW1aV.js +5 -0
- package/dist/kolibri/{suggestions-DlpHvEGv.js.map → suggestions-BYMmW1aV.js.map} +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/kolibri/toggle-handler-D-yalcds.js +5 -0
- package/dist/{esm/toggle-handler-Xex3lIll.js.map → kolibri/toggle-handler-D-yalcds.js.map} +1 -1
- package/dist/types/components/toolbar/component.d.ts +2 -2
- package/dist/types/components.d.ts +0 -2
- package/dist/types/internal/functional-components/form-field/textarea.d.ts +1 -0
- package/dist/types/internal/functional-components/toolbar/api.d.ts +2 -2
- package/dist/types/internal/functional-components/toolbar/item.d.ts +5 -2
- package/dist/types/schema/props/toolbar-items.d.ts +3 -1
- package/doc/popover-button.md +1 -1
- package/package.json +3 -3
- package/dist/cjs/base-web-component-C8MLLGxi.js.map +0 -1
- package/dist/cjs/contrast-kLMuDQLl.js.map +0 -1
- package/dist/esm/base-web-component-CkaKv7O0.js.map +0 -1
- package/dist/esm/contrast-BKAJJL2K.js.map +0 -1
- package/dist/kolibri/api-BA-AFr5H.js +0 -5
- package/dist/kolibri/api-C8TfIYlY.js +0 -5
- package/dist/kolibri/app-globals-lFdBwFG2.js +0 -5
- package/dist/kolibri/base-BpqjfzG1.js +0 -5
- package/dist/kolibri/base-web-component-CkaKv7O0.js +0 -5
- package/dist/kolibri/base-web-component-CkaKv7O0.js.map +0 -1
- package/dist/kolibri/component-Bd7PXqOG.js +0 -5
- package/dist/kolibri/component-BxKN0JbT.js +0 -5
- package/dist/kolibri/component-C3aqLFK2.js +0 -5
- package/dist/kolibri/component-Da5dJMKj.js +0 -5
- package/dist/kolibri/component-De6Do_gt.js +0 -5
- package/dist/kolibri/component-xrrwVuiI.js +0 -5
- package/dist/kolibri/contrast-BKAJJL2K.js +0 -5
- package/dist/kolibri/contrast-BKAJJL2K.js.map +0 -1
- package/dist/kolibri/field-control-C5hjw2Rb.js +0 -5
- package/dist/kolibri/input-container-QA8-0_0p.js +0 -5
- package/dist/kolibri/item-CaxJw3ad.js +0 -5
- package/dist/kolibri/item-DY0fVVnj.js +0 -5
- package/dist/kolibri/resolve-props-DJxTzf-G.js +0 -5
- package/dist/kolibri/suggestions-DlpHvEGv.js +0 -5
- package/dist/kolibri/toggle-handler-Xex3lIll.js +0 -5
|
@@ -7,12 +7,12 @@ import { a as createCallbacksPropDefinition } from './base-web-component-3R1Dy3Q
|
|
|
7
7
|
import { d as disabledProp } from './disabled-CdyeAMlW.js';
|
|
8
8
|
import { l as labelProp } from './label-c9P7yC4V.js';
|
|
9
9
|
import { o as openProp } from './open-BK72Y-b2.js';
|
|
10
|
-
import { h } from './index-
|
|
11
|
-
import { K as KolHeadingFc } from './Heading-
|
|
10
|
+
import { h } from './index-DQdQBwMc.js';
|
|
11
|
+
import { K as KolHeadingFc } from './Heading-NHB1reiQ.js';
|
|
12
12
|
import { c as clsx } from './clsx-COFh-Vc8.js';
|
|
13
13
|
import { p as preventFocus } from './element-interaction-Cy9tx3Sx.js';
|
|
14
14
|
import { g as getBlockBem } from './block-bem-DxQXsOt3.js';
|
|
15
|
-
import { S as SpanFC } from './component-
|
|
15
|
+
import { S as SpanFC } from './component-C_d54ujF.js';
|
|
16
16
|
import { d as dispatchDomEvent, K as KolEvent } from './events-CRHxtwup.js';
|
|
17
17
|
|
|
18
18
|
const collapsibleCallbacksProp = createCallbacksPropDefinition();
|
|
@@ -97,6 +97,6 @@ function createCollapsibleToggleHandler({ getHost, getOn, isDisabled, isOpen, se
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export { CollapsibleFC as C, DEFAULT_COLLAPSIBLE_TRANSITION_MS as D, createCollapsibleToggleHandler as a, collapsibleCallbacksProp as b, createCollapsibleOpenAnimation as c, collapsiblePropsConfig as d };
|
|
100
|
-
//# sourceMappingURL=toggle-handler-
|
|
100
|
+
//# sourceMappingURL=toggle-handler-D-yalcds.js.map
|
|
101
101
|
|
|
102
|
-
//# sourceMappingURL=toggle-handler-
|
|
102
|
+
//# sourceMappingURL=toggle-handler-D-yalcds.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-handler-Xex3lIll.js","sources":["src/internal/props/collapsible-callbacks.ts","src/internal/functional-components/collapsible/api.tsx","src/internal/functional-components/collapsible/component.tsx","src/internal/functional-components/collapsible/open-animation.ts","src/internal/functional-components/collapsible/toggle-handler.ts"],"sourcesContent":["import type { CollapsibleCallbacksPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createCallbacksPropDefinition } from './helpers/factory';\n\nexport type CollapsibleCallbacksProp = SimpleProp<'on', CollapsibleCallbacksPropType<boolean>>;\n\n/**\n * Callbacks prop shared by `kol-accordion` and `kol-details` — both expose the same\n * `onClick`/`onToggle` pair on their heading toggle button.\n */\nexport const collapsibleCallbacksProp = createCallbacksPropDefinition<CollapsibleCallbacksPropType<boolean>>();\n","import type { IconsPropType, KolFocusOptions } from '../../../schema';\nimport { collapsibleCallbacksProp, disabledProp, labelProp, levelProp, openProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props configuration shared by the collapsible components (`kol-accordion`, `kol-details`).\n *\n * `label` is the only required prop. All others are optional.\n *\n * Notes on prop choices:\n * - `labelProp` (not `labelWithExpertSlotProp`): the label labels the toggle button and has no\n * expert slot. It keeps the shared 2–80 character validation and accessibility hints.\n * - `openProp`: the toggle state. The public `_open` prop stays mutable and reflected on the web\n * component; the render prop mirrors it for the functional component.\n */\nexport const collapsiblePropsConfig = {\n\toptional: [collapsibleCallbacksProp, disabledProp, levelProp, openProp],\n\trequired: [labelProp],\n} as const satisfies PropsConfigShape;\n\nexport type CollapsibleApi = ApiFromConfig<\n\ttypeof collapsiblePropsConfig,\n\t{\n\t\tCallbacks: {\n\t\t\t/**\n\t\t\t * Click handler bound to the `<summary>` element. Implemented by the web component,\n\t\t\t * which suppresses the user agent's own toggle (so the collapse can be animated), flips\n\t\t\t * the mutable `_open` prop and — delayed so the reflected attribute is already updated —\n\t\t\t * dispatches the custom `KolEvent.click`/`KolEvent.toggle` events on the host element\n\t\t\t * and invokes the consumer's `onClick`/`onToggle` callbacks.\n\t\t\t */\n\t\t\ttoggle: (event: MouseEvent) => void;\n\t\t};\n\t\tMethods: {\n\t\t\tclick: () => void;\n\t\t\tfocus: (options?: KolFocusOptions) => void;\n\t\t};\n\t\tRefs: {\n\t\t\t/** The `<summary>` element — the disclosure control `focus()` and `click()` delegate to. */\n\t\t\theadingButton: HTMLElement;\n\t\t};\n\t\tStates: {\n\t\t\t/**\n\t\t\t * DOM id of the collapsible content region, referenced by the summary's aria-controls\n\t\t\t * attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\tcontrolId: string;\n\t\t\t/**\n\t\t\t * Whether the `open` attribute is set on `<details>`. Tracks {@link expanded}, except\n\t\t\t * while collapsing: the attribute has to outlive the class so the user agent keeps the\n\t\t\t * content rendered until the grid transition has finished.\n\t\t\t */\n\t\t\tdetailsOpen: boolean;\n\t\t\t/**\n\t\t\t * Whether the collapsible is visually expanded — drives the `--open` block modifier\n\t\t\t * and therefore the transition. Set one frame after {@link detailsOpen} when opening,\n\t\t\t * so the transition has a from-state to start from.\n\t\t\t */\n\t\t\texpanded: boolean;\n\t\t\t/**\n\t\t\t * DOM id of the heading toggle button, referenced by the content region's\n\t\t\t * aria-labelledby attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\theadingId: string;\n\t\t\t/**\n\t\t\t * Duration of the open/close transition in milliseconds, from the theme's\n\t\t\t * `collapsibleTransitionMs` feature flag. Rendered as the CSS custom property\n\t\t\t * `--collapsible-transition-duration` on `<details>` so the stylesheet and the timer\n\t\t\t * that keeps the `open` attribute alive share one value.\n\t\t\t */\n\t\t\ttransitionMs: number;\n\t\t};\n\t}\n>;\n\n/**\n * The BEM blocks that render through `CollapsibleFC`.\n *\n * Both are registered in `schema/bem-registry.ts` with the identical element set\n * (`content`, `heading`, `wrapper`, `wrapper-animation`) and modifier set (`disabled`, `open`),\n * which is what lets one functional component serve both: `keyof` over the union of their maps is\n * still exactly those names.\n */\nexport type CollapsibleBlock = 'kol-accordion' | 'kol-details';\n\n/**\n * The per-component differences of the otherwise identical collapsible markup.\n *\n * These are neither public props nor component state, so they stay out of {@link CollapsibleApi}\n * and are passed as plain arguments by the rendering web component — the same way\n * `BemRootNodeFC` and `AriaDescriptionSpanFC` take their own local prop types.\n */\nexport type CollapsibleVariant = {\n\t/** BEM block of the rendering component. */\n\tblock: CollapsibleBlock;\n\t/**\n\t * Icon of the toggle control (`<summary>`). `kol-accordion` swaps it with the open state,\n\t * `kol-details` keeps one icon and rotates it via CSS.\n\t */\n\ticons: IconsPropType;\n\t/** Additional class on the content region — `kol-details` adds `indented-text`. */\n\tcontentClass?: string;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport KolHeadingFc from '../../../functional-components/Heading/Heading';\nimport clsx from '../../../utils/clsx';\nimport { preventFocus } from '../../../utils/element-interaction';\nimport { getBlockBem } from '../bem-root-node/block-bem';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { SpanFC } from '../span/component';\nimport type { CollapsibleApi, CollapsibleVariant } from './api';\n\n/**\n * Renders a collapsible — `kol-accordion` and `kol-details` — on the native `<details>`/`<summary>`\n * elements.\n *\n * `<summary>` is the disclosure control: one tab stop, keyboard handling and the expanded state\n * come from the user agent. It has to be the first child of `<details>`, so the heading sits inside\n * the control; label and icon render through `SpanFC`.\n *\n * `level` is forwarded as `level ?? 0` because `KolHeadingFc` falls back to level 1 on `undefined`,\n * while the collapsible's own `_level` default is 0 — the bold `<strong>` rendering.\n *\n * `open` on `<details>` and the `--open` modifier are driven separately: the attribute has to be set\n * before the modifier flips so the grid transition has a from-state, and it has to outlive the\n * modifier on close so the collapse is visible. The web component owns that sequencing; the FC only\n * renders what it is told.\n */\nexport const CollapsibleFC: FC<FunctionalComponentProps<CollapsibleApi> & CollapsibleVariant> = (\n\t{ block, contentClass, controlId, detailsOpen, disabled, expanded, handleToggle, headingId, icons, label, level, refHeadingButton, transitionMs },\n\tchildren,\n) => {\n\tconst blockBem = getBlockBem(block);\n\n\treturn (\n\t\t<details\n\t\t\tclass={blockBem({\n\t\t\t\tdisabled: disabled === true,\n\t\t\t\topen: expanded === true,\n\t\t\t})}\n\t\t\topen={detailsOpen === true}\n\t\t\tstyle={{ '--collapsible-transition-duration': `${transitionMs}ms` }}\n\t\t>\n\t\t\t<summary\n\t\t\t\taria-controls={controlId}\n\t\t\t\taria-disabled={disabled === true ? 'true' : undefined}\n\t\t\t\tclass={blockBem('heading')}\n\t\t\t\tid={headingId}\n\t\t\t\tonClick={handleToggle}\n\t\t\t\tonMouseDown={disabled === true ? preventFocus : undefined}\n\t\t\t\tref={refHeadingButton}\n\t\t\t\ttabIndex={disabled === true ? -1 : undefined}\n\t\t\t>\n\t\t\t\t<KolHeadingFc level={level ?? 0}>\n\t\t\t\t\t<SpanFC icons={icons} label={label} />\n\t\t\t\t</KolHeadingFc>\n\t\t\t</summary>\n\t\t\t<div class={blockBem('wrapper')}>\n\t\t\t\t<div class={blockBem('wrapper-animation')}>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden={expanded === false ? 'true' : undefined}\n\t\t\t\t\t\taria-labelledby={headingId}\n\t\t\t\t\t\tclass={clsx(blockBem('content'), contentClass)}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\trole=\"region\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</details>\n\t);\n};\n","/**\n * Fallback duration of the open/close transition when the theme declares no\n * `collapsibleTransitionMs` feature flag. Mirrors the default of\n * `--collapsible-transition-duration` in `components/@shared/_collapsible.mixin.scss`.\n */\nexport const DEFAULT_COLLAPSIBLE_TRANSITION_MS = 300;\n\n/** Runs `callback` on the next frame; falls back to a macrotask where `requestAnimationFrame` is unavailable (SSR). */\nfunction onNextFrame(callback: () => void): () => void {\n\tif (typeof requestAnimationFrame === 'function') {\n\t\tconst handle = requestAnimationFrame(callback);\n\t\treturn () => cancelAnimationFrame(handle);\n\t}\n\tconst handle = setTimeout(callback, 0);\n\treturn () => clearTimeout(handle);\n}\n\nexport type CollapsibleOpenAnimationContext = {\n\t/** Duration of the CSS transition; the `open` attribute is kept on `<details>` until it has elapsed. */\n\tgetTransitionMs: () => number;\n\t/** Sets the `open` attribute on `<details>`. */\n\tsetDetailsOpen: (value: boolean) => void;\n\t/** Sets the `--open` block modifier, which drives the transition. */\n\tsetExpanded: (value: boolean) => void;\n};\n\nexport type CollapsibleOpenAnimation = {\n\t/**\n\t * Applies an open state to the two rendered flags.\n\t *\n\t * With `animate`, opening sets the `open` attribute first and the modifier one frame later — the\n\t * content is `display:none` while `<details>` is closed, so without that gap the transition has\n\t * no from-state and the panel snaps open. Collapsing does the reverse: the modifier goes first\n\t * and the attribute is removed once the transition has run.\n\t */\n\tsyncOpen: (open: boolean, animate: boolean) => void;\n\t/** Cancels pending frames and timers. Call from `disconnectedCallback`. */\n\tdispose: () => void;\n};\n\nexport function createCollapsibleOpenAnimation({ getTransitionMs, setDetailsOpen, setExpanded }: CollapsibleOpenAnimationContext): CollapsibleOpenAnimation {\n\tlet cancelPendingFrame: (() => void) | undefined;\n\tlet collapseTimeout: ReturnType<typeof setTimeout> | undefined;\n\n\tconst clearPending = (): void => {\n\t\tcancelPendingFrame?.();\n\t\tcancelPendingFrame = undefined;\n\t\tclearTimeout(collapseTimeout);\n\t\tcollapseTimeout = undefined;\n\t};\n\n\treturn {\n\t\tsyncOpen(open, animate) {\n\t\t\tclearPending();\n\n\t\t\tif (open) {\n\t\t\t\tsetDetailsOpen(true);\n\t\t\t\tif (animate) {\n\t\t\t\t\tcancelPendingFrame = onNextFrame(() => setExpanded(true));\n\t\t\t\t} else {\n\t\t\t\t\tsetExpanded(true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetExpanded(false);\n\t\t\tif (animate) {\n\t\t\t\tcollapseTimeout = setTimeout(() => setDetailsOpen(false), getTransitionMs());\n\t\t\t} else {\n\t\t\t\tsetDetailsOpen(false);\n\t\t\t}\n\t\t},\n\t\tdispose: clearPending,\n\t};\n}\n","import type { CollapsibleCallbacksPropType } from '../../../schema';\nimport { dispatchDomEvent, KolEvent } from '../../../utils/events';\n\n/**\n * Delay between flipping `_open` and announcing the new state.\n *\n * `_open` is declared `@Prop({ mutable: true, reflect: true })`, and Stencil writes the reflected\n * attribute asynchronously. Announcing synchronously would let a consumer callback read a stale\n * `_open` attribute off the host, so the announcement is deferred by one macrotask window.\n */\nconst ANNOUNCE_DELAY_MS = 25;\n\nexport type CollapsibleToggleContext = {\n\t/** The host element the DOM events are dispatched on. */\n\tgetHost: () => HTMLElement | undefined;\n\t/** The normalized `_on` render prop. Read at announce time so late assignments are picked up. */\n\tgetOn: () => CollapsibleCallbacksPropType<boolean>;\n\t/** Whether the collapsible currently refuses interaction. */\n\tisDisabled: () => boolean;\n\t/** The current normalized open state. */\n\tisOpen: () => boolean;\n\t/** Writes the component's mutable `_open` prop, which its watcher turns into rendered state. */\n\tsetOpen: (open: boolean) => void;\n};\n\n/**\n * Builds the `<summary>` click handler shared by `kol-accordion` and `kol-details`.\n *\n * The user agent's own toggle is suppressed: it flips `open` synchronously, which skips the\n * collapse transition and races the component's controlled state. Everything else follows the\n * native element — `<summary>` is still the focusable control, and Enter/Space arrive here as\n * clicks, so keyboard operation needs no extra handling.\n *\n * The new state is captured synchronously, before the deferred announcement, so two quick toggles\n * report their own value rather than the same final one twice.\n */\nexport function createCollapsibleToggleHandler({ getHost, getOn, isDisabled, isOpen, setOpen }: CollapsibleToggleContext): (event: MouseEvent) => void {\n\treturn (event: MouseEvent): void => {\n\t\tevent.preventDefault();\n\n\t\tif (isDisabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst open = !isOpen();\n\t\tsetOpen(open);\n\n\t\tsetTimeout(() => {\n\t\t\tconst host = getHost();\n\t\t\tif (host) {\n\t\t\t\tdispatchDomEvent(host, KolEvent.click, open);\n\t\t\t\tdispatchDomEvent(host, KolEvent.toggle, open);\n\t\t\t}\n\n\t\t\tconst on = getOn();\n\t\t\ton.onClick?.(event, open);\n\t\t\ton.onToggle?.(event, open);\n\t\t}, ANNOUNCE_DELAY_MS);\n\t};\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAUa,MAAA,wBAAwB,GAAG,6BAA6B;;ACKxD,MAAA,sBAAsB,GAAG;IACrC,QAAQ,EAAE,CAAC,wBAAwB,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC;IACvE,QAAQ,EAAE,CAAC,SAAS,CAAC;;;ACUf,MAAM,aAAa,GA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
|
1
|
+
{"version":3,"file":"toggle-handler-D-yalcds.js","sources":["src/internal/props/collapsible-callbacks.ts","src/internal/functional-components/collapsible/api.tsx","src/internal/functional-components/collapsible/component.tsx","src/internal/functional-components/collapsible/open-animation.ts","src/internal/functional-components/collapsible/toggle-handler.ts"],"sourcesContent":["import type { CollapsibleCallbacksPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createCallbacksPropDefinition } from './helpers/factory';\n\nexport type CollapsibleCallbacksProp = SimpleProp<'on', CollapsibleCallbacksPropType<boolean>>;\n\n/**\n * Callbacks prop shared by `kol-accordion` and `kol-details` — both expose the same\n * `onClick`/`onToggle` pair on their heading toggle button.\n */\nexport const collapsibleCallbacksProp = createCallbacksPropDefinition<CollapsibleCallbacksPropType<boolean>>();\n","import type { IconsPropType, KolFocusOptions } from '../../../schema';\nimport { collapsibleCallbacksProp, disabledProp, labelProp, levelProp, openProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props configuration shared by the collapsible components (`kol-accordion`, `kol-details`).\n *\n * `label` is the only required prop. All others are optional.\n *\n * Notes on prop choices:\n * - `labelProp` (not `labelWithExpertSlotProp`): the label labels the toggle button and has no\n * expert slot. It keeps the shared 2–80 character validation and accessibility hints.\n * - `openProp`: the toggle state. The public `_open` prop stays mutable and reflected on the web\n * component; the render prop mirrors it for the functional component.\n */\nexport const collapsiblePropsConfig = {\n\toptional: [collapsibleCallbacksProp, disabledProp, levelProp, openProp],\n\trequired: [labelProp],\n} as const satisfies PropsConfigShape;\n\nexport type CollapsibleApi = ApiFromConfig<\n\ttypeof collapsiblePropsConfig,\n\t{\n\t\tCallbacks: {\n\t\t\t/**\n\t\t\t * Click handler bound to the `<summary>` element. Implemented by the web component,\n\t\t\t * which suppresses the user agent's own toggle (so the collapse can be animated), flips\n\t\t\t * the mutable `_open` prop and — delayed so the reflected attribute is already updated —\n\t\t\t * dispatches the custom `KolEvent.click`/`KolEvent.toggle` events on the host element\n\t\t\t * and invokes the consumer's `onClick`/`onToggle` callbacks.\n\t\t\t */\n\t\t\ttoggle: (event: MouseEvent) => void;\n\t\t};\n\t\tMethods: {\n\t\t\tclick: () => void;\n\t\t\tfocus: (options?: KolFocusOptions) => void;\n\t\t};\n\t\tRefs: {\n\t\t\t/** The `<summary>` element — the disclosure control `focus()` and `click()` delegate to. */\n\t\t\theadingButton: HTMLElement;\n\t\t};\n\t\tStates: {\n\t\t\t/**\n\t\t\t * DOM id of the collapsible content region, referenced by the summary's aria-controls\n\t\t\t * attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\tcontrolId: string;\n\t\t\t/**\n\t\t\t * Whether the `open` attribute is set on `<details>`. Tracks {@link expanded}, except\n\t\t\t * while collapsing: the attribute has to outlive the class so the user agent keeps the\n\t\t\t * content rendered until the grid transition has finished.\n\t\t\t */\n\t\t\tdetailsOpen: boolean;\n\t\t\t/**\n\t\t\t * Whether the collapsible is visually expanded — drives the `--open` block modifier\n\t\t\t * and therefore the transition. Set one frame after {@link detailsOpen} when opening,\n\t\t\t * so the transition has a from-state to start from.\n\t\t\t */\n\t\t\texpanded: boolean;\n\t\t\t/**\n\t\t\t * DOM id of the heading toggle button, referenced by the content region's\n\t\t\t * aria-labelledby attribute. Derived once per web component instance.\n\t\t\t */\n\t\t\theadingId: string;\n\t\t\t/**\n\t\t\t * Duration of the open/close transition in milliseconds, from the theme's\n\t\t\t * `collapsibleTransitionMs` feature flag. Rendered as the CSS custom property\n\t\t\t * `--collapsible-transition-duration` on `<details>` so the stylesheet and the timer\n\t\t\t * that keeps the `open` attribute alive share one value.\n\t\t\t */\n\t\t\ttransitionMs: number;\n\t\t};\n\t}\n>;\n\n/**\n * The BEM blocks that render through `CollapsibleFC`.\n *\n * Both are registered in `schema/bem-registry.ts` with the identical element set\n * (`content`, `heading`, `wrapper`, `wrapper-animation`) and modifier set (`disabled`, `open`),\n * which is what lets one functional component serve both: `keyof` over the union of their maps is\n * still exactly those names.\n */\nexport type CollapsibleBlock = 'kol-accordion' | 'kol-details';\n\n/**\n * The per-component differences of the otherwise identical collapsible markup.\n *\n * These are neither public props nor component state, so they stay out of {@link CollapsibleApi}\n * and are passed as plain arguments by the rendering web component — the same way\n * `BemRootNodeFC` and `AriaDescriptionSpanFC` take their own local prop types.\n */\nexport type CollapsibleVariant = {\n\t/** BEM block of the rendering component. */\n\tblock: CollapsibleBlock;\n\t/**\n\t * Icon of the toggle control (`<summary>`). `kol-accordion` swaps it with the open state,\n\t * `kol-details` keeps one icon and rotates it via CSS.\n\t */\n\ticons: IconsPropType;\n\t/** Additional class on the content region — `kol-details` adds `indented-text`. */\n\tcontentClass?: string;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport KolHeadingFc from '../../../functional-components/Heading/Heading';\nimport clsx from '../../../utils/clsx';\nimport { preventFocus } from '../../../utils/element-interaction';\nimport { getBlockBem } from '../bem-root-node/block-bem';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { SpanFC } from '../span/component';\nimport type { CollapsibleApi, CollapsibleVariant } from './api';\n\n/**\n * Renders a collapsible — `kol-accordion` and `kol-details` — on the native `<details>`/`<summary>`\n * elements.\n *\n * `<summary>` is the disclosure control: one tab stop, keyboard handling and the expanded state\n * come from the user agent. It has to be the first child of `<details>`, so the heading sits inside\n * the control; label and icon render through `SpanFC`.\n *\n * `level` is forwarded as `level ?? 0` because `KolHeadingFc` falls back to level 1 on `undefined`,\n * while the collapsible's own `_level` default is 0 — the bold `<strong>` rendering.\n *\n * `open` on `<details>` and the `--open` modifier are driven separately: the attribute has to be set\n * before the modifier flips so the grid transition has a from-state, and it has to outlive the\n * modifier on close so the collapse is visible. The web component owns that sequencing; the FC only\n * renders what it is told.\n */\nexport const CollapsibleFC: FC<FunctionalComponentProps<CollapsibleApi> & CollapsibleVariant> = (\n\t{ block, contentClass, controlId, detailsOpen, disabled, expanded, handleToggle, headingId, icons, label, level, refHeadingButton, transitionMs },\n\tchildren,\n) => {\n\tconst blockBem = getBlockBem(block);\n\n\treturn (\n\t\t<details\n\t\t\tclass={blockBem({\n\t\t\t\tdisabled: disabled === true,\n\t\t\t\topen: expanded === true,\n\t\t\t})}\n\t\t\topen={detailsOpen === true}\n\t\t\tstyle={{ '--collapsible-transition-duration': `${transitionMs}ms` }}\n\t\t>\n\t\t\t<summary\n\t\t\t\taria-controls={controlId}\n\t\t\t\taria-disabled={disabled === true ? 'true' : undefined}\n\t\t\t\tclass={blockBem('heading')}\n\t\t\t\tid={headingId}\n\t\t\t\tonClick={handleToggle}\n\t\t\t\tonMouseDown={disabled === true ? preventFocus : undefined}\n\t\t\t\tref={refHeadingButton}\n\t\t\t\ttabIndex={disabled === true ? -1 : undefined}\n\t\t\t>\n\t\t\t\t<KolHeadingFc level={level ?? 0}>\n\t\t\t\t\t<SpanFC icons={icons} label={label} />\n\t\t\t\t</KolHeadingFc>\n\t\t\t</summary>\n\t\t\t<div class={blockBem('wrapper')}>\n\t\t\t\t<div class={blockBem('wrapper-animation')}>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden={expanded === false ? 'true' : undefined}\n\t\t\t\t\t\taria-labelledby={headingId}\n\t\t\t\t\t\tclass={clsx(blockBem('content'), contentClass)}\n\t\t\t\t\t\tid={controlId}\n\t\t\t\t\t\trole=\"region\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</details>\n\t);\n};\n","/**\n * Fallback duration of the open/close transition when the theme declares no\n * `collapsibleTransitionMs` feature flag. Mirrors the default of\n * `--collapsible-transition-duration` in `components/@shared/_collapsible.mixin.scss`.\n */\nexport const DEFAULT_COLLAPSIBLE_TRANSITION_MS = 300;\n\n/** Runs `callback` on the next frame; falls back to a macrotask where `requestAnimationFrame` is unavailable (SSR). */\nfunction onNextFrame(callback: () => void): () => void {\n\tif (typeof requestAnimationFrame === 'function') {\n\t\tconst handle = requestAnimationFrame(callback);\n\t\treturn () => cancelAnimationFrame(handle);\n\t}\n\tconst handle = setTimeout(callback, 0);\n\treturn () => clearTimeout(handle);\n}\n\nexport type CollapsibleOpenAnimationContext = {\n\t/** Duration of the CSS transition; the `open` attribute is kept on `<details>` until it has elapsed. */\n\tgetTransitionMs: () => number;\n\t/** Sets the `open` attribute on `<details>`. */\n\tsetDetailsOpen: (value: boolean) => void;\n\t/** Sets the `--open` block modifier, which drives the transition. */\n\tsetExpanded: (value: boolean) => void;\n};\n\nexport type CollapsibleOpenAnimation = {\n\t/**\n\t * Applies an open state to the two rendered flags.\n\t *\n\t * With `animate`, opening sets the `open` attribute first and the modifier one frame later — the\n\t * content is `display:none` while `<details>` is closed, so without that gap the transition has\n\t * no from-state and the panel snaps open. Collapsing does the reverse: the modifier goes first\n\t * and the attribute is removed once the transition has run.\n\t */\n\tsyncOpen: (open: boolean, animate: boolean) => void;\n\t/** Cancels pending frames and timers. Call from `disconnectedCallback`. */\n\tdispose: () => void;\n};\n\nexport function createCollapsibleOpenAnimation({ getTransitionMs, setDetailsOpen, setExpanded }: CollapsibleOpenAnimationContext): CollapsibleOpenAnimation {\n\tlet cancelPendingFrame: (() => void) | undefined;\n\tlet collapseTimeout: ReturnType<typeof setTimeout> | undefined;\n\n\tconst clearPending = (): void => {\n\t\tcancelPendingFrame?.();\n\t\tcancelPendingFrame = undefined;\n\t\tclearTimeout(collapseTimeout);\n\t\tcollapseTimeout = undefined;\n\t};\n\n\treturn {\n\t\tsyncOpen(open, animate) {\n\t\t\tclearPending();\n\n\t\t\tif (open) {\n\t\t\t\tsetDetailsOpen(true);\n\t\t\t\tif (animate) {\n\t\t\t\t\tcancelPendingFrame = onNextFrame(() => setExpanded(true));\n\t\t\t\t} else {\n\t\t\t\t\tsetExpanded(true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetExpanded(false);\n\t\t\tif (animate) {\n\t\t\t\tcollapseTimeout = setTimeout(() => setDetailsOpen(false), getTransitionMs());\n\t\t\t} else {\n\t\t\t\tsetDetailsOpen(false);\n\t\t\t}\n\t\t},\n\t\tdispose: clearPending,\n\t};\n}\n","import type { CollapsibleCallbacksPropType } from '../../../schema';\nimport { dispatchDomEvent, KolEvent } from '../../../utils/events';\n\n/**\n * Delay between flipping `_open` and announcing the new state.\n *\n * `_open` is declared `@Prop({ mutable: true, reflect: true })`, and Stencil writes the reflected\n * attribute asynchronously. Announcing synchronously would let a consumer callback read a stale\n * `_open` attribute off the host, so the announcement is deferred by one macrotask window.\n */\nconst ANNOUNCE_DELAY_MS = 25;\n\nexport type CollapsibleToggleContext = {\n\t/** The host element the DOM events are dispatched on. */\n\tgetHost: () => HTMLElement | undefined;\n\t/** The normalized `_on` render prop. Read at announce time so late assignments are picked up. */\n\tgetOn: () => CollapsibleCallbacksPropType<boolean>;\n\t/** Whether the collapsible currently refuses interaction. */\n\tisDisabled: () => boolean;\n\t/** The current normalized open state. */\n\tisOpen: () => boolean;\n\t/** Writes the component's mutable `_open` prop, which its watcher turns into rendered state. */\n\tsetOpen: (open: boolean) => void;\n};\n\n/**\n * Builds the `<summary>` click handler shared by `kol-accordion` and `kol-details`.\n *\n * The user agent's own toggle is suppressed: it flips `open` synchronously, which skips the\n * collapse transition and races the component's controlled state. Everything else follows the\n * native element — `<summary>` is still the focusable control, and Enter/Space arrive here as\n * clicks, so keyboard operation needs no extra handling.\n *\n * The new state is captured synchronously, before the deferred announcement, so two quick toggles\n * report their own value rather than the same final one twice.\n */\nexport function createCollapsibleToggleHandler({ getHost, getOn, isDisabled, isOpen, setOpen }: CollapsibleToggleContext): (event: MouseEvent) => void {\n\treturn (event: MouseEvent): void => {\n\t\tevent.preventDefault();\n\n\t\tif (isDisabled()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst open = !isOpen();\n\t\tsetOpen(open);\n\n\t\tsetTimeout(() => {\n\t\t\tconst host = getHost();\n\t\t\tif (host) {\n\t\t\t\tdispatchDomEvent(host, KolEvent.click, open);\n\t\t\t\t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AK,EAAE;AAClB,YAAA,CAAA,EAAA,GAAA,EAAE,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,EAAG,KAAK,EAAE,IAAI,CAAC;AACzB,YAAA,CAAA,EAAA,GAAA,EAAE,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,EAAG,KAAK,EAAE,IAAI,CAAC;SAC1B,EAAE,iBAAiB,CAAC;AACtB,KAAC;AACF;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{a as e}from"./tslib.es6-QNbPBOk5.js";import{h as s}from"./index-
|
|
5
|
-
//# sourceMappingURL=Heading-
|
|
4
|
+
import{a as e}from"./tslib.es6-QNbPBOk5.js";import{h as s}from"./index-DQdQBwMc.js";import{c as l}from"./clsx-COFh-Vc8.js";const o=1;const a=6;function n(e){return e>=o&&e<=a}function c(e){return n(e)?`h${e}`:"strong"}const r=(a,n)=>{var{class:r,level:t=o}=a,i=e(a,["class","level"]);const d=c(t);return s(d,Object.assign({class:l("kol-headline",`kol-headline--${d}`,r)},i),n)};const t=(o,a)=>{var{class:n}=o,c=e(o,["class"]);return s("p",Object.assign({class:l("kol-headline kol-headline--group kol-headline--secondary",n)},c),a)};const i=(a,n)=>{var{secondaryHeadline:c,level:i=o,class:d,HeadingGroupProps:p={},SecondaryHeadlineProps:u={}}=a,h=e(a,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const j=Object.assign({level:i},h);if(!c){return s(r,Object.assign({class:l(d,"kol-headline--single")},j),n)}const{class:b}=p,g=e(p,["class"]);const k=Object.assign({class:l("kol-heading-group",b)},g);return s("hgroup",Object.assign({},k),s(r,Object.assign({class:l(d,"kol-headline--group","kol-headline--primary")},j),n),s(t,Object.assign({},u),c))};export{i as K,c as g};
|
|
5
|
+
//# sourceMappingURL=Heading-NHB1reiQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading-
|
|
1
|
+
{"version":3,"file":"Heading-NHB1reiQ.js","sources":["src/functional-components/Heading/Heading.tsx"],"sourcesContent":["import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel } from '../../schema';\nimport clsx from '../../utils/clsx';\n\ntype HGroupProps = JSXBase.HTMLAttributes<HTMLElement>;\n\n// Define a base type for common props\ntype BaseProps = JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement> & {\n\tlevel?: HeadingLevel;\n};\n\n// Define a type for the main headline props\ntype HeadlineProps = BaseProps;\n\n// Define a type for the secondary headline props\ntype SecondaryHeadlineProps = JSXBase.HTMLAttributes<HTMLParagraphElement>;\n\n// Define a type for the main Heading component props\nexport type HeadingProps = HeadlineProps & {\n\tsecondaryHeadline?: string;\n\tHeadingGroupProps?: HGroupProps;\n\tSecondaryHeadlineProps?: SecondaryHeadlineProps;\n};\n\nconst MIN_HEADING_LEVEL = 1;\nconst MAX_HEADING_LEVEL = 6;\n\n// Define a union type for valid headline tags\ntype HeadlineTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong';\n\n/**\n * Checks if the given level is a valid heading level.\n * @param level - The heading level to check.\n * @returns True if the level is valid, false otherwise.\n */\nfunction isValidHeadingLevel(level: number): boolean {\n\treturn level >= MIN_HEADING_LEVEL && level <= MAX_HEADING_LEVEL;\n}\n\n/**\n * Returns the appropriate headline tag based on the level.\n * If the level is invalid, returns 'strong'.\n * @param level - The heading level.\n * @returns The corresponding headline tag.\n */\nexport function getHeadlineTag(level: HeadingLevel | number): HeadlineTag {\n\treturn isValidHeadingLevel(level) ? (`h${level}` as HeadlineTag) : 'strong';\n}\n\n/**\n * Functional component for rendering a headline.\n * @param props - The properties for the headline component.\n * @param children - The children to render inside the headline.\n * @returns A VNode representing the headline.\n */\nconst KolHeadlineFc: FC<HeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${HeadlineTag}`, classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a secondary headline.\n * The secondary text is rendered as a `<p>` because according to the HTML `hgroup`\n * specification the subheading does not create its own outline level.\n * @param props - The properties for the secondary headline component.\n * @param children - The children to render inside the secondary headline.\n * @returns A VNode representing the secondary headline.\n */\nconst KolSecondaryHeadlineFc: FC<SecondaryHeadlineProps> = ({ class: classNames, ...other }, children) => {\n\treturn (\n\t\t<p class={clsx('kol-headline kol-headline--group kol-headline--secondary', classNames)} {...other}>\n\t\t\t{children}\n\t\t</p>\n\t);\n};\n\n/**\n * Functional component for rendering a heading with an optional secondary headline.\n * @param props - The properties for the heading component.\n * @param children - The children to render inside the heading.\n * @returns A VNode representing the heading.\n */\nconst KolHeadingFc: FC<HeadingProps> = (\n\t{ secondaryHeadline, level = MIN_HEADING_LEVEL, class: classNames, HeadingGroupProps = {}, SecondaryHeadlineProps = {}, ...other },\n\tchildren,\n) => {\n\tconst headlineProps: HeadlineProps = {\n\t\tlevel,\n\t\t...other,\n\t};\n\n\tif (!secondaryHeadline) {\n\t\treturn (\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--single')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t);\n\t}\n\n\tconst { class: groupClassNames, ...groupOthers } = HeadingGroupProps;\n\tconst headlineGroupProps: HGroupProps = {\n\t\tclass: clsx('kol-heading-group', groupClassNames),\n\t\t...groupOthers,\n\t};\n\n\treturn (\n\t\t<hgroup {...headlineGroupProps}>\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--group', 'kol-headline--primary')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t\t<KolSecondaryHeadlineFc {...SecondaryHeadlineProps}>{secondaryHeadline}</KolSecondaryHeadlineFc>\n\t\t</hgroup>\n\t);\n};\n\nexport default KolHeadingFc;\n"],"names":[],"mappings":";;;;;;;AAyBA,MAAM,iBAAiB,GAAG,CAAC;AAC3B,MAAM,iBAAiB,GAAG,CAAC;AAU3B,SAAS,mBAAmB,CAAC,KAAa,EAAA;AACzC,IAAA,OAAO,KAAK,IAAI,iBAAiB,IAAI,KAAK,IAAI,iBAAiB;AAChE;AAQM,SAAU,cAAc,CAAC,KAA4B,EAAA;AAC1D,IAAA,OAAO,mBAAmB,CAAC,KAAK,CAAC,GAAI,CAAI,CAAA,EAAA,KAAK,CAAkB,CAAA,GAAG,QAAQ;AAC5E;AAQA,MAAM,aAAa,GAAsB,CAAC,EAA0D,EAAE,QAAQ,KAAI;IAAxE,IAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,GAAG,iBAAiB,EAAA,GAAA,EAAY,EAAP,KAAK,GAAxD,MAAA,CAAA,EAAA,EAAA,CAAA,OAAA,EAAA,OAAA,CAA0D,CAAF;AACjG,IAAA,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC;AAEzC,IAAA,QACC,EAAC,WAAW,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,CAAA,cAAA,EAAiB,WAAW,CAAA,CAAE,EAAE,UAAU,CAAC,EAAA,EAAM,KAAK,CAC7F,EAAA,QAAQ,CACI;AAEhB,CAAC;AAUD,MAAM,sBAAsB,GAA+B,CAAC,EAA+B,EAAE,QAAQ,KAAI;QAA7C,EAAE,KAAK,EAAE,UAAU,EAAA,GAAA,EAAY,EAAP,KAAK,GAAA,MAAA,CAAA,EAAA,EAA7B,SAA+B,CAAF;IACxF,QACC,CAAG,CAAA,GAAA,EA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ACxF;AAEX;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{a as e}from"./tslib.es6-QNbPBOk5.js";import{p as t,j as i,D as o}from"./common-BqpMtheU.js";import{S as s,b as n,s as r}from"./component-C_d54ujF.js";import{a,c as l,n as d}from"./dev.utils-CJMVCYWh.js";import{K as h,d as c}from"./events-CRHxtwup.js";import{F as u,a as p}from"./behavior-DnkpB_7O.js";import{d as f}from"./disabled-CdyeAMlW.js";import{h as m,e as b}from"./variant-CeijQFzL.js";import{c as v,n as y,b as g,a as j,B}from"./base-web-component-3R1Dy3QK.js";import{l as _}from"./label-with-expert-slot-CocPu9HB.js";import{n as L}from"./name-D8963H-v.js";import{c as C}from"./item-Cbi_ZY6o.js";import{c as O}from"./item-CHP-bw8Q.js";import{T as F}from"./behavior-D1kOlK6p.js";import{h as K}from"./index-DQdQBwMc.js";import{t as T}from"./i18n-BaCf-SDK.js";import{c as w}from"./component-BF8FPuIW.js";import{b as N}from"./bem-registry-CX5kvaqt.js";import{c as P}from"./clsx-COFh-Vc8.js";import{B as x}from"./component-C3sXiwbS.js";import{T as k}from"./component-CvCfEqSE.js";import{P as D}from"./component-C5BFsKau.js";import{A as H}from"./component-Do9rjnte.js";function M(e,t){return Boolean(e)&&t===true}function A(e){if(typeof e==="string"){try{return t(e)}catch(t){return{_description:e,_type:"error"}}}if(e&&typeof e==="object"&&!("_type"in e)){return Object.assign(Object.assign({},e),{_type:"error"})}return e}function I(e){var t;if(typeof e==="string"){return"error"}return(t=e===null||e===void 0?void 0:e._type)!==null&&t!==void 0?t:"error"}const S=v("hideMsg",false,y);const q=v("hint","",g);function E(e){if(typeof e==="object"&&e!==null){return e}throw new Error(`Invalid info popover: ${typeof e}`)}const Q=v("infoPopover",undefined,E);const $=j();function z(e){if(typeof e==="string"){try{return t(e)}catch(t){return e}}return e}function R(e){if(e===undefined){return true}if(typeof e==="string"){return e.length>0}return i(e)&&o(e._description,1)}const V=v("msg",undefined,z,R);const W=v("touched",false,y);const X=({id:e,msg:t,hint:i,touched:o,hideMsg:s})=>{const n=typeof t==="string"?t:t===null||t===void 0?void 0:t._description;const r=Boolean(n&&n.length>0);const l=I(t)==="error"&&r&&o===true;const d=typeof i==="string"&&i.length>0;const h=[];if(r&&!s){h.push(a(e,"msg"))}if(d){h.push(a(e,"hint"))}return{hasError:l,hasHint:d,ariaDescribedBy:h}};const Y=t=>{var{id:i,class:o,hint:s,baseClassName:n="kol-form-field"}=t,r=e(t,["id","class","hint","baseClassName"]);if(!s){return null}return K("span",Object.assign({class:P(`${n}__hint`,o),id:a(i||"","hint")},r),s)};const J=t=>{var{component:i="label",id:o,baseClassName:r="kol-form-field",class:l,accessKey:d,shortKey:h,label:c,hideLabel:u,hasExpertSlot:p,omitId:f,showBadge:m=true,readOnly:b,infoPopover:v}=t,y=e(t,["component","id","baseClassName","class","accessKey","shortKey","label","hideLabel","hasExpertSlot","omitId","showBadge","readOnly","infoPopover"]);const g=!p&&u;const j=m===false?undefined:n(d,h);return K(i,Object.assign({},y,{class:P(`${r}__label`,l),id:!g&&!f?a(o,"label"):undefined,hidden:g,htmlFor:i==="legend"?undefined:o}),K(s,{class:`${r}__label-text`,label:p?"":c!==null&&c!==void 0?c:"",badgeText:j},K("slot",{name:"expert"})),!p&&b&&K("span",{class:`${r}__label__read-only`,"aria-hidden":"true"},"(",T("kol-readonly"),")"),!p&&v&&K("span",null,K(D,Object.assign({},v.popoverButton),K("div",{class:"kol-popover-button__popover--styled"},v.content))))};const U=t=>{var i,o;var{alert:s,msg:n,id:r,class:h}=t,c=e(t,["alert","msg","id","class"]);const u=A(n);return K(H,Object.assign({alert:(i=u===null||u===void 0?void 0:u._alert)!==null&&i!==void 0?i:s===true,class:P("kol-form-field__msg",h),closerAriaDescriptionId:d(),handleCloserClick:()=>undefined,hasCloser:false,headingId:l("alert-heading"),id:a(r,"msg"),label:"",level:0,refCloserButton:()=>undefined,refCloserTooltip:()=>undefined,type:(o=u===null||u===void 0?void 0:u._type)!==null&&o!==void 0?o:"error",variant:"msg"},c),(u===null||u===void 0?void 0:u._description)||undefined)};const Z=N.forBlock("kol-form-field");const G=({hideLabel:e,label:t,renderNoTooltip:i})=>!i&&!r(t)&&e===true;const ee=e=>{const t=I(e);return{[t]:true,[`msg-type-${t}`]:true}};const te=(t,i)=>{const{renderNoLabel:o,renderNoTooltip:s,renderNoHint:l,id:d,required:h,alert:c,disabled:u,class:p,msg:f,hideMsg:m,hideLabel:b,label:v,infoPopover:y,hint:g,accessKey:j,shortKey:B,counter:_,readOnly:L,touched:C,maxLength:O,ariaDescribedBy:F,showBadge:N,tooltipAlign:D,variant:H,component:A="div",orientation:I,refInput:S,refTooltip:q}=t,E=e(t,["renderNoLabel","renderNoTooltip","renderNoHint","id","required","alert","disabled","class","msg","hideMsg","hideLabel","label","infoPopover","hint","accessKey","shortKey","counter","readOnly","touched","maxLength","ariaDescribedBy","showBadge","tooltipAlign","variant","component","orientation","refInput","refTooltip"]);const Q=r(v);const $=M(f,C);const z=n(j,B);const R=G({hideLabel:b,label:v,renderNoTooltip:s});const V=A==="fieldset";return K(x,Object.assign({component:A,block:"kol-form-field",modifiers:Object.assign({disabled:Boolean(u),required:Boolean(h),touched:Boolean(C),"hide-label":Boolean(b),"read-only":Boolean(L),"hidden-msg":Boolean(m)},$?ee(f):{}),class:P(H&&w(H,"form-field"),p),disabled:V&&u?true:undefined,"aria-describedby":F},E),!o&&K(J,{component:V?"legend":"label",class:V?"kol-form-field__label--legend":undefined,id:d,hasExpertSlot:Q,hideLabel:b,label:v,accessKey:j,shortKey:B,readOnly:L,showBadge:N,infoPopover:y}),K("div",{class:Z("input",{"orientation-horizontal":I==="horizontal","orientation-vertical":I==="vertical"}),ref:S},i,R&&K("div",{class:Z("tooltip")},K(k,{badgeText:z||"",label:v,align:D,id:a(d,"label"),refFloating:q}))),_&&!(_.maxLengthBehavior==="soft"&&typeof _.maxLength!=="number")&&K("div",{class:Z("counter")},K("span",{"data-testid":"input-counter","aria-hidden":"true",class:Z("counter"),ref:_.visualRef}),K("span",{"aria-live":"polite",class:"visually-hidden","data-testid":"input-counter-aria",id:a(d,"counter"),ref:_.ariaRef})),$&&!m&&K(U,{id:d,alert:c,msg:f}),!l&&K(Y,{id:d,hint:g}),typeof O==="number"&&!_&&K("span",{id:a(d,"character-limit-hint"),class:"visually-hidden"},T("kol-character-limit-hint",{placeholders:{limit:String(O)}})))};class ie extends B{constructor(){super(...arguments);this.tooltipBehavior=new F(B.stateLess);this.smartButton=C((()=>this.host));this.infoPopover=O({getFlagHost:()=>this.host,getOpen:()=>this.infoPopoverOpen===true,setOpen:e=>{this.infoPopoverOpen=e}});this.focusEventSent=false;this.handleChange=(e,t)=>{var i,o;e.stopPropagation();if(typeof t==="undefined"){t=e.target.value}this.emit(h.change,t);(o=(i=this._on)===null||i===void 0?void 0:i.onChange)===null||o===void 0?void 0:o.call(i,e,t)};this.handleInput=(e,t)=>{var i,o;e.stopPropagation();if(typeof t==="undefined"){t=e.target.value}this.emit(h.input,t);this.formAssociation.setFormAssociatedValue(t);(o=(i=this._on)===null||i===void 0?void 0:i.onInput)===null||o===void 0?void 0:o.call(i,e,t)};this.handleClick=e=>{var t,i;this.emit(h.click);(i=(t=this._on)===null||t===void 0?void 0:t.onClick)===null||i===void 0?void 0:i.call(t,e)};this.handleFocus=e=>{var t,i;if(!this.focusEventSent){this.emit(h.focus);(i=(t=this._on)===null||t===void 0?void 0:t.onFocus)===null||i===void 0?void 0:i.call(t,e);this.focusEventSent=true}this.shared.setState("inputHasFocus",true)};this.handleBlur=e=>{this.handleFocusLeave(e);this.shared.setState("inputHasFocus",false)};this.handleKeyDown=e=>{var t,i;this.emit(h.keydown);(i=(t=this._on)===null||t===void 0?void 0:t.onKeyDown)===null||i===void 0?void 0:i.call(t,e)};this.setInputRef=e=>{if(e&&this.isTooltipShown()){this.tooltipBehavior.initContext(e);this.tooltipBehavior.syncListeners(undefined,e,true)}};this.setTooltipRef=e=>{this.tooltipBehavior.setTooltipElementRef(e)}}get shared(){return this}initFormAssociation(e,t){this.formAssociation=new u(B.stateLess,{host:this.host,type:e,name:t})}syncFormField(){this.smartButton.syncListeners();this.infoPopover.syncListeners()}destroyFormField(){this.tooltipBehavior.destroy();this.smartButton.destroy();this.infoPopover.destroy()}getInfoPopover(){const t=this.shared.getRenderProp("infoPopover");if(!t){return undefined}const{_content:i}=t,o=e(t,["_content"]);return{popoverButton:this.infoPopover.getFcProps(Object.assign(Object.assign({_variant:"ghost"},o),{_hideLabel:true,_inline:true})),content:i}}getSmartButtonFcProps(e,t){if(typeof e!=="object"||e===null){return undefined}return this.smartButton.getFcProps(Object.assign({_hideLabel:true,_disabled:t},e),{class:"kol-input-container__smart-button"})}applyAriaDetails(e){p.apply(e,(e=>this.shared.setRenderProp("ariaDetails",e)));this.formAssociation.watchAriaDetails(e)}applyDisabled(e){f.apply(e,(e=>this.shared.setRenderProp("disabled",e)))}applyHideLabel(e){m.apply(e,(e=>this.shared.setRenderProp("hideLabel",e)))}applyHideMsg(e){S.apply(e,(e=>this.shared.setRenderProp("hideMsg",e)))}applyHint(e){q.apply(e,(e=>this.shared.setRenderProp("hint",e)))}applyInfoPopover(e){Q.apply(e,(e=>this.shared.setRenderProp("infoPopover",e)))}applyLabel(e){const t=e;_.apply(t===false?"":e,(e=>this.shared.setRenderProp("label",e)))}applyMsg(e){V.apply(e,(e=>this.shared.setRenderProp("msg",e)))}applyName(e){L.apply(e,(e=>this.shared.setRenderProp("name",e)));this.formAssociation.watchName(e)}applyOn(e){$.apply(e,(e=>this.shared.setRenderProp("on",e)))}applySyncValueBySelector(e){this.formAssociation.watchSyncValueBySelector(e)}applyTooltipAlign(e){b.apply(e!==null&&e!==void 0?e:"top",(e=>this.shared.setRenderProp("tooltipAlign",e)))}applyTouched(e){W.apply(e,(e=>this.shared.setRenderProp("touched",e)))}get eventHost(){var e,t;return(t=(e=this.formAssociation)===null||e===void 0?void 0:e.host)!==null&&t!==void 0?t:this.host}emit(e,t){if(this.eventHost){c(this.eventHost,e,t)}}handleFocusLeave(e){var t,i;if(this._disabled){return}const o=this.eventHost;const s=(o===null||o===void 0?void 0:o.shadowRoot)||o;const n=(s===null||s===void 0?void 0:s.contains(e.relatedTarget))||o===e.relatedTarget;if(this.focusEventSent&&!n){this._touched=true;this.emit(h.blur);(i=(t=this._on)===null||t===void 0?void 0:t.onBlur)===null||i===void 0?void 0:i.call(t,e);this.focusEventSent=false}}getAria(){const e=this.shared;return X({id:e.getState("id"),msg:e.getRenderProp("msg"),hint:e.getRenderProp("hint"),touched:e.getRenderProp("touched"),hideMsg:e.getRenderProp("hideMsg")})}showAsAlert(){return Boolean(this.shared.getRenderProp("touched"))&&!this.shared.getState("inputHasFocus")}isTooltipShown(){const e=this.shared;return G({hideLabel:e.getRenderProp("hideLabel"),label:e.getRenderProp("label")})}getLabelTooltipRefs(){return{refInput:this.setInputRef,refTooltip:this.setTooltipRef}}getFormFieldProps({class:e,accessKey:t,shortKey:i,variant:o,counter:s,maxLength:r,readOnly:l,renderNoLabel:d,renderNoTooltip:h,required:c}){const u=this.shared;const p=u.getState("id");const f=u.getRenderProp("label");const m=u.getRenderProp("tooltipAlign");if(this.isTooltipShown()){this.tooltipBehavior.watchAlign(m);this.tooltipBehavior.watchBadgeText(n(t,i)||"");this.tooltipBehavior.watchId(a(p,"label"));this.tooltipBehavior.watchLabel(f)}else{this.tooltipBehavior.destroy()}return{id:p,disabled:u.getRenderProp("disabled"),msg:u.getRenderProp("msg"),hint:u.getRenderProp("hint"),label:f,hideLabel:u.getRenderProp("hideLabel"),hideMsg:u.getRenderProp("hideMsg"),touched:u.getRenderProp("touched"),showBadge:Boolean(t)||Boolean(i),required:c,readOnly:l,accessKey:t,shortKey:i,maxLength:r,counter:s,variant:o,class:e,tooltipAlign:m,alert:this.showAsAlert(),infoPopover:this.getInfoPopover(),renderNoLabel:d,renderNoTooltip:h,refInput:h?undefined:this.setInputRef,refTooltip:this.setTooltipRef}}}function oe({ariaDescribedBy:e,hideLabel:t,label:i}){return{title:"",autoCapitalize:"off",autoCorrect:"off","aria-describedby":(e===null||e===void 0?void 0:e.length)?e.join(" "):undefined,"aria-label":t&&i?i:undefined}}const se={required:[_],optional:[p,f,m,S,q,Q,$,V,L,b,W]};export{ie as B,te as F,Y as a,J as b,oe as c,se as f,I as g,M as i};
|
|
5
|
+
//# sourceMappingURL=api-BAEPnyL7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-C8TfIYlY.js","sources":["src/schema/props/msg.ts","src/internal/props/hide-msg.ts","src/internal/props/hint.ts","src/internal/props/info-popover.ts","src/internal/props/input-callbacks.ts","src/internal/props/msg.ts","src/internal/props/touched.ts","src/internal/functional-components/form-field/aria.ts","src/internal/functional-components/form-field/hint.tsx","src/internal/functional-components/form-field/label.tsx","src/internal/functional-components/form-field/msg.tsx","src/internal/functional-components/form-field/component.tsx","src/internal/functional-components/form-field/base-web-component.tsx","src/internal/functional-components/form-field/default-input-props.ts","src/internal/functional-components/form-field/api.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { AlertProps } from '../components';\nimport type { Stringified } from '../types';\nimport { objectObjectHandler, parseJson, watchValidator } from '../utils';\nimport { isObject, isString } from '../validators';\n\n/* types */\nexport type MsgPropType = Omit<AlertProps, '_level' | '_on' | '_label' | '_hasCloser' | '_variant'> & { _description: string };\n\n/**\n * Defines the properties for a message rendered as Alert component.\n */\nexport type PropMsg = {\n\tmsg: Stringified<MsgPropType>;\n};\n\n/* validator */\nexport const validateMsg = (component: Generic.Element.Component, value?: Stringified<MsgPropType>): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<MsgPropType>(value);\n\t\t} catch {\n\t\t\t// value keeps original value\n\t\t}\n\t\twatchValidator<Stringified<MsgPropType>>(\n\t\t\tcomponent,\n\t\t\t`_msg`,\n\t\t\t(value) => {\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (typeof value === 'string' && value.length > 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (isObject(value) && value !== null) {\n\t\t\t\t\tconst desc = (value as { _description?: unknown })._description;\n\t\t\t\t\treturn isString(desc, 1);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tnew Set(['MsgPropType', 'string']),\n\t\t\tvalue as Stringified<MsgPropType>,\n\t\t);\n\t});\n};\n\nexport function isMsgDefinedAndInputTouched(msg?: Stringified<MsgPropType>, touched?: boolean): boolean {\n\t/**\n\t * We support 5 types of messages:\n\t * - default\n\t * - info\n\t * - success\n\t * - warning\n\t * - error\n\t *\n\t * Messages on inputs are only rendered after the field has been touched,\n\t * regardless of the message type.\n\t */\n\treturn Boolean(msg) && touched === true;\n}\n\nexport const checkHasMsg = isMsgDefinedAndInputTouched;\n\nexport function normalizeMsg(msg?: Stringified<MsgPropType>): MsgPropType | undefined {\n\tif (typeof msg === 'string') {\n\t\ttry {\n\t\t\treturn parseJson<MsgPropType>(msg);\n\t\t} catch {\n\t\t\treturn { _description: msg, _type: 'error' };\n\t\t}\n\t}\n\tif (msg && typeof msg === 'object' && !('_type' in msg)) {\n\t\treturn { ...msg, _type: 'error' };\n\t}\n\treturn msg;\n}\n\nexport function getMsgType(msg?: Stringified<MsgPropType>): MsgPropType['_type'] | 'error' {\n\tif (typeof msg === 'string') {\n\t\treturn 'error';\n\t}\n\n\treturn msg?._type ?? 'error';\n}\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Hide message prop for form fields\n *\n * Description:\n * Hides the validation message of a form field visually. The field still marks itself invalid.\n */\nexport type HideMsgProp = SimpleProp<'hideMsg', boolean>;\nexport const hideMsgProp = createPropDefinition<HideMsgProp>('hideMsg', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Hint prop for form fields\n *\n * Description:\n * A short help text below the field. It is referenced by `aria-describedby`, so assistive\n * technology announces it together with the field (WCAG 3.3.2 Labels or Instructions).\n * The empty string renders no hint.\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions.html\n */\nexport type HintProp = SimpleProp<'hint', string>;\nexport const hintProp = createPropDefinition<HintProp>('hint', '', normalizeString);\n","import type { FormFieldLabelInfoPopoverProps } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * Info popover prop for form fields\n *\n * Description:\n * The props of a popover button that the field renders next to its label, for additional\n * information on the field. The object is passed on to the popover button as it is.\n */\nexport type InfoPopoverProp = SimpleProp<'infoPopover', FormFieldLabelInfoPopoverProps>;\n\nfunction normalizeInfoPopover(value: unknown): FormFieldLabelInfoPopoverProps | never {\n\tif (typeof value === 'object' && value !== null) {\n\t\treturn value as FormFieldLabelInfoPopoverProps;\n\t}\n\tthrow new Error(`Invalid info popover: ${typeof value}`);\n}\n\n// The default is `undefined`: without an info popover the label renders no popover button.\nexport const infoPopoverProp = createPropDefinition<InfoPopoverProp>(\n\t'infoPopover',\n\tundefined as unknown as FormFieldLabelInfoPopoverProps,\n\tnormalizeInfoPopover,\n);\n","import type { InputTypeOnDefault } from '../../schema';\nimport { createCallbacksPropDefinition } from './helpers/factory';\n\n/**\n * Callbacks prop (`_on`) shared by all form fields. Every field declares the same\n * `InputTypeOnDefault`; the value passed to `onChange` and `onInput` differs per field at runtime.\n */\nexport const inputCallbacksProp = createCallbacksPropDefinition<InputTypeOnDefault>();\n","import type { MsgPropType, Stringified } from '../../schema';\nimport { isObject, isString, parseJson } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * Message prop for form fields\n *\n * Description:\n * The validation message of a form field, as an object or as a JSON string when it is passed\n * through an HTML attribute. A plain string that is no JSON is kept as it is and rendered as an\n * error message. The message is only rendered once the field is touched.\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/error-identification.html\n */\nexport type MsgProp = SimpleProp<'msg', Stringified<MsgPropType>>;\n\nfunction normalizeMsg(value: unknown): Stringified<MsgPropType> {\n\tif (typeof value === 'string') {\n\t\ttry {\n\t\t\treturn parseJson<MsgPropType>(value);\n\t\t} catch {\n\t\t\treturn value;\n\t\t}\n\t}\n\treturn value as Stringified<MsgPropType>;\n}\n\nfunction validateMsg(value: Stringified<MsgPropType>): boolean {\n\tif (value === undefined) {\n\t\treturn true;\n\t}\n\tif (typeof value === 'string') {\n\t\treturn value.length > 0;\n\t}\n\treturn isObject(value) && isString((value as { _description?: unknown })._description, 1);\n}\n\n// The default is `undefined`: a field without a message renders neither the message nor its\n// `aria-describedby` reference, and every reader checks the message for truthiness.\nexport const msgProp = createPropDefinition<MsgProp>('msg', undefined as unknown as Stringified<MsgPropType>, normalizeMsg, validateMsg);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Touched prop for form fields\n *\n * Description:\n * Whether the user has already visited the field. Validation messages are only rendered for a\n * touched field; the field sets the prop itself once the focus leaves it.\n */\nexport type TouchedProp = SimpleProp<'touched', boolean>;\nexport const touchedProp = createPropDefinition<TouchedProp>('touched', false, normalizeBoolean);\n","import type { MsgPropType, Stringified } from '../../../schema';\nimport { getMsgType } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\n\ntype FormFieldAriaInput = {\n\tid: string;\n\tmsg?: Stringified<MsgPropType>;\n\thint?: string;\n\ttouched?: boolean;\n\thideMsg?: boolean;\n};\n\ntype FormFieldAria = {\n\t/** Whether the field is invalid: an error message is set and the field is touched. */\n\thasError: boolean;\n\thasHint: boolean;\n\t/** IDs of the message and the hint, referenced by the input's `aria-describedby`. */\n\tariaDescribedBy: string[];\n};\n\n/**\n * Derives `aria-invalid` and `aria-describedby` of a form field input.\n *\n * Known quirks, pinned by the snapshots (#11035): the message is referenced as soon as it is set,\n * although it is only rendered once the field is touched, and `hasError` ignores `hideMsg`.\n */\nexport const getFormFieldAria = ({ id, msg, hint, touched, hideMsg }: FormFieldAriaInput): FormFieldAria => {\n\tconst description = typeof msg === 'string' ? msg : msg?._description;\n\tconst hasMessage = Boolean(description && description.length > 0);\n\tconst hasError = getMsgType(msg) === 'error' && hasMessage && touched === true;\n\tconst hasHint = typeof hint === 'string' && hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasMessage && !hideMsg) {\n\t\tariaDescribedBy.push(createRelatedUniqueId(id, 'msg'));\n\t}\n\tif (hasHint) {\n\t\tariaDescribedBy.push(createRelatedUniqueId(id, 'hint'));\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\n\nexport type FormFieldHintFCProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\thint?: string;\n\t/** Block of the surrounding field, `kol-form-field` or `kol-field-control`. */\n\tbaseClassName?: string;\n};\n\n/** Hint below a form field; renders nothing for an empty hint. */\nexport const FormFieldHintFC: FC<FormFieldHintFCProps> = ({ id, class: classNames, hint, baseClassName = 'kol-form-field', ...other }) => {\n\tif (!hint) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<span class={clsx(`${baseClassName}__hint`, classNames)} id={createRelatedUniqueId(id || '', 'hint')} {...other}>\n\t\t\t{hint}\n\t\t</span>\n\t);\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport { translate } from '../../../i18n';\nimport { buildBadgeTextString } from '../../../schema';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport type { PopoverButtonFCProps } from '../popover-button/component';\nimport { PopoverButtonFC } from '../popover-button/component';\nimport { SpanFC } from '../span/component';\n\n/** The info popover of a form field label: the resolved popover button and the popover text. */\nexport type FormFieldInfoPopover = {\n\tpopoverButton: PopoverButtonFCProps;\n\tcontent: string;\n};\n\nexport type FormFieldLabelFCProps = JSXBase.HTMLAttributes<Omit<HTMLLabelElement | HTMLLegendElement, 'id' | 'hidden' | 'htmlFor'>> & {\n\t/** `legend` labels the fieldset of a radio group. */\n\tcomponent?: 'label' | 'legend';\n\tid: string;\n\tlabel?: string;\n\taccessKey?: string;\n\tshortKey?: string;\n\thasExpertSlot?: boolean;\n\thideLabel?: boolean;\n\t/** Block of the surrounding field, `kol-form-field` or `kol-field-control`. */\n\tbaseClassName?: string;\n\t/** Leaves the ID off the label, because the label tooltip of the control carries it. */\n\tomitId?: boolean;\n\tshowBadge?: boolean;\n\treadOnly?: boolean;\n\tinfoPopover?: FormFieldInfoPopover;\n};\n\n/**\n * Label of a form field with the access key badge, the read-only marker and the info popover. With\n * `hideLabel` the label stays in the DOM, hidden, and the field shows it as a tooltip instead.\n */\nexport const FormFieldLabelFC: FC<FormFieldLabelFCProps> = ({\n\tcomponent: Component = 'label',\n\tid,\n\tbaseClassName = 'kol-form-field',\n\tclass: classNames,\n\taccessKey,\n\tshortKey,\n\tlabel,\n\thideLabel,\n\thasExpertSlot,\n\tomitId,\n\tshowBadge = true,\n\treadOnly,\n\tinfoPopover,\n\t...other\n}) => {\n\tconst useTooltipInsteadOfLabel = !hasExpertSlot && hideLabel;\n\tconst badgeText = showBadge === false ? undefined : buildBadgeTextString(accessKey, shortKey);\n\n\treturn (\n\t\t<Component\n\t\t\t{...other}\n\t\t\tclass={clsx(`${baseClassName}__label`, classNames)}\n\t\t\tid={!useTooltipInsteadOfLabel && !omitId ? createRelatedUniqueId(id, 'label') : undefined}\n\t\t\thidden={useTooltipInsteadOfLabel}\n\t\t\thtmlFor={Component === 'legend' ? undefined : id}\n\t\t>\n\t\t\t<SpanFC class={`${baseClassName}__label-text`} label={hasExpertSlot ? '' : (label ?? '')} badgeText={badgeText}>\n\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t</SpanFC>\n\t\t\t{!hasExpertSlot && readOnly && (\n\t\t\t\t<span class={`${baseClassName}__label__read-only`} aria-hidden=\"true\">\n\t\t\t\t\t({translate('kol-readonly')})\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t{!hasExpertSlot && infoPopover && (\n\t\t\t\t/* The span is the flex item of the label: it holds the inline-block popover button in a\n\t\t\t\t line box, which sets the height of the label row. */\n\t\t\t\t<span>\n\t\t\t\t\t<PopoverButtonFC {...infoPopover.popoverButton}>\n\t\t\t\t\t\t<div class=\"kol-popover-button__popover--styled\">{infoPopover.content}</div>\n\t\t\t\t\t</PopoverButtonFC>\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</Component>\n\t);\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { AlertPropType, IdPropType, MsgPropType, Stringified } from '../../../schema';\nimport { normalizeMsg } from '../../../schema';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId, createUniqueId, nonce } from '../../../utils/dev.utils';\nimport { AlertFC } from '../alert/component';\n\nexport type FormFieldMsgFCProps = JSXBase.HTMLAttributes<HTMLElement> & {\n\talert?: AlertPropType;\n\tmsg?: Stringified<MsgPropType>;\n\tid: IdPropType;\n};\n\n/** Validation message of a form field, rendered as an inline alert. */\nexport const FormFieldMsgFC: FC<FormFieldMsgFCProps> = ({ alert, msg, id, class: classNames, ...other }) => {\n\tconst message = normalizeMsg(msg);\n\n\treturn (\n\t\t<AlertFC\n\t\t\talert={message?._alert ?? alert === true}\n\t\t\tclass={clsx('kol-form-field__msg', classNames)}\n\t\t\tcloserAriaDescriptionId={nonce()}\n\t\t\thandleCloserClick={() => undefined}\n\t\t\thasCloser={false}\n\t\t\theadingId={createUniqueId('alert-heading')}\n\t\t\tid={createRelatedUniqueId(id, 'msg')}\n\t\t\tlabel=\"\"\n\t\t\tlevel={0}\n\t\t\trefCloserButton={() => undefined}\n\t\t\trefCloserTooltip={() => undefined}\n\t\t\ttype={message?._type ?? 'error'}\n\t\t\tvariant=\"msg\"\n\t\t\t{...other}\n\t\t>\n\t\t\t{message?._description || undefined}\n\t\t</AlertFC>\n\t);\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport { translate } from '../../../i18n';\nimport type { MaxLengthBehaviorPropType, MsgPropType, Stringified, TooltipAlignPropType, VariantClassNamePropType } from '../../../schema';\nimport { buildBadgeTextString, classNameFromVariant, getMsgType, isMsgDefinedAndInputTouched, showExpertSlot } from '../../../schema';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport { TooltipFC } from '../tooltip/component';\nimport { FormFieldHintFC } from './hint';\nimport type { FormFieldInfoPopover } from './label';\nimport { FormFieldLabelFC } from './label';\nimport { FormFieldMsgFC } from './msg';\n\nconst formFieldBem = bem.forBlock('kol-form-field');\n\nexport type FormFieldFCProps = Omit<JSXBase.HTMLAttributes<HTMLDivElement>, 'ref'> & {\n\tid: string;\n\talert?: boolean;\n\tdisabled?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n\thint?: string;\n\tlabel: string;\n\thideLabel?: boolean;\n\thideMsg?: boolean;\n\tinfoPopover?: FormFieldInfoPopover;\n\taccessKey?: string;\n\tshortKey?: string;\n\tcounter?: {\n\t\tmaxLengthBehavior: MaxLengthBehaviorPropType;\n\t\tmaxLength?: number;\n\t\tvisualRef?: (el?: HTMLSpanElement) => void;\n\t\tariaRef?: (el?: HTMLSpanElement) => void;\n\t};\n\treadOnly?: boolean;\n\ttouched?: boolean;\n\trequired?: boolean;\n\trenderNoLabel?: boolean;\n\trenderNoTooltip?: boolean;\n\trenderNoHint?: boolean;\n\tmaxLength?: number;\n\tshowBadge?: boolean;\n\ttooltipAlign?: TooltipAlignPropType;\n\tvariant?: VariantClassNamePropType;\n\t/** `fieldset` groups the options of a radio group; its label is then a `legend` and `disabled` disables the `fieldset`. */\n\tcomponent?: 'div' | 'fieldset';\n\t/** Arranges the options of a group among each other or side by side. */\n\torientation?: 'horizontal' | 'vertical';\n\t/** Receives the `__input` wrapper, the reference element of the label tooltip. */\n\trefInput?: (el?: HTMLDivElement) => void;\n\t/** Receives the floating element of the label tooltip. */\n\trefTooltip: (el?: HTMLDivElement) => void;\n};\n\n/**\n * Whether the field shows its label as a tooltip instead of a visible label: with `hideLabel`,\n * unless the tooltip is disabled or the label is given through the expert slot.\n */\nexport const isLabelShownAsTooltip = ({ hideLabel, label, renderNoTooltip }: Pick<FormFieldFCProps, 'hideLabel' | 'label' | 'renderNoTooltip'>): boolean =>\n\t!renderNoTooltip && !showExpertSlot(label) && hideLabel === true;\n\ntype MsgTypeModifiers = Partial<\n\tRecord<\n\t\t'default' | 'error' | 'info' | 'success' | 'warning' | 'msg-type-default' | 'msg-type-error' | 'msg-type-info' | 'msg-type-success' | 'msg-type-warning',\n\t\tboolean\n\t>\n>;\n\nconst getMsgTypeModifiers = (msg?: Stringified<MsgPropType>): MsgTypeModifiers => {\n\tconst msgType = getMsgType(msg) as string;\n\treturn { [msgType]: true, [`msg-type-${msgType}`]: true };\n};\n\n/**\n * Stateless shell of a form field: label, the input wrapper with the label tooltip, the character\n * counter, the validation message, the hint and the hidden character limit hint. The web component\n * owns the tooltip behavior and connects it through `refInput` and `refTooltip`.\n */\nexport const FormFieldFC: FC<FormFieldFCProps> = (props, children) => {\n\tconst {\n\t\trenderNoLabel,\n\t\trenderNoTooltip,\n\t\trenderNoHint,\n\t\tid,\n\t\trequired,\n\t\talert,\n\t\tdisabled,\n\t\tclass: classNames,\n\t\tmsg,\n\t\thideMsg,\n\t\thideLabel,\n\t\tlabel,\n\t\tinfoPopover,\n\t\thint,\n\t\taccessKey,\n\t\tshortKey,\n\t\tcounter,\n\t\treadOnly,\n\t\ttouched,\n\t\tmaxLength,\n\t\tariaDescribedBy,\n\t\tshowBadge,\n\t\ttooltipAlign,\n\t\tvariant,\n\t\tcomponent = 'div',\n\t\torientation,\n\t\trefInput,\n\t\trefTooltip,\n\t\t...other\n\t} = props;\n\n\tconst hasExpertSlot = showExpertSlot(label);\n\tconst showMsg = isMsgDefinedAndInputTouched(msg, touched);\n\tconst badgeText = buildBadgeTextString(accessKey, shortKey);\n\tconst showTooltip = isLabelShownAsTooltip({ hideLabel, label, renderNoTooltip });\n\tconst isFieldset = component === 'fieldset';\n\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tcomponent={component}\n\t\t\tblock=\"kol-form-field\"\n\t\t\tmodifiers={{\n\t\t\t\tdisabled: Boolean(disabled),\n\t\t\t\trequired: Boolean(required),\n\t\t\t\ttouched: Boolean(touched),\n\t\t\t\t'hide-label': Boolean(hideLabel),\n\t\t\t\t'read-only': Boolean(readOnly),\n\t\t\t\t'hidden-msg': Boolean(hideMsg),\n\t\t\t\t...(showMsg ? getMsgTypeModifiers(msg) : {}),\n\t\t\t}}\n\t\t\tclass={clsx(variant && classNameFromVariant(variant, 'form-field'), classNames)}\n\t\t\t// A disabled `fieldset` marks the whole group, legend included, as an inactive control (WCAG 1.4.3).\n\t\t\tdisabled={isFieldset && disabled ? true : undefined}\n\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t{...other}\n\t\t>\n\t\t\t{!renderNoLabel && (\n\t\t\t\t<FormFieldLabelFC\n\t\t\t\t\tcomponent={isFieldset ? 'legend' : 'label'}\n\t\t\t\t\t// `FormFieldLabelFC` renders the `__label` element itself, so only the modifier is added here.\n\t\t\t\t\tclass={isFieldset ? 'kol-form-field__label--legend' : undefined}\n\t\t\t\t\tid={id}\n\t\t\t\t\thasExpertSlot={hasExpertSlot}\n\t\t\t\t\thideLabel={hideLabel}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\taccessKey={accessKey}\n\t\t\t\t\tshortKey={shortKey}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tshowBadge={showBadge}\n\t\t\t\t\tinfoPopover={infoPopover}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div\n\t\t\t\tclass={formFieldBem('input', {\n\t\t\t\t\t'orientation-horizontal': orientation === 'horizontal',\n\t\t\t\t\t'orientation-vertical': orientation === 'vertical',\n\t\t\t\t})}\n\t\t\t\tref={refInput}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t{showTooltip && (\n\t\t\t\t\t<div class={formFieldBem('tooltip')}>\n\t\t\t\t\t\t<TooltipFC badgeText={badgeText || ''} label={label} align={tooltipAlign} id={createRelatedUniqueId(id, 'label')} refFloating={refTooltip} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{counter && !(counter.maxLengthBehavior === 'soft' && typeof counter.maxLength !== 'number') && (\n\t\t\t\t<div class={formFieldBem('counter')}>\n\t\t\t\t\t<span data-testid=\"input-counter\" aria-hidden=\"true\" class={formFieldBem('counter')} ref={counter.visualRef} />\n\t\t\t\t\t<span aria-live=\"polite\" class=\"visually-hidden\" data-testid=\"input-counter-aria\" id={createRelatedUniqueId(id, 'counter')} ref={counter.ariaRef} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{showMsg && !hideMsg && <FormFieldMsgFC id={id} alert={alert} msg={msg} />}\n\t\t\t{!renderNoHint && <FormFieldHintFC id={id} hint={hint} />}\n\t\t\t{typeof maxLength === 'number' && !counter && (\n\t\t\t\t// The hidden character limit hint is only rendered without a counter: the counter spans\n\t\t\t\t// already announce the maximum.\n\t\t\t\t<span id={createRelatedUniqueId(id, 'character-limit-hint')} class=\"visually-hidden\">\n\t\t\t\t\t{translate('kol-character-limit-hint', { placeholders: { limit: String(maxLength) } })}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</BemRootNodeFC>\n\t);\n};\n","import type {\n\tFormFieldLabelInfoPopoverProps,\n\tInputTypeOnDefault,\n\tInternalButtonProps,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tStencilUnknown,\n\tStringified,\n\tTooltipAlignPropType,\n} from '../../../schema';\nimport { buildBadgeTextString } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport { dispatchDomEvent, KolEvent } from '../../../utils/events';\nimport {\n\tariaDetailsProp,\n\tdisabledProp,\n\thideLabelProp,\n\thideMsgProp,\n\thintProp,\n\tinfoPopoverProp,\n\tinputCallbacksProp,\n\tlabelWithExpertSlotProp,\n\tmsgProp,\n\tnameProp,\n\ttooltipAlignProp,\n\ttouchedProp,\n} from '../../props';\nimport { BaseWebComponent } from '../base-web-component';\nimport type { ButtonItemFcProps } from '../button/item';\nimport { createButtonItem } from '../button/item';\nimport type { FormAssociationType } from '../form-association/api';\nimport { FormAssociationBehavior } from '../form-association/behavior';\nimport { createPopoverButtonItem } from '../popover-button/item';\nimport { TooltipBehavior } from '../tooltip/behavior';\nimport type { FormFieldBaseApi } from './api';\nimport { getFormFieldAria } from './aria';\nimport { type FormFieldFCProps, isLabelShownAsTooltip } from './component';\nimport type { FormFieldInfoPopover } from './label';\n\ntype FormFieldExtras = Pick<FormFieldFCProps, 'counter' | 'maxLength' | 'readOnly' | 'renderNoLabel' | 'renderNoTooltip' | 'required'> & {\n\t/** Class of the field, e.g. `kol-input-color`, added to the `kol-form-field` root. */\n\tclass: string;\n\taccessKey?: string;\n\tshortKey?: string;\n\tvariant?: string[];\n};\n\n/**\n * Shared orchestrator implementation of the form fields: it applies the props every field has,\n * owns the form association and the label tooltip, and handles the events of the native control.\n *\n * The concrete element keeps what Stencil has to see in the component class itself (DD16):\n * `@Component`, `@Element`, `@State`, `@Method`, every `@Prop` with its `@Watch`, whose body calls\n * the matching `apply*` method, and the lifecycle methods.\n */\nexport abstract class BaseFormFieldWebComponent<Api extends FormFieldBaseApi> extends BaseWebComponent<Api> {\n\t/** The custom element; declared with `@Element()` by the concrete class. */\n\tprotected abstract readonly host?: HTMLElement;\n\n\t/** Read at event time, like the native `disabled` state. */\n\tpublic abstract _disabled?: boolean;\n\t/** Read at event time, so a callback replaced after the last render is still called. */\n\tpublic abstract _on?: InputTypeOnDefault;\n\t/** Set to `true` once the focus leaves the field. */\n\tpublic abstract _touched?: boolean;\n\n\tprotected formAssociation!: FormAssociationBehavior;\n\n\tprivate readonly tooltipBehavior = new TooltipBehavior(BaseWebComponent.stateLess);\n\n\tprivate readonly smartButton = createButtonItem(() => this.host);\n\n\t/**\n\t * The concrete element owns `infoPopoverOpen` as a `@State()` field, so toggling the popover\n\t * re-renders the field; the base API does not carry it, so access goes through a cast.\n\t */\n\tprivate readonly infoPopover = createPopoverButtonItem({\n\t\tgetFlagHost: () => this.host,\n\t\tgetOpen: () => (this as unknown as { infoPopoverOpen?: boolean }).infoPopoverOpen === true,\n\t\tsetOpen: (open) => {\n\t\t\t(this as unknown as { infoPopoverOpen: boolean }).infoPopoverOpen = open;\n\t\t},\n\t});\n\n\t/**\n\t * Whether the focus event of the current visit has been sent. It is reset only when the focus\n\t * leaves the host of an enabled field; `inputHasFocus` is reset on every blur.\n\t */\n\tprivate focusEventSent = false;\n\n\t/**\n\t * `ResolvedProps<Api>` cannot be resolved for a generic `Api`, so `setRenderProp('label', …)` does\n\t * not type-check here. The base props exist in every field API (`Api extends FormFieldBaseApi`),\n\t * so this view on the same instance is typed with the base API instead.\n\t */\n\tprivate get shared(): BaseFormFieldWebComponent<FormFieldBaseApi> {\n\t\treturn this as unknown as BaseFormFieldWebComponent<FormFieldBaseApi>;\n\t}\n\n\t/**\n\t * Creates the form association. Must be called from the concrete element's constructor (after\n\t * `super()`): Stencil populates `@Element()` there, and the hidden form element depends on the\n\t * name known at that point.\n\t */\n\tprotected initFormAssociation(type: FormAssociationType, name?: string): void {\n\t\tthis.formAssociation = new FormAssociationBehavior(BaseWebComponent.stateLess, { host: this.host, type, name });\n\t}\n\n\t/** Call from `componentDidRender`. */\n\tprotected syncFormField(): void {\n\t\tthis.smartButton.syncListeners();\n\t\tthis.infoPopover.syncListeners();\n\t}\n\n\t/** Call from `disconnectedCallback`. */\n\tprotected destroyFormField(): void {\n\t\tthis.tooltipBehavior.destroy();\n\t\tthis.smartButton.destroy();\n\t\tthis.infoPopover.destroy();\n\t}\n\n\t/**\n\t * The info popover of the label, `undefined` without `_infoPopover`. Its toggle button is a ghost\n\t * button by default; it always hides its label and renders inline.\n\t */\n\tprotected getInfoPopover(): FormFieldInfoPopover | undefined {\n\t\tconst infoPopover = this.shared.getRenderProp('infoPopover');\n\t\tif (!infoPopover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst { _content, ...popoverButton } = infoPopover;\n\t\treturn {\n\t\t\tpopoverButton: this.infoPopover.getFcProps({ _variant: 'ghost', ...popoverButton, _hideLabel: true, _inline: true }),\n\t\t\tcontent: _content,\n\t\t};\n\t}\n\n\t/**\n\t * `ButtonFC` props of the `_smartButton`, `undefined` without one. The smart button hides its\n\t * label and takes the disabled state of the field; its own `_hideLabel` and `_disabled` win.\n\t */\n\tprotected getSmartButtonFcProps(smartButton: InternalButtonProps | undefined, disabled?: boolean): ButtonItemFcProps | undefined {\n\t\tif (typeof smartButton !== 'object' || smartButton === null) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.smartButton.getFcProps({ _hideLabel: true, _disabled: disabled, ...smartButton }, { class: 'kol-input-container__smart-button' });\n\t}\n\n\t// --- Prop application (the concrete element's watchers delegate here) ---\n\n\tprotected applyAriaDetails(value?: string): void {\n\t\tariaDetailsProp.apply(value, (v) => this.shared.setRenderProp('ariaDetails', v));\n\t\tthis.formAssociation.watchAriaDetails(value);\n\t}\n\n\tprotected applyDisabled(value?: boolean): void {\n\t\tdisabledProp.apply(value, (v) => this.shared.setRenderProp('disabled', v));\n\t}\n\n\tprotected applyHideLabel(value?: boolean): void {\n\t\thideLabelProp.apply(value, (v) => this.shared.setRenderProp('hideLabel', v));\n\t}\n\n\tprotected applyHideMsg(value?: boolean): void {\n\t\thideMsgProp.apply(value, (v) => this.shared.setRenderProp('hideMsg', v));\n\t}\n\n\tprotected applyHint(value?: string): void {\n\t\thintProp.apply(value, (v) => this.shared.setRenderProp('hint', v));\n\t}\n\n\tprotected applyInfoPopover(value?: FormFieldLabelInfoPopoverProps): void {\n\t\tinfoPopoverProp.apply(value, (v) => this.shared.setRenderProp('infoPopover', v));\n\t}\n\n\t/** `false` enables the expert slot, which the field renders for an empty label. */\n\tprotected applyLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tconst label: unknown = value;\n\t\tlabelWithExpertSlotProp.apply(label === false ? '' : value, (v) => this.shared.setRenderProp('label', v));\n\t}\n\n\tprotected applyMsg(value?: Stringified<MsgPropType>): void {\n\t\tmsgProp.apply(value, (v) => this.shared.setRenderProp('msg', v));\n\t}\n\n\tprotected applyName(value?: string): void {\n\t\tnameProp.apply(value, (v) => this.shared.setRenderProp('name', v));\n\t\tthis.formAssociation.watchName(value);\n\t}\n\n\tprotected applyOn(value?: InputTypeOnDefault): void {\n\t\tinputCallbacksProp.apply(value, (v) => this.shared.setRenderProp('on', v));\n\t}\n\n\tprotected applySyncValueBySelector(value?: string): void {\n\t\tthis.formAssociation.watchSyncValueBySelector(value);\n\t}\n\n\t/** Form fields show the tooltip on top by default; the shared prop defaults to `'right'`. */\n\tprotected applyTooltipAlign(value?: TooltipAlignPropType): void {\n\t\ttooltipAlignProp.apply(value ?? 'top', (v) => this.shared.setRenderProp('tooltipAlign', v));\n\t}\n\n\tprotected applyTouched(value?: boolean): void {\n\t\ttouchedProp.apply(value, (v) => this.shared.setRenderProp('touched', v));\n\t}\n\n\t// --- Event handling of the native control ---\n\n\t/**\n\t * The element that receives the KoliBri events and frames the focus of the field: the nearest host\n\t * with a shadow root, as resolved by the form association. It is the field itself, unless the field\n\t * renders into the shadow root of another component (`PageSizeSelect` in `kol-pagination`).\n\t */\n\tprivate get eventHost(): Element | undefined {\n\t\treturn this.formAssociation?.host ?? this.host;\n\t}\n\n\tprivate emit(type: KolEvent, value?: unknown): void {\n\t\tif (this.eventHost) {\n\t\t\tdispatchDomEvent(this.eventHost as HTMLElement, type, value);\n\t\t}\n\t}\n\n\t/** Dispatches the KoliBri event before the `_on` callback is called. */\n\tprotected readonly handleChange = (event: Event, value?: unknown): void => {\n\t\tevent.stopPropagation();\n\t\tif (typeof value === 'undefined') {\n\t\t\tvalue = (event.target as HTMLInputElement).value;\n\t\t}\n\t\tthis.emit(KolEvent.change, value);\n\t\tthis._on?.onChange?.(event, value);\n\t};\n\n\tprotected readonly handleInput = (event: Event, value?: unknown): void => {\n\t\tevent.stopPropagation();\n\t\tif (typeof value === 'undefined') {\n\t\t\tvalue = (event.target as HTMLInputElement).value;\n\t\t}\n\t\tthis.emit(KolEvent.input, value);\n\t\tthis.formAssociation.setFormAssociatedValue(value as StencilUnknown);\n\t\tthis._on?.onInput?.(event, value);\n\t};\n\n\tprotected readonly handleClick = (event: Event): void => {\n\t\tthis.emit(KolEvent.click);\n\t\tthis._on?.onClick?.(event);\n\t};\n\n\tprotected readonly handleFocus = (event: FocusEvent): void => {\n\t\tif (!this.focusEventSent) {\n\t\t\tthis.emit(KolEvent.focus);\n\t\t\tthis._on?.onFocus?.(event);\n\t\t\tthis.focusEventSent = true;\n\t\t}\n\t\tthis.shared.setState('inputHasFocus', true);\n\t};\n\n\tprotected readonly handleBlur = (event: FocusEvent): void => {\n\t\tthis.handleFocusLeave(event);\n\t\tthis.shared.setState('inputHasFocus', false);\n\t};\n\n\t/**\n\t * Sends the blur when the focus leaves the field; focus moving to another element inside the field,\n\t * e.g. the smart button, is no blur of the field. `handleBlur` also resets `inputHasFocus`.\n\t */\n\tprotected handleFocusLeave(event: FocusEvent): void {\n\t\tif (this._disabled) {\n\t\t\treturn;\n\t\t}\n\t\tconst host = this.eventHost;\n\t\tconst root = host?.shadowRoot || host;\n\t\tconst isFocusInside = root?.contains(event.relatedTarget as Node) || host === event.relatedTarget;\n\t\tif (this.focusEventSent && !isFocusInside) {\n\t\t\tthis._touched = true;\n\t\t\tthis.emit(KolEvent.blur);\n\t\t\tthis._on?.onBlur?.(event);\n\t\t\tthis.focusEventSent = false;\n\t\t}\n\t}\n\n\tprotected readonly handleKeyDown = (event: KeyboardEvent): void => {\n\t\tthis.emit(KolEvent.keydown);\n\t\tthis._on?.onKeyDown?.(event);\n\t};\n\n\t// --- Render ---\n\n\t/** `aria-invalid` and `aria-describedby` of the native control. */\n\tprotected getAria(): ReturnType<typeof getFormFieldAria> {\n\t\tconst shared = this.shared;\n\t\treturn getFormFieldAria({\n\t\t\tid: shared.getState('id'),\n\t\t\tmsg: shared.getRenderProp('msg'),\n\t\t\thint: shared.getRenderProp('hint'),\n\t\t\ttouched: shared.getRenderProp('touched'),\n\t\t\thideMsg: shared.getRenderProp('hideMsg'),\n\t\t});\n\t}\n\n\t/** A touched message is announced as alert only while the control does not have the focus. */\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.shared.getRenderProp('touched')) && !this.shared.getState('inputHasFocus');\n\t}\n\n\tprivate readonly setInputRef = (el?: HTMLDivElement): void => {\n\t\tif (el && this.isTooltipShown()) {\n\t\t\tthis.tooltipBehavior.initContext(el);\n\t\t\tthis.tooltipBehavior.syncListeners(undefined, el, true);\n\t\t}\n\t};\n\n\tprivate readonly setTooltipRef = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipBehavior.setTooltipElementRef(el);\n\t};\n\n\tprivate isTooltipShown(): boolean {\n\t\tconst shared = this.shared;\n\t\treturn isLabelShownAsTooltip({ hideLabel: shared.getRenderProp('hideLabel'), label: shared.getRenderProp('label') });\n\t}\n\n\t/**\n\t * Refs of the label tooltip for a field that renders it in its `FieldControlFC` instead of the\n\t * form field shell, together with `renderNoTooltip` for `getFormFieldProps`.\n\t */\n\tprotected getLabelTooltipRefs(): { refInput: (el?: HTMLDivElement) => void; refTooltip: (el?: HTMLDivElement) => void } {\n\t\treturn { refInput: this.setInputRef, refTooltip: this.setTooltipRef };\n\t}\n\n\t/**\n\t * Props of the form field shell around the native control. Call once per render: it also hands\n\t * label, alignment and badge to the label tooltip, or tears it down while the label is visible.\n\t * With `renderNoTooltip` the shell does not connect the tooltip; see `getLabelTooltipRefs`.\n\t */\n\tprotected getFormFieldProps({\n\t\tclass: classNames,\n\t\taccessKey,\n\t\tshortKey,\n\t\tvariant,\n\t\tcounter,\n\t\tmaxLength,\n\t\treadOnly,\n\t\trenderNoLabel,\n\t\trenderNoTooltip,\n\t\trequired,\n\t}: FormFieldExtras): FormFieldFCProps {\n\t\tconst shared = this.shared;\n\t\tconst id = shared.getState('id');\n\t\tconst label = shared.getRenderProp('label');\n\t\tconst tooltipAlign = shared.getRenderProp('tooltipAlign');\n\n\t\tif (this.isTooltipShown()) {\n\t\t\tthis.tooltipBehavior.watchAlign(tooltipAlign);\n\t\t\tthis.tooltipBehavior.watchBadgeText(buildBadgeTextString(accessKey, shortKey) || '');\n\t\t\tthis.tooltipBehavior.watchId(createRelatedUniqueId(id, 'label'));\n\t\t\tthis.tooltipBehavior.watchLabel(label);\n\t\t} else {\n\t\t\tthis.tooltipBehavior.destroy();\n\t\t}\n\n\t\treturn {\n\t\t\tid,\n\t\t\tdisabled: shared.getRenderProp('disabled'),\n\t\t\tmsg: shared.getRenderProp('msg'),\n\t\t\thint: shared.getRenderProp('hint'),\n\t\t\tlabel,\n\t\t\thideLabel: shared.getRenderProp('hideLabel'),\n\t\t\thideMsg: shared.getRenderProp('hideMsg'),\n\t\t\ttouched: shared.getRenderProp('touched'),\n\t\t\tshowBadge: Boolean(accessKey) || Boolean(shortKey),\n\t\t\trequired,\n\t\t\treadOnly,\n\t\t\taccessKey,\n\t\t\tshortKey,\n\t\t\tmaxLength,\n\t\t\tcounter,\n\t\t\tvariant,\n\t\t\tclass: classNames,\n\t\t\ttooltipAlign,\n\t\t\talert: this.showAsAlert(),\n\t\t\tinfoPopover: this.getInfoPopover(),\n\t\t\trenderNoLabel,\n\t\t\trenderNoTooltip,\n\t\t\trefInput: renderNoTooltip ? undefined : this.setInputRef,\n\t\t\trefTooltip: this.setTooltipRef,\n\t\t};\n\t}\n}\n","/**\n * Attributes every native form control of a field gets: no title tooltip, no autocapitalization or\n * autocorrection, the `aria-describedby` references and, with a hidden label, the label as\n * `aria-label`.\n */\nexport function getDefaultInputProps({ ariaDescribedBy, hideLabel, label }: { ariaDescribedBy?: string[]; hideLabel?: boolean; label?: string }): {\n\ttitle: string;\n\tautoCapitalize: string;\n\tautoCorrect: string;\n\t'aria-describedby'?: string;\n\t'aria-label'?: string;\n} {\n\treturn {\n\t\ttitle: '',\n\t\tautoCapitalize: 'off',\n\t\tautoCorrect: 'off',\n\t\t'aria-describedby': ariaDescribedBy?.length ? ariaDescribedBy.join(' ') : undefined,\n\t\t'aria-label': hideLabel && label ? label : undefined,\n\t};\n}\n\n/** Props of a native form control FC: the native attributes plus the field's label and descriptions. */\nexport type DefaultInputProps<T> = Omit<\n\t{\n\t\t// `aria${string}` is declared in the Stencil HTML types and collides with these props.\n\t\t[K in keyof T as K extends `aria${string}` ? never : K]: T[K];\n\t},\n\t'title' | 'autoCapitalize' | 'autoCorrect' | 'spellcheck'\n> & {\n\t/** Omitted by a secondary control the label does not reference, e.g. the range input of `kol-input-range`. */\n\tid?: string;\n\tariaDescribedBy?: string[];\n\thideLabel?: boolean;\n\tlabel?: string;\n};\n","import {\n\tariaDetailsProp,\n\tdisabledProp,\n\thideLabelProp,\n\thideMsgProp,\n\thintProp,\n\tinfoPopoverProp,\n\tinputCallbacksProp,\n\tlabelWithExpertSlotProp,\n\tmsgProp,\n\tnameProp,\n\ttooltipAlignProp,\n\ttouchedProp,\n} from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props every form field has, with the same type and default. A field's own config spreads these\n * in; props only some fields have (e.g. `accessKey`, `required`) stay in the field's config, because\n * `WebComponentInterface` requires a watcher for every config prop.\n */\nexport const formFieldBasePropsConfig = {\n\trequired: [labelWithExpertSlotProp],\n\toptional: [\n\t\tariaDetailsProp,\n\t\tdisabledProp,\n\t\thideLabelProp,\n\t\thideMsgProp,\n\t\thintProp,\n\t\tinfoPopoverProp,\n\t\tinputCallbacksProp,\n\t\tmsgProp,\n\t\tnameProp,\n\t\ttooltipAlignProp,\n\t\ttouchedProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type FormFieldBaseStates = {\n\t/** Base ID of the field; the IDs of label, hint, message and datalist derive from it. */\n\tid: string;\n\t/** Whether the native control has the focus; a touched message is announced as alert only without it. */\n\tinputHasFocus: boolean;\n};\n\nexport type FormFieldBaseApi = ApiFromConfig<typeof formFieldBasePropsConfig, { States: FormFieldBaseStates }>;\n"],"names":["normalizeMsg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CgB,SAAA,2BAA2B,CAAC,GAA8B,EAAE,OAAiB,EAAA;IAY5F,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,KAAK,IAAI;AACxC;AAIM,SAAUA,cAAY,CAAC,GAA8B,EAAA;AAC1D,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC5B,QAAA,IAAI;AACH,YAAA,OAAO,SAAS,CAAc,GAAG,CAAC;;QACjC,OAAA,EAAA,EAAM;YACP,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE;;;AAG9C,IAAA,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,EAAE,OAAO,IAAI,GAAG,CAAC,EAAE;AACxD,QAAA,OAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAY,GAAG,CAAA,EAAA,EAAE,KAAK,EAAE,OAAO,EAAG,CAAA;;AAEnC,IAAA,OAAO,GAAG;AACX;AAEM,SAAU,UAAU,CAAC,GAA8B,EAAA;;AACxD,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC5B,QAAA,OA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AAO;AACN,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,cAAc,EAAE,KAAK;AACrB,QAAA,WAAW,EAAE,KAAK;AAClB,QAAA,kBAAkB,EAAE,CAAA,eAAe,KAAA,IAAA,IAAf,eAAe,KAAf,MAAA,GAAA,MAAA,GAAA,eAAe,CAAE,MAAM,IAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS;QACnF,YAAY,EAAE,SAAS,IAAI,KAAK,GAAG,KAAK,GAAG,SAAS;KACpD;AACF;;ACEa,MAAA,wBAAwB,GAAG;IACvC,QAAQ,EAAE,CAAC,uBAAuB,CAAC;AACnC,IAAA,QAAQ,EAAE;QACT,eAAe;QACf,YAAY;QACZ,aAAa;QACb,WAAW;QACX,QAAQ;QACR,eAAe;QACf,kBAAkB;QAClB,OAAO;QACP,QAAQ;QACR,gBAAgB;QAChB,WAAW;AACX,KAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"api-BAEPnyL7.js","sources":["src/schema/props/msg.ts","src/internal/props/hide-msg.ts","src/internal/props/hint.ts","src/internal/props/info-popover.ts","src/internal/props/input-callbacks.ts","src/internal/props/msg.ts","src/internal/props/touched.ts","src/internal/functional-components/form-field/aria.ts","src/internal/functional-components/form-field/hint.tsx","src/internal/functional-components/form-field/label.tsx","src/internal/functional-components/form-field/msg.tsx","src/internal/functional-components/form-field/component.tsx","src/internal/functional-components/form-field/base-web-component.tsx","src/internal/functional-components/form-field/default-input-props.ts","src/internal/functional-components/form-field/api.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { AlertProps } from '../components';\nimport type { Stringified } from '../types';\nimport { objectObjectHandler, parseJson, watchValidator } from '../utils';\nimport { isObject, isString } from '../validators';\n\n/* types */\nexport type MsgPropType = Omit<AlertProps, '_level' | '_on' | '_label' | '_hasCloser' | '_variant'> & { _description: string };\n\n/**\n * Defines the properties for a message rendered as Alert component.\n */\nexport type PropMsg = {\n\tmsg: Stringified<MsgPropType>;\n};\n\n/* validator */\nexport const validateMsg = (component: Generic.Element.Component, value?: Stringified<MsgPropType>): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<MsgPropType>(value);\n\t\t} catch {\n\t\t\t// value keeps original value\n\t\t}\n\t\twatchValidator<Stringified<MsgPropType>>(\n\t\t\tcomponent,\n\t\t\t`_msg`,\n\t\t\t(value) => {\n\t\t\t\tif (value === undefined) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (typeof value === 'string' && value.length > 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (isObject(value) && value !== null) {\n\t\t\t\t\tconst desc = (value as { _description?: unknown })._description;\n\t\t\t\t\treturn isString(desc, 1);\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tnew Set(['MsgPropType', 'string']),\n\t\t\tvalue as Stringified<MsgPropType>,\n\t\t);\n\t});\n};\n\nexport function isMsgDefinedAndInputTouched(msg?: Stringified<MsgPropType>, touched?: boolean): boolean {\n\t/**\n\t * We support 5 types of messages:\n\t * - default\n\t * - info\n\t * - success\n\t * - warning\n\t * - error\n\t *\n\t * Messages on inputs are only rendered after the field has been touched,\n\t * regardless of the message type.\n\t */\n\treturn Boolean(msg) && touched === true;\n}\n\nexport const checkHasMsg = isMsgDefinedAndInputTouched;\n\nexport function normalizeMsg(msg?: Stringified<MsgPropType>): MsgPropType | undefined {\n\tif (typeof msg === 'string') {\n\t\ttry {\n\t\t\treturn parseJson<MsgPropType>(msg);\n\t\t} catch {\n\t\t\treturn { _description: msg, _type: 'error' };\n\t\t}\n\t}\n\tif (msg && typeof msg === 'object' && !('_type' in msg)) {\n\t\treturn { ...msg, _type: 'error' };\n\t}\n\treturn msg;\n}\n\nexport function getMsgType(msg?: Stringified<MsgPropType>): MsgPropType['_type'] | 'error' {\n\tif (typeof msg === 'string') {\n\t\treturn 'error';\n\t}\n\n\treturn msg?._type ?? 'error';\n}\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Hide message prop for form fields\n *\n * Description:\n * Hides the validation message of a form field visually. The field still marks itself invalid.\n */\nexport type HideMsgProp = SimpleProp<'hideMsg', boolean>;\nexport const hideMsgProp = createPropDefinition<HideMsgProp>('hideMsg', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Hint prop for form fields\n *\n * Description:\n * A short help text below the field. It is referenced by `aria-describedby`, so assistive\n * technology announces it together with the field (WCAG 3.3.2 Labels or Instructions).\n * The empty string renders no hint.\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions.html\n */\nexport type HintProp = SimpleProp<'hint', string>;\nexport const hintProp = createPropDefinition<HintProp>('hint', '', normalizeString);\n","import type { FormFieldLabelInfoPopoverProps } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * Info popover prop for form fields\n *\n * Description:\n * The props of a popover button that the field renders next to its label, for additional\n * information on the field. The object is passed on to the popover button as it is.\n */\nexport type InfoPopoverProp = SimpleProp<'infoPopover', FormFieldLabelInfoPopoverProps>;\n\nfunction normalizeInfoPopover(value: unknown): FormFieldLabelInfoPopoverProps | never {\n\tif (typeof value === 'object' && value !== null) {\n\t\treturn value as FormFieldLabelInfoPopoverProps;\n\t}\n\tthrow new Error(`Invalid info popover: ${typeof value}`);\n}\n\n// The default is `undefined`: without an info popover the label renders no popover button.\nexport const infoPopoverProp = createPropDefinition<InfoPopoverProp>(\n\t'infoPopover',\n\tundefined as unknown as FormFieldLabelInfoPopoverProps,\n\tnormalizeInfoPopover,\n);\n","import type { InputTypeOnDefault } from '../../schema';\nimport { createCallbacksPropDefinition } from './helpers/factory';\n\n/**\n * Callbacks prop (`_on`) shared by all form fields. Every field declares the same\n * `InputTypeOnDefault`; the value passed to `onChange` and `onInput` differs per field at runtime.\n */\nexport const inputCallbacksProp = createCallbacksPropDefinition<InputTypeOnDefault>();\n","import type { MsgPropType, Stringified } from '../../schema';\nimport { isObject, isString, parseJson } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * Message prop for form fields\n *\n * Description:\n * The validation message of a form field, as an object or as a JSON string when it is passed\n * through an HTML attribute. A plain string that is no JSON is kept as it is and rendered as an\n * error message. The message is only rendered once the field is touched.\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/error-identification.html\n */\nexport type MsgProp = SimpleProp<'msg', Stringified<MsgPropType>>;\n\nfunction normalizeMsg(value: unknown): Stringified<MsgPropType> {\n\tif (typeof value === 'string') {\n\t\ttry {\n\t\t\treturn parseJson<MsgPropType>(value);\n\t\t} catch {\n\t\t\treturn value;\n\t\t}\n\t}\n\treturn value as Stringified<MsgPropType>;\n}\n\nfunction validateMsg(value: Stringified<MsgPropType>): boolean {\n\tif (value === undefined) {\n\t\treturn true;\n\t}\n\tif (typeof value === 'string') {\n\t\treturn value.length > 0;\n\t}\n\treturn isObject(value) && isString((value as { _description?: unknown })._description, 1);\n}\n\n// The default is `undefined`: a field without a message renders neither the message nor its\n// `aria-describedby` reference, and every reader checks the message for truthiness.\nexport const msgProp = createPropDefinition<MsgProp>('msg', undefined as unknown as Stringified<MsgPropType>, normalizeMsg, validateMsg);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Touched prop for form fields\n *\n * Description:\n * Whether the user has already visited the field. Validation messages are only rendered for a\n * touched field; the field sets the prop itself once the focus leaves it.\n */\nexport type TouchedProp = SimpleProp<'touched', boolean>;\nexport const touchedProp = createPropDefinition<TouchedProp>('touched', false, normalizeBoolean);\n","import type { MsgPropType, Stringified } from '../../../schema';\nimport { getMsgType } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\n\ntype FormFieldAriaInput = {\n\tid: string;\n\tmsg?: Stringified<MsgPropType>;\n\thint?: string;\n\ttouched?: boolean;\n\thideMsg?: boolean;\n};\n\ntype FormFieldAria = {\n\t/** Whether the field is invalid: an error message is set and the field is touched. */\n\thasError: boolean;\n\thasHint: boolean;\n\t/** IDs of the message and the hint, referenced by the input's `aria-describedby`. */\n\tariaDescribedBy: string[];\n};\n\n/**\n * Derives `aria-invalid` and `aria-describedby` of a form field input.\n *\n * Known quirks, pinned by the snapshots (#11035): the message is referenced as soon as it is set,\n * although it is only rendered once the field is touched, and `hasError` ignores `hideMsg`.\n */\nexport const getFormFieldAria = ({ id, msg, hint, touched, hideMsg }: FormFieldAriaInput): FormFieldAria => {\n\tconst description = typeof msg === 'string' ? msg : msg?._description;\n\tconst hasMessage = Boolean(description && description.length > 0);\n\tconst hasError = getMsgType(msg) === 'error' && hasMessage && touched === true;\n\tconst hasHint = typeof hint === 'string' && hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasMessage && !hideMsg) {\n\t\tariaDescribedBy.push(createRelatedUniqueId(id, 'msg'));\n\t}\n\tif (hasHint) {\n\t\tariaDescribedBy.push(createRelatedUniqueId(id, 'hint'));\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\n\nexport type FormFieldHintFCProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\thint?: string;\n\t/** Block of the surrounding field, `kol-form-field` or `kol-field-control`. */\n\tbaseClassName?: string;\n};\n\n/** Hint below a form field; renders nothing for an empty hint. */\nexport const FormFieldHintFC: FC<FormFieldHintFCProps> = ({ id, class: classNames, hint, baseClassName = 'kol-form-field', ...other }) => {\n\tif (!hint) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<span class={clsx(`${baseClassName}__hint`, classNames)} id={createRelatedUniqueId(id || '', 'hint')} {...other}>\n\t\t\t{hint}\n\t\t</span>\n\t);\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport { translate } from '../../../i18n';\nimport { buildBadgeTextString } from '../../../schema';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport type { PopoverButtonFCProps } from '../popover-button/component';\nimport { PopoverButtonFC } from '../popover-button/component';\nimport { SpanFC } from '../span/component';\n\n/** The info popover of a form field label: the resolved popover button and the popover text. */\nexport type FormFieldInfoPopover = {\n\tpopoverButton: PopoverButtonFCProps;\n\tcontent: string;\n};\n\nexport type FormFieldLabelFCProps = JSXBase.HTMLAttributes<Omit<HTMLLabelElement | HTMLLegendElement, 'id' | 'hidden' | 'htmlFor'>> & {\n\t/** `legend` labels the fieldset of a radio group. */\n\tcomponent?: 'label' | 'legend';\n\tid: string;\n\tlabel?: string;\n\taccessKey?: string;\n\tshortKey?: string;\n\thasExpertSlot?: boolean;\n\thideLabel?: boolean;\n\t/** Block of the surrounding field, `kol-form-field` or `kol-field-control`. */\n\tbaseClassName?: string;\n\t/** Leaves the ID off the label, because the label tooltip of the control carries it. */\n\tomitId?: boolean;\n\tshowBadge?: boolean;\n\treadOnly?: boolean;\n\tinfoPopover?: FormFieldInfoPopover;\n};\n\n/**\n * Label of a form field with the access key badge, the read-only marker and the info popover. With\n * `hideLabel` the label stays in the DOM, hidden, and the field shows it as a tooltip instead.\n */\nexport const FormFieldLabelFC: FC<FormFieldLabelFCProps> = ({\n\tcomponent: Component = 'label',\n\tid,\n\tbaseClassName = 'kol-form-field',\n\tclass: classNames,\n\taccessKey,\n\tshortKey,\n\tlabel,\n\thideLabel,\n\thasExpertSlot,\n\tomitId,\n\tshowBadge = true,\n\treadOnly,\n\tinfoPopover,\n\t...other\n}) => {\n\tconst useTooltipInsteadOfLabel = !hasExpertSlot && hideLabel;\n\tconst badgeText = showBadge === false ? undefined : buildBadgeTextString(accessKey, shortKey);\n\n\treturn (\n\t\t<Component\n\t\t\t{...other}\n\t\t\tclass={clsx(`${baseClassName}__label`, classNames)}\n\t\t\tid={!useTooltipInsteadOfLabel && !omitId ? createRelatedUniqueId(id, 'label') : undefined}\n\t\t\thidden={useTooltipInsteadOfLabel}\n\t\t\thtmlFor={Component === 'legend' ? undefined : id}\n\t\t>\n\t\t\t<SpanFC class={`${baseClassName}__label-text`} label={hasExpertSlot ? '' : (label ?? '')} badgeText={badgeText}>\n\t\t\t\t<slot name=\"expert\"></slot>\n\t\t\t</SpanFC>\n\t\t\t{!hasExpertSlot && readOnly && (\n\t\t\t\t<span class={`${baseClassName}__label__read-only`} aria-hidden=\"true\">\n\t\t\t\t\t({translate('kol-readonly')})\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t{!hasExpertSlot && infoPopover && (\n\t\t\t\t/* The span is the flex item of the label: it holds the inline-block popover button in a\n\t\t\t\t line box, which sets the height of the label row. */\n\t\t\t\t<span>\n\t\t\t\t\t<PopoverButtonFC {...infoPopover.popoverButton}>\n\t\t\t\t\t\t<div class=\"kol-popover-button__popover--styled\">{infoPopover.content}</div>\n\t\t\t\t\t</PopoverButtonFC>\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</Component>\n\t);\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { AlertPropType, IdPropType, MsgPropType, Stringified } from '../../../schema';\nimport { normalizeMsg } from '../../../schema';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId, createUniqueId, nonce } from '../../../utils/dev.utils';\nimport { AlertFC } from '../alert/component';\n\nexport type FormFieldMsgFCProps = JSXBase.HTMLAttributes<HTMLElement> & {\n\talert?: AlertPropType;\n\tmsg?: Stringified<MsgPropType>;\n\tid: IdPropType;\n};\n\n/** Validation message of a form field, rendered as an inline alert. */\nexport const FormFieldMsgFC: FC<FormFieldMsgFCProps> = ({ alert, msg, id, class: classNames, ...other }) => {\n\tconst message = normalizeMsg(msg);\n\n\treturn (\n\t\t<AlertFC\n\t\t\talert={message?._alert ?? alert === true}\n\t\t\tclass={clsx('kol-form-field__msg', classNames)}\n\t\t\tcloserAriaDescriptionId={nonce()}\n\t\t\thandleCloserClick={() => undefined}\n\t\t\thasCloser={false}\n\t\t\theadingId={createUniqueId('alert-heading')}\n\t\t\tid={createRelatedUniqueId(id, 'msg')}\n\t\t\tlabel=\"\"\n\t\t\tlevel={0}\n\t\t\trefCloserButton={() => undefined}\n\t\t\trefCloserTooltip={() => undefined}\n\t\t\ttype={message?._type ?? 'error'}\n\t\t\tvariant=\"msg\"\n\t\t\t{...other}\n\t\t>\n\t\t\t{message?._description || undefined}\n\t\t</AlertFC>\n\t);\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport { translate } from '../../../i18n';\nimport type { MaxLengthBehaviorPropType, MsgPropType, Stringified, TooltipAlignPropType, VariantClassNamePropType } from '../../../schema';\nimport { buildBadgeTextString, classNameFromVariant, getMsgType, isMsgDefinedAndInputTouched, showExpertSlot } from '../../../schema';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport { TooltipFC } from '../tooltip/component';\nimport { FormFieldHintFC } from './hint';\nimport type { FormFieldInfoPopover } from './label';\nimport { FormFieldLabelFC } from './label';\nimport { FormFieldMsgFC } from './msg';\n\nconst formFieldBem = bem.forBlock('kol-form-field');\n\nexport type FormFieldFCProps = Omit<JSXBase.HTMLAttributes<HTMLDivElement>, 'ref'> & {\n\tid: string;\n\talert?: boolean;\n\tdisabled?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n\thint?: string;\n\tlabel: string;\n\thideLabel?: boolean;\n\thideMsg?: boolean;\n\tinfoPopover?: FormFieldInfoPopover;\n\taccessKey?: string;\n\tshortKey?: string;\n\tcounter?: {\n\t\tmaxLengthBehavior: MaxLengthBehaviorPropType;\n\t\tmaxLength?: number;\n\t\tvisualRef?: (el?: HTMLSpanElement) => void;\n\t\tariaRef?: (el?: HTMLSpanElement) => void;\n\t};\n\treadOnly?: boolean;\n\ttouched?: boolean;\n\trequired?: boolean;\n\trenderNoLabel?: boolean;\n\trenderNoTooltip?: boolean;\n\trenderNoHint?: boolean;\n\tmaxLength?: number;\n\tshowBadge?: boolean;\n\ttooltipAlign?: TooltipAlignPropType;\n\tvariant?: VariantClassNamePropType;\n\t/** `fieldset` groups the options of a radio group; its label is then a `legend` and `disabled` disables the `fieldset`. */\n\tcomponent?: 'div' | 'fieldset';\n\t/** Arranges the options of a group among each other or side by side. */\n\torientation?: 'horizontal' | 'vertical';\n\t/** Receives the `__input` wrapper, the reference element of the label tooltip. */\n\trefInput?: (el?: HTMLDivElement) => void;\n\t/** Receives the floating element of the label tooltip. */\n\trefTooltip: (el?: HTMLDivElement) => void;\n};\n\n/**\n * Whether the field shows its label as a tooltip instead of a visible label: with `hideLabel`,\n * unless the tooltip is disabled or the label is given through the expert slot.\n */\nexport const isLabelShownAsTooltip = ({ hideLabel, label, renderNoTooltip }: Pick<FormFieldFCProps, 'hideLabel' | 'label' | 'renderNoTooltip'>): boolean =>\n\t!renderNoTooltip && !showExpertSlot(label) && hideLabel === true;\n\ntype MsgTypeModifiers = Partial<\n\tRecord<\n\t\t'default' | 'error' | 'info' | 'success' | 'warning' | 'msg-type-default' | 'msg-type-error' | 'msg-type-info' | 'msg-type-success' | 'msg-type-warning',\n\t\tboolean\n\t>\n>;\n\nconst getMsgTypeModifiers = (msg?: Stringified<MsgPropType>): MsgTypeModifiers => {\n\tconst msgType = getMsgType(msg) as string;\n\treturn { [msgType]: true, [`msg-type-${msgType}`]: true };\n};\n\n/**\n * Stateless shell of a form field: label, the input wrapper with the label tooltip, the character\n * counter, the validation message, the hint and the hidden character limit hint. The web component\n * owns the tooltip behavior and connects it through `refInput` and `refTooltip`.\n */\nexport const FormFieldFC: FC<FormFieldFCProps> = (props, children) => {\n\tconst {\n\t\trenderNoLabel,\n\t\trenderNoTooltip,\n\t\trenderNoHint,\n\t\tid,\n\t\trequired,\n\t\talert,\n\t\tdisabled,\n\t\tclass: classNames,\n\t\tmsg,\n\t\thideMsg,\n\t\thideLabel,\n\t\tlabel,\n\t\tinfoPopover,\n\t\thint,\n\t\taccessKey,\n\t\tshortKey,\n\t\tcounter,\n\t\treadOnly,\n\t\ttouched,\n\t\tmaxLength,\n\t\tariaDescribedBy,\n\t\tshowBadge,\n\t\ttooltipAlign,\n\t\tvariant,\n\t\tcomponent = 'div',\n\t\torientation,\n\t\trefInput,\n\t\trefTooltip,\n\t\t...other\n\t} = props;\n\n\tconst hasExpertSlot = showExpertSlot(label);\n\tconst showMsg = isMsgDefinedAndInputTouched(msg, touched);\n\tconst badgeText = buildBadgeTextString(accessKey, shortKey);\n\tconst showTooltip = isLabelShownAsTooltip({ hideLabel, label, renderNoTooltip });\n\tconst isFieldset = component === 'fieldset';\n\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tcomponent={component}\n\t\t\tblock=\"kol-form-field\"\n\t\t\tmodifiers={{\n\t\t\t\tdisabled: Boolean(disabled),\n\t\t\t\trequired: Boolean(required),\n\t\t\t\ttouched: Boolean(touched),\n\t\t\t\t'hide-label': Boolean(hideLabel),\n\t\t\t\t'read-only': Boolean(readOnly),\n\t\t\t\t'hidden-msg': Boolean(hideMsg),\n\t\t\t\t...(showMsg ? getMsgTypeModifiers(msg) : {}),\n\t\t\t}}\n\t\t\tclass={clsx(variant && classNameFromVariant(variant, 'form-field'), classNames)}\n\t\t\t// A disabled `fieldset` marks the whole group, legend included, as an inactive control (WCAG 1.4.3).\n\t\t\tdisabled={isFieldset && disabled ? true : undefined}\n\t\t\taria-describedby={ariaDescribedBy}\n\t\t\t{...other}\n\t\t>\n\t\t\t{!renderNoLabel && (\n\t\t\t\t<FormFieldLabelFC\n\t\t\t\t\tcomponent={isFieldset ? 'legend' : 'label'}\n\t\t\t\t\t// `FormFieldLabelFC` renders the `__label` element itself, so only the modifier is added here.\n\t\t\t\t\tclass={isFieldset ? 'kol-form-field__label--legend' : undefined}\n\t\t\t\t\tid={id}\n\t\t\t\t\thasExpertSlot={hasExpertSlot}\n\t\t\t\t\thideLabel={hideLabel}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\taccessKey={accessKey}\n\t\t\t\t\tshortKey={shortKey}\n\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\tshowBadge={showBadge}\n\t\t\t\t\tinfoPopover={infoPopover}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<div\n\t\t\t\tclass={formFieldBem('input', {\n\t\t\t\t\t'orientation-horizontal': orientation === 'horizontal',\n\t\t\t\t\t'orientation-vertical': orientation === 'vertical',\n\t\t\t\t})}\n\t\t\t\tref={refInput}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t{showTooltip && (\n\t\t\t\t\t<div class={formFieldBem('tooltip')}>\n\t\t\t\t\t\t<TooltipFC badgeText={badgeText || ''} label={label} align={tooltipAlign} id={createRelatedUniqueId(id, 'label')} refFloating={refTooltip} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{counter && !(counter.maxLengthBehavior === 'soft' && typeof counter.maxLength !== 'number') && (\n\t\t\t\t<div class={formFieldBem('counter')}>\n\t\t\t\t\t<span data-testid=\"input-counter\" aria-hidden=\"true\" class={formFieldBem('counter')} ref={counter.visualRef} />\n\t\t\t\t\t<span aria-live=\"polite\" class=\"visually-hidden\" data-testid=\"input-counter-aria\" id={createRelatedUniqueId(id, 'counter')} ref={counter.ariaRef} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{showMsg && !hideMsg && <FormFieldMsgFC id={id} alert={alert} msg={msg} />}\n\t\t\t{!renderNoHint && <FormFieldHintFC id={id} hint={hint} />}\n\t\t\t{typeof maxLength === 'number' && !counter && (\n\t\t\t\t// The hidden character limit hint is only rendered without a counter: the counter spans\n\t\t\t\t// already announce the maximum.\n\t\t\t\t<span id={createRelatedUniqueId(id, 'character-limit-hint')} class=\"visually-hidden\">\n\t\t\t\t\t{translate('kol-character-limit-hint', { placeholders: { limit: String(maxLength) } })}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</BemRootNodeFC>\n\t);\n};\n","import type {\n\tFormFieldLabelInfoPopoverProps,\n\tInputTypeOnDefault,\n\tInternalButtonProps,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tStencilUnknown,\n\tStringified,\n\tTooltipAlignPropType,\n} from '../../../schema';\nimport { buildBadgeTextString } from '../../../schema';\nimport { createRelatedUniqueId } from '../../../utils/dev.utils';\nimport { dispatchDomEvent, KolEvent } from '../../../utils/events';\nimport {\n\tariaDetailsProp,\n\tdisabledProp,\n\thideLabelProp,\n\thideMsgProp,\n\thintProp,\n\tinfoPopoverProp,\n\tinputCallbacksProp,\n\tlabelWithExpertSlotProp,\n\tmsgProp,\n\tnameProp,\n\ttooltipAlignProp,\n\ttouchedProp,\n} from '../../props';\nimport { BaseWebComponent } from '../base-web-component';\nimport type { ButtonItemFcProps } from '../button/item';\nimport { createButtonItem } from '../button/item';\nimport type { FormAssociationType } from '../form-association/api';\nimport { FormAssociationBehavior } from '../form-association/behavior';\nimport { createPopoverButtonItem } from '../popover-button/item';\nimport { TooltipBehavior } from '../tooltip/behavior';\nimport type { FormFieldBaseApi } from './api';\nimport { getFormFieldAria } from './aria';\nimport { type FormFieldFCProps, isLabelShownAsTooltip } from './component';\nimport type { FormFieldInfoPopover } from './label';\n\ntype FormFieldExtras = Pick<FormFieldFCProps, 'counter' | 'maxLength' | 'readOnly' | 'renderNoLabel' | 'renderNoTooltip' | 'required'> & {\n\t/** Class of the field, e.g. `kol-input-color`, added to the `kol-form-field` root. */\n\tclass: string;\n\taccessKey?: string;\n\tshortKey?: string;\n\tvariant?: string[];\n};\n\n/**\n * Shared orchestrator implementation of the form fields: it applies the props every field has,\n * owns the form association and the label tooltip, and handles the events of the native control.\n *\n * The concrete element keeps what Stencil has to see in the component class itself (DD16):\n * `@Component`, `@Element`, `@State`, `@Method`, every `@Prop` with its `@Watch`, whose body calls\n * the matching `apply*` method, and the lifecycle methods.\n */\nexport abstract class BaseFormFieldWebComponent<Api extends FormFieldBaseApi> extends BaseWebComponent<Api> {\n\t/** The custom element; declared with `@Element()` by the concrete class. */\n\tprotected abstract readonly host?: HTMLElement;\n\n\t/** Read at event time, like the native `disabled` state. */\n\tpublic abstract _disabled?: boolean;\n\t/** Read at event time, so a callback replaced after the last render is still called. */\n\tpublic abstract _on?: InputTypeOnDefault;\n\t/** Set to `true` once the focus leaves the field. */\n\tpublic abstract _touched?: boolean;\n\n\tprotected formAssociation!: FormAssociationBehavior;\n\n\tprivate readonly tooltipBehavior = new TooltipBehavior(BaseWebComponent.stateLess);\n\n\tprivate readonly smartButton = createButtonItem(() => this.host);\n\n\t/**\n\t * The concrete element owns `infoPopoverOpen` as a `@State()` field, so toggling the popover\n\t * re-renders the field; the base API does not carry it, so access goes through a cast.\n\t */\n\tprivate readonly infoPopover = createPopoverButtonItem({\n\t\tgetFlagHost: () => this.host,\n\t\tgetOpen: () => (this as unknown as { infoPopoverOpen?: boolean }).infoPopoverOpen === true,\n\t\tsetOpen: (open) => {\n\t\t\t(this as unknown as { infoPopoverOpen: boolean }).infoPopoverOpen = open;\n\t\t},\n\t});\n\n\t/**\n\t * Whether the focus event of the current visit has been sent. It is reset only when the focus\n\t * leaves the host of an enabled field; `inputHasFocus` is reset on every blur.\n\t */\n\tprivate focusEventSent = false;\n\n\t/**\n\t * `ResolvedProps<Api>` cannot be resolved for a generic `Api`, so `setRenderProp('label', …)` does\n\t * not type-check here. The base props exist in every field API (`Api extends FormFieldBaseApi`),\n\t * so this view on the same instance is typed with the base API instead.\n\t */\n\tprivate get shared(): BaseFormFieldWebComponent<FormFieldBaseApi> {\n\t\treturn this as unknown as BaseFormFieldWebComponent<FormFieldBaseApi>;\n\t}\n\n\t/**\n\t * Creates the form association. Must be called from the concrete element's constructor (after\n\t * `super()`): Stencil populates `@Element()` there, and the hidden form element depends on the\n\t * name known at that point.\n\t */\n\tprotected initFormAssociation(type: FormAssociationType, name?: string): void {\n\t\tthis.formAssociation = new FormAssociationBehavior(BaseWebComponent.stateLess, { host: this.host, type, name });\n\t}\n\n\t/** Call from `componentDidRender`. */\n\tprotected syncFormField(): void {\n\t\tthis.smartButton.syncListeners();\n\t\tthis.infoPopover.syncListeners();\n\t}\n\n\t/** Call from `disconnectedCallback`. */\n\tprotected destroyFormField(): void {\n\t\tthis.tooltipBehavior.destroy();\n\t\tthis.smartButton.destroy();\n\t\tthis.infoPopover.destroy();\n\t}\n\n\t/**\n\t * The info popover of the label, `undefined` without `_infoPopover`. Its toggle button is a ghost\n\t * button by default; it always hides its label and renders inline.\n\t */\n\tprotected getInfoPopover(): FormFieldInfoPopover | undefined {\n\t\tconst infoPopover = this.shared.getRenderProp('infoPopover');\n\t\tif (!infoPopover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst { _content, ...popoverButton } = infoPopover;\n\t\treturn {\n\t\t\tpopoverButton: this.infoPopover.getFcProps({ _variant: 'ghost', ...popoverButton, _hideLabel: true, _inline: true }),\n\t\t\tcontent: _content,\n\t\t};\n\t}\n\n\t/**\n\t * `ButtonFC` props of the `_smartButton`, `undefined` without one. The smart button hides its\n\t * label and takes the disabled state of the field; its own `_hideLabel` and `_disabled` win.\n\t */\n\tprotected getSmartButtonFcProps(smartButton: InternalButtonProps | undefined, disabled?: boolean): ButtonItemFcProps | undefined {\n\t\tif (typeof smartButton !== 'object' || smartButton === null) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.smartButton.getFcProps({ _hideLabel: true, _disabled: disabled, ...smartButton }, { class: 'kol-input-container__smart-button' });\n\t}\n\n\t// --- Prop application (the concrete element's watchers delegate here) ---\n\n\tprotected applyAriaDetails(value?: string): void {\n\t\tariaDetailsProp.apply(value, (v) => this.shared.setRenderProp('ariaDetails', v));\n\t\tthis.formAssociation.watchAriaDetails(value);\n\t}\n\n\tprotected applyDisabled(value?: boolean): void {\n\t\tdisabledProp.apply(value, (v) => this.shared.setRenderProp('disabled', v));\n\t}\n\n\tprotected applyHideLabel(value?: boolean): void {\n\t\thideLabelProp.apply(value, (v) => this.shared.setRenderProp('hideLabel', v));\n\t}\n\n\tprotected applyHideMsg(value?: boolean): void {\n\t\thideMsgProp.apply(value, (v) => this.shared.setRenderProp('hideMsg', v));\n\t}\n\n\tprotected applyHint(value?: string): void {\n\t\thintProp.apply(value, (v) => this.shared.setRenderProp('hint', v));\n\t}\n\n\tprotected applyInfoPopover(value?: FormFieldLabelInfoPopoverProps): void {\n\t\tinfoPopoverProp.apply(value, (v) => this.shared.setRenderProp('infoPopover', v));\n\t}\n\n\t/** `false` enables the expert slot, which the field renders for an empty label. */\n\tprotected applyLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tconst label: unknown = value;\n\t\tlabelWithExpertSlotProp.apply(label === false ? '' : value, (v) => this.shared.setRenderProp('label', v));\n\t}\n\n\tprotected applyMsg(value?: Stringified<MsgPropType>): void {\n\t\tmsgProp.apply(value, (v) => this.shared.setRenderProp('msg', v));\n\t}\n\n\tprotected applyName(value?: string): void {\n\t\tnameProp.apply(value, (v) => this.shared.setRenderProp('name', v));\n\t\tthis.formAssociation.watchName(value);\n\t}\n\n\tprotected applyOn(value?: InputTypeOnDefault): void {\n\t\tinputCallbacksProp.apply(value, (v) => this.shared.setRenderProp('on', v));\n\t}\n\n\tprotected applySyncValueBySelector(value?: string): void {\n\t\tthis.formAssociation.watchSyncValueBySelector(value);\n\t}\n\n\t/** Form fields show the tooltip on top by default; the shared prop defaults to `'right'`. */\n\tprotected applyTooltipAlign(value?: TooltipAlignPropType): void {\n\t\ttooltipAlignProp.apply(value ?? 'top', (v) => this.shared.setRenderProp('tooltipAlign', v));\n\t}\n\n\tprotected applyTouched(value?: boolean): void {\n\t\ttouchedProp.apply(value, (v) => this.shared.setRenderProp('touched', v));\n\t}\n\n\t// --- Event handling of the native control ---\n\n\t/**\n\t * The element that receives the KoliBri events and frames the focus of the field: the nearest host\n\t * with a shadow root, as resolved by the form association. It is the field itself, unless the field\n\t * renders into the shadow root of another component (`PageSizeSelect` in `kol-pagination`).\n\t */\n\tprivate get eventHost(): Element | undefined {\n\t\treturn this.formAssociation?.host ?? this.host;\n\t}\n\n\tprivate emit(type: KolEvent, value?: unknown): void {\n\t\tif (this.eventHost) {\n\t\t\tdispatchDomEvent(this.eventHost as HTMLElement, type, value);\n\t\t}\n\t}\n\n\t/** Dispatches the KoliBri event before the `_on` callback is called. */\n\tprotected readonly handleChange = (event: Event, value?: unknown): void => {\n\t\tevent.stopPropagation();\n\t\tif (typeof value === 'undefined') {\n\t\t\tvalue = (event.target as HTMLInputElement).value;\n\t\t}\n\t\tthis.emit(KolEvent.change, value);\n\t\tthis._on?.onChange?.(event, value);\n\t};\n\n\tprotected readonly handleInput = (event: Event, value?: unknown): void => {\n\t\tevent.stopPropagation();\n\t\tif (typeof value === 'undefined') {\n\t\t\tvalue = (event.target as HTMLInputElement).value;\n\t\t}\n\t\tthis.emit(KolEvent.input, value);\n\t\tthis.formAssociation.setFormAssociatedValue(value as StencilUnknown);\n\t\tthis._on?.onInput?.(event, value);\n\t};\n\n\tprotected readonly handleClick = (event: Event): void => {\n\t\tthis.emit(KolEvent.click);\n\t\tthis._on?.onClick?.(event);\n\t};\n\n\tprotected readonly handleFocus = (event: FocusEvent): void => {\n\t\tif (!this.focusEventSent) {\n\t\t\tthis.emit(KolEvent.focus);\n\t\t\tthis._on?.onFocus?.(event);\n\t\t\tthis.focusEventSent = true;\n\t\t}\n\t\tthis.shared.setState('inputHasFocus', true);\n\t};\n\n\tprotected readonly handleBlur = (event: FocusEvent): void => {\n\t\tthis.handleFocusLeave(event);\n\t\tthis.shared.setState('inputHasFocus', false);\n\t};\n\n\t/**\n\t * Sends the blur when the focus leaves the field; focus moving to another element inside the field,\n\t * e.g. the smart button, is no blur of the field. `handleBlur` also resets `inputHasFocus`.\n\t */\n\tprotected handleFocusLeave(event: FocusEvent): void {\n\t\tif (this._disabled) {\n\t\t\treturn;\n\t\t}\n\t\tconst host = this.eventHost;\n\t\tconst root = host?.shadowRoot || host;\n\t\tconst isFocusInside = root?.contains(event.relatedTarget as Node) || host === event.relatedTarget;\n\t\tif (this.focusEventSent && !isFocusInside) {\n\t\t\tthis._touched = true;\n\t\t\tthis.emit(KolEvent.blur);\n\t\t\tthis._on?.onBlur?.(event);\n\t\t\tthis.focusEventSent = false;\n\t\t}\n\t}\n\n\tprotected readonly handleKeyDown = (event: KeyboardEvent): void => {\n\t\tthis.emit(KolEvent.keydown);\n\t\tthis._on?.onKeyDown?.(event);\n\t};\n\n\t// --- Render ---\n\n\t/** `aria-invalid` and `aria-describedby` of the native control. */\n\tprotected getAria(): ReturnType<typeof getFormFieldAria> {\n\t\tconst shared = this.shared;\n\t\treturn getFormFieldAria({\n\t\t\tid: shared.getState('id'),\n\t\t\tmsg: shared.getRenderProp('msg'),\n\t\t\thint: shared.getRenderProp('hint'),\n\t\t\ttouched: shared.getRenderProp('touched'),\n\t\t\thideMsg: shared.getRenderProp('hideMsg'),\n\t\t});\n\t}\n\n\t/** A touched message is announced as alert only while the control does not have the focus. */\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.shared.getRenderProp('touched')) && !this.shared.getState('inputHasFocus');\n\t}\n\n\tprivate readonly setInputRef = (el?: HTMLDivElement): void => {\n\t\tif (el && this.isTooltipShown()) {\n\t\t\tthis.tooltipBehavior.initContext(el);\n\t\t\tthis.tooltipBehavior.syncListeners(undefined, el, true);\n\t\t}\n\t};\n\n\tprivate readonly setTooltipRef = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipBehavior.setTooltipElementRef(el);\n\t};\n\n\tprivate isTooltipShown(): boolean {\n\t\tconst shared = this.shared;\n\t\treturn isLabelShownAsTooltip({ hideLabel: shared.getRenderProp('hideLabel'), label: shared.getRenderProp('label') });\n\t}\n\n\t/**\n\t * Refs of the label tooltip for a field that renders it in its `FieldControlFC` instead of the\n\t * form field shell, together with `renderNoTooltip` for `getFormFieldProps`.\n\t */\n\tprotected getLabelTooltipRefs(): { refInput: (el?: HTMLDivElement) => void; refTooltip: (el?: HTMLDivElement) => void } {\n\t\treturn { refInput: this.setInputRef, refTooltip: this.setTooltipRef };\n\t}\n\n\t/**\n\t * Props of the form field shell around the native control. Call once per render: it also hands\n\t * label, alignment and badge to the label tooltip, or tears it down while the label is visible.\n\t * With `renderNoTooltip` the shell does not connect the tooltip; see `getLabelTooltipRefs`.\n\t */\n\tprotected getFormFieldProps({\n\t\tclass: classNames,\n\t\taccessKey,\n\t\tshortKey,\n\t\tvariant,\n\t\tcounter,\n\t\tmaxLength,\n\t\treadOnly,\n\t\trenderNoLabel,\n\t\trenderNoTooltip,\n\t\trequired,\n\t}: FormFieldExtras): FormFieldFCProps {\n\t\tconst shared = this.shared;\n\t\tconst id = shared.getState('id');\n\t\tconst label = shared.getRenderProp('label');\n\t\tconst tooltipAlign = shared.getRenderProp('tooltipAlign');\n\n\t\tif (this.isTooltipShown()) {\n\t\t\tthis.tooltipBehavior.watchAlign(tooltipAlign);\n\t\t\tthis.tooltipBehavior.watchBadgeText(buildBadgeTextString(accessKey, shortKey) || '');\n\t\t\tthis.tooltipBehavior.watchId(createRelatedUniqueId(id, 'label'));\n\t\t\tthis.tooltipBehavior.watchLabel(label);\n\t\t} else {\n\t\t\tthis.tooltipBehavior.destroy();\n\t\t}\n\n\t\treturn {\n\t\t\tid,\n\t\t\tdisabled: shared.getRenderProp('disabled'),\n\t\t\tmsg: shared.getRenderProp('msg'),\n\t\t\thint: shared.getRenderProp('hint'),\n\t\t\tlabel,\n\t\t\thideLabel: shared.getRenderProp('hideLabel'),\n\t\t\thideMsg: shared.getRenderProp('hideMsg'),\n\t\t\ttouched: shared.getRenderProp('touched'),\n\t\t\tshowBadge: Boolean(accessKey) || Boolean(shortKey),\n\t\t\trequired,\n\t\t\treadOnly,\n\t\t\taccessKey,\n\t\t\tshortKey,\n\t\t\tmaxLength,\n\t\t\tcounter,\n\t\t\tvariant,\n\t\t\tclass: classNames,\n\t\t\ttooltipAlign,\n\t\t\talert: this.showAsAlert(),\n\t\t\tinfoPopover: this.getInfoPopover(),\n\t\t\trenderNoLabel,\n\t\t\trenderNoTooltip,\n\t\t\trefInput: renderNoTooltip ? undefined : this.setInputRef,\n\t\t\trefTooltip: this.setTooltipRef,\n\t\t};\n\t}\n}\n","/**\n * Attributes every native form control of a field gets: no title tooltip, no autocapitalization or\n * autocorrection, the `aria-describedby` references and, with a hidden label, the label as\n * `aria-label`.\n */\nexport function getDefaultInputProps({ ariaDescribedBy, hideLabel, label }: { ariaDescribedBy?: string[]; hideLabel?: boolean; label?: string }): {\n\ttitle: string;\n\tautoCapitalize: string;\n\tautoCorrect: string;\n\t'aria-describedby'?: string;\n\t'aria-label'?: string;\n} {\n\treturn {\n\t\ttitle: '',\n\t\tautoCapitalize: 'off',\n\t\tautoCorrect: 'off',\n\t\t'aria-describedby': ariaDescribedBy?.length ? ariaDescribedBy.join(' ') : undefined,\n\t\t'aria-label': hideLabel && label ? label : undefined,\n\t};\n}\n\n/** Props of a native form control FC: the native attributes plus the field's label and descriptions. */\nexport type DefaultInputProps<T> = Omit<\n\t{\n\t\t// `aria${string}` is declared in the Stencil HTML types and collides with these props.\n\t\t[K in keyof T as K extends `aria${string}` ? never : K]: T[K];\n\t},\n\t'title' | 'autoCapitalize' | 'autoCorrect' | 'spellcheck'\n> & {\n\t/** Omitted by a secondary control the label does not reference, e.g. the range input of `kol-input-range`. */\n\tid?: string;\n\tariaDescribedBy?: string[];\n\thideLabel?: boolean;\n\tlabel?: string;\n};\n","import {\n\tariaDetailsProp,\n\tdisabledProp,\n\thideLabelProp,\n\thideMsgProp,\n\thintProp,\n\tinfoPopoverProp,\n\tinputCallbacksProp,\n\tlabelWithExpertSlotProp,\n\tmsgProp,\n\tnameProp,\n\ttooltipAlignProp,\n\ttouchedProp,\n} from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props every form field has, with the same type and default. A field's own config spreads these\n * in; props only some fields have (e.g. `accessKey`, `required`) stay in the field's config, because\n * `WebComponentInterface` requires a watcher for every config prop.\n */\nexport const formFieldBasePropsConfig = {\n\trequired: [labelWithExpertSlotProp],\n\toptional: [\n\t\tariaDetailsProp,\n\t\tdisabledProp,\n\t\thideLabelProp,\n\t\thideMsgProp,\n\t\thintProp,\n\t\tinfoPopoverProp,\n\t\tinputCallbacksProp,\n\t\tmsgProp,\n\t\tnameProp,\n\t\ttooltipAlignProp,\n\t\ttouchedProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type FormFieldBaseStates = {\n\t/** Base ID of the field; the IDs of label, hint, message and datalist derive from it. */\n\tid: string;\n\t/** Whether the native control has the focus; a touched message is announced as alert only without it. */\n\tinputHasFocus: boolean;\n};\n\nexport type FormFieldBaseApi = ApiFromConfig<typeof formFieldBasePropsConfig, { States: FormFieldBaseStates }>;\n"],"names":["normalizeMsg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CgB,SAAA,2BAA2B,CAAC,GAA8B,EAAE,OAAiB,EAAA;IAY5F,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,KAAK,IAAI;AACxC;AAIM,SAAUA,cAAY,CAAC,GAA8B,EAAA;AAC1D,IAAA,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AAC5B,QAAA,IAAI;AACH,YAAA,OAAO,SAAS,CAAc,GAAG,CAAC;;QACjC,OAAA,EAAA,EAAM;YACP,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE;;;AAG9C,IAAA,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,EAAE,OAAO,IAAI,GAAG,CAAC,EAAE;AACxD,QAAA,OAAA,MA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E,IAAI,CAAC,cAAc,EAAE;YAClC,aAAa;YACb,eAAe;YACf,QAAQ,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC,WAAW;YACxD,UAAU,EAAE,IAAI,CAAC,aAAa;SAC9B;;AAEF;;AC/XK,SAAU,oBAAoB,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAuE,EAAA;IAO9I,OAAO;AACN,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,cAAc,EAAE,KAAK;AACrB,QAAA,WAAW,EAAE,KAAK;AAClB,QAAA,kBAAkB,EAAE,CAAA,eAAe,KAAA,IAAA,IAAf,eAAe,KAAf,MAAA,GAAA,MAAA,GAAA,eAAe,CAAE,MAAM,IAAG,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,SAAS;QACnF,YAAY,EAAE,SAAS,IAAI,KAAK,GAAG,KAAK,GAAG,SAAS;KACpD;AACF;;ACEa,MAAA,wBAAwB,GAAG;IACvC,QAAQ,EAAE,CAAC,uBAAuB,CAAC;AACnC,IAAA,QAAQ,EAAE;QACT,eAAe;QACf,YAAY;QACZ,aAAa;QACb,WAAW;QACX,QAAQ;QACR,eAAe;QACf,kBAAkB;QAClB,OAAO;QACP,QAAQ;QACR,gBAAgB;QAChB,WAAW;AACX,KAAA;;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{h as e}from"./index-DQdQBwMc.js";import{t as a}from"./i18n-BaCf-SDK.js";import{e as n}from"./common-BqpMtheU.js";import{A as o,c as s}from"./component-BF8FPuIW.js";import{b as t}from"./bem-registry-CX5kvaqt.js";import{c as i}from"./clsx-COFh-Vc8.js";import{p as r}from"./element-interaction-Cy9tx3Sx.js";import{B as l}from"./component-C3sXiwbS.js";import{I as d}from"./component-BpOMe842.js";import{S as c}from"./component-C_d54ujF.js";import{T as f}from"./component-CvCfEqSE.js";import{a as p,b as m,c as u,f as b,g as k,h as j,s as h,i as g,l as x,d as C,t as y,e as w,v}from"./variant-CeijQFzL.js";import{c as _,b as B,a as D}from"./base-web-component-3R1Dy3QK.js";import{d as A}from"./disabled-CdyeAMlW.js";import{h as F}from"./href-DOi-fZMu.js";import{l as I}from"./label-with-expert-slot-CocPu9HB.js";import{l as K}from"./link-target-B7A-qwaP.js";const M=["date","location","page","step","time","true","false"];function O(e){const a=B(e);return M.includes(a)?a:"page"}const S=_("ariaCurrentValue","page",O);const q=_("ariaOwns","",B);const L=_("download",undefined,B);const Q=D();const T=t.forBlock("kol-link");const E=(t,p)=>{const{accessKey:m,ariaControls:u,ariaCurrent:b,ariaDescription:k,ariaDescriptionId:j,ariaExpanded:h,ariaOwns:g,class:x,customClass:C,disabled:y,download:w,handleAnchorClick:v,hideLabel:_,href:B,icons:D,inline:A,label:F,on:I,ref:K,refAnchor:M,refTooltip:O,role:S,shortKey:q,tabIndex:L,target:Q,variant:E,expertSlot:P}=t;const $=a("kol-open-link-in-tab");const V=typeof Q==="string"&&Q.length>0&&Q!=="_self";const W={href:typeof B==="string"&&B.length>0?B:"javascript:void(0);",target:typeof Q==="string"&&Q.length>0?Q:undefined,rel:V?"noopener":undefined,download:typeof w==="string"?w:undefined};if(_===true&&!F){n(`[KolLink] An aria-label must be set when _hide-label is set.`)}const X=k===null||k===void 0?void 0:k.trim();const z=S||undefined;return e(l,{block:"kol-link",ref:K,class:i(x,{[C]:E.includes("custom")&&C.length>0,[s(E,"link")]:E.length>0}),modifiers:{disabled:y===true,"external-link":V,"hide-label":_===true,inline:A===true,standalone:A===false}},e("a",Object.assign({ref:M},W,{accessKey:m||undefined,"aria-current":b||undefined,"aria-controls":u||undefined,"aria-describedby":X?j:undefined,"aria-disabled":y?"true":undefined,"aria-expanded":h===""?undefined:h,"aria-owns":g||undefined,"aria-label":_&&typeof F==="string"&&F.trim()!==""?`${F}${V?` (${$})`:""}`:undefined,"aria-keyshortcuts":q||undefined,class:T("interactive-element")},I,{onClick:v,onMouseDown:y?r:undefined,role:z,tabIndex:y?-1:L}),e(c,{class:"kol-link__text",badgeText:m||q,icons:D,hideLabel:_,label:P?"":F||B},p.length>0?p:e("slot",{name:"expert",slot:"expert"})),V&&e(d,{class:"kol-link__icon",label:_?"":$,icons:"kolicon-link-external","aria-hidden":_})),_===true&&!P&&e("div",{class:"kol-link__tooltip"},e(f,{badgeText:m||q||"",label:typeof F==="string"?F:typeof B==="string"?B:"",refFloating:O})),X&&e(o,{description:X,descriptionId:j}))};const P={required:[F],optional:[p,m,S,u,b,q,k,A,L,j,h,g,I,Q,x,K,C,y,w,v]};export{E as L,S as a,Q as b,q as c,L as d,P as l};
|
|
5
|
+
//# sourceMappingURL=api-CagcODCX.js.map
|