@public-ui/components 4.3.1-rc.2 → 4.3.1-rc.4
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 -1
- package/dist/cjs/{Alert-B9H54lf8.js → Alert-Cj0l2bUc.js} +5 -5
- package/dist/cjs/{Alert-B9H54lf8.js.map → Alert-Cj0l2bUc.js.map} +1 -1
- package/dist/cjs/{Collapsible-CoqLEXrI.js → Collapsible-BGmv1Yjs.js} +5 -5
- package/dist/cjs/{Collapsible-CoqLEXrI.js.map → Collapsible-BGmv1Yjs.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-HTg1nuQE.js → CustomSuggestionsOptionsGroup-DxkxG6SL.js} +3 -3
- package/dist/cjs/{CustomSuggestionsOptionsGroup-HTg1nuQE.js.map → CustomSuggestionsOptionsGroup-DxkxG6SL.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-tz4jt1Vw.js → FieldControlStateWrapper-BdMJ6APF.js} +7 -7
- package/dist/cjs/{FieldControlStateWrapper-tz4jt1Vw.js.map → FieldControlStateWrapper-BdMJ6APF.js.map} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-Du0t5Gwq.js → FormFieldStateWrapper-r_biWYNQ.js} +7 -7
- package/dist/cjs/{FormFieldStateWrapper-Du0t5Gwq.js.map → FormFieldStateWrapper-r_biWYNQ.js.map} +1 -1
- package/dist/cjs/{Heading-CtWRbSBg.js → Heading-7QjdzJbb.js} +3 -3
- package/dist/cjs/{Heading-CtWRbSBg.js.map → Heading-7QjdzJbb.js.map} +1 -1
- package/dist/cjs/{Input-D8WGn84v.js → Input-BTydy1dC.js} +5 -5
- package/dist/cjs/{Input-D8WGn84v.js.map → Input-BTydy1dC.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-DvDPx6ED.js → InputStateWrapper-BkVAoLW-.js} +6 -6
- package/dist/cjs/{InputStateWrapper-DvDPx6ED.js.map → InputStateWrapper-BkVAoLW-.js.map} +1 -1
- package/dist/cjs/{app-globals-ezeTfcSE.js → app-globals-BtMT5iZw.js} +4 -4
- package/dist/cjs/{app-globals-ezeTfcSE.js.map → app-globals-BtMT5iZw.js.map} +1 -1
- package/dist/cjs/{component-ts-nCO-F.js → component-C4o-iNQ7.js} +4 -4
- package/dist/cjs/{component-ts-nCO-F.js.map → component-C4o-iNQ7.js.map} +1 -1
- package/dist/cjs/{component-Cwiow2eD.js → component-CBmF0-1m.js} +3 -3
- package/dist/cjs/{component-Cwiow2eD.js.map → component-CBmF0-1m.js.map} +1 -1
- package/dist/cjs/{component-Bjpk6NcE.js → component-DHGkVCC4.js} +6 -6
- package/dist/cjs/{component-Bjpk6NcE.js.map → component-DHGkVCC4.js.map} +1 -1
- package/dist/cjs/{component-CIPdC4D5.js → component-ND1NsfT0.js} +3 -3
- package/dist/cjs/{component-CIPdC4D5.js.map → component-ND1NsfT0.js.map} +1 -1
- package/dist/cjs/{component-CkmMBS21.js → component-nUTAX1bo.js} +3 -3
- package/dist/cjs/{component-CkmMBS21.js.map → component-nUTAX1bo.js.map} +1 -1
- package/dist/cjs/{component-BeYj5Mj7.js → component-poFmJFfm.js} +4 -4
- package/dist/cjs/{component-BeYj5Mj7.js.map → component-poFmJFfm.js.map} +1 -1
- package/dist/cjs/{controller-EGjo0CNU.js → controller--hzjNQ3Q.js} +3 -3
- package/dist/cjs/{controller-EGjo0CNU.js.map → controller--hzjNQ3Q.js.map} +1 -1
- package/dist/cjs/{controller-BYJQU8MT.js → controller-9cz5yQIi.js} +3 -3
- package/dist/cjs/{controller-BYJQU8MT.js.map → controller-9cz5yQIi.js.map} +1 -1
- package/dist/cjs/{controller-CgMfd7AP.js → controller-BgRs4wQH.js} +3 -3
- package/dist/cjs/{controller-CgMfd7AP.js.map → controller-BgRs4wQH.js.map} +1 -1
- package/dist/cjs/{controller-icon-BhrXaquh.js → controller-icon-Si8giJXr.js} +6 -6
- package/dist/cjs/{controller-icon-BhrXaquh.js.map → controller-icon-Si8giJXr.js.map} +1 -1
- package/dist/cjs/{dev.utils-jDR6dPer.js → dev.utils-uYT3Vj7g.js} +3 -3
- package/dist/cjs/{dev.utils-jDR6dPer.js.map → dev.utils-uYT3Vj7g.js.map} +1 -1
- package/dist/cjs/{devtools-tZgX441T.js → devtools-D-z6DlmZ.js} +4 -4
- package/dist/cjs/{devtools-tZgX441T.js.map → devtools-D-z6DlmZ.js.map} +1 -1
- package/dist/cjs/{index-D_V4aONe.js → index-COYzF2Ii.js} +3 -3
- package/dist/cjs/{index-D_V4aONe.js.map → index-COYzF2Ii.js.map} +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +2 -2
- package/dist/cjs/kol-accordion.cjs.entry.js +5 -5
- package/dist/cjs/kol-alert-wc.cjs.entry.js +4 -4
- package/dist/cjs/kol-alert.cjs.entry.js +2 -2
- package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +5 -5
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/kol-button-link.cjs.entry.js +2 -2
- package/dist/cjs/kol-button-wc.cjs.entry.js +5 -5
- package/dist/cjs/kol-button.cjs.entry.js +2 -2
- package/dist/cjs/kol-card-wc.cjs.entry.js +6 -6
- package/dist/cjs/kol-card.cjs.entry.js +2 -2
- package/dist/cjs/kol-click-button.cjs.entry.js +2 -2
- package/dist/cjs/kol-combobox.cjs.entry.js +13 -13
- package/dist/cjs/kol-details.cjs.entry.js +5 -5
- package/dist/cjs/kol-dialog-wc.cjs.entry.js +2 -2
- package/dist/cjs/kol-dialog.cjs.entry.js +2 -2
- package/dist/cjs/kol-drawer.cjs.entry.js +3 -3
- package/dist/cjs/kol-form.cjs.entry.js +5 -5
- 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 +12 -12
- package/dist/cjs/kol-input-color.cjs.entry.js +12 -12
- package/dist/cjs/kol-input-date.cjs.entry.js +12 -12
- package/dist/cjs/kol-input-email.cjs.entry.js +14 -14
- package/dist/cjs/kol-input-file.cjs.entry.js +12 -12
- package/dist/cjs/kol-input-number.cjs.entry.js +12 -12
- package/dist/cjs/kol-input-password.cjs.entry.js +13 -13
- package/dist/cjs/kol-input-radio.cjs.entry.js +12 -12
- package/dist/cjs/kol-input-range.cjs.entry.js +12 -12
- package/dist/cjs/kol-input-text.cjs.entry.js +14 -14
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +2 -2
- package/dist/cjs/kol-link-wc.cjs.entry.js +6 -6
- package/dist/cjs/kol-link.cjs.entry.js +7 -7
- package/dist/cjs/kol-meter.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +2 -2
- package/dist/cjs/kol-nav.cjs.entry.js +3 -3
- package/dist/cjs/kol-pagination-wc.cjs.entry.js +2 -2
- package/dist/cjs/kol-pagination.cjs.entry.js +2 -2
- package/dist/cjs/kol-popover-button-wc.cjs.entry.js +2 -2
- package/dist/cjs/kol-popover-button.cjs.entry.js +2 -2
- 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-wc.cjs.entry.js +10 -10
- package/dist/cjs/kol-select.cjs.entry.js +2 -2
- package/dist/cjs/kol-single-select.cjs.entry.js +14 -14
- package/dist/cjs/kol-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/kol-skip-nav.cjs.entry.js +2 -2
- package/dist/cjs/kol-spin.cjs.entry.js +2 -2
- package/dist/cjs/kol-split-button.cjs.entry.js +2 -2
- package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js +2 -2
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +6 -6
- package/dist/cjs/kol-table-stateless.cjs.entry.js +2 -2
- package/dist/cjs/kol-tabs.cjs.entry.js +3 -3
- package/dist/cjs/kol-textarea.cjs.entry.js +10 -10
- package/dist/cjs/kol-toast-container.cjs.entry.js +7 -7
- package/dist/cjs/kol-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +4 -4
- package/dist/cjs/kol-tree-item-wc.cjs.entry.js +3 -3
- package/dist/cjs/kol-tree-item.cjs.entry.js +2 -2
- package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/collection/components/abbr/style.css +2 -2
- 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/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/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/style.css +2 -2
- package/dist/collection/components/toaster/style.css +2 -2
- package/dist/collection/components/toolbar/style.css +2 -2
- package/dist/collection/components/tree-item/style.css +2 -2
- package/dist/components/kol-abbr.js +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 +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 +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 +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toolbar.js +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/esm/{Alert-XvOlPesJ.js → Alert-BUOtAOEU.js} +5 -5
- package/dist/{kolibri/Alert-XvOlPesJ.js.map → esm/Alert-BUOtAOEU.js.map} +1 -1
- package/dist/esm/{Collapsible-DoZaXLnb.js → Collapsible-JODPbWD_.js} +5 -5
- package/dist/{kolibri/Collapsible-DoZaXLnb.js.map → esm/Collapsible-JODPbWD_.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-OlSJMJOe.js → CustomSuggestionsOptionsGroup-uIBVxXva.js} +3 -3
- package/dist/{kolibri/CustomSuggestionsOptionsGroup-OlSJMJOe.js.map → esm/CustomSuggestionsOptionsGroup-uIBVxXva.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-MPQg1DYb.js → FieldControlStateWrapper-B5wxkm5C.js} +7 -7
- package/dist/esm/{FieldControlStateWrapper-MPQg1DYb.js.map → FieldControlStateWrapper-B5wxkm5C.js.map} +1 -1
- package/dist/esm/{FormFieldStateWrapper-DuENCjwI.js → FormFieldStateWrapper-ClHy49ac.js} +7 -7
- package/dist/{kolibri/FormFieldStateWrapper-DuENCjwI.js.map → esm/FormFieldStateWrapper-ClHy49ac.js.map} +1 -1
- package/dist/esm/{Heading-BGtN1KkQ.js → Heading-_wdE01Ba.js} +3 -3
- package/dist/{kolibri/Heading-BGtN1KkQ.js.map → esm/Heading-_wdE01Ba.js.map} +1 -1
- package/dist/esm/{Input-DdJF9sdj.js → Input-Us8iV6NH.js} +5 -5
- package/dist/{kolibri/Input-DdJF9sdj.js.map → esm/Input-Us8iV6NH.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-CJkVS_go.js → InputStateWrapper-CxmgEntV.js} +6 -6
- package/dist/esm/{InputStateWrapper-CJkVS_go.js.map → InputStateWrapper-CxmgEntV.js.map} +1 -1
- package/dist/esm/{app-globals-DJgPFDlb.js → app-globals-B-1exqqn.js} +4 -4
- package/dist/esm/{app-globals-DJgPFDlb.js.map → app-globals-B-1exqqn.js.map} +1 -1
- package/dist/esm/{component-BXlOrqPl.js → component-CbvU8i7s.js} +3 -3
- package/dist/{kolibri/component-BXlOrqPl.js.map → esm/component-CbvU8i7s.js.map} +1 -1
- package/dist/esm/{component-B1AXhKT6.js → component-CqTwHM6Q.js} +3 -3
- package/dist/{kolibri/component-B1AXhKT6.js.map → esm/component-CqTwHM6Q.js.map} +1 -1
- package/dist/esm/{component-B07x6VKl.js → component-Dk2wt0bc.js} +4 -4
- package/dist/esm/{component-B07x6VKl.js.map → component-Dk2wt0bc.js.map} +1 -1
- package/dist/esm/{component-GMs5JPFl.js → component-DxelloF0.js} +4 -4
- package/dist/{kolibri/component-GMs5JPFl.js.map → esm/component-DxelloF0.js.map} +1 -1
- package/dist/esm/{component-DzjceEod.js → component-U1HX1ZbW.js} +3 -3
- package/dist/esm/{component-DzjceEod.js.map → component-U1HX1ZbW.js.map} +1 -1
- package/dist/esm/{component-bmRP9KF4.js → component-oWROUiYq.js} +6 -6
- package/dist/{kolibri/component-bmRP9KF4.js.map → esm/component-oWROUiYq.js.map} +1 -1
- package/dist/esm/{controller-CiQZpznm.js → controller-Bh5fBUBi.js} +3 -3
- package/dist/esm/{controller-CiQZpznm.js.map → controller-Bh5fBUBi.js.map} +1 -1
- package/dist/esm/{controller-0l-d2tR9.js → controller-CMXAgKAz.js} +3 -3
- package/dist/{kolibri/controller-0l-d2tR9.js.map → esm/controller-CMXAgKAz.js.map} +1 -1
- package/dist/esm/{controller-3veggkEZ.js → controller-CfLL4URL.js} +3 -3
- package/dist/esm/{controller-3veggkEZ.js.map → controller-CfLL4URL.js.map} +1 -1
- package/dist/esm/{controller-icon-UG0vqWJT.js → controller-icon-g6dhLeRs.js} +6 -6
- package/dist/{kolibri/controller-icon-UG0vqWJT.js.map → esm/controller-icon-g6dhLeRs.js.map} +1 -1
- package/dist/esm/{dev.utils-BiOBe0-3.js → dev.utils-CiiFii6l.js} +3 -3
- package/dist/esm/{dev.utils-BiOBe0-3.js.map → dev.utils-CiiFii6l.js.map} +1 -1
- package/dist/esm/{devtools-DliuAd6t.js → devtools-BQLYa7H7.js} +4 -4
- package/dist/esm/{devtools-DliuAd6t.js.map → devtools-BQLYa7H7.js.map} +1 -1
- package/dist/esm/{index-Dj5WSwnc.js → index-CLHqy-2_.js} +3 -3
- package/dist/{kolibri/index-Dj5WSwnc.js.map → esm/index-CLHqy-2_.js.map} +1 -1
- package/dist/esm/kol-abbr.entry.js +2 -2
- package/dist/esm/kol-accordion.entry.js +5 -5
- package/dist/esm/kol-alert-wc.entry.js +4 -4
- package/dist/esm/kol-alert.entry.js +2 -2
- package/dist/esm/kol-avatar.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +5 -5
- package/dist/esm/kol-breadcrumb.entry.js +3 -3
- package/dist/esm/kol-button-link.entry.js +2 -2
- package/dist/esm/kol-button-wc.entry.js +5 -5
- package/dist/esm/kol-button.entry.js +2 -2
- package/dist/esm/kol-card-wc.entry.js +6 -6
- package/dist/esm/kol-card.entry.js +2 -2
- package/dist/esm/kol-click-button.entry.js +2 -2
- package/dist/esm/kol-combobox.entry.js +13 -13
- package/dist/esm/kol-details.entry.js +5 -5
- package/dist/esm/kol-dialog-wc.entry.js +2 -2
- package/dist/esm/kol-dialog.entry.js +2 -2
- package/dist/esm/kol-drawer.entry.js +3 -3
- package/dist/esm/kol-form.entry.js +5 -5
- 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 +12 -12
- package/dist/esm/kol-input-color.entry.js +12 -12
- package/dist/esm/kol-input-date.entry.js +12 -12
- package/dist/esm/kol-input-email.entry.js +14 -14
- package/dist/esm/kol-input-file.entry.js +12 -12
- package/dist/esm/kol-input-number.entry.js +12 -12
- package/dist/esm/kol-input-password.entry.js +13 -13
- package/dist/esm/kol-input-radio.entry.js +12 -12
- package/dist/esm/kol-input-range.entry.js +12 -12
- package/dist/esm/kol-input-text.entry.js +14 -14
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js +2 -2
- package/dist/esm/kol-link-wc.entry.js +6 -6
- package/dist/esm/kol-link.entry.js +7 -7
- package/dist/esm/kol-meter.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +2 -2
- package/dist/esm/kol-nav.entry.js +3 -3
- package/dist/esm/kol-pagination-wc.entry.js +2 -2
- package/dist/esm/kol-pagination.entry.js +2 -2
- package/dist/esm/kol-popover-button-wc.entry.js +2 -2
- package/dist/esm/kol-popover-button.entry.js +2 -2
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-select-wc.entry.js +10 -10
- package/dist/esm/kol-select.entry.js +2 -2
- package/dist/esm/kol-single-select.entry.js +14 -14
- package/dist/esm/kol-skeleton.entry.js +2 -2
- package/dist/esm/kol-skip-nav.entry.js +2 -2
- package/dist/esm/kol-spin.entry.js +2 -2
- package/dist/esm/kol-split-button.entry.js +2 -2
- package/dist/esm/kol-table-settings-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js +2 -2
- package/dist/esm/kol-table-stateless-wc.entry.js +6 -6
- package/dist/esm/kol-table-stateless.entry.js +2 -2
- package/dist/esm/kol-tabs.entry.js +3 -3
- package/dist/esm/kol-textarea.entry.js +10 -10
- package/dist/esm/kol-toast-container.entry.js +7 -7
- package/dist/esm/kol-toolbar.entry.js +2 -2
- package/dist/esm/kol-tooltip-wc.entry.js +4 -4
- package/dist/esm/kol-tree-item-wc.entry.js +3 -3
- package/dist/esm/kol-tree-item.entry.js +2 -2
- package/dist/esm/kol-tree-wc.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/{Alert-XvOlPesJ.js → Alert-BUOtAOEU.js} +2 -2
- package/dist/{esm/Alert-XvOlPesJ.js.map → kolibri/Alert-BUOtAOEU.js.map} +1 -1
- package/dist/kolibri/{Collapsible-DoZaXLnb.js → Collapsible-JODPbWD_.js} +2 -2
- package/dist/{esm/Collapsible-DoZaXLnb.js.map → kolibri/Collapsible-JODPbWD_.js.map} +1 -1
- package/dist/kolibri/CustomSuggestionsOptionsGroup-uIBVxXva.js +5 -0
- package/dist/{esm/CustomSuggestionsOptionsGroup-OlSJMJOe.js.map → kolibri/CustomSuggestionsOptionsGroup-uIBVxXva.js.map} +1 -1
- package/dist/kolibri/FieldControlStateWrapper-B5wxkm5C.js +5 -0
- package/dist/kolibri/{FieldControlStateWrapper-MPQg1DYb.js.map → FieldControlStateWrapper-B5wxkm5C.js.map} +1 -1
- package/dist/kolibri/FormFieldStateWrapper-ClHy49ac.js +5 -0
- package/dist/{esm/FormFieldStateWrapper-DuENCjwI.js.map → kolibri/FormFieldStateWrapper-ClHy49ac.js.map} +1 -1
- package/dist/kolibri/{Heading-BGtN1KkQ.js → Heading-_wdE01Ba.js} +2 -2
- package/dist/{esm/Heading-BGtN1KkQ.js.map → kolibri/Heading-_wdE01Ba.js.map} +1 -1
- package/dist/kolibri/Input-Us8iV6NH.js +5 -0
- package/dist/{esm/Input-DdJF9sdj.js.map → kolibri/Input-Us8iV6NH.js.map} +1 -1
- package/dist/kolibri/InputStateWrapper-CxmgEntV.js +5 -0
- package/dist/kolibri/{InputStateWrapper-CJkVS_go.js.map → InputStateWrapper-CxmgEntV.js.map} +1 -1
- package/dist/kolibri/app-globals-B-1exqqn.js +5 -0
- package/dist/kolibri/{app-globals-DJgPFDlb.js.map → app-globals-B-1exqqn.js.map} +1 -1
- package/dist/kolibri/{component-BXlOrqPl.js → component-CbvU8i7s.js} +2 -2
- package/dist/{esm/component-BXlOrqPl.js.map → kolibri/component-CbvU8i7s.js.map} +1 -1
- package/dist/kolibri/component-CqTwHM6Q.js +5 -0
- package/dist/{esm/component-B1AXhKT6.js.map → kolibri/component-CqTwHM6Q.js.map} +1 -1
- package/dist/kolibri/component-Dk2wt0bc.js +5 -0
- package/dist/kolibri/{component-B07x6VKl.js.map → component-Dk2wt0bc.js.map} +1 -1
- package/dist/kolibri/{component-GMs5JPFl.js → component-DxelloF0.js} +2 -2
- package/dist/{esm/component-GMs5JPFl.js.map → kolibri/component-DxelloF0.js.map} +1 -1
- package/dist/kolibri/component-U1HX1ZbW.js +5 -0
- package/dist/kolibri/{component-DzjceEod.js.map → component-U1HX1ZbW.js.map} +1 -1
- package/dist/kolibri/component-oWROUiYq.js +5 -0
- package/dist/{esm/component-bmRP9KF4.js.map → kolibri/component-oWROUiYq.js.map} +1 -1
- package/dist/kolibri/{controller-CiQZpznm.js → controller-Bh5fBUBi.js} +2 -2
- package/dist/kolibri/{controller-CiQZpznm.js.map → controller-Bh5fBUBi.js.map} +1 -1
- package/dist/kolibri/{controller-0l-d2tR9.js → controller-CMXAgKAz.js} +2 -2
- package/dist/{esm/controller-0l-d2tR9.js.map → kolibri/controller-CMXAgKAz.js.map} +1 -1
- package/dist/kolibri/{controller-3veggkEZ.js → controller-CfLL4URL.js} +2 -2
- package/dist/kolibri/{controller-3veggkEZ.js.map → controller-CfLL4URL.js.map} +1 -1
- package/dist/kolibri/{controller-icon-UG0vqWJT.js → controller-icon-g6dhLeRs.js} +2 -2
- package/dist/{esm/controller-icon-UG0vqWJT.js.map → kolibri/controller-icon-g6dhLeRs.js.map} +1 -1
- package/dist/kolibri/{dev.utils-BiOBe0-3.js → dev.utils-CiiFii6l.js} +2 -2
- package/dist/kolibri/{dev.utils-BiOBe0-3.js.map → dev.utils-CiiFii6l.js.map} +1 -1
- package/dist/kolibri/{devtools-DliuAd6t.js → devtools-BQLYa7H7.js} +2 -2
- package/dist/kolibri/{devtools-DliuAd6t.js.map → devtools-BQLYa7H7.js.map} +1 -1
- package/dist/kolibri/{index-Dj5WSwnc.js → index-CLHqy-2_.js} +2 -2
- package/dist/{esm/index-Dj5WSwnc.js.map → kolibri/index-CLHqy-2_.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-wc.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-wc.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.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-details.entry.js +1 -1
- package/dist/kolibri/kol-dialog-wc.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.js +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-wc.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js.map +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-wc.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.entry.js +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-wc.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-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless-wc.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.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree-wc.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/kolibri.esm.js +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/package.json +1 -1
- package/dist/kolibri/CustomSuggestionsOptionsGroup-OlSJMJOe.js +0 -5
- package/dist/kolibri/FieldControlStateWrapper-MPQg1DYb.js +0 -5
- package/dist/kolibri/FormFieldStateWrapper-DuENCjwI.js +0 -5
- package/dist/kolibri/Input-DdJF9sdj.js +0 -5
- package/dist/kolibri/InputStateWrapper-CJkVS_go.js +0 -5
- package/dist/kolibri/app-globals-DJgPFDlb.js +0 -5
- package/dist/kolibri/component-B07x6VKl.js +0 -5
- package/dist/kolibri/component-B1AXhKT6.js +0 -5
- package/dist/kolibri/component-DzjceEod.js +0 -5
- package/dist/kolibri/component-bmRP9KF4.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{h as o}from"./index-CLHqy-2_.js";import{b as s}from"./bem-registry-DGv3NmGE.js";const t=s.forBlock("kol-click-button");const n=t();const l=t("label");const c=({label:s,handleClick:t,refButton:c})=>o("button",{class:n,ref:c,onClick:t,onKeyDown:o=>o.preventDefault()},o("span",{class:l},s));export{c as C};
|
|
5
|
+
//# sourceMappingURL=component-U1HX1ZbW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-U1HX1ZbW.js","sources":["src/internal/functional-components/click-button/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { bem } from '../../../schema/bem-registry';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { ClickButtonApi } from './api';\n\nconst clickButtonBem = bem.forBlock('kol-click-button');\nconst BEM_CLASS_CLICK_BUTTON = clickButtonBem();\nconst BEM_CLASS_CLICK_BUTTON__LABEL = clickButtonBem('label');\n\nexport const ClickButtonFC: FC<FunctionalComponentProps<ClickButtonApi>> = ({ label, handleClick, refButton }) => (\n\t<button class={BEM_CLASS_CLICK_BUTTON} ref={refButton} onClick={handleClick} onKeyDown={(event) => event.preventDefault()}>\n\t\t<span class={BEM_CLASS_CLICK_BUTTON__LABEL}>{label}</span>\n\t</button>\n);\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC;AACvD,MAAM,sBAAsB,GAAG,cAAc,EAAE;AAC/C,MAAM,6BAA6B,GAAG,cAAc,CAAC,OAAO,CAAC;AAEtD,MAAM,aAAa,GAAiD,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAC5G,cAAQ,KAAK,EAAE,sBAAsB,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,EAAE,EAAA,EACxH,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,6BAA6B,EAAA,EAAG,KAAK,CAAQ,CAClD;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{c as e,n,b as t,d as o,a as r}from"./normalizers-DWPxOTIP.js";import{j as s}from"./common-noYAs-wc.js";import{h as a}from"./href-CBdHcGY_.js";import{l as i}from"./label-with-expert-slot-3VWute5S.js";import"./variant-quote-CRKM9QG2.js";import{a as l}from"./align-BNmcYY75.js";import{h as c}from"./index-CLHqy-2_.js";import{t as f}from"./i18n-CrXMv0tS.js";import{c as d}from"./variant-class-name-B0Wpr2i8.js";import{c as u}from"./clsx-COFh-Vc8.js";import{b as p}from"./bem-registry-DGv3NmGE.js";import{I as m}from"./component-CqTwHM6Q.js";import{S as b}from"./component-DxelloF0.js";import{T as g}from"./component-Dk2wt0bc.js";const y=e("accessKey","",n);const h=e("ariaControls","",n);const k=["date","location","page","step","time","true","false"];function j(e){const t=n(e);return k.includes(t)?t:"page"}const x=e("ariaCurrentValue","page",j);const v=e("ariaDescription","",n);function w(e){if(e===true||e==="true"){return"true"}if(e===false||e==="false"){return"false"}return""}const C=e("ariaExpanded","",w);const _=e("ariaOwns","",n);const A=/^[a-zA-Z][a-zA-Z0-9_-]{0,60}$/;const I=e=>typeof e==="string"&&A.test(e);function D(e){return e===""||I(e)}const K=e("customClass","",n,D);const L=e("disabled",false,t);const T=e("download","",n);const $=e("hideLabel",false,t);const q=e("inline",true,t);function E(e){if(typeof e==="object"&&e!==null){return e}throw new Error(`Invalid on callbacks: expected object, got ${typeof e}`)}const O=e("on",{},E);const G=["tab","treeitem"];function S(e){return typeof e==="string"&&G.includes(e)?e:""}const Y=e("role","",S);const z=e("target","",n);const B=e("shortKey","",n);function F(e){if(!e||typeof e==="string"&&e===""){return{}}if(typeof e==="string"){return n(e)}if(typeof e==="object"){return o(e)}throw new Error(`Invalid icons: ${typeof e}`)}function H(e){if(typeof e==="string"){return e.length>0}return typeof e==="object"&&e!==null}const M=e("icons",{},F,H);const V=e("tabIndex",0,r);function W(e){const t=n(e);if(l.includes(t)){return t}return"right"}const N=e("tooltipAlign","right",W,(e=>l.includes(e)));function P(e){if(Array.isArray(e)){return e}if(typeof e==="string"){return e.split(" ")}return[]}function Q(e){return e.length===0||e.every(I)}const Z=e("variant",[],P,Q);const R={required:[a],optional:[y,h,x,v,C,_,K,L,T,$,M,q,i,O,Y,z,B,V,N,Z]};const X=({block:e,modifiers:n,class:t},o)=>{const r=p.forBlock(e);return c("div",{class:u(r(n),t)},o)};const J=e=>{const{accessKey:n,ariaControls:t,ariaCurrent:o,ariaDescription:r,ariaDescriptionId:a,ariaExpanded:i,ariaOwns:l,customClass:p,disabled:y,download:h,handleAnchorClick:k,hideLabel:j,href:x,icons:v,inline:w,label:C,on:_,refAnchor:A,refTooltip:I,role:D,shortKey:K,tabIndex:L,target:T,variant:$,expertSlot:q}=e;const E=f("kol-open-link-in-tab");const O=typeof T==="string"&&T.length>0&&T!=="_self";const G={href:typeof x==="string"&&x.length>0?x:"javascript:void(0);",target:typeof T==="string"&&T.length>0?T:undefined,rel:O?"noopener":undefined,download:typeof h==="string"&&h.length>0?h:undefined};if(j===true&&!C){s(`[KolLink] An aria-label must be set when _hide-label is set.`)}const S=r===null||r===void 0?void 0:r.trim();const Y=D||undefined;return c(X,{block:"kol-link",class:u({[p]:$.includes("custom")&&p.length>0,[d($,"link")]:$.length>0}),modifiers:{disabled:y===true,"external-link":O,"hide-label":j===true,inline:w===true,standalone:w===false}},c("a",Object.assign({ref:A},G,{accessKey:n||undefined,"aria-current":o||undefined,"aria-controls":t||undefined,"aria-describedby":S?a:undefined,"aria-disabled":y?"true":undefined,"aria-expanded":i===""?undefined:i,"aria-owns":l||undefined,"aria-label":j&&typeof C==="string"?`${C}${O?` (${E})`:""}`:undefined,"aria-keyshortcuts":K||undefined,class:"kol-link__anchor"},_,{onClick:k,role:Y,tabIndex:y?-1:L}),c(b,{class:"kol-link__text",badgeText:n||K,icons:v,hideLabel:j,label:q?"":C||x},c("slot",{name:"expert",slot:"expert"})),O&&c(m,{class:"kol-link__icon",label:j?"":E,icons:"kolicon-link-external","aria-hidden":j})),j===true&&!q&&c("div",{class:"kol-link__tooltip"},c(g,{badgeText:n||K||"",label:typeof C==="string"?C:typeof x==="string"?x:"",refFloating:I})),S&&c("span",{class:"visually-hidden",id:a},S))};export{J as L,y as a,h as b,x as c,v as d,C as e,L as f,T as g,$ as h,q as i,O as j,B as k,R as l,z as m,_ as n,K as o,Y as p,V as q,M as s,N as t,Z as v};
|
|
5
|
+
//# sourceMappingURL=component-oWROUiYq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-bmRP9KF4.js","sources":["src/internal/props/access-key.ts","src/internal/props/aria-controls.ts","src/internal/props/aria-current-value.ts","src/internal/props/aria-description.ts","src/internal/props/aria-expanded.ts","src/internal/props/aria-owns.ts","src/internal/props/helpers/validators.ts","src/internal/props/custom-class.ts","src/internal/props/disabled.ts","src/internal/props/download.ts","src/internal/props/hide-label.ts","src/internal/props/inline.ts","src/internal/props/link-callbacks.ts","src/internal/props/link-role.ts","src/internal/props/link-target.ts","src/internal/props/short-key.ts","src/internal/props/span-icons.ts","src/internal/props/tab-index.ts","src/internal/props/tooltip-align.ts","src/internal/props/variant.ts","src/internal/functional-components/link/api.tsx","src/internal/functional-components/bem-root-node/component.tsx","src/internal/functional-components/link/component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AccessKeyProp = SimpleProp<'accessKey', string>;\nexport const accessKeyProp = createPropDefinition<AccessKeyProp>('accessKey', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AriaControlsProp = SimpleProp<'ariaControls', string>;\nexport const ariaControlsProp = createPropDefinition<AriaControlsProp>('ariaControls', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * The allowed values for the aria-current attribute.\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current\n */\nexport const ARIA_CURRENT_VALUE_OPTIONS = ['date', 'location', 'page', 'step', 'time', 'true', 'false'] as const;\nexport type AriaCurrentValuePropType = (typeof ARIA_CURRENT_VALUE_OPTIONS)[number];\n\nexport type AriaCurrentValueProp = SimpleProp<'ariaCurrentValue', AriaCurrentValuePropType>;\n\n/**\n * Normalizes the value to a valid aria-current value.\n *\n * Graceful degradation: when the (already normalized, non-null) string is not one of the\n * allowed options, falls back to the default `'page'` instead of throwing. The factory's\n * `apply` handles undefined/null before this is reached.\n */\nfunction normalizeAriaCurrentValue(value: unknown): AriaCurrentValuePropType {\n\tconst str = normalizeString(value);\n\treturn (ARIA_CURRENT_VALUE_OPTIONS as readonly string[]).includes(str) ? (str as AriaCurrentValuePropType) : 'page';\n}\n\nexport const ariaCurrentValueProp = createPropDefinition<AriaCurrentValueProp>('ariaCurrentValue', 'page', normalizeAriaCurrentValue);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AriaDescriptionProp = SimpleProp<'ariaDescription', string>;\nexport const ariaDescriptionProp = createPropDefinition<AriaDescriptionProp>('ariaDescription', '', normalizeString);\n","import type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * The internal type uses the sentinel `''` for \"not set\" because the prop-definition factory\n * requires a non-undefined default value (same pattern as `linkRoleProp`). A plain link must\n * not render `aria-expanded=\"false\"` — assistive technologies would announce a collapsed\n * state that the link does not actually manage.\n */\nexport type AriaExpandedProp = Prop<'ariaExpanded', boolean | undefined, 'true' | 'false' | ''>;\n\n/**\n * Normalizes the value to the aria-expanded tokens.\n *\n * Booleans and their string equivalents map to `'true'`/`'false'`; anything else degrades to\n * the sentinel `''` so the attribute is omitted. undefined/null are handled by the factory's\n * `apply` before this is reached.\n */\nfunction normalizeAriaExpanded(value: unknown): 'true' | 'false' | '' {\n\tif (value === true || value === 'true') {\n\t\treturn 'true';\n\t}\n\tif (value === false || value === 'false') {\n\t\treturn 'false';\n\t}\n\treturn '';\n}\n\nexport const ariaExpandedProp = createPropDefinition<AriaExpandedProp>('ariaExpanded', '', normalizeAriaExpanded);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AriaOwnsProp = SimpleProp<'ariaOwns', string>;\nexport const ariaOwnsProp = createPropDefinition<AriaOwnsProp>('ariaOwns', '', normalizeString);\n","/**\n * Shared validators for prop definitions.\n * Centralized here so custom-class and variant props share one regex\n * (avoids the SAFE_CLASS_NAME_RE duplication flagged in PR #10110).\n *\n * Why the minimum length is `{0,60}` (1–61 chars) and not the legacy variant-only `{3,60}`:\n * on develop the two props were validated differently — `_variant` used the strict regex,\n * `_customClass` had no regex at all (`watchString` accepted any string). Unifying them under\n * the strict regex would have silently REJECTED short custom-class values (e.g. `\"abc\"`) that\n * were valid on develop; the relaxed minimum is the lesser behavior change. The relaxation also\n * widens `_variant` (1–3 char variant names are now valid), which is accepted: no component\n * uses variant names that short through this definition. Note that multi-class values like\n * `\"foo bar\"` are rejected for `_customClass` (single safe class name only) — stricter than\n * develop's `watchString`, but consistent with `_variant` semantics. Pinned by tests in\n * `validators.spec.ts`.\n */\nconst SAFE_CLASS_NAME_RE = /^[a-zA-Z][a-zA-Z0-9_-]{0,60}$/;\n\nexport const isSafeClassName = (value: unknown): value is string => typeof value === 'string' && SAFE_CLASS_NAME_RE.test(value);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\nimport { isSafeClassName } from './helpers/validators';\n\nexport type CustomClassProp = SimpleProp<'customClass', string>;\n\n/**\n * Validates the normalized custom-class value. An empty string is valid (means no custom class);\n * any non-empty value must be a single safe class name.\n */\nfunction validateCustomClass(value: string): boolean {\n\treturn value === '' || isSafeClassName(value);\n}\n\nexport const customClassProp = createPropDefinition<CustomClassProp>('customClass', '', normalizeString, validateCustomClass);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\nexport type DisabledProp = SimpleProp<'disabled', boolean>;\nexport const disabledProp = createPropDefinition<DisabledProp>('disabled', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type DownloadProp = SimpleProp<'download', string>;\nexport const downloadProp = createPropDefinition<DownloadProp>('download', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Hide Label prop for controlling label visibility\n *\n * Description:\n * Specifies whether the label should be visually hidden.\n * When enabled, the label is not displayed but remains accessible to screen readers.\n *\n * Usage (according to WCAG 2.1 and WAI-ARIA):\n * - Default: false (label is visible)\n * - When true: label is hidden visually but remains available to assistive technologies (WCAG 1.3.1)\n * - The label content is still used for accessibility purposes\n * - Expert slot becomes visible when label is hidden\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html\n * @see https://www.a11yproject.com/posts/how-to-hide-content/\n */\nexport type HideLabelProp = SimpleProp<'hideLabel', boolean>;\nexport const hideLabelProp = createPropDefinition<HideLabelProp>('hideLabel', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\nexport type InlineProp = SimpleProp<'inline', boolean>;\nexport const inlineProp = createPropDefinition<InlineProp>('inline', true, normalizeBoolean);\n","import type { LinkOnCallbacksPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\nexport type LinkCallbacksProp = SimpleProp<'on', LinkOnCallbacksPropType>;\n\n/**\n * Normalizes the callbacks object. The factory's `apply` handles undefined/null (falling back to\n * the default `{}`) before this is reached, so we only need to verify a non-null value is an object.\n */\nfunction normalizeLinkCallbacks(value: unknown): LinkOnCallbacksPropType {\n\tif (typeof value === 'object' && value !== null) {\n\t\treturn value as LinkOnCallbacksPropType;\n\t}\n\tthrow new Error(`Invalid on callbacks: expected object, got ${typeof value}`);\n}\n\nexport const linkCallbacksProp = createPropDefinition<LinkCallbacksProp>('on', {}, normalizeLinkCallbacks);\n","import type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * The allowed role values for a link/button that takes the place of an ARIA role.\n */\nexport type AlternativeButtonLinkRolePropType = 'tab' | 'treeitem';\n\nconst LINK_ROLE_OPTIONS: readonly AlternativeButtonLinkRolePropType[] = ['tab', 'treeitem'];\n\n/**\n * Role prop for kol-link.\n *\n * The external type is the optional union `'tab' | 'treeitem' | undefined`. Internally we use the\n * sentinel empty string `''` to represent \"no role\" because the prop-definition factory types the\n * default through `NonNullable<...>`, which does not admit `undefined`. Consumers that read the\n * normalized value should treat `''` as \"no explicit role\".\n */\nexport type LinkRoleProp = Prop<'role', AlternativeButtonLinkRolePropType | undefined, '' | AlternativeButtonLinkRolePropType>;\n\n/**\n * Normalizes the role value.\n *\n * Graceful degradation: when the value is one of the allowed roles it is returned; otherwise\n * (including any non-member string) the sentinel `''` is returned so the component renders\n * without an explicit role. The factory's `apply` handles undefined/null before this is reached.\n */\nfunction normalizeLinkRole(value: unknown): '' | AlternativeButtonLinkRolePropType {\n\treturn typeof value === 'string' && (LINK_ROLE_OPTIONS as readonly string[]).includes(value) ? (value as AlternativeButtonLinkRolePropType) : '';\n}\n\nexport const linkRoleProp = createPropDefinition<LinkRoleProp>('role', '', normalizeLinkRole);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type LinkTargetProp = SimpleProp<'target', string>;\nexport const linkTargetProp = createPropDefinition<LinkTargetProp>('target', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type ShortKeyProp = SimpleProp<'shortKey', string>;\nexport const shortKeyProp = createPropDefinition<ShortKeyProp>('shortKey', '', normalizeString);\n","import type { KoliBriIconsProp } from '../../schema/types';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeObject, normalizeString } from './helpers/normalizers';\n\n/**\n * Icons prop for multi-directional icon display\n *\n * Description:\n * Specifies icons to display in one or more directions (top, right, bottom, left).\n * Can accept either a single icon class or an object with directional icon specifications.\n *\n * Usage:\n * - String: A single icon class name (displayed on the left by default)\n * - Object: Directional icons (e.g., { top: 'icon-class', left: 'icon-class' })\n * - Default: empty object (no icons)\n *\n * Accessibility:\n * - Icons must have descriptive labels to meet WCAG 1.1.1\n * - Use the label prop to provide text alternatives\n * - Icons should not be the sole means of conveying information (WCAG 1.3.3)\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html\n */\nexport type SpanIconsProp = SimpleProp<'icons', KoliBriIconsProp>;\n\nfunction normalizeSpanIcons(value: unknown): KoliBriIconsProp | never {\n\tif (!value || (typeof value === 'string' && value === '')) {\n\t\treturn {};\n\t}\n\t// If it's a string, return it as-is\n\tif (typeof value === 'string') {\n\t\treturn normalizeString(value);\n\t}\n\t// If it's an object, normalize it\n\tif (typeof value === 'object') {\n\t\treturn normalizeObject(value) as KoliBriIconsProp;\n\t}\n\tthrow new Error(`Invalid icons: ${typeof value}`);\n}\n\nfunction validateSpanIcons(value: KoliBriIconsProp): boolean {\n\t// String is valid if it's non-empty\n\tif (typeof value === 'string') {\n\t\treturn value.length > 0;\n\t}\n\t// Object is always valid (even if empty)\n\treturn typeof value === 'object' && value !== null;\n}\n\nexport const spanIconsProp = createPropDefinition<SpanIconsProp>('icons', {} as KoliBriIconsProp, normalizeSpanIcons, validateSpanIcons);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeInteger } from './helpers/normalizers';\n\nexport type TabIndexProp = SimpleProp<'tabIndex', number>;\nexport const tabIndexProp = createPropDefinition<TabIndexProp>('tabIndex', 0, normalizeInteger);\n","import type { AlignPropType } from '../../schema';\nimport { alignPropTypeOptions } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Tooltip align prop for kol-link.\n *\n * Same valid values as {@link alignProp} ('top' | 'right' | 'bottom' | 'left') but defaults to\n * `'right'` to match the legacy `_tooltipAlign` default on kol-link.\n */\nexport type TooltipAlignProp = SimpleProp<'tooltipAlign', AlignPropType>;\n\nfunction normalizeTooltipAlign(value: unknown): AlignPropType {\n\tconst str = normalizeString(value);\n\tif ((alignPropTypeOptions as readonly string[]).includes(str)) {\n\t\treturn str as AlignPropType;\n\t}\n\treturn 'right';\n}\n\nexport const tooltipAlignProp = createPropDefinition<TooltipAlignProp>('tooltipAlign', 'right', normalizeTooltipAlign, (v) =>\n\t(alignPropTypeOptions as readonly string[]).includes(v),\n);\n","import type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { isSafeClassName } from './helpers/validators';\n\n/**\n * Variant prop for class-name based variants (e.g. kol-link, kol-button).\n *\n * External type: `string | string[]` — a space-separated string of variant names or an array.\n * Internal type: `string[]` — always normalized to an array. An empty array means \"no variant\".\n *\n * This mirrors the legacy `validateVariantClassName` → `beforePatchString` pipeline, which split\n * strings by spaces into arrays before storing them in state. The `classNameFromVariant` renderer\n * only processes arrays, so normalizing here ensures the variant classes are always applied.\n */\nexport type VariantProp = Prop<'variant', string | string[], string[]>;\n\n/**\n * Normalizes the variant value to an array of variant tokens.\n *\n * - Arrays are passed through as-is.\n * - Strings are split by spaces into tokens (matches `beforePatchString`).\n * - The factory's `apply` handles undefined/null before this is reached.\n */\nfunction normalizeVariant(value: unknown): string[] {\n\tif (Array.isArray(value)) {\n\t\treturn value as string[];\n\t}\n\tif (typeof value === 'string') {\n\t\treturn value.split(' ');\n\t}\n\treturn [];\n}\n\n/**\n * Validates the normalized variant value.\n *\n * - Empty array means \"no variant\" and is valid.\n * - Non-empty arrays must consist entirely of safe class names.\n */\nfunction validateVariant(value: string[]): boolean {\n\treturn value.length === 0 || value.every(isSafeClassName);\n}\n\nexport const variantProp = createPropDefinition<VariantProp>('variant', [], normalizeVariant, validateVariant);\n","import {\n\taccessKeyProp,\n\tariaControlsProp,\n\tariaCurrentValueProp,\n\tariaDescriptionProp,\n\tariaExpandedProp,\n\tariaOwnsProp,\n\tcustomClassProp,\n\tdisabledProp,\n\tdownloadProp,\n\thideLabelProp,\n\threfProp,\n\tinlineProp,\n\tlabelWithExpertSlotProp,\n\tlinkCallbacksProp,\n\tlinkRoleProp,\n\tlinkTargetProp,\n\tshortKeyProp,\n\tspanIconsProp,\n\ttabIndexProp,\n\ttooltipAlignProp,\n\tvariantProp,\n} from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props configuration for the link component.\n *\n * `href` is the only required prop. All others are optional.\n *\n * Notes on prop choices:\n * - `labelWithExpertSlotProp` (not `labelProp`): no min/max length restriction, matching the\n * original `validateLabelWithExpertSlot`. The empty string enables the expert slot; this is\n * tracked separately via the `expertSlot` state because the factory collapses undefined → ''\n * (the default), which would wrongly enable the expert slot when no label was passed.\n * - `spanIconsProp` (not `iconsProp`): icons are `KoliBriIconsProp` (object), not a plain string.\n * - `tooltipAlignProp`: same valid values as `alignProp` but defaults to `'right'` (matching the\n * legacy `_tooltipAlign` default).\n */\nexport const linkPropsConfig = {\n\trequired: [hrefProp],\n\toptional: [\n\t\taccessKeyProp,\n\t\tariaControlsProp,\n\t\tariaCurrentValueProp,\n\t\tariaDescriptionProp,\n\t\tariaExpandedProp,\n\t\tariaOwnsProp,\n\t\tcustomClassProp,\n\t\tdisabledProp,\n\t\tdownloadProp,\n\t\thideLabelProp,\n\t\tspanIconsProp,\n\t\tinlineProp,\n\t\tlabelWithExpertSlotProp,\n\t\tlinkCallbacksProp,\n\t\tlinkRoleProp,\n\t\tlinkTargetProp,\n\t\tshortKeyProp,\n\t\ttabIndexProp,\n\t\ttooltipAlignProp,\n\t\tvariantProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type LinkApi = ApiFromConfig<\n\ttypeof linkPropsConfig,\n\t{\n\t\tCallbacks: {\n\t\t\t/**\n\t\t\t * Click handler bound to the anchor element. Implemented by the web component\n\t\t\t * (`handleAnchorClick`), which also dispatches the custom `KolEvent.click` event\n\t\t\t * on the host element.\n\t\t\t */\n\t\t\tanchorClick: (event: Event) => void;\n\t\t};\n\t\tMethods: {\n\t\t\tfocus: (options?: FocusOptions) => void;\n\t\t\tclick: () => void;\n\t\t};\n\t\tRefs: {\n\t\t\tanchor: HTMLAnchorElement;\n\t\t\ttooltip: HTMLDivElement;\n\t\t};\n\t\tStates: {\n\t\t\t/**\n\t\t\t * Derived aria-current value: one of the aria-current tokens when the link's href\n\t\t\t * matches the current location, otherwise an empty string (rendered as undefined →\n\t\t\t * no aria-current attribute). Managed via setState for reactivity.\n\t\t\t */\n\t\t\tariaCurrent: string;\n\t\t\t/**\n\t\t\t * DOM id of the visually-hidden span that carries the aria description. Generated\n\t\t\t * once per web component instance and referenced by the anchor's aria-describedby\n\t\t\t * attribute, since aria-description lacks screen reader support.\n\t\t\t */\n\t\t\tariaDescriptionId: string;\n\t\t\t/**\n\t\t\t * Whether the expert slot should be rendered. True only when the consumer explicitly\n\t\t\t * passed an empty-string label. When the label is undefined (default ''), the expert\n\t\t\t * slot stays off and the href is used as the fallback label text.\n\t\t\t */\n\t\t\texpertSlot: boolean;\n\t\t};\n\t}\n>;\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\n\nimport type { KoliBriComponentsBemSchema } from '../../../schema/bem-registry';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\n\ntype FCChildren = Parameters<FC>[1];\n\ntype KeysOfSet<T> = T extends Set<infer U> ? U : never;\n\n/**\n * Extracts the valid block modifier keys for a given registered BEM block.\n * Mirrors the conditional type used by typed-bem so that the types align exactly.\n */\nexport type BlockModifiers<TBlock extends keyof KoliBriComponentsBemSchema> =\n\tKeysOfSet<KoliBriComponentsBemSchema[TBlock]['modifiers']> extends never\n\t\t? undefined\n\t\t: Partial<Record<KeysOfSet<KoliBriComponentsBemSchema[TBlock]['modifiers']>, boolean>>;\n\ntype BemRootNodeFCProps<TBlock extends keyof KoliBriComponentsBemSchema> = {\n\t/**\n\t * BEM block name — must be a key registered in `KoliBriComponentsBemSchema`.\n\t * Constrains `modifiers` to the exact modifier set defined in `bem-registry.ts`.\n\t */\n\tblock: TBlock;\n\t/**\n\t * BEM block modifiers. Keys are validated against the schema (e.g. `'disabled'`, `'inline'`).\n\t * No `kol-link--` prefix needed — typed-bem adds it automatically.\n\t */\n\tmodifiers?: BlockModifiers<TBlock>;\n\t/**\n\t * Additional classes forwarded 1:1 from the FC tag onto the root `<div>`.\n\t * Typically the `class` prop received by the surrounding Functional Component\n\t * (i.e. the `class` attribute set by a parent component).\n\t */\n\tclass?: JSXBase.HTMLAttributes<HTMLElement>['class'];\n};\n\n/**\n * Single-Root BEM wrapper for all Skeleton Functional Components.\n *\n * Responsibilities:\n * - Renders exactly one `<div>` root node — enforcing the Single-Root FC rule.\n * - Accepts a `block` name and typed `modifiers` from `KoliBriComponentsBemSchema`.\n * - Calls `bem.forBlock(block)(modifiers)` internally to generate the class string.\n * - Merges the result with the optional `class` prop.\n *\n * Usage:\n * ```tsx\n * export const LinkFC: FC<LinkFCProps> = ({ ..., class: hostClass, disabled }, children) => (\n * <BemRootNodeFC\n * block=\"kol-link\"\n * modifiers={{ disabled, 'external-link': isExternal }}\n * class={hostClass}\n * >\n * <a class=\"kol-link__anchor\">…</a>\n * </BemRootNodeFC>\n * );\n * ```\n */\nexport const BemRootNodeFC = <TBlock extends keyof KoliBriComponentsBemSchema>(\n\t{ block, modifiers, class: hostClass }: BemRootNodeFCProps<TBlock>,\n\tchildren: FCChildren,\n) => {\n\tconst blockBem = bem.forBlock(block);\n\treturn <div class={clsx(blockBem(modifiers as BlockModifiers<TBlock>), hostClass)}>{children}</div>;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { translate } from '../../../i18n';\nimport { devHint } from '../../../schema';\nimport { classNameFromVariant } from '../../../schema/props/variant-class-name';\nimport clsx from '../../../utils/clsx';\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { IconFC } from '../icon/component';\nimport { SpanFC } from '../span/component';\nimport { TooltipFC } from '../tooltip/component';\nimport type { LinkApi } from './api';\n\nexport const LinkFC: FC<FunctionalComponentProps<LinkApi>> = (props) => {\n\tconst {\n\t\taccessKey,\n\t\tariaControls,\n\t\tariaCurrent,\n\t\tariaDescription,\n\t\tariaDescriptionId,\n\t\tariaExpanded,\n\t\tariaOwns,\n\t\tcustomClass,\n\t\tdisabled,\n\t\tdownload,\n\t\thandleAnchorClick,\n\t\thideLabel,\n\t\thref,\n\t\ticons,\n\t\tinline,\n\t\tlabel,\n\t\ton,\n\t\trefAnchor,\n\t\trefTooltip,\n\t\trole,\n\t\tshortKey,\n\t\ttabIndex,\n\t\ttarget,\n\t\tvariant,\n\t\texpertSlot,\n\t} = props;\n\n\tconst translateOpenLinkInTab = translate('kol-open-link-in-tab');\n\n\tconst isExternal = typeof target === 'string' && target.length > 0 && target !== '_self';\n\n\tconst tagAttrs = {\n\t\thref: typeof href === 'string' && href.length > 0 ? href : 'javascript:void(0);',\n\t\ttarget: typeof target === 'string' && target.length > 0 ? target : undefined,\n\t\trel: isExternal ? 'noopener' : undefined,\n\t\tdownload: typeof download === 'string' && download.length > 0 ? download : undefined,\n\t};\n\n\tif (hideLabel === true && !label) {\n\t\tdevHint(`[KolLink] An aria-label must be set when _hide-label is set.`);\n\t}\n\n\tconst trimmedAriaDescription = ariaDescription?.trim();\n\tconst roleValue = role || undefined;\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tblock=\"kol-link\"\n\t\t\tclass={clsx({\n\t\t\t\t[customClass]: variant.includes('custom') && customClass.length > 0,\n\t\t\t\t[classNameFromVariant(variant, 'link')]: variant.length > 0,\n\t\t\t})}\n\t\t\tmodifiers={{\n\t\t\t\tdisabled: disabled === true,\n\t\t\t\t'external-link': isExternal,\n\t\t\t\t'hide-label': hideLabel === true,\n\t\t\t\tinline: inline === true,\n\t\t\t\tstandalone: inline === false,\n\t\t\t}}\n\t\t>\n\t\t\t{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events -- <a href> is natively keyboard-accessible (Enter triggers click); onKeyPress would cause a double-dispatch bug. */}\n\t\t\t<a\n\t\t\t\tref={refAnchor}\n\t\t\t\t{...tagAttrs}\n\t\t\t\taccessKey={accessKey || undefined}\n\t\t\t\taria-current={ariaCurrent || undefined}\n\t\t\t\taria-controls={ariaControls || undefined}\n\t\t\t\taria-describedby={trimmedAriaDescription ? ariaDescriptionId : undefined}\n\t\t\t\taria-disabled={disabled ? 'true' : undefined}\n\t\t\t\taria-expanded={ariaExpanded === '' ? undefined : ariaExpanded}\n\t\t\t\taria-owns={ariaOwns || undefined}\n\t\t\t\taria-label={hideLabel && typeof label === 'string' ? `${label}${isExternal ? ` (${translateOpenLinkInTab})` : ''}` : undefined}\n\t\t\t\taria-keyshortcuts={shortKey || undefined}\n\t\t\t\tclass=\"kol-link__anchor\"\n\t\t\t\t{...on}\n\t\t\t\tonClick={handleAnchorClick}\n\t\t\t\trole={roleValue}\n\t\t\t\ttabIndex={disabled ? -1 : tabIndex}\n\t\t\t>\n\t\t\t\t<SpanFC class=\"kol-link__text\" badgeText={accessKey || shortKey} icons={icons} hideLabel={hideLabel} label={expertSlot ? '' : label || href}>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</SpanFC>\n\t\t\t\t{isExternal && (\n\t\t\t\t\t<IconFC class=\"kol-link__icon\" label={hideLabel ? '' : translateOpenLinkInTab} icons={'kolicon-link-external'} aria-hidden={hideLabel} />\n\t\t\t\t)}\n\t\t\t</a>\n\t\t\t{hideLabel === true && !expertSlot && (\n\t\t\t\t<div class=\"kol-link__tooltip\">\n\t\t\t\t\t<TooltipFC\n\t\t\t\t\t\tbadgeText={accessKey || shortKey || ''}\n\t\t\t\t\t\tlabel={typeof label === 'string' ? label : typeof href === 'string' ? href : ''}\n\t\t\t\t\t\trefFloating={refTooltip}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{trimmedAriaDescription && (\n\t\t\t\t<span class=\"visually-hidden\" id={ariaDescriptionId}>\n\t\t\t\t\t{trimmedAriaDescription}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</BemRootNodeFC>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAKO,MAAM,aAAa,GAAG,oBAAoB,CAAgB,WAAW,EAAE,EAAE,EAAE,eAAe;;ACA1F,MAAM,gBAAgB,GAAG,oBAAoB,CAAmB,cAAc,EAAE,EAAE,EAAE,eAAe;;ACGnG,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU;AAYhH,SAAS,yBAAyB,CAAC,KAAc,EAAA;AAChD,IAAA,MAAM,GAAG,GAAG,eAAe,CAAC,KAAK,CAAC;AAClC,IAAA,OAAQ,0BAAgD,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAI,GAAgC,GAAG,MAAM;AACpH;AAEO,MAAM,oBAAoB,GAAG,oBAAoB,CAAuB,kBAAkB,EAAE,MAAM,EAAE,yBAAyB;;ACpB7H,MAAM,mBAAmB,GAAG,oBAAoB,CAAsB,iBAAiB,EAAE,EAAE,EAAE,eAAe;;ACanH,SAAS,qBAAqB,CAAC,KAAc,EAAA;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,EAAE;AACvC,QAAA,OAAO,MAAM;;IAEd,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO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
1
|
+
{"version":3,"file":"component-oWROUiYq.js","sources":["src/internal/props/access-key.ts","src/internal/props/aria-controls.ts","src/internal/props/aria-current-value.ts","src/internal/props/aria-description.ts","src/internal/props/aria-expanded.ts","src/internal/props/aria-owns.ts","src/internal/props/helpers/validators.ts","src/internal/props/custom-class.ts","src/internal/props/disabled.ts","src/internal/props/download.ts","src/internal/props/hide-label.ts","src/internal/props/inline.ts","src/internal/props/link-callbacks.ts","src/internal/props/link-role.ts","src/internal/props/link-target.ts","src/internal/props/short-key.ts","src/internal/props/span-icons.ts","src/internal/props/tab-index.ts","src/internal/props/tooltip-align.ts","src/internal/props/variant.ts","src/internal/functional-components/link/api.tsx","src/internal/functional-components/bem-root-node/component.tsx","src/internal/functional-components/link/component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AccessKeyProp = SimpleProp<'accessKey', string>;\nexport const accessKeyProp = createPropDefinition<AccessKeyProp>('accessKey', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AriaControlsProp = SimpleProp<'ariaControls', string>;\nexport const ariaControlsProp = createPropDefinition<AriaControlsProp>('ariaControls', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * The allowed values for the aria-current attribute.\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current\n */\nexport const ARIA_CURRENT_VALUE_OPTIONS = ['date', 'location', 'page', 'step', 'time', 'true', 'false'] as const;\nexport type AriaCurrentValuePropType = (typeof ARIA_CURRENT_VALUE_OPTIONS)[number];\n\nexport type AriaCurrentValueProp = SimpleProp<'ariaCurrentValue', AriaCurrentValuePropType>;\n\n/**\n * Normalizes the value to a valid aria-current value.\n *\n * Graceful degradation: when the (already normalized, non-null) string is not one of the\n * allowed options, falls back to the default `'page'` instead of throwing. The factory's\n * `apply` handles undefined/null before this is reached.\n */\nfunction normalizeAriaCurrentValue(value: unknown): AriaCurrentValuePropType {\n\tconst str = normalizeString(value);\n\treturn (ARIA_CURRENT_VALUE_OPTIONS as readonly string[]).includes(str) ? (str as AriaCurrentValuePropType) : 'page';\n}\n\nexport const ariaCurrentValueProp = createPropDefinition<AriaCurrentValueProp>('ariaCurrentValue', 'page', normalizeAriaCurrentValue);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AriaDescriptionProp = SimpleProp<'ariaDescription', string>;\nexport const ariaDescriptionProp = createPropDefinition<AriaDescriptionProp>('ariaDescription', '', normalizeString);\n","import type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * The internal type uses the sentinel `''` for \"not set\" because the prop-definition factory\n * requires a non-undefined default value (same pattern as `linkRoleProp`). A plain link must\n * not render `aria-expanded=\"false\"` — assistive technologies would announce a collapsed\n * state that the link does not actually manage.\n */\nexport type AriaExpandedProp = Prop<'ariaExpanded', boolean | undefined, 'true' | 'false' | ''>;\n\n/**\n * Normalizes the value to the aria-expanded tokens.\n *\n * Booleans and their string equivalents map to `'true'`/`'false'`; anything else degrades to\n * the sentinel `''` so the attribute is omitted. undefined/null are handled by the factory's\n * `apply` before this is reached.\n */\nfunction normalizeAriaExpanded(value: unknown): 'true' | 'false' | '' {\n\tif (value === true || value === 'true') {\n\t\treturn 'true';\n\t}\n\tif (value === false || value === 'false') {\n\t\treturn 'false';\n\t}\n\treturn '';\n}\n\nexport const ariaExpandedProp = createPropDefinition<AriaExpandedProp>('ariaExpanded', '', normalizeAriaExpanded);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type AriaOwnsProp = SimpleProp<'ariaOwns', string>;\nexport const ariaOwnsProp = createPropDefinition<AriaOwnsProp>('ariaOwns', '', normalizeString);\n","/**\n * Shared validators for prop definitions.\n * Centralized here so custom-class and variant props share one regex\n * (avoids the SAFE_CLASS_NAME_RE duplication flagged in PR #10110).\n *\n * Why the minimum length is `{0,60}` (1–61 chars) and not the legacy variant-only `{3,60}`:\n * on develop the two props were validated differently — `_variant` used the strict regex,\n * `_customClass` had no regex at all (`watchString` accepted any string). Unifying them under\n * the strict regex would have silently REJECTED short custom-class values (e.g. `\"abc\"`) that\n * were valid on develop; the relaxed minimum is the lesser behavior change. The relaxation also\n * widens `_variant` (1–3 char variant names are now valid), which is accepted: no component\n * uses variant names that short through this definition. Note that multi-class values like\n * `\"foo bar\"` are rejected for `_customClass` (single safe class name only) — stricter than\n * develop's `watchString`, but consistent with `_variant` semantics. Pinned by tests in\n * `validators.spec.ts`.\n */\nconst SAFE_CLASS_NAME_RE = /^[a-zA-Z][a-zA-Z0-9_-]{0,60}$/;\n\nexport const isSafeClassName = (value: unknown): value is string => typeof value === 'string' && SAFE_CLASS_NAME_RE.test(value);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\nimport { isSafeClassName } from './helpers/validators';\n\nexport type CustomClassProp = SimpleProp<'customClass', string>;\n\n/**\n * Validates the normalized custom-class value. An empty string is valid (means no custom class);\n * any non-empty value must be a single safe class name.\n */\nfunction validateCustomClass(value: string): boolean {\n\treturn value === '' || isSafeClassName(value);\n}\n\nexport const customClassProp = createPropDefinition<CustomClassProp>('customClass', '', normalizeString, validateCustomClass);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\nexport type DisabledProp = SimpleProp<'disabled', boolean>;\nexport const disabledProp = createPropDefinition<DisabledProp>('disabled', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type DownloadProp = SimpleProp<'download', string>;\nexport const downloadProp = createPropDefinition<DownloadProp>('download', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Hide Label prop for controlling label visibility\n *\n * Description:\n * Specifies whether the label should be visually hidden.\n * When enabled, the label is not displayed but remains accessible to screen readers.\n *\n * Usage (according to WCAG 2.1 and WAI-ARIA):\n * - Default: false (label is visible)\n * - When true: label is hidden visually but remains available to assistive technologies (WCAG 1.3.1)\n * - The label content is still used for accessibility purposes\n * - Expert slot becomes visible when label is hidden\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html\n * @see https://www.a11yproject.com/posts/how-to-hide-content/\n */\nexport type HideLabelProp = SimpleProp<'hideLabel', boolean>;\nexport const hideLabelProp = createPropDefinition<HideLabelProp>('hideLabel', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\nexport type InlineProp = SimpleProp<'inline', boolean>;\nexport const inlineProp = createPropDefinition<InlineProp>('inline', true, normalizeBoolean);\n","import type { LinkOnCallbacksPropType } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\nexport type LinkCallbacksProp = SimpleProp<'on', LinkOnCallbacksPropType>;\n\n/**\n * Normalizes the callbacks object. The factory's `apply` handles undefined/null (falling back to\n * the default `{}`) before this is reached, so we only need to verify a non-null value is an object.\n */\nfunction normalizeLinkCallbacks(value: unknown): LinkOnCallbacksPropType {\n\tif (typeof value === 'object' && value !== null) {\n\t\treturn value as LinkOnCallbacksPropType;\n\t}\n\tthrow new Error(`Invalid on callbacks: expected object, got ${typeof value}`);\n}\n\nexport const linkCallbacksProp = createPropDefinition<LinkCallbacksProp>('on', {}, normalizeLinkCallbacks);\n","import type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\n\n/**\n * The allowed role values for a link/button that takes the place of an ARIA role.\n */\nexport type AlternativeButtonLinkRolePropType = 'tab' | 'treeitem';\n\nconst LINK_ROLE_OPTIONS: readonly AlternativeButtonLinkRolePropType[] = ['tab', 'treeitem'];\n\n/**\n * Role prop for kol-link.\n *\n * The external type is the optional union `'tab' | 'treeitem' | undefined`. Internally we use the\n * sentinel empty string `''` to represent \"no role\" because the prop-definition factory types the\n * default through `NonNullable<...>`, which does not admit `undefined`. Consumers that read the\n * normalized value should treat `''` as \"no explicit role\".\n */\nexport type LinkRoleProp = Prop<'role', AlternativeButtonLinkRolePropType | undefined, '' | AlternativeButtonLinkRolePropType>;\n\n/**\n * Normalizes the role value.\n *\n * Graceful degradation: when the value is one of the allowed roles it is returned; otherwise\n * (including any non-member string) the sentinel `''` is returned so the component renders\n * without an explicit role. The factory's `apply` handles undefined/null before this is reached.\n */\nfunction normalizeLinkRole(value: unknown): '' | AlternativeButtonLinkRolePropType {\n\treturn typeof value === 'string' && (LINK_ROLE_OPTIONS as readonly string[]).includes(value) ? (value as AlternativeButtonLinkRolePropType) : '';\n}\n\nexport const linkRoleProp = createPropDefinition<LinkRoleProp>('role', '', normalizeLinkRole);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type LinkTargetProp = SimpleProp<'target', string>;\nexport const linkTargetProp = createPropDefinition<LinkTargetProp>('target', '', normalizeString);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type ShortKeyProp = SimpleProp<'shortKey', string>;\nexport const shortKeyProp = createPropDefinition<ShortKeyProp>('shortKey', '', normalizeString);\n","import type { KoliBriIconsProp } from '../../schema/types';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeObject, normalizeString } from './helpers/normalizers';\n\n/**\n * Icons prop for multi-directional icon display\n *\n * Description:\n * Specifies icons to display in one or more directions (top, right, bottom, left).\n * Can accept either a single icon class or an object with directional icon specifications.\n *\n * Usage:\n * - String: A single icon class name (displayed on the left by default)\n * - Object: Directional icons (e.g., { top: 'icon-class', left: 'icon-class' })\n * - Default: empty object (no icons)\n *\n * Accessibility:\n * - Icons must have descriptive labels to meet WCAG 1.1.1\n * - Use the label prop to provide text alternatives\n * - Icons should not be the sole means of conveying information (WCAG 1.3.3)\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html\n */\nexport type SpanIconsProp = SimpleProp<'icons', KoliBriIconsProp>;\n\nfunction normalizeSpanIcons(value: unknown): KoliBriIconsProp | never {\n\tif (!value || (typeof value === 'string' && value === '')) {\n\t\treturn {};\n\t}\n\t// If it's a string, return it as-is\n\tif (typeof value === 'string') {\n\t\treturn normalizeString(value);\n\t}\n\t// If it's an object, normalize it\n\tif (typeof value === 'object') {\n\t\treturn normalizeObject(value) as KoliBriIconsProp;\n\t}\n\tthrow new Error(`Invalid icons: ${typeof value}`);\n}\n\nfunction validateSpanIcons(value: KoliBriIconsProp): boolean {\n\t// String is valid if it's non-empty\n\tif (typeof value === 'string') {\n\t\treturn value.length > 0;\n\t}\n\t// Object is always valid (even if empty)\n\treturn typeof value === 'object' && value !== null;\n}\n\nexport const spanIconsProp = createPropDefinition<SpanIconsProp>('icons', {} as KoliBriIconsProp, normalizeSpanIcons, validateSpanIcons);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeInteger } from './helpers/normalizers';\n\nexport type TabIndexProp = SimpleProp<'tabIndex', number>;\nexport const tabIndexProp = createPropDefinition<TabIndexProp>('tabIndex', 0, normalizeInteger);\n","import type { AlignPropType } from '../../schema';\nimport { alignPropTypeOptions } from '../../schema';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Tooltip align prop for kol-link.\n *\n * Same valid values as {@link alignProp} ('top' | 'right' | 'bottom' | 'left') but defaults to\n * `'right'` to match the legacy `_tooltipAlign` default on kol-link.\n */\nexport type TooltipAlignProp = SimpleProp<'tooltipAlign', AlignPropType>;\n\nfunction normalizeTooltipAlign(value: unknown): AlignPropType {\n\tconst str = normalizeString(value);\n\tif ((alignPropTypeOptions as readonly string[]).includes(str)) {\n\t\treturn str as AlignPropType;\n\t}\n\treturn 'right';\n}\n\nexport const tooltipAlignProp = createPropDefinition<TooltipAlignProp>('tooltipAlign', 'right', normalizeTooltipAlign, (v) =>\n\t(alignPropTypeOptions as readonly string[]).includes(v),\n);\n","import type { Prop } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { isSafeClassName } from './helpers/validators';\n\n/**\n * Variant prop for class-name based variants (e.g. kol-link, kol-button).\n *\n * External type: `string | string[]` — a space-separated string of variant names or an array.\n * Internal type: `string[]` — always normalized to an array. An empty array means \"no variant\".\n *\n * This mirrors the legacy `validateVariantClassName` → `beforePatchString` pipeline, which split\n * strings by spaces into arrays before storing them in state. The `classNameFromVariant` renderer\n * only processes arrays, so normalizing here ensures the variant classes are always applied.\n */\nexport type VariantProp = Prop<'variant', string | string[], string[]>;\n\n/**\n * Normalizes the variant value to an array of variant tokens.\n *\n * - Arrays are passed through as-is.\n * - Strings are split by spaces into tokens (matches `beforePatchString`).\n * - The factory's `apply` handles undefined/null before this is reached.\n */\nfunction normalizeVariant(value: unknown): string[] {\n\tif (Array.isArray(value)) {\n\t\treturn value as string[];\n\t}\n\tif (typeof value === 'string') {\n\t\treturn value.split(' ');\n\t}\n\treturn [];\n}\n\n/**\n * Validates the normalized variant value.\n *\n * - Empty array means \"no variant\" and is valid.\n * - Non-empty arrays must consist entirely of safe class names.\n */\nfunction validateVariant(value: string[]): boolean {\n\treturn value.length === 0 || value.every(isSafeClassName);\n}\n\nexport const variantProp = createPropDefinition<VariantProp>('variant', [], normalizeVariant, validateVariant);\n","import {\n\taccessKeyProp,\n\tariaControlsProp,\n\tariaCurrentValueProp,\n\tariaDescriptionProp,\n\tariaExpandedProp,\n\tariaOwnsProp,\n\tcustomClassProp,\n\tdisabledProp,\n\tdownloadProp,\n\thideLabelProp,\n\threfProp,\n\tinlineProp,\n\tlabelWithExpertSlotProp,\n\tlinkCallbacksProp,\n\tlinkRoleProp,\n\tlinkTargetProp,\n\tshortKeyProp,\n\tspanIconsProp,\n\ttabIndexProp,\n\ttooltipAlignProp,\n\tvariantProp,\n} from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\n/**\n * Props configuration for the link component.\n *\n * `href` is the only required prop. All others are optional.\n *\n * Notes on prop choices:\n * - `labelWithExpertSlotProp` (not `labelProp`): no min/max length restriction, matching the\n * original `validateLabelWithExpertSlot`. The empty string enables the expert slot; this is\n * tracked separately via the `expertSlot` state because the factory collapses undefined → ''\n * (the default), which would wrongly enable the expert slot when no label was passed.\n * - `spanIconsProp` (not `iconsProp`): icons are `KoliBriIconsProp` (object), not a plain string.\n * - `tooltipAlignProp`: same valid values as `alignProp` but defaults to `'right'` (matching the\n * legacy `_tooltipAlign` default).\n */\nexport const linkPropsConfig = {\n\trequired: [hrefProp],\n\toptional: [\n\t\taccessKeyProp,\n\t\tariaControlsProp,\n\t\tariaCurrentValueProp,\n\t\tariaDescriptionProp,\n\t\tariaExpandedProp,\n\t\tariaOwnsProp,\n\t\tcustomClassProp,\n\t\tdisabledProp,\n\t\tdownloadProp,\n\t\thideLabelProp,\n\t\tspanIconsProp,\n\t\tinlineProp,\n\t\tlabelWithExpertSlotProp,\n\t\tlinkCallbacksProp,\n\t\tlinkRoleProp,\n\t\tlinkTargetProp,\n\t\tshortKeyProp,\n\t\ttabIndexProp,\n\t\ttooltipAlignProp,\n\t\tvariantProp,\n\t],\n} as const satisfies PropsConfigShape;\n\nexport type LinkApi = ApiFromConfig<\n\ttypeof linkPropsConfig,\n\t{\n\t\tCallbacks: {\n\t\t\t/**\n\t\t\t * Click handler bound to the anchor element. Implemented by the web component\n\t\t\t * (`handleAnchorClick`), which also dispatches the custom `KolEvent.click` event\n\t\t\t * on the host element.\n\t\t\t */\n\t\t\tanchorClick: (event: Event) => void;\n\t\t};\n\t\tMethods: {\n\t\t\tfocus: (options?: FocusOptions) => void;\n\t\t\tclick: () => void;\n\t\t};\n\t\tRefs: {\n\t\t\tanchor: HTMLAnchorElement;\n\t\t\ttooltip: HTMLDivElement;\n\t\t};\n\t\tStates: {\n\t\t\t/**\n\t\t\t * Derived aria-current value: one of the aria-current tokens when the link's href\n\t\t\t * matches the current location, otherwise an empty string (rendered as undefined →\n\t\t\t * no aria-current attribute). Managed via setState for reactivity.\n\t\t\t */\n\t\t\tariaCurrent: string;\n\t\t\t/**\n\t\t\t * DOM id of the visually-hidden span that carries the aria description. Generated\n\t\t\t * once per web component instance and referenced by the anchor's aria-describedby\n\t\t\t * attribute, since aria-description lacks screen reader support.\n\t\t\t */\n\t\t\tariaDescriptionId: string;\n\t\t\t/**\n\t\t\t * Whether the expert slot should be rendered. True only when the consumer explicitly\n\t\t\t * passed an empty-string label. When the label is undefined (default ''), the expert\n\t\t\t * slot stays off and the href is used as the fallback label text.\n\t\t\t */\n\t\t\texpertSlot: boolean;\n\t\t};\n\t}\n>;\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\n\nimport type { KoliBriComponentsBemSchema } from '../../../schema/bem-registry';\nimport { bem } from '../../../schema/bem-registry';\nimport clsx from '../../../utils/clsx';\n\ntype FCChildren = Parameters<FC>[1];\n\ntype KeysOfSet<T> = T extends Set<infer U> ? U : never;\n\n/**\n * Extracts the valid block modifier keys for a given registered BEM block.\n * Mirrors the conditional type used by typed-bem so that the types align exactly.\n */\nexport type BlockModifiers<TBlock extends keyof KoliBriComponentsBemSchema> =\n\tKeysOfSet<KoliBriComponentsBemSchema[TBlock]['modifiers']> extends never\n\t\t? undefined\n\t\t: Partial<Record<KeysOfSet<KoliBriComponentsBemSchema[TBlock]['modifiers']>, boolean>>;\n\ntype BemRootNodeFCProps<TBlock extends keyof KoliBriComponentsBemSchema> = {\n\t/**\n\t * BEM block name — must be a key registered in `KoliBriComponentsBemSchema`.\n\t * Constrains `modifiers` to the exact modifier set defined in `bem-registry.ts`.\n\t */\n\tblock: TBlock;\n\t/**\n\t * BEM block modifiers. Keys are validated against the schema (e.g. `'disabled'`, `'inline'`).\n\t * No `kol-link--` prefix needed — typed-bem adds it automatically.\n\t */\n\tmodifiers?: BlockModifiers<TBlock>;\n\t/**\n\t * Additional classes forwarded 1:1 from the FC tag onto the root `<div>`.\n\t * Typically the `class` prop received by the surrounding Functional Component\n\t * (i.e. the `class` attribute set by a parent component).\n\t */\n\tclass?: JSXBase.HTMLAttributes<HTMLElement>['class'];\n};\n\n/**\n * Single-Root BEM wrapper for all Skeleton Functional Components.\n *\n * Responsibilities:\n * - Renders exactly one `<div>` root node — enforcing the Single-Root FC rule.\n * - Accepts a `block` name and typed `modifiers` from `KoliBriComponentsBemSchema`.\n * - Calls `bem.forBlock(block)(modifiers)` internally to generate the class string.\n * - Merges the result with the optional `class` prop.\n *\n * Usage:\n * ```tsx\n * export const LinkFC: FC<LinkFCProps> = ({ ..., class: hostClass, disabled }, children) => (\n * <BemRootNodeFC\n * block=\"kol-link\"\n * modifiers={{ disabled, 'external-link': isExternal }}\n * class={hostClass}\n * >\n * <a class=\"kol-link__anchor\">…</a>\n * </BemRootNodeFC>\n * );\n * ```\n */\nexport const BemRootNodeFC = <TBlock extends keyof KoliBriComponentsBemSchema>(\n\t{ block, modifiers, class: hostClass }: BemRootNodeFCProps<TBlock>,\n\tchildren: FCChildren,\n) => {\n\tconst blockBem = bem.forBlock(block);\n\treturn <div class={clsx(blockBem(modifiers as BlockModifiers<TBlock>), hostClass)}>{children}</div>;\n};\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { h } from '@stencil/core';\n\nimport { translate } from '../../../i18n';\nimport { devHint } from '../../../schema';\nimport { classNameFromVariant } from '../../../schema/props/variant-class-name';\nimport clsx from '../../../utils/clsx';\nimport { BemRootNodeFC } from '../bem-root-node/component';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport { IconFC } from '../icon/component';\nimport { SpanFC } from '../span/component';\nimport { TooltipFC } from '../tooltip/component';\nimport type { LinkApi } from './api';\n\nexport const LinkFC: FC<FunctionalComponentProps<LinkApi>> = (props) => {\n\tconst {\n\t\taccessKey,\n\t\tariaControls,\n\t\tariaCurrent,\n\t\tariaDescription,\n\t\tariaDescriptionId,\n\t\tariaExpanded,\n\t\tariaOwns,\n\t\tcustomClass,\n\t\tdisabled,\n\t\tdownload,\n\t\thandleAnchorClick,\n\t\thideLabel,\n\t\thref,\n\t\ticons,\n\t\tinline,\n\t\tlabel,\n\t\ton,\n\t\trefAnchor,\n\t\trefTooltip,\n\t\trole,\n\t\tshortKey,\n\t\ttabIndex,\n\t\ttarget,\n\t\tvariant,\n\t\texpertSlot,\n\t} = props;\n\n\tconst translateOpenLinkInTab = translate('kol-open-link-in-tab');\n\n\tconst isExternal = typeof target === 'string' && target.length > 0 && target !== '_self';\n\n\tconst tagAttrs = {\n\t\thref: typeof href === 'string' && href.length > 0 ? href : 'javascript:void(0);',\n\t\ttarget: typeof target === 'string' && target.length > 0 ? target : undefined,\n\t\trel: isExternal ? 'noopener' : undefined,\n\t\tdownload: typeof download === 'string' && download.length > 0 ? download : undefined,\n\t};\n\n\tif (hideLabel === true && !label) {\n\t\tdevHint(`[KolLink] An aria-label must be set when _hide-label is set.`);\n\t}\n\n\tconst trimmedAriaDescription = ariaDescription?.trim();\n\tconst roleValue = role || undefined;\n\treturn (\n\t\t<BemRootNodeFC\n\t\t\tblock=\"kol-link\"\n\t\t\tclass={clsx({\n\t\t\t\t[customClass]: variant.includes('custom') && customClass.length > 0,\n\t\t\t\t[classNameFromVariant(variant, 'link')]: variant.length > 0,\n\t\t\t})}\n\t\t\tmodifiers={{\n\t\t\t\tdisabled: disabled === true,\n\t\t\t\t'external-link': isExternal,\n\t\t\t\t'hide-label': hideLabel === true,\n\t\t\t\tinline: inline === true,\n\t\t\t\tstandalone: inline === false,\n\t\t\t}}\n\t\t>\n\t\t\t{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events -- <a href> is natively keyboard-accessible (Enter triggers click); onKeyPress would cause a double-dispatch bug. */}\n\t\t\t<a\n\t\t\t\tref={refAnchor}\n\t\t\t\t{...tagAttrs}\n\t\t\t\taccessKey={accessKey || undefined}\n\t\t\t\taria-current={ariaCurrent || undefined}\n\t\t\t\taria-controls={ariaControls || undefined}\n\t\t\t\taria-describedby={trimmedAriaDescription ? ariaDescriptionId : undefined}\n\t\t\t\taria-disabled={disabled ? 'true' : undefined}\n\t\t\t\taria-expanded={ariaExpanded === '' ? undefined : ariaExpanded}\n\t\t\t\taria-owns={ariaOwns || undefined}\n\t\t\t\taria-label={hideLabel && typeof label === 'string' ? `${label}${isExternal ? ` (${translateOpenLinkInTab})` : ''}` : undefined}\n\t\t\t\taria-keyshortcuts={shortKey || undefined}\n\t\t\t\tclass=\"kol-link__anchor\"\n\t\t\t\t{...on}\n\t\t\t\tonClick={handleAnchorClick}\n\t\t\t\trole={roleValue}\n\t\t\t\ttabIndex={disabled ? -1 : tabIndex}\n\t\t\t>\n\t\t\t\t<SpanFC class=\"kol-link__text\" badgeText={accessKey || shortKey} icons={icons} hideLabel={hideLabel} label={expertSlot ? '' : label || href}>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</SpanFC>\n\t\t\t\t{isExternal && (\n\t\t\t\t\t<IconFC class=\"kol-link__icon\" label={hideLabel ? '' : translateOpenLinkInTab} icons={'kolicon-link-external'} aria-hidden={hideLabel} />\n\t\t\t\t)}\n\t\t\t</a>\n\t\t\t{hideLabel === true && !expertSlot && (\n\t\t\t\t<div class=\"kol-link__tooltip\">\n\t\t\t\t\t<TooltipFC\n\t\t\t\t\t\tbadgeText={accessKey || shortKey || ''}\n\t\t\t\t\t\tlabel={typeof label === 'string' ? label : typeof href === 'string' ? href : ''}\n\t\t\t\t\t\trefFloating={refTooltip}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{trimmedAriaDescription && (\n\t\t\t\t<span class=\"visually-hidden\" id={ariaDescriptionId}>\n\t\t\t\t\t{trimmedAriaDescription}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</BemRootNodeFC>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAKO,MAAM,aAAa,GAAG,oBAAoB,CAAgB,WAAW,EAAE,EAAE,EAAE,eAAe;;ACA1F,MAAM,gBAAgB,GAAG,oBAAoB,CAAmB,cAAc,EAAE,EAAE,EAAE,eAAe;;ACGnG,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAU;AAYhH,SAAS,yBAAyB,CAAC,KAAc,EAAA;AAChD,IAAA,MAAM,GAAG,GAAG,eAAe,CAAC,KAAK,CAAC;AAClC,IAAA,OAAQ,0BAAgD,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAI,GAAgC,GAAG,MAAM;AACpH;AAEO,MAAM,oBAAoB,GAAG,oBAAoB,CAAuB,kBAAkB,EAAE,MAAM,EAAE,yBAAyB;;ACpB7H,MAAM,mBAAmB,GAAG,oBAAoB,CAAsB,iBAAiB,EAAE,EAAE,EAAE,eAAe;;ACanH,SAAS,qBAAqB,CAAC,KAAc,EAAA;IAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,EAAE;AACvC,QAAA,OAAO,MAAM;;IAEd,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO,EAAE;AACzC,QAAA,OAAO,OAAO;;AAEf,IAAA,OAAO,EAAE;AACV;AAEO,MAAM,gBAAgB,GAAG,oBAAoB,CAAmB,cAAc,EAAE,EAAE,EAAE,qBAA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import{v as s}from"./auto-complete-BBkbC-F2.js";import{a,v as e,b as
|
|
5
|
-
//# sourceMappingURL=controller-
|
|
4
|
+
import{g as t,e as i}from"./common-noYAs-wc.js";import{v as s}from"./auto-complete-BBkbC-F2.js";import{a,v as e,b as h}from"./counter-dom-updater-Cydd4Jex.js";import{v as o}from"./placeholder-JIf_Jr3v.js";import{v as r}from"./read-only-CxpGC8Fy.js";import{v as l}from"./required-DGhzuKQB.js";import{v as d}from"./variant-class-name-B0Wpr2i8.js";import{I as m}from"./controller-icon-g6dhLeRs.js";const v=(i,s,a={})=>{t(i,"_pattern",s,a)};const n=(t,s,a)=>{i(t,"_visibilityToggle",s,a)};class p extends m{constructor(t,i,s){super(t,i,s);this.component=t}validateAutoComplete(t){s(this.component,t)}validateHasCounter(t){a(this.component,t)}validateMaxLengthBehavior(t){e(this.component,t)}validateMaxLength(t){h(this.component,t)}validatePattern(t){v(this.component,t)}validatePlaceholder(t){o(this.component,t)}validateReadOnly(t){r(this.component,t)}validateRequired(t){l(this.component,t)}validateValue(i){t(this.component,"_value",i);this.setFormAssociatedValue(this.component.state._value)}validateVariant(t){d(this.component,t)}validateVisibilityToggle(t){n(this.component,t)}componentWillLoad(){super.componentWillLoad();this.validateAutoComplete(this.component._autoComplete);this.validateHasCounter(this.component._hasCounter);this.validateMaxLengthBehavior(this.component._maxLengthBehavior);this.validateMaxLength(this.component._maxLength);this.validatePattern(this.component._pattern);this.validatePlaceholder(this.component._placeholder);this.validateReadOnly(this.component._readOnly);this.validateRequired(this.component._required);this.validateValue(this.component._value);this.validateVariant(this.component._variant);this.validateVisibilityToggle(this.component._visibilityToggle)}}export{p as I};
|
|
5
|
+
//# sourceMappingURL=controller-Bh5fBUBi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-
|
|
1
|
+
{"version":3,"file":"controller-Bh5fBUBi.js","sources":["src/schema/props/pattern.ts","src/schema/props/visibility-toggle.ts","src/components/input-password/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\nexport type PatternPropType = string;\n\n/**\n * Defines a validation pattern for the input field.\n */\nexport type PropPattern = {\n\tpattern: PatternPropType;\n};\n\nexport const validatePattern = (component: Generic.Element.Component, value?: PatternPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_pattern', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchBooleanOptions } from '../utils';\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type VisibilityTogglePropType = boolean;\n\n/**\n * Activates the show password button.\n */\nexport type PropVisibilityToggle = {\n\tvisibilityToggle: VisibilityTogglePropType;\n};\n\n/* validator */\nexport const validateVisibilityToggle = (component: Generic.Element.Component, value?: VisibilityTogglePropType, hooks?: WatchBooleanOptions): void => {\n\twatchBoolean(component, '_visibilityToggle', value, hooks);\n};\n","import type {\n\tAutoCompletePropType,\n\tHasCounterPropType,\n\tInputPasswordProps,\n\tInputPasswordWatches,\n\tMaxLengthBehaviorPropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n\tVariantClassNamePropType,\n} from '../../schema';\nimport {\n\tvalidateHasCounter,\n\tvalidateMaxLength,\n\tvalidatePattern,\n\tvalidatePlaceholder,\n\tvalidateReadOnly,\n\tvalidateRequired,\n\tvalidateVariantClassName,\n\twatchString,\n} from '../../schema';\nimport { validateAutoComplete } from '../../schema/props/auto-complete';\nimport { validateMaxLengthBehavior } from '../../schema/props/max-length-behavior';\nimport { validateVisibilityToggle, type VisibilityTogglePropType } from '../../schema/props/visibility-toggle';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\n\nexport class InputPasswordController extends InputIconController implements InputPasswordWatches {\n\tprotected readonly component: Generic.Element.Component & InputPasswordProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputPasswordProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAutoComplete(value?: AutoCompletePropType): void {\n\t\tvalidateAutoComplete(this.component, value);\n\t}\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tvalidateMaxLengthBehavior(this.component, value);\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\tvalidateMaxLength(this.component, value);\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\tvalidatePattern(this.component, value);\n\t}\n\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tvalidatePlaceholder(this.component, value);\n\t}\n\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tvalidateReadOnly(this.component, value);\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic validateVariant(value?: VariantClassNamePropType): void {\n\t\tvalidateVariantClassName(this.component, value);\n\t}\n\n\tpublic validateVisibilityToggle(value?: VisibilityTogglePropType): void {\n\t\tvalidateVisibilityToggle(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLengthBehavior(this.component._maxLengthBehavior);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t\tthis.validateVisibilityToggle(this.component._visibilityToggle);\n\t}\n}\n"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zC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC;;AAEhE;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{k as t,I as s,s as e}from"./common-noYAs-wc.js";import{h as i,c as r}from"./label-lhyZhbiM.js";import{v as o}from"./required-DGhzuKQB.js";import{v as a}from"./orientation-Dw3BhNjY.js";import{I as n}from"./FormFieldStateWrapper-
|
|
5
|
-
//# sourceMappingURL=controller-
|
|
4
|
+
import{k as t,I as s,s as e}from"./common-noYAs-wc.js";import{h as i,c as r}from"./label-lhyZhbiM.js";import{v as o}from"./required-DGhzuKQB.js";import{v as a}from"./orientation-Dw3BhNjY.js";import{I as n}from"./FormFieldStateWrapper-ClHy49ac.js";const l=s=>{if(typeof s==="object"&&s!==null){if(typeof s.label==="string"&&s.label.length>0){s.disabled=s.disabled===true;s.label=`${s.label}`.trim();if(i(s.label,3)===false&&r(s.label)===false){t(`A differing Aria-Label (${s.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`)}if(Array.isArray(s.options)){return s.options.find((t=>l(t)===false))===undefined}return true}else if(typeof s.label==="number"){return true}}return false};const f=(t,e,i={})=>{s(t,"_options",(t=>typeof t==="object"&&t!==null&&typeof t.label==="string"&&t.label.length>0),e,undefined,i)};const h=(t,e,i={})=>{s(t,"_options",l,e,undefined,i)};const c=(t,s,e="")=>{s.forEach(((s,i)=>{const r=`${e}-${i}`;if(typeof s==="object"&&s!==null&&typeof s.label==="string"&&s.label.length>0){if(Array.isArray(s.options)){c(t,s.options,r)}else{t.set(r,s)}}}))};class u extends n{constructor(t,s,e){super(t,s,e);this.component=t}validateRequired(t){o(this.component,t)}componentWillLoad(){super.componentWillLoad();this.validateRequired(this.component._required)}}class p extends u{constructor(t,s,e){super(t,s,e);this.keyOptionMap=new Map;this.getOptionByKey=t=>this.keyOptionMap.get(t);this.afterPatchOptions=(t,s,e,i)=>{if(i==="_value"){this.setFormAssociatedValue(t)}};this.beforePatchOptions=(t,s)=>{const e=s.has("_options")?s.get("_options"):this.component.state._options;if(Array.isArray(e)&&e.length>0){this.keyOptionMap.clear();const t=e.map((t=>{var s;if(typeof t==="object"&&t!==null&&typeof t.label==="string"){return Object.assign(Object.assign({},t),{value:(s=t.value)!==null&&s!==void 0?s:t.label})}return t}));c(this.keyOptionMap,t)}};this.component=t}validateOrientation(t){a(this.component,t,"vertical")}validateOptions(t){f(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(t){t=Array.isArray(t)?t[0]:t;e(this.component,"_value",t,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(){super.componentWillLoad();this.validateOrientation(this.component._orientation);this.validateOptions(this.component._options);this.validateValue(this.component._value)}}export{u as I,p as a,f as b,c as f,h as v};
|
|
5
|
+
//# sourceMappingURL=controller-CMXAgKAz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-0l-d2tR9.js","sources":["src/schema/validators/options.ts","src/schema/props/options.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { Optgroup, Option, RadioOption, StencilUnknown } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { watchJsonArrayString } from '../utils';\nimport { validateInputSelectOptions } from '../validators';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<StencilUnknown>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<StencilUnknown> | Optgroup<StencilUnknown>)[]>;\nexport type RadioOptionsPropType = Stringified<RadioOption<StencilUnknown>[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\nexport type PropRadioOptions = {\n\toptions: RadioOptionsPropType;\n};\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<StencilUnknown>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions,\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {},\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tInputRadioProps,\n\tInputRadioWatches,\n\tOptgroup,\n\tOptionsPropType,\n\tPropLabelWithExpertSlot,\n\tRadioOption,\n\tRequiredPropType,\n\tSelectOption,\n\tStencilUnknown,\n} from '../../schema';\nimport { setState, validateOptions, validateRequired } from '../../schema';\n\nimport type { OrientationPropType } from '../../schema/props/orientation';\nimport { validateOrientation } from '../../schema/props/orientation';\nimport { InputController } from '../@deprecated/input/controller';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, RadioOption<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as RadioOption<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements InputRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputRadioProps;\n\tprivate readonly keyOptionMap = new Map<string, RadioOption<StencilUnknown>>();\n\n\tpublic constructor(component: Generic.Element.Component & InputRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): RadioOption<StencilUnknown> | undefined => this.keyOptionMap.get(key);\n\n\tprotected readonly afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: OrientationPropType): void {\n\t\tvalidateOrientation(this.component, value, 'vertical');\n\t}\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\n\t\t\tconst normalizedOptions = options.map((option: RadioOption<StencilUnknown> | string) => {\n\t\t\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tvalue: option.value ?? option.label,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn option;\n\t\t\t});\n\n\t\t\tfillKeyOptionMap(this.keyOptionMap, normalizedOptions as SelectOption<StencilUnknown>[]);\n\t\t}\n\t};\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: StencilUnknown): void {\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB,KAAa;IACjF,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;AAClD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI;YAC1C,MAAM,CAAC,KAAK,GAAG,CAAG,EAAA,MAAM,CAAC,KAAK,CAAE,CAAA,CAAC,IAAI,EAAE;YACvC,IAAI,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;AACrG,gBAAA,QAAQ,CAAC,CAA2B,wBAAA,EAAA,MAAM,CAAC,KAAK,CAAA,+FAAA,CAAiG,CAAC;;YAEnJ,IAAI,KAAK,CAAC,OAAO,CAAE,MAAsB,CAAC,OAAO,CAAC,EAAE;gBACnD,QACE,MAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,KAAI;AAC7C,oBAAA,OAAO,0BAA0B,CAAC,IAAI,CAAC,KAAK,KAAK;AAClD,iBAAC,CAAC,KAAK,SAAS;;AAGlB,YAAA,OAAO,IAAI;;AACL,aAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE;AAC5C,YAAA,OAAO,IAAI;;;AAGb,IAAA,OAAO,KAAK;AACb,CAAC;;ACSM,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAkC,EAAE,OAAA,GAAwB,EAAE,KAAU;AAC7I,IAAA,oBAAoB,CACnB,SAAS,EACT,UAAU,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I,CAAC,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;"}
|
|
1
|
+
{"version":3,"file":"controller-CMXAgKAz.js","sources":["src/schema/validators/options.ts","src/schema/props/options.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { Optgroup, Option, RadioOption, StencilUnknown } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { watchJsonArrayString } from '../utils';\nimport { validateInputSelectOptions } from '../validators';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<StencilUnknown>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<StencilUnknown> | Optgroup<StencilUnknown>)[]>;\nexport type RadioOptionsPropType = Stringified<RadioOption<StencilUnknown>[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\nexport type PropRadioOptions = {\n\toptions: RadioOptionsPropType;\n};\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<StencilUnknown>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions,\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {},\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tInputRadioProps,\n\tInputRadioWatches,\n\tOptgroup,\n\tOptionsPropType,\n\tPropLabelWithExpertSlot,\n\tRadioOption,\n\tRequiredPropType,\n\tSelectOption,\n\tStencilUnknown,\n} from '../../schema';\nimport { setState, validateOptions, validateRequired } from '../../schema';\n\nimport type { OrientationPropType } from '../../schema/props/orientation';\nimport { validateOrientation } from '../../schema/props/orientation';\nimport { InputController } from '../@deprecated/input/controller';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, RadioOption<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as RadioOption<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements InputRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputRadioProps;\n\tprivate readonly keyOptionMap = new Map<string, RadioOption<StencilUnknown>>();\n\n\tpublic constructor(component: Generic.Element.Component & InputRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): RadioOption<StencilUnknown> | undefined => this.keyOptionMap.get(key);\n\n\tprotected readonly afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: OrientationPropType): void {\n\t\tvalidateOrientation(this.component, value, 'vertical');\n\t}\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\n\t\t\tconst normalizedOptions = options.map((option: RadioOption<StencilUnknown> | string) => {\n\t\t\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tvalue: option.value ?? option.label,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn option;\n\t\t\t});\n\n\t\t\tfillKeyOptionMap(this.keyOptionMap, normalizedOptions as SelectOption<StencilUnknown>[]);\n\t\t}\n\t};\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: StencilUnknown): void {\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB,KAAa;IACjF,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;AAClD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI;YAC1C,MAAM,CAAC,KAAK,GAAG,CAAG,EAAA,MAAM,CAAC,KAAK,CAAE,CAAA,CAAC,IAAI,EAAE;YACvC,IAAI,sBAAsB,CAAC,MAAM,CAAC,KAA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mBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC;;AAsBhD,IAAA,eAAe,CAAC,KAAuB,EAAA;AAC7C,QAAA,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;AACtC,YAAA,KAAK,EAAE;gBACN,UAAU,EAAE,IAAI,CAAC,iBAAiB;gBAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;AACpC,aAAA;AACD,SAAA,CAAC;;AAGI,IAAA,aAAa,CAAC,KAAsB,EAAA;AAC1C,QAAA,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,CAAC,CAAoB,GAAG,KAAK;QACnE,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,UAAU,EAAE,IAAI,CAAC,iBAAiB;YAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;AACpC,SAAA,CAAC;;IAGI,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{b as s}from"./common-noYAs-wc.js";import{v as t}from"./spell-check-BYuCSD3X.js";import{v as o}from"./suggestions-ofHp_5qm.js";import{I as e}from"./controller-
|
|
5
|
-
//# sourceMappingURL=controller-
|
|
4
|
+
import{b as s}from"./common-noYAs-wc.js";import{v as t}from"./spell-check-BYuCSD3X.js";import{v as o}from"./suggestions-ofHp_5qm.js";import{I as e}from"./controller-Bh5fBUBi.js";const i=["text","search","url","tel"];const r=s=>typeof s==="string"&&i.includes(s);const a=(t,o)=>{s(t,"_type",r,new Set(i),o)};class c extends e{constructor(s,t,o){super(s,t,o);this.component=s}validateSuggestions(s){o(this.component,s)}componentWillLoad(){super.componentWillLoad();this.validateSuggestions(this.component._suggestions)}}class l extends c{constructor(s,t,o){super(s,t,o);this.hasError=false;this.component=s}validateSpellCheck(s){t(this.component,s)}validateType(s){a(this.component,s)}componentWillLoad(){super.componentWillLoad();this.validateSpellCheck(this.component._spellCheck);this.validateType(this.component._type)}}export{c as I,l as a};
|
|
5
|
+
//# sourceMappingURL=controller-CfLL4URL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-
|
|
1
|
+
{"version":3,"file":"controller-CfLL4URL.js","sources":["src/schema/props/type-input-text.ts","src/components/input-text/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../utils';\n\nexport const inputTextTypeOptions = ['text', 'search', 'url', 'tel'] as const;\nexport type InputTextTypePropType = (typeof inputTextTypeOptions)[number];\n\n/**\n * Defines the type of the input-text component.\n */\nexport type PropTypeInputText = {\n\ttype: InputTextTypePropType;\n};\n\nconst isInputTextTypePropType = (value: unknown): value is InputTextTypePropType => {\n\treturn typeof value === 'string' && inputTextTypeOptions.includes(value as InputTextTypePropType);\n};\n\nexport const validateTypeInputText = (component: Generic.Element.Component, value?: InputTextTypePropType): void => {\n\twatchValidator(component, '_type', isInputTextTypePropType, new Set(inputTextTypeOptions), value);\n};\n","import type {\n\tInputTextProps,\n\tInputTextTypePropType,\n\tInputTextWatches,\n\tPropLabelWithExpertSlot,\n\tPropSuggestions,\n\tSpellCheckPropType,\n\tSuggestionsPropType,\n} from '../../schema';\nimport { validateSpellCheck, validateSuggestions, validateTypeInputText } from '../../schema';\n\nimport { InputPasswordController } from '../input-password/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = PropSuggestions;\ntype InputTextEmailProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputTextEmailWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputTextEmailController extends InputPasswordController implements InputTextEmailWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextEmailProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextEmailProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSuggestions(this.component._suggestions);\n\t}\n}\n\nexport class InputTextController extends InputTextEmailController implements InputTextWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextProps;\n\n\tpublic hasError = false;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateType(value?: InputTextTypePropType): void {\n\t\tvalidateTypeInputText(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateType(this.component._type);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;AAIO,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAU;AAU7E,MAAM,uBAAuB,GAAG,CAAC,KAAc,KAAoC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,KAA8B,CAAC;AAClG,CAAC;AAEM,MAAM,qBAAqB,GAAG,CAAC,SAAoC,EAAE,KAA6B,KAAU;AAClH,IAAA,cAAc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-1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as n}from"./index-
|
|
5
|
-
//# sourceMappingURL=controller-icon-
|
|
4
|
+
import{h as n}from"./index-CLHqy-2_.js";import{a as t}from"./tslib.es6-QNbPBOk5.js";import{I as o}from"./component-CqTwHM6Q.js";import{b as s}from"./component-names-BGnhDM7F.js";import{b as e}from"./common-noYAs-wc.js";import{g as i,i as r,I as c}from"./FormFieldStateWrapper-ClHy49ac.js";import{c as a}from"./clsx-COFh-Vc8.js";import{i as l}from"./component-DxelloF0.js";import{i as d}from"./_Uint8Array-kJHDjtoP.js";import{v as m}from"./icons-DT5u2gpq.js";const u=o=>{const{label:e,icons:i,hideLabel:r,disabled:c,onClick:a}=o,l=t(o,["label","icons","hideLabel","disabled","onClick"]);return n(s,Object.assign({_label:e,_disabled:c,_icons:i,_hideLabel:r,_on:{onClick:a}},l))};const b=s=>{const{componentName:e="button",label:i,icon:r,onClick:c}=s,a=t(s,["componentName","label","icon","onClick"]);const l=e==="button"?u:o;return n(l,Object.assign({label:i||"",hideLabel:true,icons:`${r}`,onClick:c},a))};const p=(o,s)=>{var{position:e="start",class:i}=o,r=t(o,["position","class"]);const c=`kol-input-container__adornment`;const l=`${c}--${e}`;return n("div",Object.assign({class:a(c,l,i)},r),s)};function f(n){if(!n){return false}return Array.isArray(n)?n.length>0:Boolean(n)}const h=(o,s)=>{var{class:e}=o,i=t(o,["class"]);return n("div",Object.assign({class:a("kol-input-container__container",e)},i),s)};const j=(o,s)=>{const{class:e,startAdornment:c,endAdornment:l,disabled:d,msg:m,touched:u,containerProps:b,startAdornmentProps:j,endAdornmentProps:_}=o,k=t(o,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]);const v={["kol-input-container--disabled"]:d,[`kol-input-container--${i(m)}`]:r(m,u)};const A=Object.assign({class:a("kol-input-container",v,e)},k);if(!f(c)&&!f(l)){return n("div",Object.assign({},A),n(h,Object.assign({},b),s))}return n("div",Object.assign({},A),n(p,Object.assign({},j,{position:"start"}),c),n(h,Object.assign({},b),s),n(p,Object.assign({},_,{position:"end"}),l))};function _(n){let t=undefined;let o;if("_icons"in n){t=n._icons}if("_smartButton"in n){o=n._smartButton}return{icons:t,smartButton:o,disabled:n._disabled,msg:n._msg,touched:n._touched}}const k=({state:t,startAdornment:s,endAdornment:e},i)=>{var r,c;const{icons:a,smartButton:m,disabled:u,msg:p,touched:f}=_(t);let h=a===null||a===void 0?void 0:a.left;if(l(h)){h={icon:h}}let k=a===null||a===void 0?void 0:a.right;if(l(k)){k={icon:k}}const v=[];const A=[];if(s){if(Array.isArray(s)){v.push(...s)}else{v.push(s)}}if(h){if(d(h)){v.push(n(o,{class:"kol-input-container__icon",icons:h.icon,label:(r=h.label)!==null&&r!==void 0?r:"",style:h.style}))}else{v.push(n(o,{class:"kol-input-container__icon",icons:h,label:""}))}}if(d(m)){A.push(n(b,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},m,{hideLabel:true,disabled:u})))}if(k){if(d(k)){A.push(n(o,{class:"kol-input-container__icon",icons:k.icon,label:(c=k.label)!==null&&c!==void 0?c:"",style:k.style}))}else{A.push(n(o,{class:"kol-input-container__icon",icons:k,label:""}))}}if(e){if(Array.isArray(e)){A.push(...e)}else{A.push(e)}}return n(j,{disabled:u,msg:p,touched:f,startAdornment:v,endAdornment:A},i)};class v extends c{constructor(n,t,o){super(n,t,o);this.numberStringRegex=/^\d+(\.\d+)?$/;this.parseToNumber=n=>{if(typeof n==="number"){return isNaN(n)?null:n}if(this.isNumberString(n)){return parseFloat(n)}return null};this.validateNumber=(n,t)=>e(this.component,n,(n=>n===undefined||n===null||typeof n==="number"||typeof n==="string"&&this.numberStringRegex.test(n)),new Set(["number","NumberString"]),t,{hooks:{beforePatch:(t,o)=>{if(o===null||o===void 0?void 0:o.has(n)){o===null||o===void 0?void 0:o.set(n,this.parseToNumber(t))}}}});this.component=n}validateIcons(n){m(this.component,n)}isNumberString(n){return typeof n==="string"&&this.numberStringRegex.test(n)}componentWillLoad(){super.componentWillLoad();this.validateIcons(this.component._icons)}}export{v as I,b as K,k as a};
|
|
5
|
+
//# sourceMappingURL=controller-icon-g6dhLeRs.js.map
|
package/dist/{esm/controller-icon-UG0vqWJT.js.map → kolibri/controller-icon-g6dhLeRs.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-icon-UG0vqWJT.js","sources":["src/functional-components/Button/Button.tsx","src/functional-components/IconButton/IconButton.tsx","src/functional-components/InputAdornment/InputAdornment.tsx","src/functional-components/InputContainer/InputContainer.tsx","src/functional-component-wrappers/InputContainerStateWrapper/InputContainerStateWrapper.tsx","src/components/@deprecated/input/controller-icon.ts"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { OptionalButtonProps, RequiredButtonProps } from '../../schema';\n\nexport type ButtonProps = Partial<RequiredButtonProps & OptionalButtonProps> & {\n\tlabel: string;\n\tclass?: string;\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolButtonFc: FC<ButtonProps> = (props) => {\n\tconst { label, icons, hideLabel, disabled, onClick, ...other } = props;\n\n\treturn <KolButtonWcTag _label={label} _disabled={disabled} _icons={icons} _hideLabel={hideLabel} _on={{ onClick }} {...other} />;\n};\n\nexport default KolButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { IconFC } from '../../internal/functional-components/icon/component';\nimport type { VariantClassNamePropType } from '../../schema';\nimport KolButtonFc, { type ButtonProps } from '../Button';\n\ntype IconType = {\n\tcomponentName: 'icon';\n\ticon?: string;\n\tclass?: string;\n\tlabel?: string;\n\tstyle?: { [key: string]: string };\n\tonClick?: (event: MouseEvent) => void;\n};\n\ntype ButtonType = Partial<Omit<ButtonProps, 'icons'>> & {\n\tcomponentName: 'button';\n\ticon?: string;\n\tlabel?: string;\n\tclass?: string;\n\tbuttonVariant?: VariantClassNamePropType;\n\n\tonClick?: (event: MouseEvent) => void;\n};\n\nexport type IconButtonProps = IconType | ButtonType;\n\n/**\n * `KolIconButtonFc` is a functional component that renders either a Button or an Icon based on the provided props.\n *\n * Depending on the value of the `componentName` prop, either a Button (`KolButtonFc`) or an Icon (`IconFC`) is rendered.\n * Both components support optional `icon` props for displaying an icon and an optional `onClick` handler for user interactions.\n *\n * This component combines the flexibility of rendering either a button with an optional label or a simple icon, while ensuring that unnecessary props for the selected element are not passed.\n *\n * Supported props:\n * - `componentName`: Specifies whether a 'button' or 'icon' should be rendered. Default is 'button'.\n * - `label`: An optional label, which is only shown for Buttons.\n * - `icon`: The Codicon or other font classname used for the icon display.\n * - `class`: Optional CSS class for additional styling customization.\n * - `buttonVariant`: Variant for the button component.\n * - `onClick`: Optional click handler for user interactions.\n *\n * Example usage:\n * ```tsx\n * <KolIconButtonFc componentName=\"button\" label=\"Submit\" icon=\"kolicon-check\" onClick={handleClick} />\n * <KolIconButtonFc componentName=\"icon\" icon=\"alert\" onClick={handleClick} />\n * ```\n *\n * @param {IconButtonProps} props - The properties that customize the component, including the selection of the component type (Button or Icon) and other specific attributes.\n * @returns {JSX.Element} - The rendered JSX element (Button or Icon).\n */\nconst KolIconButtonFc: FC<IconButtonProps> = (props) => {\n\tconst { componentName = 'button', label, icon, onClick, ...other } = props;\n\tconst Component = componentName === 'button' ? KolButtonFc : IconFC;\n\n\treturn <Component label={label || ''} hideLabel icons={`${icon}`} onClick={onClick} {...other} />;\n};\n\nexport default KolIconButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from '../../utils/clsx';\n\nexport type InputAdornmentProps = JSXBase.HTMLAttributes<HTMLDivElement> & {\n\tposition?: 'start' | 'end';\n};\n\nconst InputAdornment: FC<InputAdornmentProps> = ({ position = 'start', class: className, ...other }, children) => {\n\tconst rootClassName = `kol-input-container__adornment`;\n\tconst positionClassName = `${rootClassName}--${position}`;\n\n\treturn (\n\t\t<div class={clsx(rootClassName, positionClassName, className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default InputAdornment;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport { getMsgType, isMsgDefinedAndInputTouched, type MsgPropType, type Stringified } from '../../schema';\nimport clsx from '../../utils/clsx';\nimport InputAdornment from '../InputAdornment';\n\ntype InputAdornmentType = VNode | VNode[] | null;\n\nexport type InputContainerProps = JSXBase.HTMLAttributes & {\n\tstartAdornment?: InputAdornmentType;\n\tendAdornment?: InputAdornmentType;\n\tdisabled?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n\ttouched?: boolean;\n\n\tcontainerProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tstartAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tendAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n};\n\nfunction hasItems(items?: InputAdornmentType): boolean {\n\tif (!items) {\n\t\treturn false;\n\t}\n\n\treturn Array.isArray(items) ? items.length > 0 : Boolean(items);\n}\n\nconst Container: FC<JSXBase.HTMLAttributes<HTMLDivElement>> = ({ class: className, ...other }, children) => {\n\treturn (\n\t\t<div class={clsx('kol-input-container__container', className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nconst KolInputContainerFc: FC<InputContainerProps> = (props, children) => {\n\tconst { class: classNames, startAdornment, endAdornment, disabled, msg, touched, containerProps, startAdornmentProps, endAdornmentProps, ...other } = props;\n\tconst stateCssClasses = {\n\t\t['kol-input-container--disabled']: disabled,\n\t\t[`kol-input-container--${getMsgType(msg)}`]: isMsgDefinedAndInputTouched(msg, touched),\n\t};\n\n\tconst baseProps: JSXBase.HTMLAttributes<HTMLDivElement> = {\n\t\tclass: clsx('kol-input-container', stateCssClasses, classNames),\n\t\t...other,\n\t};\n\n\tif (!hasItems(startAdornment) && !hasItems(endAdornment)) {\n\t\treturn (\n\t\t\t<div {...baseProps}>\n\t\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div {...baseProps}>\n\t\t\t<InputAdornment {...startAdornmentProps} position=\"start\">\n\t\t\t\t{startAdornment}\n\t\t\t</InputAdornment>\n\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t<InputAdornment {...endAdornmentProps} position=\"end\">\n\t\t\t\t{endAdornment}\n\t\t\t</InputAdornment>\n\t\t</div>\n\t);\n};\n\nexport default KolInputContainerFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport {\n\ttype IconOrIconClass,\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InternalButtonProps,\n\ttype KoliBriHorizontalIcons,\n\ttype MsgPropType,\n\ttype SelectStates,\n\ttype Stringified,\n\ttype TextareaStates,\n} from '../../schema';\n\nimport { isObject, isString } from 'lodash-es';\nimport KolIconButtonFc from '../../functional-components/IconButton';\nimport KolInputContainerFc, { type InputContainerProps } from '../../functional-components/InputContainer';\nimport { IconFC } from '../../internal/functional-components/icon/component';\n\ntype InputState =\n\t| TextareaStates\n\t| SelectStates\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates;\n\nexport type InputContainerStateWrapperProps = Partial<InputContainerProps> & {\n\tstate: InputState;\n};\n\nfunction getInputContainerProps(state: InputState): {\n\ticons?: KoliBriHorizontalIcons;\n\tsmartButton?: InternalButtonProps;\n\tdisabled?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n\ttouched?: boolean;\n} {\n\tlet icons: KoliBriHorizontalIcons | undefined = undefined;\n\tlet smartButton: InternalButtonProps | undefined;\n\n\tif ('_icons' in state) {\n\t\ticons = state._icons;\n\t}\n\n\tif ('_smartButton' in state) {\n\t\tsmartButton = state._smartButton;\n\t}\n\n\treturn {\n\t\ticons,\n\t\tsmartButton,\n\t\tdisabled: state._disabled,\n\t\tmsg: state._msg,\n\t\ttouched: state._touched,\n\t};\n}\n\nconst InputContainerStateWrapperFc: FC<InputContainerStateWrapperProps> = (\n\t{ state, startAdornment: defaultStartAdornment, endAdornment: defaultEndAdornment },\n\tchildren,\n) => {\n\tconst { icons, smartButton, disabled, msg, touched } = getInputContainerProps(state);\n\n\tlet leftIconProps: IconOrIconClass | undefined = icons?.left;\n\tif (isString(leftIconProps)) {\n\t\tleftIconProps = { icon: leftIconProps };\n\t}\n\n\tlet rightIconProps: IconOrIconClass | undefined = icons?.right;\n\tif (isString(rightIconProps)) {\n\t\trightIconProps = { icon: rightIconProps };\n\t}\n\n\tconst startAdornment = [];\n\tconst endAdornment = [];\n\n\tif (defaultStartAdornment) {\n\t\tif (Array.isArray(defaultStartAdornment)) {\n\t\t\tstartAdornment.push(...defaultStartAdornment);\n\t\t} else {\n\t\t\tstartAdornment.push(defaultStartAdornment);\n\t\t}\n\t}\n\n\tif (leftIconProps) {\n\t\tif (isObject(leftIconProps)) {\n\t\t\tstartAdornment.push(\n\t\t\t\t<IconFC class=\"kol-input-container__icon\" icons={leftIconProps.icon} label={leftIconProps.label ?? ''} style={leftIconProps.style} />,\n\t\t\t);\n\t\t} else {\n\t\t\tstartAdornment.push(<IconFC class=\"kol-input-container__icon\" icons={leftIconProps} label=\"\" />);\n\t\t}\n\t}\n\n\tif (isObject(smartButton)) {\n\t\tendAdornment.push(\n\t\t\t<KolIconButtonFc componentName=\"button\" class=\"kol-input-container__smart-button\" {...smartButton} hideLabel={true} disabled={disabled} />,\n\t\t);\n\t}\n\n\tif (rightIconProps) {\n\t\tif (isObject(rightIconProps)) {\n\t\t\tendAdornment.push(\n\t\t\t\t<IconFC class=\"kol-input-container__icon\" icons={rightIconProps.icon} label={rightIconProps.label ?? ''} style={rightIconProps.style} />,\n\t\t\t);\n\t\t} else {\n\t\t\tendAdornment.push(<IconFC class=\"kol-input-container__icon\" icons={rightIconProps} label=\"\" />);\n\t\t}\n\t}\n\n\tif (defaultEndAdornment) {\n\t\tif (Array.isArray(defaultEndAdornment)) {\n\t\t\tendAdornment.push(...defaultEndAdornment);\n\t\t} else {\n\t\t\tendAdornment.push(defaultEndAdornment);\n\t\t}\n\t}\n\n\treturn (\n\t\t<KolInputContainerFc disabled={disabled} msg={msg} touched={touched} startAdornment={startAdornment} endAdornment={endAdornment}>\n\t\t\t{children}\n\t\t</KolInputContainerFc>\n\t);\n};\n\nexport default InputContainerStateWrapperFc;\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { IconsHorizontalPropType, NumberString } from '../../../schema';\nimport { validateIcons, watchValidator } from '../../../schema';\n\nimport { InputController } from './controller';\n\nimport type { Props, Watches } from './types-icon';\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate readonly numberStringRegex = /^\\d+(\\.\\d+)?$/; // https://regex101.com/r/mET6Tx/1\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateIcons(value?: IconsHorizontalPropType): void {\n\t\tvalidateIcons(this.component, value);\n\t}\n\n\tpublic isNumberString(value: unknown): value is NumberString {\n\t\treturn typeof value === 'string' && this.numberStringRegex.test(value);\n\t}\n\n\tprotected readonly parseToNumber = (value?: number | NumberString | null): number | null => {\n\t\tif (typeof value === 'number') {\n\t\t\treturn isNaN(value) ? null : value;\n\t\t}\n\t\tif (this.isNumberString(value)) {\n\t\t\treturn parseFloat(value);\n\t\t}\n\t\treturn null;\n\t};\n\n\tprotected readonly validateNumber = (propName: string, value?: number | NumberString | null) => {\n\t\treturn watchValidator(\n\t\t\tthis.component,\n\t\t\tpropName,\n\t\t\t(value): boolean =>\n\t\t\t\tvalue === undefined || value === null || typeof value === 'number' || (typeof value === 'string' && this.numberStringRegex.test(value)),\n\t\t\tnew Set(['number', 'NumberString']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (value: unknown, nextState) => {\n\t\t\t\t\t\tif (nextState?.has(propName)) {\n\t\t\t\t\t\t\tnextState?.set(propName, this.parseToNumber(value as number | NumberString | null));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateIcons(this.component._icons);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,WAAW,GAAoB,CAAC,KAAK,KAAI;AAC9C,IAAA,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAe,GAAA,KAAK,EAAf,KAAK,GAAA,MAAA,CAAK,KAAK,EAAhE,CAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,CAAwD,CAAQ;AAEtE,IAAA,OAAO,CAAA,CAAC,cAAc,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,EAAA,EAAM,KAAK,CAAA,CAAI;AACjI,CAAC;;ACqCD,MAAM,eAAe,GAAwB,CAAC,KAAK,KAAI;AACtD,IAAA,MAAM,EAAE,aAAa,GAAG,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAe,GAAA,KAAK,EAAf,KAAK,GAAA,MAAA,CAAK,KAAK,EAApE,CAAA,eAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,CAA4D,CAAQ;AAC1E,IAAA,MAAM,SAAS,GAAG,aAAa,KAAK,QA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ton/IconButton.tsx","src/functional-components/InputAdornment/InputAdornment.tsx","src/functional-components/InputContainer/InputContainer.tsx","src/functional-component-wrappers/InputContainerStateWrapper/InputContainerStateWrapper.tsx","src/components/@deprecated/input/controller-icon.ts"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { OptionalButtonProps, RequiredButtonProps } from '../../schema';\n\nexport type ButtonProps = Partial<RequiredButtonProps & OptionalButtonProps> & {\n\tlabel: string;\n\tclass?: string;\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolButtonFc: FC<ButtonProps> = (props) => {\n\tconst { label, icons, hideLabel, disabled, onClick, ...other } = props;\n\n\treturn <KolButtonWcTag _label={label} _disabled={disabled} _icons={icons} _hideLabel={hideLabel} _on={{ onClick }} {...other} />;\n};\n\nexport default KolButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { IconFC } from '../../internal/functional-components/icon/component';\nimport type { VariantClassNamePropType } from '../../schema';\nimport KolButtonFc, { type ButtonProps } from '../Button';\n\ntype IconType = {\n\tcomponentName: 'icon';\n\ticon?: string;\n\tclass?: string;\n\tlabel?: string;\n\tstyle?: { [key: string]: string };\n\tonClick?: (event: MouseEvent) => void;\n};\n\ntype ButtonType = Partial<Omit<ButtonProps, 'icons'>> & {\n\tcomponentName: 'button';\n\ticon?: string;\n\tlabel?: string;\n\tclass?: string;\n\tbuttonVariant?: VariantClassNamePropType;\n\n\tonClick?: (event: MouseEvent) => void;\n};\n\nexport type IconButtonProps = IconType | ButtonType;\n\n/**\n * `KolIconButtonFc` is a functional component that renders either a Button or an Icon based on the provided props.\n *\n * Depending on the value of the `componentName` prop, either a Button (`KolButtonFc`) or an Icon (`IconFC`) is rendered.\n * Both components support optional `icon` props for displaying an icon and an optional `onClick` handler for user interactions.\n *\n * This component combines the flexibility of rendering either a button with an optional label or a simple icon, while ensuring that unnecessary props for the selected element are not passed.\n *\n * Supported props:\n * - `componentName`: Specifies whether a 'button' or 'icon' should be rendered. Default is 'button'.\n * - `label`: An optional label, which is only shown for Buttons.\n * - `icon`: The Codicon or other font classname used for the icon display.\n * - `class`: Optional CSS class for additional styling customization.\n * - `buttonVariant`: Variant for the button component.\n * - `onClick`: Optional click handler for user interactions.\n *\n * Example usage:\n * ```tsx\n * <KolIconButtonFc componentName=\"button\" label=\"Submit\" icon=\"kolicon-check\" onClick={handleClick} />\n * <KolIconButtonFc componentName=\"icon\" icon=\"alert\" onClick={handleClick} />\n * ```\n *\n * @param {IconButtonProps} props - The properties that customize the component, including the selection of the component type (Button or Icon) and other specific attributes.\n * @returns {JSX.Element} - The rendered JSX element (Button or Icon).\n */\nconst KolIconButtonFc: FC<IconButtonProps> = (props) => {\n\tconst { componentName = 'button', label, icon, onClick, ...other } = props;\n\tconst Component = componentName === 'button' ? KolButtonFc : IconFC;\n\n\treturn <Component label={label || ''} hideLabel icons={`${icon}`} onClick={onClick} {...other} />;\n};\n\nexport default KolIconButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from '../../utils/clsx';\n\nexport type InputAdornmentProps = JSXBase.HTMLAttributes<HTMLDivElement> & {\n\tposition?: 'start' | 'end';\n};\n\nconst InputAdornment: FC<InputAdornmentProps> = ({ position = 'start', class: className, ...other }, children) => {\n\tconst rootClassName = `kol-input-container__adornment`;\n\tconst positionClassName = `${rootClassName}--${position}`;\n\n\treturn (\n\t\t<div class={clsx(rootClassName, positionClassName, className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default InputAdornment;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport { getMsgType, isMsgDefinedAndInputTouched, type MsgPropType, type Stringified } from '../../schema';\nimport clsx from '../../utils/clsx';\nimport InputAdornment from '../InputAdornment';\n\ntype InputAdornmentType = VNode | VNode[] | null;\n\nexport type InputContainerProps = JSXBase.HTMLAttributes & {\n\tstartAdornment?: InputAdornmentType;\n\tendAdornment?: InputAdornmentType;\n\tdisabled?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n\ttouched?: boolean;\n\n\tcontainerProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tstartAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tendAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n};\n\nfunction hasItems(items?: InputAdornmentType): boolean {\n\tif (!items) {\n\t\treturn false;\n\t}\n\n\treturn Array.isArray(items) ? items.length > 0 : Boolean(items);\n}\n\nconst Container: FC<JSXBase.HTMLAttributes<HTMLDivElement>> = ({ class: className, ...other }, children) => {\n\treturn (\n\t\t<div class={clsx('kol-input-container__container', className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nconst KolInputContainerFc: FC<InputContainerProps> = (props, children) => {\n\tconst { class: classNames, startAdornment, endAdornment, disabled, msg, touched, containerProps, startAdornmentProps, endAdornmentProps, ...other } = props;\n\tconst stateCssClasses = {\n\t\t['kol-input-container--disabled']: disabled,\n\t\t[`kol-input-container--${getMsgType(msg)}`]: isMsgDefinedAndInputTouched(msg, touched),\n\t};\n\n\tconst baseProps: JSXBase.HTMLAttributes<HTMLDivElement> = {\n\t\tclass: clsx('kol-input-container', stateCssClasses, classNames),\n\t\t...other,\n\t};\n\n\tif (!hasItems(startAdornment) && !hasItems(endAdornment)) {\n\t\treturn (\n\t\t\t<div {...baseProps}>\n\t\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div {...baseProps}>\n\t\t\t<InputAdornment {...startAdornmentProps} position=\"start\">\n\t\t\t\t{startAdornment}\n\t\t\t</InputAdornment>\n\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t<InputAdornment {...endAdornmentProps} position=\"end\">\n\t\t\t\t{endAdornment}\n\t\t\t</InputAdornment>\n\t\t</div>\n\t);\n};\n\nexport default KolInputContainerFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport {\n\ttype IconOrIconClass,\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InternalButtonProps,\n\ttype KoliBriHorizontalIcons,\n\ttype MsgPropType,\n\ttype SelectStates,\n\ttype Stringified,\n\ttype TextareaStates,\n} from '../../schema';\n\nimport { isObject, isString } from 'lodash-es';\nimport KolIconButtonFc from '../../functional-components/IconButton';\nimport KolInputContainerFc, { type InputContainerProps } from '../../functional-components/InputContainer';\nimport { IconFC } from '../../internal/functional-components/icon/component';\n\ntype InputState =\n\t| TextareaStates\n\t| SelectStates\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates;\n\nexport type InputContainerStateWrapperProps = Partial<InputContainerProps> & {\n\tstate: InputState;\n};\n\nfunction getInputContainerProps(state: InputState): {\n\ticons?: KoliBriHorizontalIcons;\n\tsmartButton?: InternalButtonProps;\n\tdisabled?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n\ttouched?: boolean;\n} {\n\tlet icons: KoliBriHorizontalIcons | undefined = undefined;\n\tlet smartButton: InternalButtonProps | undefined;\n\n\tif ('_icons' in state) {\n\t\ticons = state._icons;\n\t}\n\n\tif ('_smartButton' in state) {\n\t\tsmartButton = state._smartButton;\n\t}\n\n\treturn {\n\t\ticons,\n\t\tsmartButton,\n\t\tdisabled: state._disabled,\n\t\tmsg: state._msg,\n\t\ttouched: state._touched,\n\t};\n}\n\nconst InputContainerStateWrapperFc: FC<InputContainerStateWrapperProps> = (\n\t{ state, startAdornment: defaultStartAdornment, endAdornment: defaultEndAdornment },\n\tchildren,\n) => {\n\tconst { icons, smartButton, disabled, msg, touched } = getInputContainerProps(state);\n\n\tlet leftIconProps: IconOrIconClass | undefined = icons?.left;\n\tif (isString(leftIconProps)) {\n\t\tleftIconProps = { icon: leftIconProps };\n\t}\n\n\tlet rightIconProps: IconOrIconClass | undefined = icons?.right;\n\tif (isString(rightIconProps)) {\n\t\trightIconProps = { icon: rightIconProps };\n\t}\n\n\tconst startAdornment = [];\n\tconst endAdornment = [];\n\n\tif (defaultStartAdornment) {\n\t\tif (Array.isArray(defaultStartAdornment)) {\n\t\t\tstartAdornment.push(...defaultStartAdornment);\n\t\t} else {\n\t\t\tstartAdornment.push(defaultStartAdornment);\n\t\t}\n\t}\n\n\tif (leftIconProps) {\n\t\tif (isObject(leftIconProps)) {\n\t\t\tstartAdornment.push(\n\t\t\t\t<IconFC class=\"kol-input-container__icon\" icons={leftIconProps.icon} label={leftIconProps.label ?? ''} style={leftIconProps.style} />,\n\t\t\t);\n\t\t} else {\n\t\t\tstartAdornment.push(<IconFC class=\"kol-input-container__icon\" icons={leftIconProps} label=\"\" />);\n\t\t}\n\t}\n\n\tif (isObject(smartButton)) {\n\t\tendAdornment.push(\n\t\t\t<KolIconButtonFc componentName=\"button\" class=\"kol-input-container__smart-button\" {...smartButton} hideLabel={true} disabled={disabled} />,\n\t\t);\n\t}\n\n\tif (rightIconProps) {\n\t\tif (isObject(rightIconProps)) {\n\t\t\tendAdornment.push(\n\t\t\t\t<IconFC class=\"kol-input-container__icon\" icons={rightIconProps.icon} label={rightIconProps.label ?? ''} style={rightIconProps.style} />,\n\t\t\t);\n\t\t} else {\n\t\t\tendAdornment.push(<IconFC class=\"kol-input-container__icon\" icons={rightIconProps} label=\"\" />);\n\t\t}\n\t}\n\n\tif (defaultEndAdornment) {\n\t\tif (Array.isArray(defaultEndAdornment)) {\n\t\t\tendAdornment.push(...defaultEndAdornment);\n\t\t} else {\n\t\t\tendAdornment.push(defaultEndAdornment);\n\t\t}\n\t}\n\n\treturn (\n\t\t<KolInputContainerFc disabled={disabled} msg={msg} touched={touched} startAdornment={startAdornment} endAdornment={endAdornment}>\n\t\t\t{children}\n\t\t</KolInputContainerFc>\n\t);\n};\n\nexport default InputContainerStateWrapperFc;\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { IconsHorizontalPropType, NumberString } from '../../../schema';\nimport { validateIcons, watchValidator } from '../../../schema';\n\nimport { InputController } from './controller';\n\nimport type { Props, Watches } from './types-icon';\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate readonly numberStringRegex = /^\\d+(\\.\\d+)?$/; // https://regex101.com/r/mET6Tx/1\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateIcons(value?: IconsHorizontalPropType): void {\n\t\tvalidateIcons(this.component, value);\n\t}\n\n\tpublic isNumberString(value: unknown): value is NumberString {\n\t\treturn typeof value === 'string' && this.numberStringRegex.test(value);\n\t}\n\n\tprotected readonly parseToNumber = (value?: number | NumberString | null): number | null => {\n\t\tif (typeof value === 'number') {\n\t\t\treturn isNaN(value) ? null : value;\n\t\t}\n\t\tif (this.isNumberString(value)) {\n\t\t\treturn parseFloat(value);\n\t\t}\n\t\treturn null;\n\t};\n\n\tprotected readonly validateNumber = (propName: string, value?: number | NumberString | null) => {\n\t\treturn watchValidator(\n\t\t\tthis.component,\n\t\t\tpropName,\n\t\t\t(value): boolean =>\n\t\t\t\tvalue === undefined || value === null || typeof value === 'number' || (typeof value === 'string' && this.numberStringRegex.test(value)),\n\t\t\tnew Set(['number', 'NumberString']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (value: unknown, nextState) => {\n\t\t\t\t\t\tif (nextState?.has(propName)) {\n\t\t\t\t\t\t\tnextState?.set(propName, this.parseToNumber(value as number | NumberString | null));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentW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K,EAAE;AACN,oBAAA,WAAW,EAAE,CAAC,KAAc,EAAE,SAAS,KAAI;wBAC1C,IAAI,SAAS,KAAT,IAAA,IAAA,SAAS,KAAT,MAAA,GAAA,MAAA,GAAA,SAAS,CAAE,GAAG,CAAC,QAAQ,CAAC,EAAE;AAC7B,4BAAA,SAAS,aAAT,SAAS,KAAA,MAAA,GAAA,MAAA,GAAT,SAAS,CAAE,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,KAAqC,CAAC,CAAC;;qBAEpF;AACD,iBAAA;AACD,aAAA,CACD;AACF,SAAC;AAvCA,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,aAAa,CAAC,KAA+B,EAAA;AACnD,QAAA,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAG9B,IAAA,cAAc,CAAC,KAAc,EAAA;AACnC,QAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC;;IAiChE,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{L as n,z as t,A as e,B as o,C as s,D as i}from"./common-noYAs-wc.js";import{E as r}from"./index-
|
|
5
|
-
//# sourceMappingURL=dev.utils-
|
|
4
|
+
import{L as n,z as t,A as e,B as o,C as s,D as i}from"./common-noYAs-wc.js";import{E as r}from"./index-CLHqy-2_.js";const a=()=>{try{const n=t();if(!n||typeof n.querySelector!=="function"){return}const s=n.querySelector('meta[name="kolibri"]');if(s&&s.hasAttribute("content")){const n=s.getAttribute("content");if(typeof n==="string"){e(n.includes("experimental-mode=true"));o(n.includes("color-contrast-analysis=true"))}}}catch(n){}};const c=()=>{let n=s().KoliBri;if(n===undefined){n={};Object.defineProperty(s(),"KoliBri",{value:n,writable:false})}return n};const u=()=>{a();n.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${r.kolibriVersion}\n\t`,{forceLog:true})};const l=()=>{if(c().adviceShown!==true){Object.defineProperty(c(),"adviceShown",{get:function(){return true}});n.debug(`\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n`)}};let f=()=>Math.floor(Math.random()*16777215).toString(16);if(i()){f=()=>"nonce"}const m=n=>`${n}-${f()}`;const p=(n,t)=>{const e=n.lastIndexOf("-");if(e===-1)return`${n}-${t}`;const o=n.slice(e+1);const s=o==="nonce"||/^[0-9a-f]+$/.test(o);return s?`${n.slice(0,e)}-${t}-${o}`:`${n}-${t}`};export{p as a,m as c,u as i,f as n,l as r};
|
|
5
|
+
//# sourceMappingURL=dev.utils-CiiFii6l.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.utils-
|
|
1
|
+
{"version":3,"file":"dev.utils-CiiFii6l.js","sources":["src/utils/dev.utils.ts"],"sourcesContent":["import { Log, getDocument, isTestMode, setColorContrastAnalysis, setExperimentalMode } from '../schema';\n\nimport { Env } from '@stencil/core';\nimport { getWindow } from '../schema';\n\nconst initMeta = (): void => {\n\ttry {\n\t\tconst document = getDocument();\n\t\tif (!document || typeof document.querySelector !== 'function') {\n\t\t\treturn; // Skip meta initialization if document is not available\n\t\t}\n\n\t\tconst meta = document.querySelector('meta[name=\"kolibri\"]');\n\t\tif (meta && meta.hasAttribute('content')) {\n\t\t\tconst content = meta.getAttribute('content');\n\t\t\tif (typeof content === 'string') {\n\t\t\t\tsetExperimentalMode(content.includes('experimental-mode=true'));\n\t\t\t\tsetColorContrastAnalysis(content.includes('color-contrast-analysis=true'));\n\t\t\t}\n\t\t}\n\t} catch {\n\t\t// Ignore meta initialization errors in test/SSR environments\n\t}\n};\n\nconst getKoliBri = (): Record<string, unknown> => {\n\tlet kolibri = getWindow().KoliBri;\n\tif (kolibri === undefined) {\n\t\tkolibri = {};\n\t\tObject.defineProperty(getWindow(), 'KoliBri', {\n\t\t\tvalue: kolibri,\n\t\t\twritable: false,\n\t\t});\n\t}\n\treturn kolibri;\n};\n\nexport { getKoliBri };\n\nexport const initKoliBri = (): void => {\n\tinitMeta();\n\tLog.debug(\n\t\t`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \\`--' | |) /_ ,--.--. \\`--'\n| . ' | .-. | | | ,--. | .-. \\\\ | .--' ,--.\n| |\\\\ \\\\ | '-' | | | | | | '--' / | | | |\n\\`--' \\`--´ \\`---´ \\`--' \\`--' \\`------´ \\`--' \\`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${Env.kolibriVersion}\n\t`,\n\t\t{\n\t\t\tforceLog: true,\n\t\t},\n\t);\n};\n\nexport const renderDevAdvice = (): void => {\n\tif (getKoliBri().adviceShown !== true) {\n\t\tObject.defineProperty(getKoliBri(), 'adviceShown', {\n\t\t\tget: function () {\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t\tLog.debug(\n\t\t\t`\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n`,\n\t\t);\n\t}\n};\n\nlet nonce = (): string => Math.floor(Math.random() * 16777215).toString(16);\n\nif (isTestMode()) {\n\tnonce = (): string => 'nonce';\n}\n\nexport { nonce };\n\nexport const createUniqueId = (prefix: string): string => `${prefix}-${nonce()}`;\n\nexport const createRelatedUniqueId = (baseId: string, suffix: string): string => {\n\tconst separatorIndex = baseId.lastIndexOf('-');\n\tif (separatorIndex === -1) return `${baseId}-${suffix}`;\n\tconst lastSegment = baseId.slice(separatorIndex + 1);\n\tconst isNonce = lastSegment === 'nonce' || /^[0-9a-f]+$/.test(lastSegment);\n\treturn isNonce ? `${baseId.slice(0, separatorIndex)}-${suffix}-${lastSegment}` : `${baseId}-${suffix}`;\n};\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,QAAQ,GAAG,MAAW;AAC3B,IAAA,IAAI;AACH,QAAA,MAAM,QAAQ,GAAG,WAAW,EAAE;QAC9B,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,CAAC,aAAa,KAAK,UAAU,EAAE;YAC9D;;QAGD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,sBAAsB,CAAC;QAC3D,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;YACzC,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;AAC5C,YAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;gBAChC,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;gBAC/D,wBAAwB,CAAC,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;;;;IAG3E,OAAA,EAAA,EAAM;;AAGT,CAAC;AAED,MAAM,UAAU,GAAG,MAA8B;AAChD,IAAA,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO;AACjC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QAC1B,OAAO,GAAG,EAAE;AACZ,QAAA,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE;AAC7C,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,K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