@public-ui/visual-tests 4.7.0-rc.1 → 4.7.0-rc.2
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/app/dist/assets/{Heading-Cjeak0Ip-l6cf765k.js → Heading-DfbcSYr1-hkvGuGMp.js} +2 -2
- package/app/dist/assets/{Heading-Cjeak0Ip-l6cf765k.js.map → Heading-DfbcSYr1-hkvGuGMp.js.map} +1 -1
- package/app/dist/assets/{api-lgc52EwH-DNXlGm03.js → api-f3pM5e2P-rO207r4O.js} +2 -2
- package/app/dist/assets/{api-lgc52EwH-DNXlGm03.js.map → api-f3pM5e2P-rO207r4O.js.map} +1 -1
- package/app/dist/assets/{base-DyVivWCE-CXrKcvut.js → base-BZLLDBP_-B5PspyxV.js} +2 -2
- package/app/dist/assets/{base-DyVivWCE-CXrKcvut.js.map → base-BZLLDBP_-B5PspyxV.js.map} +1 -1
- package/app/dist/assets/{base-4vZOpHqg-Bq-vokje.js → base-C2fEjsEs-DBihgXiG.js} +2 -2
- package/app/dist/assets/{base-4vZOpHqg-Bq-vokje.js.map → base-C2fEjsEs-DBihgXiG.js.map} +1 -1
- package/app/dist/assets/{base-jUFiFkFq-dN_8mxfl.js → base-CAiw2g6q-CwFyU-hb.js} +2 -2
- package/app/dist/assets/{base-jUFiFkFq-dN_8mxfl.js.map → base-CAiw2g6q-CwFyU-hb.js.map} +1 -1
- package/app/dist/assets/{base-CrFm3Vt_-Bn-OzqAS.js → base-DO6StrDI-CmNeandE.js} +2 -2
- package/app/dist/assets/{base-CrFm3Vt_-Bn-OzqAS.js.map → base-DO6StrDI-CmNeandE.js.map} +1 -1
- package/app/dist/assets/{base-web-component-Ci40K_CL-DL0kk76j.js → base-web-component-C769ZH8t-cPPBA536.js} +2 -2
- package/app/dist/assets/{base-web-component-Ci40K_CL-DL0kk76j.js.map → base-web-component-C769ZH8t-cPPBA536.js.map} +1 -1
- package/app/dist/assets/{base-web-component-BhT6Ab3x-DIOeQ_zw.js → base-web-component-D-nnAH47-BkszuhfK.js} +2 -2
- package/app/dist/assets/{base-web-component-BhT6Ab3x-DIOeQ_zw.js.map → base-web-component-D-nnAH47-BkszuhfK.js.map} +1 -1
- package/app/dist/assets/{base-web-component-puo2mSiH-C-Pj6EpS.js → base-web-component-DSLw_2co-RPD88MQa.js} +2 -2
- package/app/dist/assets/{base-web-component-puo2mSiH-C-Pj6EpS.js.map → base-web-component-DSLw_2co-RPD88MQa.js.map} +1 -1
- package/app/dist/assets/{behavior-BOUrKwXj-9_5Z59tY.js → behavior-BovfhIaw-BIOIU2F0.js} +2 -2
- package/app/dist/assets/{behavior-BOUrKwXj-9_5Z59tY.js.map → behavior-BovfhIaw-BIOIU2F0.js.map} +1 -1
- package/app/dist/assets/{behavior-BeStbAbq-CUzR4gB2.js → behavior-DYLnL5QE-DQKBoqbb.js} +2 -2
- package/app/dist/assets/{behavior-BeStbAbq-CUzR4gB2.js.map → behavior-DYLnL5QE-DQKBoqbb.js.map} +1 -1
- package/app/dist/assets/{behavior-vf9LgKnJ-CXodUWmw.js → behavior-DyENPLvO-DGaqAoa2.js} +2 -2
- package/app/dist/assets/{behavior-vf9LgKnJ-CXodUWmw.js.map → behavior-DyENPLvO-DGaqAoa2.js.map} +1 -1
- package/app/dist/assets/{color-BBs35rDv-EhzjScut.js → color-DrIG_nmX-B-kzirvX.js} +2 -2
- package/app/dist/assets/{color-BBs35rDv-EhzjScut.js.map → color-DrIG_nmX-B-kzirvX.js.map} +1 -1
- package/app/dist/assets/{component-CtnZeJ8i-D5HLUgMa.js → component-7grwjtVE-Bne87lba.js} +2 -2
- package/app/dist/assets/{component-CtnZeJ8i-D5HLUgMa.js.map → component-7grwjtVE-Bne87lba.js.map} +1 -1
- package/app/dist/assets/{component-CuBrmISS-y2zTD93G.js → component-B7e236Uf-sK8m0kGM.js} +2 -2
- package/app/dist/assets/{component-CuBrmISS-y2zTD93G.js.map → component-B7e236Uf-sK8m0kGM.js.map} +1 -1
- package/app/dist/assets/{component-C5YYCLBG-CQTUJujS.js → component-BGIg9KLW-cy_kv23G.js} +2 -2
- package/app/dist/assets/{component-C5YYCLBG-CQTUJujS.js.map → component-BGIg9KLW-cy_kv23G.js.map} +1 -1
- package/app/dist/assets/{component-DzwUKDj3-DOVMyVK-.js → component-BQiBm3SA-BT58x0B5.js} +2 -2
- package/app/dist/assets/{component-DzwUKDj3-DOVMyVK-.js.map → component-BQiBm3SA-BT58x0B5.js.map} +1 -1
- package/app/dist/assets/{component-CuPl7i5J-UNfdttL0.js → component-Bk-Y-EKp-BU6q2gBp.js} +2 -2
- package/app/dist/assets/{component-CuPl7i5J-UNfdttL0.js.map → component-Bk-Y-EKp-BU6q2gBp.js.map} +1 -1
- package/app/dist/assets/{component-ComtEOJP-D28smv3q.js → component-CKK9TPXV-rHtZKC_p.js} +2 -2
- package/app/dist/assets/{component-ComtEOJP-D28smv3q.js.map → component-CKK9TPXV-rHtZKC_p.js.map} +1 -1
- package/app/dist/assets/{component-B2hvPtlq-2rfiKZ0m.js → component-Ct6XaGql-Bp4_-5Mv.js} +2 -2
- package/app/dist/assets/{component-B2hvPtlq-2rfiKZ0m.js.map → component-Ct6XaGql-Bp4_-5Mv.js.map} +1 -1
- package/app/dist/assets/{component-CYv5K14M-BqPovx0E.js → component-Czeo2c92-3ugxAsTp.js} +2 -2
- package/app/dist/assets/{component-CYv5K14M-BqPovx0E.js.map → component-Czeo2c92-3ugxAsTp.js.map} +1 -1
- package/app/dist/assets/{component-BGqaexiY-BQap9aLN.js → component-D-csVfVM-CavNnyAw.js} +2 -2
- package/app/dist/assets/{component-BGqaexiY-BQap9aLN.js.map → component-D-csVfVM-CavNnyAw.js.map} +1 -1
- package/app/dist/assets/{component-8rE7KeIV-Bl1rq2LH.js → component-Es4GrM0p-C0Gxe95y.js} +2 -2
- package/app/dist/assets/{component-8rE7KeIV-Bl1rq2LH.js.map → component-Es4GrM0p-C0Gxe95y.js.map} +1 -1
- package/app/dist/assets/{component-C3fJM1FJ-BkH-jjr9.js → component-JcfUpNY4-B6kEYg3R.js} +2 -2
- package/app/dist/assets/{component-C3fJM1FJ-BkH-jjr9.js.map → component-JcfUpNY4-B6kEYg3R.js.map} +1 -1
- package/app/dist/assets/{contrast-DiGJSn0q-DrezeyLP.js → contrast-BoHvquvk-BE48IFhz.js} +2 -2
- package/app/dist/assets/{contrast-DiGJSn0q-DrezeyLP.js.map → contrast-BoHvquvk-BE48IFhz.js.map} +1 -1
- package/app/dist/assets/{controller-BNVDUbSt-CwZyzwzg.js → controller-BNVDUbSt-DAufZkpW.js} +2 -2
- package/app/dist/assets/{controller-BNVDUbSt-CwZyzwzg.js.map → controller-BNVDUbSt-DAufZkpW.js.map} +1 -1
- package/app/dist/assets/{dev.utils-CS2a1Xpz-C_7adRy7.js → dev.utils-DMRf5JjT-CtlEcXbM.js} +2 -2
- package/app/dist/assets/{dev.utils-CS2a1Xpz-C_7adRy7.js.map → dev.utils-DMRf5JjT-CtlEcXbM.js.map} +1 -1
- package/app/dist/assets/{devtools-DDKKBFlN-BWkGnhAW.js → devtools-CamdFNe4-C_xacNnY.js} +2 -2
- package/app/dist/assets/{devtools-DDKKBFlN-BWkGnhAW.js.map → devtools-CamdFNe4-C_xacNnY.js.map} +1 -1
- package/app/dist/assets/disabled-CdKj9w5_-DpwzAVGu.js +2 -0
- package/app/dist/assets/{disabled-CnKpxKzf-DFZ-AIbf.js.map → disabled-CdKj9w5_-DpwzAVGu.js.map} +1 -1
- package/app/dist/assets/{field-control-BRw1DpB2-0Z-9kyy6.js → field-control-BMteajxV-hEZpi01w.js} +2 -2
- package/app/dist/assets/{field-control-BRw1DpB2-0Z-9kyy6.js.map → field-control-BMteajxV-hEZpi01w.js.map} +1 -1
- package/app/dist/assets/{group-CeF4yHhL-DEC-2A6O.js → group-BPEmIDN4-CkUs9UZd.js} +2 -2
- package/app/dist/assets/{group-CeF4yHhL-DEC-2A6O.js.map → group-BPEmIDN4-CkUs9UZd.js.map} +1 -1
- package/app/dist/assets/has-closer-B9e9tMlR-X78OIQv_.js +2 -0
- package/app/dist/assets/{has-closer-DYgccfEw-CaQgGdIg.js.map → has-closer-B9e9tMlR-X78OIQv_.js.map} +1 -1
- package/app/dist/assets/href-TXzKfQ81-BHVYZjYl.js +2 -0
- package/app/dist/assets/{href-BJ2DdiWo-0WjAyxJ_.js.map → href-TXzKfQ81-BHVYZjYl.js.map} +1 -1
- package/app/dist/assets/i18n-DsSD0Coa-CfeJN1DK.js +2 -0
- package/app/dist/assets/{i18n-DsSD0Coa-YI4F_rrz.js.map → i18n-DsSD0Coa-CfeJN1DK.js.map} +1 -1
- package/app/dist/assets/id-Cs_hOKCc-C4zDg6rm.js +2 -0
- package/app/dist/assets/{id-BBQitGSa-BpFuwqrc.js.map → id-Cs_hOKCc-C4zDg6rm.js.map} +1 -1
- package/app/dist/assets/{index-BFGAlyrC-Cj-T6hZA.js → index-CDhvlzPX-C15eU4TR.js} +3 -3
- package/app/dist/assets/{index-BFGAlyrC-Cj-T6hZA.js.map → index-CDhvlzPX-C15eU4TR.js.map} +1 -1
- package/app/dist/assets/{index-CSCK-Kvc.js → index-ollAPB5g.js} +5 -5
- package/app/dist/assets/{index-CSCK-Kvc.js.map → index-ollAPB5g.js.map} +1 -1
- package/app/dist/assets/{input-Br0RXmck-DC28qR7L.js → input-DI2AS5HG-CfnjTIDq.js} +2 -2
- package/app/dist/assets/{input-Br0RXmck-DC28qR7L.js.map → input-DI2AS5HG-CfnjTIDq.js.map} +1 -1
- package/app/dist/assets/{input-container-C8HGQnts-C5NaVTsf.js → input-container-DfzdQhVw-BUNs3bhp.js} +2 -2
- package/app/dist/assets/{input-container-C8HGQnts-C5NaVTsf.js.map → input-container-DfzdQhVw-BUNs3bhp.js.map} +1 -1
- package/app/dist/assets/{item-BHmWBVJU-BL34446u.js → item-BhvSqe26-Bw14Zdvy.js} +2 -2
- package/app/dist/assets/{item-BHmWBVJU-BL34446u.js.map → item-BhvSqe26-Bw14Zdvy.js.map} +1 -1
- package/app/dist/assets/{item-D-uF2_uB-cxLj5ZG6.js → item-CEvddUid-nvFeQSil.js} +2 -2
- package/app/dist/assets/{item-D-uF2_uB-cxLj5ZG6.js.map → item-CEvddUid-nvFeQSil.js.map} +1 -1
- package/app/dist/assets/{item-CKABE_5V-MFaR23-O.js → item-_bWdYrNO-BNtzhmjX.js} +2 -2
- package/app/dist/assets/{item-CKABE_5V-MFaR23-O.js.map → item-_bWdYrNO-BNtzhmjX.js.map} +1 -1
- package/app/dist/assets/{item-C0BsuFnx-DmIAMJDU.js → item-gyj9rJs6-CJEIXItt.js} +2 -2
- package/app/dist/assets/{item-C0BsuFnx-DmIAMJDU.js.map → item-gyj9rJs6-CJEIXItt.js.map} +1 -1
- package/app/dist/assets/{kol-abbr.entry-7NoWVUbG.js → kol-abbr.entry-GD3vINZj.js} +2 -2
- package/app/dist/assets/{kol-abbr.entry-7NoWVUbG.js.map → kol-abbr.entry-GD3vINZj.js.map} +1 -1
- package/app/dist/assets/{kol-accordion.entry-CCJpyL-1.js → kol-accordion.entry-IdZzlXbl.js} +2 -2
- package/app/dist/assets/{kol-accordion.entry-CCJpyL-1.js.map → kol-accordion.entry-IdZzlXbl.js.map} +1 -1
- package/app/dist/assets/{kol-alert.entry-BvNEow_G.js → kol-alert.entry-B6mrLB6F.js} +2 -2
- package/app/dist/assets/{kol-alert.entry-BvNEow_G.js.map → kol-alert.entry-B6mrLB6F.js.map} +1 -1
- package/app/dist/assets/{kol-avatar.entry-Bp-XZjrj.js → kol-avatar.entry-Bloz36Ss.js} +2 -2
- package/app/dist/assets/{kol-avatar.entry-Bp-XZjrj.js.map → kol-avatar.entry-Bloz36Ss.js.map} +1 -1
- package/app/dist/assets/{kol-badge.entry-DkvT_7y2.js → kol-badge.entry-a77jfR1U.js} +2 -2
- package/app/dist/assets/{kol-badge.entry-DkvT_7y2.js.map → kol-badge.entry-a77jfR1U.js.map} +1 -1
- package/app/dist/assets/{kol-breadcrumb.entry-DNWPtkwa.js → kol-breadcrumb.entry-DncKzx5W.js} +2 -2
- package/app/dist/assets/{kol-breadcrumb.entry-DNWPtkwa.js.map → kol-breadcrumb.entry-DncKzx5W.js.map} +1 -1
- package/app/dist/assets/{kol-button-link.entry-Dw3UcOSH.js → kol-button-link.entry-DJteqLIA.js} +2 -2
- package/app/dist/assets/{kol-button-link.entry-Dw3UcOSH.js.map → kol-button-link.entry-DJteqLIA.js.map} +1 -1
- package/app/dist/assets/{kol-button.entry-DHfD_B_1.js → kol-button.entry-DY0dczR9.js} +2 -2
- package/app/dist/assets/{kol-button.entry-DHfD_B_1.js.map → kol-button.entry-DY0dczR9.js.map} +1 -1
- package/app/dist/assets/{kol-card.entry-CmdK4s6A.js → kol-card.entry-BUxsULiX.js} +2 -2
- package/app/dist/assets/{kol-card.entry-CmdK4s6A.js.map → kol-card.entry-BUxsULiX.js.map} +1 -1
- package/app/dist/assets/{kol-combobox.entry-CN4gXkh5.js → kol-combobox.entry-B7h5coKG.js} +2 -2
- package/app/dist/assets/{kol-combobox.entry-CN4gXkh5.js.map → kol-combobox.entry-B7h5coKG.js.map} +1 -1
- package/app/dist/assets/{kol-details.entry-CIFZOGeL.js → kol-details.entry-Bzu_ym6M.js} +2 -2
- package/app/dist/assets/{kol-details.entry-CIFZOGeL.js.map → kol-details.entry-Bzu_ym6M.js.map} +1 -1
- package/app/dist/assets/{kol-dialog.entry-RR4vCpUS.js → kol-dialog.entry-njppZ3Uk.js} +2 -2
- package/app/dist/assets/{kol-dialog.entry-RR4vCpUS.js.map → kol-dialog.entry-njppZ3Uk.js.map} +1 -1
- package/app/dist/assets/{kol-drawer.entry-Kn2WeN6j.js → kol-drawer.entry-BtY4oBLd.js} +2 -2
- package/app/dist/assets/{kol-drawer.entry-Kn2WeN6j.js.map → kol-drawer.entry-BtY4oBLd.js.map} +1 -1
- package/app/dist/assets/{kol-form.entry-yGlA05Mm.js → kol-form.entry-H5u3RBFB.js} +2 -2
- package/app/dist/assets/{kol-form.entry-yGlA05Mm.js.map → kol-form.entry-H5u3RBFB.js.map} +1 -1
- package/app/dist/assets/{kol-heading.entry-SmAdSBa2.js → kol-heading.entry-DuWs63H_.js} +2 -2
- package/app/dist/assets/{kol-heading.entry-SmAdSBa2.js.map → kol-heading.entry-DuWs63H_.js.map} +1 -1
- package/app/dist/assets/{kol-icon.entry-CVReedVc.js → kol-icon.entry-U_sbWj8U.js} +2 -2
- package/app/dist/assets/{kol-icon.entry-CVReedVc.js.map → kol-icon.entry-U_sbWj8U.js.map} +1 -1
- package/app/dist/assets/{kol-image.entry-CL1v6Nt1.js → kol-image.entry-uNqEwUxR.js} +2 -2
- package/app/dist/assets/{kol-image.entry-CL1v6Nt1.js.map → kol-image.entry-uNqEwUxR.js.map} +1 -1
- package/app/dist/assets/{kol-input-checkbox.entry-yNi77wHR.js → kol-input-checkbox.entry-B6yRXbz3.js} +2 -2
- package/app/dist/assets/{kol-input-checkbox.entry-yNi77wHR.js.map → kol-input-checkbox.entry-B6yRXbz3.js.map} +1 -1
- package/app/dist/assets/{kol-input-color.entry-DhciJ9_o.js → kol-input-color.entry-D6KGMgsD.js} +2 -2
- package/app/dist/assets/{kol-input-color.entry-DhciJ9_o.js.map → kol-input-color.entry-D6KGMgsD.js.map} +1 -1
- package/app/dist/assets/{kol-input-date.entry-7o3IpoBO.js → kol-input-date.entry-DSm9gFl2.js} +2 -2
- package/app/dist/assets/{kol-input-date.entry-7o3IpoBO.js.map → kol-input-date.entry-DSm9gFl2.js.map} +1 -1
- package/app/dist/assets/{kol-input-email.entry-Dn1amAjm.js → kol-input-email.entry-D-qD3vMr.js} +2 -2
- package/app/dist/assets/{kol-input-email.entry-Dn1amAjm.js.map → kol-input-email.entry-D-qD3vMr.js.map} +1 -1
- package/app/dist/assets/{kol-input-file.entry-D2EJ7_xh.js → kol-input-file.entry-CidI8Az9.js} +2 -2
- package/app/dist/assets/{kol-input-file.entry-D2EJ7_xh.js.map → kol-input-file.entry-CidI8Az9.js.map} +1 -1
- package/app/dist/assets/{kol-input-number.entry-8UpVJCOn.js → kol-input-number.entry-D4WRTKn9.js} +2 -2
- package/app/dist/assets/{kol-input-number.entry-8UpVJCOn.js.map → kol-input-number.entry-D4WRTKn9.js.map} +1 -1
- package/app/dist/assets/{kol-input-password.entry-DdEhnW1k.js → kol-input-password.entry-XiNO1lHN.js} +2 -2
- package/app/dist/assets/{kol-input-password.entry-DdEhnW1k.js.map → kol-input-password.entry-XiNO1lHN.js.map} +1 -1
- package/app/dist/assets/{kol-input-radio.entry-CVh8Pcpe.js → kol-input-radio.entry-BgbBcptr.js} +2 -2
- package/app/dist/assets/{kol-input-radio.entry-CVh8Pcpe.js.map → kol-input-radio.entry-BgbBcptr.js.map} +1 -1
- package/app/dist/assets/{kol-input-range.entry-BGEbt_lW.js → kol-input-range.entry-CxnubVZ7.js} +2 -2
- package/app/dist/assets/{kol-input-range.entry-BGEbt_lW.js.map → kol-input-range.entry-CxnubVZ7.js.map} +1 -1
- package/app/dist/assets/{kol-input-text.entry-BKVAuBHr.js → kol-input-text.entry-CC6dDXPC.js} +2 -2
- package/app/dist/assets/{kol-input-text.entry-BKVAuBHr.js.map → kol-input-text.entry-CC6dDXPC.js.map} +1 -1
- package/app/dist/assets/{kol-kolibri.entry-CF_pmaNd.js → kol-kolibri.entry-mRcQ3YNx.js} +2 -2
- package/app/dist/assets/{kol-kolibri.entry-CF_pmaNd.js.map → kol-kolibri.entry-mRcQ3YNx.js.map} +1 -1
- package/app/dist/assets/{kol-link-button.entry-D_BJT_nw.js → kol-link-button.entry-C9XzAlu4.js} +2 -2
- package/app/dist/assets/{kol-link-button.entry-D_BJT_nw.js.map → kol-link-button.entry-C9XzAlu4.js.map} +1 -1
- package/app/dist/assets/{kol-link.entry-DGnEsRja.js → kol-link.entry-CpLkkFDf.js} +2 -2
- package/app/dist/assets/{kol-link.entry-DGnEsRja.js.map → kol-link.entry-CpLkkFDf.js.map} +1 -1
- package/app/dist/assets/{kol-meter.entry-ccA-wSVG.js → kol-meter.entry-BW1O_iN6.js} +2 -2
- package/app/dist/assets/{kol-meter.entry-ccA-wSVG.js.map → kol-meter.entry-BW1O_iN6.js.map} +1 -1
- package/app/dist/assets/{kol-modal.entry-DQBRyjZp.js → kol-modal.entry-8JeaejyA.js} +2 -2
- package/app/dist/assets/{kol-modal.entry-DQBRyjZp.js.map → kol-modal.entry-8JeaejyA.js.map} +1 -1
- package/app/dist/assets/{kol-nav.entry-CuwX00-O.js → kol-nav.entry-ERg3IX6e.js} +2 -2
- package/app/dist/assets/{kol-nav.entry-CuwX00-O.js.map → kol-nav.entry-ERg3IX6e.js.map} +1 -1
- package/app/dist/assets/{kol-pagination.entry-D11YogxY.js → kol-pagination.entry-DjMAiM2s.js} +2 -2
- package/app/dist/assets/{kol-pagination.entry-D11YogxY.js.map → kol-pagination.entry-DjMAiM2s.js.map} +1 -1
- package/app/dist/assets/{kol-popover-button.entry-hVNaDWRR.js → kol-popover-button.entry-2V0C4HXF.js} +2 -2
- package/app/dist/assets/{kol-popover-button.entry-hVNaDWRR.js.map → kol-popover-button.entry-2V0C4HXF.js.map} +1 -1
- package/app/dist/assets/{kol-progress.entry-BsS7wAL6.js → kol-progress.entry-Ci-DCdGF.js} +2 -2
- package/app/dist/assets/{kol-progress.entry-BsS7wAL6.js.map → kol-progress.entry-Ci-DCdGF.js.map} +1 -1
- package/app/dist/assets/{kol-quote.entry-CLX9-x_7.js → kol-quote.entry-CJXuZ8zd.js} +2 -2
- package/app/dist/assets/{kol-quote.entry-CLX9-x_7.js.map → kol-quote.entry-CJXuZ8zd.js.map} +1 -1
- package/app/dist/assets/{kol-select.entry-BqRqJS97.js → kol-select.entry-CjsN-7Ut.js} +2 -2
- package/app/dist/assets/{kol-select.entry-BqRqJS97.js.map → kol-select.entry-CjsN-7Ut.js.map} +1 -1
- package/app/dist/assets/{kol-single-select.entry-FqvSbmPJ.js → kol-single-select.entry-BRLstTlN.js} +2 -2
- package/app/dist/assets/{kol-single-select.entry-FqvSbmPJ.js.map → kol-single-select.entry-BRLstTlN.js.map} +1 -1
- package/app/dist/assets/{kol-skip-nav.entry-eOaitwvu.js → kol-skip-nav.entry-lPlnQlXa.js} +2 -2
- package/app/dist/assets/{kol-skip-nav.entry-eOaitwvu.js.map → kol-skip-nav.entry-lPlnQlXa.js.map} +1 -1
- package/app/dist/assets/{kol-spin.entry-CrMTDbNM.js → kol-spin.entry-Kwgf9R2M.js} +2 -2
- package/app/dist/assets/{kol-spin.entry-CrMTDbNM.js.map → kol-spin.entry-Kwgf9R2M.js.map} +1 -1
- package/app/dist/assets/{kol-split-button.entry-B-1AtPQF.js → kol-split-button.entry-CqeKEuCu.js} +2 -2
- package/app/dist/assets/{kol-split-button.entry-B-1AtPQF.js.map → kol-split-button.entry-CqeKEuCu.js.map} +1 -1
- package/app/dist/assets/{kol-table-stateful.entry-DHo96-jj.js → kol-table-stateful.entry-C47EomD3.js} +2 -2
- package/app/dist/assets/{kol-table-stateful.entry-DHo96-jj.js.map → kol-table-stateful.entry-C47EomD3.js.map} +1 -1
- package/app/dist/assets/{kol-table-stateless.entry-DBW5p7q9.js → kol-table-stateless.entry-uKVL1_j1.js} +2 -2
- package/app/dist/assets/{kol-table-stateless.entry-DBW5p7q9.js.map → kol-table-stateless.entry-uKVL1_j1.js.map} +1 -1
- package/app/dist/assets/{kol-tabs.entry-BOUXxs9k.js → kol-tabs.entry-DZQvHAC7.js} +2 -2
- package/app/dist/assets/{kol-tabs.entry-BOUXxs9k.js.map → kol-tabs.entry-DZQvHAC7.js.map} +1 -1
- package/app/dist/assets/{kol-textarea.entry-Cee3v3BS.js → kol-textarea.entry-DIV3PXQw.js} +2 -2
- package/app/dist/assets/{kol-textarea.entry-Cee3v3BS.js.map → kol-textarea.entry-DIV3PXQw.js.map} +1 -1
- package/app/dist/assets/{kol-toast-container.entry-BsU2Kd89.js → kol-toast-container.entry-CekVpD1X.js} +2 -2
- package/app/dist/assets/{kol-toast-container.entry-BsU2Kd89.js.map → kol-toast-container.entry-CekVpD1X.js.map} +1 -1
- package/app/dist/assets/{kol-toolbar.entry-BQcBkneb.js → kol-toolbar.entry-mOyWjP8G.js} +2 -2
- package/app/dist/assets/{kol-toolbar.entry-BQcBkneb.js.map → kol-toolbar.entry-mOyWjP8G.js.map} +1 -1
- package/app/dist/assets/{kol-tooltip-wc.entry-BiCz2shC.js → kol-tooltip-wc.entry-QbANpUnR.js} +2 -2
- package/app/dist/assets/{kol-tooltip-wc.entry-BiCz2shC.js.map → kol-tooltip-wc.entry-QbANpUnR.js.map} +1 -1
- package/app/dist/assets/{kol-tree-item.entry-BUb_z4wl.js → kol-tree-item.entry-HeekBVM6.js} +2 -2
- package/app/dist/assets/{kol-tree-item.entry-BUb_z4wl.js.map → kol-tree-item.entry-HeekBVM6.js.map} +1 -1
- package/app/dist/assets/{kol-tree.entry-gyHRVeAb.js → kol-tree.entry-CjF3dWUA.js} +2 -2
- package/app/dist/assets/{kol-tree.entry-gyHRVeAb.js.map → kol-tree.entry-CjF3dWUA.js.map} +1 -1
- package/app/dist/assets/{kol-version.entry-DLVrr-cP.js → kol-version.entry-Dxnqe9Nc.js} +2 -2
- package/app/dist/assets/{kol-version.entry-DLVrr-cP.js.map → kol-version.entry-Dxnqe9Nc.js.map} +1 -1
- package/app/dist/assets/kolicons/kolicons.eot +0 -0
- package/app/dist/assets/kolicons/kolicons.ttf +0 -0
- package/app/dist/assets/kolicons/kolicons.woff +0 -0
- package/app/dist/assets/kolicons/kolicons.woff2 +0 -0
- package/app/dist/assets/kolicons/style.css +6 -6
- package/app/dist/assets/label-CcS9aK12-BhJ_uCMM.js +2 -0
- package/app/dist/assets/{label-DQC6csvN-CeQglEsV.js.map → label-CcS9aK12-BhJ_uCMM.js.map} +1 -1
- package/app/dist/assets/{label-hints-Y3Zh7X3N-DtM1NNMd.js → label-hints-ByT9nR7S-DHZPt0nm.js} +2 -2
- package/app/dist/assets/{label-hints-Y3Zh7X3N-DtM1NNMd.js.map → label-hints-ByT9nR7S-DHZPt0nm.js.map} +1 -1
- package/app/dist/assets/label-lang-segment-C730E0Jv-CkgDXpRD.js +2 -0
- package/app/dist/assets/{label-lang-segment-BnLCd3lO-C25RVF8w.js.map → label-lang-segment-C730E0Jv-CkgDXpRD.js.map} +1 -1
- package/app/dist/assets/label-with-expert-slot-BBxRu-yu-CbZJ8nhg.js +2 -0
- package/app/dist/assets/{label-with-expert-slot-BxbzJ0aJ-fXD3CaUK.js.map → label-with-expert-slot-BBxRu-yu-CbZJ8nhg.js.map} +1 -1
- package/app/dist/assets/level-H37JTm3T-DJN3mITV.js +2 -0
- package/app/dist/assets/{level-BaaaBkKR-qK3Ay4pt.js.map → level-H37JTm3T-DJN3mITV.js.map} +1 -1
- package/app/dist/assets/link-target-BR1vXqdX-BU7RLOyS.js +2 -0
- package/app/dist/assets/{link-target-BgH0UuzW-1SqD4umn.js.map → link-target-BR1vXqdX-BU7RLOyS.js.map} +1 -1
- package/app/dist/assets/links-x0ZvYePh-DemgQsCX.js +2 -0
- package/app/dist/assets/{links-DnB1I1Gi-C71VPPKa.js.map → links-x0ZvYePh-DemgQsCX.js.map} +1 -1
- package/app/dist/assets/multiple-D5iEtXdP-DGSz8ad3.js +2 -0
- package/app/dist/assets/{multiple-CoXuIBC5-I2X6YAaL.js.map → multiple-D5iEtXdP-DGSz8ad3.js.map} +1 -1
- package/app/dist/assets/{number-value-MjxRVb0R-DMEybxRC.js → number-value-DvlslHWo-CkWzYlPU.js} +2 -2
- package/app/dist/assets/{number-value-MjxRVb0R-DMEybxRC.js.map → number-value-DvlslHWo-CkWzYlPU.js.map} +1 -1
- package/app/dist/assets/open-IfsmxIWn-CeejK7AX.js +2 -0
- package/app/dist/assets/{open-DBrDqNNt-D6lUlLcz.js.map → open-IfsmxIWn-CeejK7AX.js.map} +1 -1
- package/app/dist/assets/{options-CQrFWcRm-8sgLb97x.js → options-BxKmgvrJ-dvyYFAGc.js} +2 -2
- package/app/dist/assets/{options-CQrFWcRm-8sgLb97x.js.map → options-BxKmgvrJ-dvyYFAGc.js.map} +1 -1
- package/app/dist/assets/{orientation-Dd57TF4f-DfjB7yGT.js → orientation-N_QdffiA-Bj5FYzmt.js} +2 -2
- package/app/dist/assets/{orientation-Dd57TF4f-DfjB7yGT.js.map → orientation-N_QdffiA-Bj5FYzmt.js.map} +1 -1
- package/app/dist/assets/placeholder-CryghV7Z-Dc2sfCJU.js +2 -0
- package/app/dist/assets/{placeholder-C2TRH0yn-BVlUyjCk.js.map → placeholder-CryghV7Z-Dc2sfCJU.js.map} +1 -1
- package/app/dist/assets/{props-from-config-B_k4h7ak-Dgu2bHql.js → props-from-config-Dr6e6ZFX-CebT1iS4.js} +2 -2
- package/app/dist/assets/{props-from-config-B_k4h7ak-Dgu2bHql.js.map → props-from-config-Dr6e6ZFX-CebT1iS4.js.map} +1 -1
- package/app/dist/assets/read-only-ChTNFbZu-CB4KehIR.js +2 -0
- package/app/dist/assets/{read-only-Do20HzKS-CfFtcZsU.js.map → read-only-ChTNFbZu-CB4KehIR.js.map} +1 -1
- package/app/dist/assets/required-DZEEGwp_-CgUf_TuS.js +2 -0
- package/app/dist/assets/{required-DBer2Rxa-DnERkc26.js.map → required-DZEEGwp_-CgUf_TuS.js.map} +1 -1
- package/app/dist/assets/{resolve-props-DUtwGFZS-8sQ-DWU_.js → resolve-props-B1oMATDM-CB8ayYMJ.js} +2 -2
- package/app/dist/assets/{resolve-props-DUtwGFZS-8sQ-DWU_.js.map → resolve-props-B1oMATDM-CB8ayYMJ.js.map} +1 -1
- package/app/dist/assets/{resolve-props-BzL6wFWn-CbE_fpn_.js → resolve-props-sxJz-gH0-DrDRJuM4.js} +2 -2
- package/app/dist/assets/{resolve-props-BzL6wFWn-CbE_fpn_.js.map → resolve-props-sxJz-gH0-DrDRJuM4.js.map} +1 -1
- package/app/dist/assets/rows-AgQ8uPMY-C5yFdEc8.js +2 -0
- package/app/dist/assets/{rows-CA8QgHMZ-CL5ZRz3o.js.map → rows-AgQ8uPMY-C5yFdEc8.js.map} +1 -1
- package/app/dist/assets/{scroll-lock-Ch4ulFTS-D8-Qt6XO.js → scroll-lock-D8mE1Qrf-jRr-dU4u.js} +2 -2
- package/app/dist/assets/{scroll-lock-Ch4ulFTS-D8-Qt6XO.js.map → scroll-lock-D8mE1Qrf-jRr-dU4u.js.map} +1 -1
- package/app/dist/assets/smart-button-Dqwbv5bn-CIv4K1OR.js +2 -0
- package/app/dist/assets/{smart-button-BB671N1B-CgNYQf2M.js.map → smart-button-Dqwbv5bn-CIv4K1OR.js.map} +1 -1
- package/app/dist/assets/spell-check-gr1q8Bdb-Dhshhfcn.js +2 -0
- package/app/dist/assets/{spell-check-F1_tx4iu-OCFLHBVy.js.map → spell-check-gr1q8Bdb-Dhshhfcn.js.map} +1 -1
- package/app/dist/assets/src-C-0XY9Li-C1lcEMbM.js +2 -0
- package/app/dist/assets/{src-CkojG2tS-COvi1Gs6.js.map → src-C-0XY9Li-C1lcEMbM.js.map} +1 -1
- package/app/dist/assets/step-D9PVBxIg-BBpg9LZD.js +2 -0
- package/app/dist/assets/{step-CTjZRMNh-C3B8nBev.js.map → step-D9PVBxIg-BBpg9LZD.js.map} +1 -1
- package/app/dist/assets/{suggestions-By7hmqB7-DyhNRgpB.js → suggestions-N2Hsp7F8-BRVEFAVu.js} +2 -2
- package/app/dist/assets/{suggestions-By7hmqB7-DyhNRgpB.js.map → suggestions-N2Hsp7F8-BRVEFAVu.js.map} +1 -1
- package/app/dist/assets/{suggestions-G70JmX5_-Ca7JW6r2.js → suggestions-q46Ydaz7-7OTnj_Rk.js} +2 -2
- package/app/dist/assets/{suggestions-G70JmX5_-Ca7JW6r2.js.map → suggestions-q46Ydaz7-7OTnj_Rk.js.map} +1 -1
- package/app/dist/assets/test-component.entry-ylvfMrwn.js +2 -0
- package/app/dist/assets/{test-component.entry-Q4tqdHK3.js.map → test-component.entry-ylvfMrwn.js.map} +1 -1
- package/app/dist/assets/{toggle-handler-Cx8yn4d5-AsBurR1d.js → toggle-handler-DiBEk7dP-DRw3A3dk.js} +2 -2
- package/app/dist/assets/{toggle-handler-Cx8yn4d5-AsBurR1d.js.map → toggle-handler-DiBEk7dP-DRw3A3dk.js.map} +1 -1
- package/app/dist/assets/unique-nav-labels-CF4Bfm0E-Ca-__I2o.js +2 -0
- package/app/dist/assets/{unique-nav-labels-Civ833r0-Ck8il0Wh.js.map → unique-nav-labels-CF4Bfm0E-Ca-__I2o.js.map} +1 -1
- package/app/dist/assets/unit-CHCinv6L-BAQYafx9.js +2 -0
- package/app/dist/assets/{unit-JYCI5y5--hPPPNHc6.js.map → unit-CHCinv6L-BAQYafx9.js.map} +1 -1
- package/app/dist/assets/{validators-CAtXsuiZ-B7HtdUtI.js → validators-D7aXOHHZ-Co0DeTxn.js} +2 -2
- package/app/dist/assets/{validators-CAtXsuiZ-B7HtdUtI.js.map → validators-D7aXOHHZ-Co0DeTxn.js.map} +1 -1
- package/app/dist/assets/value-string-DBJI1SMK-BfqFvgjh.js +2 -0
- package/app/dist/assets/value-string-DBJI1SMK-BfqFvgjh.js.map +1 -0
- package/app/dist/assets/{width-BikKpAHu-DINpaWtP.js → width-DiDx_9EO-sJwVb15T.js} +2 -2
- package/app/dist/assets/{width-BikKpAHu-DINpaWtP.js.map → width-DiDx_9EO-sJwVb15T.js.map} +1 -1
- package/app/dist/index.html +2 -2
- package/app/public/assets/kolicons/kolicons.eot +0 -0
- package/app/public/assets/kolicons/kolicons.ttf +0 -0
- package/app/public/assets/kolicons/kolicons.woff +0 -0
- package/app/public/assets/kolicons/kolicons.woff2 +0 -0
- package/app/public/assets/kolicons/style.css +6 -6
- package/package.json +5 -5
- package/app/dist/assets/disabled-CnKpxKzf-DFZ-AIbf.js +0 -2
- package/app/dist/assets/has-closer-DYgccfEw-CaQgGdIg.js +0 -2
- package/app/dist/assets/href-BJ2DdiWo-0WjAyxJ_.js +0 -2
- package/app/dist/assets/i18n-DsSD0Coa-YI4F_rrz.js +0 -2
- package/app/dist/assets/id-BBQitGSa-BpFuwqrc.js +0 -2
- package/app/dist/assets/label-DQC6csvN-CeQglEsV.js +0 -2
- package/app/dist/assets/label-lang-segment-BnLCd3lO-C25RVF8w.js +0 -2
- package/app/dist/assets/label-with-expert-slot-BxbzJ0aJ-fXD3CaUK.js +0 -2
- package/app/dist/assets/level-BaaaBkKR-qK3Ay4pt.js +0 -2
- package/app/dist/assets/link-target-BgH0UuzW-1SqD4umn.js +0 -2
- package/app/dist/assets/links-DnB1I1Gi-C71VPPKa.js +0 -2
- package/app/dist/assets/multiple-CoXuIBC5-I2X6YAaL.js +0 -2
- package/app/dist/assets/open-DBrDqNNt-D6lUlLcz.js +0 -2
- package/app/dist/assets/placeholder-C2TRH0yn-BVlUyjCk.js +0 -2
- package/app/dist/assets/read-only-Do20HzKS-CfFtcZsU.js +0 -2
- package/app/dist/assets/required-DBer2Rxa-DnERkc26.js +0 -2
- package/app/dist/assets/rows-CA8QgHMZ-CL5ZRz3o.js +0 -2
- package/app/dist/assets/smart-button-BB671N1B-CgNYQf2M.js +0 -2
- package/app/dist/assets/spell-check-F1_tx4iu-OCFLHBVy.js +0 -2
- package/app/dist/assets/src-CkojG2tS-COvi1Gs6.js +0 -2
- package/app/dist/assets/step-CTjZRMNh-C3B8nBev.js +0 -2
- package/app/dist/assets/test-component.entry-Q4tqdHK3.js +0 -2
- package/app/dist/assets/unique-nav-labels-Civ833r0-Ck8il0Wh.js +0 -2
- package/app/dist/assets/unit-JYCI5y5--hPPPNHc6.js +0 -2
- package/app/dist/assets/value-string-Dz7Sa2ex-CJ6ObSKU.js +0 -2
- package/app/dist/assets/value-string-Dz7Sa2ex-CJ6ObSKU.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-web-component-Ci40K_CL-DL0kk76j.js","names":["parseJson","a11yHint","h","shortKeyProp","variantProp","accessKeyProp","tabIndexProp","getInputAdornments","horizontalIconsProp","InputContainerFC","clsx","hasEnoughReadableChars","createPropDefinition","containsOnlyNumbers","getBlockBem","multipleProp","requiredProp","rowsProp","formFieldBasePropsConfig","isMsgDefinedAndInputTouched","FormFieldFC","getDefaultInputProps","getMsgType","BaseFormFieldWebComponent","validateAccessAndShortKey","fillKeyOptionMap","__rest","validateInputSelectOptions","option","item","normalizeOptionsWithOptgroup","parsed","value","optionsWithOptgroupProp","selectValueProp","selectPropsConfig","selectBem","SelectOptionFC","classNames","_a","other","isSelected","selected","selectedValue","disabled","index","label","SelectOptionListFC","options","Fragment","key","preKey","isOptgroupDisabled","OptionGroupProps","OptionProps","SelectFC","props","selectProps","required","touched","msg","assertSelectValueMatchesMultiplicity","isArray","multiple","source","flattenSelectOptions","entry","groupDisabled","normalizeSelectValue","flatOptions","optionValues","filtered","firstEnabled","BaseSelectWebComponent","selectedValues","event","singleValue","v","setValue","normalized","list","shortKey","hasError"],"sources":["../../../../../components/dist/esm/base-web-component-Ci40K_CL.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { q as a11yHint, p as parseJson } from './prop.validators-kX7xC6qj.js';\nimport { a as accessKeyProp, d as shortKeyProp, t as tabIndexProp, v as variantProp } from './component-BGqaexiY.js';\nimport { h as horizontalIconsProp, g as getInputAdornments, I as InputContainerFC } from './input-container-C8HGQnts.js';\nimport { o as hasEnoughReadableChars, p as containsOnlyNumbers, c as createPropDefinition, g as getBlockBem, e as clsx } from './props-from-config-B_k4h7ak.js';\nimport { m as multipleProp } from './multiple-CoXuIBC5.js';\nimport { r as requiredProp } from './required-DBer2Rxa.js';\nimport { r as rowsProp } from './rows-CA8QgHMZ.js';\nimport { f as formFieldBasePropsConfig, i as isMsgDefinedAndInputTouched, g as getMsgType, c as getDefaultInputProps, B as BaseFormFieldWebComponent, F as FormFieldFC } from './api-lgc52EwH.js';\nimport { h, F as Fragment } from './index-BFGAlyrC.js';\nimport { v as validateAccessAndShortKey } from './access-and-short-key-ijzCZfHm.js';\nimport { f as fillKeyOptionMap } from './options-B0rBHetL.js';\nimport { a as __rest } from './tslib.es6-QNbPBOk5.js';\n\nconst validateInputSelectOptions = (option) => {\n if (typeof option === 'object' && option !== null) {\n if (typeof option.label === 'string' && option.label.length > 0) {\n option.disabled = option.disabled === true;\n option.label = `${option.label}`.trim();\n if (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n a11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n }\n if (Array.isArray(option.options)) {\n return (option.options.find((item) => {\n return validateInputSelectOptions(item) === false;\n }) === undefined);\n }\n return true;\n }\n else if (typeof option.label === 'number') {\n return true;\n }\n }\n return false;\n};\n\nfunction normalizeOptionsWithOptgroup(value) {\n const parsed = typeof value === 'string' ? parseJson(value) : value;\n if (Array.isArray(parsed) && parsed.every((option) => validateInputSelectOptions(option))) {\n return parsed;\n }\n throw new Error('Invalid select options');\n}\nconst optionsWithOptgroupProp = createPropDefinition('options', [], normalizeOptionsWithOptgroup);\n\nconst selectValueProp = createPropDefinition('value', [], (value) => Array.isArray(value) ? value : [value]);\n\nconst selectPropsConfig = {\n required: [...formFieldBasePropsConfig.required],\n optional: [\n ...formFieldBasePropsConfig.optional,\n accessKeyProp,\n horizontalIconsProp,\n multipleProp,\n optionsWithOptgroupProp,\n requiredProp,\n rowsProp,\n selectValueProp,\n shortKeyProp,\n tabIndexProp,\n variantProp,\n ],\n};\n\nconst selectBem = getBlockBem('kol-select');\nconst SelectOptionFC = (_a) => {\n var { class: classNames, index, selectedValue, selected, value, label, disabled } = _a, other = __rest(_a, [\"class\", \"index\", \"selectedValue\", \"selected\", \"value\", \"label\", \"disabled\"]);\n const selectedValues = selectedValue === undefined ? [] : Array.isArray(selectedValue) ? selectedValue : [selectedValue];\n const isSelected = selected || selectedValues.includes(value);\n return (h(\"option\", Object.assign({ class: clsx(selectBem('option', { selected: Boolean(isSelected), disabled: Boolean(disabled) }), classNames), selected: isSelected, disabled: disabled, value: index }, other), label));\n};\nconst SelectOptionListFC = ({ preKey, options, disabled, value: selectedValue, OptionProps = {}, OptionGroupProps = {}, }) => {\n if (!(options === null || options === void 0 ? void 0 : options.length)) {\n return null;\n }\n return (h(Fragment, null, options.map((option, index) => {\n const key = [preKey, `-${index}`].join('');\n if ('options' in option) {\n const isOptgroupDisabled = Boolean(disabled || option.disabled);\n const { label } = option, other = __rest(option, [\"label\"]);\n return (h(\"optgroup\", Object.assign({ class: selectBem('optgroup', { disabled: isOptgroupDisabled }), key: key }, OptionGroupProps, { label: label === null || label === void 0 ? void 0 : label.toString(), disabled: isOptgroupDisabled }), h(SelectOptionListFC, Object.assign({ OptionGroupProps: OptionGroupProps, OptionProps: OptionProps, value: selectedValue, preKey: key }, other, { disabled: isOptgroupDisabled }))));\n }\n if ('value' in option) {\n return (h(SelectOptionFC, Object.assign({ key: key }, OptionProps, { index: key, selectedValue: selectedValue }, option, { disabled: Boolean(disabled || option.disabled) })));\n }\n return null;\n })));\n};\nconst SelectFC = (props) => {\n const { class: classNames, msg, touched, disabled, required, options, value, OptionProps, OptionGroupProps, ariaDescribedBy, hideLabel, label } = props, other = __rest(props, [\"class\", \"msg\", \"touched\", \"disabled\", \"required\", \"options\", \"value\", \"OptionProps\", \"OptionGroupProps\", \"ariaDescribedBy\", \"hideLabel\", \"label\"]);\n const selectProps = Object.assign(Object.assign({ class: clsx(selectBem(Object.assign({ disabled: Boolean(disabled), required: Boolean(required), touched: Boolean(touched) }, (isMsgDefinedAndInputTouched(msg, touched) ? { [getMsgType(msg)]: true } : {}))), classNames), required: required, disabled: disabled }, getDefaultInputProps({ ariaDescribedBy, hideLabel, label })), other);\n return (h(\"select\", Object.assign({}, selectProps), h(SelectOptionListFC, { OptionGroupProps: OptionGroupProps, OptionProps: OptionProps, disabled: disabled, options: options, value: value })));\n};\n\nconst assertSelectValueMatchesMultiplicity = (value, multiple, source) => {\n const isArray = Array.isArray(value);\n if (multiple) {\n if (value !== undefined && !isArray) {\n throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${source} = ${JSON.stringify(value)})`);\n }\n }\n else if (isArray) {\n throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${source} = ${JSON.stringify(value)})`);\n }\n};\nconst flattenSelectOptions = (options, groupDisabled = false) => options.flatMap((entry) => 'options' in entry && Array.isArray(entry.options)\n ? flattenSelectOptions(entry.options, Boolean(groupDisabled || entry.disabled))\n : [Object.assign(Object.assign({}, entry), { disabled: Boolean(groupDisabled || entry.disabled) })]);\nconst normalizeSelectValue = (value, options, multiple) => {\n if (options.length === 0) {\n return value;\n }\n const flatOptions = flattenSelectOptions(options);\n const optionValues = flatOptions.map((option) => option.value);\n const filtered = value.every((item) => optionValues.includes(item)) ? value : value.filter((item) => optionValues.includes(item));\n if (multiple === false && filtered.length === 0) {\n const firstEnabled = flatOptions.find((option) => option.disabled !== true);\n return firstEnabled ? [firstEnabled.value] : filtered;\n }\n return filtered;\n};\n\nclass BaseSelectWebComponent extends BaseFormFieldWebComponent {\n constructor() {\n super(...arguments);\n this.keyOptionMap = new Map();\n this.hasValue = true;\n this.handleSelectInput = (event) => {\n var _a;\n const selectedValues = Array.from(((_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.options) || [])\n .filter((option) => option.selected)\n .map((option) => { var _a; return (_a = this.keyOptionMap.get(option.value)) === null || _a === void 0 ? void 0 : _a.value; });\n if (this._multiple) {\n this._value = selectedValues;\n this.handleInput(event, selectedValues);\n }\n else {\n const singleValue = selectedValues.length > 0 ? selectedValues[0] : undefined;\n this._value = singleValue;\n this.handleInput(event, singleValue);\n }\n };\n this.handleSelectChange = (event) => {\n const value = this._value;\n this.handleChange(event, value);\n this.hasValue = !!value;\n };\n }\n applyAccessKey(value) {\n accessKeyProp.apply(value, (v) => this.setRenderProp('accessKey', v));\n validateAccessAndShortKey(value, this.getShortKeyProp());\n }\n applyShortKey(value) {\n shortKeyProp.apply(value, (v) => this.setRenderProp('shortKey', v));\n validateAccessAndShortKey(this.getAccessKeyProp(), value);\n }\n applyIcons(value) {\n horizontalIconsProp.apply(value, (v) => this.setRenderProp('icons', v));\n }\n applyMultiple(value) {\n assertSelectValueMatchesMultiplicity(this._value, value === true, 'current');\n multipleProp.apply(value, (v) => {\n this.setRenderProp('multiple', v);\n this.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), this.getRenderProp('options'), this._multiple));\n });\n }\n applyOptions(value) {\n optionsWithOptgroupProp.apply(value, (v) => {\n this.setRenderProp('options', v);\n if (v.length > 0) {\n this.keyOptionMap.clear();\n fillKeyOptionMap(this.keyOptionMap, v);\n this.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), v, this._multiple));\n }\n });\n }\n applyRequired(value) {\n requiredProp.apply(value, (v) => this.setRenderProp('required', v));\n }\n applyRows(value) {\n rowsProp.apply(value, (v) => this.setRenderProp('rows', v));\n }\n applyTabIndex(value) {\n tabIndexProp.apply(value, (v) => this.setRenderProp('tabIndex', v));\n }\n applyValue(value) {\n assertSelectValueMatchesMultiplicity(value, this._multiple === true, 'received');\n const setValue = (list) => {\n const normalized = normalizeSelectValue(list, this.getRenderProp('options'), this._multiple);\n this.setRenderProp('value', normalized);\n this.formAssociation.setFormAssociatedValue(this.getModelValue());\n };\n if (value === null) {\n setValue([null]);\n }\n else {\n selectValueProp.apply(value, setValue);\n }\n }\n applyVariant(value) {\n variantProp.apply(value, (v) => this.setRenderProp('variant', v));\n }\n getModelValue() {\n const value = this.getRenderProp('value');\n if (this._multiple) {\n return value;\n }\n return Array.isArray(value) && value.length > 0 ? value[0] : value;\n }\n getSelectProps() {\n const { ariaDescribedBy, hasError } = this.getAria();\n const multiple = this.getRenderProp('multiple');\n const shortKey = this.getRenderProp('shortKey');\n return Object.assign(Object.assign({ id: this.getState('id'), hideLabel: this.getRenderProp('hideLabel'), label: this.getRenderProp('label'), value: this.getRenderProp('value'), options: this.getRenderProp('options'), accessKey: this.getRenderProp('accessKey') || undefined, disabled: this.getRenderProp('disabled'), name: this.getRenderProp('name') || undefined, 'aria-invalid': hasError ? 'true' : undefined, ariaDescribedBy, size: multiple ? this.getRenderProp('rows') : undefined, multiple, required: this.getRenderProp('required'), touched: this.getRenderProp('touched'), msg: this.getRenderProp('msg') }, (shortKey ? { 'aria-keyshortcuts': shortKey } : {})), { ref: this.ctaRef, onBlur: this.handleBlur, onChange: this.handleSelectChange, onClick: this.handleClick, onFocus: this.handleFocus, onInput: this.handleSelectInput, onKeyDown: this.handleKeyDown });\n }\n renderSelectField() {\n const disabled = this.getRenderProp('disabled');\n const { startAdornment, endAdornment } = getInputAdornments({ icons: this.getRenderProp('icons') });\n return (h(FormFieldFC, Object.assign({}, this.getFormFieldProps({\n class: clsx('kol-form-field-select', { 'kol-form-field--has-value': this.hasValue }),\n accessKey: this.getRenderProp('accessKey') || undefined,\n shortKey: this.getRenderProp('shortKey') || undefined,\n required: this.getRenderProp('required'),\n variant: this.getRenderProp('variant'),\n }), { onClick: () => { var _a; return (_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.focus(); } }), h(InputContainerFC, { disabled: disabled, msg: this.getRenderProp('msg'), touched: this.getRenderProp('touched'), startAdornment: startAdornment, endAdornment: endAdornment }, h(SelectFC, Object.assign({}, this.getSelectProps())))));\n }\n}\n\nexport { BaseSelectWebComponent as B, selectPropsConfig as s };\n"],"mappings":"A,+rBAgBA,IAAM2B,EAA8B,GAAW,CAC3C,GAAI,OAAOC,GAAW,UAAYA,EAAiB,CAC/C,GAAI,OAAOA,EAAO,OAAU,UAAYA,EAAO,MAAM,OAAS,EAW1D,MAVA,GAAO,SAAWA,EAAO,WAAa,GACtC,EAAO,MAAQ,GAAGA,EAAO,QAAQ,KAAK,EAClCjB,EAAuBiB,EAAO,MAAO,CAAC,IAAM,IAASf,EAAoBe,EAAO,KAAK,IAAM,IAC3F3B,EAAS,2BAA2B2B,EAAO,MAAM,gGAAgG,EAErJ,CAAI,MAAM,QAAQA,EAAO,OAAO,GACpBA,EAAO,QAAQ,KAAM,GAClBD,EAA2BE,CAAI,IAAM,EAC/C,IAAM,IAAA,GAI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AAS,KAAK,cAAc,SAAS,CACzC,CAAC,EAAG,CAAE,YAAsC,KAAK,OAAO,IAA4C,MAAM,CAAK,CAAC,EAAGR,EAAEO,EAAkB,CAAY,WAAU,IAAK,KAAK,cAAc,KAAK,EAAG,QAAS,KAAK,cAAc,SAAS,EAAmB,iBAA8B,cAAa,EAAGP,EAAEqD,EAAU,OAAO,OAAO,CAAC,EAAG,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,CAC7V,CACJ,E"}
|
|
1
|
+
{"version":3,"file":"base-web-component-C769ZH8t-cPPBA536.js","names":["parseJson","a11yHint","h","shortKeyProp","variantProp","accessKeyProp","tabIndexProp","getInputAdornments","horizontalIconsProp","InputContainerFC","clsx","hasEnoughReadableChars","createPropDefinition","containsOnlyNumbers","getBlockBem","multipleProp","requiredProp","rowsProp","formFieldBasePropsConfig","isMsgDefinedAndInputTouched","FormFieldFC","getDefaultInputProps","getMsgType","BaseFormFieldWebComponent","validateAccessAndShortKey","fillKeyOptionMap","__rest","validateInputSelectOptions","option","item","normalizeOptionsWithOptgroup","parsed","value","optionsWithOptgroupProp","selectValueProp","selectPropsConfig","selectBem","SelectOptionFC","classNames","_a","other","isSelected","selected","selectedValue","disabled","index","label","SelectOptionListFC","options","Fragment","key","preKey","isOptgroupDisabled","OptionGroupProps","OptionProps","SelectFC","props","selectProps","required","touched","msg","assertSelectValueMatchesMultiplicity","isArray","multiple","source","flattenSelectOptions","entry","groupDisabled","normalizeSelectValue","flatOptions","optionValues","filtered","firstEnabled","BaseSelectWebComponent","selectedValues","event","singleValue","v","setValue","normalized","list","shortKey","hasError"],"sources":["../../../../../components/dist/esm/base-web-component-C769ZH8t.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { q as a11yHint, p as parseJson } from './prop.validators-kX7xC6qj.js';\nimport { a as accessKeyProp, d as shortKeyProp, t as tabIndexProp, v as variantProp } from './component-D-csVfVM.js';\nimport { h as horizontalIconsProp, g as getInputAdornments, I as InputContainerFC } from './input-container-DfzdQhVw.js';\nimport { o as hasEnoughReadableChars, p as containsOnlyNumbers, c as createPropDefinition, g as getBlockBem, e as clsx } from './props-from-config-Dr6e6ZFX.js';\nimport { m as multipleProp } from './multiple-D5iEtXdP.js';\nimport { r as requiredProp } from './required-DZEEGwp_.js';\nimport { r as rowsProp } from './rows-AgQ8uPMY.js';\nimport { f as formFieldBasePropsConfig, i as isMsgDefinedAndInputTouched, g as getMsgType, c as getDefaultInputProps, B as BaseFormFieldWebComponent, F as FormFieldFC } from './api-f3pM5e2P.js';\nimport { h, F as Fragment } from './index-CDhvlzPX.js';\nimport { v as validateAccessAndShortKey } from './access-and-short-key-ijzCZfHm.js';\nimport { f as fillKeyOptionMap } from './options-B0rBHetL.js';\nimport { a as __rest } from './tslib.es6-QNbPBOk5.js';\n\nconst validateInputSelectOptions = (option) => {\n if (typeof option === 'object' && option !== null) {\n if (typeof option.label === 'string' && option.label.length > 0) {\n option.disabled = option.disabled === true;\n option.label = `${option.label}`.trim();\n if (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n a11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n }\n if (Array.isArray(option.options)) {\n return (option.options.find((item) => {\n return validateInputSelectOptions(item) === false;\n }) === undefined);\n }\n return true;\n }\n else if (typeof option.label === 'number') {\n return true;\n }\n }\n return false;\n};\n\nfunction normalizeOptionsWithOptgroup(value) {\n const parsed = typeof value === 'string' ? parseJson(value) : value;\n if (Array.isArray(parsed) && parsed.every((option) => validateInputSelectOptions(option))) {\n return parsed;\n }\n throw new Error('Invalid select options');\n}\nconst optionsWithOptgroupProp = createPropDefinition('options', [], normalizeOptionsWithOptgroup);\n\nconst selectValueProp = createPropDefinition('value', [], (value) => Array.isArray(value) ? value : [value]);\n\nconst selectPropsConfig = {\n required: [...formFieldBasePropsConfig.required],\n optional: [\n ...formFieldBasePropsConfig.optional,\n accessKeyProp,\n horizontalIconsProp,\n multipleProp,\n optionsWithOptgroupProp,\n requiredProp,\n rowsProp,\n selectValueProp,\n shortKeyProp,\n tabIndexProp,\n variantProp,\n ],\n};\n\nconst selectBem = getBlockBem('kol-select');\nconst SelectOptionFC = (_a) => {\n var { class: classNames, index, selectedValue, selected, value, label, disabled } = _a, other = __rest(_a, [\"class\", \"index\", \"selectedValue\", \"selected\", \"value\", \"label\", \"disabled\"]);\n const selectedValues = selectedValue === undefined ? [] : Array.isArray(selectedValue) ? selectedValue : [selectedValue];\n const isSelected = selected || selectedValues.includes(value);\n return (h(\"option\", Object.assign({ class: clsx(selectBem('option', { selected: Boolean(isSelected), disabled: Boolean(disabled) }), classNames), selected: isSelected, disabled: disabled, value: index }, other), label));\n};\nconst SelectOptionListFC = ({ preKey, options, disabled, value: selectedValue, OptionProps = {}, OptionGroupProps = {}, }) => {\n if (!(options === null || options === void 0 ? void 0 : options.length)) {\n return null;\n }\n return (h(Fragment, null, options.map((option, index) => {\n const key = [preKey, `-${index}`].join('');\n if ('options' in option) {\n const isOptgroupDisabled = Boolean(disabled || option.disabled);\n const { label } = option, other = __rest(option, [\"label\"]);\n return (h(\"optgroup\", Object.assign({ class: selectBem('optgroup', { disabled: isOptgroupDisabled }), key: key }, OptionGroupProps, { label: label === null || label === void 0 ? void 0 : label.toString(), disabled: isOptgroupDisabled }), h(SelectOptionListFC, Object.assign({ OptionGroupProps: OptionGroupProps, OptionProps: OptionProps, value: selectedValue, preKey: key }, other, { disabled: isOptgroupDisabled }))));\n }\n if ('value' in option) {\n return (h(SelectOptionFC, Object.assign({ key: key }, OptionProps, { index: key, selectedValue: selectedValue }, option, { disabled: Boolean(disabled || option.disabled) })));\n }\n return null;\n })));\n};\nconst SelectFC = (props) => {\n const { class: classNames, msg, touched, disabled, required, options, value, OptionProps, OptionGroupProps, ariaDescribedBy, hideLabel, label } = props, other = __rest(props, [\"class\", \"msg\", \"touched\", \"disabled\", \"required\", \"options\", \"value\", \"OptionProps\", \"OptionGroupProps\", \"ariaDescribedBy\", \"hideLabel\", \"label\"]);\n const selectProps = Object.assign(Object.assign({ class: clsx(selectBem(Object.assign({ disabled: Boolean(disabled), required: Boolean(required), touched: Boolean(touched) }, (isMsgDefinedAndInputTouched(msg, touched) ? { [getMsgType(msg)]: true } : {}))), classNames), required: required, disabled: disabled }, getDefaultInputProps({ ariaDescribedBy, hideLabel, label })), other);\n return (h(\"select\", Object.assign({}, selectProps), h(SelectOptionListFC, { OptionGroupProps: OptionGroupProps, OptionProps: OptionProps, disabled: disabled, options: options, value: value })));\n};\n\nconst assertSelectValueMatchesMultiplicity = (value, multiple, source) => {\n const isArray = Array.isArray(value);\n if (multiple) {\n if (value !== undefined && !isArray) {\n throw new Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${source} = ${JSON.stringify(value)})`);\n }\n }\n else if (isArray) {\n throw new Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${source} = ${JSON.stringify(value)})`);\n }\n};\nconst flattenSelectOptions = (options, groupDisabled = false) => options.flatMap((entry) => 'options' in entry && Array.isArray(entry.options)\n ? flattenSelectOptions(entry.options, Boolean(groupDisabled || entry.disabled))\n : [Object.assign(Object.assign({}, entry), { disabled: Boolean(groupDisabled || entry.disabled) })]);\nconst normalizeSelectValue = (value, options, multiple) => {\n if (options.length === 0) {\n return value;\n }\n const flatOptions = flattenSelectOptions(options);\n const optionValues = flatOptions.map((option) => option.value);\n const filtered = value.every((item) => optionValues.includes(item)) ? value : value.filter((item) => optionValues.includes(item));\n if (multiple === false && filtered.length === 0) {\n const firstEnabled = flatOptions.find((option) => option.disabled !== true);\n return firstEnabled ? [firstEnabled.value] : filtered;\n }\n return filtered;\n};\n\nclass BaseSelectWebComponent extends BaseFormFieldWebComponent {\n constructor() {\n super(...arguments);\n this.keyOptionMap = new Map();\n this.hasValue = true;\n this.handleSelectInput = (event) => {\n var _a;\n const selectedValues = Array.from(((_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.options) || [])\n .filter((option) => option.selected)\n .map((option) => { var _a; return (_a = this.keyOptionMap.get(option.value)) === null || _a === void 0 ? void 0 : _a.value; });\n if (this._multiple) {\n this._value = selectedValues;\n this.handleInput(event, selectedValues);\n }\n else {\n const singleValue = selectedValues.length > 0 ? selectedValues[0] : undefined;\n this._value = singleValue;\n this.handleInput(event, singleValue);\n }\n };\n this.handleSelectChange = (event) => {\n const value = this._value;\n this.handleChange(event, value);\n this.hasValue = !!value;\n };\n }\n applyAccessKey(value) {\n accessKeyProp.apply(value, (v) => this.setRenderProp('accessKey', v));\n validateAccessAndShortKey(value, this.getShortKeyProp());\n }\n applyShortKey(value) {\n shortKeyProp.apply(value, (v) => this.setRenderProp('shortKey', v));\n validateAccessAndShortKey(this.getAccessKeyProp(), value);\n }\n applyIcons(value) {\n horizontalIconsProp.apply(value, (v) => this.setRenderProp('icons', v));\n }\n applyMultiple(value) {\n assertSelectValueMatchesMultiplicity(this._value, value === true, 'current');\n multipleProp.apply(value, (v) => {\n this.setRenderProp('multiple', v);\n this.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), this.getRenderProp('options'), this._multiple));\n });\n }\n applyOptions(value) {\n optionsWithOptgroupProp.apply(value, (v) => {\n this.setRenderProp('options', v);\n if (v.length > 0) {\n this.keyOptionMap.clear();\n fillKeyOptionMap(this.keyOptionMap, v);\n this.setRenderProp('value', normalizeSelectValue(this.getRenderProp('value'), v, this._multiple));\n }\n });\n }\n applyRequired(value) {\n requiredProp.apply(value, (v) => this.setRenderProp('required', v));\n }\n applyRows(value) {\n rowsProp.apply(value, (v) => this.setRenderProp('rows', v));\n }\n applyTabIndex(value) {\n tabIndexProp.apply(value, (v) => this.setRenderProp('tabIndex', v));\n }\n applyValue(value) {\n assertSelectValueMatchesMultiplicity(value, this._multiple === true, 'received');\n const setValue = (list) => {\n const normalized = normalizeSelectValue(list, this.getRenderProp('options'), this._multiple);\n this.setRenderProp('value', normalized);\n this.formAssociation.setFormAssociatedValue(this.getModelValue());\n };\n if (value === null) {\n setValue([null]);\n }\n else {\n selectValueProp.apply(value, setValue);\n }\n }\n applyVariant(value) {\n variantProp.apply(value, (v) => this.setRenderProp('variant', v));\n }\n getModelValue() {\n const value = this.getRenderProp('value');\n if (this._multiple) {\n return value;\n }\n return Array.isArray(value) && value.length > 0 ? value[0] : value;\n }\n getSelectProps() {\n const { ariaDescribedBy, hasError } = this.getAria();\n const multiple = this.getRenderProp('multiple');\n const shortKey = this.getRenderProp('shortKey');\n return Object.assign(Object.assign({ id: this.getState('id'), hideLabel: this.getRenderProp('hideLabel'), label: this.getRenderProp('label'), value: this.getRenderProp('value'), options: this.getRenderProp('options'), accessKey: this.getRenderProp('accessKey') || undefined, disabled: this.getRenderProp('disabled'), name: this.getRenderProp('name') || undefined, 'aria-invalid': hasError ? 'true' : undefined, ariaDescribedBy, size: multiple ? this.getRenderProp('rows') : undefined, multiple, required: this.getRenderProp('required'), touched: this.getRenderProp('touched'), msg: this.getRenderProp('msg') }, (shortKey ? { 'aria-keyshortcuts': shortKey } : {})), { ref: this.ctaRef, onBlur: this.handleBlur, onChange: this.handleSelectChange, onClick: this.handleClick, onFocus: this.handleFocus, onInput: this.handleSelectInput, onKeyDown: this.handleKeyDown });\n }\n renderSelectField() {\n const disabled = this.getRenderProp('disabled');\n const { startAdornment, endAdornment } = getInputAdornments({ icons: this.getRenderProp('icons') });\n return (h(FormFieldFC, Object.assign({}, this.getFormFieldProps({\n class: clsx('kol-form-field-select', { 'kol-form-field--has-value': this.hasValue }),\n accessKey: this.getRenderProp('accessKey') || undefined,\n shortKey: this.getRenderProp('shortKey') || undefined,\n required: this.getRenderProp('required'),\n variant: this.getRenderProp('variant'),\n }), { onClick: () => { var _a; return (_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.focus(); } }), h(InputContainerFC, { disabled: disabled, msg: this.getRenderProp('msg'), touched: this.getRenderProp('touched'), startAdornment: startAdornment, endAdornment: endAdornment }, h(SelectFC, Object.assign({},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KAAK,OAAQ,OAAQ,KAAK,WAAY,SAAU,KAAK,mBAAoB,QAAS,KAAK,YAAa,QAAS,KAAK,YAAa,QAAS,KAAK,kBAAmB,UAAW,KAAK,aAAc,CAAC,CACn2B,CACA,mBAAoB,CAChB,IAAMrC,EAAW,KAAK,cAAc,UAAU,EACxC,CAAE,iBAAgB,gBAAiBrC,EAAmB,CAAE,MAAO,KAAK,cAAc,OAAO,CAAE,CAAC,EAClG,OAAQL,EAAEkB,EAAa,OAAO,OAAO,CAAC,EAAG,KAAK,kBAAkB,CAC5D,MAAOV,EAAK,wBAAyB,CAAE,4BAA6B,KAAK,QAAS,CAAC,EACnF,UAAW,KAAK,cAAc,WAAW,GAAK,IAAA,GAC9C,SAAU,KAAK,cAAc,UAAU,GAAK,IAAA,GAC5C,SAAU,KAAK,cAAc,UAAU,EACvC,QAAS,KAAK,cAAc,SAAS,CACzC,CAAC,EAAG,CAAE,YAAsC,KAAK,OAAO,IAA4C,MAAM,CAAK,CAAC,EAAGR,EAAEO,EAAkB,CAAY,WAAU,IAAK,KAAK,cAAc,KAAK,EAAG,QAAS,KAAK,cAAc,SAAS,EAAmB,iBAA8B,cAAa,EAAGP,EAAEqD,EAAU,OAAO,OAAO,CAAC,EAAG,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,CAC7V,CACJ,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as e}from"./index-
|
|
2
|
-
//# sourceMappingURL=base-web-component-
|
|
1
|
+
import{s as e}from"./index-CDhvlzPX-C15eU4TR.js";import{d as t,h as n,n as r}from"./component-D-csVfVM-CavNnyAw.js";import{n as i,t as a}from"./suggestions-N2Hsp7F8-BRVEFAVu.js";import{n as o,r as s}from"./input-container-DfzdQhVw-BUNs3bhp.js";import{a as c,k as l,l as u}from"./props-from-config-Dr6e6ZFX-CebT1iS4.js";import{t as d}from"./placeholder-CryghV7Z-Dc2sfCJU.js";import{t as f}from"./read-only-ChTNFbZu-CB4KehIR.js";import{t as p}from"./required-DZEEGwp_-CgUf_TuS.js";import{t as m}from"./smart-button-Dqwbv5bn-CIv4K1OR.js";import{t as h}from"./value-string-DBJI1SMK-BfqFvgjh.js";import{a as g,t as _}from"./api-f3pM5e2P-rO207r4O.js";import{t as v}from"./access-and-short-key-ijzCZfHm-Dx5Q-CAn.js";import{t as y}from"./element-interaction-sGYdEpmv-DkRSXuZE.js";import{t as b}from"./base-web-component-DSLw_2co-RPD88MQa.js";import{t as x}from"./behavior-DYLnL5QE-DQKBoqbb.js";import{r as S}from"./controller-BNVDUbSt-DAufZkpW.js";var C=u(`pattern`,void 0,l),w={required:[...g.required],optional:[...g.optional,r,i,s,C,d,f,p,t,m,h,n]},T=class extends _{constructor(){super(...arguments),this.ctaRef=y(),this.counter=new x(b.stateLess),this.needsImmediateCounterUpdate=!1,this.hasValue=!1,this.handleTextInput=e=>{this._value=e.target.value,this.handleInput(e)},this.handleTextChange=(e,t)=>{this.handleChange(e,t)},this.handleTextFocus=e=>{this.handleFocus(e),this.counter.retriggerAria(this._value?.length??0)},this.handleTextKeyDown=e=>{this.handleKeyDown(e),this.counter.handleKeyDown(e,this.ctaRef.el?.value.length??0),S(e,{form:this.host,ref:this.ctaRef.el})}}get textShared(){return this}initHasValue(){this.hasValue=!!this.textShared.getRenderProp(`value`)}didLoadTextInput(){this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(this._value?.length??0)}didUpdateTextInput(){this.needsImmediateCounterUpdate&&(this.needsImmediateCounterUpdate=!1,(this.counter.hasCounter()||this.counter.hasSoftLimit())&&this.counter.updateImmediate(this._value?.length??0))}destroyTextInput(){this.destroyFormField(),this.counter.destroy()}applyAccessKey(e){r.apply(e,e=>this.textShared.setRenderProp(`accessKey`,e)),v(e,this._shortKey)}applyAutoComplete(e){i.apply(e,e=>this.textShared.setRenderProp(`autoComplete`,e))}applyIcons(e){s.apply(e,e=>this.textShared.setRenderProp(`icons`,e))}applyPattern(e){C.apply(e,e=>this.textShared.setRenderProp(`pattern`,e))}applyPlaceholder(e){d.apply(e,e=>this.textShared.setRenderProp(`placeholder`,e))}applyReadOnly(e){f.apply(e,e=>this.textShared.setRenderProp(`readOnly`,e))}applyRequired(e){p.apply(e,e=>this.textShared.setRenderProp(`required`,e))}applyShortKey(e){t.apply(e,e=>this.textShared.setRenderProp(`shortKey`,e)),v(this._accessKey,e)}applySmartButton(e){e==null?this.textShared.unsetRenderProp(`smartButton`):m.apply(e,e=>this.textShared.setRenderProp(`smartButton`,e))}applyValue(e){this.initValue(e),this.hasValue=!!this.textShared.getRenderProp(`value`),this.counter.update(e?.length??0)}initValue(e){h.apply(e,e=>this.textShared.setRenderProp(`value`,e)),this.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp(`value`))}initMaxLength(e){this.counter.watchMaxLength(e)}applyVariant(e){n.apply(e,e=>this.textShared.setRenderProp(`variant`,e))}applyHasCounter(e){this.counter.watchHasCounter(e),this.needsImmediateCounterUpdate=!0}applyMaxLength(e){this.counter.watchMaxLength(e),this.counter.updateImmediate(this._value?.length??0)}applyMaxLengthBehavior(e){this.counter.watchMaxLengthBehavior(e),this.needsImmediateCounterUpdate=!0}getTextFormFieldProps(e){let t=this.textShared;return this.getFormFieldProps({class:c(e,{"has-value":this.hasValue,"kol-form-field--has-counter":this.counter.hasSoftLimit()||this.counter.hasCounter()}),accessKey:t.getRenderProp(`accessKey`)||void 0,shortKey:t.getRenderProp(`shortKey`)||void 0,variant:t.getRenderProp(`variant`),required:t.getRenderProp(`required`),readOnly:t.getRenderProp(`readOnly`),maxLength:this.counter.getRenderProp(`maxLength`),counter:this.counter.getCounterProps()})}getTextInputAdornments(e){return o({icons:this.textShared.getRenderProp(`icons`),smartButton:this.getSmartButtonFcProps(this.textShared.getRenderProp(`smartButton`),this.textShared.getRenderProp(`disabled`)),endAdornment:e})}getTextInputProps({type:t,spellcheck:n,multiple:r,suggestions:i},o={}){let s=this.textShared,c=s.getState(`id`),l=s.getRenderProp(`accessKey`),u=s.getRenderProp(`shortKey`),d=s.getRenderProp(`placeholder`),f=s.getRenderProp(`pattern`),p=this.counter.getMaxLengthAttribute(),m=this.counter.getCharacterLimitHintId(c),{ariaDescribedBy:h,hasError:g}=this.getAria();return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:c,hideLabel:s.getRenderProp(`hideLabel`),label:s.getRenderProp(`label`),disabled:s.getRenderProp(`disabled`),name:s.getRenderProp(`name`)||void 0},l?{accessKey:l}:{}),t===void 0?{}:{type:t}),{value:s.getRenderProp(`value`),required:s.getRenderProp(`required`)}),p===void 0?{}:{maxlength:p}),d===void 0?{}:{placeholder:d}),{autoComplete:s.getRenderProp(`autoComplete`)}),n===void 0?{}:{spellcheck:n}),f===void 0?{}:{pattern:f}),{readonly:s.getRenderProp(`readOnly`)}),r===void 0?{}:{multiple:r}),{touched:s.getRenderProp(`touched`),msg:s.getRenderProp(`msg`)}),u?{"aria-keyshortcuts":u}:{}),i&&i.length>0?{suggestions:e(a,{id:c,suggestions:i})}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleTextChange,onClick:this.handleClick,onFocus:this.handleTextFocus,onInput:this.handleTextInput,onKeyDown:this.handleTextKeyDown}),o),{ariaDescribedBy:m?[...h,m]:h,"aria-invalid":g?`true`:void 0})}};export{w as n,T as t};
|
|
2
|
+
//# sourceMappingURL=base-web-component-D-nnAH47-BkszuhfK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-web-component-BhT6Ab3x-DIOeQ_zw.js","names":["h","shortKeyProp","variantProp","accessKeyProp","autoCompleteProp","SuggestionsFC","getInputAdornments","horizontalIconsProp","clsx","normalizeString","createPropDefinition","placeholderProp","readOnlyProp","requiredProp","smartButtonProp","stringValueProp","formFieldBasePropsConfig","BaseFormFieldWebComponent","validateAccessAndShortKey","createCtaRef","BaseWebComponent","CounterBehavior","submitFormOnEnter","patternProp","textInputBasePropsConfig","BaseTextInputWebComponent","event","value","v","shared","classNames","id","accessKey","shortKey","placeholder","pattern","maxLength","characterLimitHintId","type","spellcheck","multiple","suggestions","overrides","ariaDescribedBy","hasError"],"sources":["../../../../../components/dist/esm/base-web-component-BhT6Ab3x.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport './prop.validators-kX7xC6qj.js';\nimport { a as accessKeyProp, d as shortKeyProp, v as variantProp } from './component-BGqaexiY.js';\nimport { a as autoCompleteProp, S as SuggestionsFC } from './suggestions-By7hmqB7.js';\nimport { h as horizontalIconsProp, g as getInputAdornments } from './input-container-C8HGQnts.js';\nimport { c as createPropDefinition, b as normalizeString, e as clsx } from './props-from-config-B_k4h7ak.js';\nimport { p as placeholderProp } from './placeholder-C2TRH0yn.js';\nimport { r as readOnlyProp } from './read-only-Do20HzKS.js';\nimport { r as requiredProp } from './required-DBer2Rxa.js';\nimport { s as smartButtonProp } from './smart-button-BB671N1B.js';\nimport { s as stringValueProp } from './value-string-Dz7Sa2ex.js';\nimport { f as formFieldBasePropsConfig, B as BaseFormFieldWebComponent } from './api-lgc52EwH.js';\nimport { h } from './index-BFGAlyrC.js';\nimport { v as validateAccessAndShortKey } from './access-and-short-key-ijzCZfHm.js';\nimport { c as createCtaRef } from './element-interaction-sGYdEpmv.js';\nimport { B as BaseWebComponent } from './base-web-component-puo2mSiH.js';\nimport { C as CounterBehavior } from './behavior-BeStbAbq.js';\nimport { s as submitFormOnEnter } from './controller-BNVDUbSt.js';\n\nconst patternProp = createPropDefinition('pattern', undefined, normalizeString);\n\nconst textInputBasePropsConfig = {\n required: [...formFieldBasePropsConfig.required],\n optional: [\n ...formFieldBasePropsConfig.optional,\n accessKeyProp,\n autoCompleteProp,\n horizontalIconsProp,\n patternProp,\n placeholderProp,\n readOnlyProp,\n requiredProp,\n shortKeyProp,\n smartButtonProp,\n stringValueProp,\n variantProp,\n ],\n};\n\nclass BaseTextInputWebComponent extends BaseFormFieldWebComponent {\n constructor() {\n super(...arguments);\n this.ctaRef = createCtaRef();\n this.counter = new CounterBehavior(BaseWebComponent.stateLess);\n this.needsImmediateCounterUpdate = false;\n this.hasValue = false;\n this.handleTextInput = (event) => {\n this._value = event.target.value;\n this.handleInput(event);\n };\n this.handleTextChange = (event, value) => {\n this.handleChange(event, value);\n };\n this.handleTextFocus = (event) => {\n var _a, _b;\n this.handleFocus(event);\n this.counter.retriggerAria((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n };\n this.handleTextKeyDown = (event) => {\n var _a, _b;\n this.handleKeyDown(event);\n this.counter.handleKeyDown(event, (_b = (_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.value.length) !== null && _b !== void 0 ? _b : 0);\n submitFormOnEnter(event, { form: this.host, ref: this.ctaRef.el });\n };\n }\n get textShared() {\n return this;\n }\n initHasValue() {\n this.hasValue = Boolean(this.textShared.getRenderProp('value'));\n }\n didLoadTextInput() {\n var _a, _b;\n this.needsImmediateCounterUpdate = false;\n if (this.counter.hasCounter() || this.counter.hasSoftLimit()) {\n this.counter.updateImmediate((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n }\n }\n didUpdateTextInput() {\n var _a, _b;\n if (this.needsImmediateCounterUpdate) {\n this.needsImmediateCounterUpdate = false;\n if (this.counter.hasCounter() || this.counter.hasSoftLimit()) {\n this.counter.updateImmediate((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n }\n }\n }\n destroyTextInput() {\n this.destroyFormField();\n this.counter.destroy();\n }\n applyAccessKey(value) {\n accessKeyProp.apply(value, (v) => this.textShared.setRenderProp('accessKey', v));\n validateAccessAndShortKey(value, this._shortKey);\n }\n applyAutoComplete(value) {\n autoCompleteProp.apply(value, (v) => this.textShared.setRenderProp('autoComplete', v));\n }\n applyIcons(value) {\n horizontalIconsProp.apply(value, (v) => this.textShared.setRenderProp('icons', v));\n }\n applyPattern(value) {\n patternProp.apply(value, (v) => this.textShared.setRenderProp('pattern', v));\n }\n applyPlaceholder(value) {\n placeholderProp.apply(value, (v) => this.textShared.setRenderProp('placeholder', v));\n }\n applyReadOnly(value) {\n readOnlyProp.apply(value, (v) => this.textShared.setRenderProp('readOnly', v));\n }\n applyRequired(value) {\n requiredProp.apply(value, (v) => this.textShared.setRenderProp('required', v));\n }\n applyShortKey(value) {\n shortKeyProp.apply(value, (v) => this.textShared.setRenderProp('shortKey', v));\n validateAccessAndShortKey(this._accessKey, value);\n }\n applySmartButton(value) {\n if (value === undefined || value === null) {\n this.textShared.unsetRenderProp('smartButton');\n }\n else {\n smartButtonProp.apply(value, (v) => this.textShared.setRenderProp('smartButton', v));\n }\n }\n applyValue(value) {\n var _a;\n this.initValue(value);\n this.hasValue = Boolean(this.textShared.getRenderProp('value'));\n this.counter.update((_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0);\n }\n initValue(value) {\n stringValueProp.apply(value, (v) => this.textShared.setRenderProp('value', v));\n this.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp('value'));\n }\n initMaxLength(value) {\n this.counter.watchMaxLength(value);\n }\n applyVariant(value) {\n variantProp.apply(value, (v) => this.textShared.setRenderProp('variant', v));\n }\n applyHasCounter(value) {\n this.counter.watchHasCounter(value);\n this.needsImmediateCounterUpdate = true;\n }\n applyMaxLength(value) {\n var _a, _b;\n this.counter.watchMaxLength(value);\n this.counter.updateImmediate((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n }\n applyMaxLengthBehavior(value) {\n this.counter.watchMaxLengthBehavior(value);\n this.needsImmediateCounterUpdate = true;\n }\n getTextFormFieldProps(classNames) {\n const shared = this.textShared;\n return this.getFormFieldProps({\n class: clsx(classNames, {\n 'has-value': this.hasValue,\n 'kol-form-field--has-counter': this.counter.hasSoftLimit() || this.counter.hasCounter(),\n }),\n accessKey: shared.getRenderProp('accessKey') || undefined,\n shortKey: shared.getRenderProp('shortKey') || undefined,\n variant: shared.getRenderProp('variant'),\n required: shared.getRenderProp('required'),\n readOnly: shared.getRenderProp('readOnly'),\n maxLength: this.counter.getRenderProp('maxLength'),\n counter: this.counter.getCounterProps(),\n });\n }\n getTextInputAdornments(endAdornment) {\n return getInputAdornments({\n icons: this.textShared.getRenderProp('icons'),\n smartButton: this.getSmartButtonFcProps(this.textShared.getRenderProp('smartButton'), this.textShared.getRenderProp('disabled')),\n endAdornment,\n });\n }\n getTextInputProps({ type, spellcheck, multiple, suggestions }, overrides = {}) {\n const shared = this.textShared;\n const id = shared.getState('id');\n const accessKey = shared.getRenderProp('accessKey');\n const shortKey = shared.getRenderProp('shortKey');\n const placeholder = shared.getRenderProp('placeholder');\n const pattern = shared.getRenderProp('pattern');\n const maxLength = this.counter.getMaxLengthAttribute();\n const characterLimitHintId = this.counter.getCharacterLimitHintId(id);\n const { ariaDescribedBy, hasError } = this.getAria();\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ id, hideLabel: shared.getRenderProp('hideLabel'), label: shared.getRenderProp('label'), disabled: shared.getRenderProp('disabled'), name: shared.getRenderProp('name') || undefined }, (accessKey ? { accessKey } : {})), (type !== undefined ? { type } : {})), { value: shared.getRenderProp('value'), required: shared.getRenderProp('required') }), (maxLength !== undefined ? { maxlength: maxLength } : {})), (placeholder !== undefined ? { placeholder } : {})), { autoComplete: shared.getRenderProp('autoComplete') }), (spellcheck !== undefined ? { spellcheck } : {})), (pattern !== undefined ? { pattern } : {})), { readonly: shared.getRenderProp('readOnly') }), (multiple !== undefined ? { multiple } : {})), { touched: shared.getRenderProp('touched'), msg: shared.getRenderProp('msg') }), (shortKey ? { 'aria-keyshortcuts': shortKey } : {})), (suggestions && suggestions.length > 0 ? { suggestions: (h(SuggestionsFC, { id: id, suggestions: suggestions })) } : {})), { ref: this.ctaRef, onBlur: this.handleBlur, onChange: this.handleTextChange, onClick: this.handleClick, onFocus: this.handleTextFocus, onInput: this.handleTextInput, onKeyDown: this.handleTextKeyDown }), overrides), { ariaDescribedBy: characterLimitHintId ? [...ariaDescribedBy, characterLimitHintId] : ariaDescribedBy, 'aria-invalid': hasError ? 'true' : undefined });\n }\n}\n\nexport { BaseTextInputWebComponent as B, textInputBasePropsConfig as t };\n"],"mappings":"A,46BAqBA,IAAMuB,EAAcb,EAAqB,UAAW,IAAA,GAAWD,CAAe,EAExEe,EAA2B,CAC7B,SAAU,CAAC,GAAGR,EAAyB,QAAQ,EAC/C,SAAU,CACN,GAAGA,EAAyB,SAC5Bb,EACAC,EACAG,EACAgB,EACAZ,EACAC,EACAC,EACAZ,EACAa,EACAC,EACAb,CACJ,CACJ,EAEMuB,EAAN,cAAwCR,CAA0B,CAC9D,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,OAASE,EAAa,EAC3B,KAAK,QAAU,IAAIE,EAAgBD,EAAiB,SAAS,EAC7D,KAAK,4BAA8B,GACnC,KAAK,SAAW,GAChB,KAAK,gBAAmB,GAAU,CAC9B,KAAK,OAASM,EAAM,OAAO,MAC3B,KAAK,YAAYA,CAAK,CAC1B,EACA,KAAK,kBAAoB,EAAO,IAAU,CACtC,KAAK,aAAaA,EAAOC,CAAK,CAClC,EACA,KAAK,gBAAmB,GAAU,CAE9B,KAAK,YAAYD,CAAK,EACtB,KAAK,QAAQ,cAA0B,KAAK,QAAgD,QAAyC,CAAC,CAC1I,EACA,KAAK,kBAAqB,GAAU,CAEhC,KAAK,cAAcA,CAAK,EACxB,KAAK,QAAQ,cAAcA,EAAmB,KAAK,OAAO,IAA4C,MAAM,QAAyC,CAAC,EACtJJ,EAAkBI,EAAO,CAAE,KAAM,KAAK,KAAM,IAAK,KAAK,OAAO,EAAG,CAAC,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EAAO,cAAc,OAAO,EAAG,SAAUA,EAAO,cAAc,UAAU,CAAE,CAAC,EAAIO,IAAc,IAAA,GAAuC,CAAC,EAA5B,CAAE,UAAWA,CAAU,CAAO,EAAIF,IAAgB,IAAA,GAA8B,CAAC,EAAnB,CAAE,aAAY,CAAO,EAAG,CAAE,aAAcL,EAAO,cAAc,cAAc,CAAE,CAAC,EAAIU,IAAe,IAAA,GAA6B,CAAC,EAAlB,CAAE,YAAW,CAAO,EAAIJ,IAAY,IAAA,GAA0B,CAAC,EAAf,CAAE,SAAQ,CAAO,EAAG,CAAE,SAAUN,EAAO,cAAc,UAAU,CAAE,CAAC,EAAIW,IAAa,IAAA,GAA2B,CAAC,EAAhB,CAAE,UAAS,CAAO,EAAG,CAAE,QAASX,EAAO,cAAc,SAAS,EAAG,IAAKA,EAAO,cAAc,KAAK,CAAE,CAAC,EAAII,EAAW,CAAE,oBAAqBA,CAAS,EAAI,CAAC,CAAE,EAAIQ,GAAeA,EAAY,OAAS,EAAI,CAAE,YAAczC,EAAEK,EAAe,CAAM,KAAiB,aAAY,CAAC,CAAG,EAAI,CAAC,CAAE,EAAG,CAAE,IAAK,KAAK,OAAQ,OAAQ,KAAK,WAAY,SAAU,KAAK,iBAAkB,QAAS,KAAK,YAAa,QAAS,KAAK,gBAAiB,QAAS,KAAK,gBAAiB,UAAW,KAAK,iBAAkB,CAAC,EAAGqC,CAAS,EAAG,CAAE,gBAAiBL,EAAuB,CAAC,GAAGM,EAAiBN,CAAoB,EAAIM,EAAiB,eAAgBC,EAAW,OAAS,IAAA,EAAU,CAAC,CACjiD,CACJ,E"}
|
|
1
|
+
{"version":3,"file":"base-web-component-D-nnAH47-BkszuhfK.js","names":["h","shortKeyProp","variantProp","accessKeyProp","autoCompleteProp","SuggestionsFC","getInputAdornments","horizontalIconsProp","clsx","normalizeString","createPropDefinition","placeholderProp","readOnlyProp","requiredProp","smartButtonProp","stringValueProp","formFieldBasePropsConfig","BaseFormFieldWebComponent","validateAccessAndShortKey","createCtaRef","BaseWebComponent","CounterBehavior","submitFormOnEnter","patternProp","textInputBasePropsConfig","BaseTextInputWebComponent","event","value","v","shared","classNames","id","accessKey","shortKey","placeholder","pattern","maxLength","characterLimitHintId","type","spellcheck","multiple","suggestions","overrides","ariaDescribedBy","hasError"],"sources":["../../../../../components/dist/esm/base-web-component-D-nnAH47.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport './prop.validators-kX7xC6qj.js';\nimport { a as accessKeyProp, d as shortKeyProp, v as variantProp } from './component-D-csVfVM.js';\nimport { a as autoCompleteProp, S as SuggestionsFC } from './suggestions-N2Hsp7F8.js';\nimport { h as horizontalIconsProp, g as getInputAdornments } from './input-container-DfzdQhVw.js';\nimport { c as createPropDefinition, b as normalizeString, e as clsx } from './props-from-config-Dr6e6ZFX.js';\nimport { p as placeholderProp } from './placeholder-CryghV7Z.js';\nimport { r as readOnlyProp } from './read-only-ChTNFbZu.js';\nimport { r as requiredProp } from './required-DZEEGwp_.js';\nimport { s as smartButtonProp } from './smart-button-Dqwbv5bn.js';\nimport { s as stringValueProp } from './value-string-DBJI1SMK.js';\nimport { f as formFieldBasePropsConfig, B as BaseFormFieldWebComponent } from './api-f3pM5e2P.js';\nimport { h } from './index-CDhvlzPX.js';\nimport { v as validateAccessAndShortKey } from './access-and-short-key-ijzCZfHm.js';\nimport { c as createCtaRef } from './element-interaction-sGYdEpmv.js';\nimport { B as BaseWebComponent } from './base-web-component-DSLw_2co.js';\nimport { C as CounterBehavior } from './behavior-DYLnL5QE.js';\nimport { s as submitFormOnEnter } from './controller-BNVDUbSt.js';\n\nconst patternProp = createPropDefinition('pattern', undefined, normalizeString);\n\nconst textInputBasePropsConfig = {\n required: [...formFieldBasePropsConfig.required],\n optional: [\n ...formFieldBasePropsConfig.optional,\n accessKeyProp,\n autoCompleteProp,\n horizontalIconsProp,\n patternProp,\n placeholderProp,\n readOnlyProp,\n requiredProp,\n shortKeyProp,\n smartButtonProp,\n stringValueProp,\n variantProp,\n ],\n};\n\nclass BaseTextInputWebComponent extends BaseFormFieldWebComponent {\n constructor() {\n super(...arguments);\n this.ctaRef = createCtaRef();\n this.counter = new CounterBehavior(BaseWebComponent.stateLess);\n this.needsImmediateCounterUpdate = false;\n this.hasValue = false;\n this.handleTextInput = (event) => {\n this._value = event.target.value;\n this.handleInput(event);\n };\n this.handleTextChange = (event, value) => {\n this.handleChange(event, value);\n };\n this.handleTextFocus = (event) => {\n var _a, _b;\n this.handleFocus(event);\n this.counter.retriggerAria((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n };\n this.handleTextKeyDown = (event) => {\n var _a, _b;\n this.handleKeyDown(event);\n this.counter.handleKeyDown(event, (_b = (_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.value.length) !== null && _b !== void 0 ? _b : 0);\n submitFormOnEnter(event, { form: this.host, ref: this.ctaRef.el });\n };\n }\n get textShared() {\n return this;\n }\n initHasValue() {\n this.hasValue = Boolean(this.textShared.getRenderProp('value'));\n }\n didLoadTextInput() {\n var _a, _b;\n this.needsImmediateCounterUpdate = false;\n if (this.counter.hasCounter() || this.counter.hasSoftLimit()) {\n this.counter.updateImmediate((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n }\n }\n didUpdateTextInput() {\n var _a, _b;\n if (this.needsImmediateCounterUpdate) {\n this.needsImmediateCounterUpdate = false;\n if (this.counter.hasCounter() || this.counter.hasSoftLimit()) {\n this.counter.updateImmediate((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n }\n }\n }\n destroyTextInput() {\n this.destroyFormField();\n this.counter.destroy();\n }\n applyAccessKey(value) {\n accessKeyProp.apply(value, (v) => this.textShared.setRenderProp('accessKey', v));\n validateAccessAndShortKey(value, this._shortKey);\n }\n applyAutoComplete(value) {\n autoCompleteProp.apply(value, (v) => this.textShared.setRenderProp('autoComplete', v));\n }\n applyIcons(value) {\n horizontalIconsProp.apply(value, (v) => this.textShared.setRenderProp('icons', v));\n }\n applyPattern(value) {\n patternProp.apply(value, (v) => this.textShared.setRenderProp('pattern', v));\n }\n applyPlaceholder(value) {\n placeholderProp.apply(value, (v) => this.textShared.setRenderProp('placeholder', v));\n }\n applyReadOnly(value) {\n readOnlyProp.apply(value, (v) => this.textShared.setRenderProp('readOnly', v));\n }\n applyRequired(value) {\n requiredProp.apply(value, (v) => this.textShared.setRenderProp('required', v));\n }\n applyShortKey(value) {\n shortKeyProp.apply(value, (v) => this.textShared.setRenderProp('shortKey', v));\n validateAccessAndShortKey(this._accessKey, value);\n }\n applySmartButton(value) {\n if (value === undefined || value === null) {\n this.textShared.unsetRenderProp('smartButton');\n }\n else {\n smartButtonProp.apply(value, (v) => this.textShared.setRenderProp('smartButton', v));\n }\n }\n applyValue(value) {\n var _a;\n this.initValue(value);\n this.hasValue = Boolean(this.textShared.getRenderProp('value'));\n this.counter.update((_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0);\n }\n initValue(value) {\n stringValueProp.apply(value, (v) => this.textShared.setRenderProp('value', v));\n this.formAssociation.setFormAssociatedValue(this.textShared.getRenderProp('value'));\n }\n initMaxLength(value) {\n this.counter.watchMaxLength(value);\n }\n applyVariant(value) {\n variantProp.apply(value, (v) => this.textShared.setRenderProp('variant', v));\n }\n applyHasCounter(value) {\n this.counter.watchHasCounter(value);\n this.needsImmediateCounterUpdate = true;\n }\n applyMaxLength(value) {\n var _a, _b;\n this.counter.watchMaxLength(value);\n this.counter.updateImmediate((_b = (_a = this._value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);\n }\n applyMaxLengthBehavior(value) {\n this.counter.watchMaxLengthBehavior(value);\n this.needsImmediateCounterUpdate = true;\n }\n getTextFormFieldProps(classNames) {\n const shared = this.textShared;\n return this.getFormFieldProps({\n class: clsx(classNames, {\n 'has-value': this.hasValue,\n 'kol-form-field--has-counter': this.counter.hasSoftLimit() || this.counter.hasCounter(),\n }),\n accessKey: shared.getRenderProp('accessKey') || undefined,\n shortKey: shared.getRenderProp('shortKey') || undefined,\n variant: shared.getRenderProp('variant'),\n required: shared.getRenderProp('required'),\n readOnly: shared.getRenderProp('readOnly'),\n maxLength: this.counter.getRenderProp('maxLength'),\n counter: this.counter.getCounterProps(),\n });\n }\n getTextInputAdornments(endAdornment) {\n return getInputAdornments({\n icons: this.textShared.getRenderProp('icons'),\n smartButton: this.getSmartButtonFcProps(this.textShared.getRenderProp('smartButton'), this.textShared.getRenderProp('disabled')),\n endAdornment,\n });\n }\n getTextInputProps({ type, spellcheck, multiple, suggestions }, overrides = {}) {\n const shared = this.textShared;\n const id = shared.getState('id');\n const accessKey = shared.getRenderProp('accessKey');\n const shortKey = shared.getRenderProp('shortKey');\n const placeholder = shared.getRenderProp('placeholder');\n const pattern = shared.getRenderProp('pattern');\n const maxLength = this.counter.getMaxLengthAttribute();\n const characterLimitHintId = this.counter.getCharacterLimitHintId(id);\n const { ariaDescribedBy, hasError } = this.getAria();\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ id, hideLabel: shared.getRenderProp('hideLabel'), label: shared.getRenderProp('label'), disabled: shared.getRenderProp('disabled'), name: shared.getRenderProp('name') || undefined }, (accessKey ? { accessKey } : {})), (type !== undefined ? { type } : {})), { value: shared.getRenderProp('value'), required: shared.getRenderProp('required') }), (maxLength !== undefined ? { maxlength: maxLength } : {})), (placeholder !== undefined ? { placeholder } : {})), { autoComplete: shared.getRenderProp('autoComplete') }), (spellcheck !== undefined ? { spellcheck } : {})), (pattern !== undefined ? { pattern } : {})), { readonly: shared.getRenderProp('readOnly') }), (multiple !== undefined ? { multiple } : {})), { touched: shared.getRenderProp('touched'), msg: shared.getRenderProp('msg') }), (shortKey ? { 'aria-keyshortcuts': shortKey } : {})), (suggestions && suggestions.length > 0 ? { suggestions: (h(SuggestionsFC, { id: id, suggestions: suggestions })) } : {})), { ref: this.ctaRef, onBlur: this.handleBlur, onChange: this.handleTextChange, onClick: this.handleClick, onFocus: this.handleTextFocus, onInput: this.handleTextInput, onKeyDown: this.handleTextKeyDown }), overrides), { ariaDescribedBy: characterLimitHintId ? [...ariaDescribedBy, characterLimitHintId] : ariaDescribedBy, 'aria-invalid': hasError ? 'true' : undefined });\n }\n}\n\nexport { BaseTextInputWebComponent as B, textInputBasePropsConfig as t };\n"],"mappings":"A,46BAqBA,IAAMuB,EAAcb,EAAqB,UAAW,IAAA,GAAWD,CAAe,EAExEe,EAA2B,CAC7B,SAAU,CAAC,GAAGR,EAAyB,QAAQ,EAC/C,SAAU,CACN,GAAGA,EAAyB,SAC5Bb,EACAC,EACAG,EACAgB,EACAZ,EACAC,EACAC,EACAZ,EACAa,EACAC,EACAb,CACJ,CACJ,EAEMuB,EAAN,cAAwCR,CAA0B,CAC9D,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,OAASE,EAAa,EAC3B,KAAK,QAAU,IAAIE,EAAgBD,EAAiB,SAAS,EAC7D,KAAK,4BAA8B,GACnC,KAAK,SAAW,GAChB,KAAK,gBAAmB,GAAU,CAC9B,KAAK,OAASM,EAAM,OAAO,MAC3B,KAAK,YAAYA,CAAK,CAC1B,EACA,KAAK,kBAAoB,EAAO,IAAU,CACtC,KAAK,aAAaA,EAAOC,CAAK,CAClC,EACA,KAAK,gBAAmB,GAAU,CAE9B,KAAK,YAAYD,CAAK,EACtB,KAAK,QAAQ,cAA0B,KAAK,QAAgD,QAAyC,CAAC,CAC1I,EACA,KAAK,kBAAqB,GAAU,CAEhC,KAAK,cAAcA,CAAK,EACxB,KAAK,QAAQ,cAAcA,EAAmB,KAAK,OAAO,IAA4C,MAAM,QAAyC,CAAC,EACtJJ,EAAkBI,EAAO,CAAE,KAAM,KAAK,KAAM,IAAK,KAAK,OAAO,E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AE,MAAOT,EAAO,cAAc,OAAO,EAAG,SAAUA,EAAO,cAAc,UAAU,CAAE,CAAC,EAAIO,IAAc,IAAA,GAAuC,CAAC,EAA5B,CAAE,UAAWA,CAAU,CAAO,EAAIF,IAAgB,IAAA,GAA8B,CAAC,EAAnB,CAAE,aAAY,CAAO,EAAG,CAAE,aAAcL,EAAO,cAAc,cAAc,CAAE,CAAC,EAAIU,IAAe,IAAA,GAA6B,CAAC,EAAlB,CAAE,YAAW,CAAO,EAAIJ,IAAY,IAAA,GAA0B,CAAC,EAAf,CAAE,SAAQ,CAAO,EAAG,CAAE,SAAUN,EAAO,cAAc,UAAU,CAAE,CAAC,EAAIW,IAAa,IAAA,GAA2B,CAAC,EAAhB,CAAE,UAAS,CAAO,EAAG,CAAE,QAASX,EAAO,cAAc,SAAS,EAAG,IAAKA,EAAO,cAAc,KAAK,CAAE,CAAC,EAAII,EAAW,CAAE,oBAAqBA,CAAS,EAAI,CAAC,CAAE,EAAIQ,GAAeA,EAAY,OAAS,EAAI,CAAE,YAAczC,EAAEK,EAAe,CAAM,KAAiB,aAAY,CAAC,CAAG,EAAI,CAAC,CAAE,EAAG,CAAE,IAAK,KAAK,OAAQ,OAAQ,KAAK,WAAY,SAAU,KAAK,iBAAkB,QAAS,KAAK,YAAa,QAAS,KAAK,gBAAiB,QAAS,KAAK,gBAAiB,UAAW,KAAK,iBAAkB,CAAC,EAAGqC,CAAS,EAAG,CAAE,gBAAiBL,EAAuB,CAAC,GAAGM,EAAiBN,CAAoB,EAAIM,EAAiB,eAAgBC,EAAW,OAAS,IAAA,EAAU,CAAC,CACjiD,CACJ,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./props-from-config-
|
|
2
|
-
//# sourceMappingURL=base-web-component-
|
|
1
|
+
import{r as e}from"./props-from-config-Dr6e6ZFX-CebT1iS4.js";function t(){throw Error(`This behavior does not use component state.`)}var n=class{constructor(){this.rawProps={},this.renderProps={},this.requiredPropNames=new Set,this.renderPropsSeeded=!1,this.setState=(e,t)=>{this[e]=t},this.getState=e=>this[e],this.stateAccess={setState:this.setState,getState:this.getState}}seedRenderProps(){this.renderPropsSeeded||(this.renderPropsSeeded=!0,this.renderProps=e(this.propsConfig),this.requiredPropNames=new Set((this.propsConfig.required??[]).map(e=>e.propName)))}isRequired(e){return this.seedRenderProps(),this.requiredPropNames.has(e)}setRawProp(e,t){this.rawProps[e]=t}getRawProp(e){return this.rawProps[e]}setRenderProp(e,t){this.seedRenderProps(),this.renderProps[e]=t}unsetRenderProp(e){this.seedRenderProps(),this.renderProps[e]=void 0}getRenderProp(e){return this.seedRenderProps(),this.renderProps[e]}};n.stateLess=Object.freeze({setState:t,getState:t});export{n as t};
|
|
2
|
+
//# sourceMappingURL=base-web-component-DSLw_2co-RPD88MQa.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-web-component-
|
|
1
|
+
{"version":3,"file":"base-web-component-DSLw_2co-RPD88MQa.js","names":["buildDefaultPropsFromConfig","throwNoStateAccess","BaseWebComponent","key","value","definition"],"sources":["../../../../../components/dist/esm/base-web-component-DSLw_2co.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { d as buildDefaultPropsFromConfig } from './props-from-config-Dr6e6ZFX.js';\n\nfunction throwNoStateAccess() {\n throw new Error('This behavior does not use component state.');\n}\nclass BaseWebComponent {\n constructor() {\n this.rawProps = {};\n this.renderProps = {};\n this.requiredPropNames = new Set();\n this.renderPropsSeeded = false;\n this.setState = (key, value) => {\n this[key] = value;\n };\n this.getState = (key) => {\n return this[key];\n };\n this.stateAccess = {\n setState: this.setState,\n getState: this.getState,\n };\n }\n seedRenderProps() {\n var _a;\n if (this.renderPropsSeeded) {\n return;\n }\n this.renderPropsSeeded = true;\n this.renderProps = buildDefaultPropsFromConfig(this.propsConfig);\n this.requiredPropNames = new Set(((_a = this.propsConfig.required) !== null && _a !== void 0 ? _a : []).map((definition) => definition.propName));\n }\n isRequired(key) {\n this.seedRenderProps();\n return this.requiredPropNames.has(key);\n }\n setRawProp(key, value) {\n this.rawProps[key] = value;\n }\n getRawProp(key) {\n return this.rawProps[key];\n }\n setRenderProp(key, value) {\n this.seedRenderProps();\n this.renderProps[key] = value;\n }\n unsetRenderProp(key) {\n this.seedRenderProps();\n this.renderProps[key] = undefined;\n }\n getRenderProp(key) {\n this.seedRenderProps();\n return this.renderProps[key];\n }\n}\nBaseWebComponent.stateLess = Object.freeze({\n setState: throwNoStateAccess,\n getState: throwNoStateAccess,\n});\n\nexport { BaseWebComponent as B };\n"],"mappings":"A,6DAKA,SAASC,GAAqB,CAC1B,MAAU,MAAM,6CAA6C,CACjE,CACA,IAAMC,EAAN,KAAuB,CACnB,aAAc,CACV,KAAK,SAAW,CAAC,EACjB,KAAK,YAAc,CAAC,EACpB,KAAK,kBAAoB,IAAI,IAC7B,KAAK,kBAAoB,GACzB,KAAK,UAAY,EAAK,IAAU,CAC5B,KAAKC,GAAOC,CAChB,EACA,KAAK,SAAY,GACN,KAAKD,GAEhB,KAAK,YAAc,CACf,SAAU,KAAK,SACf,SAAU,KAAK,QACnB,CACJ,CACA,iBAAkB,CAEV,KAAK,oBAGT,KAAK,kBAAoB,GACzB,KAAK,YAAcH,EAA4B,KAAK,WAAW,EAC/D,KAAK,kBAAoB,IAAI,KAAW,KAAK,YAAY,UAA2C,CAAC,EAAA,CAAG,IAAK,GAAeK,EAAW,QAAQ,CAAC,EACpJ,CACA,WAAW,EAAK,CAEZ,OADA,KAAK,gBAAgB,EACd,KAAK,kBAAkB,IAAIF,CAAG,CACzC,CACA,WAAW,EAAK,EAAO,CACnB,KAAK,SAASA,GAAOC,CACzB,CACA,WAAW,EAAK,CACZ,OAAO,KAAK,SAASD,EACzB,CACA,cAAc,EAAK,EAAO,CACtB,KAAK,gBAAgB,EACrB,KAAK,YAAYA,GAAOC,CAC5B,CACA,gBAAgB,EAAK,CACjB,KAAK,gBAAgB,EACrB,KAAK,YAAYD,GAAO,IAAA,EAC5B,CACA,cAAc,EAAK,CAEf,OADA,KAAK,gBAAgB,EACd,KAAK,YAAYA,EAC5B,CACJ,EACA,EAAiB,UAAY,OAAO,OAAO,CACvC,SAAUF,EACV,SAAUA,CACd,CAAC,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./index-
|
|
2
|
-
//# sourceMappingURL=behavior-
|
|
1
|
+
import{o as e}from"./index-ollAPB5g.js";import{A as t,T as n,w as r}from"./index-CDhvlzPX-C15eU4TR.js";import{k as i,l as a}from"./props-from-config-Dr6e6ZFX-CebT1iS4.js";import{s as o}from"./component-CKK9TPXV-rHtZKC_p.js";import{t as s}from"./behavior-DyENPLvO-DGaqAoa2.js";var c=a(`syncValueBySelector`,void 0,i),l={optional:[o,c]},u=1,d=11,f=new Set([`KOL-COMBOBOX`,`KOL-INPUT-CHECKBOX`,`KOL-INPUT-COLOR`,`KOL-INPUT-DATE`,`KOL-INPUT-EMAIL`,`KOL-INPUT-FILE`,`KOL-INPUT-NUMBER`,`KOL-INPUT-PASSWORD`,`KOL-INPUT-RADIO`,`KOL-INPUT-RANGE`,`KOL-INPUT-TEXT`,`KOL-SELECT`,`KOL-SINGLE-SELECT`,`KOL-TEXTAREA`]),p=()=>{r(`A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.`)},m=class extends s{constructor(n,{host:i,type:a,name:o}){var s,c;super(n,l),this.experimentalMode=t(),this.setFormAssociatedValue=e=>{let t=this.formAssociated?.getAttribute(`name`);(t===null||t===``)&&r(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);let n=this.tryToStringifyValue(e);this.syncValue(e,n,this.formAssociated),this.syncValue(e,n,this.syncToOwnInput)},this.host=this.findHostWithShadowRoot(i),this.type=a,e()?.reflectInputValues&&f.has(this.host?.tagName??``)&&o&&((s=this.host)==null||s.querySelectorAll(`input,select,textarea`).forEach(e=>{var t;(t=this.host)==null||t.removeChild(e)}),this.formAssociated=this.createFormAssociatedElement(),this.formAssociated.setAttribute(`data-form-associated`,``),this.formAssociated.setAttribute(`hidden`,``),(c=this.host)==null||c.appendChild(this.formAssociated))}componentWillLoad(e){this.watchName(e.name),this.watchSyncValueBySelector(e.syncValueBySelector)}watchName(e){o.apply(e,e=>{this.setRenderProp(`name`,e),this.setNameAttribute(e)}),e===void 0&&p()}watchSyncValueBySelector(e){if(this.experimentalMode&&typeof e==`string`){this.setRenderProp(`syncValueBySelector`,e);let t=document.querySelector(e);t&&(this.syncToOwnInput=t)}}setNameAttribute(e){this.setAttribute(`name`,this.formAssociated,e)}createFormAssociatedElement(){switch(this.type){case`color`:case`date`:case`email`:case`file`:case`number`:case`password`:case`radio`:case`range`:case`text`:{let e=document.createElement(`input`);return e.setAttribute(`type`,this.type),e}case`select`:{let e=document.createElement(`select`);return e.setAttribute(`multiple`,``),e}case`textarea`:return document.createElement(`textarea`);default:{let e=document.createElement(`input`);return e.setAttribute(`type`,`hidden`),e}}}findHostWithShadowRoot(e){for(;e?.shadowRoot===null&&e!==document.body;){let t=e.parentNode;e=t?.nodeType===d&&`host`in t?t.host:t?.nodeType===u?t:void 0}return e}setAttribute(e,t,n){if(this.experimentalMode)try{if(n=typeof n==`object`&&n?JSON.stringify(n):n,typeof n==`boolean`||typeof n==`number`||typeof n==`string`)t?.setAttribute(e,`${n}`);else throw Error(`Invalid value type: ${typeof n}`)}catch{t?.removeAttribute(e)}}tryToStringifyValue(e){try{return typeof e==`object`&&e?JSON.stringify(e).toString():e==null?null:e.toString()}catch(e){return n(`The form field raw value is not able to stringify! ${e}`),``}}syncValue(e,t,n){if(n)switch(this.type){case`file`:typeof FileList<`u`&&e instanceof FileList?n.files=e:n.value=``;break;case`select`:n.tagName===`SELECT`?this.syncSelectOptions(e,n):this.syncValueAttribute(t,n);break;case`radio`:typeof t==`string`&&(n.setAttribute(`value`,t),n.setAttribute(`checked`,``),n.value=t);break;default:this.syncValueAttribute(t,n)}}syncSelectOptions(e,t){t.querySelectorAll(`option`).forEach(e=>{t.removeChild(e)}),(Array.isArray(e)?e:e==null?[]:[e]).forEach(e=>{let n=this.tryToStringifyValue(e);if(typeof n==`string`){let e=document.createElement(`option`);e.setAttribute(`value`,n),e.setAttribute(`selected`,``),t.appendChild(e)}})}syncValueAttribute(e,t){typeof e==`string`?(t.setAttribute(`value`,e),t.value=e):(t.removeAttribute(`value`),t.value=``)}};export{m as t};
|
|
2
|
+
//# sourceMappingURL=behavior-BovfhIaw-BIOIU2F0.js.map
|
package/app/dist/assets/{behavior-BOUrKwXj-9_5Z59tY.js.map → behavior-BovfhIaw-BIOIU2F0.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior-BOUrKwXj-9_5Z59tY.js","names":["getOptions","getExperimentalMode","devWarning","devHint","normalizeString","createPropDefinition","nameProp","BaseBehavior","syncValueBySelectorProp","formAssociationPropsConfig","NODE_TYPE_ELEMENT","NODE_TYPE_DOCUMENT_FRAGMENT","ASSOCIATED_TAG_NAMES","hintMissingName","FormAssociationBehavior","_d","_e","stateAccess","name","strValue","rawValue","host","type","_a","el","props","value","v","input","select","parent","element","qualifiedName","associatedElement","strValueItem","option"],"sources":["../../../../../components/dist/esm/behavior-BOUrKwXj.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { g as getOptions } from './bootstrap-tModZ1Zn.js';\nimport { D as getExperimentalMode, e as devHint, l as devWarning } from './prop.validators-kX7xC6qj.js';\nimport { c as createPropDefinition, b as normalizeString } from './props-from-config-B_k4h7ak.js';\nimport { n as nameProp } from './component-ComtEOJP.js';\nimport { B as BaseBehavior } from './behavior-vf9LgKnJ.js';\n\nconst syncValueBySelectorProp = createPropDefinition('syncValueBySelector', undefined, normalizeString);\n\nconst formAssociationPropsConfig = {\n optional: [nameProp, syncValueBySelectorProp],\n};\n\nconst NODE_TYPE_ELEMENT = 1;\nconst NODE_TYPE_DOCUMENT_FRAGMENT = 11;\nconst ASSOCIATED_TAG_NAMES = new Set([\n 'KOL-COMBOBOX',\n 'KOL-INPUT-CHECKBOX',\n 'KOL-INPUT-COLOR',\n 'KOL-INPUT-DATE',\n 'KOL-INPUT-EMAIL',\n 'KOL-INPUT-FILE',\n 'KOL-INPUT-NUMBER',\n 'KOL-INPUT-PASSWORD',\n 'KOL-INPUT-RADIO',\n 'KOL-INPUT-RANGE',\n 'KOL-INPUT-TEXT',\n 'KOL-SELECT',\n 'KOL-SINGLE-SELECT',\n 'KOL-TEXTAREA',\n]);\nconst hintMissingName = () => {\n devHint(`A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.`);\n};\nclass FormAssociationBehavior extends BaseBehavior {\n constructor(stateAccess, { host, type, name }) {\n var _a, _b, _c, _d, _e;\n super(stateAccess, formAssociationPropsConfig);\n this.experimentalMode = getExperimentalMode();\n this.setFormAssociatedValue = (rawValue) => {\n var _a;\n const name = (_a = this.formAssociated) === null || _a === void 0 ? void 0 : _a.getAttribute('name');\n if (name === null || name === '') {\n devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n }\n const strValue = this.tryToStringifyValue(rawValue);\n this.syncValue(rawValue, strValue, this.formAssociated);\n this.syncValue(rawValue, strValue, this.syncToOwnInput);\n };\n this.host = this.findHostWithShadowRoot(host);\n this.type = type;\n if (((_a = getOptions()) === null || _a === void 0 ? void 0 : _a.reflectInputValues) && ASSOCIATED_TAG_NAMES.has((_c = (_b = this.host) === null || _b === void 0 ? void 0 : _b.tagName) !== null && _c !== void 0 ? _c : '') && name) {\n (_d = this.host) === null || _d === void 0 ? void 0 : _d.querySelectorAll('input,select,textarea').forEach((el) => {\n var _a;\n (_a = this.host) === null || _a === void 0 ? void 0 : _a.removeChild(el);\n });\n this.formAssociated = this.createFormAssociatedElement();\n this.formAssociated.setAttribute('data-form-associated', '');\n this.formAssociated.setAttribute('hidden', '');\n (_e = this.host) === null || _e === void 0 ? void 0 : _e.appendChild(this.formAssociated);\n }\n }\n componentWillLoad(props) {\n this.watchName(props.name);\n this.watchSyncValueBySelector(props.syncValueBySelector);\n }\n watchName(value) {\n nameProp.apply(value, (v) => {\n this.setRenderProp('name', v);\n this.setNameAttribute(v);\n });\n if (typeof value === 'undefined') {\n hintMissingName();\n }\n }\n watchSyncValueBySelector(value) {\n if (this.experimentalMode && typeof value === 'string') {\n this.setRenderProp('syncValueBySelector', value);\n const input = document.querySelector(value);\n if (input) {\n this.syncToOwnInput = input;\n }\n }\n }\n setNameAttribute(value) {\n this.setAttribute('name', this.formAssociated, value);\n }\n createFormAssociatedElement() {\n switch (this.type) {\n case 'color':\n case 'date':\n case 'email':\n case 'file':\n case 'number':\n case 'password':\n case 'radio':\n case 'range':\n case 'text': {\n const input = document.createElement('input');\n input.setAttribute('type', this.type);\n return input;\n }\n case 'select': {\n const select = document.createElement('select');\n select.setAttribute('multiple', '');\n return select;\n }\n case 'textarea':\n return document.createElement('textarea');\n default: {\n const input = document.createElement('input');\n input.setAttribute('type', 'hidden');\n return input;\n }\n }\n }\n findHostWithShadowRoot(host) {\n while ((host === null || host === void 0 ? void 0 : host.shadowRoot) === null && host !== document.body) {\n const parent = host.parentNode;\n if ((parent === null || parent === void 0 ? void 0 : parent.nodeType) === NODE_TYPE_DOCUMENT_FRAGMENT && 'host' in parent) {\n host = parent.host;\n }\n else {\n host = (parent === null || parent === void 0 ? void 0 : parent.nodeType) === NODE_TYPE_ELEMENT ? parent : undefined;\n }\n }\n return host;\n }\n setAttribute(qualifiedName, element, value) {\n if (this.experimentalMode) {\n try {\n value = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n if (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n element === null || element === void 0 ? void 0 : element.setAttribute(qualifiedName, `${value}`);\n }\n else {\n throw new Error(`Invalid value type: ${typeof value}`);\n }\n }\n catch (_a) {\n element === null || element === void 0 ? void 0 : element.removeAttribute(qualifiedName);\n }\n }\n }\n tryToStringifyValue(value) {\n try {\n return typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n }\n catch (e) {\n devWarning(`The form field raw value is not able to stringify! ${e}`);\n return '';\n }\n }\n syncValue(rawValue, strValue, associatedElement) {\n if (associatedElement) {\n switch (this.type) {\n case 'file':\n if (typeof FileList !== 'undefined' && rawValue instanceof FileList) {\n associatedElement.files = rawValue;\n }\n else {\n associatedElement.value = '';\n }\n break;\n case 'select':\n if (associatedElement.tagName === 'SELECT') {\n this.syncSelectOptions(rawValue, associatedElement);\n }\n else {\n this.syncValueAttribute(strValue, associatedElement);\n }\n break;\n case 'radio':\n if (typeof strValue === 'string') {\n associatedElement.setAttribute('value', strValue);\n associatedElement.setAttribute('checked', '');\n associatedElement.value = strValue;\n }\n break;\n default:\n this.syncValueAttribute(strValue, associatedElement);\n }\n }\n }\n syncSelectOptions(rawValue, select) {\n select.querySelectorAll('option').forEach((el) => {\n select.removeChild(el);\n });\n const values = Array.isArray(rawValue) ? rawValue : rawValue === null || rawValue === undefined ? [] : [rawValue];\n values.forEach((value) => {\n const strValueItem = this.tryToStringifyValue(value);\n if (typeof strValueItem === 'string') {\n const option = document.createElement('option');\n option.setAttribute('value', strValueItem);\n option.setAttribute('selected', '');\n select.appendChild(option);\n }\n });\n }\n syncValueAttribute(strValue, element) {\n if (typeof strValue === 'string') {\n element.setAttribute('value', strValue);\n element.value = strValue;\n }\n else {\n element.removeAttribute('value');\n element.value = '';\n }\n }\n}\n\nexport { FormAssociationBehavior as F };\n"],"mappings":"A,oRASA,IAAMQ,EAA0BH,EAAqB,sBAAuB,IAAA,GAAWD,CAAe,EAEhGK,EAA6B,CAC/B,SAAU,CAACH,EAAUE,CAAuB,CAChD,EAEME,EAAoB,EACpBC,EAA8B,GAC9BC,EAAuB,IAAI,IAAI,CACjC,eACA,qBACA,kBACA,iBACA,kBACA,iBACA,mBACA,qBACA,kBACA,kBACA,iBACA,aACA,oBACA,cACJ,CAAC,EACKC,MAAwB,CAC1BV,EAAQ,uKAAuK,C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QA,IAGhBY,EAAQ,gBAAgB,OAAO,EAC/B,EAAQ,MAAQ,GAExB,CACJ,E"}
|
|
1
|
+
{"version":3,"file":"behavior-BovfhIaw-BIOIU2F0.js","names":["getOptions","getExperimentalMode","devWarning","devHint","normalizeString","createPropDefinition","nameProp","BaseBehavior","syncValueBySelectorProp","formAssociationPropsConfig","NODE_TYPE_ELEMENT","NODE_TYPE_DOCUMENT_FRAGMENT","ASSOCIATED_TAG_NAMES","hintMissingName","FormAssociationBehavior","_d","_e","stateAccess","name","strValue","rawValue","host","type","_a","el","props","value","v","input","select","parent","element","qualifiedName","associatedElement","strValueItem","option"],"sources":["../../../../../components/dist/esm/behavior-BovfhIaw.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { g as getOptions } from './bootstrap-tModZ1Zn.js';\nimport { D as getExperimentalMode, e as devHint, l as devWarning } from './prop.validators-kX7xC6qj.js';\nimport { c as createPropDefinition, b as normalizeString } from './props-from-config-Dr6e6ZFX.js';\nimport { n as nameProp } from './component-CKK9TPXV.js';\nimport { B as BaseBehavior } from './behavior-DyENPLvO.js';\n\nconst syncValueBySelectorProp = createPropDefinition('syncValueBySelector', undefined, normalizeString);\n\nconst formAssociationPropsConfig = {\n optional: [nameProp, syncValueBySelectorProp],\n};\n\nconst NODE_TYPE_ELEMENT = 1;\nconst NODE_TYPE_DOCUMENT_FRAGMENT = 11;\nconst ASSOCIATED_TAG_NAMES = new Set([\n 'KOL-COMBOBOX',\n 'KOL-INPUT-CHECKBOX',\n 'KOL-INPUT-COLOR',\n 'KOL-INPUT-DATE',\n 'KOL-INPUT-EMAIL',\n 'KOL-INPUT-FILE',\n 'KOL-INPUT-NUMBER',\n 'KOL-INPUT-PASSWORD',\n 'KOL-INPUT-RADIO',\n 'KOL-INPUT-RANGE',\n 'KOL-INPUT-TEXT',\n 'KOL-SELECT',\n 'KOL-SINGLE-SELECT',\n 'KOL-TEXTAREA',\n]);\nconst hintMissingName = () => {\n devHint(`A name on input fields or switches is not strictly required, but it might be relevant for the autocomplete function and for the static submission of the input field.`);\n};\nclass FormAssociationBehavior extends BaseBehavior {\n constructor(stateAccess, { host, type, name }) {\n var _a, _b, _c, _d, _e;\n super(stateAccess, formAssociationPropsConfig);\n this.experimentalMode = getExperimentalMode();\n this.setFormAssociatedValue = (rawValue) => {\n var _a;\n const name = (_a = this.formAssociated) === null || _a === void 0 ? void 0 : _a.getAttribute('name');\n if (name === null || name === '') {\n devHint(` The form field (${this.type}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n }\n const strValue = this.tryToStringifyValue(rawValue);\n this.syncValue(rawValue, strValue, this.formAssociated);\n this.syncValue(rawValue, strValue, this.syncToOwnInput);\n };\n this.host = this.findHostWithShadowRoot(host);\n this.type = type;\n if (((_a = getOptions()) === null || _a === void 0 ? void 0 : _a.reflectInputValues) && ASSOCIATED_TAG_NAMES.has((_c = (_b = this.host) === null || _b === void 0 ? void 0 : _b.tagName) !== null && _c !== void 0 ? _c : '') && name) {\n (_d = this.host) === null || _d === void 0 ? void 0 : _d.querySelectorAll('input,select,textarea').forEach((el) => {\n var _a;\n (_a = this.host) === null || _a === void 0 ? void 0 : _a.removeChild(el);\n });\n this.formAssociated = this.createFormAssociatedElement();\n this.formAssociated.setAttribute('data-form-associated', '');\n this.formAssociated.setAttribute('hidden', '');\n (_e = this.host) === null || _e === void 0 ? void 0 : _e.appendChild(this.formAssociated);\n }\n }\n componentWillLoad(props) {\n this.watchName(props.name);\n this.watchSyncValueBySelector(props.syncValueBySelector);\n }\n watchName(value) {\n nameProp.apply(value, (v) => {\n this.setRenderProp('name', v);\n this.setNameAttribute(v);\n });\n if (typeof value === 'undefined') {\n hintMissingName();\n }\n }\n watchSyncValueBySelector(value) {\n if (this.experimentalMode && typeof value === 'string') {\n this.setRenderProp('syncValueBySelector', value);\n const input = document.querySelector(value);\n if (input) {\n this.syncToOwnInput = input;\n }\n }\n }\n setNameAttribute(value) {\n this.setAttribute('name', this.formAssociated, value);\n }\n createFormAssociatedElement() {\n switch (this.type) {\n case 'color':\n case 'date':\n case 'email':\n case 'file':\n case 'number':\n case 'password':\n case 'radio':\n case 'range':\n case 'text': {\n const input = document.createElement('input');\n input.setAttribute('type', this.type);\n return input;\n }\n case 'select': {\n const select = document.createElement('select');\n select.setAttribute('multiple', '');\n return select;\n }\n case 'textarea':\n return document.createElement('textarea');\n default: {\n const input = document.createElement('input');\n input.setAttribute('type', 'hidden');\n return input;\n }\n }\n }\n findHostWithShadowRoot(host) {\n while ((host === null || host === void 0 ? void 0 : host.shadowRoot) === null && host !== document.body) {\n const parent = host.parentNode;\n if ((parent === null || parent === void 0 ? void 0 : parent.nodeType) === NODE_TYPE_DOCUMENT_FRAGMENT && 'host' in parent) {\n host = parent.host;\n }\n else {\n host = (parent === null || parent === void 0 ? void 0 : parent.nodeType) === NODE_TYPE_ELEMENT ? parent : undefined;\n }\n }\n return host;\n }\n setAttribute(qualifiedName, element, value) {\n if (this.experimentalMode) {\n try {\n value = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n if (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n element === null || element === void 0 ? void 0 : element.setAttribute(qualifiedName, `${value}`);\n }\n else {\n throw new Error(`Invalid value type: ${typeof value}`);\n }\n }\n catch (_a) {\n element === null || element === void 0 ? void 0 : element.removeAttribute(qualifiedName);\n }\n }\n }\n tryToStringifyValue(value) {\n try {\n return typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n }\n catch (e) {\n devWarning(`The form field raw value is not able to stringify! ${e}`);\n return '';\n }\n }\n syncValue(rawValue, strValue, associatedElement) {\n if (associatedElement) {\n switch (this.type) {\n case 'file':\n if (typeof FileList !== 'undefined' && rawValue instanceof FileList) {\n associatedElement.files = rawValue;\n }\n else {\n associatedElement.value = '';\n }\n break;\n case 'select':\n if (associatedElement.tagName === 'SELECT') {\n this.syncSelectOptions(rawValue, associatedElement);\n }\n else {\n this.syncValueAttribute(strValue, associatedElement);\n }\n break;\n case 'radio':\n if (typeof strValue === 'string') {\n associatedElement.setAttribute('value', strValue);\n associatedElement.setAttribute('checked', '');\n associatedElement.value = strValue;\n }\n break;\n default:\n this.syncValueAttribute(strValue, associatedElement);\n }\n }\n }\n syncSelectOptions(rawValue, select) {\n select.querySelectorAll('option').forEach((el) => {\n select.removeChild(el);\n });\n const values = Array.isArray(rawValue) ? rawValue : rawValue === null || rawValue === undefined ? [] : [rawValue];\n values.forEach((value) => {\n const strValueItem = this.tryToStringifyValue(value);\n if (typeof strValueItem === 'string') {\n const option = document.createElement('option');\n option.setAttribute('value', strValueItem);\n option.setAttribute('selected', '');\n select.appendChild(option);\n }\n });\n }\n syncValueAttribute(strValue, element) {\n if (typeof strValue === 'string') {\n element.setAttribute('value', strValue);\n element.value = strValue;\n }\n else {\n element.removeAttribute('value');\n element.value = '';\n }\n }\n}\n\nexport { FormAssociationBehavior as F };\n"],"mappings":"A,oRASA,IAAMQ,EAA0BH,EAAqB,sBAAuB,IAAA,GAAWD,CAAe,EAEhGK,EAA6B,CAC/B,SAAU,CAACH,EAAUE,CAAuB,CAChD,EAEME,EAAoB,EACpBC,EAA8B,GAC9BC,EAAuB,IAAI,IAAI,CACjC,eACA,qBACA,kBACA,iBACA,kBACA,iBACA,mBACA,qBACA,kBACA,kBACA,iBACA,aACA,oBACA,cACJ,CAAC,EACKC,MAAwB,CAC1BV,EAAQ,uKAAuK,CACnL,EACMW,EAAN,cAAsCP,CAAa,CAC/C,YAAY,EAAa,CAAE,OAAM,OAAM,QAAQ,CAC3C,IAAgBQ,EAAIC,EACpB,MAAMC,EAAaR,CAA0B,EAC7C,KAAK,iBAAmBR,EAAoB,EAC5C,KAAK,uBAA0B,GAAa,CAExC,IAAMiB,EAAa,KAAK,gBAAwD,aAAa,MAAM,GAC/FA,IAAS,MAAQA,IAAS,KAC1Bf,EAAQ,oBAAoB,KAAK,KAAK,uFAAuF,EAEjI,IAAMgB,EAAW,KAAK,oBAAoBC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SACvD,EAAkB,MAAQA,EAG1B,EAAkB,MAAQ,GAE9B,MACJ,IAAK,SACGa,EAAkB,UAAY,SAC9B,KAAK,kBAAkBb,EAAUa,CAAiB,EAGlD,KAAK,mBAAmBd,EAAUc,CAAiB,EAEvD,MACJ,IAAK,QACG,OAAOd,GAAa,WACpBc,EAAkB,aAAa,QAASd,CAAQ,EAChDc,EAAkB,aAAa,UAAW,EAAE,EAC5C,EAAkB,MAAQd,GAE9B,MACJ,QACI,KAAK,mBAAmBA,EAAUc,CAAiB,CAC3D,CAER,CACA,kBAAkB,EAAU,EAAQ,CAChCJ,EAAO,iBAAiB,QAAQ,CAAC,CAAC,QAAS,GAAO,CAC9CA,EAAO,YAAYL,CAAE,CACzB,CAAC,GACc,MAAM,QAAQJ,CAAQ,EAAIA,EAAWA,GAAa,KAAiC,CAAC,EAAI,CAACA,CAAQ,EAAA,CACzG,QAAS,GAAU,CACtB,IAAMc,EAAe,KAAK,oBAAoBR,CAAK,EACnD,GAAI,OAAOQ,GAAiB,SAAU,CAClC,IAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9CA,EAAO,aAAa,QAASD,CAAY,EACzCC,EAAO,aAAa,WAAY,EAAE,EAClCN,EAAO,YAAYM,CAAM,CAC7B,CACJ,CAAC,CACL,CACA,mBAAmB,EAAU,EAAS,CAC9B,OAAOhB,GAAa,UACpBY,EAAQ,aAAa,QAASZ,CAAQ,EACtC,EAAQ,MAAQA,IAGhBY,EAAQ,gBAAgB,OAAO,EAC/B,EAAQ,MAAQ,GAExB,CACJ,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./dev.utils-
|
|
2
|
-
//# sourceMappingURL=behavior-
|
|
1
|
+
import{t as e}from"./dev.utils-DMRf5JjT-CtlEcXbM.js";import"./index-CDhvlzPX-C15eU4TR.js";import{E as t,b as n,k as r,l as i,p as a}from"./props-from-config-Dr6e6ZFX-CebT1iS4.js";import{t as o}from"./behavior-DyENPLvO-DGaqAoa2.js";import{t as s}from"./i18n-DsSD0Coa-CfeJN1DK.js";var c=i(`hasCounter`,!1,n),l=i(`maxLength`,void 0,t,e=>e>=0),u=[`hard`,`soft`];function d(e){let t=r(e);if(a(t,u))return t;throw Error(`Invalid max length behavior: ${t}`)}var f=i(`maxLengthBehavior`,`hard`,d),p={optional:[c,f,l]},m=(e,t,n)=>{if(typeof t!=`number`)return s(`kol-character-counter-current`,{placeholders:{current:String(n)}});if(e===`soft`){let e=t-n;return e<0?s(`kol-character-limit-exceeded`,{placeholders:{over:String(Math.abs(e))}}):s(`kol-character-limit-remaining`,{placeholders:{remaining:String(e)}})}return s(`kol-character-counter-current-of-max`,{placeholders:{current:String(n),max:String(t)}})},h=(e,t,n)=>{if(typeof t!=`number`)return s(`kol-character-counter-current`,{placeholders:{current:String(n)}});if(e===`soft`){let e=t-n;return e<0?s(`kol-character-limit-exceeded`,{placeholders:{over:String(Math.abs(e))}}):s(`kol-character-limit-remaining`,{placeholders:{remaining:String(e)}})}return s(`kol-character-counter-current-of-max-aria`,{placeholders:{current:String(n),max:String(t)}})},g=(e,t,n)=>e===`hard`&&typeof t==`number`&&n>=t?s(`kol-character-counter-max-aria`):``,_=e=>e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey,v=`\xA0`,y=1e3,b=class extends o{constructor(e){super(e,p),this.reannounceToggle=!1,this.setVisualRef=e=>{this.visualSpan=e},this.setAriaRef=e=>{this.ariaSpan=e},this.handleKeyDown=(e,t)=>{let{maxLength:n,maxLengthBehavior:r}=this.getLimit();r!==`hard`||typeof n!=`number`||t<n||_(e)&&this.retriggerAria(t)}}componentWillLoad(e){this.watchHasCounter(e.hasCounter),this.watchMaxLength(e.maxLength),this.watchMaxLengthBehavior(e.maxLengthBehavior)}watchHasCounter(e){c.apply(e,e=>this.setRenderProp(`hasCounter`,e))}watchMaxLength(e){l.apply(e,e=>this.setRenderProp(`maxLength`,e))}watchMaxLengthBehavior(e){f.apply(e,e=>this.setRenderProp(`maxLengthBehavior`,e))}hasCounter(){return this.getRenderProp(`hasCounter`)===!0}hasSoftLimit(){let{maxLength:e,maxLengthBehavior:t}=this.getLimit();return typeof e==`number`&&t===`soft`}getMaxLengthAttribute(){let{maxLength:e,maxLengthBehavior:t}=this.getLimit();return t===`hard`?e:void 0}getCounterProps(){if(!this.hasCounter())return;let{maxLength:e,maxLengthBehavior:t}=this.getLimit();return{maxLength:e,maxLengthBehavior:t,visualRef:this.setVisualRef,ariaRef:this.setAriaRef}}getCharacterLimitHintId(t){return typeof this.getRenderProp(`maxLength`)==`number`&&!this.hasCounter()?e(t,`character-limit-hint`):void 0}update(e){let t=this.getLimit();this.updateVisual(e,t),clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.updateAria(e,t),y)}updateImmediate(e){let t=this.getLimit();this.updateVisual(e,t),clearTimeout(this.debounceTimer),this.updateAria(e,t)}retriggerAria(e){if(!this.ariaSpan)return;let t=this.getLimit();clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.updateAria(e,t,!0),y)}destroy(){clearTimeout(this.debounceTimer)}getLimit(){return{maxLength:this.getRenderProp(`maxLength`),maxLengthBehavior:this.getRenderProp(`maxLengthBehavior`)}}updateVisual(e,{maxLength:t,maxLengthBehavior:n}){this.visualSpan&&(this.visualSpan.innerText=m(n,t,e),this.visualSpan.classList.toggle(`kol-form-field__counter--exceeded`,n===`soft`&&typeof t==`number`&&e>t))}updateAria(e,{maxLength:t,maxLengthBehavior:n},r=!1){if(!this.ariaSpan)return;let i=[h(n,t,e),g(n,t,e)].filter(Boolean).join(` `);r&&(this.reannounceToggle=!this.reannounceToggle,this.reannounceToggle&&(i+=v)),this.ariaSpan.innerText=i}};export{b as t};
|
|
2
|
+
//# sourceMappingURL=behavior-DYLnL5QE-DQKBoqbb.js.map
|
package/app/dist/assets/{behavior-BeStbAbq-CUzR4gB2.js.map → behavior-DYLnL5QE-DQKBoqbb.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior-BeStbAbq-CUzR4gB2.js","names":["createRelatedUniqueId","normalizeNumber","normalizeBoolean","normalizeString","createPropDefinition","isEnumOption","BaseBehavior","translate","hasCounterProp","maxLengthProp","value","MAX_LENGTH_BEHAVIOR_OPTIONS","normalizeMaxLengthBehavior","str","maxLengthBehaviorProp","counterPropsConfig","getCounterVisualText","maxLength","currentLength","maxLengthBehavior","remaining","getCounterAriaText","getCounterMaxText","isCharacterInputKey","event","REANNOUNCE_MARKER","ARIA_DEBOUNCE_MS","CounterBehavior","stateAccess","el","props","v","id","limit","text","forceReannounce"],"sources":["../../../../../components/dist/esm/behavior-BeStbAbq.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { a as createRelatedUniqueId } from './dev.utils-CS2a1Xpz.js';\nimport './prop.validators-kX7xC6qj.js';\nimport { c as createPropDefinition, n as normalizeBoolean, D as normalizeNumber, b as normalizeString, i as isEnumOption } from './props-from-config-B_k4h7ak.js';\nimport { B as BaseBehavior } from './behavior-vf9LgKnJ.js';\nimport { t as translate } from './i18n-DsSD0Coa.js';\n\nconst hasCounterProp = createPropDefinition('hasCounter', false, normalizeBoolean);\n\nconst maxLengthProp = createPropDefinition('maxLength', undefined, normalizeNumber, (value) => value >= 0);\n\nconst MAX_LENGTH_BEHAVIOR_OPTIONS = ['hard', 'soft'];\nfunction normalizeMaxLengthBehavior(value) {\n const str = normalizeString(value);\n if (isEnumOption(str, MAX_LENGTH_BEHAVIOR_OPTIONS)) {\n return str;\n }\n throw new Error(`Invalid max length behavior: ${str}`);\n}\nconst maxLengthBehaviorProp = createPropDefinition('maxLengthBehavior', 'hard', normalizeMaxLengthBehavior);\n\nconst counterPropsConfig = {\n optional: [hasCounterProp, maxLengthBehaviorProp, maxLengthProp],\n};\n\nconst getCounterVisualText = (maxLengthBehavior, maxLength, currentLength) => {\n if (typeof maxLength !== 'number') {\n return translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n }\n if (maxLengthBehavior === 'soft') {\n const remaining = maxLength - currentLength;\n return remaining < 0\n ? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n : translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n }\n return translate('kol-character-counter-current-of-max', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\nconst getCounterAriaText = (maxLengthBehavior, maxLength, currentLength) => {\n if (typeof maxLength !== 'number') {\n return translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n }\n if (maxLengthBehavior === 'soft') {\n const remaining = maxLength - currentLength;\n return remaining < 0\n ? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n : translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n }\n return translate('kol-character-counter-current-of-max-aria', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\nconst getCounterMaxText = (maxLengthBehavior, maxLength, currentLength) => {\n if (maxLengthBehavior === 'hard' && typeof maxLength === 'number' && currentLength >= maxLength) {\n return translate('kol-character-counter-max-aria');\n }\n return '';\n};\n\nconst isCharacterInputKey = (event) => event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;\nconst REANNOUNCE_MARKER = ' ';\nconst ARIA_DEBOUNCE_MS = 1000;\nclass CounterBehavior extends BaseBehavior {\n constructor(stateAccess) {\n super(stateAccess, counterPropsConfig);\n this.reannounceToggle = false;\n this.setVisualRef = (el) => {\n this.visualSpan = el;\n };\n this.setAriaRef = (el) => {\n this.ariaSpan = el;\n };\n this.handleKeyDown = (event, currentLength) => {\n const { maxLength, maxLengthBehavior } = this.getLimit();\n if (maxLengthBehavior !== 'hard' || typeof maxLength !== 'number' || currentLength < maxLength)\n return;\n if (!isCharacterInputKey(event))\n return;\n this.retriggerAria(currentLength);\n };\n }\n componentWillLoad(props) {\n this.watchHasCounter(props.hasCounter);\n this.watchMaxLength(props.maxLength);\n this.watchMaxLengthBehavior(props.maxLengthBehavior);\n }\n watchHasCounter(value) {\n hasCounterProp.apply(value, (v) => this.setRenderProp('hasCounter', v));\n }\n watchMaxLength(value) {\n maxLengthProp.apply(value, (v) => this.setRenderProp('maxLength', v));\n }\n watchMaxLengthBehavior(value) {\n maxLengthBehaviorProp.apply(value, (v) => this.setRenderProp('maxLengthBehavior', v));\n }\n hasCounter() {\n return this.getRenderProp('hasCounter') === true;\n }\n hasSoftLimit() {\n const { maxLength, maxLengthBehavior } = this.getLimit();\n return typeof maxLength === 'number' && maxLengthBehavior === 'soft';\n }\n getMaxLengthAttribute() {\n const { maxLength, maxLengthBehavior } = this.getLimit();\n return maxLengthBehavior === 'hard' ? maxLength : undefined;\n }\n getCounterProps() {\n if (!this.hasCounter()) {\n return undefined;\n }\n const { maxLength, maxLengthBehavior } = this.getLimit();\n return { maxLength, maxLengthBehavior, visualRef: this.setVisualRef, ariaRef: this.setAriaRef };\n }\n getCharacterLimitHintId(id) {\n return typeof this.getRenderProp('maxLength') === 'number' && !this.hasCounter() ? createRelatedUniqueId(id, 'character-limit-hint') : undefined;\n }\n update(currentLength) {\n const limit = this.getLimit();\n this.updateVisual(currentLength, limit);\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit), ARIA_DEBOUNCE_MS);\n }\n updateImmediate(currentLength) {\n const limit = this.getLimit();\n this.updateVisual(currentLength, limit);\n clearTimeout(this.debounceTimer);\n this.updateAria(currentLength, limit);\n }\n retriggerAria(currentLength) {\n if (!this.ariaSpan)\n return;\n const limit = this.getLimit();\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit, true), ARIA_DEBOUNCE_MS);\n }\n destroy() {\n clearTimeout(this.debounceTimer);\n }\n getLimit() {\n return { maxLength: this.getRenderProp('maxLength'), maxLengthBehavior: this.getRenderProp('maxLengthBehavior') };\n }\n updateVisual(currentLength, { maxLength, maxLengthBehavior }) {\n if (!this.visualSpan)\n return;\n this.visualSpan.innerText = getCounterVisualText(maxLengthBehavior, maxLength, currentLength);\n this.visualSpan.classList.toggle('kol-form-field__counter--exceeded', maxLengthBehavior === 'soft' && typeof maxLength === 'number' && currentLength > maxLength);\n }\n updateAria(currentLength, { maxLength, maxLengthBehavior }, forceReannounce = false) {\n if (!this.ariaSpan)\n return;\n let text = [getCounterAriaText(maxLengthBehavior, maxLength, currentLength), getCounterMaxText(maxLengthBehavior, maxLength, currentLength)]\n .filter(Boolean)\n .join(' ');\n if (forceReannounce) {\n this.reannounceToggle = !this.reannounceToggle;\n if (this.reannounceToggle) {\n text += REANNOUNCE_MARKER;\n }\n }\n this.ariaSpan.innerText = text;\n }\n}\n\nexport { CounterBehavior as C };\n"],"mappings":"A,uRASA,IAAMQ,EAAiBJ,EAAqB,aAAc,GAAOF,CAAgB,EAE3EO,EAAgBL,EAAqB,YAAa,IAAA,GAAWH,EAAkB,GAAUS,GAAS,CAAC,EAEnGC,EAA8B,CAAC,OAAQ,MAAM,EACnD,SAASC,EAA2B,EAAO,CACvC,IAAMC,EAAMV,EAAgBO,CAAK,EACjC,GAAIL,EAAaQ,EAAKF,CAA2B,EAC7C,OAAOE,EAEX,MAAU,MAAM,gCAAgCA,GAAK,CACzD,CACA,IAAMC,EAAwBV,EAAqB,oBAAqB,OAAQQ,CAA0B,EAEpGG,EAAqB,CACvB,SAAU,CAACP,EAAgBM,EAAuBL,CAAa,CACnE,EAEMO,GAAwB,EAAmB,EAAW,IAAkB,CAC1E,GAAI,OAAOC,GAAc,SACrB,OAAOV,EAAU,gCAAiC,CAAE,aAAc,CAAE,QAAS,OAAOW,CAAa,CAAE,CAAE,CAAC,EAE1G,GAAIC,IAAsB,OAAQ,CAC9B,IAAMC,EAAYH,EAAYC,EAC9B,OAAOE,EAAY,EACbb,EAAU,+BAAgC,CAAE,aAAc,CAAE,KAAM,OAAO,KAAK,IAAIa,CAAS,CAAC,CAAE,CAAE,CAAC,EACjGb,EAAU,gCAAiC,CAAE,aAAc,CAAE,UAAW,OAAOa,CAAS,CAAE,CAA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AAaf,EAAee,CAAK,EACtC,aAAa,KAAK,aAAa,EAC/B,KAAK,WAAWf,EAAee,CAAK,CACxC,CACA,cAAc,EAAe,CACzB,GAAI,CAAC,KAAK,SACN,OACJ,IAAMA,EAAQ,KAAK,SAAS,EAC5B,aAAa,KAAK,aAAa,EAC/B,KAAK,cAAgB,eAAiB,KAAK,WAAWf,EAAee,EAAO,EAAI,EAAGP,CAAgB,CACvG,CACA,SAAU,CACN,aAAa,KAAK,aAAa,CACnC,CACA,UAAW,CACP,MAAO,CAAE,UAAW,KAAK,cAAc,WAAW,EAAG,kBAAmB,KAAK,cAAc,mBAAmB,CAAE,CACpH,CACA,aAAa,EAAe,CAAE,YAAW,qBAAqB,CACrD,KAAK,aAEV,KAAK,WAAW,UAAYV,EAAqBG,EAAmBF,EAAWC,CAAa,EAC5F,KAAK,WAAW,UAAU,OAAO,oCAAqCC,IAAsB,QAAU,OAAOF,GAAc,UAAYC,EAAgBD,CAAS,EACpK,CACA,WAAW,EAAe,CAAE,YAAW,qBAAqB,EAAkB,GAAO,CACjF,GAAI,CAAC,KAAK,SACN,OACJ,IAAIiB,EAAO,CAACb,EAAmBF,EAAmBF,EAAWC,CAAa,EAAGI,EAAkBH,EAAmBF,EAAWC,CAAa,CAAC,CAAC,CACvI,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACTiB,IACA,KAAK,iBAAmB,CAAC,KAAK,iBAC1B,KAAK,mBACL,GAAQV,IAGhB,KAAK,SAAS,UAAYS,CAC9B,CACJ,E"}
|
|
1
|
+
{"version":3,"file":"behavior-DYLnL5QE-DQKBoqbb.js","names":["createRelatedUniqueId","normalizeNumber","normalizeBoolean","normalizeString","createPropDefinition","isEnumOption","BaseBehavior","translate","hasCounterProp","maxLengthProp","value","MAX_LENGTH_BEHAVIOR_OPTIONS","normalizeMaxLengthBehavior","str","maxLengthBehaviorProp","counterPropsConfig","getCounterVisualText","maxLength","currentLength","maxLengthBehavior","remaining","getCounterAriaText","getCounterMaxText","isCharacterInputKey","event","REANNOUNCE_MARKER","ARIA_DEBOUNCE_MS","CounterBehavior","stateAccess","el","props","v","id","limit","text","forceReannounce"],"sources":["../../../../../components/dist/esm/behavior-DYLnL5QE.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { a as createRelatedUniqueId } from './dev.utils-DMRf5JjT.js';\nimport './prop.validators-kX7xC6qj.js';\nimport { c as createPropDefinition, n as normalizeBoolean, D as normalizeNumber, b as normalizeString, i as isEnumOption } from './props-from-config-Dr6e6ZFX.js';\nimport { B as BaseBehavior } from './behavior-DyENPLvO.js';\nimport { t as translate } from './i18n-DsSD0Coa.js';\n\nconst hasCounterProp = createPropDefinition('hasCounter', false, normalizeBoolean);\n\nconst maxLengthProp = createPropDefinition('maxLength', undefined, normalizeNumber, (value) => value >= 0);\n\nconst MAX_LENGTH_BEHAVIOR_OPTIONS = ['hard', 'soft'];\nfunction normalizeMaxLengthBehavior(value) {\n const str = normalizeString(value);\n if (isEnumOption(str, MAX_LENGTH_BEHAVIOR_OPTIONS)) {\n return str;\n }\n throw new Error(`Invalid max length behavior: ${str}`);\n}\nconst maxLengthBehaviorProp = createPropDefinition('maxLengthBehavior', 'hard', normalizeMaxLengthBehavior);\n\nconst counterPropsConfig = {\n optional: [hasCounterProp, maxLengthBehaviorProp, maxLengthProp],\n};\n\nconst getCounterVisualText = (maxLengthBehavior, maxLength, currentLength) => {\n if (typeof maxLength !== 'number') {\n return translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n }\n if (maxLengthBehavior === 'soft') {\n const remaining = maxLength - currentLength;\n return remaining < 0\n ? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n : translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n }\n return translate('kol-character-counter-current-of-max', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\nconst getCounterAriaText = (maxLengthBehavior, maxLength, currentLength) => {\n if (typeof maxLength !== 'number') {\n return translate('kol-character-counter-current', { placeholders: { current: String(currentLength) } });\n }\n if (maxLengthBehavior === 'soft') {\n const remaining = maxLength - currentLength;\n return remaining < 0\n ? translate('kol-character-limit-exceeded', { placeholders: { over: String(Math.abs(remaining)) } })\n : translate('kol-character-limit-remaining', { placeholders: { remaining: String(remaining) } });\n }\n return translate('kol-character-counter-current-of-max-aria', { placeholders: { current: String(currentLength), max: String(maxLength) } });\n};\nconst getCounterMaxText = (maxLengthBehavior, maxLength, currentLength) => {\n if (maxLengthBehavior === 'hard' && typeof maxLength === 'number' && currentLength >= maxLength) {\n return translate('kol-character-counter-max-aria');\n }\n return '';\n};\n\nconst isCharacterInputKey = (event) => event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;\nconst REANNOUNCE_MARKER = ' ';\nconst ARIA_DEBOUNCE_MS = 1000;\nclass CounterBehavior extends BaseBehavior {\n constructor(stateAccess) {\n super(stateAccess, counterPropsConfig);\n this.reannounceToggle = false;\n this.setVisualRef = (el) => {\n this.visualSpan = el;\n };\n this.setAriaRef = (el) => {\n this.ariaSpan = el;\n };\n this.handleKeyDown = (event, currentLength) => {\n const { maxLength, maxLengthBehavior } = this.getLimit();\n if (maxLengthBehavior !== 'hard' || typeof maxLength !== 'number' || currentLength < maxLength)\n return;\n if (!isCharacterInputKey(event))\n return;\n this.retriggerAria(currentLength);\n };\n }\n componentWillLoad(props) {\n this.watchHasCounter(props.hasCounter);\n this.watchMaxLength(props.maxLength);\n this.watchMaxLengthBehavior(props.maxLengthBehavior);\n }\n watchHasCounter(value) {\n hasCounterProp.apply(value, (v) => this.setRenderProp('hasCounter', v));\n }\n watchMaxLength(value) {\n maxLengthProp.apply(value, (v) => this.setRenderProp('maxLength', v));\n }\n watchMaxLengthBehavior(value) {\n maxLengthBehaviorProp.apply(value, (v) => this.setRenderProp('maxLengthBehavior', v));\n }\n hasCounter() {\n return this.getRenderProp('hasCounter') === true;\n }\n hasSoftLimit() {\n const { maxLength, maxLengthBehavior } = this.getLimit();\n return typeof maxLength === 'number' && maxLengthBehavior === 'soft';\n }\n getMaxLengthAttribute() {\n const { maxLength, maxLengthBehavior } = this.getLimit();\n return maxLengthBehavior === 'hard' ? maxLength : undefined;\n }\n getCounterProps() {\n if (!this.hasCounter()) {\n return undefined;\n }\n const { maxLength, maxLengthBehavior } = this.getLimit();\n return { maxLength, maxLengthBehavior, visualRef: this.setVisualRef, ariaRef: this.setAriaRef };\n }\n getCharacterLimitHintId(id) {\n return typeof this.getRenderProp('maxLength') === 'number' && !this.hasCounter() ? createRelatedUniqueId(id, 'character-limit-hint') : undefined;\n }\n update(currentLength) {\n const limit = this.getLimit();\n this.updateVisual(currentLength, limit);\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit), ARIA_DEBOUNCE_MS);\n }\n updateImmediate(currentLength) {\n const limit = this.getLimit();\n this.updateVisual(currentLength, limit);\n clearTimeout(this.debounceTimer);\n this.updateAria(currentLength, limit);\n }\n retriggerAria(currentLength) {\n if (!this.ariaSpan)\n return;\n const limit = this.getLimit();\n clearTimeout(this.debounceTimer);\n this.debounceTimer = setTimeout(() => this.updateAria(currentLength, limit, true), ARIA_DEBOUNCE_MS);\n }\n destroy() {\n clearTimeout(this.debounceTimer);\n }\n getLimit() {\n return { maxLength: this.getRenderProp('maxLength'), maxLengthBehavior: this.getRenderProp('maxLengthBehavior') };\n }\n updateVisual(currentLength, { maxLength, maxLengthBehavior }) {\n if (!this.visualSpan)\n return;\n this.visualSpan.innerText = getCounterVisualText(maxLengthBehavior, maxLength, currentLength);\n this.visualSpan.classList.toggle('kol-form-field__counter--exceeded', maxLengthBehavior === 'soft' && typeof maxLength === 'number' && currentLength > maxLength);\n }\n updateAria(currentLength, { maxLength, maxLengthBehavior }, forceReannounce = false) {\n if (!this.ariaSpan)\n return;\n let text = [getCounterAriaText(maxLengthBehavior, maxLength, currentLength), getCounterMaxText(maxLengthBehavior, maxLength, currentLength)]\n .filter(Boolean)\n .join(' ');\n if (forceReannounce) {\n this.reannounceToggle = !this.reannounceToggle;\n if (this.reannounceToggle) {\n text += REANNOUNCE_MARKER;\n }\n }\n this.ariaSpan.innerText = text;\n }\n}\n\nexport { CounterBehavior as C };\n"],"mappings":"A,uRASA,IAAMQ,EAAiBJ,EAAqB,aAAc,GAAOF,CAAgB,EAE3EO,EAAgBL,EAAqB,YAAa,IAAA,GAAWH,EAAkB,GAAUS,GAAS,CAAC,EAEnGC,EAA8B,CAAC,OAAQ,MAAM,EACnD,SAASC,EAA2B,EAAO,CACvC,IAAMC,EAAMV,EAAgBO,CAAK,EACjC,GAAIL,EAAaQ,EAAKF,CAA2B,EAC7C,OAAOE,EAEX,MAAU,MAAM,gCAAgCA,GAAK,CACzD,CACA,IAAMC,EAAwBV,EAAqB,oBAAqB,OAAQQ,CAA0B,EAEpGG,EAAqB,CACvB,SAAU,CAACP,EAAgBM,EAAuBL,CAAa,CACnE,EAEMO,GAAwB,EAAmB,EAAW,IAAkB,CAC1E,GAAI,OAAOC,GAAc,SACrB,OAAOV,EAAU,gCAAiC,CAAE,aAAc,CAAE,QAAS,OAAOW,CAAa,CAAE,CAAE,CAAC,EAE1G,GAAIC,IAAsB,OAAQ,CAC9B,IAAMC,EAAYH,EAAYC,EAC9B,OAAOE,EAAY,EACbb,EAAU,+BAAgC,CAAE,aAAc,CAAE,KAAM,OAAO,KAAK,IAAIa,CAAS,CAAC,CAAE,CAAE,CAAC,EACjGb,EAAU,gCAAiC,CAAE,aAAc,CAAE,UAAW,OAAOa,CAAS,CAAE,CAAE,CAAC,CACvG,CACA,OAAOb,EAAU,uCAAwC,CAAE,aAAc,CAAE,QAAS,OAAOW,CAAa,EAAG,IAAK,OAAOD,CAAS,CAAE,CAAE,CAAC,CACzI,EACMI,GAAsB,EAAmB,EAAW,IAAkB,CACxE,GAAI,OAAOJ,GAAc,SACrB,OAAOV,EAAU,gCAAiC,CAAE,aAAc,CAAE,QAAS,OAAOW,CAAa,CAAE,CAAE,CAAC,EAE1G,GAA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Aa,KAAK,aAAa,CACnC,CACA,UAAW,CACP,MAAO,CAAE,UAAW,KAAK,cAAc,WAAW,EAAG,kBAAmB,KAAK,cAAc,mBAAmB,CAAE,CACpH,CACA,aAAa,EAAe,CAAE,YAAW,qBAAqB,CACrD,KAAK,aAEV,KAAK,WAAW,UAAYV,EAAqBG,EAAmBF,EAAWC,CAAa,EAC5F,KAAK,WAAW,UAAU,OAAO,oCAAqCC,IAAsB,QAAU,OAAOF,GAAc,UAAYC,EAAgBD,CAAS,EACpK,CACA,WAAW,EAAe,CAAE,YAAW,qBAAqB,EAAkB,GAAO,CACjF,GAAI,CAAC,KAAK,SACN,OACJ,IAAIiB,EAAO,CAACb,EAAmBF,EAAmBF,EAAWC,CAAa,EAAGI,EAAkBH,EAAmBF,EAAWC,CAAa,CAAC,CAAC,CACvI,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACTiB,IACA,KAAK,iBAAmB,CAAC,KAAK,iBAC1B,KAAK,mBACL,GAAQV,IAGhB,KAAK,SAAS,UAAYS,CAC9B,CACJ,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{R as e,k as t}from"./index-BFGAlyrC-Cj-T6hZA.js";import{n}from"./component-C3fJM1FJ-BkH-jjr9.js";import{k as r,l as i,r as a}from"./props-from-config-B_k4h7ak-Dgu2bHql.js";import{t as o}from"./id-BBQitGSa-BpFuwqrc.js";import{t as s}from"./label-lang-segment-BnLCd3lO-C25RVF8w.js";var c=0,l=()=>{c++},u=()=>{c=Math.max(0,c-1)},d=e=>{c>0&&e.preventDefault()},f=n(`align`,`top`),p=i(`badgeText`,``,r),m=Math.min,h=Math.max,g=Math.round,_=Math.floor,v=e=>({x:e,y:e}),y={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function b(e,t,n){return h(e,m(t,n))}function x(e,t){return typeof e==`function`?e(t):e}function S(e){return e.split(`-`)[0]}function C(e){return e.split(`-`)[1]}function w(e){return e===`x`?`y`:`x`}function T(e){return e===`y`?`height`:`width`}function E(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function D(e){return w(E(e))}function O(e,t,n){n===void 0&&(n=!1);let r=C(e),i=D(e),a=T(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=P(o)),[o,P(o)]}function k(e){let t=P(e);return[A(e),t,A(t)]}function A(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ee=[`left`,`right`],j=[`right`,`left`],te=[`top`,`bottom`],ne=[`bottom`,`top`];function M(e,t,n){switch(e){case`top`:case`bottom`:return n?t?j:ee:t?ee:j;case`left`:case`right`:return t?te:ne;default:return[]}}function N(e,t,n,r){let i=C(e),a=M(S(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(A)))),a}function P(e){let t=S(e);return y[t]+e.slice(t.length)}function F(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function re(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:F(e)}function I(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ie(e,t,n){let{reference:r,floating:i}=e,a=E(t),o=D(t),s=T(o),c=S(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=C(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ae(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=x(t,e),p=re(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=I(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=I(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var oe=50,se=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ae},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ie(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<oe&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ie(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ce=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=x(e,t)||{};if(l==null)return{};let d=re(u),f={x:n,y:r},p=D(i),h=T(p),g=await o.getDimensions(l),_=p===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,S=_?`clientHeight`:`clientWidth`,w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],E=f[p]-a.reference[p],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[S]:0;k&&await(o.isElement==null?void 0:o.isElement(O))||(k=s.floating[S]||a.floating[h]);let A=w/2-E/2,ee=k/2-g[h]/2-1,j=m(d[v],ee),te=m(d[y],ee),ne=k-g[h]-te,M=k/2-g[h]/2+A,N=b(j,M,ne),P=!c.arrow&&C(i)!=null&&M!==N&&a.reference[h]/2-(M<j?j:te)-g[h]/2<0,F=P?M<j?M-j:M-ne:0;return{[p]:f[p]+F,data:{[p]:N,centerOffset:M-N-F,...P&&{alignmentOffset:F}},reset:P}}}),le=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=x(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=S(r),_=E(o),v=S(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[P(o)]:k(o)),C=p!==`none`;!d&&C&&b.push(...N(o,m,p,y));let w=[o,...b],T=await s.detectOverflow(t,h),D=[],A=i.flip?.overflows||[];if(l&&D.push(T[g]),u){let e=O(r,a,y);D.push(T[e[0]],T[e[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=w[e];if(t&&(u!==`alignment`||_===E(t)||A.every(e=>E(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:A},reset:{placement:t}};let n=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=A.filter(e=>{if(C){let t=E(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},ue=new Set([`left`,`top`]);async function de(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=S(n),s=C(n),c=E(n)===`y`,l=ue.has(o)?-1:1,u=a&&c?-1:1,d=x(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var fe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await de(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},pe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=x(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=E(i),p=w(f),m=u[p],h=u[f],g=(e,t)=>b(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function L(){return typeof window<`u`}function R(e){return me(e)?(e.nodeName||``).toLowerCase():`#document`}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function B(e){return((me(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function me(e){return L()?e instanceof Node||e instanceof z(e).Node:!1}function V(e){return L()?e instanceof Element||e instanceof z(e).Element:!1}function H(e){return L()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function he(e){return!L()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}function ge(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function _e(e){return/^(table|td|th)$/.test(R(e))}function U(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ve=/transform|translate|scale|rotate|perspective|filter/,ye=/paint|layout|strict|content/,W=e=>!!e&&e!==`none`,be;function xe(e){let t=V(e)?K(e):e;return W(t.transform)||W(t.translate)||W(t.scale)||W(t.rotate)||W(t.perspective)||!Ce()&&(W(t.backdropFilter)||W(t.filter))||ve.test(t.willChange||``)||ye.test(t.contain||``)}function Se(e){let t=J(e);for(;H(t)&&!G(t);){if(xe(t))return t;if(U(t))return null;t=J(t)}return null}function Ce(){return be??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),be}function G(e){return/^(html|body|#document)$/.test(R(e))}function K(e){return z(e).getComputedStyle(e)}function q(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(R(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||he(e)&&e.host||B(e);return he(t)?t.host:t}function we(e){let t=J(e);return G(t)?(e.ownerDocument||e).body:H(t)&&ge(t)?t:we(t)}function Y(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=we(e),i=r===e.ownerDocument?.body,a=z(r);if(i){let e=Te(a);return t.concat(a,a.visualViewport||[],ge(r)?r:[],e&&n?Y(e):[])}return t.concat(r,Y(r,[],n))}function Te(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ee(e){let t=K(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=H(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=g(n)!==a||g(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function De(e){return V(e)?e:e.contextElement}function X(e){let t=De(e);if(!H(t))return v(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ee(t),o=(a?g(n.width):n.width)/r,s=(a?g(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Oe=v(0);function ke(e){let t=z(e);return!Ce()||!t.visualViewport?Oe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ae(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===z(e)}function Z(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=De(e),o=v(1);t&&(r?V(r)&&(o=X(r)):o=X(e));let s=Ae(a,n,r)?ke(a):v(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=z(a),t=V(r)?z(r):r,n=e,i=Te(n);for(;i&&t!==n;){let e=X(i),t=i.getBoundingClientRect(),r=K(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=z(i),i=Te(n)}}return I({width:u,height:d,x:c,y:l})}function Q(e,t){let n=q(e).scrollLeft;return t?t.left+n:Z(B(e)).left+n}function je(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Q(e,n),y:n.top+t.scrollTop}}function Me(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=B(r),s=t?U(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=v(1),u=v(0),d=H(r);if((d||!a)&&((R(r)!==`body`||ge(o))&&(c=q(r)),d)){let e=Z(r);l=X(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?je(o,c):v(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ne(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Pe(e){let t=q(e),n=e.ownerDocument.body,r=h(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=h(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Q(e),o=-t.scrollTop;return K(n).direction===`rtl`&&(a+=h(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Fe=25;function Ie(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=z(e),a=B(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ce()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Q(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Fe&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Le(e,t){let n=Z(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=X(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Re(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ie(e,n,t);else if(t===`document`)r=Pe(B(e));else if(V(t))r=Le(t,n);else{let n=ke(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return I(r)}function ze(e,t){let n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter(e=>V(e)&&R(e)!==`body`),i=null,a=K(e).position===`fixed`,o=a?J(e):e;for(;V(o)&&!G(o);){let e=K(o),t=xe(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=J(o)}return t.set(e,r),r}function Be(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?U(t)?[]:ze(t,this._c):[].concat(n),r],o=Re(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Re(t,a[e],i);s=h(n.top,s),c=m(n.right,c),l=m(n.bottom,l),u=h(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ve(e){let{width:t,height:n}=Ee(e);return{width:t,height:n}}function He(e,t,n){let r=H(t),i=B(t),a=n===`fixed`,o=Z(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=v(0);if((r||!a)&&((R(t)!==`body`||ge(i))&&(s=q(t)),r)){let e=Z(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Q(i));let l=i&&!r&&!a?je(i,s):v(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ue(e){return K(e).position===`static`}function We(e,t){if(!H(e)||K(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return B(e)===n&&(n=n.ownerDocument.body),n}function Ge(e,t){let n=z(e);if(U(e))return n;if(!H(e)){let t=J(e);for(;t&&!G(t);){if(V(t)&&!Ue(t))return t;t=J(t)}return n}let r=We(e,t);for(;r&&_e(r)&&Ue(r);)r=We(r,t);return r&&G(r)&&Ue(r)&&!xe(r)?n:r||Se(e)||n}var Ke=async function(e){let t=this.getOffsetParent||Ge,n=this.getDimensions,r=await n(e.floating);return{reference:He(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qe(e){return K(e).direction===`rtl`}var Je={convertOffsetParentRelativeRectToViewportRelativeRect:Me,getDocumentElement:B,getClippingRect:Be,getOffsetParent:Ge,getElementRects:Ke,getClientRects:Ne,getDimensions:Ve,getScale:X,isElement:V,isRTL:qe};function Ye(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xe(e,t,n){let r=null,i,a=B(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let g=_(d),v=_(a.clientWidth-(u+f)),y=_(a.clientHeight-(d+p)),b=_(u),x={rootMargin:-g+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:h(0,m(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!Ye(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=z(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ze(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=De(e),u=i||a?[...l?Y(l):[],...t?Y(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xe(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Z(e):null;c&&g();function g(){let t=Z(e);h&&!Ye(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Qe=fe,$e=pe,et=le,tt=ce,nt=(e,t,n)=>{let r=new Map,i=n??{},a={...Je,...i.platform,_c:r};return se(e,t,{...i,platform:a})},rt=async({floatingElement:t,referenceElement:n,arrowElement:r,align:i=`top`})=>{if(!e()){let e=[Qe(r?.offsetHeight||10),et(),$e()];r&&e.push(tt({element:r}));let{x:a,y:o,middlewareData:s,placement:c}=await nt(n,t,{placement:i,middleware:e,strategy:`fixed`});Object.assign(t.style,{left:`${a}px`,top:`${o}px`,visibility:`visible`}),r&&(s.arrow?.x?Object.assign(r.style,{left:`${s.arrow.x}px`,top:c===`bottom`?`${-r.offsetHeight/2}px`:``,bottom:c===`top`?`${-r.offsetHeight/2}px`:``}):s.arrow?.y&&Object.assign(r.style,{left:c===`right`?`${-r.offsetWidth/2}px`:``,right:c===`left`?`${-r.offsetWidth/2}px`:``,top:`${s.arrow.y}px`}))}},it=new Set,$=null;function at(e){$!==e&&($&&$.style.setProperty(`z-index`,`999`),it.delete(e),it.add(e),e.style.setProperty(`z-index`,`1000`),$=e)}function ot(e){if(it.delete(e)&&$===e){$=null;for(let e of it)$=e;$&&$.style.setProperty(`z-index`,`1000`)}}var st=class{constructor(e,t){this.setState=e.setState,this.getState=e.getState,this.renderProps=a(t)}setRenderProp(e,t){this.renderProps[e]=t}getRenderProp(e){return this.renderProps[e]}},ct={required:[s],optional:[f,p,o]},lt=class extends st{constructor(e){super(e,ct),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.setTooltipElementRef=e=>{this.tooltipElement=e,this.tooltipElement&&this.addListeners(this.tooltipElement)},this.hideTooltipByEscape=e=>{e.key===`Escape`&&(e.stopPropagation(),e.preventDefault(),this.hideTooltip())},this.handleMouseEnter=()=>{let e=this.isNewVisit();this.hasMouseIn=!0,e&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseLeave=()=>{this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{let e=this.isNewVisit();this.hasFocusIn=!0,e&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusOut=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}}componentWillLoad(e){this.watchLabel(e.label),this.watchAlign(e.align),this.watchBadgeText(e.badgeText),this.watchId(e.id)}watchLabel(e){s.apply(e||void 0,e=>{this.setRenderProp(`label`,e)})}watchAlign(e){f.apply(e,e=>{this.setRenderProp(`align`,e)})}watchBadgeText(e){p.apply(e,e=>{this.setRenderProp(`badgeText`,e)})}watchId(e){o.apply(e,e=>{this.setRenderProp(`id`,e)})}initContext(e){this.previousSibling=e}syncListeners(e,t,n=!1){e&&this.removeListeners(e),t&&(n&&(this.previousSibling=t),this.removeListeners(t),this.addListeners(t))}handleEventListeners(e){let t=e.previousElementSibling;this.syncListeners(this.previousSibling,t,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(ot(this.tooltipElement),u(),this.tooltipElement.classList.remove(`show`),this.tooltipElement.classList.add(`hide`),this.tooltipElement.addEventListener(`animationend`,()=>{this.tooltipElement?.classList.contains(`hide`)&&this.tooltipElement.style.removeProperty(`display`)},{once:!0}),this.cleanupAutoPositioning&&=(this.cleanupAutoPositioning(),void 0)),t().removeEventListener(`keydown`,this.hideTooltipByEscape)}destroy(){clearTimeout(this.overFocusTimeout),this.previousSibling&&=(this.removeListeners(this.previousSibling),void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&=(this.cleanupAutoPositioning(),void 0),t().removeEventListener(`keydown`,this.hideTooltipByEscape)}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}resetHideFlag(){this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await rt({align:this.getRenderProp(`align`),arrowElement:this.tooltipElement.querySelector(`.kol-tooltip__arrow`),floatingElement:this.tooltipElement,referenceElement:this.previousSibling})}showTooltip(){if(!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement){at(this.tooltipElement),l(),this.tooltipElement.classList.remove(`hide`),this.tooltipElement.classList.add(`show`),this.tooltipElement.style.setProperty(`display`,`block`),t().addEventListener(`keydown`,this.hideTooltipByEscape);let e=this.previousSibling,n=this.tooltipElement;this.cleanupAutoPositioning=Ze(e,n,()=>{this.alignTooltip()})}}showOrHideTooltip(){clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout(()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()},300)}addListeners(e){e.addEventListener(`mouseover`,this.handleMouseEnter),e.addEventListener(`mouseout`,this.handleMouseLeave),e.addEventListener(`focusin`,this.handleFocusIn),e.addEventListener(`focusout`,this.handleFocusOut)}removeListeners(e){e.removeEventListener(`mouseover`,this.handleMouseEnter),e.removeEventListener(`mouseout`,this.handleMouseLeave),e.removeEventListener(`focusin`,this.handleFocusIn),e.removeEventListener(`focusout`,this.handleFocusOut)}};export{Ze as a,f as i,lt as n,d as o,rt as r,st as t};
|
|
2
|
-
//# sourceMappingURL=behavior-
|
|
1
|
+
import{R as e,k as t}from"./index-CDhvlzPX-C15eU4TR.js";import{n}from"./component-JcfUpNY4-B6kEYg3R.js";import{k as r,l as i,r as a}from"./props-from-config-Dr6e6ZFX-CebT1iS4.js";import{t as o}from"./id-Cs_hOKCc-C4zDg6rm.js";import{t as s}from"./label-lang-segment-C730E0Jv-CkgDXpRD.js";var c=0,l=()=>{c++},u=()=>{c=Math.max(0,c-1)},d=e=>{c>0&&e.preventDefault()},f=n(`align`,`top`),p=i(`badgeText`,``,r),m=Math.min,h=Math.max,g=Math.round,_=Math.floor,v=e=>({x:e,y:e}),y={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function b(e,t,n){return h(e,m(t,n))}function x(e,t){return typeof e==`function`?e(t):e}function S(e){return e.split(`-`)[0]}function C(e){return e.split(`-`)[1]}function w(e){return e===`x`?`y`:`x`}function T(e){return e===`y`?`height`:`width`}function E(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function D(e){return w(E(e))}function O(e,t,n){n===void 0&&(n=!1);let r=C(e),i=D(e),a=T(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=P(o)),[o,P(o)]}function k(e){let t=P(e);return[A(e),t,A(t)]}function A(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ee=[`left`,`right`],j=[`right`,`left`],te=[`top`,`bottom`],ne=[`bottom`,`top`];function M(e,t,n){switch(e){case`top`:case`bottom`:return n?t?j:ee:t?ee:j;case`left`:case`right`:return t?te:ne;default:return[]}}function N(e,t,n,r){let i=C(e),a=M(S(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(A)))),a}function P(e){let t=S(e);return y[t]+e.slice(t.length)}function F(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function re(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:F(e)}function I(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ie(e,t,n){let{reference:r,floating:i}=e,a=E(t),o=D(t),s=T(o),c=S(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=C(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ae(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=x(t,e),p=re(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=I(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=I(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var oe=50,se=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ae},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ie(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<oe&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ie(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ce=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=x(e,t)||{};if(l==null)return{};let d=re(u),f={x:n,y:r},p=D(i),h=T(p),g=await o.getDimensions(l),_=p===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,S=_?`clientHeight`:`clientWidth`,w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],E=f[p]-a.reference[p],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),k=O?O[S]:0;k&&await(o.isElement==null?void 0:o.isElement(O))||(k=s.floating[S]||a.floating[h]);let A=w/2-E/2,ee=k/2-g[h]/2-1,j=m(d[v],ee),te=m(d[y],ee),ne=k-g[h]-te,M=k/2-g[h]/2+A,N=b(j,M,ne),P=!c.arrow&&C(i)!=null&&M!==N&&a.reference[h]/2-(M<j?j:te)-g[h]/2<0,F=P?M<j?M-j:M-ne:0;return{[p]:f[p]+F,data:{[p]:N,centerOffset:M-N-F,...P&&{alignmentOffset:F}},reset:P}}}),le=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=x(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=S(r),_=E(o),v=S(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[P(o)]:k(o)),C=p!==`none`;!d&&C&&b.push(...N(o,m,p,y));let w=[o,...b],T=await s.detectOverflow(t,h),D=[],A=i.flip?.overflows||[];if(l&&D.push(T[g]),u){let e=O(r,a,y);D.push(T[e[0]],T[e[1]])}if(A=[...A,{placement:r,overflows:D}],!D.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=w[e];if(t&&(u!==`alignment`||_===E(t)||A.every(e=>E(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:A},reset:{placement:t}};let n=A.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=A.filter(e=>{if(C){let t=E(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},ue=new Set([`left`,`top`]);async function de(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=S(n),s=C(n),c=E(n)===`y`,l=ue.has(o)?-1:1,u=a&&c?-1:1,d=x(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var fe=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await de(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},pe=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=x(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=E(i),p=w(f),m=u[p],h=u[f],g=(e,t)=>b(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function L(){return typeof window<`u`}function R(e){return me(e)?(e.nodeName||``).toLowerCase():`#document`}function z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function B(e){return((me(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function me(e){return L()?e instanceof Node||e instanceof z(e).Node:!1}function V(e){return L()?e instanceof Element||e instanceof z(e).Element:!1}function H(e){return L()?e instanceof HTMLElement||e instanceof z(e).HTMLElement:!1}function he(e){return!L()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof z(e).ShadowRoot}function ge(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function _e(e){return/^(table|td|th)$/.test(R(e))}function U(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ve=/transform|translate|scale|rotate|perspective|filter/,ye=/paint|layout|strict|content/,W=e=>!!e&&e!==`none`,be;function xe(e){let t=V(e)?K(e):e;return W(t.transform)||W(t.translate)||W(t.scale)||W(t.rotate)||W(t.perspective)||!Ce()&&(W(t.backdropFilter)||W(t.filter))||ve.test(t.willChange||``)||ye.test(t.contain||``)}function Se(e){let t=J(e);for(;H(t)&&!G(t);){if(xe(t))return t;if(U(t))return null;t=J(t)}return null}function Ce(){return be??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),be}function G(e){return/^(html|body|#document)$/.test(R(e))}function K(e){return z(e).getComputedStyle(e)}function q(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(R(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||he(e)&&e.host||B(e);return he(t)?t.host:t}function we(e){let t=J(e);return G(t)?(e.ownerDocument||e).body:H(t)&&ge(t)?t:we(t)}function Y(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=we(e),i=r===e.ownerDocument?.body,a=z(r);if(i){let e=Te(a);return t.concat(a,a.visualViewport||[],ge(r)?r:[],e&&n?Y(e):[])}return t.concat(r,Y(r,[],n))}function Te(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ee(e){let t=K(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=H(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=g(n)!==a||g(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function De(e){return V(e)?e:e.contextElement}function X(e){let t=De(e);if(!H(t))return v(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ee(t),o=(a?g(n.width):n.width)/r,s=(a?g(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Oe=v(0);function ke(e){let t=z(e);return!Ce()||!t.visualViewport?Oe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ae(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===z(e)}function Z(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=De(e),o=v(1);t&&(r?V(r)&&(o=X(r)):o=X(e));let s=Ae(a,n,r)?ke(a):v(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=z(a),t=V(r)?z(r):r,n=e,i=Te(n);for(;i&&t!==n;){let e=X(i),t=i.getBoundingClientRect(),r=K(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=z(i),i=Te(n)}}return I({width:u,height:d,x:c,y:l})}function Q(e,t){let n=q(e).scrollLeft;return t?t.left+n:Z(B(e)).left+n}function je(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Q(e,n),y:n.top+t.scrollTop}}function Me(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=B(r),s=t?U(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=v(1),u=v(0),d=H(r);if((d||!a)&&((R(r)!==`body`||ge(o))&&(c=q(r)),d)){let e=Z(r);l=X(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?je(o,c):v(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ne(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Pe(e){let t=q(e),n=e.ownerDocument.body,r=h(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=h(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Q(e),o=-t.scrollTop;return K(n).direction===`rtl`&&(a+=h(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Fe=25;function Ie(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=z(e),a=B(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Ce()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Q(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Fe&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Le(e,t){let n=Z(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=X(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Re(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ie(e,n,t);else if(t===`document`)r=Pe(B(e));else if(V(t))r=Le(t,n);else{let n=ke(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return I(r)}function ze(e,t){let n=t.get(e);if(n)return n;let r=Y(e,[],!1).filter(e=>V(e)&&R(e)!==`body`),i=null,a=K(e).position===`fixed`,o=a?J(e):e;for(;V(o)&&!G(o);){let e=K(o),t=xe(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=J(o)}return t.set(e,r),r}function Be(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?U(t)?[]:ze(t,this._c):[].concat(n),r],o=Re(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Re(t,a[e],i);s=h(n.top,s),c=m(n.right,c),l=m(n.bottom,l),u=h(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Ve(e){let{width:t,height:n}=Ee(e);return{width:t,height:n}}function He(e,t,n){let r=H(t),i=B(t),a=n===`fixed`,o=Z(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=v(0);if((r||!a)&&((R(t)!==`body`||ge(i))&&(s=q(t)),r)){let e=Z(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Q(i));let l=i&&!r&&!a?je(i,s):v(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ue(e){return K(e).position===`static`}function We(e,t){if(!H(e)||K(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return B(e)===n&&(n=n.ownerDocument.body),n}function Ge(e,t){let n=z(e);if(U(e))return n;if(!H(e)){let t=J(e);for(;t&&!G(t);){if(V(t)&&!Ue(t))return t;t=J(t)}return n}let r=We(e,t);for(;r&&_e(r)&&Ue(r);)r=We(r,t);return r&&G(r)&&Ue(r)&&!xe(r)?n:r||Se(e)||n}var Ke=async function(e){let t=this.getOffsetParent||Ge,n=this.getDimensions,r=await n(e.floating);return{reference:He(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qe(e){return K(e).direction===`rtl`}var Je={convertOffsetParentRelativeRectToViewportRelativeRect:Me,getDocumentElement:B,getClippingRect:Be,getOffsetParent:Ge,getElementRects:Ke,getClientRects:Ne,getDimensions:Ve,getScale:X,isElement:V,isRTL:qe};function Ye(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xe(e,t,n){let r=null,i,a=B(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let g=_(d),v=_(a.clientWidth-(u+f)),y=_(a.clientHeight-(d+p)),b=_(u),x={rootMargin:-g+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:h(0,m(1,c))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(!Ye(l,e.getBoundingClientRect()))return s();if(n!==c){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}S=!1}try{r=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}let c=z(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ze(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=De(e),u=i||a?[...l?Y(l):[],...t?Y(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xe(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Z(e):null;c&&g();function g(){let t=Z(e);h&&!Ye(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Qe=fe,$e=pe,et=le,tt=ce,nt=(e,t,n)=>{let r=new Map,i=n??{},a={...Je,...i.platform,_c:r};return se(e,t,{...i,platform:a})},rt=async({floatingElement:t,referenceElement:n,arrowElement:r,align:i=`top`})=>{if(!e()){let e=[Qe(r?.offsetHeight||10),et(),$e()];r&&e.push(tt({element:r}));let{x:a,y:o,middlewareData:s,placement:c}=await nt(n,t,{placement:i,middleware:e,strategy:`fixed`});Object.assign(t.style,{left:`${a}px`,top:`${o}px`,visibility:`visible`}),r&&(s.arrow?.x?Object.assign(r.style,{left:`${s.arrow.x}px`,top:c===`bottom`?`${-r.offsetHeight/2}px`:``,bottom:c===`top`?`${-r.offsetHeight/2}px`:``}):s.arrow?.y&&Object.assign(r.style,{left:c===`right`?`${-r.offsetWidth/2}px`:``,right:c===`left`?`${-r.offsetWidth/2}px`:``,top:`${s.arrow.y}px`}))}},it=new Set,$=null;function at(e){$!==e&&($&&$.style.setProperty(`z-index`,`999`),it.delete(e),it.add(e),e.style.setProperty(`z-index`,`1000`),$=e)}function ot(e){if(it.delete(e)&&$===e){$=null;for(let e of it)$=e;$&&$.style.setProperty(`z-index`,`1000`)}}var st=class{constructor(e,t){this.setState=e.setState,this.getState=e.getState,this.renderProps=a(t)}setRenderProp(e,t){this.renderProps[e]=t}getRenderProp(e){return this.renderProps[e]}},ct={required:[s],optional:[f,p,o]},lt=class extends st{constructor(e){super(e,ct),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.setTooltipElementRef=e=>{this.tooltipElement=e,this.tooltipElement&&this.addListeners(this.tooltipElement)},this.hideTooltipByEscape=e=>{e.key===`Escape`&&(e.stopPropagation(),e.preventDefault(),this.hideTooltip())},this.handleMouseEnter=()=>{let e=this.isNewVisit();this.hasMouseIn=!0,e&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseLeave=()=>{this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{let e=this.isNewVisit();this.hasFocusIn=!0,e&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusOut=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}}componentWillLoad(e){this.watchLabel(e.label),this.watchAlign(e.align),this.watchBadgeText(e.badgeText),this.watchId(e.id)}watchLabel(e){s.apply(e||void 0,e=>{this.setRenderProp(`label`,e)})}watchAlign(e){f.apply(e,e=>{this.setRenderProp(`align`,e)})}watchBadgeText(e){p.apply(e,e=>{this.setRenderProp(`badgeText`,e)})}watchId(e){o.apply(e,e=>{this.setRenderProp(`id`,e)})}initContext(e){this.previousSibling=e}syncListeners(e,t,n=!1){e&&this.removeListeners(e),t&&(n&&(this.previousSibling=t),this.removeListeners(t),this.addListeners(t))}handleEventListeners(e){let t=e.previousElementSibling;this.syncListeners(this.previousSibling,t,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(ot(this.tooltipElement),u(),this.tooltipElement.classList.remove(`show`),this.tooltipElement.classList.add(`hide`),this.tooltipElement.addEventListener(`animationend`,()=>{this.tooltipElement?.classList.contains(`hide`)&&this.tooltipElement.style.removeProperty(`display`)},{once:!0}),this.cleanupAutoPositioning&&=(this.cleanupAutoPositioning(),void 0)),t().removeEventListener(`keydown`,this.hideTooltipByEscape)}destroy(){clearTimeout(this.overFocusTimeout),this.previousSibling&&=(this.removeListeners(this.previousSibling),void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&=(this.cleanupAutoPositioning(),void 0),t().removeEventListener(`keydown`,this.hideTooltipByEscape)}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}resetHideFlag(){this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await rt({align:this.getRenderProp(`align`),arrowElement:this.tooltipElement.querySelector(`.kol-tooltip__arrow`),floatingElement:this.tooltipElement,referenceElement:this.previousSibling})}showTooltip(){if(!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement){at(this.tooltipElement),l(),this.tooltipElement.classList.remove(`hide`),this.tooltipElement.classList.add(`show`),this.tooltipElement.style.setProperty(`display`,`block`),t().addEventListener(`keydown`,this.hideTooltipByEscape);let e=this.previousSibling,n=this.tooltipElement;this.cleanupAutoPositioning=Ze(e,n,()=>{this.alignTooltip()})}}showOrHideTooltip(){clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout(()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()},300)}addListeners(e){e.addEventListener(`mouseover`,this.handleMouseEnter),e.addEventListener(`mouseout`,this.handleMouseLeave),e.addEventListener(`focusin`,this.handleFocusIn),e.addEventListener(`focusout`,this.handleFocusOut)}removeListeners(e){e.removeEventListener(`mouseover`,this.handleMouseEnter),e.removeEventListener(`mouseout`,this.handleMouseLeave),e.removeEventListener(`focusin`,this.handleFocusIn),e.removeEventListener(`focusout`,this.handleFocusOut)}};export{Ze as a,f as i,lt as n,d as o,rt as r,st as t};
|
|
2
|
+
//# sourceMappingURL=behavior-DyENPLvO-DGaqAoa2.js.map
|