@public-ui/visual-tests 4.5.0-rc.7 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/dist/assets/{Heading-NHB1reiQ-DHy2C2Bz.js → Heading-DYEtnAIe-BrxDLMDp.js} +2 -2
- package/app/dist/assets/{Heading-NHB1reiQ-DHy2C2Bz.js.map → Heading-DYEtnAIe-BrxDLMDp.js.map} +1 -1
- package/app/dist/assets/align-DeB15XnU-CQTQ4uFG.js +2 -0
- package/app/dist/assets/{align-DeB15XnU-DdElUkod.js.map → align-DeB15XnU-CQTQ4uFG.js.map} +1 -1
- package/app/dist/assets/{api-BAEPnyL7-_iB2JTte.js → api-Bhr2ic7C-CK7j_dxP.js} +2 -2
- package/app/dist/assets/{api-BAEPnyL7-_iB2JTte.js.map → api-Bhr2ic7C-CK7j_dxP.js.map} +1 -1
- package/app/dist/assets/{api-BvTefIaj-CVGd4UEI.js → api-BvTefIaj-DiAA-Mr1.js} +2 -2
- package/app/dist/assets/{api-BvTefIaj-CVGd4UEI.js.map → api-BvTefIaj-DiAA-Mr1.js.map} +1 -1
- package/app/dist/assets/{api-CagcODCX-CZzMzfJo.js → api-DwdE0qU0-Cm7eFoAf.js} +2 -2
- package/app/dist/assets/{api-CagcODCX-CZzMzfJo.js.map → api-DwdE0qU0-Cm7eFoAf.js.map} +1 -1
- package/app/dist/assets/{base-BFU17cMm-DVKxDRdU.js → base-BwsdAVVP-m-wD2uvT.js} +2 -2
- package/app/dist/assets/{base-BFU17cMm-DVKxDRdU.js.map → base-BwsdAVVP-m-wD2uvT.js.map} +1 -1
- package/app/dist/assets/{base-BpKxLJ6r-Ci149kZl.js → base-CQQKxfxv-Bj8lHuoC.js} +2 -2
- package/app/dist/assets/{base-BpKxLJ6r-Ci149kZl.js.map → base-CQQKxfxv-Bj8lHuoC.js.map} +1 -1
- package/app/dist/assets/{base-Cm_c8klt-fUjhRU2g.js → base-CdUYL1Y_-qigNbEee.js} +2 -2
- package/app/dist/assets/{base-Cm_c8klt-fUjhRU2g.js.map → base-CdUYL1Y_-qigNbEee.js.map} +1 -1
- package/app/dist/assets/{base-DitGpYOV-DNzFd2Xb.js → base-D5a-Ls-4-BfXQMVLO.js} +2 -2
- package/app/dist/assets/{base-DitGpYOV-DNzFd2Xb.js.map → base-D5a-Ls-4-BfXQMVLO.js.map} +1 -1
- package/app/dist/assets/{base-web-component-3R1Dy3QK-Be7ltWsP.js → base-web-component-3R1Dy3QK-CfE_3Gfg.js} +2 -2
- package/app/dist/assets/{base-web-component-3R1Dy3QK-Be7ltWsP.js.map → base-web-component-3R1Dy3QK-CfE_3Gfg.js.map} +1 -1
- package/app/dist/assets/{base-web-component-BFCVvyYG-DGA5QrtV.js → base-web-component-6IoFcVM9-BTle9NMf.js} +2 -2
- package/app/dist/assets/{base-web-component-BFCVvyYG-DGA5QrtV.js.map → base-web-component-6IoFcVM9-BTle9NMf.js.map} +1 -1
- package/app/dist/assets/{base-web-component-6J5sCsnZ-sKdq2N3y.js → base-web-component-CyCs0EpM-CWFRS3Bk.js} +2 -2
- package/app/dist/assets/{base-web-component-6J5sCsnZ-sKdq2N3y.js.map → base-web-component-CyCs0EpM-CWFRS3Bk.js.map} +1 -1
- package/app/dist/assets/{behavior-CH_2MMuX-DytWoGOP.js → behavior-COQhqcG7-DgiDghP9.js} +2 -2
- package/app/dist/assets/{behavior-CH_2MMuX-DytWoGOP.js.map → behavior-COQhqcG7-DgiDghP9.js.map} +1 -1
- package/app/dist/assets/{behavior-D1kOlK6p-D1stif9h.js → behavior-D1kOlK6p-CK23p9Tn.js} +2 -2
- package/app/dist/assets/{behavior-D1kOlK6p-D1stif9h.js.map → behavior-D1kOlK6p-CK23p9Tn.js.map} +1 -1
- package/app/dist/assets/{behavior-DnkpB_7O-CUAAwrbq.js → behavior-DnkpB_7O-CbW4J827.js} +2 -2
- package/app/dist/assets/{behavior-DnkpB_7O-CUAAwrbq.js.map → behavior-DnkpB_7O-CbW4J827.js.map} +1 -1
- package/app/dist/assets/block-bem-DxQXsOt3-B0AfUEct.js +2 -0
- package/app/dist/assets/{block-bem-DxQXsOt3-CTfri7ZU.js.map → block-bem-DxQXsOt3-B0AfUEct.js.map} +1 -1
- package/app/dist/assets/{color-QYuhlVFz-Da59QJlg.js → color-QYuhlVFz-CfbvNBa8.js} +2 -2
- package/app/dist/assets/{color-QYuhlVFz-Da59QJlg.js.map → color-QYuhlVFz-CfbvNBa8.js.map} +1 -1
- package/app/dist/assets/{component-Dg6TIbeY-CKN9C29x.js → component-BOFlST8N-B_KF7ifX.js} +2 -2
- package/app/dist/assets/{component-Dg6TIbeY-CKN9C29x.js.map → component-BOFlST8N-B_KF7ifX.js.map} +1 -1
- package/app/dist/assets/{component-BpOMe842-d76qFAAo.js → component-C4dhT4Ba-GrEKrV_C.js} +2 -2
- package/app/dist/assets/{component-BpOMe842-d76qFAAo.js.map → component-C4dhT4Ba-GrEKrV_C.js.map} +1 -1
- package/app/dist/assets/{component-Ba4gjLBG-D1ZU6c1D.js → component-C9cJK7Cf-D_kBqzZr.js} +2 -2
- package/app/dist/assets/{component-Ba4gjLBG-D1ZU6c1D.js.map → component-C9cJK7Cf-D_kBqzZr.js.map} +1 -1
- package/app/dist/assets/{component-Do9rjnte-DBdHGcO1.js → component-CBkrKKXd-M6htncBI.js} +2 -2
- package/app/dist/assets/{component-Do9rjnte-DBdHGcO1.js.map → component-CBkrKKXd-M6htncBI.js.map} +1 -1
- package/app/dist/assets/{component-C5BFsKau-D1lCaxA1.js → component-CHz6TLzY-Jpeck0s0.js} +2 -2
- package/app/dist/assets/{component-C5BFsKau-D1lCaxA1.js.map → component-CHz6TLzY-Jpeck0s0.js.map} +1 -1
- package/app/dist/assets/{component-CBpYh2q--qC3mPUiZ.js → component-CODtL04S-DHQ4--3X.js} +2 -2
- package/app/dist/assets/{component-CBpYh2q--qC3mPUiZ.js.map → component-CODtL04S-DHQ4--3X.js.map} +1 -1
- package/app/dist/assets/component-D30YHxgS-a2lOMMgs.js +2 -0
- package/app/dist/assets/{component-C3sXiwbS-KtR9PyJM.js.map → component-D30YHxgS-a2lOMMgs.js.map} +1 -1
- package/app/dist/assets/{component-DZbJLUju-09Qlzcty.js → component-DXmRJdLc-BW9M-psX.js} +2 -2
- package/app/dist/assets/{component-DZbJLUju-09Qlzcty.js.map → component-DXmRJdLc-BW9M-psX.js.map} +1 -1
- package/app/dist/assets/{component-C_d54ujF-B1-GQGgr.js → component-DoCNds1d-pNGllrou.js} +2 -2
- package/app/dist/assets/{component-C_d54ujF-B1-GQGgr.js.map → component-DoCNds1d-pNGllrou.js.map} +1 -1
- package/app/dist/assets/{component-CvCfEqSE-IFr3B4Wc.js → component-fK2EUkFf-DGakW9DS.js} +2 -2
- package/app/dist/assets/{component-CvCfEqSE-IFr3B4Wc.js.map → component-fK2EUkFf-DGakW9DS.js.map} +1 -1
- package/app/dist/assets/{component-BF8FPuIW-WU8pirP1.js → component-kDR4_xf0-D-XV4lAf.js} +2 -2
- package/app/dist/assets/{component-BF8FPuIW-WU8pirP1.js.map → component-kDR4_xf0-D-XV4lAf.js.map} +1 -1
- package/app/dist/assets/component-kxFmDVse-Bve8dvRz.js +2 -0
- package/app/dist/assets/{component-DzoBgfR4-CxQa27y9.js.map → component-kxFmDVse-Bve8dvRz.js.map} +1 -1
- package/app/dist/assets/{contrast-DMN9saXP-DoeBN50N.js → contrast-DMN9saXP-DtopJaNg.js} +2 -2
- package/app/dist/assets/{contrast-DMN9saXP-DoeBN50N.js.map → contrast-DMN9saXP-DtopJaNg.js.map} +1 -1
- package/app/dist/assets/{controller-D1hrFVo3-BzNP_H73.js → controller-D1hrFVo3-sFAl78hv.js} +2 -2
- package/app/dist/assets/{controller-D1hrFVo3-BzNP_H73.js.map → controller-D1hrFVo3-sFAl78hv.js.map} +1 -1
- package/app/dist/assets/{dev.utils-CJMVCYWh-B7rpAhDN.js → dev.utils-DDqySnXB-DIGfrT9P.js} +2 -2
- package/app/dist/assets/{dev.utils-CJMVCYWh-B7rpAhDN.js.map → dev.utils-DDqySnXB-DIGfrT9P.js.map} +1 -1
- package/app/dist/assets/{devtools-rRHULXVr-BHGnrgaq.js → devtools-CjmOcVsT-BGLoiuiV.js} +2 -2
- package/app/dist/assets/{devtools-rRHULXVr-BHGnrgaq.js.map → devtools-CjmOcVsT-BGLoiuiV.js.map} +1 -1
- package/app/dist/assets/disabled-CdyeAMlW-B1U-wMjG.js +2 -0
- package/app/dist/assets/{disabled-CdyeAMlW-D00p_Jkv.js.map → disabled-CdyeAMlW-B1U-wMjG.js.map} +1 -1
- package/app/dist/assets/{field-control-DXxCMXvx-DeGef0DY.js → field-control-Dkru7B-M-ehMeHFnb.js} +2 -2
- package/app/dist/assets/{field-control-DXxCMXvx-DeGef0DY.js.map → field-control-Dkru7B-M-ehMeHFnb.js.map} +1 -1
- package/app/dist/assets/{group-CI4sSgiu-CC7c4G1p.js → group-CXJiUqKv-Cz7ULqAi.js} +2 -2
- package/app/dist/assets/{group-CI4sSgiu-CC7c4G1p.js.map → group-CXJiUqKv-Cz7ULqAi.js.map} +1 -1
- package/app/dist/assets/has-closer-BQ7zAkgZ-DqEmhaBS.js +2 -0
- package/app/dist/assets/{has-closer-BQ7zAkgZ-CSdJjjc3.js.map → has-closer-BQ7zAkgZ-DqEmhaBS.js.map} +1 -1
- package/app/dist/assets/{href-DOi-fZMu-qS952fbR.js → href-DOi-fZMu-DEu_0tId.js} +2 -2
- package/app/dist/assets/{href-DOi-fZMu-qS952fbR.js.map → href-DOi-fZMu-DEu_0tId.js.map} +1 -1
- package/app/dist/assets/i18n-BaCf-SDK-untYIoMx.js +2 -0
- package/app/dist/assets/{i18n-BaCf-SDK-ZDziFSNq.js.map → i18n-BaCf-SDK-untYIoMx.js.map} +1 -1
- package/app/dist/assets/{index-B-_do4Dj.js → index-B6odPqxF.js} +5 -5
- package/app/dist/assets/{index-B-_do4Dj.js.map → index-B6odPqxF.js.map} +1 -1
- package/app/dist/assets/{index-DQdQBwMc-CAhzEQDt.js → index-wY4pHWJG-CL3xhWnK.js} +3 -3
- package/app/dist/assets/{index-DQdQBwMc-CAhzEQDt.js.map → index-wY4pHWJG-CL3xhWnK.js.map} +1 -1
- package/app/dist/assets/{input-CDtJZ2sy-oXLazHji.js → input-C_ZwHs-7-BfgzOYHM.js} +2 -2
- package/app/dist/assets/{input-CDtJZ2sy-oXLazHji.js.map → input-C_ZwHs-7-BfgzOYHM.js.map} +1 -1
- package/app/dist/assets/{input-container-DROwwh7_-UPtrdKex.js → input-container-CBl9xcK--BUntkTfY.js} +2 -2
- package/app/dist/assets/{input-container-DROwwh7_-UPtrdKex.js.map → input-container-CBl9xcK--BUntkTfY.js.map} +1 -1
- package/app/dist/assets/{item-C6p5wW-z-CQVFJ0Np.js → item-BacIXvMT-Dv4_ZoV8.js} +2 -2
- package/app/dist/assets/{item-C6p5wW-z-CQVFJ0Np.js.map → item-BacIXvMT-Dv4_ZoV8.js.map} +1 -1
- package/app/dist/assets/{item-CHP-bw8Q-BHYhI9M9.js → item-DewHrd_f-BvXjSBLw.js} +2 -2
- package/app/dist/assets/{item-CHP-bw8Q-BHYhI9M9.js.map → item-DewHrd_f-BvXjSBLw.js.map} +1 -1
- package/app/dist/assets/{item-Cbi_ZY6o-CbpzojRb.js → item-lEB6GAqe-Db5gQdG_.js} +2 -2
- package/app/dist/assets/{item-Cbi_ZY6o-CbpzojRb.js.map → item-lEB6GAqe-Db5gQdG_.js.map} +1 -1
- package/app/dist/assets/{item-ZjrNIhfW-UK3y_3Sp.js → item-nGiqyOvt-BRkULOct.js} +2 -2
- package/app/dist/assets/{item-ZjrNIhfW-UK3y_3Sp.js.map → item-nGiqyOvt-BRkULOct.js.map} +1 -1
- package/app/dist/assets/{kol-abbr.entry-D2VvIGbR.js → kol-abbr.entry-VHg8ixZc.js} +2 -2
- package/app/dist/assets/{kol-abbr.entry-D2VvIGbR.js.map → kol-abbr.entry-VHg8ixZc.js.map} +1 -1
- package/app/dist/assets/{kol-accordion.entry-CUqAT7mB.js → kol-accordion.entry-DHptzBLi.js} +4 -4
- package/app/dist/assets/{kol-accordion.entry-CUqAT7mB.js.map → kol-accordion.entry-DHptzBLi.js.map} +1 -1
- package/app/dist/assets/{kol-alert.entry-CyPHYkEQ.js → kol-alert.entry-cKZ9yVyH.js} +4 -4
- package/app/dist/assets/{kol-alert.entry-CyPHYkEQ.js.map → kol-alert.entry-cKZ9yVyH.js.map} +1 -1
- package/app/dist/assets/{kol-avatar.entry-W9Aa6xfP.js → kol-avatar.entry-DeXkKgKz.js} +2 -2
- package/app/dist/assets/{kol-avatar.entry-W9Aa6xfP.js.map → kol-avatar.entry-DeXkKgKz.js.map} +1 -1
- package/app/dist/assets/{kol-badge.entry-DPpmBfBV.js → kol-badge.entry-tDwpWnEt.js} +4 -4
- package/app/dist/assets/{kol-badge.entry-DPpmBfBV.js.map → kol-badge.entry-tDwpWnEt.js.map} +1 -1
- package/app/dist/assets/{kol-breadcrumb.entry-CcRCjJS8.js → kol-breadcrumb.entry-OZhiR_1p.js} +4 -4
- package/app/dist/assets/{kol-breadcrumb.entry-CcRCjJS8.js.map → kol-breadcrumb.entry-OZhiR_1p.js.map} +1 -1
- package/app/dist/assets/{kol-button-link.entry-BupQX4Fu.js → kol-button-link.entry-CfcKUCpa.js} +4 -4
- package/app/dist/assets/{kol-button-link.entry-BupQX4Fu.js.map → kol-button-link.entry-CfcKUCpa.js.map} +1 -1
- package/app/dist/assets/{kol-button.entry-CYwsYmLo.js → kol-button.entry-DC8izVrT.js} +4 -4
- package/app/dist/assets/{kol-button.entry-CYwsYmLo.js.map → kol-button.entry-DC8izVrT.js.map} +1 -1
- package/app/dist/assets/{kol-card.entry-DOIewOuz.js → kol-card.entry-Bz8qCFbw.js} +4 -4
- package/app/dist/assets/{kol-card.entry-DOIewOuz.js.map → kol-card.entry-Bz8qCFbw.js.map} +1 -1
- package/app/dist/assets/{kol-click-button.entry-D_06pGk9.js → kol-click-button.entry-CYahJe4i.js} +2 -2
- package/app/dist/assets/{kol-click-button.entry-D_06pGk9.js.map → kol-click-button.entry-CYahJe4i.js.map} +1 -1
- package/app/dist/assets/{kol-combobox.entry-D_MZn7LZ.js → kol-combobox.entry-D7djiq3i.js} +4 -4
- package/app/dist/assets/{kol-combobox.entry-D_MZn7LZ.js.map → kol-combobox.entry-D7djiq3i.js.map} +1 -1
- package/app/dist/assets/{kol-details.entry-D9IcSZxg.js → kol-details.entry-DEbkl4ad.js} +4 -4
- package/app/dist/assets/{kol-details.entry-D9IcSZxg.js.map → kol-details.entry-DEbkl4ad.js.map} +1 -1
- package/app/dist/assets/{kol-dialog.entry-B4y3woO_.js → kol-dialog.entry-2oKwwN0G.js} +4 -4
- package/app/dist/assets/{kol-dialog.entry-B4y3woO_.js.map → kol-dialog.entry-2oKwwN0G.js.map} +1 -1
- package/app/dist/assets/{kol-drawer.entry-BZMLhVs5.js → kol-drawer.entry-DkP-gznZ.js} +4 -4
- package/app/dist/assets/{kol-drawer.entry-BZMLhVs5.js.map → kol-drawer.entry-DkP-gznZ.js.map} +1 -1
- package/app/dist/assets/{kol-form.entry-CsFmafKV.js → kol-form.entry-Ckt0_SNO.js} +4 -4
- package/app/dist/assets/{kol-form.entry-CsFmafKV.js.map → kol-form.entry-Ckt0_SNO.js.map} +1 -1
- package/app/dist/assets/{kol-heading.entry-Yx37WIRc.js → kol-heading.entry-u9rdIT60.js} +2 -2
- package/app/dist/assets/{kol-heading.entry-Yx37WIRc.js.map → kol-heading.entry-u9rdIT60.js.map} +1 -1
- package/app/dist/assets/{kol-icon.entry-BnSxiZvG.js → kol-icon.entry-C26t3KR9.js} +4 -4
- package/app/dist/assets/{kol-icon.entry-BnSxiZvG.js.map → kol-icon.entry-C26t3KR9.js.map} +1 -1
- package/app/dist/assets/{kol-image.entry-BaHm7PwO.js → kol-image.entry-D0hS3L-u.js} +2 -2
- package/app/dist/assets/{kol-image.entry-BaHm7PwO.js.map → kol-image.entry-D0hS3L-u.js.map} +1 -1
- package/app/dist/assets/{kol-input-checkbox.entry-DzK0GTnv.js → kol-input-checkbox.entry-MkfF0lSp.js} +4 -4
- package/app/dist/assets/{kol-input-checkbox.entry-DzK0GTnv.js.map → kol-input-checkbox.entry-MkfF0lSp.js.map} +1 -1
- package/app/dist/assets/{kol-input-color.entry-CO44XWqn.js → kol-input-color.entry-BCi2FVyZ.js} +4 -4
- package/app/dist/assets/{kol-input-color.entry-CO44XWqn.js.map → kol-input-color.entry-BCi2FVyZ.js.map} +1 -1
- package/app/dist/assets/{kol-input-date.entry-yVvX-Qk-.js → kol-input-date.entry-8f0JmqND.js} +4 -4
- package/app/dist/assets/{kol-input-date.entry-yVvX-Qk-.js.map → kol-input-date.entry-8f0JmqND.js.map} +1 -1
- package/app/dist/assets/{kol-input-email.entry-B9gdat4u.js → kol-input-email.entry-DWLGMx9i.js} +4 -4
- package/app/dist/assets/{kol-input-email.entry-B9gdat4u.js.map → kol-input-email.entry-DWLGMx9i.js.map} +1 -1
- package/app/dist/assets/{kol-input-file.entry-lnDifT1h.js → kol-input-file.entry-DYnwukwk.js} +4 -4
- package/app/dist/assets/{kol-input-file.entry-lnDifT1h.js.map → kol-input-file.entry-DYnwukwk.js.map} +1 -1
- package/app/dist/assets/{kol-input-number.entry-Dv1TRMds.js → kol-input-number.entry-BJJZ2jGV.js} +4 -4
- package/app/dist/assets/{kol-input-number.entry-Dv1TRMds.js.map → kol-input-number.entry-BJJZ2jGV.js.map} +1 -1
- package/app/dist/assets/{kol-input-password.entry-CylQmiQJ.js → kol-input-password.entry-BnVshitZ.js} +4 -4
- package/app/dist/assets/{kol-input-password.entry-CylQmiQJ.js.map → kol-input-password.entry-BnVshitZ.js.map} +1 -1
- package/app/dist/assets/{kol-input-radio.entry-D9CpW0ay.js → kol-input-radio.entry-pQ73Wl04.js} +4 -4
- package/app/dist/assets/{kol-input-radio.entry-D9CpW0ay.js.map → kol-input-radio.entry-pQ73Wl04.js.map} +1 -1
- package/app/dist/assets/{kol-input-range.entry-B1YiM19T.js → kol-input-range.entry-BgmXLPSa.js} +4 -4
- package/app/dist/assets/{kol-input-range.entry-B1YiM19T.js.map → kol-input-range.entry-BgmXLPSa.js.map} +1 -1
- package/app/dist/assets/{kol-input-text.entry-DsUFxCmV.js → kol-input-text.entry-Bxe_VYIG.js} +4 -4
- package/app/dist/assets/{kol-input-text.entry-DsUFxCmV.js.map → kol-input-text.entry-Bxe_VYIG.js.map} +1 -1
- package/app/dist/assets/{kol-kolibri.entry-n_mblkfT.js → kol-kolibri.entry-BW5V29ub.js} +2 -2
- package/app/dist/assets/{kol-kolibri.entry-n_mblkfT.js.map → kol-kolibri.entry-BW5V29ub.js.map} +1 -1
- package/app/dist/assets/{kol-link-button.entry-D3ZSDfIC.js → kol-link-button.entry-CdGFzuGa.js} +4 -4
- package/app/dist/assets/{kol-link-button.entry-D3ZSDfIC.js.map → kol-link-button.entry-CdGFzuGa.js.map} +1 -1
- package/app/dist/assets/{kol-link.entry-BDc66LgH.js → kol-link.entry-7iPtsd-k.js} +4 -4
- package/app/dist/assets/{kol-link.entry-BDc66LgH.js.map → kol-link.entry-7iPtsd-k.js.map} +1 -1
- package/app/dist/assets/{kol-meter.entry-d_x-GL9o.js → kol-meter.entry-DfKzynYY.js} +2 -2
- package/app/dist/assets/{kol-meter.entry-d_x-GL9o.js.map → kol-meter.entry-DfKzynYY.js.map} +1 -1
- package/app/dist/assets/{kol-modal.entry-pnRbsNjP.js → kol-modal.entry-BZEf9SbI.js} +4 -4
- package/app/dist/assets/{kol-modal.entry-pnRbsNjP.js.map → kol-modal.entry-BZEf9SbI.js.map} +1 -1
- package/app/dist/assets/{kol-nav.entry-3aC_NhAK.js → kol-nav.entry-_YKEtIed.js} +4 -4
- package/app/dist/assets/{kol-nav.entry-3aC_NhAK.js.map → kol-nav.entry-_YKEtIed.js.map} +1 -1
- package/app/dist/assets/{kol-pagination.entry-C8G98mkl.js → kol-pagination.entry-CMetnMlW.js} +4 -4
- package/app/dist/assets/{kol-pagination.entry-C8G98mkl.js.map → kol-pagination.entry-CMetnMlW.js.map} +1 -1
- package/app/dist/assets/{kol-popover-button.entry-BvnSYPGP.js → kol-popover-button.entry-CFZ1T7Be.js} +4 -4
- package/app/dist/assets/{kol-popover-button.entry-BvnSYPGP.js.map → kol-popover-button.entry-CFZ1T7Be.js.map} +1 -1
- package/app/dist/assets/{kol-progress.entry-B6uZSIZc.js → kol-progress.entry-D0dhr_Tq.js} +2 -2
- package/app/dist/assets/{kol-progress.entry-B6uZSIZc.js.map → kol-progress.entry-D0dhr_Tq.js.map} +1 -1
- package/app/dist/assets/{kol-quote.entry-BX-jHphP.js → kol-quote.entry-_GDL-O44.js} +2 -2
- package/app/dist/assets/{kol-quote.entry-BX-jHphP.js.map → kol-quote.entry-_GDL-O44.js.map} +1 -1
- package/app/dist/assets/{kol-select.entry-Bzqwspeg.js → kol-select.entry-pQ4-AK63.js} +4 -4
- package/app/dist/assets/{kol-select.entry-Bzqwspeg.js.map → kol-select.entry-pQ4-AK63.js.map} +1 -1
- package/app/dist/assets/{kol-single-select.entry-EHlLYg5x.js → kol-single-select.entry-zsZH07su.js} +4 -4
- package/app/dist/assets/{kol-single-select.entry-EHlLYg5x.js.map → kol-single-select.entry-zsZH07su.js.map} +1 -1
- package/app/dist/assets/{kol-skeleton.entry-CdbVeHtB.js → kol-skeleton.entry-OLwPU0Ve.js} +2 -2
- package/app/dist/assets/{kol-skeleton.entry-CdbVeHtB.js.map → kol-skeleton.entry-OLwPU0Ve.js.map} +1 -1
- package/app/dist/assets/{kol-skip-nav.entry-Ch4DcdJq.js → kol-skip-nav.entry-5mzGQ35c.js} +4 -4
- package/app/dist/assets/{kol-skip-nav.entry-Ch4DcdJq.js.map → kol-skip-nav.entry-5mzGQ35c.js.map} +1 -1
- package/app/dist/assets/{kol-spin.entry-Epwxtwrj.js → kol-spin.entry-DPZT2mE3.js} +2 -2
- package/app/dist/assets/{kol-spin.entry-Epwxtwrj.js.map → kol-spin.entry-DPZT2mE3.js.map} +1 -1
- package/app/dist/assets/{kol-split-button.entry-Darg9H1U.js → kol-split-button.entry-B3XG_AXn.js} +4 -4
- package/app/dist/assets/{kol-split-button.entry-Darg9H1U.js.map → kol-split-button.entry-B3XG_AXn.js.map} +1 -1
- package/app/dist/assets/{kol-table-stateful.entry-DPpbAQYZ.js → kol-table-stateful.entry-3-mLn_xL.js} +4 -4
- package/app/dist/assets/{kol-table-stateful.entry-DPpbAQYZ.js.map → kol-table-stateful.entry-3-mLn_xL.js.map} +1 -1
- package/app/dist/assets/{kol-table-stateless.entry-CyMogVm2.js → kol-table-stateless.entry-Fo-dFgTp.js} +4 -4
- package/app/dist/assets/{kol-table-stateless.entry-CyMogVm2.js.map → kol-table-stateless.entry-Fo-dFgTp.js.map} +1 -1
- package/app/dist/assets/{kol-tabs.entry-BuQn3xNK.js → kol-tabs.entry-DhG_mUC7.js} +4 -4
- package/app/dist/assets/{kol-tabs.entry-BuQn3xNK.js.map → kol-tabs.entry-DhG_mUC7.js.map} +1 -1
- package/app/dist/assets/{kol-textarea.entry-umOxV89l.js → kol-textarea.entry-BPSwH_Js.js} +4 -4
- package/app/dist/assets/{kol-textarea.entry-umOxV89l.js.map → kol-textarea.entry-BPSwH_Js.js.map} +1 -1
- package/app/dist/assets/{kol-toast-container.entry-BKdvqW9f.js → kol-toast-container.entry-D2Mw1jLM.js} +4 -4
- package/app/dist/assets/{kol-toast-container.entry-BKdvqW9f.js.map → kol-toast-container.entry-D2Mw1jLM.js.map} +1 -1
- package/app/dist/assets/{kol-toolbar.entry-CKBoWt1p.js → kol-toolbar.entry-B2w4l0mD.js} +4 -4
- package/app/dist/assets/{kol-toolbar.entry-CKBoWt1p.js.map → kol-toolbar.entry-B2w4l0mD.js.map} +1 -1
- package/app/dist/assets/{kol-tooltip-wc.entry-MYJPL7b1.js → kol-tooltip-wc.entry-BNxDLqvS.js} +2 -2
- package/app/dist/assets/{kol-tooltip-wc.entry-MYJPL7b1.js.map → kol-tooltip-wc.entry-BNxDLqvS.js.map} +1 -1
- package/app/dist/assets/{kol-tree-item.entry-qmQqU6DC.js → kol-tree-item.entry-DogfqDFD.js} +4 -4
- package/app/dist/assets/{kol-tree-item.entry-qmQqU6DC.js.map → kol-tree-item.entry-DogfqDFD.js.map} +1 -1
- package/app/dist/assets/{kol-tree.entry-CDzr_nSh.js → kol-tree.entry-YM30wlo_.js} +2 -2
- package/app/dist/assets/{kol-tree.entry-CDzr_nSh.js.map → kol-tree.entry-YM30wlo_.js.map} +1 -1
- package/app/dist/assets/{kol-version.entry-CDaDxHXI.js → kol-version.entry-7MfceZKx.js} +4 -4
- package/app/dist/assets/{kol-version.entry-CDaDxHXI.js.map → kol-version.entry-7MfceZKx.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-c9P7yC4V-C-GiiPiM.js → label-c9P7yC4V-DP3B0DQO.js} +2 -2
- package/app/dist/assets/{label-c9P7yC4V-C-GiiPiM.js.map → label-c9P7yC4V-DP3B0DQO.js.map} +1 -1
- package/app/dist/assets/label-with-expert-slot-CocPu9HB-BNaeVFvZ.js +2 -0
- package/app/dist/assets/{label-with-expert-slot-CocPu9HB-B55VIGOC.js.map → label-with-expert-slot-CocPu9HB-BNaeVFvZ.js.map} +1 -1
- package/app/dist/assets/level-Q5lBISho-CXZoMeK7.js +2 -0
- package/app/dist/assets/{level-Q5lBISho-UZiHZ92z.js.map → level-Q5lBISho-CXZoMeK7.js.map} +1 -1
- package/app/dist/assets/link-target-B7A-qwaP-BjzAGJKL.js +2 -0
- package/app/dist/assets/{link-target-B7A-qwaP-BjOvNyI8.js.map → link-target-B7A-qwaP-BjzAGJKL.js.map} +1 -1
- package/app/dist/assets/links-Cn5VAgwV-uTslYIza.js +2 -0
- package/app/dist/assets/{links-Cn5VAgwV-vM4HFRoH.js.map → links-Cn5VAgwV-uTslYIza.js.map} +1 -1
- package/app/dist/assets/multiple-C3PDF11P-DSp3LOir.js +2 -0
- package/app/dist/assets/{multiple-C3PDF11P-DVq7WSj8.js.map → multiple-C3PDF11P-DSp3LOir.js.map} +1 -1
- package/app/dist/assets/name-D8963H-v-CNuQpB6C.js +2 -0
- package/app/dist/assets/{name-D8963H-v-D7W0W5vd.js.map → name-D8963H-v-CNuQpB6C.js.map} +1 -1
- package/app/dist/assets/{number-value-CQ8owQRn-C4RKh0p4.js → number-value-CQ8owQRn-HVETQwCy.js} +2 -2
- package/app/dist/assets/{number-value-CQ8owQRn-C4RKh0p4.js.map → number-value-CQ8owQRn-HVETQwCy.js.map} +1 -1
- package/app/dist/assets/open-BK72Y-b2-D6pf8ApE.js +2 -0
- package/app/dist/assets/{open-BK72Y-b2-s7mWnPeq.js.map → open-BK72Y-b2-D6pf8ApE.js.map} +1 -1
- package/app/dist/assets/{options-BFYSv5Hx-GHQY_pOZ.js → options-BFYSv5Hx-B3yXwppg.js} +2 -2
- package/app/dist/assets/{options-BFYSv5Hx-GHQY_pOZ.js.map → options-BFYSv5Hx-B3yXwppg.js.map} +1 -1
- package/app/dist/assets/{orientation-CLMxU4CB-DjVfFrXj.js → orientation-CLMxU4CB-DUGH1RYx.js} +2 -2
- package/app/dist/assets/{orientation-CLMxU4CB-DjVfFrXj.js.map → orientation-CLMxU4CB-DUGH1RYx.js.map} +1 -1
- package/app/dist/assets/placeholder-DYTECYZp-BJl6yOM2.js +2 -0
- package/app/dist/assets/{placeholder-DYTECYZp-DPmsuK_U.js.map → placeholder-DYTECYZp-BJl6yOM2.js.map} +1 -1
- package/app/dist/assets/read-only-CUfitD4v-D3y12QYs.js +2 -0
- package/app/dist/assets/{read-only-CUfitD4v-BVAuVaxf.js.map → read-only-CUfitD4v-D3y12QYs.js.map} +1 -1
- package/app/dist/assets/required-9s98RyZz-DFjeFftt.js +2 -0
- package/app/dist/assets/{required-9s98RyZz-BTMna1rj.js.map → required-9s98RyZz-DFjeFftt.js.map} +1 -1
- package/app/dist/assets/{resolve-props-CjBvvXId-5GvN2iZM.js → resolve-props-DrFDeILa-Db9W4T-C.js} +2 -2
- package/app/dist/assets/{resolve-props-CjBvvXId-5GvN2iZM.js.map → resolve-props-DrFDeILa-Db9W4T-C.js.map} +1 -1
- package/app/dist/assets/{resolve-props-YWmoYL6c-J2YR2gk2.js → resolve-props-YWmoYL6c-BXlKe5h6.js} +2 -2
- package/app/dist/assets/{resolve-props-YWmoYL6c-J2YR2gk2.js.map → resolve-props-YWmoYL6c-BXlKe5h6.js.map} +1 -1
- package/app/dist/assets/rows-ewozPs33-ttNgMp2d.js +2 -0
- package/app/dist/assets/{rows-ewozPs33-BT_an-YP.js.map → rows-ewozPs33-ttNgMp2d.js.map} +1 -1
- package/app/dist/assets/{scroll-lock-6SV-XFXR-DifuRR1F.js → scroll-lock-BotxOlMX-BGI__P76.js} +2 -2
- package/app/dist/assets/{scroll-lock-6SV-XFXR-DifuRR1F.js.map → scroll-lock-BotxOlMX-BGI__P76.js.map} +1 -1
- package/app/dist/assets/smart-button-FqAnsJDb-Bkm03u30.js +2 -0
- package/app/dist/assets/{smart-button-FqAnsJDb-BpBXTfTM.js.map → smart-button-FqAnsJDb-Bkm03u30.js.map} +1 -1
- package/app/dist/assets/spell-check-DC84AFL--FzEE3WSW.js +2 -0
- package/app/dist/assets/{spell-check-DC84AFL--CtGwu_OZ.js.map → spell-check-DC84AFL--FzEE3WSW.js.map} +1 -1
- package/app/dist/assets/src-PWGVLT-K-DSOQfx6O.js +2 -0
- package/app/dist/assets/{src-PWGVLT-K-DE_kwQbx.js.map → src-PWGVLT-K-DSOQfx6O.js.map} +1 -1
- package/app/dist/assets/step-BNDp_ZEh-BLjEUlQC.js +2 -0
- package/app/dist/assets/{step-BNDp_ZEh-CpdOuoKG.js.map → step-BNDp_ZEh-BLjEUlQC.js.map} +1 -1
- package/app/dist/assets/{suggestions-B7YH2Q8H-QAfaNm7x.js → suggestions-B7YH2Q8H-C7__-JVZ.js} +2 -2
- package/app/dist/assets/{suggestions-B7YH2Q8H-QAfaNm7x.js.map → suggestions-B7YH2Q8H-C7__-JVZ.js.map} +1 -1
- package/app/dist/assets/{suggestions-BYMmW1aV-qwx00Vix.js → suggestions-CX5S2xAI-DU_a8vEe.js} +2 -2
- package/app/dist/assets/{suggestions-BYMmW1aV-qwx00Vix.js.map → suggestions-CX5S2xAI-DU_a8vEe.js.map} +1 -1
- package/app/dist/assets/test-component.entry-C_8pbsle.js +2 -0
- package/app/dist/assets/{test-component.entry-SufZQUip.js.map → test-component.entry-C_8pbsle.js.map} +1 -1
- package/app/dist/assets/{toggle-handler-D-yalcds-CtRnb8we.js → toggle-handler-VctiltrE-BgknbR3j.js} +2 -2
- package/app/dist/assets/{toggle-handler-D-yalcds-CtRnb8we.js.map → toggle-handler-VctiltrE-BgknbR3j.js.map} +1 -1
- package/app/dist/assets/{unique-nav-labels-DugFb3rS-BgkI5IoG.js → unique-nav-labels-DugFb3rS-D2PeeInl.js} +2 -2
- package/app/dist/assets/{unique-nav-labels-DugFb3rS-BgkI5IoG.js.map → unique-nav-labels-DugFb3rS-D2PeeInl.js.map} +1 -1
- package/app/dist/assets/unit-Bq1otI2X-BgmRACBl.js +2 -0
- package/app/dist/assets/{unit-Bq1otI2X-BaItt4xn.js.map → unit-Bq1otI2X-BgmRACBl.js.map} +1 -1
- package/app/dist/assets/value-string-DTwx9glt-UHeXNcVE.js +2 -0
- package/app/dist/assets/{value-string-DTwx9glt-DU-w-vu0.js.map → value-string-DTwx9glt-UHeXNcVE.js.map} +1 -1
- package/app/dist/assets/{variant-CeijQFzL-C9aBh5xn.js → variant-CeijQFzL-D85og9Uq.js} +2 -2
- package/app/dist/assets/{variant-CeijQFzL-C9aBh5xn.js.map → variant-CeijQFzL-D85og9Uq.js.map} +1 -1
- package/app/dist/assets/{width-BDh5pZvE-CaO6GLI1.js → width-BDh5pZvE-DRMi4LEg.js} +2 -2
- package/app/dist/assets/{width-BDh5pZvE-CaO6GLI1.js.map → width-BDh5pZvE-DRMi4LEg.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 +4 -4
- package/app/dist/assets/align-DeB15XnU-DdElUkod.js +0 -2
- package/app/dist/assets/block-bem-DxQXsOt3-CTfri7ZU.js +0 -2
- package/app/dist/assets/component-C3sXiwbS-KtR9PyJM.js +0 -2
- package/app/dist/assets/component-DzoBgfR4-CxQa27y9.js +0 -2
- package/app/dist/assets/disabled-CdyeAMlW-D00p_Jkv.js +0 -2
- package/app/dist/assets/has-closer-BQ7zAkgZ-CSdJjjc3.js +0 -2
- package/app/dist/assets/i18n-BaCf-SDK-ZDziFSNq.js +0 -2
- package/app/dist/assets/label-with-expert-slot-CocPu9HB-B55VIGOC.js +0 -2
- package/app/dist/assets/level-Q5lBISho-UZiHZ92z.js +0 -2
- package/app/dist/assets/link-target-B7A-qwaP-BjOvNyI8.js +0 -2
- package/app/dist/assets/links-Cn5VAgwV-vM4HFRoH.js +0 -2
- package/app/dist/assets/multiple-C3PDF11P-DVq7WSj8.js +0 -2
- package/app/dist/assets/name-D8963H-v-D7W0W5vd.js +0 -2
- package/app/dist/assets/open-BK72Y-b2-s7mWnPeq.js +0 -2
- package/app/dist/assets/placeholder-DYTECYZp-DPmsuK_U.js +0 -2
- package/app/dist/assets/read-only-CUfitD4v-BVAuVaxf.js +0 -2
- package/app/dist/assets/required-9s98RyZz-BTMna1rj.js +0 -2
- package/app/dist/assets/rows-ewozPs33-BT_an-YP.js +0 -2
- package/app/dist/assets/smart-button-FqAnsJDb-BpBXTfTM.js +0 -2
- package/app/dist/assets/spell-check-DC84AFL--CtGwu_OZ.js +0 -2
- package/app/dist/assets/src-PWGVLT-K-DE_kwQbx.js +0 -2
- package/app/dist/assets/step-BNDp_ZEh-CpdOuoKG.js +0 -2
- package/app/dist/assets/test-component.entry-SufZQUip.js +0 -2
- package/app/dist/assets/unit-Bq1otI2X-BaItt4xn.js +0 -2
- package/app/dist/assets/value-string-DTwx9glt-DU-w-vu0.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{W as e,b as t,c as n,n as r}from"./index-
|
|
2
|
-
//# sourceMappingURL=base-web-component-
|
|
1
|
+
import{W as e,b as t,c as n,n as r}from"./index-wY4pHWJG-CL3xhWnK.js";import{o as i}from"./base-web-component-3R1Dy3QK-CfE_3Gfg.js";import{n as a,t as o}from"./label-c9P7yC4V-DP3B0DQO.js";import{n as s}from"./tslib.es6-QNbPBOk5-DpzS01Oy.js";import{t as c}from"./clsx-COFh-Vc8-DWAop4cA.js";import{t as l}from"./block-bem-DxQXsOt3-B0AfUEct.js";import{d as u,l as d,p as f,t as p}from"./variant-CeijQFzL-D85og9Uq.js";import{t as m}from"./access-and-short-key-ijzCZfHm-Dx5Q-CAn.js";import{a as h,c as g,n as _,o as v,s as y,t as b}from"./api-Bhr2ic7C-CK7j_dxP.js";import{n as x,r as S,t as C}from"./input-container-CBl9xcK--BUntkTfY.js";import{t as w}from"./required-9s98RyZz-DFjeFftt.js";import{t as T}from"./multiple-C3PDF11P-DSp3LOir.js";import{t as E}from"./options-B0rBHetL-BwxiS_20.js";import{t as D}from"./rows-ewozPs33-ttNgMp2d.js";var O=e=>{if(typeof e==`object`&&e){if(typeof e.label==`string`&&e.label.length>0)return e.disabled=e.disabled===!0,e.label=`${e.label}`.trim(),a(e.label,3)===!1&&o(e.label)===!1&&t(`A differing Aria-Label (${e.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(e.options)||e.options.find(e=>O(e)===!1)===void 0;if(typeof e.label==`number`)return!0}return!1};function k(t){let n=typeof t==`string`?e(t):t;if(Array.isArray(n)&&n.every(e=>O(e)))return n;throw Error(`Invalid select options`)}var A=i(`options`,[],k),j=i(`value`,[],e=>Array.isArray(e)?e:[e]),M={required:[...h.required],optional:[...h.optional,p,S,T,A,w,D,j,d,u,f]},N=l(`kol-select`),P=e=>{var{class:t,index:r,selectedValue:i,selected:a,value:o,label:l,disabled:u}=e,d=s(e,[`class`,`index`,`selectedValue`,`selected`,`value`,`label`,`disabled`]);let f=a||(i===void 0?[]:Array.isArray(i)?i:[i]).includes(o);return n(`option`,Object.assign({class:c(N(`option`,{selected:!!f,disabled:!!u}),t),selected:f,disabled:u,value:r},d),l)},F=({preKey:e,options:t,disabled:i,value:a,OptionProps:o={},OptionGroupProps:c={}})=>t?.length?n(r,null,t.map((t,r)=>{let l=[e,`-${r}`].join(``);if(`options`in t){if(!t.options?.length)return null;let e=!!(i||t.disabled),{label:r}=t,u=s(t,[`label`]);return n(`optgroup`,Object.assign({class:N(`optgroup`,{disabled:e}),key:l},c,{label:r?.toString(),disabled:e}),n(F,Object.assign({OptionGroupProps:c,OptionProps:o,value:a,preKey:l},u,{disabled:e})))}return`value`in t?n(P,Object.assign({key:l},o,{index:l,selectedValue:a},t,{disabled:!!(i||t.disabled)})):null})):null,I=e=>{let{class:t,msg:r,touched:i,disabled:a,required:o,options:l,value:u,OptionProps:d,OptionGroupProps:f,ariaDescribedBy:p,hideLabel:m,label:h}=e,_=s(e,[`class`,`msg`,`touched`,`disabled`,`required`,`options`,`value`,`OptionProps`,`OptionGroupProps`,`ariaDescribedBy`,`hideLabel`,`label`]),b=Object.assign(Object.assign({class:c(N(Object.assign({disabled:!!a,required:!!o,touched:!!i},g(r,i)?{[y(r)]:!0}:{})),t),required:o,disabled:a},v({ariaDescribedBy:p,hideLabel:m,label:h})),_);return n(`select`,Object.assign({},b),n(F,{OptionGroupProps:f,OptionProps:d,disabled:a,options:l,value:u}))},L=(e,t,n)=>{let r=Array.isArray(e);if(t){if(e!==void 0&&!r)throw Error(`↑ The schema for the property (_value) is not valid for multiple mode. Expected an array. The value will not be changed. (${n} = ${JSON.stringify(e)})`)}else if(r)throw Error(`↑ The schema for the property (_value) is not valid for single mode. Expected a single value. The value will not be changed. (${n} = ${JSON.stringify(e)})`)},R=(e,t=!1)=>e.flatMap(e=>`options`in e&&Array.isArray(e.options)?R(e.options,!!(t||e.disabled)):[Object.assign(Object.assign({},e),{disabled:!!(t||e.disabled)})]),z=(e,t,n)=>{if(t.length===0)return e;let r=R(t),i=r.map(e=>e.value),a=e.every(e=>i.includes(e))?e:e.filter(e=>i.includes(e));if(n===!1&&a.length===0){let e=r.find(e=>e.disabled!==!0);return e?[e.value]:a}return a},B=class extends b{constructor(){super(...arguments),this.keyOptionMap=new Map,this.hasValue=!0,this.handleSelectInput=e=>{let t=Array.from(this.ctaRef.el?.options||[]).filter(e=>e.selected).map(e=>this.keyOptionMap.get(e.value)?.value);if(this._multiple)this._value=t,this.handleInput(e,t);else{let n=t.length>0?t[0]:void 0;this._value=n,this.handleInput(e,n)}},this.handleSelectChange=e=>{let t=this._value;this.handleChange(e,t),this.hasValue=!!t}}applyAccessKey(e){p.apply(e,e=>this.setRenderProp(`accessKey`,e)),m(e,this.getShortKeyProp())}applyShortKey(e){d.apply(e,e=>this.setRenderProp(`shortKey`,e)),m(this.getAccessKeyProp(),e)}applyIcons(e){S.apply(e,e=>this.setRenderProp(`icons`,e))}applyMultiple(e){L(this._value,e===!0,`current`),T.apply(e,e=>{this.setRenderProp(`multiple`,e),this.setRenderProp(`value`,z(this.getRenderProp(`value`),this.getRenderProp(`options`),this._multiple))})}applyOptions(e){A.apply(e,e=>{this.setRenderProp(`options`,e),e.length>0&&(this.keyOptionMap.clear(),E(this.keyOptionMap,e),this.setRenderProp(`value`,z(this.getRenderProp(`value`),e,this._multiple)))})}applyRequired(e){w.apply(e,e=>this.setRenderProp(`required`,e))}applyRows(e){D.apply(e,e=>this.setRenderProp(`rows`,e))}applyTabIndex(e){u.apply(e,e=>this.setRenderProp(`tabIndex`,e))}applyValue(e){L(e,this._multiple===!0,`received`);let t=e=>{let t=z(e,this.getRenderProp(`options`),this._multiple);this.setRenderProp(`value`,t),this.formAssociation.setFormAssociatedValue(this.getModelValue())};e===null?t([null]):j.apply(e,t)}applyVariant(e){f.apply(e,e=>this.setRenderProp(`variant`,e))}getModelValue(){let e=this.getRenderProp(`value`);return this._multiple?e:Array.isArray(e)&&e.length>0?e[0]:e}getSelectProps(){let{ariaDescribedBy:e,hasError:t}=this.getAria(),n=this.getRenderProp(`multiple`),r=this.getRenderProp(`shortKey`);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`)||void 0,disabled:this.getRenderProp(`disabled`),name:this.getRenderProp(`name`)||void 0,"aria-invalid":t?`true`:void 0,ariaDescribedBy:e,size:n?this.getRenderProp(`rows`):void 0,multiple:n,required:this.getRenderProp(`required`),touched:this.getRenderProp(`touched`),msg:this.getRenderProp(`msg`)},r?{"aria-keyshortcuts":r}:{}),{ref:this.ctaRef,onBlur:this.handleBlur,onChange:this.handleSelectChange,onClick:this.handleClick,onFocus:this.handleFocus,onInput:this.handleSelectInput,onKeyDown:this.handleKeyDown})}renderSelectField(){let e=this.getRenderProp(`disabled`),{startAdornment:t,endAdornment:r}=x({icons:this.getRenderProp(`icons`)});return n(_,Object.assign({},this.getFormFieldProps({class:c(`kol-form-field-select`,{"kol-form-field--has-value":this.hasValue}),accessKey:this.getRenderProp(`accessKey`)||void 0,shortKey:this.getRenderProp(`shortKey`)||void 0,required:this.getRenderProp(`required`),variant:this.getRenderProp(`variant`)}),{onClick:()=>this.ctaRef.el?.focus()}),n(C,{disabled:e,msg:this.getRenderProp(`msg`),touched:this.getRenderProp(`touched`),startAdornment:t,endAdornment:r},n(I,Object.assign({},this.getSelectProps()))))}};export{M as n,B as t};
|
|
2
|
+
//# sourceMappingURL=base-web-component-CyCs0EpM-CWFRS3Bk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-web-component-6J5sCsnZ-sKdq2N3y.js","names":["parseJson","a11yHint","h","Fragment","createPropDefinition","hasEnoughReadableChars","containsOnlyNumbers","__rest","clsx","getBlockBem","tabIndexProp","shortKeyProp","variantProp","accessKeyProp","validateAccessAndShortKey","formFieldBasePropsConfig","isMsgDefinedAndInputTouched","FormFieldFC","getDefaultInputProps","getMsgType","BaseFormFieldWebComponent","getInputAdornments","horizontalIconsProp","InputContainerFC","requiredProp","multipleProp","fillKeyOptionMap","rowsProp","validateInputSelectOptions","option","item","normalizeOptionsWithOptgroup","parsed","value","optionsWithOptgroupProp","selectValueProp","selectPropsConfig","selectBem","SelectOptionFC","classNames","_a","other","isSelected","selected","selectedValue","disabled","index","label","SelectOptionListFC","options","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-6J5sCsnZ.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { n as a11yHint, p as parseJson } from './common-BqpMtheU.js';\nimport { a as accessKeyProp, d as shortKeyProp, t as tabIndexProp, v as variantProp } from './variant-CeijQFzL.js';\nimport { h as horizontalIconsProp, g as getInputAdornments, I as InputContainerFC } from './input-container-DROwwh7_.js';\nimport { c as createPropDefinition } from './base-web-component-3R1Dy3QK.js';\nimport { m as multipleProp } from './multiple-C3PDF11P.js';\nimport { r as requiredProp } from './required-9s98RyZz.js';\nimport { r as rowsProp } from './rows-ewozPs33.js';\nimport { f as formFieldBasePropsConfig, i as isMsgDefinedAndInputTouched, g as getMsgType, c as getDefaultInputProps, B as BaseFormFieldWebComponent, F as FormFieldFC } from './api-BAEPnyL7.js';\nimport { h, F as Fragment } from './index-DQdQBwMc.js';\nimport { v as validateAccessAndShortKey } from './access-and-short-key-ijzCZfHm.js';\nimport { c as clsx } from './clsx-COFh-Vc8.js';\nimport { h as hasEnoughReadableChars, c as containsOnlyNumbers } from './label-c9P7yC4V.js';\nimport { f as fillKeyOptionMap } from './options-B0rBHetL.js';\nimport { a as __rest } from './tslib.es6-QNbPBOk5.js';\nimport { g as getBlockBem } from './block-bem-DxQXsOt3.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 var _a;\n const key = [preKey, `-${index}`].join('');\n if ('options' in option) {\n if (!((_a = option.options) === null || _a === void 0 ? void 0 : _a.length)) {\n return null;\n }\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//# sourceMappingURL=base-web-component-6J5sCsnZ.js.map\n\n//# sourceMappingURL=base-web-component-6J5sCsnZ.js.map"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,KAAK,WAAY,SAAU,KAAK,mBAAoB,QAAS,KAAK,YAAa,QAAS,KAAK,YAAa,QAAS,KAAK,kBAAmB,UAAW,KAAK,aAAc,CAAC,CACn2B,CACA,mBAAoB,CAChB,IAAMpC,EAAW,KAAK,cAAc,UAAU,EACxC,CAAE,iBAAgB,gBAAiBxB,EAAmB,CAAE,MAAO,KAAK,cAAc,OAAO,CAAE,CAAC,EAClG,OAAQnB,EAAEe,EAAa,OAAO,OAAO,CAAC,EAAG,KAAK,kBAAkB,CAC5D,MAAOT,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,EAAGN,EAAEqB,EAAkB,CAAY,WAAU,IAAK,KAAK,cAAc,KAAK,EAAG,QAAS,KAAK,cAAc,SAAS,EAAmB,iBAA8B,cAAa,EAAGrB,EAAEqD,EAAU,OAAO,OAAO,CAAC,EAAG,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,CAC7V,CACJ"}
|
|
1
|
+
{"version":3,"file":"base-web-component-CyCs0EpM-CWFRS3Bk.js","names":["parseJson","a11yHint","h","Fragment","createPropDefinition","hasEnoughReadableChars","containsOnlyNumbers","__rest","clsx","getBlockBem","tabIndexProp","shortKeyProp","variantProp","accessKeyProp","validateAccessAndShortKey","formFieldBasePropsConfig","isMsgDefinedAndInputTouched","FormFieldFC","getDefaultInputProps","getMsgType","BaseFormFieldWebComponent","getInputAdornments","horizontalIconsProp","InputContainerFC","requiredProp","multipleProp","fillKeyOptionMap","rowsProp","validateInputSelectOptions","option","item","normalizeOptionsWithOptgroup","parsed","value","optionsWithOptgroupProp","selectValueProp","selectPropsConfig","selectBem","SelectOptionFC","classNames","_a","other","isSelected","selected","selectedValue","disabled","index","label","SelectOptionListFC","options","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-CyCs0EpM.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { n as a11yHint, p as parseJson } from './common-BqpMtheU.js';\nimport { a as accessKeyProp, d as shortKeyProp, t as tabIndexProp, v as variantProp } from './variant-CeijQFzL.js';\nimport { h as horizontalIconsProp, g as getInputAdornments, I as InputContainerFC } from './input-container-CBl9xcK-.js';\nimport { c as createPropDefinition } from './base-web-component-3R1Dy3QK.js';\nimport { m as multipleProp } from './multiple-C3PDF11P.js';\nimport { r as requiredProp } from './required-9s98RyZz.js';\nimport { r as rowsProp } from './rows-ewozPs33.js';\nimport { f as formFieldBasePropsConfig, i as isMsgDefinedAndInputTouched, g as getMsgType, c as getDefaultInputProps, B as BaseFormFieldWebComponent, F as FormFieldFC } from './api-Bhr2ic7C.js';\nimport { h, F as Fragment } from './index-wY4pHWJG.js';\nimport { v as validateAccessAndShortKey } from './access-and-short-key-ijzCZfHm.js';\nimport { c as clsx } from './clsx-COFh-Vc8.js';\nimport { h as hasEnoughReadableChars, c as containsOnlyNumbers } from './label-c9P7yC4V.js';\nimport { f as fillKeyOptionMap } from './options-B0rBHetL.js';\nimport { a as __rest } from './tslib.es6-QNbPBOk5.js';\nimport { g as getBlockBem } from './block-bem-DxQXsOt3.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 var _a;\n const key = [preKey, `-${index}`].join('');\n if ('options' in option) {\n if (!((_a = option.options) === null || _a === void 0 ? void 0 : _a.length)) {\n return null;\n }\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//# sourceMappingURL=base-web-component-CyCs0EpM.js.map\n\n//# sourceMappingURL=base-web-component-CyCs0EpM.js.map"],"mappings":"o0BAmBA,IAAM4B,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,EAClCxB,EAAuBwB,EAAO,MAAO,CAAC,IAAM,IAASvB,EAAoBuB,EAAO,KAAK,IAAM,IAC3F5B,EAAS,2BAA2B4B,EAAO,MAAM,gGAAgG,EAErJ,CAAI,MAAM,QAAQA,EAAO,OAAO,GACpBA,EAAO,QAAQ,KAAM,GAClBD,EAA2BE,CAAI,IAAM,EAC/C,IAAM,I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U,GAAK,IAAA,GAC5C,SAAU,KAAK,cAAc,UAAU,EACvC,QAAS,KAAK,cAAc,SAAS,CACzC,CAAC,EAAG,CAAE,YAAsC,KAAK,OAAO,IAA4C,MAAM,CAAK,CAAC,EAAGN,EAAEqB,EAAkB,CAAY,WAAU,IAAK,KAAK,cAAc,KAAK,EAAG,QAAS,KAAK,cAAc,SAAS,EAAmB,iBAA8B,cAAa,EAAGrB,EAAEqD,EAAU,OAAO,OAAO,CAAC,EAAG,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,CAC7V,CACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./index-
|
|
2
|
-
//# sourceMappingURL=behavior-
|
|
1
|
+
import"./index-wY4pHWJG-CL3xhWnK.js";import{t as e}from"./behavior-D1kOlK6p-CK23p9Tn.js";import{t}from"./dev.utils-DDqySnXB-DIGfrT9P.js";import{_ as n,b as r,f as i,o as a,s as o}from"./base-web-component-3R1Dy3QK-CfE_3Gfg.js";import{t as s}from"./i18n-BaCf-SDK-untYIoMx.js";var c=a(`hasCounter`,!1,i),l=a(`maxLength`,void 0,n,e=>e===void 0||e>=0),u=[`hard`,`soft`];function d(e){let t=r(e);if(o(t,u))return t;throw Error(`Invalid max length behavior: ${t}`)}var f=a(`maxLengthBehavior`,`hard`,d),p={optional:[c,l,f]},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 e{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(e){return typeof this.getRenderProp(`maxLength`)==`number`&&!this.hasCounter()?t(e,`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-COQhqcG7-DgiDghP9.js.map
|
package/app/dist/assets/{behavior-CH_2MMuX-DytWoGOP.js.map → behavior-COQhqcG7-DgiDghP9.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior-CH_2MMuX-DytWoGOP.js","names":["BaseBehavior","normalizeNumber","normalizeString","normalizeBoolean","createPropDefinition","isEnumOption","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","createRelatedUniqueId","id","limit","text","forceReannounce"],"sources":["../../../../../components/dist/esm/behavior-CH_2MMuX.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { a as createRelatedUniqueId } from './dev.utils-CJMVCYWh.js';\nimport './common-BqpMtheU.js';\nimport { c as createPropDefinition, n as normalizeBoolean, o as normalizeNumber, b as normalizeString, i as isEnumOption } from './base-web-component-3R1Dy3QK.js';\nimport { B as BaseBehavior } from './behavior-D1kOlK6p.js';\nimport { t as translate } from './i18n-BaCf-SDK.js';\n\nconst hasCounterProp = createPropDefinition('hasCounter', false, normalizeBoolean);\n\nconst maxLengthProp = createPropDefinition('maxLength', undefined, normalizeNumber, (value) => value === undefined || 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, maxLengthProp, maxLengthBehaviorProp],\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//# sourceMappingURL=behavior-CH_2MMuX.js.map\n\n//# sourceMappingURL=behavior-CH_2MMuX.js.map"],"mappings":"mRASA,IAAMO,EAAiBH,EAAqB,aAAc,GAAOD,CAAgB,EAE3EK,EAAgBJ,EAAqB,YAAa,IAAA,GAAWH,EAAkB,GAAUQ,IAAU,IAAA,IAA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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,IAAIkB,EAAO,CAACd,EAAmBF,EAAmBF,EAAWC,CAAa,EAAGI,EAAkBH,EAAmBF,EAAWC,CAAa,CAAC,CAAC,CACvI,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACTkB,IACA,KAAK,iBAAmB,CAAC,KAAK,iBAC1B,KAAK,mBACL,GAAQX,IAGhB,KAAK,SAAS,UAAYU,CAC9B,CACJ"}
|
|
1
|
+
{"version":3,"file":"behavior-COQhqcG7-DgiDghP9.js","names":["BaseBehavior","normalizeNumber","normalizeString","normalizeBoolean","createPropDefinition","isEnumOption","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","createRelatedUniqueId","id","limit","text","forceReannounce"],"sources":["../../../../../components/dist/esm/behavior-COQhqcG7.js"],"sourcesContent":["/*!\n * KoliBri - The accessible HTML-Standard\n */\nimport { a as createRelatedUniqueId } from './dev.utils-DDqySnXB.js';\nimport './common-BqpMtheU.js';\nimport { c as createPropDefinition, n as normalizeBoolean, o as normalizeNumber, b as normalizeString, i as isEnumOption } from './base-web-component-3R1Dy3QK.js';\nimport { B as BaseBehavior } from './behavior-D1kOlK6p.js';\nimport { t as translate } from './i18n-BaCf-SDK.js';\n\nconst hasCounterProp = createPropDefinition('hasCounter', false, normalizeBoolean);\n\nconst maxLengthProp = createPropDefinition('maxLength', undefined, normalizeNumber, (value) => value === undefined || 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, maxLengthProp, maxLengthBehaviorProp],\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//# sourceMappingURL=behavior-COQhqcG7.js.map\n\n//# sourceMappingURL=behavior-COQhqcG7.js.map"],"mappings":"mRASA,IAAMO,EAAiBH,EAAqB,aAAc,GAAOD,CAAgB,EAE3EK,EAAgBJ,EAAqB,YAAa,IAAA,GAAWH,EAAkB,GAAUQ,IAAU,IAAA,IAAaA,GAAS,CAAC,EAE1HC,EAA8B,CAAC,OAAQ,MAAM,EACnD,SAASC,EAA2B,EAAO,CACvC,IAAMC,EAAMV,EAAgBO,CAAK,EACjC,GAAIJ,EAAaO,EAAKF,CAA2B,EAC7C,OAAOE,EAEX,MAAU,MAAM,gCAAgCA,GAAK,CAC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,EAAWC,CAAa,EAAGI,EAAkBH,EAAmBF,EAAWC,CAAa,CAAC,CAAC,CACvI,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,EACTkB,IACA,KAAK,iBAAmB,CAAC,KAAK,iBAC1B,KAAK,mBACL,GAAQX,IAGhB,KAAK,SAAS,UAAYU,CAC9B,CACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as e,k as t}from"./index-DQdQBwMc-CAhzEQDt.js";import{b as n,n as r,o as i}from"./base-web-component-3R1Dy3QK-Be7ltWsP.js";import{r as a}from"./label-c9P7yC4V-C-GiiPiM.js";import{t as o}from"./align-DeB15XnU-DdElUkod.js";var s=0,c=()=>{s++},l=()=>{s=Math.max(0,s-1)},u=e=>{s>0&&e.preventDefault()},d=o(`align`,`top`),f=i(`badgeText`,``,n),p=i(`id`,``,n),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=r(t)}setRenderProp(e,t){this.renderProps[e]=t}getRenderProp(e){return this.renderProps[e]}},ct={required:[a],optional:[d,f,p]},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){a.apply(e,e=>{this.setRenderProp(`label`,e)})}watchAlign(e){d.apply(e,e=>{this.setRenderProp(`align`,e)})}watchBadgeText(e){f.apply(e,e=>{this.setRenderProp(`badgeText`,e)})}watchId(e){p.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.addListeners(t))}handleEventListeners(e){let t=e.previousElementSibling;this.syncListeners(this.previousSibling,t,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(ot(this.tooltipElement),l(),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),c(),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,d as i,lt as n,p as o,rt as r,u as s,st as t};
|
|
2
|
-
//# sourceMappingURL=behavior-D1kOlK6p-
|
|
1
|
+
import{L as e,k as t}from"./index-wY4pHWJG-CL3xhWnK.js";import{b as n,n as r,o as i}from"./base-web-component-3R1Dy3QK-CfE_3Gfg.js";import{r as a}from"./label-c9P7yC4V-DP3B0DQO.js";import{t as o}from"./align-DeB15XnU-CQTQ4uFG.js";var s=0,c=()=>{s++},l=()=>{s=Math.max(0,s-1)},u=e=>{s>0&&e.preventDefault()},d=o(`align`,`top`),f=i(`badgeText`,``,n),p=i(`id`,``,n),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=r(t)}setRenderProp(e,t){this.renderProps[e]=t}getRenderProp(e){return this.renderProps[e]}},ct={required:[a],optional:[d,f,p]},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){a.apply(e,e=>{this.setRenderProp(`label`,e)})}watchAlign(e){d.apply(e,e=>{this.setRenderProp(`align`,e)})}watchBadgeText(e){f.apply(e,e=>{this.setRenderProp(`badgeText`,e)})}watchId(e){p.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.addListeners(t))}handleEventListeners(e){let t=e.previousElementSibling;this.syncListeners(this.previousSibling,t,!0)}hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(ot(this.tooltipElement),l(),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),c(),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,d as i,lt as n,p as o,rt as r,u as s,st as t};
|
|
2
|
+
//# sourceMappingURL=behavior-D1kOlK6p-CK23p9Tn.js.map
|