@public-ui/components 4.1.4 → 4.1.5-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/kolicons/kolicons.eot +0 -0
- package/assets/kolicons/kolicons.ttf +0 -0
- package/assets/kolicons/kolicons.woff +0 -0
- package/assets/kolicons/kolicons.woff2 +0 -0
- package/assets/kolicons/style.css +6 -6
- package/custom-elements.json +55 -1
- package/dist/cjs/{Alert-ErwJUGfq.js → Alert-b0RjmS_b.js} +1 -1
- package/dist/cjs/{Alert-ErwJUGfq.js.map → Alert-b0RjmS_b.js.map} +1 -1
- package/dist/cjs/{Collapsible-Cy_63ooz.js → Collapsible-BdU5fFTJ.js} +1 -1
- package/dist/cjs/{Collapsible-Cy_63ooz.js.map → Collapsible-BdU5fFTJ.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-Bxf68S0b.js → CustomSuggestionsOptionsGroup-CBIKPUnR.js} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-Bxf68S0b.js.map → CustomSuggestionsOptionsGroup-CBIKPUnR.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-BCH2wWkM.js → FieldControlStateWrapper-uBwKNiLr.js} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-BCH2wWkM.js.map → FieldControlStateWrapper-uBwKNiLr.js.map} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-CU7sL9TC.js → FormFieldStateWrapper-BC8WyGKq.js} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-CU7sL9TC.js.map → FormFieldStateWrapper-BC8WyGKq.js.map} +1 -1
- package/dist/cjs/{Heading-UArLG5Wt.js → Heading-Du94r6Ou.js} +1 -1
- package/dist/cjs/{Heading-UArLG5Wt.js.map → Heading-Du94r6Ou.js.map} +1 -1
- package/dist/cjs/{Input-DlH7bc0M.js → Input-Bb_FgPgW.js} +1 -1
- package/dist/cjs/{Input-DlH7bc0M.js.map → Input-Bb_FgPgW.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-DjEacrjP.js → InputStateWrapper-D9ExwaFr.js} +1 -1
- package/dist/cjs/{InputStateWrapper-DjEacrjP.js.map → InputStateWrapper-D9ExwaFr.js.map} +1 -1
- package/dist/cjs/{app-globals-C0jmrzx0.js → app-globals-CnHg68mH.js} +1 -1
- package/dist/cjs/{app-globals-C0jmrzx0.js.map → app-globals-CnHg68mH.js.map} +1 -1
- package/dist/cjs/{component-CUEItFKO.js → component-B7W-2yeG.js} +1 -1
- package/dist/cjs/{component-CUEItFKO.js.map → component-B7W-2yeG.js.map} +1 -1
- package/dist/cjs/{component-NrCy8bX0.js → component-CfTZFCUy.js} +1 -1
- package/dist/cjs/{component-NrCy8bX0.js.map → component-CfTZFCUy.js.map} +1 -1
- package/dist/cjs/{component-CrXueqjD.js → component-DACJ4mUM.js} +1 -1
- package/dist/cjs/{component-CrXueqjD.js.map → component-DACJ4mUM.js.map} +1 -1
- package/dist/cjs/{controller-H0TWImvv.js → controller-Bz4ZHrYz.js} +1 -1
- package/dist/cjs/{controller-H0TWImvv.js.map → controller-Bz4ZHrYz.js.map} +1 -1
- package/dist/cjs/{controller-OLnMohot.js → controller-CFdWLuXi.js} +1 -1
- package/dist/cjs/{controller-OLnMohot.js.map → controller-CFdWLuXi.js.map} +1 -1
- package/dist/cjs/{controller-BkyLwb5B.js → controller-CljA-pC3.js} +1 -1
- package/dist/cjs/{controller-BkyLwb5B.js.map → controller-CljA-pC3.js.map} +1 -1
- package/dist/cjs/{controller-DV0B6Dfb.js → controller-iCpk_CxT.js} +1 -1
- package/dist/cjs/{controller-DV0B6Dfb.js.map → controller-iCpk_CxT.js.map} +1 -1
- package/dist/cjs/{controller-icon-B19DFw9q.js → controller-icon-CSAWu88I.js} +1 -1
- package/dist/cjs/{controller-icon-B19DFw9q.js.map → controller-icon-CSAWu88I.js.map} +1 -1
- package/dist/cjs/{dev.utils-CRGhcPZV.js → dev.utils-BMxnhCWK.js} +1 -1
- package/dist/cjs/{dev.utils-CRGhcPZV.js.map → dev.utils-BMxnhCWK.js.map} +1 -1
- package/dist/cjs/{devtools-UbyUO-xo.js → devtools-4eGYPu71.js} +1 -1
- package/dist/cjs/{devtools-UbyUO-xo.js.map → devtools-4eGYPu71.js.map} +1 -1
- package/dist/cjs/index-CobjNfgo.js +4 -0
- package/dist/cjs/index-CobjNfgo.js.map +1 -0
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-card-wc.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-click-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-dialog-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-dialog-wc.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-dialog.cjs.entry.js +1 -1
- package/dist/cjs/kol-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kol-drawer.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-meter.cjs.entry.js +1 -1
- package/dist/cjs/kol-meter.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination-wc.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-select-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.entry.cjs.js.map +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/kol-abbr.js +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-accordion.js.map +1 -1
- package/dist/components/kol-alert.js +1 -1
- package/dist/components/kol-avatar.js +1 -1
- package/dist/components/kol-avatar.js.map +1 -1
- package/dist/components/kol-badge.js +1 -1
- package/dist/components/kol-breadcrumb.js +1 -1
- package/dist/components/kol-button-link.js +1 -1
- package/dist/components/kol-button.js +1 -1
- package/dist/components/kol-card-wc.js +1 -1
- package/dist/components/kol-card-wc.js.map +1 -1
- package/dist/components/kol-card.js +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-dialog-wc.js +1 -1
- package/dist/components/kol-dialog-wc.js.map +1 -1
- package/dist/components/kol-dialog.js +1 -1
- package/dist/components/kol-dialog.js.map +1 -1
- package/dist/components/kol-drawer.js +1 -1
- package/dist/components/kol-drawer.js.map +1 -1
- package/dist/components/kol-form.js +1 -1
- package/dist/components/kol-heading.js +1 -1
- package/dist/components/kol-heading.js.map +1 -1
- package/dist/components/kol-icon.js +1 -1
- package/dist/components/kol-image.js +1 -1
- package/dist/components/kol-image.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-radio.js +1 -1
- package/dist/components/kol-input-radio.js.map +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-range.js.map +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-kolibri.js.map +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-meter.js +1 -1
- package/dist/components/kol-meter.js.map +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-modal.js.map +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-pagination-wc.js +1 -1
- package/dist/components/kol-pagination-wc.js.map +1 -1
- package/dist/components/kol-pagination.js +1 -1
- package/dist/components/kol-popover-button.js +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-progress.js.map +1 -1
- package/dist/components/kol-quote.js +1 -1
- package/dist/components/kol-quote.js.map +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-single-select.js +1 -1
- package/dist/components/kol-skip-nav.js +1 -1
- package/dist/components/kol-skip-nav.js.map +1 -1
- package/dist/components/kol-spin.js +1 -1
- package/dist/components/kol-spin.js.map +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateful.js.map +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-table-stateless.js.map +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toolbar.js +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/components/kol-tree-item.js.map +1 -1
- package/dist/components/kol-tree.js +1 -1
- package/dist/components/kol-tree.js.map +1 -1
- package/dist/components/kol-version.js +1 -1
- package/dist/components/kol-version.js.map +1 -1
- package/dist/esm/{Alert-CSsB7kOG.js → Alert-plRuFotW.js} +1 -1
- package/dist/esm/{Alert-CSsB7kOG.js.map → Alert-plRuFotW.js.map} +1 -1
- package/dist/esm/{Collapsible-d_TQo5Jv.js → Collapsible-B6WCihbi.js} +1 -1
- package/dist/esm/{Collapsible-d_TQo5Jv.js.map → Collapsible-B6WCihbi.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-DXtOVTya.js → CustomSuggestionsOptionsGroup-C3Vb0efB.js} +1 -1
- package/dist/{kolibri/CustomSuggestionsOptionsGroup-DXtOVTya.js.map → esm/CustomSuggestionsOptionsGroup-C3Vb0efB.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-bKthnrzB.js → FieldControlStateWrapper-BWnl66fL.js} +1 -1
- package/dist/{kolibri/FieldControlStateWrapper-bKthnrzB.js.map → esm/FieldControlStateWrapper-BWnl66fL.js.map} +1 -1
- package/dist/esm/{FormFieldStateWrapper-I4Dg2nCz.js → FormFieldStateWrapper-Ems1NQjv.js} +1 -1
- package/dist/{kolibri/FormFieldStateWrapper-I4Dg2nCz.js.map → esm/FormFieldStateWrapper-Ems1NQjv.js.map} +1 -1
- package/dist/esm/{Heading-bieqYtyt.js → Heading-DyUaqHzi.js} +1 -1
- package/dist/{kolibri/Heading-bieqYtyt.js.map → esm/Heading-DyUaqHzi.js.map} +1 -1
- package/dist/esm/{Input-DAPjMSh6.js → Input-C4GXs6_t.js} +1 -1
- package/dist/esm/{Input-DAPjMSh6.js.map → Input-C4GXs6_t.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-BvQJb9QT.js → InputStateWrapper-VcabF0TQ.js} +1 -1
- package/dist/esm/{InputStateWrapper-BvQJb9QT.js.map → InputStateWrapper-VcabF0TQ.js.map} +1 -1
- package/dist/esm/{app-globals-BK-JeKhz.js → app-globals-BVpQT5l-.js} +1 -1
- package/dist/esm/{app-globals-BK-JeKhz.js.map → app-globals-BVpQT5l-.js.map} +1 -1
- package/dist/esm/{component-CsqhVtuq.js → component-DYSsJEby.js} +1 -1
- package/dist/esm/{component-CsqhVtuq.js.map → component-DYSsJEby.js.map} +1 -1
- package/dist/esm/{component-FodZSQiD.js → component-ELVCHpBx.js} +1 -1
- package/dist/esm/{component-FodZSQiD.js.map → component-ELVCHpBx.js.map} +1 -1
- package/dist/esm/component-_7fsHLXz.js +4 -0
- package/dist/esm/{component-BoywdBMh.js.map → component-_7fsHLXz.js.map} +1 -1
- package/dist/esm/{controller-C79A2P0n.js → controller-BDNhpWDH.js} +1 -1
- package/dist/esm/{controller-C79A2P0n.js.map → controller-BDNhpWDH.js.map} +1 -1
- package/dist/esm/{controller-kjx1_mpp.js → controller-BekuZ1Op.js} +1 -1
- package/dist/esm/{controller-kjx1_mpp.js.map → controller-BekuZ1Op.js.map} +1 -1
- package/dist/esm/{controller-DII8SNYH.js → controller-a2jLc4nO.js} +1 -1
- package/dist/esm/{controller-DII8SNYH.js.map → controller-a2jLc4nO.js.map} +1 -1
- package/dist/esm/{controller-icon-CQfGuSEz.js → controller-icon-DzTRQeez.js} +1 -1
- package/dist/esm/{controller-icon-CQfGuSEz.js.map → controller-icon-DzTRQeez.js.map} +1 -1
- package/dist/esm/{controller-BO62SDz4.js → controller-uYXarCHS.js} +1 -1
- package/dist/{kolibri/controller-BO62SDz4.js.map → esm/controller-uYXarCHS.js.map} +1 -1
- package/dist/esm/{dev.utils-B-ZwZYpj.js → dev.utils-BA_rOknz.js} +1 -1
- package/dist/esm/{dev.utils-B-ZwZYpj.js.map → dev.utils-BA_rOknz.js.map} +1 -1
- package/dist/esm/{devtools-BXiuEmdo.js → devtools-BLlpffmd.js} +1 -1
- package/dist/{kolibri/devtools-BXiuEmdo.js.map → esm/devtools-BLlpffmd.js.map} +1 -1
- package/dist/esm/index-CwE7Ckxk.js +4 -0
- package/dist/esm/index-CwE7Ckxk.js.map +1 -0
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js.map +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js.map +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-wc.entry.js +1 -1
- package/dist/esm/kol-button.entry.js +1 -1
- package/dist/esm/kol-card-wc.entry.js +1 -1
- package/dist/esm/kol-card-wc.entry.js.map +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-click-button.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-dialog-wc.entry.js +1 -1
- package/dist/esm/kol-dialog-wc.entry.js.map +1 -1
- package/dist/esm/kol-dialog.entry.js +1 -1
- package/dist/esm/kol-dialog.entry.js.map +1 -1
- package/dist/esm/kol-drawer.entry.js +1 -1
- package/dist/esm/kol-drawer.entry.js.map +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js.map +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-image.entry.js.map +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js.map +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js.map +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js.map +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-meter.entry.js +1 -1
- package/dist/esm/kol-meter.entry.js.map +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js.map +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination-wc.entry.js +1 -1
- package/dist/esm/kol-pagination-wc.entry.js.map +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-popover-button-wc.entry.js +1 -1
- package/dist/esm/kol-popover-button.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js.map +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js.map +1 -1
- package/dist/esm/kol-select-wc.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-single-select.entry.js +1 -1
- package/dist/esm/kol-skeleton.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js.map +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js.map +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-table-settings-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js.map +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toolbar.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item.entry.js +1 -1
- package/dist/esm/kol-tree-item.entry.js.map +1 -1
- package/dist/esm/kol-tree-wc.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js.map +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kol-version.entry.js.map +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/{Alert-CSsB7kOG.js → Alert-plRuFotW.js} +1 -1
- package/dist/kolibri/{Alert-CSsB7kOG.js.map → Alert-plRuFotW.js.map} +1 -1
- package/dist/kolibri/{Collapsible-d_TQo5Jv.js → Collapsible-B6WCihbi.js} +1 -1
- package/dist/kolibri/{Collapsible-d_TQo5Jv.js.map → Collapsible-B6WCihbi.js.map} +1 -1
- package/dist/kolibri/{CustomSuggestionsOptionsGroup-DXtOVTya.js → CustomSuggestionsOptionsGroup-C3Vb0efB.js} +1 -1
- package/dist/{esm/CustomSuggestionsOptionsGroup-DXtOVTya.js.map → kolibri/CustomSuggestionsOptionsGroup-C3Vb0efB.js.map} +1 -1
- package/dist/kolibri/FieldControlStateWrapper-BWnl66fL.js +4 -0
- package/dist/{esm/FieldControlStateWrapper-bKthnrzB.js.map → kolibri/FieldControlStateWrapper-BWnl66fL.js.map} +1 -1
- package/dist/kolibri/{FormFieldStateWrapper-I4Dg2nCz.js → FormFieldStateWrapper-Ems1NQjv.js} +1 -1
- package/dist/{esm/FormFieldStateWrapper-I4Dg2nCz.js.map → kolibri/FormFieldStateWrapper-Ems1NQjv.js.map} +1 -1
- package/dist/kolibri/{Heading-bieqYtyt.js → Heading-DyUaqHzi.js} +1 -1
- package/dist/{esm/Heading-bieqYtyt.js.map → kolibri/Heading-DyUaqHzi.js.map} +1 -1
- package/dist/kolibri/Input-C4GXs6_t.js +4 -0
- package/dist/kolibri/{Input-DAPjMSh6.js.map → Input-C4GXs6_t.js.map} +1 -1
- package/dist/kolibri/{InputStateWrapper-BvQJb9QT.js → InputStateWrapper-VcabF0TQ.js} +1 -1
- package/dist/kolibri/{InputStateWrapper-BvQJb9QT.js.map → InputStateWrapper-VcabF0TQ.js.map} +1 -1
- package/dist/kolibri/app-globals-BVpQT5l-.js +4 -0
- package/dist/kolibri/{app-globals-BK-JeKhz.js.map → app-globals-BVpQT5l-.js.map} +1 -1
- package/dist/kolibri/{component-CsqhVtuq.js → component-DYSsJEby.js} +1 -1
- package/dist/kolibri/{component-CsqhVtuq.js.map → component-DYSsJEby.js.map} +1 -1
- package/dist/kolibri/{component-FodZSQiD.js → component-ELVCHpBx.js} +1 -1
- package/dist/kolibri/{component-FodZSQiD.js.map → component-ELVCHpBx.js.map} +1 -1
- package/dist/kolibri/component-_7fsHLXz.js +4 -0
- package/dist/kolibri/{component-BoywdBMh.js.map → component-_7fsHLXz.js.map} +1 -1
- package/dist/kolibri/{controller-C79A2P0n.js → controller-BDNhpWDH.js} +1 -1
- package/dist/kolibri/{controller-C79A2P0n.js.map → controller-BDNhpWDH.js.map} +1 -1
- package/dist/kolibri/{controller-kjx1_mpp.js → controller-BekuZ1Op.js} +1 -1
- package/dist/kolibri/{controller-kjx1_mpp.js.map → controller-BekuZ1Op.js.map} +1 -1
- package/dist/kolibri/{controller-DII8SNYH.js → controller-a2jLc4nO.js} +1 -1
- package/dist/kolibri/{controller-DII8SNYH.js.map → controller-a2jLc4nO.js.map} +1 -1
- package/dist/kolibri/{controller-icon-CQfGuSEz.js → controller-icon-DzTRQeez.js} +1 -1
- package/dist/kolibri/{controller-icon-CQfGuSEz.js.map → controller-icon-DzTRQeez.js.map} +1 -1
- package/dist/kolibri/{controller-BO62SDz4.js → controller-uYXarCHS.js} +1 -1
- package/dist/{esm/controller-BO62SDz4.js.map → kolibri/controller-uYXarCHS.js.map} +1 -1
- package/dist/kolibri/{dev.utils-B-ZwZYpj.js → dev.utils-BA_rOknz.js} +1 -1
- package/dist/kolibri/{dev.utils-B-ZwZYpj.js.map → dev.utils-BA_rOknz.js.map} +1 -1
- package/dist/kolibri/{devtools-BXiuEmdo.js → devtools-BLlpffmd.js} +1 -1
- package/dist/{esm/devtools-BXiuEmdo.js.map → kolibri/devtools-BLlpffmd.js.map} +1 -1
- package/dist/kolibri/{index-B2ccmd2V.js → index-CwE7Ckxk.js} +1 -1
- package/dist/kolibri/index-CwE7Ckxk.js.map +1 -0
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js.map +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js.map +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-card-wc.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-click-button.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-dialog-wc.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-dialog-wc.entry.js +1 -1
- package/dist/kolibri/kol-dialog-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-dialog.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-dialog.entry.js +1 -1
- package/dist/kolibri/kol-dialog.entry.js.map +1 -1
- package/dist/kolibri/kol-drawer.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js.map +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js.map +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
- package/dist/kolibri/kol-input-range.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js.map +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-meter.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-meter.entry.js +1 -1
- package/dist/kolibri/kol-meter.entry.js.map +1 -1
- package/dist/kolibri/kol-modal.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js.map +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination-wc.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
- package/dist/kolibri/kol-pagination-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js.map +1 -1
- package/dist/kolibri/kol-quote.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js.map +1 -1
- package/dist/kolibri/kol-select-wc.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-skeleton.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-spin.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js.map +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js.map +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js.map +1 -1
- package/dist/kolibri/kol-tree-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js.map +1 -1
- package/dist/kolibri/kol-version.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js.map +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components/card/component.d.ts +3 -3
- package/dist/types/components/component-list.d.ts +1 -2
- package/dist/types/components/dialog/component.d.ts +9 -2
- package/dist/types/components/dialog/shadow.d.ts +5 -1
- package/dist/types/components/drawer/shadow.d.ts +10 -3
- package/dist/types/components/modal/shadow.d.ts +3 -0
- package/dist/types/components.d.ts +88 -2
- package/dist/types/schema/components/dialog.d.ts +3 -1
- package/dist/types/schema/components/drawer.d.ts +3 -1
- package/doc/dialog.md +39 -2
- package/doc/drawer.md +28 -1
- package/doc/modal.md +38 -2
- package/package.json +6 -4
- package/vscode-custom-data.json +8 -0
- package/dist/cjs/index-_pfZrL6V.js +0 -4
- package/dist/cjs/index-_pfZrL6V.js.map +0 -1
- package/dist/esm/component-BoywdBMh.js +0 -4
- package/dist/esm/index-B2ccmd2V.js +0 -4
- package/dist/esm/index-B2ccmd2V.js.map +0 -1
- package/dist/kolibri/FieldControlStateWrapper-bKthnrzB.js +0 -4
- package/dist/kolibri/Input-DAPjMSh6.js +0 -4
- package/dist/kolibri/app-globals-BK-JeKhz.js +0 -4
- package/dist/kolibri/component-BoywdBMh.js +0 -4
- package/dist/kolibri/index-B2ccmd2V.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-_pfZrL6V.js"),componentNames=require("./component-names-5KS_pYRF.js"),elementFocus=require("./element-focus-r03qIEIv.js");require("./common-CyOOsddt.js");const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1777380988243"); /* IE9*/\n src: url("kolicons.eot?t=1777380988243#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1777380988243") format("woff2"), url("kolicons.woff?t=1777380988243") format("woff"), url("kolicons.ttf?t=1777380988243") format("truetype"), url("kolicons.svg?t=1777380988243#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-tooltip__content .kol-span__label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n}',KolSelect=class{constructor(n){index.registerInstance(this,n),this.setSelectWcRef=n=>{this.selectWcRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1}async getValue(){var n;return null===(n=this.selectWcRef)||void 0===n?void 0:n.getValue()}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.selectWcRef))}render(){return index.h(index.Host,{key:"6298871fbf780c200efcc7cd0909f16e70b4143e",class:"kol-select"},index.h(componentNames.KolSelectWcTag,{key:"c7547104320af1059cefbb04f238d434670b04fa",ref:this.setSelectWcRef,_accessKey:this._accessKey,_disabled:this._disabled,_hideLabel:this._hideLabel,_hideMsg:this._hideMsg,_hint:this._hint,_icons:this._icons,_label:this._label,_msg:this._msg,_multiple:this._multiple,_name:this._name,_on:this._on,_options:this._options,_required:this._required,_rows:this._rows,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_touched:this._touched,_value:this._value},index.h("slot",{key:"f7cfdb031571c7463a0fcc6f3fbfa9ca373373d0",name:"expert",slot:"expert"})))}get host(){return index.getElement(this)}};KolSelect.style={default:defaultStyleCss},exports.kol_select=KolSelect;
|
|
4
|
+
"use strict";var index=require("./index-CobjNfgo.js"),componentNames=require("./component-names-5KS_pYRF.js"),elementFocus=require("./element-focus-r03qIEIv.js");require("./common-CyOOsddt.js");const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1778148144850"); /* IE9*/\n src: url("kolicons.eot?t=1778148144850#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1778148144850") format("woff2"), url("kolicons.woff?t=1778148144850") format("woff"), url("kolicons.ttf?t=1778148144850") format("truetype"), url("kolicons.svg?t=1778148144850#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-tooltip__content .kol-span__label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-select {\n background-color: transparent;\n width: 100%;\n }\n .kol-select:not(:disabled) {\n cursor: pointer;\n }\n .kol-select:not([multiple], [size]) {\n height: 2.75em;\n }\n .kol-select:focus {\n outline: none;\n }\n .kol-select__option:checked::before {\n content: "✓ ";\n }\n .kol-select {\n /* needed hack for vertical alignment */\n }\n .kol-select[multiple] option {\n padding: calc((var(--a11y-min-size) - 16 * 1rem / var(--kolibri-root-font-size, 16)) / 2) 0.5em;\n }\n}',KolSelect=class{constructor(n){index.registerInstance(this,n),this.setSelectWcRef=n=>{this.selectWcRef=n},this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._multiple=!1,this._required=!1,this._tooltipAlign="top",this._touched=!1}async getValue(){var n;return null===(n=this.selectWcRef)||void 0===n?void 0:n.getValue()}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.selectWcRef))}render(){return index.h(index.Host,{key:"6298871fbf780c200efcc7cd0909f16e70b4143e",class:"kol-select"},index.h(componentNames.KolSelectWcTag,{key:"c7547104320af1059cefbb04f238d434670b04fa",ref:this.setSelectWcRef,_accessKey:this._accessKey,_disabled:this._disabled,_hideLabel:this._hideLabel,_hideMsg:this._hideMsg,_hint:this._hint,_icons:this._icons,_label:this._label,_msg:this._msg,_multiple:this._multiple,_name:this._name,_on:this._on,_options:this._options,_required:this._required,_rows:this._rows,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_touched:this._touched,_value:this._value},index.h("slot",{key:"f7cfdb031571c7463a0fcc6f3fbfa9ca373373d0",name:"expert",slot:"expert"})))}get host(){return index.getElement(this)}};KolSelect.style={default:defaultStyleCss},exports.kol_select=KolSelect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-_pfZrL6V.js"),componentNames=require("./component-names-5KS_pYRF.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-CU7sL9TC.js"),controllerIcon=require("./controller-icon-B19DFw9q.js"),InputStateWrapper=require("./InputStateWrapper-DjEacrjP.js"),CustomSuggestionsOptionsGroup=require("./CustomSuggestionsOptionsGroup-Bxf68S0b.js"),i18n=require("./i18n-DevJo9yF.js"),component=require("./component-CrXueqjD.js"),clsx=require("./clsx-Bm_HQUnh.js"),dev_utils=require("./dev.utils-CRGhcPZV.js"),elementFocus=require("./element-focus-r03qIEIv.js"),common=require("./common-CyOOsddt.js"),controller=require("./controller-H0TWImvv.js"),placeholder=require("./placeholder-BalelQGe.js"),required=require("./required-n2GDPcqt.js");require("./access-and-short-key-CUXP_bqv.js"),require("./disabled-OBxr5yFQ.js"),require("./hide-label-D5C7_wBP.js"),require("./label-BpdiumjJ.js"),require("./tooltip-align-BB5EsHsG.js"),require("./align-DLZnj4_m.js"),require("./events-Cd8febUV.js"),require("./associated.controller-Qtcakwi5.js"),require("./bootstrap-CTHD2bd6.js"),require("./i18n-CgUN6lev.js"),require("./_Uint8Array-BAQUGozM.js"),require("./isArray-BOIOdEQh.js"),require("./tslib.es6-7DbU_BSw.js"),require("./variant-quote-iZVwULXH.js"),require("./normalizers-CLRF8il-.js"),require("./component-CUEItFKO.js"),require("./component-NrCy8bX0.js"),require("./bem-registry-BRaXxTgN.js"),require("./controller-D3ETb78M.js"),require("./align-floating-elements-DUp-he6s.js"),require("./tooltip-open-tracking-Ba0udJRU.js"),require("./label-B0RK7DQ1.js"),require("./base-controller-DAzsTqX9.js"),require("./Alert-ErwJUGfq.js"),require("./Heading-UArLG5Wt.js"),require("./icons-CtLpYmvA.js"),require("./Input-DlH7bc0M.js"),require("./orientation-CB8_FW89.js");class SingleSelectController extends controllerIcon.InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.afterPatchOptions=(e,t,n,o)=>{"_value"===o&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),controller.fillKeyOptionMap(this.keyOptionMap,n))},this.component=e}validateOptions(e){controller.validateOptions(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){required.validateRequired(this.component,e)}validateValue(e){common.watchValidator(this.component,"_value",e=>void 0!==e,new Set(["KoliBriUnknown"]),e)}validatePlaceholder(e){placeholder.validatePlaceholder(this.component,e)}validateHasClearButton(e){common.watchBoolean(this.component,"_hasClearButton",e)}validateRows(e){common.watchNumber(this.component,"_rows",e)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHasClearButton(this.component._hasClearButton),this.validateRows(this.component._rows)}}const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1777380988243"); /* IE9*/\n src: url("kolicons.eot?t=1777380988243#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1777380988243") format("woff2"), url("kolicons.woff?t=1777380988243") format("woff"), url("kolicons.ttf?t=1777380988243") format("truetype"), url("kolicons.svg?t=1777380988243#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-option--disabled:focus, .kol-custom-suggestions-option--disabled:focus * {\n cursor: not-allowed;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-input-container:has(.kol-custom-suggestions-options-group--open) {\n z-index: 10;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-custom-suggestions-toggle.kol-custom-suggestions-toggle--disabled {\n cursor: not-allowed;\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-tooltip__content .kol-span__label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n background-color: transparent;\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-single-select__delete .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-single-select__delete :host {\n display: inline-block;\n }\n .kol-single-select__delete .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-single-select__delete .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-single-select__delete .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40 * 1rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2 * 1rem / var(--kolibri-root-font-size, 16)) !important;\n }\n .kol-custom-suggestions-toggle:not(.kol-custom-suggestions-toggle--disabled) {\n cursor: pointer;\n }\n}',KolSingleSelect=class{async getValue(){return this._value}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.refInput))}onBlur(){var e;const t=null===(e=this.state._options)||void 0===e?void 0:e.find(e=>{var t,n;return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});t?this.selectOption(t):this._value&&(this._filteredOptions=[...this.state._options])}createEventWithTarget(e,t){const n=new CustomEvent(e,{bubbles:!0,detail:t});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){var e;if(this.state._disabled)return;const t=null;this._focusedOptionIndex=-1,this._value=t,this._inputValue="",this._filteredOptions=[...this.state._options];const n=this.createEventWithTarget("input",{name:this.state._name,value:t}),o=this.createEventWithTarget("change",{name:this.state._name,value:t});this.controller.onFacade.onInput(n,!0,{value:t}),this.controller.onFacade.onChange(o,{value:t}),null===(e=this.refInput)||void 0===e||e.focus(),this._isOpen=!0}selectOption(e){var t,n;if(e.value===this._value)return this._inputValue=e.label,void(this._filteredOptions=[...this.state._options]);this._value=e.value,this._inputValue=e.label;const o=this.createEventWithTarget("input",{name:null!==(t=this.state._name)&&void 0!==t?t:"",value:e.value}),i=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:e.value});this.controller.onFacade.onInput(o,!1,e.value),this.controller.onFacade.onChange(i,e.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(e){const t=e.target;this._inputValue=t.value,this._isOpen=!0,this.setFilteredOptionsByQuery(t.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(e){1===e.key.length&&/[a-z0-9]/i.test(e.key)&&(e.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredOptionsByQuery(e){void 0!==e&&(""===(null==e?void 0:e.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&e.length>0&&(this._filteredOptions=this.state._options.filter(t=>{var n,o;return null===(o=null===(n=t.label)||void 0===n?void 0:n.toLowerCase())||void 0===o?void 0:o.includes(null==e?void 0:e.toLowerCase())})))}moveFocus(e){if(!this._filteredOptions)return;let t=this._focusedOptionIndex+e,n=0,o=!1;const i=this._filteredOptions.length;for(;n<i;){t>=this._filteredOptions.length&&(t=0),t<0&&(t=this._filteredOptions.length-1);if(!this._filteredOptions[t].disabled){o=!0;break}t+=e,n++}o&&(this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex))}focusOption(e){if(this.refOptions){const t=this.refOptions[e];null==t||t.focus()}}selectFocusedOption(){return!!(Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&this._focusedOptionIndex>=0)&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),!0)}focusSuggestionStartingWith(e){const t=e.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(e=>e.label.toLowerCase().startsWith(t)&&!e.disabled);"number"==typeof n&&n>=0&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:e}=FormFieldStateWrapper.getRenderStates(this.state),t=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-keyshortcuts":this.state._shortKey,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:t,name:this.state._name,placeholder:this.state._placeholder,ref:this.setRefInput,required:this.state._required,role:"combobox",state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onBlur:()=>{this.onBlur()}})}render(){var e;const t=!0===this.state._disabled;return index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"88b916fa561d64ce52045afcc6ba29788da38b34"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"9624d29ee1e402de24e685983618c9adb3314a68",state:this.state},index.h("div",{key:"8a802818ae85b87467adc18e633a7cf9ad1c5864",class:"kol-single-select__group"},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"324cc7e0822e29f61e01f2b7e7421374a22444f8"},this.getInputProps())),this._inputValue&&this.state._hasClearButton&&index.h(componentNames.KolButtonWcTag,{key:"70fe1c688fffb1d11da55c09a88a212406ea6c4e",_icons:"kolicon-cross",_label:this.translateDeleteSelection,_hideLabel:!0,_variant:"ghost",_disabled:t,"data-testid":"single-select-delete",class:"kol-single-select__delete",hidden:t,_on:{onClick:()=>{var e;this.clearSelection(),null===(e=this.refInput)||void 0===e||e.focus()},onFocus:()=>{this.clearButtonFocused=!0},onBlur:()=>{this.clearButtonFocused=!1}}}),index.h(component.IconFC,{key:"1bc4c4c422c045424b742d301dfb8e04311ad05a",icons:"kolicon-chevron-down",label:"",class:clsx.clsx("kol-custom-suggestions-toggle",{"kol-custom-suggestions-toggle--disabled":t}),onClick:this.toggleListbox.bind(this)})),index.h(CustomSuggestionsOptionsGroup.CustomSuggestionsOptionsGroupFc,{key:"5fc470fbc561e8127d9b8ff83f304b5c144ac76a",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`},hidden:!this._isOpen||t},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,t)=>index.h(CustomSuggestionsOptionsGroup.CustomSuggestionsOptionFc,{index:t,option:e.label,searchTerm:this._inputValue,ref:e=>{e&&(this.refOptions[t]=e)},selected:this._value===e.value,disabled:!!e.disabled,onClick:t=>{var n;e.disabled||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1)},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=t,this.focusOption(t))},onFocus:()=>{e.disabled||(this._focusedOptionIndex=t,this.focusOption(t))},onKeyDown:t=>{var n;e.disabled||"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):index.h("li",{class:"kol-single-select__no-results-message",role:"alert"},this.translateNoResultsMessage," "))))}handleKeyDown(e){var t,n;const o=(t,n)=>{var o;e.preventDefault(),void 0!==t&&(this._isOpen=t,t||null===(o=this.refInput)||void 0===o||o.focus()),null==n||n()};switch(e.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,o(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,o(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(t=this.refInput)||void 0===t||t.focus());break;case"Esc":case"Escape":this._isOpen=!1,o(!1);break;case" ":case"Enter":case"NumpadEnter":this.clearButtonFocused?this.clearSelection():this._isOpen?this.selectFocusedOption()&&(null===(n=this.refInput)||void 0===n||n.focus(),o(!1)):this.toggleListbox(e);break;case"Home":this.blockSuggestionMouseOver=!0,o(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,o(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,o(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,o(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(e){index.registerInstance(this,e),this.refOptions=[],this.translateDeleteSelection=i18n.translate("kol-delete-selection"),this.translateNoResultsMessage=i18n.translate("kol-no-results-message"),this.clearButtonFocused=!1,this.setRefInput=e=>{this.refInput=e},this.toggleListbox=e=>{var t;null==e||e.preventDefault();if(!(!0===this.state._disabled))if(null===(t=this.refInput)||void 0===t||t.focus(),this._isOpen)this._isOpen=!1;else{this._isOpen=!0;const e=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(e=>e.label===this._inputValue):-1;this._focusedOptionIndex=e>=0?e:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hasClearButton=!0,this.state={_hideMsg:!1,_id:`id-${dev_utils.nonce()}`,_label:"",_options:[],_hasClearButton:!0},this.inputHasFocus=!1,this.controller=new SingleSelectController(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e),this._filteredOptions=e,this._isOpen?this.setFilteredOptionsByQuery(this._inputValue):this.updateInputValue(this._value)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),this.oldValue=e,this.updateInputValue(e)}validateHasClearButton(e){this.controller.validateHasClearButton(e)}validateRows(e){this.controller.validateRows(e)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}handleFocusIn(e){setTimeout(()=>{var t;(null===(t=this.host)||void 0===t?void 0:t.contains(document.activeElement))&&!this.inputHasFocus&&(this.controller.onFacade.onFocus(e),this.inputHasFocus=!0)})}handleFocusOut(e){this.onBlur(),setTimeout(()=>{var t;this.inputHasFocus&&!(null===(t=this.host)||void 0===t?void 0:t.contains(document.activeElement))&&(this.controller.onFacade.onBlur(e),this.inputHasFocus=!1,this._isOpen=!1)})}updateInputValue(e){if(Array.isArray(this._options)){const t=this._options.find(t=>t.value===e);this._inputValue=t?String(t.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(e){var t,n;this.oldValue!==(null===(t=this.refInput)||void 0===t?void 0:t.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(e,this._value)}onClick(e){var t;this.toggleListbox(e),null===(t=this.refInput)||void 0===t||t.focus(),this.controller.onFacade.onClick(e)}get host(){return index.getElement(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_hasClearButton:["validateHasClearButton"],_rows:["validateRows"]}}};KolSingleSelect.style={default:defaultStyleCss},exports.kol_single_select=KolSingleSelect;
|
|
4
|
+
"use strict";var index=require("./index-CobjNfgo.js"),componentNames=require("./component-names-5KS_pYRF.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-BC8WyGKq.js"),controllerIcon=require("./controller-icon-CSAWu88I.js"),InputStateWrapper=require("./InputStateWrapper-D9ExwaFr.js"),CustomSuggestionsOptionsGroup=require("./CustomSuggestionsOptionsGroup-CBIKPUnR.js"),i18n=require("./i18n-DevJo9yF.js"),component=require("./component-DACJ4mUM.js"),clsx=require("./clsx-Bm_HQUnh.js"),dev_utils=require("./dev.utils-BMxnhCWK.js"),elementFocus=require("./element-focus-r03qIEIv.js"),common=require("./common-CyOOsddt.js"),controller=require("./controller-Bz4ZHrYz.js"),placeholder=require("./placeholder-BalelQGe.js"),required=require("./required-n2GDPcqt.js");require("./access-and-short-key-CUXP_bqv.js"),require("./disabled-OBxr5yFQ.js"),require("./hide-label-D5C7_wBP.js"),require("./label-BpdiumjJ.js"),require("./tooltip-align-BB5EsHsG.js"),require("./align-DLZnj4_m.js"),require("./events-Cd8febUV.js"),require("./associated.controller-Qtcakwi5.js"),require("./bootstrap-CTHD2bd6.js"),require("./i18n-CgUN6lev.js"),require("./_Uint8Array-BAQUGozM.js"),require("./isArray-BOIOdEQh.js"),require("./tslib.es6-7DbU_BSw.js"),require("./variant-quote-iZVwULXH.js"),require("./normalizers-CLRF8il-.js"),require("./component-B7W-2yeG.js"),require("./component-CfTZFCUy.js"),require("./bem-registry-BRaXxTgN.js"),require("./controller-D3ETb78M.js"),require("./align-floating-elements-DUp-he6s.js"),require("./tooltip-open-tracking-Ba0udJRU.js"),require("./label-B0RK7DQ1.js"),require("./base-controller-DAzsTqX9.js"),require("./Alert-b0RjmS_b.js"),require("./Heading-Du94r6Ou.js"),require("./icons-CtLpYmvA.js"),require("./Input-Bb_FgPgW.js"),require("./orientation-CB8_FW89.js");class SingleSelectController extends controllerIcon.InputIconController{constructor(e,t,n){super(e,t,n),this.keyOptionMap=new Map,this.afterPatchOptions=(e,t,n,o)=>{"_value"===o&&this.setFormAssociatedValue(e)},this.beforePatchOptions=(e,t)=>{const n=t.has("_options")?t.get("_options"):this.component.state._options;Array.isArray(n)&&n.length>0&&(this.keyOptionMap.clear(),controller.fillKeyOptionMap(this.keyOptionMap,n))},this.component=e}validateOptions(e){controller.validateOptions(this.component,e,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateRequired(e){required.validateRequired(this.component,e)}validateValue(e){common.watchValidator(this.component,"_value",e=>void 0!==e,new Set(["KoliBriUnknown"]),e)}validatePlaceholder(e){placeholder.validatePlaceholder(this.component,e)}validateHasClearButton(e){common.watchBoolean(this.component,"_hasClearButton",e)}validateRows(e){common.watchNumber(this.component,"_rows",e)}componentWillLoad(){super.componentWillLoad(),this.validateOptions(this.component._options),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder),this.validateHasClearButton(this.component._hasClearButton),this.validateRows(this.component._rows)}}const defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1778148144850"); /* IE9*/\n src: url("kolicons.eot?t=1778148144850#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1778148144850") format("woff2"), url("kolicons.woff?t=1778148144850") format("woff"), url("kolicons.ttf?t=1778148144850") format("truetype"), url("kolicons.svg?t=1778148144850#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-alert :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-custom-suggestions-option {\n line-height: 1.5;\n white-space: normal;\n cursor: pointer;\n overflow-wrap: break-word;\n }\n .kol-custom-suggestions-options-group--cursor-hidden .kol-custom-suggestions-option {\n cursor: none !important;\n }\n .kol-custom-suggestions-option--disabled:focus, .kol-custom-suggestions-option--disabled:focus * {\n cursor: not-allowed;\n }\n .kol-custom-suggestions-options-group {\n background-color: white;\n display: block;\n position: absolute;\n z-index: 2;\n max-height: calc(250 * 1rem / var(--kolibri-root-font-size, 16));\n margin: 0;\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n }\n .kol-input-container:has(.kol-custom-suggestions-options-group--open) {\n z-index: 10;\n }\n .kol-custom-suggestions-toggle {\n display: flex;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-custom-suggestions-toggle.kol-custom-suggestions-toggle--disabled {\n cursor: not-allowed;\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field__label-text {\n flex-flow: row;\n align-items: flex-start;\n justify-content: flex-start;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-tooltip__content .kol-span__label::after {\n content: "*"/"";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n min-height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input {\n background-color: transparent;\n width: 100%;\n min-width: var(--a11y-min-size);\n }\n .kol-input:focus {\n outline: none;\n }\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-single-select__delete .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-single-select__delete :host {\n display: inline-block;\n }\n .kol-single-select__delete .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-single-select__delete .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-single-select__delete .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-single-select__no-results-message {\n display: flex;\n min-height: calc(50 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n justify-content: center;\n cursor: default;\n }\n .kol-single-select .kol-custom-suggestions-options-group {\n max-height: calc(40 * 1rem / var(--kolibri-root-font-size, 16) * var(--visible-options, 5) + 2 * 1rem / var(--kolibri-root-font-size, 16)) !important;\n }\n .kol-custom-suggestions-toggle:not(.kol-custom-suggestions-toggle--disabled) {\n cursor: pointer;\n }\n}',KolSingleSelect=class{async getValue(){return this._value}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.refInput))}onBlur(){var e;const t=null===(e=this.state._options)||void 0===e?void 0:e.find(e=>{var t,n;return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase())===(null===(n=this._inputValue)||void 0===n?void 0:n.toLowerCase())});t?this.selectOption(t):this._value&&(this._filteredOptions=[...this.state._options])}createEventWithTarget(e,t){const n=new CustomEvent(e,{bubbles:!0,detail:t});return this.refInput&&(Object.defineProperty(n,"target",{value:this.refInput}),Object.defineProperty(n,"currentTarget",{value:this.refInput})),n}clearSelection(){var e;if(this.state._disabled)return;const t=null;this._focusedOptionIndex=-1,this._value=t,this._inputValue="",this._filteredOptions=[...this.state._options];const n=this.createEventWithTarget("input",{name:this.state._name,value:t}),o=this.createEventWithTarget("change",{name:this.state._name,value:t});this.controller.onFacade.onInput(n,!0,{value:t}),this.controller.onFacade.onChange(o,{value:t}),null===(e=this.refInput)||void 0===e||e.focus(),this._isOpen=!0}selectOption(e){var t,n;if(e.value===this._value)return this._inputValue=e.label,void(this._filteredOptions=[...this.state._options]);this._value=e.value,this._inputValue=e.label;const o=this.createEventWithTarget("input",{name:null!==(t=this.state._name)&&void 0!==t?t:"",value:e.value}),i=this.createEventWithTarget("change",{name:null!==(n=this.state._name)&&void 0!==n?n:"",value:e.value});this.controller.onFacade.onInput(o,!1,e.value),this.controller.onFacade.onChange(i,e.value),this._filteredOptions=[...this.state._options],this.controller.setFormAssociatedValue(this._value)}onInput(e){const t=e.target;this._inputValue=t.value,this._isOpen=!0,this.setFilteredOptionsByQuery(t.value),this._focusedOptionIndex=-1}handleKeyDownDropdown(e){1===e.key.length&&/[a-z0-9]/i.test(e.key)&&(e.preventDefault(),this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredOptionsByQuery(e){void 0!==e&&(""===(null==e?void 0:e.trim())?this._filteredOptions=[...this.state._options]:Array.isArray(this.state._options)&&this.state._options.length>0&&e.length>0&&(this._filteredOptions=this.state._options.filter(t=>{var n,o;return null===(o=null===(n=t.label)||void 0===n?void 0:n.toLowerCase())||void 0===o?void 0:o.includes(null==e?void 0:e.toLowerCase())})))}moveFocus(e){if(!this._filteredOptions)return;let t=this._focusedOptionIndex+e,n=0,o=!1;const i=this._filteredOptions.length;for(;n<i;){t>=this._filteredOptions.length&&(t=0),t<0&&(t=this._filteredOptions.length-1);if(!this._filteredOptions[t].disabled){o=!0;break}t+=e,n++}o&&(this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex))}focusOption(e){if(this.refOptions){const t=this.refOptions[e];null==t||t.focus()}}selectFocusedOption(){return!!(Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0&&this._focusedOptionIndex>=0)&&(this.selectOption(this._filteredOptions[this._focusedOptionIndex]),!0)}focusSuggestionStartingWith(e){const t=e.toLowerCase(),n=Array.isArray(this._filteredOptions)&&this._filteredOptions.findIndex(e=>e.label.toLowerCase().startsWith(t)&&!e.disabled);"number"==typeof n&&n>=0&&(this._focusedOptionIndex=n,this.focusOption(n))}getFormFieldProps(){return{state:this.state,class:"kol-single-select",tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getInputProps(){const{ariaDescribedBy:e}=FormFieldStateWrapper.getRenderStates(this.state),t=!0===this.state._disabled;return Object.assign(Object.assign({"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,"aria-autocomplete":"both","aria-controls":"listbox","aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-keyshortcuts":this.state._shortKey,accessKey:this.state._accessKey,autocapitalize:"off",autocorrect:"off",class:"kol-single-select__input",disabled:t,name:this.state._name,placeholder:this.state._placeholder,ref:this.setRefInput,required:this.state._required,role:"combobox",state:this.state,type:"text",value:this._inputValue},this.controller.onFacade),{onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onInput:this.onInput.bind(this),onBlur:()=>{this.onBlur()}})}render(){var e;const t=!0===this.state._disabled;return index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"88b916fa561d64ce52045afcc6ba29788da38b34"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"9624d29ee1e402de24e685983618c9adb3314a68",state:this.state},index.h("div",{key:"8a802818ae85b87467adc18e633a7cf9ad1c5864",class:"kol-single-select__group"},index.h(InputStateWrapper.InputStateWrapper,Object.assign({key:"324cc7e0822e29f61e01f2b7e7421374a22444f8"},this.getInputProps())),this._inputValue&&this.state._hasClearButton&&index.h(componentNames.KolButtonWcTag,{key:"70fe1c688fffb1d11da55c09a88a212406ea6c4e",_icons:"kolicon-cross",_label:this.translateDeleteSelection,_hideLabel:!0,_variant:"ghost",_disabled:t,"data-testid":"single-select-delete",class:"kol-single-select__delete",hidden:t,_on:{onClick:()=>{var e;this.clearSelection(),null===(e=this.refInput)||void 0===e||e.focus()},onFocus:()=>{this.clearButtonFocused=!0},onBlur:()=>{this.clearButtonFocused=!1}}}),index.h(component.IconFC,{key:"1bc4c4c422c045424b742d301dfb8e04311ad05a",icons:"kolicon-chevron-down",label:"",class:clsx.clsx("kol-custom-suggestions-toggle",{"kol-custom-suggestions-toggle--disabled":t}),onClick:this.toggleListbox.bind(this)})),index.h(CustomSuggestionsOptionsGroup.CustomSuggestionsOptionsGroupFc,{key:"5fc470fbc561e8127d9b8ff83f304b5c144ac76a",blockSuggestionMouseOver:this.blockSuggestionMouseOver,onKeyDown:this.handleKeyDownDropdown.bind(this),style:{"--visible-options":`${null!==(e=this._rows)&&void 0!==e?e:5}`},hidden:!this._isOpen||t},Array.isArray(this._filteredOptions)&&this._filteredOptions.length>0?this._filteredOptions.map((e,t)=>index.h(CustomSuggestionsOptionsGroup.CustomSuggestionsOptionFc,{index:t,option:e.label,searchTerm:this._inputValue,ref:e=>{e&&(this.refOptions[t]=e)},selected:this._value===e.value,disabled:!!e.disabled,onClick:t=>{var n;e.disabled||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),this._isOpen=!1)},onMouseOver:()=>{this.blockSuggestionMouseOver||(this._focusedOptionIndex=t,this.focusOption(t))},onFocus:()=>{e.disabled||(this._focusedOptionIndex=t,this.focusOption(t))},onKeyDown:t=>{var n;e.disabled||"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),null===(n=this.refInput)||void 0===n||n.focus(),this.toggleListbox(t),t.preventDefault())}})):index.h("li",{class:"kol-single-select__no-results-message",role:"alert"},this.translateNoResultsMessage," "))))}handleKeyDown(e){var t,n;const o=(t,n)=>{var o;e.preventDefault(),void 0!==t&&(this._isOpen=t,t||null===(o=this.refInput)||void 0===o||o.focus()),null==n||n()};switch(e.key){case"Down":case"ArrowDown":this.blockSuggestionMouseOver=!0,o(!0,()=>this.moveFocus(1));break;case"Up":case"ArrowUp":this.blockSuggestionMouseOver=!0,o(!0,()=>this.moveFocus(-1));break;case"Tab":this._isOpen&&(this._isOpen=!this._isOpen,null===(t=this.refInput)||void 0===t||t.focus());break;case"Esc":case"Escape":this._isOpen=!1,o(!1);break;case" ":case"Enter":case"NumpadEnter":this.clearButtonFocused?this.clearSelection():this._isOpen?this.selectFocusedOption()&&(null===(n=this.refInput)||void 0===n||n.focus(),o(!1)):this.toggleListbox(e);break;case"Home":this.blockSuggestionMouseOver=!0,o(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))});break;case"End":this.blockSuggestionMouseOver=!0,o(void 0,()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredOptions?this._filteredOptions.length-1:0,this.focusOption(this._focusedOptionIndex))});break;case"PageUp":this.blockSuggestionMouseOver=!0,o(void 0,()=>this._isOpen&&this.moveFocus(-10));break;case"PageDown":this.blockSuggestionMouseOver=!0,o(void 0,()=>this._isOpen&&this.moveFocus(10))}}constructor(e){index.registerInstance(this,e),this.refOptions=[],this.translateDeleteSelection=i18n.translate("kol-delete-selection"),this.translateNoResultsMessage=i18n.translate("kol-no-results-message"),this.clearButtonFocused=!1,this.setRefInput=e=>{this.refInput=e},this.toggleListbox=e=>{var t;null==e||e.preventDefault();if(!(!0===this.state._disabled))if(null===(t=this.refInput)||void 0===t||t.focus(),this._isOpen)this._isOpen=!1;else{this._isOpen=!0;const e=Array.isArray(this._filteredOptions)?this._filteredOptions.findIndex(e=>e.label===this._inputValue):-1;this._focusedOptionIndex=e>=0?e:-1,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredOptions=[],this._inputValue="",this.blockSuggestionMouseOver=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._required=!1,this._tooltipAlign="top",this._touched=!1,this._value=null,this._hasClearButton=!0,this.state={_hideMsg:!1,_id:`id-${dev_utils.nonce()}`,_label:"",_options:[],_hasClearButton:!0},this.inputHasFocus=!1,this.controller=new SingleSelectController(this,"single-select",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e),this._filteredOptions=e,this._isOpen?this.setFilteredOptionsByQuery(this._inputValue):this.updateInputValue(this._value)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e),this.oldValue=e,this.updateInputValue(e)}validateHasClearButton(e){this.controller.validateHasClearButton(e)}validateRows(e){this.controller.validateRows(e)}handleMouseEvent(){this.blockSuggestionMouseOver=!1}handleFocusIn(e){setTimeout(()=>{var t;(null===(t=this.host)||void 0===t?void 0:t.contains(document.activeElement))&&!this.inputHasFocus&&(this.controller.onFacade.onFocus(e),this.inputHasFocus=!0)})}handleFocusOut(e){this.onBlur(),setTimeout(()=>{var t;this.inputHasFocus&&!(null===(t=this.host)||void 0===t?void 0:t.contains(document.activeElement))&&(this.controller.onFacade.onBlur(e),this.inputHasFocus=!1,this._isOpen=!1)})}updateInputValue(e){if(Array.isArray(this._options)){const t=this._options.find(t=>t.value===e);this._inputValue=t?String(t.label):""}}componentWillLoad(){this.refOptions=[],this._touched=!0===this._touched,this.controller.componentWillLoad(),this.oldValue=this._value,this._filteredOptions=this.state._options,this.updateInputValue(this._value)}onChange(e){var t,n;this.oldValue!==(null===(t=this.refInput)||void 0===t?void 0:t.value)&&(this.oldValue=null===(n=this.refInput)||void 0===n?void 0:n.value),this._isOpen||this.controller.onFacade.onChange(e,this._value)}onClick(e){var t;this.toggleListbox(e),null===(t=this.refInput)||void 0===t||t.focus(),this.controller.onFacade.onClick(e)}get host(){return index.getElement(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"],_hasClearButton:["validateHasClearButton"],_rows:["validateRows"]}}};KolSingleSelect.style={default:defaultStyleCss},exports.kol_single_select=KolSingleSelect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-
|
|
4
|
+
"use strict";var index=require("./index-CobjNfgo.js"),variantQuote=require("./variant-quote-iZVwULXH.js"),bemRegistry=require("./bem-registry-BRaXxTgN.js"),controller=require("./controller-CljA-pC3.js"),common=require("./common-CyOOsddt.js"),normalizers=require("./normalizers-CLRF8il-.js"),baseController=require("./base-controller-DAzsTqX9.js");require("./label-B0RK7DQ1.js"),require("./_Uint8Array-BAQUGozM.js"),require("./isArray-BOIOdEQh.js");const nameProp=normalizers.createPropDefinition("name","",normalizers.normalizeString),skeletonBem=bemRegistry.bem.forBlock("kol-skeleton"),BEM_CLASS_SKELETON__ACTIONS=skeletonBem("actions"),BEM_CLASS_SKELETON__CONTAINER=skeletonBem("container"),BEM_CLASS_SKELETON__COUNTER=skeletonBem("counter"),BEM_CLASS_SKELETON__NAME=skeletonBem("name"),SkeletonFC=e=>{const{count:t,label:o,name:n,show:l,handleClick:s,refButton:r}=e,i=!(!l||!(null==n?void 0:n.trim())),a=skeletonBem({"has-name":i,"is-hidden":!l});return index.h("div",{class:a},index.h("div",{class:BEM_CLASS_SKELETON__CONTAINER},i&&index.h("span",{class:BEM_CLASS_SKELETON__NAME},n),index.h("div",{class:BEM_CLASS_SKELETON__COUNTER},"Count: ",t)),index.h("div",{class:BEM_CLASS_SKELETON__ACTIONS},index.h(controller.ClickButtonFC,{label:o,handleClick:s,refButton:r})))},skeletonPropsConfig={required:[nameProp]};class SkeletonController extends baseController.BaseController{constructor(e){super(e,skeletonPropsConfig),this.onKeydown=e=>{"Escape"===e.key&&(console.log("Show should be toggled"),this.toggle())},this.handleClick=()=>{var e,t;common.Log.debug("Button clicked, count should be increased"),this.setState("count",(null!==(t=null===(e=this.getState)||void 0===e?void 0:e.call(this,"count"))&&void 0!==t?t:0)+1)},this.setButtonRef=e=>{this.clickButtonCtrl.setButtonRef(e)},this.clickButtonCtrl=new controller.ClickButtonController(variantQuote.BaseWebComponent.stateLess),this.startLoadedEventInterval()}componentWillLoad(e){const{name:t}=e;this.watchName(t),this.clickButtonCtrl.componentWillLoad({label:"Click me"})}watchName(e){nameProp.apply(e,e=>{this.setRenderProp("name",e)})}toggle(){var e,t;this.setState("show",!(null!==(t=null===(e=this.getState)||void 0===e?void 0:e.call(this,"show"))&&void 0!==t&&t))}focus(){return this.clickButtonCtrl.focus()}startLoadedEventInterval(){this.intervalId=setInterval(()=>{var e,t;this.emitLoaded(null!==(t=null===(e=this.getState)||void 0===e?void 0:e.call(this,"count"))&&void 0!==t?t:0)},2e3)}emitLoaded(e){this.onLoadedCallback&&this.onLoadedCallback(e)}setOnLoadedCallback(e){this.onLoadedCallback=e}destroy(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0)}}const KolSkeleton=class extends variantQuote.BaseWebComponent{constructor(e){super(),index.registerInstance(this,e),this.loaded=index.createEvent(this,"loaded"),this.rendered=index.createEvent(this,"rendered"),this.ctrl=new SkeletonController(this.stateAccess),this.count=0,this.label="Label",this.show=!0}async focus(){return Promise.resolve(this.ctrl.focus())}async toggle(){return Promise.resolve(this.ctrl.toggle())}watchName(e){this.ctrl.watchName(e)}handleKeyDown(e){"Enter"!==e.key&&" "!==e.key||(common.Log.debug("button pressed"),this.ctrl.handleClick())}onKeydown(e){this.ctrl.onKeydown(e)}componentWillLoad(){this.ctrl.componentWillLoad({name:this._name}),this.ctrl.setOnLoadedCallback(e=>{this.loaded.emit(e)})}componentDidLoad(){requestAnimationFrame(()=>{this.rendered.emit()})}disconnectedCallback(){this.ctrl.destroy()}render(){return index.h(index.Host,{key:"ff0f258279d6e18440f82f7fb4de42ed9bf4eaac"},index.h(SkeletonFC,{key:"2a07e293ba5934de959d7099f927db80ad396c68",count:this.count,label:this.label,name:this.ctrl.getRenderProp("name"),handleClick:()=>this.ctrl.handleClick(),onLoaded:this.loaded,onRendered:this.rendered,show:this.show,refButton:e=>this.ctrl.setButtonRef(e)}))}static get watchers(){return{_name:["watchName"]}}};exports.kol_skeleton=KolSkeleton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-_pfZrL6V.js");require("./common-CyOOsddt.js");var label=require("./label-BpdiumjJ.js"),elementFocus=require("./element-focus-r03qIEIv.js"),uniqueNavLabels=require("./unique-nav-labels-DJBlAxpe.js"),validation=require("./validation-CJn2v37b.js"),componentNames=require("./component-names-5KS_pYRF.js");const defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1777380988243"); /* IE9*/\n src: url("kolicons.eot?t=1777380988243#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1777380988243") format("woff2"), url("kolicons.woff?t=1777380988243") format("woff"), url("kolicons.ttf?t=1777380988243") format("truetype"), url("kolicons.svg?t=1777380988243#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-link__icon {\n display: inline-flex;\n }\n .kol-skip-nav__list {\n display: grid;\n place-items: center;\n list-style: none;\n }\n .kol-skip-nav__list-item {\n height: 0;\n }\n .kol-skip-nav .kol-link {\n position: absolute;\n left: calc(-99999 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 9999999;\n line-height: 1;\n }\n .kol-skip-nav .kol-link:focus {\n background-color: #fff;\n position: unset;\n left: unset;\n }\n}',KolSkipNav=class{constructor(n){index.registerInstance(this,n),this.state={_label:"",_links:[]}}render(){return index.h("nav",{key:"a300b236ef0f4039a2c000bc856f8d7206099835",class:"kol-skip-nav","aria-label":this.state._label},index.h("ul",{key:"b5730f5047232aa98b34409af342c71b5b24a55a",class:"kol-skip-nav__list"},this.state._links.map((n,e)=>index.h("li",{class:"kol-skip-nav__list-item",key:e},index.h(componentNames.KolLinkWcTag,Object.assign({},n,{ref:0===e?n=>this.firstLinkRef=n:void 0}))))))}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.firstLinkRef))}validateLabel(n,e,o=!1){o||uniqueNavLabels.removeNavLabel(this.state._label),label.validateLabel(this,n,{required:!0}),uniqueNavLabels.addNavLabel(this.state._label)}validateLinks(n){validation.watchNavLinks("KolSkipNav",this,n)}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){uniqueNavLabels.removeNavLabel(this.state._label)}get host(){return index.getElement(this)}static get watchers(){return{_label:["validateLabel"],_links:["validateLinks"]}}};KolSkipNav.style={default:defaultStyleCss},exports.kol_skip_nav=KolSkipNav;
|
|
4
|
+
"use strict";var index=require("./index-CobjNfgo.js");require("./common-CyOOsddt.js");var label=require("./label-BpdiumjJ.js"),elementFocus=require("./element-focus-r03qIEIv.js"),uniqueNavLabels=require("./unique-nav-labels-DJBlAxpe.js"),validation=require("./validation-CJn2v37b.js"),componentNames=require("./component-names-5KS_pYRF.js");const defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1778148144850"); /* IE9*/\n src: url("kolicons.eot?t=1778148144850#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1778148144850") format("woff2"), url("kolicons.woff?t=1778148144850") format("woff"), url("kolicons.ttf?t=1778148144850") format("truetype"), url("kolicons.svg?t=1778148144850#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n :host {\n display: inline-block;\n }\n .kol-link {\n display: inline-flex;\n max-width: fit-content;\n align-items: baseline;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-link--standalone {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: stretch;\n }\n .kol-link--standalone .kol-link__text {\n display: inline-flex;\n flex: 1 1 100%;\n place-items: center;\n }\n .kol-link .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-link:focus:not([aria-disabled], [disabled]) .kol-span__label, .kol-link:hover:not([aria-disabled], [disabled]) .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-link__icon {\n display: inline-flex;\n }\n .kol-skip-nav__list {\n display: grid;\n place-items: center;\n list-style: none;\n }\n .kol-skip-nav__list-item {\n height: 0;\n }\n .kol-skip-nav .kol-link {\n position: absolute;\n left: calc(-99999 * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 9999999;\n line-height: 1;\n }\n .kol-skip-nav .kol-link:focus {\n background-color: white;\n position: unset;\n left: unset;\n }\n}',KolSkipNav=class{constructor(n){index.registerInstance(this,n),this.state={_label:"",_links:[]}}render(){return index.h("nav",{key:"a300b236ef0f4039a2c000bc856f8d7206099835",class:"kol-skip-nav","aria-label":this.state._label},index.h("ul",{key:"b5730f5047232aa98b34409af342c71b5b24a55a",class:"kol-skip-nav__list"},this.state._links.map((n,e)=>index.h("li",{class:"kol-skip-nav__list-item",key:e},index.h(componentNames.KolLinkWcTag,Object.assign({},n,{ref:0===e?n=>this.firstLinkRef=n:void 0}))))))}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.firstLinkRef))}validateLabel(n,e,t=!1){t||uniqueNavLabels.removeNavLabel(this.state._label),label.validateLabel(this,n,{required:!0}),uniqueNavLabels.addNavLabel(this.state._label)}validateLinks(n){validation.watchNavLinks("KolSkipNav",this,n)}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){uniqueNavLabels.removeNavLabel(this.state._label)}get host(){return index.getElement(this)}static get watchers(){return{_label:["validateLabel"],_links:["validateLinks"]}}};KolSkipNav.style={default:defaultStyleCss},exports.kol_skip_nav=KolSkipNav;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kol-skip-nav.entry.cjs.js","sources":["src/components/skip-nav/style.scss?tag=kol-skip-nav&mode=default&encapsulation=shadow","src/components/skip-nav/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../@shared/global' as *;\n@use '../@shared/link.mixin' as *;\n\n@layer kol-component {\n\t@include kol-link-styles('kol-link');\n\t.kol-skip-nav {\n\t\t&__list {\n\t\t\tdisplay: grid;\n\t\t\tplace-items: center;\n\t\t\tlist-style: none;\n\t\t}\n\n\t\t&__list-item {\n\t\t\theight: 0;\n\t\t}\n\n\t\t.kol-link {\n\t\t\tposition: absolute;\n\t\t\tleft: to-rem(-99999);\n\t\t\tz-index: 9999999;\n\n\t\t\tline-height: 1;\n\n\t\t\t&:focus {\n\t\t\t\tbackground-color:
|
|
1
|
+
{"version":3,"file":"kol-skip-nav.entry.cjs.js","sources":["src/components/skip-nav/style.scss?tag=kol-skip-nav&mode=default&encapsulation=shadow","src/components/skip-nav/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../@shared/global' as *;\n@use '../@shared/link.mixin' as *;\n\n@layer kol-component {\n\t@include kol-link-styles('kol-link');\n\t.kol-skip-nav {\n\t\t&__list {\n\t\t\tdisplay: grid;\n\t\t\tplace-items: center;\n\t\t\tlist-style: none;\n\t\t}\n\n\t\t&__list-item {\n\t\t\theight: 0;\n\t\t}\n\n\t\t.kol-link {\n\t\t\tposition: absolute;\n\t\t\tleft: to-rem(-99999);\n\t\t\tz-index: 9999999;\n\n\t\t\tline-height: 1;\n\n\t\t\t&:focus {\n\t\t\t\tbackground-color: white;\n\t\t\t\tposition: unset;\n\t\t\t\tleft: unset;\n\t\t\t}\n\t\t}\n\t}\n}\n","import { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\nimport type { FocusableElement, LabelPropType, LinkProps, SkipNavAPI, SkipNavStates, Stringified } from '../../schema';\nimport { validateLabel } from '../../schema';\n\nimport { delegateFocus, setFocus } from '../../utils/element-focus';\nimport { addNavLabel, removeNavLabel } from '../../utils/unique-nav-labels';\nimport { watchNavLinks } from '../nav/validation';\n\nimport type { JSX } from '@stencil/core';\nimport { KolLinkWcTag } from '../../core/component-names';\n\n/**\n * The **SkipNav** component renders a hidden navigation that allows keyboard and assistive technology users to skip repetitive navigation sections and jump directly to the main content. It only becomes visible when reached via the Tab key.\n */\n@Component({\n\ttag: 'kol-skip-nav',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolSkipNav implements SkipNavAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolSkipNavElement;\n\tprivate firstLinkRef?: HTMLKolLinkWcElement;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<nav class=\"kol-skip-nav\" aria-label={this.state._label}>\n\t\t\t\t<ul class=\"kol-skip-nav__list\">\n\t\t\t\t\t{this.state._links.map((link: LinkProps, index: number) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li class=\"kol-skip-nav__list-item\" key={index}>\n\t\t\t\t\t\t\t\t<KolLinkWcTag {...link} ref={index === 0 ? (el) => (this.firstLinkRef = el) : undefined}></KolLinkWcTag>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t);\n\t}\n\n\t/**\n\t * Sets focus on the internal element.\n\t */\n\t@Method()\n\tpublic async focus(): Promise<void> {\n\t\treturn delegateFocus(this.host!, () => setFocus(this.firstLinkRef!));\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t/**\n\t * Defines the list of links combined with their labels to render.\n\t */\n\t@Prop() public _links!: Stringified<LinkProps[]>;\n\n\t@State() public state: SkipNavStates = {\n\t\t_label: '', // ⚠ required\n\t\t_links: [],\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType, _oldValue?: LabelPropType, initial = false): void {\n\t\tif (!initial) {\n\t\t\tremoveNavLabel(this.state._label); // remove the current\n\t\t}\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t\taddNavLabel(this.state._label); // add the state instead of prop, because the prop could be invalid and not set as new label\n\t}\n\n\t@Watch('_links')\n\tpublic validateLinks(value?: Stringified<LinkProps[]>): void {\n\t\twatchNavLinks('KolSkipNav', this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label, undefined, true);\n\t\tthis.validateLinks(this._links);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tremoveNavLabel(this.state._label);\n\t}\n}\n"],"names":["h","index","KolLinkWcTag","delegateFocus","setFocus","removeNavLabel","validateLabel","addNavLabel","watchNavLinks"],"mappings":";;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,0sVAA0sV;;MCqBrtV,UAAU,GAAA,MAAA;AAPvB,IAAA,WAAA,CAAA,OAAA,EAAA;;QA6CiB,IAAA,CAAA,KAAK,GAAkB;AACtC,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,MAAM,EAAE,EAAE;SACV;AA0BD;IA/DO,MAAM,GAAA;QACZ,QACCA,OAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,cAAc,gBAAa,IAAI,CAAC,KAAK,CAAC,MAAM,EAAA,EACtDA,OAAA,CAAA,IAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAI,KAAK,EAAC,oBAAoB,EAC5B,EAAA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAe,EAAEC,OAAa,KAAI;YACzD,QACCD,gBAAI,KAAK,EAAC,yBAAyB,EAAC,GAAG,EAAEC,OAAK,EAAA,EAC7CD,OAAA,CAACE,2BAAY,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,IAAI,EAAA,EAAE,GAAG,EAAED,OAAK,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,GAAG,SAAS,EAAiB,CAAA,CAAA,CACpG;AAEP,SAAC,CAAC,CACE,CACA;;AAQD,IAAA,MAAM,KAAK,GAAA;AACjB,QAAA,OAAOE,0BAAa,CAAC,IAAI,CAAC,IAAK,EAAE,MAAMC,qBAAQ,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;;AAmB9D,IAAA,aAAa,CAAC,KAAqB,EAAE,SAAyB,EAAE,OAAO,GAAG,KAAK,EAAA;QACrF,IAAI,CAAC,OAAO,EAAE;AACb,YAAAC,8BAAc,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;;AAElC,QAAAC,mBAAa,CAAC,IAAI,EAAE,KAAK,EAAE;AAC1B,YAAA,QAAQ,EAAE,IAAI;AACd,SAAA,CAAC;AACF,QAAAC,2BAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;;AAIxB,IAAA,aAAa,CAAC,KAAgC,EAAA;AACpD,QAAAC,wBAAa,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC;;IAGlC,iBAAiB,GAAA;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC;AAChD,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;;IAGzB,oBAAoB,GAAA;AAC1B,QAAAH,8BAAc,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-_pfZrL6V.js"),variantQuote=require("./variant-quote-iZVwULXH.js"),i18n=require("./i18n-DevJo9yF.js");require("./common-CyOOsddt.js");var label=require("./label-B0RK7DQ1.js"),normalizers=require("./normalizers-CLRF8il-.js"),baseController=require("./base-controller-DAzsTqX9.js");require("./i18n-CgUN6lev.js"),require("./_Uint8Array-BAQUGozM.js"),require("./isArray-BOIOdEQh.js");const showProp=normalizers.createPropDefinition("show",!1,normalizers.normalizeBoolean),spinVariantOptions=["dot","cycle","none"],variantSpinProp=normalizers.createPropDefinition("variant","dot",n=>{const e=normalizers.normalizeString(n);if(spinVariantOptions.includes(e))return e;throw new Error(`Invalid spin variant: ${e}`)},()=>!0);function renderSpinVariant(n){switch(n){case"cycle":return index.h("span",{class:`kol-spin__loader kol-spin__spinner--${n}__element`});case"none":return index.h("slot",{name:"expert"});default:return index.h(index.Fragment,null,index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--1 \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--1`}),index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--2 \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--2`}),index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--3 \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--3`}),index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--neutral \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--4`}))}}const SpinFC=n=>{const{show:e,label:t,variant:i,showToggled:o,handleGetTranslateActionRunning:r,handleGetTranslateActionDone:l}=n;return index.h(index.Fragment,null,e?index.h(index.Fragment,null,index.h("span",{class:`kol-spin__spinner kol-spin__spinner--${i}`},renderSpinVariant(i)),index.h("span",{"aria-busy":"true",class:"visually-hidden",role:"alert"},t||r())):o&&index.h("span",{"aria-busy":"false",class:"visually-hidden",role:"alert"},t||l()))},spinPropsConfig={optional:[label.labelProp,showProp,variantSpinProp]};class SpinController extends baseController.BaseController{constructor(n){super(n,spinPropsConfig),this.translateActionRunning=i18n.translate("kol-action-running"),this.translateActionDone=i18n.translate("kol-action-done"),this.handleGetTranslateActionRunning=()=>this.translateActionRunning,this.handleGetTranslateActionDone=()=>this.translateActionDone}componentWillLoad(n){const{show:e,label:t,variant:i}=n;this.watchShow(e),this.watchLabel(t),this.watchVariant(i)}watchShow(n){showProp.apply(n,n=>{const e=this.getRenderProp("show");this.setRenderProp("show",n),this.setState("showToggled",!0===e&&!1===n)})}watchLabel(n){label.labelProp.apply(n,n=>{this.setRenderProp("label",n)})}watchVariant(n){variantSpinProp.apply(n,n=>{this.setRenderProp("variant",n)})}}const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n @keyframes rotate {\n to {\n transform: rotate(1turn);\n }\n }\n @keyframes growingCircle {\n 0% {\n opacity: 0.5;\n border-color: #fff;\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 25% {\n opacity: 0.75;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, #000));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 50% {\n opacity: 1;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, #000));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n }\n 75% {\n opacity: 1;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, #000));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 100% {\n opacity: 0.1;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, #000));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n }\n .kol-spin__spinner--cycle {\n width: calc(var(--kol-spin-size, 48) * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(var(--kol-spin-size, 48) * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner--cycle__element {\n border-radius: 50%;\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n animation: 2s linear infinite rotate;\n }\n @media (prefers-reduced-motion) {\n .kol-spin__spinner--cycle__element {\n animation-duration: 4s !important;\n }\n }\n .kol-spin__spinner--cycle__element::before {\n border-radius: 50%;\n position: absolute;\n inset: 0;\n content: \"\";\n animation: 3s linear infinite growingCircle;\n border: 5px solid var(--kol-spin-color, var(--kol-theme-spin-color, #333));\n }\n @media (prefers-reduced-motion) {\n .kol-spin__spinner--cycle__element::before {\n animation-duration: 6s !important;\n }\n }\n}\n@layer kol-component {\n @keyframes spin1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes spin2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(calc(var(--kol-spin-size, 13) * 1rem / var(--kolibri-root-font-size, 16)), 0);\n }\n }\n @keyframes spin3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .kol-spin__spinner-element {\n animation-duration: 2s !important;\n }\n }\n .kol-spin__spinner--dot {\n --kol-spin-border-width: calc(var(--kol-spin-size, 13) / 10);\n width: calc(calc(var(--kol-spin-size, 13) * 3 + 2) * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(calc(var(--kol-spin-size, 13) + var(--kol-spin-border-width) * 2) * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner--dot__element {\n background-color: var(--kol-spin-color, var(--kol-theme-spin-color, #000));\n border-radius: 50%;\n position: absolute;\n top: 1px;\n width: calc(var(--kol-spin-size, 13) * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(var(--kol-spin-size, 13) * 1rem / var(--kolibri-root-font-size, 16));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border: calc(var(--kol-spin-border-width) * 1rem / var(--kolibri-root-font-size, 16)) solid #fff;\n }\n .kol-spin__spinner--dot__element--1 {\n left: calc(var(--kol-spin-border-width) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin1;\n }\n .kol-spin__spinner--dot__element--2 {\n left: calc(var(--kol-spin-border-width) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner--dot__element--3 {\n left: calc(calc(var(--kol-spin-size, 13) + var(--kol-spin-border-width)) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner--dot__element--4 {\n opacity: 0.6;\n left: calc(calc(var(--kol-spin-size, 13) * 2 + var(--kol-spin-border-width)) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin3;\n }\n}\n@layer kol-component {\n .kol-spin__spinner {\n display: block;\n position: relative;\n }\n}",KolSpin=class extends variantQuote.BaseWebComponent{constructor(n){super(),index.registerInstance(this,n),this.ctrl=new SpinController(this.stateAccess),this.showToggled=!1}watchShow(n){this.ctrl.watchShow(n)}watchLabel(n){this.ctrl.watchLabel(n)}watchVariant(n){this.ctrl.watchVariant(n)}componentWillLoad(){this.ctrl.componentWillLoad({show:this._show,label:this._label,variant:this._variant})}render(){return index.h(index.Host,{key:"b4fec1b0b595bf2eebe1c8f866b5f1352be06093"},index.h(SpinFC,{key:"95988885799767328412a77384e5636b6444cc52",show:this.ctrl.getRenderProp("show"),label:this.ctrl.getRenderProp("label"),variant:this.ctrl.getRenderProp("variant"),showToggled:this.showToggled,handleGetTranslateActionRunning:this.ctrl.handleGetTranslateActionRunning,handleGetTranslateActionDone:this.ctrl.handleGetTranslateActionDone}))}static get watchers(){return{_show:["watchShow"],_label:["watchLabel"],_variant:["watchVariant"]}}};KolSpin.style={default:defaultStyleCss},exports.kol_spin=KolSpin;
|
|
4
|
+
"use strict";var index=require("./index-CobjNfgo.js"),variantQuote=require("./variant-quote-iZVwULXH.js"),i18n=require("./i18n-DevJo9yF.js");require("./common-CyOOsddt.js");var label=require("./label-B0RK7DQ1.js"),normalizers=require("./normalizers-CLRF8il-.js"),baseController=require("./base-controller-DAzsTqX9.js");require("./i18n-CgUN6lev.js"),require("./_Uint8Array-BAQUGozM.js"),require("./isArray-BOIOdEQh.js");const showProp=normalizers.createPropDefinition("show",!1,normalizers.normalizeBoolean),spinVariantOptions=["dot","cycle","none"],variantSpinProp=normalizers.createPropDefinition("variant","dot",n=>{const e=normalizers.normalizeString(n);if(spinVariantOptions.includes(e))return e;throw new Error(`Invalid spin variant: ${e}`)},()=>!0);function renderSpinVariant(n){switch(n){case"cycle":return index.h("span",{class:`kol-spin__loader kol-spin__spinner--${n}__element`});case"none":return index.h("slot",{name:"expert"});default:return index.h(index.Fragment,null,index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--1 \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--1`}),index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--2 \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--2`}),index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--3 \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--3`}),index.h("span",{class:`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--neutral \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${n}__element--4`}))}}const SpinFC=n=>{const{show:e,label:t,variant:i,showToggled:o,handleGetTranslateActionRunning:r,handleGetTranslateActionDone:l}=n;return index.h(index.Fragment,null,e?index.h(index.Fragment,null,index.h("span",{class:`kol-spin__spinner kol-spin__spinner--${i}`},renderSpinVariant(i)),index.h("span",{"aria-busy":"true",class:"visually-hidden",role:"alert"},t||r())):o&&index.h("span",{"aria-busy":"false",class:"visually-hidden",role:"alert"},t||l()))},spinPropsConfig={optional:[label.labelProp,showProp,variantSpinProp]};class SpinController extends baseController.BaseController{constructor(n){super(n,spinPropsConfig),this.translateActionRunning=i18n.translate("kol-action-running"),this.translateActionDone=i18n.translate("kol-action-done"),this.handleGetTranslateActionRunning=()=>this.translateActionRunning,this.handleGetTranslateActionDone=()=>this.translateActionDone}componentWillLoad(n){const{show:e,label:t,variant:i}=n;this.watchShow(e),this.watchLabel(t),this.watchVariant(i)}watchShow(n){showProp.apply(n,n=>{const e=this.getRenderProp("show");this.setRenderProp("show",n),this.setState("showToggled",!0===e&&!1===n)})}watchLabel(n){label.labelProp.apply(n,n=>{this.setRenderProp("label",n)})}watchVariant(n){variantSpinProp.apply(n,n=>{this.setRenderProp("variant",n)})}}const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n @keyframes rotate {\n to {\n transform: rotate(1turn);\n }\n }\n @keyframes growingCircle {\n 0% {\n opacity: 0.5;\n border-color: white;\n clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);\n }\n 25% {\n opacity: 0.75;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, #000));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);\n }\n 50% {\n opacity: 1;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, black));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);\n }\n 75% {\n opacity: 1;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, black));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%);\n }\n 100% {\n opacity: 0.1;\n border-color: var(--kol-spin-color, var(--kol-theme-spin-color, black));\n clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);\n }\n }\n .kol-spin__spinner--cycle {\n width: calc(var(--kol-spin-size, 48) * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(var(--kol-spin-size, 48) * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner--cycle__element {\n border-radius: 50%;\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n animation: 2s linear infinite rotate;\n }\n @media (prefers-reduced-motion) {\n .kol-spin__spinner--cycle__element {\n animation-duration: 4s !important;\n }\n }\n .kol-spin__spinner--cycle__element::before {\n border-radius: 50%;\n position: absolute;\n inset: 0;\n content: \"\";\n animation: 3s linear infinite growingCircle;\n border: 5px solid var(--kol-spin-color, var(--kol-theme-spin-color, #333));\n }\n @media (prefers-reduced-motion) {\n .kol-spin__spinner--cycle__element::before {\n animation-duration: 6s !important;\n }\n }\n}\n@layer kol-component {\n @keyframes spin1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes spin2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(calc(var(--kol-spin-size, 13) * 1rem / var(--kolibri-root-font-size, 16)), 0);\n }\n }\n @keyframes spin3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n /* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion#toning_down_the_animation_scaling */\n @media (prefers-reduced-motion) {\n .kol-spin__spinner-element {\n animation-duration: 2s !important;\n }\n }\n .kol-spin__spinner--dot {\n --kol-spin-border-width: calc(var(--kol-spin-size, 13) / 10);\n width: calc(calc(var(--kol-spin-size, 13) * 3 + 2) * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(calc(var(--kol-spin-size, 13) + var(--kol-spin-border-width) * 2) * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-spin__spinner--dot__element {\n background-color: var(--kol-spin-color, var(--kol-theme-spin-color, #000));\n border-radius: 50%;\n position: absolute;\n top: 1px;\n width: calc(var(--kol-spin-size, 13) * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(var(--kol-spin-size, 13) * 1rem / var(--kolibri-root-font-size, 16));\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n border: calc(var(--kol-spin-border-width) * 1rem / var(--kolibri-root-font-size, 16)) solid white;\n }\n .kol-spin__spinner--dot__element--1 {\n left: calc(var(--kol-spin-border-width) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin1;\n }\n .kol-spin__spinner--dot__element--2 {\n left: calc(var(--kol-spin-border-width) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner--dot__element--3 {\n left: calc(calc(var(--kol-spin-size, 13) + var(--kol-spin-border-width)) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n animation: 1s infinite spin2;\n }\n .kol-spin__spinner--dot__element--4 {\n opacity: 0.6;\n left: calc(calc(var(--kol-spin-size, 13) * 2 + var(--kol-spin-border-width)) * 1rem / var(--kolibri-root-font-size, 16));\n z-index: 0;\n animation: 1s infinite spin3;\n }\n}\n@layer kol-component {\n .kol-spin__spinner {\n display: block;\n position: relative;\n }\n}",KolSpin=class extends variantQuote.BaseWebComponent{constructor(n){super(),index.registerInstance(this,n),this.ctrl=new SpinController(this.stateAccess),this.showToggled=!1}watchShow(n){this.ctrl.watchShow(n)}watchLabel(n){this.ctrl.watchLabel(n)}watchVariant(n){this.ctrl.watchVariant(n)}componentWillLoad(){this.ctrl.componentWillLoad({show:this._show,label:this._label,variant:this._variant})}render(){return index.h(index.Host,{key:"b4fec1b0b595bf2eebe1c8f866b5f1352be06093"},index.h(SpinFC,{key:"95988885799767328412a77384e5636b6444cc52",show:this.ctrl.getRenderProp("show"),label:this.ctrl.getRenderProp("label"),variant:this.ctrl.getRenderProp("variant"),showToggled:this.showToggled,handleGetTranslateActionRunning:this.ctrl.handleGetTranslateActionRunning,handleGetTranslateActionDone:this.ctrl.handleGetTranslateActionDone}))}static get watchers(){return{_show:["watchShow"],_label:["watchLabel"],_variant:["watchVariant"]}}};KolSpin.style={default:defaultStyleCss},exports.kol_spin=KolSpin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kol-spin.entry.cjs.js","sources":["src/internal/props/show.ts","src/internal/props/variant-spin.ts","src/internal/functional-components/spin/component.tsx","src/internal/functional-components/spin/api.tsx","src/internal/functional-components/spin/controller.ts","src/components/spin/style.scss?tag=kol-spin&mode=default&encapsulation=shadow","src/components/spin/component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Show prop for toggling element visibility\n *\n * Description:\n * Controls whether a component is visible or hidden. The visibility state must be\n * communicated to assistive technologies so screen reader users understand which\n * content is currently perceivable.\n *\n * Usage (according to WCAG 2.1 and WAI-ARIA):\n * - Hidden content must be correctly excluded from the accessibility tree (aria-hidden)\n * - Toggling visibility should update aria-expanded on the controlling element (WCAG 4.1.2 Name, Role, Value)\n * - Content that appears or disappears must not trap keyboard focus (WCAG 2.1.2 No Keyboard Trap)\n * - Dynamic content changes should be announced to screen readers when appropriate (WCAG 4.1.3 Status Messages)\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html\n * @see https://www.w3.org/TR/wai-aria-1.2/#aria-hidden\n * @see https://www.w3.org/TR/wai-aria-1.2/#aria-expanded\n * @see https://www.w3.org/WAI/WCAG21/Understanding/no-keyboard-trap.html\n */\nexport type ShowProp = SimpleProp<'show', boolean>;\nexport const showProp = createPropDefinition<ShowProp>('show', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Variant prop for spin display style\n *\n * Description:\n * Determines the visual presentation of a loading spinner. The component communicates\n * loading state through visual animation and aria-busy to assistive technologies.\n *\n * Usage (according to WAI-ARIA):\n * - \"dot\": Animated dots spinner (default)\n * - \"cycle\": Rotating cycle animation\n * - \"none\": Custom content via expert slot\n * - The visual variant choice is presentation-only and does not affect the accessible semantics\n *\n * Accessibility:\n * - Loading state must be announced via aria-busy (WCAG 4.1.3 Status Messages)\n * - The spinner animation must respect prefers-reduced-motion (WCAG 2.3.3 Animation from Interactions)\n * - Completion must be announced when show transitions to false (WCAG 4.1.3 Status Messages)\n *\n * @see https://www.w3.org/TR/wai-aria-1.2/#aria-busy\n * @see https://www.w3.org/WAI/WCAG21/Understanding/status-messages.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html\n */\nexport const spinVariantOptions = ['dot', 'cycle', 'none'] as const;\nexport type SpinVariantType = (typeof spinVariantOptions)[number];\n\nexport type VariantSpinProp = SimpleProp<'variant', SpinVariantType>;\nexport const variantSpinProp = createPropDefinition<VariantSpinProp>(\n\t'variant',\n\t'dot',\n\t(value: unknown) => {\n\t\tconst str = normalizeString(value);\n\t\tif (spinVariantOptions.includes(str as SpinVariantType)) {\n\t\t\treturn str as SpinVariantType;\n\t\t}\n\t\tthrow new Error(`Invalid spin variant: ${str}`);\n\t},\n\t() => true,\n);\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { Fragment, h } from '@stencil/core';\n\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { SpinApi } from './api';\n\nfunction renderSpinVariant(variant: string): unknown {\n\tswitch (variant) {\n\t\tcase 'cycle':\n\t\t\treturn <span class={`kol-spin__loader kol-spin__spinner--${variant}__element`}></span>;\n\t\tcase 'none':\n\t\t\treturn <slot name=\"expert\"></slot>;\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--1 \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--1`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--2 \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--2`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--3 \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--3`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--neutral \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--4`}\n\t\t\t\t\t></span>\n\t\t\t\t</>\n\t\t\t);\n\t}\n}\n\nexport const SpinFC: FC<FunctionalComponentProps<SpinApi>> = (props) => {\n\tconst { show, label, variant, showToggled, handleGetTranslateActionRunning, handleGetTranslateActionDone } = props;\n\n\treturn (\n\t\t<Fragment>\n\t\t\t{show ? (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<span class={`kol-spin__spinner kol-spin__spinner--${variant}`}>{renderSpinVariant(variant)}</span>\n\t\t\t\t\t<span aria-busy=\"true\" class=\"visually-hidden\" role=\"alert\">\n\t\t\t\t\t\t{label || handleGetTranslateActionRunning()}\n\t\t\t\t\t</span>\n\t\t\t\t</Fragment>\n\t\t\t) : (\n\t\t\t\tshowToggled && (\n\t\t\t\t\t<span aria-busy=\"false\" class=\"visually-hidden\" role=\"alert\">\n\t\t\t\t\t\t{label || handleGetTranslateActionDone()}\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t)}\n\t\t</Fragment>\n\t);\n};\n","import { labelProp, showProp, variantSpinProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const spinPropsConfig = {\n\toptional: [labelProp, showProp, variantSpinProp],\n} as const satisfies PropsConfigShape;\n\nexport type SpinApi = ApiFromConfig<\n\ttypeof spinPropsConfig,\n\t{\n\t\tStates: {\n\t\t\tshowToggled: boolean;\n\t\t};\n\t\tCallbacks: {\n\t\t\tgetTranslateActionRunning: () => string;\n\t\t\tgetTranslateActionDone: () => string;\n\t\t};\n\t}\n>;\n","import { translate } from '../../../i18n';\nimport { labelProp, showProp, variantSpinProp } from '../../props';\nimport { BaseController } from '../base-controller';\nimport type { ControllerInterface, ResolvedInputProps, StateAccess } from '../generic-types';\nimport type { SpinApi } from './api';\nimport { spinPropsConfig } from './api';\n\nexport class SpinController extends BaseController<SpinApi> implements ControllerInterface<SpinApi> {\n\tprivate readonly translateActionRunning: string = translate('kol-action-running');\n\tprivate readonly translateActionDone: string = translate('kol-action-done');\n\n\tpublic constructor(stateAccess: StateAccess<SpinApi>) {\n\t\tsuper(stateAccess, spinPropsConfig);\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<SpinApi>): void {\n\t\tconst { show, label, variant } = props;\n\t\tthis.watchShow(show);\n\t\tthis.watchLabel(label);\n\t\tthis.watchVariant(variant);\n\t}\n\n\tpublic watchShow(value?: boolean): void {\n\t\tshowProp.apply(value, (v) => {\n\t\t\tconst previousShow = this.getRenderProp('show');\n\t\t\tthis.setRenderProp('show', v);\n\t\t\t// Emit done state only when the spinner toggles from visible to hidden,\n\t\t\t// so screen readers receive a completion announcement once.\n\t\t\tthis.setState('showToggled', previousShow === true && v === false);\n\t\t});\n\t}\n\n\tpublic watchLabel(value?: string): void {\n\t\tlabelProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('label', v);\n\t\t});\n\t}\n\n\tpublic watchVariant(value?: unknown): void {\n\t\tvariantSpinProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('variant', v);\n\t\t});\n\t}\n\n\tpublic handleGetTranslateActionRunning = (): string => {\n\t\treturn this.translateActionRunning;\n\t};\n\n\tpublic handleGetTranslateActionDone = (): string => {\n\t\treturn this.translateActionDone;\n\t};\n}\n","@use '../@shared/mixins' as *;\n@use '../@shared/global' as *;\n@use './cycle' as *;\n@use './dot' as *;\n\n@layer kol-component {\n\t.kol-spin {\n\t\t&__spinner {\n\t\t\tdisplay: block;\n\t\t\tposition: relative;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { BaseWebComponent } from '../../internal/functional-components/base-web-component';\nimport type { WebComponentInterface } from '../../internal/functional-components/generic-types';\nimport type { SpinApi } from '../../internal/functional-components/spin/api';\nimport { SpinFC } from '../../internal/functional-components/spin/component';\nimport { SpinController } from '../../internal/functional-components/spin/controller';\nimport type { SpinVariantType } from '../../internal/props/variant-spin';\n\n@Component({\n\ttag: 'kol-spin',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolSpin extends BaseWebComponent<SpinApi> implements WebComponentInterface<SpinApi> {\n\tprivate readonly ctrl = new SpinController(this.stateAccess);\n\n\t/**\n\t * Makes the element show up.\n\t */\n\t@Prop()\n\tpublic _show?: boolean;\n\n\t@Watch('_show')\n\tpublic watchShow(value?: boolean): void {\n\t\tthis.ctrl.watchShow(value);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop()\n\tpublic _label?: string;\n\n\t@Watch('_label')\n\tpublic watchLabel(value?: string): void {\n\t\tthis.ctrl.watchLabel(value);\n\t}\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop()\n\tpublic _variant?: SpinVariantType;\n\n\t@Watch('_variant')\n\tpublic watchVariant(value?: SpinVariantType): void {\n\t\tthis.ctrl.watchVariant(value);\n\t}\n\n\t@State()\n\tpublic showToggled: boolean = false;\n\n\tpublic componentWillLoad(): void {\n\t\tthis.ctrl.componentWillLoad({\n\t\t\tshow: this._show,\n\t\t\tlabel: this._label,\n\t\t\tvariant: this._variant,\n\t\t});\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<SpinFC\n\t\t\t\t\tshow={this.ctrl.getRenderProp('show')}\n\t\t\t\t\tlabel={this.ctrl.getRenderProp('label')}\n\t\t\t\t\tvariant={this.ctrl.getRenderProp('variant')}\n\t\t\t\t\tshowToggled={this.showToggled}\n\t\t\t\t\thandleGetTranslateActionRunning={this.ctrl.handleGetTranslateActionRunning}\n\t\t\t\t\thandleGetTranslateActionDone={this.ctrl.handleGetTranslateActionDone}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"names":["createPropDefinition","normalizeBoolean","normalizeString","h","Fragment","labelProp","BaseController","translate","BaseWebComponent","Host"],"mappings":";;;;;;;;;;;;;;;;AAwBO,MAAM,QAAQ,GAAGA,gCAAoB,CAAW,MAAM,EAAE,KAAK,EAAEC,4BAAgB,CAAC;;ACEhF,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAU;AAI5D,MAAM,eAAe,GAAGD,gCAAoB,CAClD,SAAS,EACT,KAAK,EACL,CAAC,KAAc,KAAI;AAClB,IAAA,MAAM,GAAG,GAAGE,2BAAe,CAAC,KAAK,CAAC;AAClC,IAAA,IAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAsB,CAAC,EAAE;AACxD,QAAA,OAAO,GAAsB;;AAE9B,IAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,CAAA,CAAE,CAAC;AAChD,CAAC,EACD,MAAM,IAAI,CACV;;ACnCD,SAAS,iBAAiB,CAAC,OAAe,EAAA;IACzC,QAAQ,OAAO;AACd,QAAA,KAAK,OAAO;AACX,YAAA,OAAOC,kBAAM,KAAK,EAAE,CAAA,oCAAA,EAAuC,OAAO,CAAA,SAAA,CAAW,GAAS;AACvF,QAAA,KAAK,MAAM;YACV,OAAOA,OAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,GAAQ;AACnC,QAAA;AACC,YAAA,QACCA,OAAA,CAAAC,cAAA,EAAA,IAAA,EACCD,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;AACP,0BAAA,EAAA,OAAO,CAAc,YAAA,CAAA,EAAA,CACpC,CACN;;AAGP;AAEO,MAAM,MAAM,GAA0C,CAAC,KAAK,KAAI;AACtE,IAAA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,GAAG,KAAK;IAElH,QACCA,OAAC,CAAAC,cAAQ,EACP,IAAA,EAAA,IAAI,IACJD,OAAA,CAACC,cAAQ,EAAA,IAAA,EACRD,OAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,wCAAwC,OAAO,CAAA,CAAE,IAAG,iBAAiB,CAAC,OAAO,CAAC,CAAQ,EACnGA,OAAgB,CAAA,MAAA,EAAA,EAAA,WAAA,EAAA,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,EAAA,EACzD,KAAK,IAAI,+BAA+B,EAAE,CACrC,CACG,KAEX,WAAW,KACVA,OAAA,CAAA,MAAA,EAAA,EAAA,WAAA,EAAgB,OAAO,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,IAC1D,KAAK,IAAI,4BAA4B,EAAE,CAClC,CACP,CACD,CACS;AAEb,CAAC;;AC9DM,MAAM,eAAe,GAAG;AAC9B,IAAA,QAAQ,EAAE,CAACE,eAAS,EAAE,QAAQ,EAAE,eAAe,CAAC;CACZ;;ACE/B,MAAO,cAAe,SAAQC,6BAAuB,CAAA;AAI1D,IAAA,WAAA,CAAmB,WAAiC,EAAA;AACnD,QAAA,KAAK,CAAC,WAAW,EAAE,eAAe,CAAC;AAJnB,QAAA,IAAA,CAAA,sBAAsB,GAAWC,cAAS,CAAC,oBAAoB,CAAC;AAChE,QAAA,IAAA,CAAA,mBAAmB,GAAWA,cAAS,CAAC,iBAAiB,CAAC;AAmCpE,QAAA,IAA+B,CAAA,+BAAA,GAAG,MAAa;YACrD,OAAO,IAAI,CAAC,sBAAsB;AACnC,SAAC;AAEM,QAAA,IAA4B,CAAA,4BAAA,GAAG,MAAa;YAClD,OAAO,IAAI,CAAC,mBAAmB;AAChC,SAAC;;AAnCM,IAAA,iBAAiB,CAAC,KAAkC,EAAA;QAC1D,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK;AACtC,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;AACpB,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;AACtB,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;;AAGpB,IAAA,SAAS,CAAC,KAAe,EAAA;QAC/B,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAI;YAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAC/C,YAAA,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AAG7B,YAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,YAAY,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC;AACnE,SAAC,CAAC;;AAGI,IAAA,UAAU,CAAC,KAAc,EAAA;QAC/BF,eAAS,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAI;AAC5B,YAAA,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC;AAC/B,SAAC,CAAC;;AAGI,IAAA,YAAY,CAAC,KAAe,EAAA;QAClC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAI;AAClC,YAAA,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC;AACjC,SAAC,CAAC;;AAUH;;ACnDD,MAAM,eAAe,GAAG,qoTAAqoT;;MCgBhpT,OAAQ,GAAA,cAAQG,6BAAyB,CAAA;;;;QACpC,IAAI,CAAA,IAAA,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;AAoCrD,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;;AA3B5B,IAAA,SAAS,CAAC,KAAe,EAAA;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AAUpB,IAAA,UAAU,CAAC,KAAc,EAAA;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;;AAUrB,IAAA,YAAY,CAAC,KAAuB,EAAA;AAC1C,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;;IAMvB,iBAAiB,GAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAC3B,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,IAAI,CAAC,QAAQ;AACtB,SAAA,CAAC;;IAGI,MAAM,GAAA;AACZ,QAAA,QACCL,QAACM,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACJN,OAAC,CAAA,MAAM,EACN,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EACvC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EAC3C,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,+BAA+B,EAAE,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAC1E,4BAA4B,EAAE,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAA,CACnE,CACI;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"kol-spin.entry.cjs.js","sources":["src/internal/props/show.ts","src/internal/props/variant-spin.ts","src/internal/functional-components/spin/component.tsx","src/internal/functional-components/spin/api.tsx","src/internal/functional-components/spin/controller.ts","src/components/spin/style.scss?tag=kol-spin&mode=default&encapsulation=shadow","src/components/spin/component.tsx"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeBoolean } from './helpers/normalizers';\n\n/**\n * Show prop for toggling element visibility\n *\n * Description:\n * Controls whether a component is visible or hidden. The visibility state must be\n * communicated to assistive technologies so screen reader users understand which\n * content is currently perceivable.\n *\n * Usage (according to WCAG 2.1 and WAI-ARIA):\n * - Hidden content must be correctly excluded from the accessibility tree (aria-hidden)\n * - Toggling visibility should update aria-expanded on the controlling element (WCAG 4.1.2 Name, Role, Value)\n * - Content that appears or disappears must not trap keyboard focus (WCAG 2.1.2 No Keyboard Trap)\n * - Dynamic content changes should be announced to screen readers when appropriate (WCAG 4.1.3 Status Messages)\n *\n * @see https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html\n * @see https://www.w3.org/TR/wai-aria-1.2/#aria-hidden\n * @see https://www.w3.org/TR/wai-aria-1.2/#aria-expanded\n * @see https://www.w3.org/WAI/WCAG21/Understanding/no-keyboard-trap.html\n */\nexport type ShowProp = SimpleProp<'show', boolean>;\nexport const showProp = createPropDefinition<ShowProp>('show', false, normalizeBoolean);\n","import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\n/**\n * Variant prop for spin display style\n *\n * Description:\n * Determines the visual presentation of a loading spinner. The component communicates\n * loading state through visual animation and aria-busy to assistive technologies.\n *\n * Usage (according to WAI-ARIA):\n * - \"dot\": Animated dots spinner (default)\n * - \"cycle\": Rotating cycle animation\n * - \"none\": Custom content via expert slot\n * - The visual variant choice is presentation-only and does not affect the accessible semantics\n *\n * Accessibility:\n * - Loading state must be announced via aria-busy (WCAG 4.1.3 Status Messages)\n * - The spinner animation must respect prefers-reduced-motion (WCAG 2.3.3 Animation from Interactions)\n * - Completion must be announced when show transitions to false (WCAG 4.1.3 Status Messages)\n *\n * @see https://www.w3.org/TR/wai-aria-1.2/#aria-busy\n * @see https://www.w3.org/WAI/WCAG21/Understanding/status-messages.html\n * @see https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html\n */\nexport const spinVariantOptions = ['dot', 'cycle', 'none'] as const;\nexport type SpinVariantType = (typeof spinVariantOptions)[number];\n\nexport type VariantSpinProp = SimpleProp<'variant', SpinVariantType>;\nexport const variantSpinProp = createPropDefinition<VariantSpinProp>(\n\t'variant',\n\t'dot',\n\t(value: unknown) => {\n\t\tconst str = normalizeString(value);\n\t\tif (spinVariantOptions.includes(str as SpinVariantType)) {\n\t\t\treturn str as SpinVariantType;\n\t\t}\n\t\tthrow new Error(`Invalid spin variant: ${str}`);\n\t},\n\t() => true,\n);\n","import type { FunctionalComponent as FC } from '@stencil/core';\nimport { Fragment, h } from '@stencil/core';\n\nimport type { FunctionalComponentProps } from '../generic-types';\nimport type { SpinApi } from './api';\n\nfunction renderSpinVariant(variant: string): unknown {\n\tswitch (variant) {\n\t\tcase 'cycle':\n\t\t\treturn <span class={`kol-spin__loader kol-spin__spinner--${variant}__element`}></span>;\n\t\tcase 'none':\n\t\t\treturn <slot name=\"expert\"></slot>;\n\t\tdefault:\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--1 \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--1`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--2 \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--2`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--3 \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--3`}\n\t\t\t\t\t></span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass={`kol-spin__spinner-element \n\t\t\t\t\t\t\tkol-spin__spinner-element--neutral \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element \n\t\t\t\t\t\t\tkol-spin__spinner--${variant}__element--4`}\n\t\t\t\t\t></span>\n\t\t\t\t</>\n\t\t\t);\n\t}\n}\n\nexport const SpinFC: FC<FunctionalComponentProps<SpinApi>> = (props) => {\n\tconst { show, label, variant, showToggled, handleGetTranslateActionRunning, handleGetTranslateActionDone } = props;\n\n\treturn (\n\t\t<Fragment>\n\t\t\t{show ? (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<span class={`kol-spin__spinner kol-spin__spinner--${variant}`}>{renderSpinVariant(variant)}</span>\n\t\t\t\t\t<span aria-busy=\"true\" class=\"visually-hidden\" role=\"alert\">\n\t\t\t\t\t\t{label || handleGetTranslateActionRunning()}\n\t\t\t\t\t</span>\n\t\t\t\t</Fragment>\n\t\t\t) : (\n\t\t\t\tshowToggled && (\n\t\t\t\t\t<span aria-busy=\"false\" class=\"visually-hidden\" role=\"alert\">\n\t\t\t\t\t\t{label || handleGetTranslateActionDone()}\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t)}\n\t\t</Fragment>\n\t);\n};\n","import { labelProp, showProp, variantSpinProp } from '../../props';\nimport type { ApiFromConfig, PropsConfigShape } from '../generic-types';\n\nexport const spinPropsConfig = {\n\toptional: [labelProp, showProp, variantSpinProp],\n} as const satisfies PropsConfigShape;\n\nexport type SpinApi = ApiFromConfig<\n\ttypeof spinPropsConfig,\n\t{\n\t\tStates: {\n\t\t\tshowToggled: boolean;\n\t\t};\n\t\tCallbacks: {\n\t\t\tgetTranslateActionRunning: () => string;\n\t\t\tgetTranslateActionDone: () => string;\n\t\t};\n\t}\n>;\n","import { translate } from '../../../i18n';\nimport { labelProp, showProp, variantSpinProp } from '../../props';\nimport { BaseController } from '../base-controller';\nimport type { ControllerInterface, ResolvedInputProps, StateAccess } from '../generic-types';\nimport type { SpinApi } from './api';\nimport { spinPropsConfig } from './api';\n\nexport class SpinController extends BaseController<SpinApi> implements ControllerInterface<SpinApi> {\n\tprivate readonly translateActionRunning: string = translate('kol-action-running');\n\tprivate readonly translateActionDone: string = translate('kol-action-done');\n\n\tpublic constructor(stateAccess: StateAccess<SpinApi>) {\n\t\tsuper(stateAccess, spinPropsConfig);\n\t}\n\n\tpublic componentWillLoad(props: ResolvedInputProps<SpinApi>): void {\n\t\tconst { show, label, variant } = props;\n\t\tthis.watchShow(show);\n\t\tthis.watchLabel(label);\n\t\tthis.watchVariant(variant);\n\t}\n\n\tpublic watchShow(value?: boolean): void {\n\t\tshowProp.apply(value, (v) => {\n\t\t\tconst previousShow = this.getRenderProp('show');\n\t\t\tthis.setRenderProp('show', v);\n\t\t\t// Emit done state only when the spinner toggles from visible to hidden,\n\t\t\t// so screen readers receive a completion announcement once.\n\t\t\tthis.setState('showToggled', previousShow === true && v === false);\n\t\t});\n\t}\n\n\tpublic watchLabel(value?: string): void {\n\t\tlabelProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('label', v);\n\t\t});\n\t}\n\n\tpublic watchVariant(value?: unknown): void {\n\t\tvariantSpinProp.apply(value, (v) => {\n\t\t\tthis.setRenderProp('variant', v);\n\t\t});\n\t}\n\n\tpublic handleGetTranslateActionRunning = (): string => {\n\t\treturn this.translateActionRunning;\n\t};\n\n\tpublic handleGetTranslateActionDone = (): string => {\n\t\treturn this.translateActionDone;\n\t};\n}\n","@use '../@shared/mixins' as *;\n@use '../@shared/global' as *;\n@use './cycle' as *;\n@use './dot' as *;\n\n@layer kol-component {\n\t.kol-spin {\n\t\t&__spinner {\n\t\t\tdisplay: block;\n\t\t\tposition: relative;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\nimport { BaseWebComponent } from '../../internal/functional-components/base-web-component';\nimport type { WebComponentInterface } from '../../internal/functional-components/generic-types';\nimport type { SpinApi } from '../../internal/functional-components/spin/api';\nimport { SpinFC } from '../../internal/functional-components/spin/component';\nimport { SpinController } from '../../internal/functional-components/spin/controller';\nimport type { SpinVariantType } from '../../internal/props/variant-spin';\n\n@Component({\n\ttag: 'kol-spin',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolSpin extends BaseWebComponent<SpinApi> implements WebComponentInterface<SpinApi> {\n\tprivate readonly ctrl = new SpinController(this.stateAccess);\n\n\t/**\n\t * Makes the element show up.\n\t */\n\t@Prop()\n\tpublic _show?: boolean;\n\n\t@Watch('_show')\n\tpublic watchShow(value?: boolean): void {\n\t\tthis.ctrl.watchShow(value);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop()\n\tpublic _label?: string;\n\n\t@Watch('_label')\n\tpublic watchLabel(value?: string): void {\n\t\tthis.ctrl.watchLabel(value);\n\t}\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop()\n\tpublic _variant?: SpinVariantType;\n\n\t@Watch('_variant')\n\tpublic watchVariant(value?: SpinVariantType): void {\n\t\tthis.ctrl.watchVariant(value);\n\t}\n\n\t@State()\n\tpublic showToggled: boolean = false;\n\n\tpublic componentWillLoad(): void {\n\t\tthis.ctrl.componentWillLoad({\n\t\t\tshow: this._show,\n\t\t\tlabel: this._label,\n\t\t\tvariant: this._variant,\n\t\t});\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<SpinFC\n\t\t\t\t\tshow={this.ctrl.getRenderProp('show')}\n\t\t\t\t\tlabel={this.ctrl.getRenderProp('label')}\n\t\t\t\t\tvariant={this.ctrl.getRenderProp('variant')}\n\t\t\t\t\tshowToggled={this.showToggled}\n\t\t\t\t\thandleGetTranslateActionRunning={this.ctrl.handleGetTranslateActionRunning}\n\t\t\t\t\thandleGetTranslateActionDone={this.ctrl.handleGetTranslateActionDone}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"names":["createPropDefinition","normalizeBoolean","normalizeString","h","Fragment","labelProp","BaseController","translate","BaseWebComponent","Host"],"mappings":";;;;;;;;;;;;;;;;AAwBO,MAAM,QAAQ,GAAGA,gCAAoB,CAAW,MAAM,EAAE,KAAK,EAAEC,4BAAgB,CAAC;;ACEhF,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAU;AAI5D,MAAM,eAAe,GAAGD,gCAAoB,CAClD,SAAS,EACT,KAAK,EACL,CAAC,KAAc,KAAI;AAClB,IAAA,MAAM,GAAG,GAAGE,2BAAe,CAAC,KAAK,CAAC;AAClC,IAAA,IAAI,kBAAkB,CAAC,QAAQ,CAAC,GAAsB,CAAC,EAAE;AACxD,QAAA,OAAO,GAAsB;;AAE9B,IAAA,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,CAAA,CAAE,CAAC;AAChD,CAAC,EACD,MAAM,IAAI,CACV;;ACnCD,SAAS,iBAAiB,CAAC,OAAe,EAAA;IACzC,QAAQ,OAAO;AACd,QAAA,KAAK,OAAO;AACX,YAAA,OAAOC,kBAAM,KAAK,EAAE,CAAA,oCAAA,EAAuC,OAAO,CAAA,SAAA,CAAW,GAAS;AACvF,QAAA,KAAK,MAAM;YACV,OAAOA,OAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,GAAQ;AACnC,QAAA;AACC,YAAA,QACCA,OAAA,CAAAC,cAAA,EAAA,IAAA,EACCD,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;4BACP,OAAO,CAAA,YAAA,CAAc,EACpC,CAAA,EACRA,OAAA,CAAA,MAAA,EAAA,EACC,KAAK,EAAE,CAAA;;4BAEe,OAAO,CAAA;AACP,0BAAA,EAAA,OAAO,CAAc,YAAA,CAAA,EAAA,CACpC,CACN;;AAGP;AAEO,MAAM,MAAM,GAA0C,CAAC,KAAK,KAAI;AACtE,IAAA,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,+BAA+B,EAAE,4BAA4B,EAAE,GAAG,KAAK;IAElH,QACCA,OAAC,CAAAC,cAAQ,EACP,IAAA,EAAA,IAAI,IACJD,OAAA,CAACC,cAAQ,EAAA,IAAA,EACRD,OAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAE,wCAAwC,OAAO,CAAA,CAAE,IAAG,iBAAiB,CAAC,OAAO,CAAC,CAAQ,EACnGA,OAAgB,CAAA,MAAA,EAAA,EAAA,WAAA,EAAA,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,EAAA,EACzD,KAAK,IAAI,+BAA+B,EAAE,CACrC,CACG,KAEX,WAAW,KACVA,OAAA,CAAA,MAAA,EAAA,EAAA,WAAA,EAAgB,OAAO,EAAC,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,OAAO,IAC1D,KAAK,IAAI,4BAA4B,EAAE,CAClC,CACP,CACD,CACS;AAEb,CAAC;;AC9DM,MAAM,eAAe,GAAG;AAC9B,IAAA,QAAQ,EAAE,CAACE,eAAS,EAAE,QAAQ,EAAE,eAAe,CAAC;CACZ;;ACE/B,MAAO,cAAe,SAAQC,6BAAuB,CAAA;AAI1D,IAAA,WAAA,CAAmB,WAAiC,EAAA;AACnD,QAAA,KAAK,CAAC,WAAW,EAAE,eAAe,CAAC;AAJnB,QAAA,IAAA,CAAA,sBAAsB,GAAWC,cAAS,CAAC,oBAAoB,CAAC;AAChE,QAAA,IAAA,CAAA,mBAAmB,GAAWA,cAAS,CAAC,iBAAiB,CAAC;AAmCpE,QAAA,IAA+B,CAAA,+BAAA,GAAG,MAAa;YACrD,OAAO,IAAI,CAAC,sBAAsB;AACnC,SAAC;AAEM,QAAA,IAA4B,CAAA,4BAAA,GAAG,MAAa;YAClD,OAAO,IAAI,CAAC,mBAAmB;AAChC,SAAC;;AAnCM,IAAA,iBAAiB,CAAC,KAAkC,EAAA;QAC1D,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK;AACtC,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;AACpB,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;AACtB,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;;AAGpB,IAAA,SAAS,CAAC,KAAe,EAAA;QAC/B,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAI;YAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;AAC/C,YAAA,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AAG7B,YAAA,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,YAAY,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC;AACnE,SAAC,CAAC;;AAGI,IAAA,UAAU,CAAC,KAAc,EAAA;QAC/BF,eAAS,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAI;AAC5B,YAAA,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC;AAC/B,SAAC,CAAC;;AAGI,IAAA,YAAY,CAAC,KAAe,EAAA;QAClC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAI;AAClC,YAAA,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC;AACjC,SAAC,CAAC;;AAUH;;ACnDD,MAAM,eAAe,GAAG,soTAAsoT;;MCgBjpT,OAAQ,GAAA,cAAQG,6BAAyB,CAAA;;;;QACpC,IAAI,CAAA,IAAA,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;AAoCrD,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;;AA3B5B,IAAA,SAAS,CAAC,KAAe,EAAA;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AAUpB,IAAA,UAAU,CAAC,KAAc,EAAA;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;;AAUrB,IAAA,YAAY,CAAC,KAAuB,EAAA;AAC1C,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;;IAMvB,iBAAiB,GAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAC3B,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,IAAI,CAAC,QAAQ;AACtB,SAAA,CAAC;;IAGI,MAAM,GAAA;AACZ,QAAA,QACCL,QAACM,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACJN,OAAC,CAAA,MAAM,EACN,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EACvC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,EAC3C,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,+BAA+B,EAAE,IAAI,CAAC,IAAI,CAAC,+BAA+B,EAC1E,4BAA4B,EAAE,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAA,CACnE,CACI;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-_pfZrL6V.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-DevJo9yF.js"),clsx=require("./clsx-Bm_HQUnh.js"),elementClick=require("./element-click-BNHh6n4d.js"),elementFocus=require("./element-focus-r03qIEIv.js");require("./common-CyOOsddt.js"),require("./i18n-CgUN6lev.js");const defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1777380988243"); /* IE9*/\n src: url("kolicons.eot?t=1777380988243#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1777380988243") format("woff2"), url("kolicons.woff?t=1777380988243") format("woff"), url("kolicons.ttf?t=1777380988243") format("truetype"), url("kolicons.svg?t=1777380988243#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-split-button {\n display: flex;\n position: relative;\n width: 100%;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n width: 100%;\n align-items: stretch;\n }\n .kol-split-button__button {\n min-width: 0;\n flex: 1 1 auto;\n text-align: left;\n }\n}',KolSplitButton=class{constructor(n){index.registerInstance(this,n),this.setPrimaryButtonWcRef=n=>{this.primaryButtonWcRef=n},this.setPopoverButtonRef=n=>{this.popoverButtonRef=n},this.clickButtonHandler={onClick:n=>{var e,t;n.stopPropagation(),"function"==typeof(null===(e=this._on)||void 0===e?void 0:e.onClick)&&(null===(t=this._on)||void 0===t||t.onClick(n,this._value))}},this._disabled=!1,this._hideLabel=!1,this._tooltipAlign="top",this._type="button",this._variant="normal",this.state={_show:!1}}async getValue(){return this._value}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.primaryButtonWcRef))}async click(){return elementClick.delegateClick(this.host,async()=>elementClick.setClick(this.primaryButtonWcRef))}render(){return index.h("div",{key:"823c589959ccb682aaee982e981581ae3a6e2655",class:"kol-split-button"},index.h("div",{key:"e8cd346586100ccf09af0849da4882deb0fa8580",class:"kol-split-button__root"},index.h(componentNames.KolButtonWcTag,{key:"577a933a86e64f65bdbbf47d1ac4acc04ff57fa3",class:clsx.clsx("kol-split-button__button",{[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0}),ref:this.setPrimaryButtonWcRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant}),index.h("div",{key:"58b4fa1b7ddae9cad45bc979f4e4daec0c1a5d4b",class:"kol-split-button__horizontal-line"}),index.h(componentNames.KolPopoverButtonWcTag,{key:"dcef434b69f688a769d9fb989acd91f4e84c7a98",class:"kol-split-button__secondary-button",ref:this.setPopoverButtonRef,_disabled:this._disabled,_hideLabel:!0,_icons:"kolicon-chevron-down",_label:i18n.translate("kol-split-button-dropdown-label-open"),_popoverAlign:"bottom"},index.h("slot",{key:"baceb2e9f4e90c8fbdbd2b8f4314280895c6e27d"}))))}connectedCallback(){this.state=Object.assign(Object.assign({},this.state),{_show:!1})}async closePopup(){var n;return null===(n=this.popoverButtonRef)||void 0===n||n.hidePopover(),Promise.resolve()}get host(){return index.getElement(this)}};KolSplitButton.style={default:defaultStyleCss},exports.kol_split_button=KolSplitButton;
|
|
4
|
+
"use strict";var index=require("./index-CobjNfgo.js"),componentNames=require("./component-names-5KS_pYRF.js"),i18n=require("./i18n-DevJo9yF.js"),clsx=require("./clsx-Bm_HQUnh.js"),elementClick=require("./element-click-BNHh6n4d.js"),elementFocus=require("./element-focus-r03qIEIv.js");require("./common-CyOOsddt.js"),require("./i18n-CgUN6lev.js");const defaultStyleCss='/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: white;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n .hastooltip {\n z-index: 900 !important;\n }\n}\n@font-face {\n font-family: "kolicons";\n src: url("kolicons.eot?t=1778148144850"); /* IE9*/\n src: url("kolicons.eot?t=1778148144850#iefix") format("embedded-opentype"), url("kolicons.woff2?t=1778148144850") format("woff2"), url("kolicons.woff?t=1778148144850") format("woff"), url("kolicons.ttf?t=1778148144850") format("truetype"), url("kolicons.svg?t=1778148144850#kolicons") format("svg"); /* iOS 4.1- */\n}\n@layer kol-component {\n [class^=kolicon-], [class*=" kolicon-"] {\n font-family: "kolicons";\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n .kolicon-alert-error::before {\n content: "\\ea01";\n }\n .kolicon-alert-info::before {\n content: "\\ea02";\n }\n .kolicon-alert-success::before {\n content: "\\ea03";\n }\n .kolicon-alert-warning::before {\n content: "\\ea04";\n }\n .kolicon-check::before {\n content: "\\ea05";\n }\n .kolicon-chevron-double-left::before {\n content: "\\ea06";\n }\n .kolicon-chevron-double-right::before {\n content: "\\ea07";\n }\n .kolicon-chevron-down::before {\n content: "\\ea08";\n }\n .kolicon-chevron-left::before {\n content: "\\ea09";\n }\n .kolicon-chevron-right::before {\n content: "\\ea0a";\n }\n .kolicon-chevron-up::before {\n content: "\\ea0b";\n }\n .kolicon-cogwheel::before {\n content: "\\ea0c";\n }\n .kolicon-cross::before {\n content: "\\ea0d";\n }\n .kolicon-eye-closed::before {\n content: "\\ea0e";\n }\n .kolicon-eye::before {\n content: "\\ea0f";\n }\n .kolicon-house::before {\n content: "\\ea10";\n }\n .kolicon-kolibri::before {\n content: "\\ea11";\n }\n .kolicon-link-external::before {\n content: "\\ea12";\n }\n .kolicon-link::before {\n content: "\\ea13";\n }\n .kolicon-minus::before {\n content: "\\ea14";\n }\n .kolicon-plus::before {\n content: "\\ea15";\n }\n .kolicon-settings::before {\n content: "\\ea16";\n }\n .kolicon-sort-asc::before {\n content: "\\ea17";\n }\n .kolicon-sort-desc::before {\n content: "\\ea18";\n }\n .kolicon-sort-neutral::before {\n content: "\\ea19";\n }\n .kolicon-up::before {\n content: "\\ea1a";\n }\n .kolicon-version::before {\n content: "\\ea1b";\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: black;\n background-color: white;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: black;\n background-color: white;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-icon {\n color: inherit;\n display: inline-block;\n font-size: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-popover-button--inline .kol-popover-button__button {\n display: inline;\n }\n .kol-popover {\n opacity: 0;\n transition: 0.2s ease-out opacity;\n }\n .kol-popover-button--open + .kol-popover {\n opacity: 1;\n }\n .kol-split-button {\n display: flex;\n position: relative;\n width: 100%;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n width: 100%;\n align-items: stretch;\n }\n .kol-split-button__button {\n min-width: 0;\n flex: 1 1 auto;\n text-align: left;\n }\n}',KolSplitButton=class{constructor(n){index.registerInstance(this,n),this.setPrimaryButtonWcRef=n=>{this.primaryButtonWcRef=n},this.setPopoverButtonRef=n=>{this.popoverButtonRef=n},this.clickButtonHandler={onClick:n=>{var e,t;n.stopPropagation(),"function"==typeof(null===(e=this._on)||void 0===e?void 0:e.onClick)&&(null===(t=this._on)||void 0===t||t.onClick(n,this._value))}},this._disabled=!1,this._hideLabel=!1,this._tooltipAlign="top",this._type="button",this._variant="normal",this.state={_show:!1}}async getValue(){return this._value}async focus(){return elementFocus.delegateFocus(this.host,()=>elementFocus.setFocus(this.primaryButtonWcRef))}async click(){return elementClick.delegateClick(this.host,async()=>elementClick.setClick(this.primaryButtonWcRef))}render(){return index.h("div",{key:"823c589959ccb682aaee982e981581ae3a6e2655",class:"kol-split-button"},index.h("div",{key:"e8cd346586100ccf09af0849da4882deb0fa8580",class:"kol-split-button__root"},index.h(componentNames.KolButtonWcTag,{key:"577a933a86e64f65bdbbf47d1ac4acc04ff57fa3",class:clsx.clsx("kol-split-button__button",{[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0}),ref:this.setPrimaryButtonWcRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant}),index.h("div",{key:"58b4fa1b7ddae9cad45bc979f4e4daec0c1a5d4b",class:"kol-split-button__horizontal-line"}),index.h(componentNames.KolPopoverButtonWcTag,{key:"dcef434b69f688a769d9fb989acd91f4e84c7a98",class:"kol-split-button__secondary-button",ref:this.setPopoverButtonRef,_disabled:this._disabled,_hideLabel:!0,_icons:"kolicon-chevron-down",_label:i18n.translate("kol-split-button-dropdown-label-open"),_popoverAlign:"bottom"},index.h("slot",{key:"baceb2e9f4e90c8fbdbd2b8f4314280895c6e27d"}))))}connectedCallback(){this.state=Object.assign(Object.assign({},this.state),{_show:!1})}async closePopup(){var n;return null===(n=this.popoverButtonRef)||void 0===n||n.hidePopover(),Promise.resolve()}get host(){return index.getElement(this)}};KolSplitButton.style={default:defaultStyleCss},exports.kol_split_button=KolSplitButton;
|