@public-ui/components 4.4.0-rc.0 → 4.4.0
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-Coxw3JU8.js → Alert-DdWMVSCG.js} +5 -5
- package/dist/cjs/{Alert-Coxw3JU8.js.map → Alert-DdWMVSCG.js.map} +1 -1
- package/dist/cjs/{Collapsible-DT8C9xVf.js → Collapsible-84znchMF.js} +5 -5
- package/dist/cjs/{Collapsible-DT8C9xVf.js.map → Collapsible-84znchMF.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-A2ynySII.js → CustomSuggestionsOptionsGroup-B8r9ESvD.js} +3 -3
- package/dist/cjs/{CustomSuggestionsOptionsGroup-A2ynySII.js.map → CustomSuggestionsOptionsGroup-B8r9ESvD.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-CSGUtZoI.js → FieldControlStateWrapper-DjR-X-sb.js} +7 -7
- package/dist/cjs/{FieldControlStateWrapper-CSGUtZoI.js.map → FieldControlStateWrapper-DjR-X-sb.js.map} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-DQSgGoJY.js → FormFieldStateWrapper-wwn4_a3Z.js} +7 -7
- package/dist/cjs/{FormFieldStateWrapper-DQSgGoJY.js.map → FormFieldStateWrapper-wwn4_a3Z.js.map} +1 -1
- package/dist/cjs/{Heading-LVZVJoow.js → Heading-D85YpBmN.js} +3 -3
- package/dist/cjs/{Heading-LVZVJoow.js.map → Heading-D85YpBmN.js.map} +1 -1
- package/dist/cjs/{Input-BJA1r-um.js → Input-HYQUfWIw.js} +5 -5
- package/dist/cjs/{Input-BJA1r-um.js.map → Input-HYQUfWIw.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-A-jVn7Y5.js → InputStateWrapper-BjgGRDls.js} +6 -6
- package/dist/cjs/{InputStateWrapper-A-jVn7Y5.js.map → InputStateWrapper-BjgGRDls.js.map} +1 -1
- package/dist/cjs/{app-globals-Cu6UTS5B.js → app-globals-Bz24OCbW.js} +4 -4
- package/dist/cjs/{app-globals-Cu6UTS5B.js.map → app-globals-Bz24OCbW.js.map} +1 -1
- package/dist/cjs/{component-CtNi9R_v.js → component-C2hEgIVQ.js} +4 -4
- package/dist/cjs/{component-CtNi9R_v.js.map → component-C2hEgIVQ.js.map} +1 -1
- package/dist/cjs/{component-DhhMlrPF.js → component-C3z22UYy.js} +3 -3
- package/dist/cjs/{component-DhhMlrPF.js.map → component-C3z22UYy.js.map} +1 -1
- package/dist/cjs/{component-CJp9X0Jy.js → component-CjPh3Ua8.js} +3 -3
- package/dist/cjs/{component-CJp9X0Jy.js.map → component-CjPh3Ua8.js.map} +1 -1
- package/dist/cjs/{component-gmHd3TM9.js → component-Co65ejdA.js} +4 -4
- package/dist/cjs/{component-gmHd3TM9.js.map → component-Co65ejdA.js.map} +1 -1
- package/dist/cjs/{component-SW8wvnfI.js → component-DdYEdIHN.js} +3 -3
- package/dist/cjs/{component-SW8wvnfI.js.map → component-DdYEdIHN.js.map} +1 -1
- package/dist/cjs/{component-ImTnIXC-.js → component-FiVtH26T.js} +6 -6
- package/dist/cjs/{component-ImTnIXC-.js.map → component-FiVtH26T.js.map} +1 -1
- package/dist/cjs/{controller-BW-xigfg.js → controller-B-Kp1VQL.js} +3 -3
- package/dist/cjs/{controller-BW-xigfg.js.map → controller-B-Kp1VQL.js.map} +1 -1
- package/dist/cjs/{controller-BfpJ_mxu.js → controller-Bm4-wTew.js} +3 -3
- package/dist/cjs/{controller-BfpJ_mxu.js.map → controller-Bm4-wTew.js.map} +1 -1
- package/dist/cjs/{controller-DjtyHL-Y.js → controller-DgmXT5Hi.js} +3 -3
- package/dist/cjs/{controller-DjtyHL-Y.js.map → controller-DgmXT5Hi.js.map} +1 -1
- package/dist/cjs/{controller-icon-CifkW2Mh.js → controller-icon-BrF-VLHV.js} +6 -6
- package/dist/cjs/{controller-icon-CifkW2Mh.js.map → controller-icon-BrF-VLHV.js.map} +1 -1
- package/dist/cjs/{dev.utils-B3acSuQU.js → dev.utils-BNkJdELA.js} +3 -3
- package/dist/cjs/{dev.utils-B3acSuQU.js.map → dev.utils-BNkJdELA.js.map} +1 -1
- package/dist/cjs/{devtools-C0XguiZW.js → devtools-Dr8Ao6Dr.js} +4 -4
- package/dist/cjs/{devtools-C0XguiZW.js.map → devtools-Dr8Ao6Dr.js.map} +1 -1
- package/dist/cjs/{index-CM_zBZzl.js → index-DtXSabNQ.js} +3 -3
- package/dist/cjs/index-DtXSabNQ.js.map +1 -0
- 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-Brd6Seck.js → Alert-BjiZcCeA.js} +5 -5
- package/dist/esm/{Alert-Brd6Seck.js.map → Alert-BjiZcCeA.js.map} +1 -1
- package/dist/esm/{Collapsible-uqCd1X9D.js → Collapsible-BPAU3d7l.js} +5 -5
- package/dist/{kolibri/Collapsible-uqCd1X9D.js.map → esm/Collapsible-BPAU3d7l.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-C0DCbpZw.js → CustomSuggestionsOptionsGroup-CPp_en4y.js} +3 -3
- package/dist/{kolibri/CustomSuggestionsOptionsGroup-C0DCbpZw.js.map → esm/CustomSuggestionsOptionsGroup-CPp_en4y.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-BYA-EUbJ.js → FieldControlStateWrapper-CL8sIEsf.js} +7 -7
- package/dist/esm/{FieldControlStateWrapper-BYA-EUbJ.js.map → FieldControlStateWrapper-CL8sIEsf.js.map} +1 -1
- package/dist/esm/{FormFieldStateWrapper-CgQd1-xm.js → FormFieldStateWrapper-CANKwnKv.js} +7 -7
- package/dist/{kolibri/FormFieldStateWrapper-CgQd1-xm.js.map → esm/FormFieldStateWrapper-CANKwnKv.js.map} +1 -1
- package/dist/esm/{Heading-daxHO4c7.js → Heading-CNfXfPK2.js} +3 -3
- package/dist/{kolibri/Heading-daxHO4c7.js.map → esm/Heading-CNfXfPK2.js.map} +1 -1
- package/dist/esm/{Input-BFEZcF7E.js → Input-DyCv-etW.js} +5 -5
- package/dist/{kolibri/Input-BFEZcF7E.js.map → esm/Input-DyCv-etW.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-DlCKK6Hj.js → InputStateWrapper-BJMqyY_8.js} +6 -6
- package/dist/esm/{InputStateWrapper-DlCKK6Hj.js.map → InputStateWrapper-BJMqyY_8.js.map} +1 -1
- package/dist/esm/{app-globals-BqHPFMb-.js → app-globals-D_kl2ROP.js} +4 -4
- package/dist/esm/{app-globals-BqHPFMb-.js.map → app-globals-D_kl2ROP.js.map} +1 -1
- package/dist/esm/{component-C0wbBaCr.js → component-BDS_iE5Q.js} +6 -6
- package/dist/esm/{component-C0wbBaCr.js.map → component-BDS_iE5Q.js.map} +1 -1
- package/dist/esm/{component-BGR8kQ7-.js → component-BXCnkVUN.js} +4 -4
- package/dist/esm/{component-BGR8kQ7-.js.map → component-BXCnkVUN.js.map} +1 -1
- package/dist/esm/{component-DzyFeBD2.js → component-BjVFpeYY.js} +3 -3
- package/dist/{kolibri/component-DzyFeBD2.js.map → esm/component-BjVFpeYY.js.map} +1 -1
- package/dist/esm/{component-D8uE-jGD.js → component-DepnuZGT.js} +4 -4
- package/dist/{kolibri/component-D8uE-jGD.js.map → esm/component-DepnuZGT.js.map} +1 -1
- package/dist/esm/{component-OSBqCRA5.js → component-K3ngYLGq.js} +3 -3
- package/dist/{kolibri/component-OSBqCRA5.js.map → esm/component-K3ngYLGq.js.map} +1 -1
- package/dist/esm/{component-D7nT-6lG.js → component-WjvIfI-H.js} +3 -3
- package/dist/esm/{component-D7nT-6lG.js.map → component-WjvIfI-H.js.map} +1 -1
- package/dist/esm/{controller-DWVgACel.js → controller-BFiUKKYT.js} +3 -3
- package/dist/esm/{controller-DWVgACel.js.map → controller-BFiUKKYT.js.map} +1 -1
- package/dist/esm/{controller-uhkWXfnu.js → controller-CnmYmyZK.js} +3 -3
- package/dist/{kolibri/controller-uhkWXfnu.js.map → esm/controller-CnmYmyZK.js.map} +1 -1
- package/dist/esm/{controller-BLYviJtY.js → controller-QfZ_zY-h.js} +3 -3
- package/dist/{kolibri/controller-BLYviJtY.js.map → esm/controller-QfZ_zY-h.js.map} +1 -1
- package/dist/esm/{controller-icon-CJA3QnNw.js → controller-icon-GPaN1UHM.js} +6 -6
- package/dist/esm/{controller-icon-CJA3QnNw.js.map → controller-icon-GPaN1UHM.js.map} +1 -1
- package/dist/esm/{dev.utils-xbtFeGNM.js → dev.utils-Cib2ENyx.js} +3 -3
- package/dist/esm/{dev.utils-xbtFeGNM.js.map → dev.utils-Cib2ENyx.js.map} +1 -1
- package/dist/esm/{devtools-CN6xORYP.js → devtools-CAWyelfv.js} +4 -4
- package/dist/esm/{devtools-CN6xORYP.js.map → devtools-CAWyelfv.js.map} +1 -1
- package/dist/esm/{index-Cle6HB7B.js → index-C_ZKddLG.js} +3 -3
- package/dist/esm/index-C_ZKddLG.js.map +1 -0
- 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-Brd6Seck.js → Alert-BjiZcCeA.js} +2 -2
- package/dist/kolibri/{Alert-Brd6Seck.js.map → Alert-BjiZcCeA.js.map} +1 -1
- package/dist/kolibri/{Collapsible-uqCd1X9D.js → Collapsible-BPAU3d7l.js} +2 -2
- package/dist/{esm/Collapsible-uqCd1X9D.js.map → kolibri/Collapsible-BPAU3d7l.js.map} +1 -1
- package/dist/kolibri/CustomSuggestionsOptionsGroup-CPp_en4y.js +5 -0
- package/dist/{esm/CustomSuggestionsOptionsGroup-C0DCbpZw.js.map → kolibri/CustomSuggestionsOptionsGroup-CPp_en4y.js.map} +1 -1
- package/dist/kolibri/FieldControlStateWrapper-CL8sIEsf.js +5 -0
- package/dist/kolibri/{FieldControlStateWrapper-BYA-EUbJ.js.map → FieldControlStateWrapper-CL8sIEsf.js.map} +1 -1
- package/dist/kolibri/{FormFieldStateWrapper-CgQd1-xm.js → FormFieldStateWrapper-CANKwnKv.js} +2 -2
- package/dist/{esm/FormFieldStateWrapper-CgQd1-xm.js.map → kolibri/FormFieldStateWrapper-CANKwnKv.js.map} +1 -1
- package/dist/kolibri/{Heading-daxHO4c7.js → Heading-CNfXfPK2.js} +2 -2
- package/dist/{esm/Heading-daxHO4c7.js.map → kolibri/Heading-CNfXfPK2.js.map} +1 -1
- package/dist/kolibri/Input-DyCv-etW.js +5 -0
- package/dist/{esm/Input-BFEZcF7E.js.map → kolibri/Input-DyCv-etW.js.map} +1 -1
- package/dist/kolibri/{InputStateWrapper-DlCKK6Hj.js → InputStateWrapper-BJMqyY_8.js} +2 -2
- package/dist/kolibri/{InputStateWrapper-DlCKK6Hj.js.map → InputStateWrapper-BJMqyY_8.js.map} +1 -1
- package/dist/kolibri/{app-globals-BqHPFMb-.js → app-globals-D_kl2ROP.js} +2 -2
- package/dist/kolibri/{app-globals-BqHPFMb-.js.map → app-globals-D_kl2ROP.js.map} +1 -1
- package/dist/kolibri/component-BDS_iE5Q.js +5 -0
- package/dist/kolibri/{component-C0wbBaCr.js.map → component-BDS_iE5Q.js.map} +1 -1
- package/dist/kolibri/{component-BGR8kQ7-.js → component-BXCnkVUN.js} +2 -2
- package/dist/kolibri/{component-BGR8kQ7-.js.map → component-BXCnkVUN.js.map} +1 -1
- package/dist/kolibri/component-BjVFpeYY.js +5 -0
- package/dist/{esm/component-DzyFeBD2.js.map → kolibri/component-BjVFpeYY.js.map} +1 -1
- package/dist/kolibri/{component-D8uE-jGD.js → component-DepnuZGT.js} +2 -2
- package/dist/{esm/component-D8uE-jGD.js.map → kolibri/component-DepnuZGT.js.map} +1 -1
- package/dist/kolibri/{component-OSBqCRA5.js → component-K3ngYLGq.js} +2 -2
- package/dist/{esm/component-OSBqCRA5.js.map → kolibri/component-K3ngYLGq.js.map} +1 -1
- package/dist/kolibri/component-WjvIfI-H.js +5 -0
- package/dist/kolibri/{component-D7nT-6lG.js.map → component-WjvIfI-H.js.map} +1 -1
- package/dist/kolibri/{controller-DWVgACel.js → controller-BFiUKKYT.js} +2 -2
- package/dist/kolibri/{controller-DWVgACel.js.map → controller-BFiUKKYT.js.map} +1 -1
- package/dist/kolibri/{controller-uhkWXfnu.js → controller-CnmYmyZK.js} +2 -2
- package/dist/{esm/controller-uhkWXfnu.js.map → kolibri/controller-CnmYmyZK.js.map} +1 -1
- package/dist/kolibri/{controller-BLYviJtY.js → controller-QfZ_zY-h.js} +2 -2
- package/dist/{esm/controller-BLYviJtY.js.map → kolibri/controller-QfZ_zY-h.js.map} +1 -1
- package/dist/kolibri/{controller-icon-CJA3QnNw.js → controller-icon-GPaN1UHM.js} +2 -2
- package/dist/kolibri/{controller-icon-CJA3QnNw.js.map → controller-icon-GPaN1UHM.js.map} +1 -1
- package/dist/kolibri/{dev.utils-xbtFeGNM.js → dev.utils-Cib2ENyx.js} +2 -2
- package/dist/kolibri/{dev.utils-xbtFeGNM.js.map → dev.utils-Cib2ENyx.js.map} +1 -1
- package/dist/kolibri/devtools-CAWyelfv.js +5 -0
- package/dist/kolibri/{devtools-CN6xORYP.js.map → devtools-CAWyelfv.js.map} +1 -1
- package/dist/kolibri/{index-Cle6HB7B.js → index-C_ZKddLG.js} +2 -2
- package/dist/kolibri/index-C_ZKddLG.js.map +1 -0
- 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-click-button.entry.js.map +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-image.entry.js.map +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-number.entry.js.map +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-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/cjs/index-CM_zBZzl.js.map +0 -1
- package/dist/esm/index-Cle6HB7B.js.map +0 -1
- package/dist/kolibri/CustomSuggestionsOptionsGroup-C0DCbpZw.js +0 -5
- package/dist/kolibri/FieldControlStateWrapper-BYA-EUbJ.js +0 -5
- package/dist/kolibri/Input-BFEZcF7E.js +0 -5
- package/dist/kolibri/component-C0wbBaCr.js +0 -5
- package/dist/kolibri/component-D7nT-6lG.js +0 -5
- package/dist/kolibri/component-DzyFeBD2.js +0 -5
- package/dist/kolibri/devtools-CN6xORYP.js +0 -5
- package/dist/kolibri/index-Cle6HB7B.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DtXSabNQ.js');
|
|
7
7
|
var i18n = require('./i18n-CdBTfXYx.js');
|
|
8
8
|
|
|
9
9
|
function renderSpinVariant(variant) {
|
|
@@ -34,6 +34,6 @@ const SpinFC = (props) => {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
exports.SpinFC = SpinFC;
|
|
37
|
-
//# sourceMappingURL=component-
|
|
37
|
+
//# sourceMappingURL=component-DdYEdIHN.js.map
|
|
38
38
|
|
|
39
|
-
//# sourceMappingURL=component-
|
|
39
|
+
//# sourceMappingURL=component-DdYEdIHN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-DdYEdIHN.js","sources":["src/internal/functional-components/spin/component.tsx"],"sourcesContent":["import type { FunctionalComponent as FC } from '@stencil/core';\nimport { Fragment, h } from '@stencil/core';\n\nimport { translate } from '../../../i18n';\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { SpinApi } from './api';\n\nfunction renderSpinVariant(variant: string): unknown {\n\tswitch (variant) {\n\t\tcase 'cycle':\n\t\t\treturn <span class={`kol-spin__loader kol-spin__spinner--${variant}__element`}></span>;\n\t\tcase 'none':\n\t\t\treturn <slot name=\"expert\"></slot>;\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element\n\t\t\t\t\t\t\tkol-spin__spinner-element--1\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--1`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element\n\t\t\t\t\t\t\tkol-spin__spinner-element--2\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--2`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element\n\t\t\t\t\t\t\tkol-spin__spinner-element--3\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--3`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element\n\t\t\t\t\t\t\tkol-spin__spinner-element--neutral\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element\n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--4`}\n\t\t\t\t\t></span>\n\t\t\t\t</>\n\t\t\t);\n\t}\n}\n\nexport const SpinFC: FC<FunctionalComponentProps<SpinApi>> = (props) => {\n\tconst { show, label, variant } = props;\n\n\treturn (\n\t\t<Fragment>\n\t\t\t{show ? (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<span class={`kol-spin__spinner kol-spin__spinner--${variant}`}>{renderSpinVariant(variant)}</span>\n\t\t\t\t\t<span aria-busy=\"true\" class=\"visually-hidden\" role=\"alert\">\n\t\t\t\t\t\t{label || translate('kol-action-running')}\n\t\t\t\t\t</span>\n\t\t\t\t</Fragment>\n\t\t\t) : (\n\t\t\t\t<span aria-busy=\"false\" class=\"visually-hidden\" role=\"alert\">\n\t\t\t\t\t{label || translate('kol-action-done')}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</Fragment>\n\t);\n};\n"],"names":["h","Fragment","translate"],"mappings":";;;;;;;;AAOA,SAAS,iBAAiB,CAAC,OAAe,EAAA;IACzC,QAAQ,OAAO;AACd,QAAA,KAAK,OAAO;AACX,YAAA,OAAOA,kBAAM,KAAK,EAAE,CAAA,oCAAA,EAAuC,OAAO,CAAA,SAAA,CAAW,GAAS;AACvF,QAAA,KAAK,MAAM;YACV,OAAOA,OAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,GAAQ;AACnC,QAAA;AACC,YAAA,QACCA,OAAA,CAAAC,cAAA,EAAA,IAAA,EACCD,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;AACP,0BAAA,EAAA,OAAO,CAAc,YAAA,CAAA,EAAA,CACpC,CACN;;AAGP;AAEa,MAAA,MAAM,GAA0C,CAAC,KAAK,KAAI;IACtE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK;IAEtC,QACCA,OAAC,CAAAC,cAAQ,EACP,IAAA,EAAA,IAAI,IACJD,OAAA,CAACC,cAAQ,EAAA,IAAA,EACRD,OAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,wCAAwC,OAAO,CAAA,CAAE,IAAG,iBAAiB,CAAC,OAAO,CAAC,CAAQ,EACnGA,OAAgB,CAAA,MAAA,EAAA,EAAA,WAAA,EAAA,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,EAAA,EACzD,KAAK,IAAIE,cAAS,CAAC,oBAAoB,CAAC,CACnC,CACG,KAEXF,OAAgB,CAAA,MAAA,EAAA,EAAA,WAAA,EAAA,OAAO,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,EAAA,EAC1D,KAAK,IAAIE,cAAS,CAAC,iBAAiB,CAAC,CAChC,CACP,CACS;AAEb;;;;"}
|
|
@@ -9,14 +9,14 @@ var href = require('./href-oniW8mQ8.js');
|
|
|
9
9
|
var labelWithExpertSlot = require('./label-with-expert-slot-D16dPeV3.js');
|
|
10
10
|
require('./variant-quote-Bsb58gYB.js');
|
|
11
11
|
var align = require('./align-DUy5gtGI.js');
|
|
12
|
-
var index = require('./index-
|
|
12
|
+
var index = require('./index-DtXSabNQ.js');
|
|
13
13
|
var i18n = require('./i18n-CdBTfXYx.js');
|
|
14
14
|
var variantClassName = require('./variant-class-name-Cvv-pRMy.js');
|
|
15
15
|
var clsx = require('./clsx-Bm_HQUnh.js');
|
|
16
16
|
var bemRegistry = require('./bem-registry-CzxkcRDq.js');
|
|
17
|
-
var component$2 = require('./component-
|
|
18
|
-
var component$1 = require('./component-
|
|
19
|
-
var component = require('./component-
|
|
17
|
+
var component$2 = require('./component-C3z22UYy.js');
|
|
18
|
+
var component$1 = require('./component-Co65ejdA.js');
|
|
19
|
+
var component = require('./component-C2hEgIVQ.js');
|
|
20
20
|
|
|
21
21
|
const accessKeyProp = normalizers.createPropDefinition('accessKey', '', normalizers.normalizeString);
|
|
22
22
|
|
|
@@ -208,6 +208,6 @@ exports.spanIconsProp = spanIconsProp;
|
|
|
208
208
|
exports.tabIndexProp = tabIndexProp;
|
|
209
209
|
exports.tooltipAlignProp = tooltipAlignProp;
|
|
210
210
|
exports.variantProp = variantProp;
|
|
211
|
-
//# sourceMappingURL=component-
|
|
211
|
+
//# sourceMappingURL=component-FiVtH26T.js.map
|
|
212
212
|
|
|
213
|
-
//# sourceMappingURL=component-
|
|
213
|
+
//# sourceMappingURL=component-FiVtH26T.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-ImTnIXC-.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>;\n// The default is `undefined` (not `''` like other string props) to keep \"not set\" distinguishable\n// from \"explicitly empty\": `download` is a presence attribute, so `_download=\"\"` must render as\n// `download=\"\"` (download without a suggested filename) while an unset `_download` must not\n// render the attribute at all.\nexport const downloadProp = createPropDefinition<DownloadProp>('download', undefined as unknown as string, 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 { a11yHint } from '../../schema/utils/a11y.tipps';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeInteger } from './helpers/normalizers';\n\n/**\n * TabIndex prop for controlling tab order\n *\n * Description:\n * Specifies the tab order of interactive elements when using the keyboard.\n *\n * Usage (according to WCAG 2.1 and WAI-ARIA):\n * - Default: 0 (element follows the natural DOM order)\n * - Positive values (1, 2, 3, etc.): element is moved to the front of the tab order\n * - Negative values (typically -1): element is not reachable via sequential navigation\n *\n * Accessibility concerns:\n * - Positive tabIndex values can disrupt the natural tab order and confuse users\n * - Recommended to rely on DOM order (tabIndex={0}) or use -1 for non-tabbable elements\n * - Screen reader users expect a logical tab order matching the visual order\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n */\nexport type TabIndexProp = SimpleProp<'tabIndex', number>;\nexport const tabIndexProp = createPropDefinition<TabIndexProp>('tabIndex', 0, normalizeInteger, undefined, {\n\thints: (_propName, value) => {\n\t\tif (typeof value === 'number' && value > 0) {\n\t\t\ta11yHint(`Positive tabIndex values (\"${value}\") can disrupt the natural tab order. Use 0 for tabbable elements or rely on DOM order.`);\n\t\t}\n\t},\n});\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\t// `download` is a presence attribute: an explicitly empty string means \"download without a\n\t\t// suggested filename\" and must render as `download=\"\"`, unlike an unset download.\n\t\tdownload: typeof download === 'string' ? 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":["createPropDefinition","normalizeString","normalizeBoolean","normalizeObject","normalizeInteger","a11yHint","alignPropTypeOptions","hrefProp","labelWithExpertSlotProp","bem","h","clsx","translate","devHint","classNameFromVariant","SpanFC","IconFC","TooltipFC"],"mappings":";;;;;;;;;;;;;;;;;;;;AAKO,MAAM,aAAa,GAAGA,gCAAoB,CAAgB,WAAW,EAAE,EAAE,EAAEC,2BAAe;;ACA1F,MAAM,gBAAgB,GAAGD,gCAAoB,CAAmB,cAAc,EAAE,EAAE,EAAEC,2BAAe;;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,GAAGA,2BAAe,CAAC,KAAK,CAAC;AAClC,IAAA,OAAQ,0BAAgD,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAI,GAAgC,GAAG,MAAM;AACpH;AAEO,MAAM,oBAAoB,GAAGD,gCAAoB,CAAuB,kBAAkB,EAAE,MAAM,EAAE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AE,uBAAuB,EAAe,aAAA,EAAA,SAAS,EAAI,CAAA,CACzI,CACE,EACH,SAAS,KAAK,IAAI,IAAI,CAAC,UAAU,KACjCN,OAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,mBAAmB,EAAA,EAC7BA,OAAA,CAACO,mBAAS,EACT,EAAA,SAAS,EAAE,SAAS,IAAI,QAAQ,IAAI,EAAE,EACtC,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,EAAE,EAC/E,WAAW,EAAE,UAAU,EAAA,CACtB,CACG,CACN,EACA,sBAAsB,KACtBP,OAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,iBAAiB,EAAC,EAAE,EAAE,iBAAiB,IACjD,sBAAsB,CACjB,CACP,CACc;AAElB;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"component-FiVtH26T.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>;\n// The default is `undefined` (not `''` like other string props) to keep \"not set\" distinguishable\n// from \"explicitly empty\": `download` is a presence attribute, so `_download=\"\"` must render as\n// `download=\"\"` (download without a suggested filename) while an unset `_download` must not\n// render the attribute at all.\nexport const downloadProp = createPropDefinition<DownloadProp>('download', undefined as unknown as string, 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 { a11yHint } from '../../schema/utils/a11y.tipps';\nimport type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeInteger } from './helpers/normalizers';\n\n/**\n * TabIndex prop for controlling tab order\n *\n * Description:\n * Specifies the tab order of interactive elements when using the keyboard.\n *\n * Usage (according to WCAG 2.1 and WAI-ARIA):\n * - Default: 0 (element follows the natural DOM order)\n * - Positive values (1, 2, 3, etc.): element is moved to the front of the tab order\n * - Negative values (typically -1): element is not reachable via sequential navigation\n *\n * Accessibility concerns:\n * - Positive tabIndex values can disrupt the natural tab order and confuse users\n * - Recommended to rely on DOM order (tabIndex={0}) or use -1 for non-tabbable elements\n * - Screen reader users expect a logical tab order matching the visual order\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n */\nexport type TabIndexProp = SimpleProp<'tabIndex', number>;\nexport const tabIndexProp = createPropDefinition<TabIndexProp>('tabIndex', 0, normalizeInteger, undefined, {\n\thints: (_propName, value) => {\n\t\tif (typeof value === 'number' && value > 0) {\n\t\t\ta11yHint(`Positive tabIndex values (\"${value}\") can disrupt the natural tab order. Use 0 for tabbable elements or rely on DOM order.`);\n\t\t}\n\t},\n});\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\t// `download` is a presence attribute: an explicitly empty string means \"download without a\n\t\t// suggested filename\" and must render as `download=\"\"`, unlike an unset download.\n\t\tdownload: typeof download === 'string' ? 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":["createPropDefinition","normalizeString","normalizeBoolean","normalizeObject","normalizeInteger","a11yHint","alignPropTypeOptions","hrefProp","labelWithExpertSlotProp","bem","h","clsx","translate","devHint","classNameFromVariant","SpanFC","IconFC","TooltipFC"],"mappings":";;;;;;;;;;;;;;;;;;;;AAKO,MAAM,aAAa,GAAGA,gCAAoB,CAAgB,WAAW,EAAE,EAAE,EAAEC,2BAAe;;ACA1F,MAAM,gBAAgB,GAAGD,gCAAoB,CAAmB,cAAc,EAAE,EAAE,EAAEC,2BAAe;;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,GAAGA,2BAAe,CAAC,KAAK,CAAC;AAClC,IAAA,OAAQ,0BAAgD,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAI,GAAgC,GAAG,MAAM;AACpH;AAEO,MAAM,oBAAoB,GAAGD,gCAAoB,CAAuB,kBAAkB,EAAE,MAAM,EAAE,yBAAyB;;ACpB7H,MAAM,mBAAmB,GAAGA,gCAAoB,CAAsB,iBAAiB,EAA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,KAAK,IAAI,IAAI,CAAC,UAAU,KACjCN,OAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,mBAAmB,EAAA,EAC7BA,OAAA,CAACO,mBAAS,EACT,EAAA,SAAS,EAAE,SAAS,IAAI,QAAQ,IAAI,EAAE,EACtC,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,OAAO,IAAI,KAAK,QAAQ,GAAG,IAAI,GAAG,EAAE,EAC/E,WAAW,EAAE,UAAU,EAAA,CACtB,CACG,CACN,EACA,sBAAsB,KACtBP,OAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,iBAAiB,EAAC,EAAE,EAAE,iBAAiB,IACjD,sBAAsB,CACjB,CACP,CACc;AAElB;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -10,7 +10,7 @@ var placeholder = require('./placeholder-BaxbO-bU.js');
|
|
|
10
10
|
var readOnly = require('./read-only-M6jtuKga.js');
|
|
11
11
|
var required = require('./required-D5FM8g6I.js');
|
|
12
12
|
var variantClassName = require('./variant-class-name-Cvv-pRMy.js');
|
|
13
|
-
var controllerIcon = require('./controller-icon-
|
|
13
|
+
var controllerIcon = require('./controller-icon-BrF-VLHV.js');
|
|
14
14
|
|
|
15
15
|
const validatePattern = (component, value, options = {}) => {
|
|
16
16
|
common.watchString(component, '_pattern', value, options);
|
|
@@ -76,6 +76,6 @@ class InputPasswordController extends controllerIcon.InputIconController {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
exports.InputPasswordController = InputPasswordController;
|
|
79
|
-
//# sourceMappingURL=controller-
|
|
79
|
+
//# sourceMappingURL=controller-B-Kp1VQL.js.map
|
|
80
80
|
|
|
81
|
-
//# sourceMappingURL=controller-
|
|
81
|
+
//# sourceMappingURL=controller-B-Kp1VQL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-
|
|
1
|
+
{"version":3,"file":"controller-B-Kp1VQL.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"],"names":["watchString","watchBoolean","InputIconController","validateAutoComplete","validateHasCounter","validateMaxLengthBehavior","validateMaxLength","validatePlaceholder","validateReadOnly","validateRequired","validateVariantClassName"],"mappings":";;;;;;;;;;;;;;AAaO,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAuB,EAAE,OAAA,GAA8B,EAAE,KAAU;IACxIA,kBAAW,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC;AACnD,CAAC;;ACCM,MAAM,wBAAwB,GAAG,CAAC,SAAoC,EAAE,KAAgC,EAAE,KAA2B,KAAU;IACrJC,mBAAY,CAAC,SAAS,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,CAAC;AAC3D,CAAC;;ACWK,MAAO,uBAAwB,SAAQC,kCAAmB,CAAA;AAG/D,IAAA,WAAA,CAAmB,SAAyD,EAAE,IAAY,EAAE,IAAkB,EAAA;AAC7G,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,oBAAoB,CAAC,KAA4B,EAAA;AACvD,QAAAC,iCAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAGrC,IAAA,kBAAkB,CAAC,KAA0B,EAAA;AACnD,QAAAC,oCAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAGnC,IAAA,yBAAyB,CAAC,KAAiC,EAAA;AACjE,QAAAC,2CAAyB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAG1C,IAAA,iBAAiB,CAAC,KAAc,EAAA;AACtC,QAAAC,mCAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAGlC,IAAA,eAAe,CAAC,KAAc,EAAA;AACpC,QAAA,eAAe,CAAC,IAAI,CAAC,SAAS,EA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CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC;;AAEhE;;;;"}
|
|
@@ -7,7 +7,7 @@ var common = require('./common-D8VSsOzq.js');
|
|
|
7
7
|
var label = require('./label-BWtEHCJH.js');
|
|
8
8
|
var required = require('./required-D5FM8g6I.js');
|
|
9
9
|
var orientation = require('./orientation-DqighHqF.js');
|
|
10
|
-
var FormFieldStateWrapper = require('./FormFieldStateWrapper-
|
|
10
|
+
var FormFieldStateWrapper = require('./FormFieldStateWrapper-wwn4_a3Z.js');
|
|
11
11
|
|
|
12
12
|
const validateInputSelectOptions = (option) => {
|
|
13
13
|
if (typeof option === 'object' && option !== null) {
|
|
@@ -121,6 +121,6 @@ exports.InputRadioController = InputRadioController;
|
|
|
121
121
|
exports.fillKeyOptionMap = fillKeyOptionMap;
|
|
122
122
|
exports.validateOptions = validateOptions;
|
|
123
123
|
exports.validateOptionsWithOptgroup = validateOptionsWithOptgroup;
|
|
124
|
-
//# sourceMappingURL=controller-
|
|
124
|
+
//# sourceMappingURL=controller-Bm4-wTew.js.map
|
|
125
125
|
|
|
126
|
-
//# sourceMappingURL=controller-
|
|
126
|
+
//# sourceMappingURL=controller-Bm4-wTew.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-BfpJ_mxu.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":["hasEnoughReadableChars","containsOnlyNumbers","a11yHint","watchJsonArrayString","InputController","validateRequired","validateOrientation","setState"],"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,IAAIA,4BAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAIC,yBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;AACrG,gBAAAC,eAAQ,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,I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CAAC;;AAGI,IAAA,aAAa,CAAC,KAAsB,EAAA;AAC1C,QAAA,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,CAAC,CAAoB,GAAG,KAAK;QACnEC,eAAQ,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
|
+
{"version":3,"file":"controller-Bm4-wTew.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":["hasEnoughReadableChars","containsOnlyNumbers","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AAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;;;;;"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var common = require('./common-D8VSsOzq.js');
|
|
7
7
|
var spellCheck = require('./spell-check-Bgk-4B6A.js');
|
|
8
8
|
var suggestions = require('./suggestions-CMFq3w2R.js');
|
|
9
|
-
var controller = require('./controller-
|
|
9
|
+
var controller = require('./controller-B-Kp1VQL.js');
|
|
10
10
|
|
|
11
11
|
const inputTextTypeOptions = ['text', 'search', 'url', 'tel'];
|
|
12
12
|
const isInputTextTypePropType = (value) => {
|
|
@@ -50,6 +50,6 @@ class InputTextController extends InputTextEmailController {
|
|
|
50
50
|
|
|
51
51
|
exports.InputTextController = InputTextController;
|
|
52
52
|
exports.InputTextEmailController = InputTextEmailController;
|
|
53
|
-
//# sourceMappingURL=controller-
|
|
53
|
+
//# sourceMappingURL=controller-DgmXT5Hi.js.map
|
|
54
54
|
|
|
55
|
-
//# sourceMappingURL=controller-
|
|
55
|
+
//# sourceMappingURL=controller-DgmXT5Hi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-
|
|
1
|
+
{"version":3,"file":"controller-DgmXT5Hi.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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A0B,EAAA;AACnD,QAAAC,6BAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAGnC,IAAA,YAAY,CAAC,KAA6B,EAAA;AAChD,QAAA,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;IAGtC,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AAExC;;;;;"}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-DtXSabNQ.js');
|
|
7
7
|
var tslib_es6 = require('./tslib.es6-Cm0ytgPY.js');
|
|
8
|
-
var component = require('./component-
|
|
8
|
+
var component = require('./component-C3z22UYy.js');
|
|
9
9
|
var componentNames = require('./component-names-BWllpOr_.js');
|
|
10
10
|
var common = require('./common-D8VSsOzq.js');
|
|
11
|
-
var FormFieldStateWrapper = require('./FormFieldStateWrapper-
|
|
11
|
+
var FormFieldStateWrapper = require('./FormFieldStateWrapper-wwn4_a3Z.js');
|
|
12
12
|
var clsx = require('./clsx-Bm_HQUnh.js');
|
|
13
|
-
var component$1 = require('./component-
|
|
13
|
+
var component$1 = require('./component-Co65ejdA.js');
|
|
14
14
|
var _Uint8Array = require('./_Uint8Array-BAQUGozM.js');
|
|
15
15
|
var icons = require('./icons-CLZOPuhj.js');
|
|
16
16
|
|
|
@@ -164,6 +164,6 @@ class InputIconController extends FormFieldStateWrapper.InputController {
|
|
|
164
164
|
exports.InputContainerStateWrapperFc = InputContainerStateWrapperFc;
|
|
165
165
|
exports.InputIconController = InputIconController;
|
|
166
166
|
exports.KolIconButtonFc = KolIconButtonFc;
|
|
167
|
-
//# sourceMappingURL=controller-icon-
|
|
167
|
+
//# sourceMappingURL=controller-icon-BrF-VLHV.js.map
|
|
168
168
|
|
|
169
|
-
//# sourceMappingURL=controller-icon-
|
|
169
|
+
//# sourceMappingURL=controller-icon-BrF-VLHV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller-icon-CifkW2Mh.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":["__rest","h","KolButtonWcTag","IconFC","clsx","getMsgType","isMsgDefinedAndInputTouched","isString","isObject","InputController","watchValidator","validateIcons"],"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,GAAAA,gBAAA,CAAK,KAAK,EAAhE,CAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,CAAwD,CAAQ;AAEtE,IAAA,OAAOC,OAAA,CAACC,6BAAc,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,GAAAF,gBAAA,CAAK,KAAK,EAApE,CAAA,eAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,CAA4D,CAAQ;AAC1E,IAAA,MAAM,SAAS,GAAG,aAAa,KAAK,QAAQ,GAAG,WAAW,GAAGG,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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":["__rest","h","KolButtonWcTag","IconFC","clsx","getMsgType","isMsgDefinedAndInputTouched","isString","isObject","InputController","watchValidator","validateIcons"],"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,GAAAA,gBAAA,CAAK,KAAK,EAAhE,CAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,CAAwD,CAAQ;AAEtE,IAAA,OAAOC,OAAA,CAACC,6BAAc,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,GAAAF,gBAAA,CAAK,KAAK,EAApE,CAAA,eAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,CAA4D,CAAQ;AAC1E,IAAA,MAAM,SAAS,GAAG,aAAa,KAAK,QAAQ,GAAG,WAAW,GAAGG,gBAAM;AAEnE,IAAA,OAAOF,OAAA,CAAC,SAAS,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,SAAS,EAAA,IAAA,EAAC,KAAK,EAAE,CAAA,EAAG,IAAI,CAAE,CAAA,EAAE,OAAO,EAAE,OA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KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EACxI,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,EACnC,KAAK,EACL;AACC,gBAAA,KAAK,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,QAAAC,mBAAa,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;;;;;;"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
var common = require('./common-D8VSsOzq.js');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-DtXSabNQ.js');
|
|
8
8
|
|
|
9
9
|
const initMeta = () => {
|
|
10
10
|
try {
|
|
@@ -81,6 +81,6 @@ exports.createRelatedUniqueId = createRelatedUniqueId;
|
|
|
81
81
|
exports.createUniqueId = createUniqueId;
|
|
82
82
|
exports.initKoliBri = initKoliBri;
|
|
83
83
|
exports.renderDevAdvice = renderDevAdvice;
|
|
84
|
-
//# sourceMappingURL=dev.utils-
|
|
84
|
+
//# sourceMappingURL=dev.utils-BNkJdELA.js.map
|
|
85
85
|
|
|
86
|
-
//# sourceMappingURL=dev.utils-
|
|
86
|
+
//# sourceMappingURL=dev.utils-BNkJdELA.js.map
|