@public-ui/components 4.0.1-rc.0 → 4.0.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/kolicons/kolicons.eot +0 -0
- package/assets/kolicons/kolicons.ttf +0 -0
- package/assets/kolicons/kolicons.woff +0 -0
- package/assets/kolicons/kolicons.woff2 +0 -0
- package/assets/kolicons/style.css +6 -6
- package/custom-elements.json +1 -1
- package/dist/cjs/{Alert-C_toCcAY.js → Alert-DU5TC4Po.js} +1 -1
- package/dist/cjs/{Alert-C_toCcAY.js.map → Alert-DU5TC4Po.js.map} +1 -1
- package/dist/cjs/{Collapsible-DdDjDYXx.js → Collapsible-Ptm9pgqy.js} +1 -1
- package/dist/cjs/{Collapsible-DdDjDYXx.js.map → Collapsible-Ptm9pgqy.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-xdlB6uOa.js → CustomSuggestionsOptionsGroup-BLMBDFD7.js} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-xdlB6uOa.js.map → CustomSuggestionsOptionsGroup-BLMBDFD7.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-Cq8KREzq.js → FieldControlStateWrapper-B86r6Re8.js} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-Cq8KREzq.js.map → FieldControlStateWrapper-B86r6Re8.js.map} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-PzXd257V.js → FormFieldStateWrapper-DbJiT7Lv.js} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-PzXd257V.js.map → FormFieldStateWrapper-DbJiT7Lv.js.map} +1 -1
- package/dist/cjs/{Heading-Ct629VSV.js → Heading-Dq03eXDq.js} +1 -1
- package/dist/cjs/{Heading-Ct629VSV.js.map → Heading-Dq03eXDq.js.map} +1 -1
- package/dist/cjs/Icon-BY8TN0HE.js +4 -0
- package/dist/cjs/{Icon-D3O-nuZE.js.map → Icon-BY8TN0HE.js.map} +1 -1
- package/dist/cjs/{Input-CnqY86fi.js → Input-Ck_9GTY9.js} +1 -1
- package/dist/cjs/{Input-CnqY86fi.js.map → Input-Ck_9GTY9.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-Dov5YeAV.js → InputStateWrapper-Bwm0ml0k.js} +1 -1
- package/dist/cjs/{InputStateWrapper-Dov5YeAV.js.map → InputStateWrapper-Bwm0ml0k.js.map} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-Cx-8jAnS.js → InternalUnderlinedBadgeText-pDQV9cBa.js} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-Cx-8jAnS.js.map → InternalUnderlinedBadgeText-pDQV9cBa.js.map} +1 -1
- package/dist/cjs/{Span-D9qjKLIy.js → Span-zoGPjzeL.js} +1 -1
- package/dist/cjs/{Span-D9qjKLIy.js.map → Span-zoGPjzeL.js.map} +1 -1
- package/dist/cjs/{app-globals-DX-idE6R.js → app-globals-E7rDdaKi.js} +1 -1
- package/dist/cjs/{app-globals-DX-idE6R.js.map → app-globals-E7rDdaKi.js.map} +1 -1
- package/dist/cjs/{controller-w3zGDUA1.js → controller-BKZ0o0VE.js} +1 -1
- package/dist/cjs/{controller-w3zGDUA1.js.map → controller-BKZ0o0VE.js.map} +1 -1
- package/dist/cjs/{controller-uTaKo5Vi.js → controller-BqkO6HcP.js} +1 -1
- package/dist/cjs/{controller-uTaKo5Vi.js.map → controller-BqkO6HcP.js.map} +1 -1
- package/dist/cjs/{controller-AAEQlkq_.js → controller-CdlwJw6A.js} +1 -1
- package/dist/cjs/{controller-AAEQlkq_.js.map → controller-CdlwJw6A.js.map} +1 -1
- package/dist/cjs/{controller-icon-BN3yRJrD.js → controller-icon-BdGVy6bT.js} +1 -1
- package/dist/cjs/{controller-icon-BN3yRJrD.js.map → controller-icon-BdGVy6bT.js.map} +1 -1
- package/dist/cjs/{dev.utils-DtEvAxs9.js → dev.utils-BAd0-jui.js} +1 -1
- package/dist/cjs/{dev.utils-DtEvAxs9.js.map → dev.utils-BAd0-jui.js.map} +1 -1
- package/dist/cjs/{devtools-BFKSZE8m.js → devtools-Cl6qYO3d.js} +1 -1
- package/dist/cjs/{devtools-BFKSZE8m.js.map → devtools-Cl6qYO3d.js.map} +1 -1
- package/dist/cjs/{index-BN1jbg4z.js → index-Cfg0voc2.js} +1 -1
- package/dist/cjs/{index-BN1jbg4z.js.map → index-Cfg0voc2.js.map} +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +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-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js +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.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.entry.cjs.js.map +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.cjs.entry.js +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js +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-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +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-color.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.entry.cjs.js.map +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-input-text.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +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-modal.cjs.entry.js +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.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.entry.cjs.js.map +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-popover-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-select-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-single-select.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +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-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.entry.cjs.js.map +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-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-combobox.js.map +1 -1
- package/dist/components/kol-icon.js +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-color.js.map +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-date.js.map +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-email.js.map +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-file.js.map +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-number.js.map +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-password.js.map +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-input-text.js.map +1 -1
- package/dist/components/kol-pagination.js +1 -1
- package/dist/components/kol-pagination.js.map +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-select.js.map +1 -1
- package/dist/components/kol-single-select.js +1 -1
- package/dist/components/kol-single-select.js.map +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-textarea.js +1 -1
- package/dist/components/kol-textarea.js.map +1 -1
- package/dist/esm/{Alert-DPypTbnj.js → Alert-CQ_GJc9Z.js} +1 -1
- package/dist/{kolibri/Alert-DPypTbnj.js.map → esm/Alert-CQ_GJc9Z.js.map} +1 -1
- package/dist/esm/{Collapsible-WQLDaBa_.js → Collapsible-D8iEYBtG.js} +1 -1
- package/dist/esm/{Collapsible-WQLDaBa_.js.map → Collapsible-D8iEYBtG.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-CrW50rCL.js → CustomSuggestionsOptionsGroup-Gmk66XOi.js} +1 -1
- package/dist/{kolibri/CustomSuggestionsOptionsGroup-CrW50rCL.js.map → esm/CustomSuggestionsOptionsGroup-Gmk66XOi.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-B6pvF_wm.js → FieldControlStateWrapper-Bnw-OYS8.js} +1 -1
- package/dist/{kolibri/FieldControlStateWrapper-B6pvF_wm.js.map → esm/FieldControlStateWrapper-Bnw-OYS8.js.map} +1 -1
- package/dist/esm/{FormFieldStateWrapper-MGp6AfXi.js → FormFieldStateWrapper-D_aUwxXi.js} +1 -1
- package/dist/esm/{FormFieldStateWrapper-MGp6AfXi.js.map → FormFieldStateWrapper-D_aUwxXi.js.map} +1 -1
- package/dist/esm/{Heading-Cv4P3nNi.js → Heading-DZVP6zXi.js} +1 -1
- package/dist/esm/{Heading-Cv4P3nNi.js.map → Heading-DZVP6zXi.js.map} +1 -1
- package/dist/esm/Icon-BSA26eyB.js +4 -0
- package/dist/esm/{Icon-CyIigrVK.js.map → Icon-BSA26eyB.js.map} +1 -1
- package/dist/esm/{Input-C_jKEQBf.js → Input-C8Ii27kQ.js} +1 -1
- package/dist/esm/{Input-C_jKEQBf.js.map → Input-C8Ii27kQ.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-CfzJCTCa.js → InputStateWrapper-DoR7ip4H.js} +1 -1
- package/dist/esm/{InputStateWrapper-CfzJCTCa.js.map → InputStateWrapper-DoR7ip4H.js.map} +1 -1
- package/dist/esm/InternalUnderlinedBadgeText-D3cO4EMH.js +4 -0
- package/dist/esm/{InternalUnderlinedBadgeText-DzxAa9aS.js.map → InternalUnderlinedBadgeText-D3cO4EMH.js.map} +1 -1
- package/dist/esm/{Span-CKSeUsmf.js → Span-BVzSEjzF.js} +1 -1
- package/dist/esm/{Span-CKSeUsmf.js.map → Span-BVzSEjzF.js.map} +1 -1
- package/dist/esm/{app-globals-ClTI-GnE.js → app-globals-Cqzh92pj.js} +1 -1
- package/dist/esm/{app-globals-ClTI-GnE.js.map → app-globals-Cqzh92pj.js.map} +1 -1
- package/dist/esm/{controller-w_F_JaXN.js → controller-CIYXgLCU.js} +1 -1
- package/dist/esm/{controller-w_F_JaXN.js.map → controller-CIYXgLCU.js.map} +1 -1
- package/dist/esm/{controller-DN9xpdR9.js → controller-CVWq91Jy.js} +1 -1
- package/dist/esm/{controller-DN9xpdR9.js.map → controller-CVWq91Jy.js.map} +1 -1
- package/dist/esm/{controller-G1vPc5NQ.js → controller-DaR5WmMr.js} +1 -1
- package/dist/esm/{controller-G1vPc5NQ.js.map → controller-DaR5WmMr.js.map} +1 -1
- package/dist/esm/{controller-icon-CGtdyUoC.js → controller-icon-BIEa5J_H.js} +1 -1
- package/dist/esm/{controller-icon-CGtdyUoC.js.map → controller-icon-BIEa5J_H.js.map} +1 -1
- package/dist/esm/{dev.utils-DmS6gtOI.js → dev.utils-DIHEE-25.js} +1 -1
- package/dist/esm/{dev.utils-DmS6gtOI.js.map → dev.utils-DIHEE-25.js.map} +1 -1
- package/dist/esm/{devtools-CnAEuwzH.js → devtools-L_mckxzM.js} +1 -1
- package/dist/{kolibri/devtools-CnAEuwzH.js.map → esm/devtools-L_mckxzM.js.map} +1 -1
- package/dist/esm/{index-CuUGQ2WZ.js → index-Zs2j78jP.js} +1 -1
- package/dist/esm/{index-CuUGQ2WZ.js.map → index-Zs2j78jP.js.map} +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +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-wc.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js +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.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js.map +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.entry.js +1 -1
- package/dist/esm/kol-drawer.entry.js +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +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-color.entry.js.map +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js.map +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js.map +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js.map +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js.map +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js.map +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-input-text.entry.js.map +1 -1
- package/dist/esm/kol-kolibri.entry.js +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-modal.entry.js +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.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js.map +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-popover-wc.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-select-wc.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-select.entry.js.map +1 -1
- package/dist/esm/kol-single-select.entry.js +1 -1
- package/dist/esm/kol-single-select.entry.js.map +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +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-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js.map +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-wc.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/{Alert-DPypTbnj.js → Alert-CQ_GJc9Z.js} +1 -1
- package/dist/{esm/Alert-DPypTbnj.js.map → kolibri/Alert-CQ_GJc9Z.js.map} +1 -1
- package/dist/kolibri/Collapsible-D8iEYBtG.js +4 -0
- package/dist/kolibri/{Collapsible-WQLDaBa_.js.map → Collapsible-D8iEYBtG.js.map} +1 -1
- package/dist/kolibri/{CustomSuggestionsOptionsGroup-CrW50rCL.js → CustomSuggestionsOptionsGroup-Gmk66XOi.js} +1 -1
- package/dist/{esm/CustomSuggestionsOptionsGroup-CrW50rCL.js.map → kolibri/CustomSuggestionsOptionsGroup-Gmk66XOi.js.map} +1 -1
- package/dist/kolibri/FieldControlStateWrapper-Bnw-OYS8.js +4 -0
- package/dist/{esm/FieldControlStateWrapper-B6pvF_wm.js.map → kolibri/FieldControlStateWrapper-Bnw-OYS8.js.map} +1 -1
- package/dist/kolibri/{FormFieldStateWrapper-MGp6AfXi.js → FormFieldStateWrapper-D_aUwxXi.js} +1 -1
- package/dist/kolibri/{FormFieldStateWrapper-MGp6AfXi.js.map → FormFieldStateWrapper-D_aUwxXi.js.map} +1 -1
- package/dist/kolibri/{Heading-Cv4P3nNi.js → Heading-DZVP6zXi.js} +1 -1
- package/dist/kolibri/{Heading-Cv4P3nNi.js.map → Heading-DZVP6zXi.js.map} +1 -1
- package/dist/kolibri/{Icon-CyIigrVK.js → Icon-BSA26eyB.js} +1 -1
- package/dist/kolibri/{Icon-CyIigrVK.js.map → Icon-BSA26eyB.js.map} +1 -1
- package/dist/kolibri/{Input-C_jKEQBf.js → Input-C8Ii27kQ.js} +1 -1
- package/dist/kolibri/{Input-C_jKEQBf.js.map → Input-C8Ii27kQ.js.map} +1 -1
- package/dist/kolibri/{InputStateWrapper-CfzJCTCa.js → InputStateWrapper-DoR7ip4H.js} +1 -1
- package/dist/kolibri/{InputStateWrapper-CfzJCTCa.js.map → InputStateWrapper-DoR7ip4H.js.map} +1 -1
- package/dist/kolibri/InternalUnderlinedBadgeText-D3cO4EMH.js +4 -0
- package/dist/kolibri/{InternalUnderlinedBadgeText-DzxAa9aS.js.map → InternalUnderlinedBadgeText-D3cO4EMH.js.map} +1 -1
- package/dist/kolibri/Span-BVzSEjzF.js +4 -0
- package/dist/kolibri/{Span-CKSeUsmf.js.map → Span-BVzSEjzF.js.map} +1 -1
- package/dist/kolibri/app-globals-Cqzh92pj.js +4 -0
- package/dist/kolibri/{app-globals-ClTI-GnE.js.map → app-globals-Cqzh92pj.js.map} +1 -1
- package/dist/kolibri/{controller-w_F_JaXN.js → controller-CIYXgLCU.js} +1 -1
- package/dist/kolibri/{controller-w_F_JaXN.js.map → controller-CIYXgLCU.js.map} +1 -1
- package/dist/kolibri/{controller-DN9xpdR9.js → controller-CVWq91Jy.js} +1 -1
- package/dist/kolibri/{controller-DN9xpdR9.js.map → controller-CVWq91Jy.js.map} +1 -1
- package/dist/kolibri/{controller-G1vPc5NQ.js → controller-DaR5WmMr.js} +1 -1
- package/dist/kolibri/{controller-G1vPc5NQ.js.map → controller-DaR5WmMr.js.map} +1 -1
- package/dist/kolibri/{controller-icon-CGtdyUoC.js → controller-icon-BIEa5J_H.js} +1 -1
- package/dist/kolibri/{controller-icon-CGtdyUoC.js.map → controller-icon-BIEa5J_H.js.map} +1 -1
- package/dist/kolibri/{dev.utils-DmS6gtOI.js → dev.utils-DIHEE-25.js} +1 -1
- package/dist/kolibri/{dev.utils-DmS6gtOI.js.map → dev.utils-DIHEE-25.js.map} +1 -1
- package/dist/kolibri/{devtools-CnAEuwzH.js → devtools-L_mckxzM.js} +1 -1
- package/dist/{esm/devtools-CnAEuwzH.js.map → kolibri/devtools-L_mckxzM.js.map} +1 -1
- package/dist/kolibri/{index-CuUGQ2WZ.js → index-Zs2j78jP.js} +1 -1
- package/dist/kolibri/{index-CuUGQ2WZ.js.map → index-Zs2j78jP.js.map} +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js.map +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-dialog-wc.entry.js +1 -1
- package/dist/kolibri/kol-dialog.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.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.esm.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js.map +1 -1
- package/dist/kolibri/kol-input-date.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js.map +1 -1
- package/dist/kolibri/kol-input-file.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js.map +1 -1
- package/dist/kolibri/kol-input-password.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js.map +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.esm.js.map +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js.map +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js.map +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-popover-wc.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select-wc.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js.map +1 -1
- package/dist/kolibri/kol-single-select.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-single-select.entry.js.map +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.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.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.esm.js.map +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.js +1 -1
- package/dist/kolibri/kol-tree-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/Icon-D3O-nuZE.js +0 -4
- package/dist/esm/Icon-CyIigrVK.js +0 -4
- package/dist/esm/InternalUnderlinedBadgeText-DzxAa9aS.js +0 -4
- package/dist/kolibri/Collapsible-WQLDaBa_.js +0 -4
- package/dist/kolibri/FieldControlStateWrapper-B6pvF_wm.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-DzxAa9aS.js +0 -4
- package/dist/kolibri/Span-CKSeUsmf.js +0 -4
- package/dist/kolibri/app-globals-ClTI-GnE.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as e,F as n,g as r}from"./index-CuUGQ2WZ.js";import{c as i}from"./clsx-eK3rPvPS.js";import{e as o,a,d as l,x as s}from"./component-names-B_kYyA8u.js";import{t as c}from"./i18n-CvQhdUrE.js";import{O as u,o as f,p as d,w as h,s as v}from"./common-BXXICkFX.js";import{b,v as _,a as p,e as y,c as k}from"./table-selection-C4VgH6EI.js";import{v as j}from"./label-Dkj9sxQK.js";import{C as m}from"./keyboard-DNd73LVa.js";import{n as g}from"./dev.utils-DmS6gtOI.js";import{d as w,K as S}from"./events-DHTi_wtD.js";import{i as A,c as O,r as $,a as D,f as x,b as C,S as M}from"./isObject-DvSELytj.js";import"./i18n-B0tfVPMa.js";const F=(e,t)=>{u(t,()=>{f(t,()=>{try{t=d(t)}catch(e){}h(e,"_headerCells",e=>{var t,r;return"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&[...null!==(t=e.horizontal)&&void 0!==t?t:[],...null!==(r=e.vertical)&&void 0!==r?r:[]].flat().every(e=>void 0===e.width||"number"==typeof e.width)&&!0},new Set(["TableHeaderCellsPropType"]),t)})})};var H="[object AsyncFunction]",E="[object Function]",K="[object GeneratorFunction]",P="[object Proxy]";function W(e){if(!A(e))return!1;var t=O(e);return t==E||t==K||t==H||t==P}var R=$["__core-js_shared__"],I=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function T(e){return!!I&&I in e}var B=Function.prototype,U=B.toString;function z(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var L=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,N=Function.prototype,Q=Object.prototype,X=N.toString,G=Q.hasOwnProperty,q=RegExp("^"+X.call(G).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y(e){return!(!A(e)||T(e))&&(W(e)?q:V).test(z(e))}function Z(e,t){return null==e?void 0:e[t]}function J(e,t){var r=Z(e,t);return Y(r)?r:void 0}var tt=J($,"WeakMap"),et=9007199254740991,nt=/^(?:0|[1-9]\d*)$/;function rt(e,t){var r=typeof e;return!!(t=null==t?et:t)&&("number"==r||"symbol"!=r&&nt.test(e))&&e>-1&&e%1==0&&e<t}function it(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function at(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function lt(e){return null!=e&&at(e.length)&&!W(e)}var st=Object.prototype;function ct(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function ut(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ft="[object Arguments]";function dt(e){return D(e)&&O(e)==ft}var ht=Object.prototype,vt=ht.hasOwnProperty,bt=ht.propertyIsEnumerable,_t=dt(function(){return arguments}())?dt:function(e){return D(e)&&vt.call(e,"callee")&&!bt.call(e,"callee")};function pt(){return!1}var yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,kt=yt&&"object"==typeof module&&module&&!module.nodeType&&module,jt=kt&&kt.exports===yt,mt=jt?$.Buffer:void 0,gt=mt?mt.isBuffer:void 0,wt=gt||pt,St="[object Arguments]",At="[object Array]",Ot="[object Boolean]",$t="[object Date]",Dt="[object Error]",xt="[object Function]",Ct="[object Map]",Mt="[object Number]",Ft="[object Object]",Ht="[object RegExp]",Et="[object Set]",Kt="[object String]",Pt="[object WeakMap]",Wt="[object ArrayBuffer]",Rt="[object DataView]",It="[object Float32Array]",Tt="[object Float64Array]",Bt="[object Int8Array]",Ut="[object Int16Array]",zt="[object Int32Array]",Lt="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Qt="[object Uint32Array]",Xt={};function Gt(e){return D(e)&&at(e.length)&&!!Xt[O(e)]}function qt(e){return function(t){return e(t)}}Xt[It]=Xt[Tt]=Xt[Bt]=Xt[Ut]=Xt[zt]=Xt[Lt]=Xt[Vt]=Xt[Nt]=Xt[Qt]=!0,Xt[St]=Xt[At]=Xt[Wt]=Xt[Ot]=Xt[Rt]=Xt[$t]=Xt[Dt]=Xt[xt]=Xt[Ct]=Xt[Mt]=Xt[Ft]=Xt[Ht]=Xt[Et]=Xt[Kt]=Xt[Pt]=!1;var Yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zt=Yt&&"object"==typeof module&&module&&!module.nodeType&&module,Jt=Zt&&Zt.exports===Yt,te=Jt&&x.process,ee=function(){try{var e=Zt&&Zt.require&&Zt.require("util").types;return e||te&&te.binding&&te.binding("util")}catch(e){}}(),ne=ee&&ee.isTypedArray,re=ne?qt(ne):Gt,ie=Object.prototype,oe=ie.hasOwnProperty;function ae(e,t){var r=C(e),n=!r&&_t(e),a=!r&&!n&&wt(e),o=!r&&!n&&!a&&re(e),i=r||n||a||o,l=i?ut(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||i&&("length"==c||a&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function le(e,t){return function(r){return e(t(r))}}var se=le(Object.keys,Object),ce=Object.prototype,ue=ce.hasOwnProperty;function fe(e){if(!ct(e))return se(e);var t=[];for(var r in Object(e))ue.call(e,r)&&"constructor"!=r&&t.push(r);return t}function de(e){return lt(e)?ae(e):fe(e)}var he=J(Object,"create");function ve(){this.__data__=he?he(null):{},this.size=0}function be(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _e="__lodash_hash_undefined__",pe=Object.prototype,ye=pe.hasOwnProperty;function ke(e){var t=this.__data__;if(he){var r=t[e];return r===_e?void 0:r}return ye.call(t,e)?t[e]:void 0}var je=Object.prototype,me=je.hasOwnProperty;function ge(e){var t=this.__data__;return he?void 0!==t[e]:me.call(t,e)}var we="__lodash_hash_undefined__";function Se(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=he&&void 0===t?we:t,this}function Ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(){this.__data__=[],this.size=0}function $e(e,t){for(var r=e.length;r--;)if(it(e[r][0],t))return r;return-1}Ae.prototype.clear=ve,Ae.prototype.delete=be,Ae.prototype.get=ke,Ae.prototype.has=ge,Ae.prototype.set=Se;var De=Array.prototype,xe=De.splice;function Ce(e){var t=this.__data__,r=$e(t,e);return!(r<0)&&(r==t.length-1?t.pop():xe.call(t,r,1),--this.size,!0)}function Me(e){var t=this.__data__,r=$e(t,e);return r<0?void 0:t[r][1]}function Fe(e){return $e(this.__data__,e)>-1}function He(e,t){var r=this.__data__,n=$e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ee.prototype.clear=Oe,Ee.prototype.delete=Ce,Ee.prototype.get=Me,Ee.prototype.has=Fe,Ee.prototype.set=He;var Ke=J($,"Map");function Pe(){this.size=0,this.__data__={hash:new Ae,map:new(Ke||Ee),string:new Ae}}function We(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function Re(e,t){var r=e.__data__;return We(t)?r["string"==typeof t?"string":"hash"]:r.map}function Ie(e){var t=Re(this,e).delete(e);return this.size-=t?1:0,t}function Te(e){return Re(this,e).get(e)}function Be(e){return Re(this,e).has(e)}function Ue(e,t){var r=Re(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ze(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Le(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Ve(){this.__data__=new Ee,this.size=0}function Ne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Qe(e){return this.__data__.get(e)}function Xe(e){return this.__data__.has(e)}ze.prototype.clear=Pe,ze.prototype.delete=Ie,ze.prototype.get=Te,ze.prototype.has=Be,ze.prototype.set=Ue;var Ge=200;function qe(e,t){var r=this.__data__;if(r instanceof Ee){var n=r.__data__;if(!Ke||n.length<Ge-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ze(n)}return r.set(e,t),this.size=r.size,this}function Ye(e){var t=this.__data__=new Ee(e);this.size=t.size}function Ze(e,t){for(var r=-1,n=null==e?0:e.length,a=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[a++]=i)}return o}function Je(){return[]}Ye.prototype.clear=Ve,Ye.prototype.delete=Ne,Ye.prototype.get=Qe,Ye.prototype.has=Xe,Ye.prototype.set=qe;var tn=Object.prototype,en=tn.propertyIsEnumerable,nn=Object.getOwnPropertySymbols,rn=nn?function(e){return null==e?[]:(e=Object(e),Ze(nn(e),function(t){return en.call(e,t)}))}:Je;function on(e,t,r){var n=t(e);return C(e)?n:Le(n,r(e))}function an(e){return on(e,de,rn)}var ln=J($,"DataView"),sn=J($,"Promise"),cn=J($,"Set"),un="[object Map]",fn="[object Object]",dn="[object Promise]",hn="[object Set]",vn="[object WeakMap]",bn="[object DataView]",_n=z(ln),pn=z(Ke),yn=z(sn),kn=z(cn),jn=z(tt),mn=O;(ln&&mn(new ln(new ArrayBuffer(1)))!=bn||Ke&&mn(new Ke)!=un||sn&&mn(sn.resolve())!=dn||cn&&mn(new cn)!=hn||tt&&mn(new tt)!=vn)&&(mn=function(e){var t=O(e),r=t==fn?e.constructor:void 0,n=r?z(r):"";if(n)switch(n){case _n:return bn;case pn:return un;case yn:return dn;case kn:return hn;case jn:return vn}return t});var gn=$.Uint8Array,wn="__lodash_hash_undefined__";function Sn(e){return this.__data__.set(e,wn),this}function An(e){return this.__data__.has(e)}function On(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new ze;++t<r;)this.add(e[t])}function $n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Dn(e,t){return e.has(t)}On.prototype.add=On.prototype.push=Sn,On.prototype.has=An;var xn=1,Cn=2;function Mn(e,t,r,n,a,o){var i=r&xn,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=r&Cn?new On:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var p=e[d],f=t[d];if(n)var _=i?n(f,p,d,t,e,o):n(p,f,d,e,t,o);if(void 0!==_){if(_)continue;u=!1;break}if(b){if(!$n(t,function(e,t){if(!Dn(b,t)&&(p===e||a(p,e,r,n,o)))return b.push(t)})){u=!1;break}}else if(p!==f&&!a(p,f,r,n,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function Fn(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Hn(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var En=1,Kn=2,Pn="[object Boolean]",Wn="[object Date]",Rn="[object Error]",In="[object Map]",Tn="[object Number]",Bn="[object RegExp]",Un="[object Set]",zn="[object String]",Ln="[object Symbol]",Vn="[object ArrayBuffer]",Nn="[object DataView]",Qn=M?M.prototype:void 0,Xn=Qn?Qn.valueOf:void 0;function Gn(e,t,r,n,a,o,i){switch(r){case Nn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vn:return!(e.byteLength!=t.byteLength||!o(new gn(e),new gn(t)));case Pn:case Wn:case Tn:return it(+e,+t);case Rn:return e.name==t.name&&e.message==t.message;case Bn:case zn:return e==t+"";case In:var l=Fn;case Un:var s=n&En;if(l||(l=Hn),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;n|=Kn,i.set(e,t);var h=Mn(l(e),l(t),n,a,o,i);return i.delete(e),h;case Ln:if(Xn)return Xn.call(e)==Xn.call(t)}return!1}var qn=1,Yn=Object.prototype,Zn=Yn.hasOwnProperty;function Jn(e,t,r,n,a,o){var i=r&qn,l=an(e),s=l.length;if(s!=an(t).length&&!i)return!1;for(var c=s;c--;){var h=l[c];if(!(i?h in t:Zn.call(t,h)))return!1}var d=o.get(e),u=o.get(t);if(d&&u)return d==t&&u==e;var b=!0;o.set(e,t),o.set(t,e);for(var p=i;++c<s;){var f=e[h=l[c]],_=t[h];if(n)var v=i?n(_,f,h,t,e,o):n(f,_,h,e,t,o);if(!(void 0===v?f===_||a(f,_,r,n,o):v)){b=!1;break}p||(p="constructor"==h)}if(b&&!p){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return o.delete(e),o.delete(t),b}var tr=1,er="[object Arguments]",nr="[object Array]",rr="[object Object]",ir=Object.prototype,or=ir.hasOwnProperty;function ar(e,t,r,n,a,o){var i=C(e),l=C(t),s=i?nr:mn(e),c=l?nr:mn(t),h=(s=s==er?rr:s)==rr,d=(c=c==er?rr:c)==rr,u=s==c;if(u&&wt(e)){if(!wt(t))return!1;i=!0,h=!1}if(u&&!h)return o||(o=new Ye),i||re(e)?Mn(e,t,r,n,a,o):Gn(e,t,s,r,n,a,o);if(!(r&tr)){var b=h&&or.call(e,"__wrapped__"),p=d&&or.call(t,"__wrapped__");if(b||p){var f=b?e.value():e,_=p?t.value():t;return o||(o=new Ye),a(f,_,r,n,o)}}return!!u&&(o||(o=new Ye),Jn(e,t,r,n,a,o))}function lr(e,t,r,n,a){return e===t||(null==e||null==t||!D(e)&&!D(t)?e!=e&&t!=t:ar(e,t,r,n,lr,a))}function sr(e,t){return lr(e,t)}const cr=class{constructor(r){t(this,r),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.translateSortOrder=c("kol-table-sort-order"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,r,n,a=!1)=>{var o,l;let s=String(r);return this.horizontal&&(null===(o=t[0])||void 0===o?void 0:o.data)&&(s=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:s),e("tr",{class:i("kol-table__row",{"kol-table__row--body":!a,"kol-table__row--footer":a}),key:`row-${s}`},this.renderSelectionCell(t,r),t.map((e,t)=>this.renderTableCell(e,r,t,n)))},this.renderTableCell=(t,r,n,a)=>{if(!1===t.visible)return"";let o=`${r}-${n}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);o=e?`${e}-${this.horizontal?n:r}`:o}if(t.headerCell)return this.renderHeadingCell(t,r,n,a);{const r="function"!=typeof t.render&&t.label===this.translateNoEntries;return e("td",{key:`cell-${o}`,class:i("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),"aria-atomic":r?"false":void 0,"aria-live":r?"polite":void 0,"aria-relevant":r?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")}}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){F(this,e),sr(this.previousHeaderCells,this.state._headerCells)||this.initializeHeaderCellSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){j(this,e,{required:!0})}validateOn(e){y(this,e)}validateSelection(e){k(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const r=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let n=this.checkboxRefs.indexOf(r);n>-1&&(e.preventDefault(),"ArrowDown"===e.key?(n=(n+1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()):"ArrowUp"===e.key&&(e.preventDefault(),n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){var t;const r=Object.assign(Object.assign({},this.state._headerCells),{horizontal:e.detail});v(this,"_headerCells",r),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[m.onChangeHeaderCells])&&this.state._on[m.onChangeHeaderCells](e,r)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,g())}),this.dataToKeyMap.forEach((t,r)=>{e.includes(r)||this.dataToKeyMap.delete(r)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const r=e.render(t,e,e.data,this.state._data);"string"==typeof r&&(t.textContent=r)}})))}getNumberOfCols(e,t){let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var r;return t+=null!==(r=e.colSpan)&&void 0!==r?r:1}),r<t&&(r=t)}),0===r&&(r=t.length),r}getNumberOfRows(e,t){var r;let n=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var r;return t+=null!==(r=e.rowSpan)&&void 0!==r?r:1}),n<t&&(n=t)}),0===n?n=t.length:n-=(null===(r=this.state._dataFoot)||void 0===r?void 0:r.length)||0,n}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,r;let n=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===n.length&&(n=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(r=e.vertical)&&void 0!==r?r:[]),n.length>0&&(this.horizontal=!1)),n}createDataField(e,t,r){var n;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeaders(t),o=this.getNumberOfCols(t.horizontal,e);let i=this.getNumberOfRows(t.vertical,e),l=0;r&&(l=i,i+=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0);const s=[],c=[],h=[];t.vertical.forEach((e,t)=>{c[t]=0,h[t]=[]});const d=a;for(let n=l;n<i;n++){const a=[];t.vertical.forEach((e,t)=>{let r=0;if(h[t].forEach(e=>r+=e),r<=n){const o=e[n-r+c[t]];if("object"==typeof o){a.push(Object.assign(Object.assign({},o),{headerCell:!0,data:{}}));let e=1;if("number"==typeof o.rowSpan&&o.rowSpan>1&&(e=o.rowSpan),h[t].push(e),"number"==typeof o.colSpan&&o.colSpan>1)for(let r=1;r<o.colSpan;r++)h[t+r].push(e);c[t]++}}});for(let t=0;t<o;t++)if(!0===this.horizontal){const o=r&&this.state._dataFoot?this.state._dataFoot[n-l]:e[n];"object"!=typeof d[t]||null===d[t]||"object"!=typeof o||null===o||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,rowSpan:void 0,data:o,label:o[d[t].key]}))}else"object"!=typeof d[n]||null===d[n]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof d[n].key&&"function"!=typeof d[n].render||a.push(Object.assign(Object.assign({},d[n]),{colSpan:void 0,rowSpan:void 0,data:e[t],label:e[t][d[n].key]}));s.push(a)}if(0===e.length){let e=0,r=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{r+=e.rowSpan||1}));const n={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(r,1)};0===s.length?s.push([n]):s[0].push(n)}return s}handleSelectionChangeCallbackAndEvent(e,t){var r;"function"==typeof(null===(r=this.state._on)||void 0===r?void 0:r[m.onSelectionChange])&&this.state._on[m.onSelectionChange](e,t),this.host&&w(this.host,S.selectionChange,t)}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const e=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map(e=>e.map(e=>Object.assign(Object.assign({},e),{visible:"boolean"!=typeof e.visible||e.visible,hidable:"boolean"!=typeof e.hidable||e.hidable})))});v(this,"_headerCells",e)}}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,r){var n;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName(),c=null===(n=t[0])||void 0===n?void 0:n.data;if(!c)return"";const h=c[s],d=l.multiple||void 0===l.multiple,u=(()=>{const e=null==l?void 0:l.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),b=(()=>{const e=null==l?void 0:l.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),p=l.label(c),f={name:"selection",checked:u,disabled:b,id:String(h),"aria-label":p};return e("td",{key:`tbody-${r}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:i("kol-table__selection",{"kol-table__selection--checked":u})},d?e("label",{class:i("kol-table__selection-label",{"kol-table__selection-label--disabled":b})},e(o,{class:"kol-table__selection-icon",_icons:"kolicon "+(u?"kolicon-check":""),_label:""}),e("input",Object.assign({class:i("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},f,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==l?void 0:l.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),r=u?t.filter(e=>String(e)!==String(h)):[...t,h];this.handleSelectionChangeCallbackAndEvent(e,null!=r?r:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:i("kol-table__selection-input kol-table__selection-input--radio")},f,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,[h])}}))),e(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:p})))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var r;const n=null===(r=this.state._selection)||void 0===r?void 0:r.disabledKeys;return!(void 0===n?[]:Array.isArray(n)?n:[n]).some(r=>String(r)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const r=this.getSelectionKeyPropertyName(),n=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&n.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[r])),n}getTableMinWidth(){var e,t;const r=null!==(e=this.state._headerCells.horizontal)&&void 0!==e?e:[],n=[];r.forEach(e=>{e.forEach(e=>{!1!==e.visible&&void 0!==e.width&&e.width>0&&n.push(e.width)})});const a=null!==(t=this.state._headerCells.vertical)&&void 0!==t?t:[],o=[];a.forEach(e=>{e.forEach(e=>{void 0!==e.width&&e.width>0&&o.push(e.width)})});const i=[...o,...n];return 0===i.length?"0px":1===i.length?`${i[0]}px`:`calc(${i.map(e=>`${e}px`).join(" + ")})`}renderHeadingSelectionCell(){var t,r;const n=this.state._selection;if(!n)return e("td",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===n.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const l=null!==(r=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==r?r:0,s=l===this.getDataWithSelectionEnabled().length,h=0!==l&&!s;let d="kol-table-selection-indeterminate";s&&!h&&(d="kol-table-selection-none"),0===l&&(d="kol-table-selection-all");const u=c(d);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:i("kol-table__selection",{"kol-table__selection--indeterminate":h,"kol-table__selection--checked":s})},e("label",{class:"kol-table__selection-label"},e(o,{class:"kol-table__selection-icon",_icons:"kolicon "+(h?"kolicon-minus":s?"kolicon-check":""),_label:""}),e("input",{class:i("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!h,indeterminate:h,"aria-label":u,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),e(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){const t=this.state._headerCells.horizontal,r=this.state._headerCells.vertical;if(!Array.isArray(t)||0===t.length||!Array.isArray(r)||0===r.length)return e(n,null);const a=r.reduce((e,t)=>{var r;const n=null==t?void 0:t[0];return e+(null!==(r=null==n?void 0:n.width)&&void 0!==r?r:0)},0);return e("td",{"aria-hidden":"true",colSpan:r.length,rowSpan:t.length,style:a>0?{width:`${a}px`}:void 0})}formatSortOrderDescription(e){return this.translateSortOrder.replace("{{order}}",`${e}`)}getSortAriaDescription(e){return"number"==typeof e&&e>0?`${this.translateSort} – ${this.formatSortOrderDescription(e)}`:this.translateSort}renderHeadingCell(t,r,n,a){if(!1===t.visible)return"";const o=!1!==(null==t?void 0:t.sortable),s="string"==typeof t.sortDirection,c=o&&s;let h="none",d="kolicon-sort-neutral";if(c&&t.sortDirection)switch(t.sortDirection){case"ASC":d="kolicon-sort-asc",h="ascending";break;case"DESC":d="kolicon-sort-desc",h="descending";break;default:h="none"}const u=a?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",b="number"==typeof t.sortOrder&&t.sortOrder>0?t.sortOrder:void 0,p=this.getSortAriaDescription(b);return e("th",{key:`${r}-${n}-${t.label}`,class:i("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${h}`]:h}),scope:u,colSpan:t.colSpan,rowSpan:t.rowSpan,style:void 0!==t.width?{width:`${t.width}px`}:void 0,"aria-sort":h,"data-sort":c&&t.sortDirection?`sort-${t.sortDirection}`:void 0},c&&t.sortDirection?e("span",{class:"kol-table__sort"},e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:d},_label:t.label,_ariaDescription:p,_on:{onClick:e=>{var r;"function"==typeof(null===(r=this.state._on)||void 0===r?void 0:r.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&w(this.host,S.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}),b&&e("span",{"aria-hidden":"true",class:"kol-table__sort-order"},b)):t.label)}renderSpacer(t,r){var n,a;const o=(null===(n=this.state._headerCells.vertical)||void 0===n?void 0:n.length)||0,l=null===(a=null==r?void 0:r[0])||void 0===a?void 0:a.reduce((e,t)=>e+(t.colSpan||1),0),s=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:i("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:i(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:o+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){const t=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const r=this.state._headerCells.horizontal;return e("div",{key:"3afe5c237067ccac3023d7fd53883e9057de27e0",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"9b41896802e14e25f0234e3dd714972d9e6c77db",_horizontalHeaderCells:null!=r?r:[]}),e("div",{key:"d004c445641a06efe649a6de3c51a15a2502c0df",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"5119cd5e99cb529baf922b66fc0e3d917886ee07",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"961a09c0d6e5faff72e65ef9a3aeaa9df0f0ed41",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(r)&&e("thead",{key:"12bb291debe3b8532f7ffa862a3e9698903598f5",class:"kol-table__head"},[r.map((t,r)=>e("tr",{class:"kol-table__head-row",key:`thead-${r}`},this.state._selection&&this.renderHeadingSelectionCell(),0===r&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,r,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"bba0270d6ca03234ebe2b12b101c589439bda99d",class:"kol-table__body"},t.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return r(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"]}}};export{cr as kol_table_stateless_wc};
|
|
4
|
+
import{r as t,h as e,F as n,g as r}from"./index-Zs2j78jP.js";import{c as i}from"./clsx-eK3rPvPS.js";import{e as o,a,d as l,x as s}from"./component-names-B_kYyA8u.js";import{t as c}from"./i18n-CvQhdUrE.js";import{O as u,o as f,p as d,w as h,s as v}from"./common-BXXICkFX.js";import{b,v as _,a as p,e as y,c as k}from"./table-selection-C4VgH6EI.js";import{v as j}from"./label-Dkj9sxQK.js";import{C as m}from"./keyboard-DNd73LVa.js";import{n as g}from"./dev.utils-DIHEE-25.js";import{d as w,K as S}from"./events-DHTi_wtD.js";import{i as A,c as O,r as $,a as D,f as x,b as C,S as M}from"./isObject-DvSELytj.js";import"./i18n-B0tfVPMa.js";const F=(e,t)=>{u(t,()=>{f(t,()=>{try{t=d(t)}catch(e){}h(e,"_headerCells",e=>{var t,r;return"object"==typeof e&&null!==e&&(void 0===e.horizontal||Array.isArray(e.horizontal)&&void 0===e.horizontal.find(e=>!Array.isArray(e)))&&(void 0===e.vertical||Array.isArray(e.vertical)&&void 0===e.vertical.find(e=>!Array.isArray(e)))&&[...null!==(t=e.horizontal)&&void 0!==t?t:[],...null!==(r=e.vertical)&&void 0!==r?r:[]].flat().every(e=>void 0===e.width||"number"==typeof e.width)&&!0},new Set(["TableHeaderCellsPropType"]),t)})})};var H="[object AsyncFunction]",E="[object Function]",P="[object GeneratorFunction]",K="[object Proxy]";function R(e){if(!A(e))return!1;var t=O(e);return t==E||t==P||t==H||t==K}var W=$["__core-js_shared__"],I=function(){var e=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function T(e){return!!I&&I in e}var B=Function.prototype,z=B.toString;function L(e){if(null!=e){try{return z.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,N=Function.prototype,X=Object.prototype,Q=N.toString,q=X.hasOwnProperty,G=RegExp("^"+Q.call(q).replace(U,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y(e){return!(!A(e)||T(e))&&(R(e)?G:V).test(L(e))}function Z(e,t){return null==e?void 0:e[t]}function J(e,t){var r=Z(e,t);return Y(r)?r:void 0}var tt=J($,"WeakMap"),et=9007199254740991,nt=/^(?:0|[1-9]\d*)$/;function rt(e,t){var r=typeof e;return!!(t=null==t?et:t)&&("number"==r||"symbol"!=r&&nt.test(e))&&e>-1&&e%1==0&&e<t}function it(e,t){return e===t||e!=e&&t!=t}var ot=9007199254740991;function at(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ot}function lt(e){return null!=e&&at(e.length)&&!R(e)}var st=Object.prototype;function ct(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||st)}function ut(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ft="[object Arguments]";function dt(e){return D(e)&&O(e)==ft}var ht=Object.prototype,vt=ht.hasOwnProperty,bt=ht.propertyIsEnumerable,_t=dt(function(){return arguments}())?dt:function(e){return D(e)&&vt.call(e,"callee")&&!bt.call(e,"callee")};function pt(){return!1}var yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,kt=yt&&"object"==typeof module&&module&&!module.nodeType&&module,jt=kt&&kt.exports===yt,mt=jt?$.Buffer:void 0,gt=mt?mt.isBuffer:void 0,wt=gt||pt,St="[object Arguments]",At="[object Array]",Ot="[object Boolean]",$t="[object Date]",Dt="[object Error]",xt="[object Function]",Ct="[object Map]",Mt="[object Number]",Ft="[object Object]",Ht="[object RegExp]",Et="[object Set]",Pt="[object String]",Kt="[object WeakMap]",Rt="[object ArrayBuffer]",Wt="[object DataView]",It="[object Float32Array]",Tt="[object Float64Array]",Bt="[object Int8Array]",zt="[object Int16Array]",Lt="[object Int32Array]",Ut="[object Uint8Array]",Vt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Xt="[object Uint32Array]",Qt={};function qt(e){return D(e)&&at(e.length)&&!!Qt[O(e)]}function Gt(e){return function(t){return e(t)}}Qt[It]=Qt[Tt]=Qt[Bt]=Qt[zt]=Qt[Lt]=Qt[Ut]=Qt[Vt]=Qt[Nt]=Qt[Xt]=!0,Qt[St]=Qt[At]=Qt[Rt]=Qt[Ot]=Qt[Wt]=Qt[$t]=Qt[Dt]=Qt[xt]=Qt[Ct]=Qt[Mt]=Qt[Ft]=Qt[Ht]=Qt[Et]=Qt[Pt]=Qt[Kt]=!1;var Yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zt=Yt&&"object"==typeof module&&module&&!module.nodeType&&module,Jt=Zt&&Zt.exports===Yt,te=Jt&&x.process,ee=function(){try{var e=Zt&&Zt.require&&Zt.require("util").types;return e||te&&te.binding&&te.binding("util")}catch(e){}}(),ne=ee&&ee.isTypedArray,re=ne?Gt(ne):qt,ie=Object.prototype,oe=ie.hasOwnProperty;function ae(e,t){var r=C(e),n=!r&&_t(e),a=!r&&!n&&wt(e),o=!r&&!n&&!a&&re(e),i=r||n||a||o,l=i?ut(e.length,String):[],s=l.length;for(var c in e)!oe.call(e,c)||i&&("length"==c||a&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l}function le(e,t){return function(r){return e(t(r))}}var se=le(Object.keys,Object),ce=Object.prototype,ue=ce.hasOwnProperty;function fe(e){if(!ct(e))return se(e);var t=[];for(var r in Object(e))ue.call(e,r)&&"constructor"!=r&&t.push(r);return t}function de(e){return lt(e)?ae(e):fe(e)}var he=J(Object,"create");function ve(){this.__data__=he?he(null):{},this.size=0}function be(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _e="__lodash_hash_undefined__",pe=Object.prototype,ye=pe.hasOwnProperty;function ke(e){var t=this.__data__;if(he){var r=t[e];return r===_e?void 0:r}return ye.call(t,e)?t[e]:void 0}var je=Object.prototype,me=je.hasOwnProperty;function ge(e){var t=this.__data__;return he?void 0!==t[e]:me.call(t,e)}var we="__lodash_hash_undefined__";function Se(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=he&&void 0===t?we:t,this}function Ae(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(){this.__data__=[],this.size=0}function $e(e,t){for(var r=e.length;r--;)if(it(e[r][0],t))return r;return-1}Ae.prototype.clear=ve,Ae.prototype.delete=be,Ae.prototype.get=ke,Ae.prototype.has=ge,Ae.prototype.set=Se;var De=Array.prototype,xe=De.splice;function Ce(e){var t=this.__data__,r=$e(t,e);return!(r<0)&&(r==t.length-1?t.pop():xe.call(t,r,1),--this.size,!0)}function Me(e){var t=this.__data__,r=$e(t,e);return r<0?void 0:t[r][1]}function Fe(e){return $e(this.__data__,e)>-1}function He(e,t){var r=this.__data__,n=$e(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ee(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ee.prototype.clear=Oe,Ee.prototype.delete=Ce,Ee.prototype.get=Me,Ee.prototype.has=Fe,Ee.prototype.set=He;var Pe=J($,"Map");function Ke(){this.size=0,this.__data__={hash:new Ae,map:new(Pe||Ee),string:new Ae}}function Re(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function We(e,t){var r=e.__data__;return Re(t)?r["string"==typeof t?"string":"hash"]:r.map}function Ie(e){var t=We(this,e).delete(e);return this.size-=t?1:0,t}function Te(e){return We(this,e).get(e)}function Be(e){return We(this,e).has(e)}function ze(e,t){var r=We(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Le(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ue(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function Ve(){this.__data__=new Ee,this.size=0}function Ne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Xe(e){return this.__data__.get(e)}function Qe(e){return this.__data__.has(e)}Le.prototype.clear=Ke,Le.prototype.delete=Ie,Le.prototype.get=Te,Le.prototype.has=Be,Le.prototype.set=ze;var qe=200;function Ge(e,t){var r=this.__data__;if(r instanceof Ee){var n=r.__data__;if(!Pe||n.length<qe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Le(n)}return r.set(e,t),this.size=r.size,this}function Ye(e){var t=this.__data__=new Ee(e);this.size=t.size}function Ze(e,t){for(var r=-1,n=null==e?0:e.length,a=0,o=[];++r<n;){var i=e[r];t(i,r,e)&&(o[a++]=i)}return o}function Je(){return[]}Ye.prototype.clear=Ve,Ye.prototype.delete=Ne,Ye.prototype.get=Xe,Ye.prototype.has=Qe,Ye.prototype.set=Ge;var tn=Object.prototype,en=tn.propertyIsEnumerable,nn=Object.getOwnPropertySymbols,rn=nn?function(e){return null==e?[]:(e=Object(e),Ze(nn(e),function(t){return en.call(e,t)}))}:Je;function on(e,t,r){var n=t(e);return C(e)?n:Ue(n,r(e))}function an(e){return on(e,de,rn)}var ln=J($,"DataView"),sn=J($,"Promise"),cn=J($,"Set"),un="[object Map]",fn="[object Object]",dn="[object Promise]",hn="[object Set]",vn="[object WeakMap]",bn="[object DataView]",_n=L(ln),pn=L(Pe),yn=L(sn),kn=L(cn),jn=L(tt),mn=O;(ln&&mn(new ln(new ArrayBuffer(1)))!=bn||Pe&&mn(new Pe)!=un||sn&&mn(sn.resolve())!=dn||cn&&mn(new cn)!=hn||tt&&mn(new tt)!=vn)&&(mn=function(e){var t=O(e),r=t==fn?e.constructor:void 0,n=r?L(r):"";if(n)switch(n){case _n:return bn;case pn:return un;case yn:return dn;case kn:return hn;case jn:return vn}return t});var gn=$.Uint8Array,wn="__lodash_hash_undefined__";function Sn(e){return this.__data__.set(e,wn),this}function An(e){return this.__data__.has(e)}function On(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Le;++t<r;)this.add(e[t])}function $n(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Dn(e,t){return e.has(t)}On.prototype.add=On.prototype.push=Sn,On.prototype.has=An;var xn=1,Cn=2;function Mn(e,t,r,n,a,o){var i=r&xn,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=o.get(e),h=o.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,b=r&Cn?new On:void 0;for(o.set(e,t),o.set(t,e);++d<l;){var p=e[d],f=t[d];if(n)var _=i?n(f,p,d,t,e,o):n(p,f,d,e,t,o);if(void 0!==_){if(_)continue;u=!1;break}if(b){if(!$n(t,function(e,t){if(!Dn(b,t)&&(p===e||a(p,e,r,n,o)))return b.push(t)})){u=!1;break}}else if(p!==f&&!a(p,f,r,n,o)){u=!1;break}}return o.delete(e),o.delete(t),u}function Fn(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Hn(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var En=1,Pn=2,Kn="[object Boolean]",Rn="[object Date]",Wn="[object Error]",In="[object Map]",Tn="[object Number]",Bn="[object RegExp]",zn="[object Set]",Ln="[object String]",Un="[object Symbol]",Vn="[object ArrayBuffer]",Nn="[object DataView]",Xn=M?M.prototype:void 0,Qn=Xn?Xn.valueOf:void 0;function qn(e,t,r,n,a,o,i){switch(r){case Nn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vn:return!(e.byteLength!=t.byteLength||!o(new gn(e),new gn(t)));case Kn:case Rn:case Tn:return it(+e,+t);case Wn:return e.name==t.name&&e.message==t.message;case Bn:case Ln:return e==t+"";case In:var l=Fn;case zn:var s=n&En;if(l||(l=Hn),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;n|=Pn,i.set(e,t);var h=Mn(l(e),l(t),n,a,o,i);return i.delete(e),h;case Un:if(Qn)return Qn.call(e)==Qn.call(t)}return!1}var Gn=1,Yn=Object.prototype,Zn=Yn.hasOwnProperty;function Jn(e,t,r,n,a,o){var i=r&Gn,l=an(e),s=l.length;if(s!=an(t).length&&!i)return!1;for(var c=s;c--;){var h=l[c];if(!(i?h in t:Zn.call(t,h)))return!1}var d=o.get(e),u=o.get(t);if(d&&u)return d==t&&u==e;var b=!0;o.set(e,t),o.set(t,e);for(var p=i;++c<s;){var f=e[h=l[c]],_=t[h];if(n)var v=i?n(_,f,h,t,e,o):n(f,_,h,e,t,o);if(!(void 0===v?f===_||a(f,_,r,n,o):v)){b=!1;break}p||(p="constructor"==h)}if(b&&!p){var y=e.constructor,g=t.constructor;y==g||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(b=!1)}return o.delete(e),o.delete(t),b}var tr=1,er="[object Arguments]",nr="[object Array]",rr="[object Object]",ir=Object.prototype,or=ir.hasOwnProperty;function ar(e,t,r,n,a,o){var i=C(e),l=C(t),s=i?nr:mn(e),c=l?nr:mn(t),h=(s=s==er?rr:s)==rr,d=(c=c==er?rr:c)==rr,u=s==c;if(u&&wt(e)){if(!wt(t))return!1;i=!0,h=!1}if(u&&!h)return o||(o=new Ye),i||re(e)?Mn(e,t,r,n,a,o):qn(e,t,s,r,n,a,o);if(!(r&tr)){var b=h&&or.call(e,"__wrapped__"),p=d&&or.call(t,"__wrapped__");if(b||p){var f=b?e.value():e,_=p?t.value():t;return o||(o=new Ye),a(f,_,r,n,o)}}return!!u&&(o||(o=new Ye),Jn(e,t,r,n,a,o))}function lr(e,t,r,n,a){return e===t||(null==e||null==t||!D(e)&&!D(t)?e!=e&&t!=t:ar(e,t,r,n,lr,a))}function sr(e,t){return lr(e,t)}const cr=class{constructor(r){t(this,r),this.translateNoEntries=c("kol-no-entries"),this.state={_data:[],_headerCells:{horizontal:[],vertical:[]},_label:"",_hasSettingsMenu:!1},this.horizontal=!0,this.cellsToRenderTimeouts=new Map,this.dataToKeyMap=new Map,this.checkboxRefs=[],this.translateSort=c("kol-sort"),this.translateSortOrder=c("kol-table-sort-order"),this.tableDivElementHasScrollbar=!1,this.renderTableRow=(t,r,n,a=!1)=>{var o,l;let s=String(r);return this.horizontal&&(null===(o=t[0])||void 0===o?void 0:o.data)&&(s=null!==(l=this.getDataKey(t[0].data))&&void 0!==l?l:s),e("tr",{class:i("kol-table__row",{"kol-table__row--body":!a,"kol-table__row--footer":a}),key:`row-${s}`},this.renderSelectionCell(t,r),t.map((e,t)=>this.renderTableCell(e,r,t,n)))},this.renderTableCell=(t,r,n,a)=>{if(!1===t.visible)return"";let o=`${r}-${n}-${t.label}`;if(t.data){const e=this.getDataKey(t.data);o=e?`${e}-${this.horizontal?n:r}`:o}if(t.headerCell)return this.renderHeadingCell(t,r,n,a);{const r="function"!=typeof t.render&&t.label===this.translateNoEntries;return e("td",{key:`cell-${o}`,class:i("kol-table__cell kol-table__cell--body",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign}),"aria-atomic":r?"false":void 0,"aria-live":r?"polite":void 0,"aria-relevant":r?"text":void 0,colSpan:t.colSpan,rowSpan:t.rowSpan,style:{textAlign:t.textAlign},ref:"function"==typeof t.render?e=>{this.cellRender(t,e)}:void 0},"function"!=typeof t.render?t.label:"")}}}validateHasSettingsMenu(e){b(this,e)}validateData(e){_(this,e,{beforePatch:e=>{this.updateDataToKeyMap(e)}})}validateDataFoot(e){p(this,e)}validateHeaderCells(e){F(this,e),sr(this.previousHeaderCells,this.state._headerCells)||this.initializeHeaderCellSettings(),this.previousHeaderCells=this.state._headerCells}validateLabel(e){j(this,e,{required:!0})}validateOn(e){y(this,e)}validateSelection(e){k(this,e)}handleKeyDown(e){var t;if("ArrowUp"===e.key||"ArrowDown"===e.key){const r=null===(t=this.tableDivElement)||void 0===t?void 0:t.querySelector(":focus");let n=this.checkboxRefs.indexOf(r);n>-1&&(e.preventDefault(),"ArrowDown"===e.key?(n=(n+1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()):"ArrowUp"===e.key&&(e.preventDefault(),n=(n+this.checkboxRefs.length-1)%this.checkboxRefs.length,this.checkboxRefs[n].focus()))}}componentDidRender(){this.checkDivElementScrollbar()}componentDidLoad(){this.tableDivElement&&ResizeObserver&&(this.tableDivElementResizeObserver=new ResizeObserver(this.checkDivElementScrollbar.bind(this)),this.tableDivElementResizeObserver.observe(this.tableDivElement))}handleSettingsChange(e){var t;const r=Object.assign(Object.assign({},this.state._headerCells),{horizontal:e.detail});v(this,"_headerCells",r),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t[m.onChangeHeaderCells])&&this.state._on[m.onChangeHeaderCells](e,r)}disconnectedCallback(){var e;null===(e=this.tableDivElementResizeObserver)||void 0===e||e.disconnect()}checkDivElementScrollbar(){this.tableDivElement&&(this.tableDivElementHasScrollbar=this.tableDivElement.scrollWidth>this.tableDivElement.clientWidth)}updateDataToKeyMap(e){e.forEach(e=>{this.dataToKeyMap.has(e)||this.dataToKeyMap.set(e,g())}),this.dataToKeyMap.forEach((t,r)=>{e.includes(r)||this.dataToKeyMap.delete(r)})}getDataKey(e){return this.dataToKeyMap.get(e)}cellRender(e,t){t&&(clearTimeout(this.cellsToRenderTimeouts.get(t)),this.cellsToRenderTimeouts.set(t,setTimeout(()=>{if("function"==typeof e.render){const r=e.render(t,e,e.data,this.state._data);"string"==typeof r&&(t.textContent=r)}})))}getNumberOfCols(e,t){let r=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var r;return t+=null!==(r=e.colSpan)&&void 0!==r?r:1}),r<t&&(r=t)}),0===r&&(r=t.length),r}getNumberOfRows(e,t){var r;let n=0;return e.forEach(e=>{let t=0;Array.isArray(e)&&e.forEach(e=>{var r;return t+=null!==(r=e.rowSpan)&&void 0!==r?r:1}),n<t&&(n=t)}),0===n?n=t.length:n-=(null===(r=this.state._dataFoot)||void 0===r?void 0:r.length)||0,n}getThePrimaryHeadersWithKeyOrRenderFunction(e){const t=[];return e.forEach(e=>{e.forEach(e=>{"string"!=typeof e.key&&"function"!=typeof e.render||t.push(e)})}),t}getPrimaryHeaders(e){var t,r;let n=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(t=e.horizontal)&&void 0!==t?t:[]);return this.horizontal=!0,0===n.length&&(n=this.getThePrimaryHeadersWithKeyOrRenderFunction(null!==(r=e.vertical)&&void 0!==r?r:[]),n.length>0&&(this.horizontal=!1)),n}createDataField(e,t,r){var n;t.horizontal=Array.isArray(null==t?void 0:t.horizontal)?t.horizontal:[],t.vertical=Array.isArray(null==t?void 0:t.vertical)?t.vertical:[];const a=this.getPrimaryHeaders(t),o=this.getNumberOfCols(t.horizontal,e);let i=this.getNumberOfRows(t.vertical,e),l=0;r&&(l=i,i+=(null===(n=this.state._dataFoot)||void 0===n?void 0:n.length)||0);const s=[],c=[],h=[];t.vertical.forEach((e,t)=>{c[t]=0,h[t]=[]});const d=a;for(let n=l;n<i;n++){const a=[];t.vertical.forEach((e,t)=>{let r=0;if(h[t].forEach(e=>r+=e),r<=n){const o=e[n-r+c[t]];if("object"==typeof o){a.push(Object.assign(Object.assign({},o),{headerCell:!0,data:{}}));let e=1;if("number"==typeof o.rowSpan&&o.rowSpan>1&&(e=o.rowSpan),h[t].push(e),"number"==typeof o.colSpan&&o.colSpan>1)for(let r=1;r<o.colSpan;r++)h[t+r].push(e);c[t]++}}});for(let t=0;t<o;t++)if(!0===this.horizontal){const o=r&&this.state._dataFoot?this.state._dataFoot[n-l]:e[n];"object"!=typeof d[t]||null===d[t]||"object"!=typeof o||null===o||"string"!=typeof d[t].key&&"function"!=typeof d[t].render||a.push(Object.assign(Object.assign({},d[t]),{colSpan:void 0,rowSpan:void 0,data:o,label:o[d[t].key]}))}else"object"!=typeof d[n]||null===d[n]||"object"!=typeof e[t]||null===e[t]||"string"!=typeof d[n].key&&"function"!=typeof d[n].render||a.push(Object.assign(Object.assign({},d[n]),{colSpan:void 0,rowSpan:void 0,data:e[t],label:e[t][d[n].key]}));s.push(a)}if(0===e.length){let e=0,r=0;Array.isArray(t.horizontal)&&t.horizontal.length>0&&t.horizontal[0].forEach(t=>{e+=t.colSpan||1}),Array.isArray(t.vertical)&&t.vertical.length>0&&(e-=t.vertical.length,t.vertical[0].forEach(e=>{r+=e.rowSpan||1}));const n={colSpan:e,label:this.translateNoEntries,render:void 0,rowSpan:Math.max(r,1)};0===s.length?s.push([n]):s[0].push(n)}return s}handleSelectionChangeCallbackAndEvent(e,t){var r;"function"==typeof(null===(r=this.state._on)||void 0===r?void 0:r[m.onSelectionChange])&&this.state._on[m.onSelectionChange](e,t),this.host&&w(this.host,S.selectionChange,t)}initializeHeaderCellSettings(){if(this.state._headerCells&&this.state._headerCells.horizontal&&this.state._headerCells.horizontal.length>0){const e=Object.assign(Object.assign({},this.state._headerCells),{horizontal:this.state._headerCells.horizontal.map(e=>e.map(e=>Object.assign(Object.assign({},e),{visible:"boolean"!=typeof e.visible||e.visible,hidable:"boolean"!=typeof e.hidable||e.hidable})))});v(this,"_headerCells",e)}}componentWillLoad(){this.validateData(this._data),this.validateDataFoot(this._dataFoot),this.validateHeaderCells(this._headerCells),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelection(this._selection),this.validateHasSettingsMenu(this._hasSettingsMenu)}renderSelectionCell(t,r){var n;const l=this.state._selection;if(!l)return"";const s=this.getSelectionKeyPropertyName(),c=null===(n=t[0])||void 0===n?void 0:n.data;if(!c)return"";const h=c[s],d=l.multiple||void 0===l.multiple,u=(()=>{const e=null==l?void 0:l.selectedKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),b=(()=>{const e=null==l?void 0:l.disabledKeys;return(void 0===e?[]:Array.isArray(e)?e:[e]).some(e=>String(e)===String(h))})(),p=l.label(c),f={name:"selection",checked:u,disabled:b,id:String(h),"aria-label":p};return e("td",{key:`tbody-${r}-selection`,class:"kol-table__cell kol-table__cell--selection"},e("div",{class:i("kol-table__selection",{"kol-table__selection--checked":u})},d?e("label",{class:i("kol-table__selection-label",{"kol-table__selection-label--disabled":b})},e(o,{class:"kol-table__selection-icon",_icons:"kolicon "+(u?"kolicon-check":""),_label:""}),e("input",Object.assign({class:i("kol-table__selection-input kol-table__selection-input--checkbox"),ref:e=>e&&this.checkboxRefs.push(e)},f,{type:"checkbox",onInput:e=>{const t=(()=>{const e=null==l?void 0:l.selectedKeys;return void 0===e?[]:Array.isArray(e)?e:[e]})(),r=u?t.filter(e=>String(e)!==String(h)):[...t,h];this.handleSelectionChangeCallbackAndEvent(e,null!=r?r:[])}}))):e("label",{class:"kol-table__selection-label"},e("input",Object.assign({class:i("kol-table__selection-input kol-table__selection-input--radio")},f,{type:"radio",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,[h])}}))),e(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${h}-label`,_label:p})))}getSelectionKeyPropertyName(){var e,t;return null!==(t=null===(e=this.state._selection)||void 0===e?void 0:e.keyPropertyName)&&void 0!==t?t:"id"}getDataWithSelectionEnabled(){const e=this.getSelectionKeyPropertyName();return this.state._data.filter(t=>{var r;const n=null===(r=this.state._selection)||void 0===r?void 0:r.disabledKeys;return!(void 0===n?[]:Array.isArray(n)?n:[n]).some(r=>String(r)===String(t[e]))})}getSelectedKeysWithoutDisabledKeys(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>!t.some(t=>String(t)===String(e)))}getSelectedKeysWithDisabledKeysOnly(){const e=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.selectedKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})(),t=(()=>{var e;const t=null===(e=this.state._selection)||void 0===e?void 0:e.disabledKeys;return void 0===t?[]:Array.isArray(t)?t:[t]})();return e.filter(e=>t.some(t=>String(t)===String(e)))}getRevertedSelection(e){var t;const r=this.getSelectionKeyPropertyName(),n=null!==(t=this.getSelectedKeysWithDisabledKeysOnly())&&void 0!==t?t:[];return e&&n.push(...this.getDataWithSelectionEnabled().map(e=>null==e?void 0:e[r])),n}getTableMinWidth(){var e,t;const r=null!==(e=this.state._headerCells.horizontal)&&void 0!==e?e:[],n=[];r.forEach(e=>{e.forEach(e=>{!1!==e.visible&&void 0!==e.width&&e.width>0&&n.push(e.width)})});const a=null!==(t=this.state._headerCells.vertical)&&void 0!==t?t:[],o=[];a.forEach(e=>{e.forEach(e=>{void 0!==e.width&&e.width>0&&o.push(e.width)})});const i=[...o,...n];return 0===i.length?"0px":1===i.length?`${i[0]}px`:`calc(${i.map(e=>`${e}px`).join(" + ")})`}renderHeadingSelectionCell(){var t,r;const n=this.state._selection;if(!n)return e("td",{class:"kol-table__cell kol-table__cell--header",key:"thead-0"});if(!1===n.multiple)return e("td",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"});const l=null!==(r=null===(t=this.getSelectedKeysWithoutDisabledKeys())||void 0===t?void 0:t.length)&&void 0!==r?r:0,s=l===this.getDataWithSelectionEnabled().length,h=0!==l&&!s;let d="kol-table-selection-indeterminate";s&&!h&&(d="kol-table-selection-none"),0===l&&(d="kol-table-selection-all");const u=c(d);return e("th",{key:"thead-0-selection",class:"kol-table__cell kol-table__cell--header kol-table__cell--selection"},e("div",{class:i("kol-table__selection",{"kol-table__selection--indeterminate":h,"kol-table__selection--checked":s})},e("label",{class:"kol-table__selection-label"},e(o,{class:"kol-table__selection-icon",_icons:"kolicon "+(h?"kolicon-minus":s?"kolicon-check":""),_label:""}),e("input",{class:i("kol-table__selection-input kol-table__selection-input--checkbox"),"data-testid":"selection-checkbox-all",ref:e=>e&&this.checkboxRefs.push(e),name:"selection",checked:s&&!h,indeterminate:h,"aria-label":u,type:"checkbox",onInput:e=>{this.handleSelectionChangeCallbackAndEvent(e,this.getRevertedSelection(!s))}})),e(a,{"aria-hidden":"true",class:"kol-table__selection-input-tooltip",_align:"right",_id:`${d}-label`,_label:u})))}renderHeaderTdCell(){const t=this.state._headerCells.horizontal,r=this.state._headerCells.vertical;if(!Array.isArray(t)||0===t.length||!Array.isArray(r)||0===r.length)return e(n,null);const a=r.reduce((e,t)=>{var r;const n=null==t?void 0:t[0];return e+(null!==(r=null==n?void 0:n.width)&&void 0!==r?r:0)},0);return e("td",{"aria-hidden":"true",colSpan:r.length,rowSpan:t.length,style:a>0?{width:`${a}px`}:void 0})}formatSortOrderDescription(e){return this.translateSortOrder.replace("{{order}}",`${e}`)}getSortAriaDescription(e){return"number"==typeof e&&e>0?`${this.translateSort} – ${this.formatSortOrderDescription(e)}`:this.translateSort}renderHeadingCell(t,r,n,a){if(!1===t.visible)return"";const o=!1!==(null==t?void 0:t.sortable),s="string"==typeof t.sortDirection,c=o&&s;let h="none",d="kolicon-sort-neutral";if(c&&t.sortDirection)switch(t.sortDirection){case"ASC":d="kolicon-sort-asc",h="ascending";break;case"DESC":d="kolicon-sort-desc",h="descending";break;default:h="none"}const u=a?"row":"number"==typeof t.colSpan&&t.colSpan>1?"colgroup":"col",b="number"==typeof t.sortOrder&&t.sortOrder>0?t.sortOrder:void 0,p=this.getSortAriaDescription(b);return e("th",{key:`${r}-${n}-${t.label}`,class:i("kol-table__cell kol-table__cell--header",{[`kol-table__cell--align-${t.textAlign}`]:t.textAlign,[`kol-table__cell--${h}`]:h}),scope:u,colSpan:t.colSpan,rowSpan:t.rowSpan,style:void 0!==t.width?{width:`${t.width}px`}:void 0,"aria-sort":h,"data-sort":c&&t.sortDirection?`sort-${t.sortDirection}`:void 0},c&&t.sortDirection?e("span",{class:"kol-table__sort"},e(l,{class:"kol-table__sort-button",exportparts:"icon",_icons:{right:d},_label:t.label,_ariaDescription:p,_on:{onClick:e=>{var r;"function"==typeof(null===(r=this.state._on)||void 0===r?void 0:r.onSort)&&t.key&&t.sortDirection&&this.state._on.onSort(e,{key:t.key,currentSortDirection:t.sortDirection}),this.host&&w(this.host,S.sort,{key:t.key,currentSortDirection:t.sortDirection})}}}),b&&e("span",{"aria-hidden":"true",class:"kol-table__sort-order"},b)):t.label)}renderSpacer(t,r){var n,a;const o=(null===(n=this.state._headerCells.vertical)||void 0===n?void 0:n.length)||0,l=null===(a=null==r?void 0:r[0])||void 0===a?void 0:a.reduce((e,t)=>e+(t.colSpan||1),0),s=this.state._selection?1:0;return e("tr",{"aria-hidden":"true",class:i("kol-table__spacer",`kol-table__spacer--${t}`)},e("td",{class:i(`kol-table__spacer-line kol-table__spacer-line--${t}`),colSpan:o+l+s}))}renderFoot(){if(!this.state._dataFoot||0===this.state._dataFoot.length)return null;const t=this.createDataField(this.state._dataFoot,this.state._headerCells,!0);return e("tfoot",{class:"kol-table__footer"},[this.renderSpacer("foot",t),t.map((e,t)=>this.renderTableRow(e,t,!0,!0))])}render(){const t=this.createDataField(this.state._data,this.state._headerCells);this.checkboxRefs=[];const r=this.state._headerCells.horizontal;return e("div",{key:"3afe5c237067ccac3023d7fd53883e9057de27e0",class:"kol-table"},this.state._hasSettingsMenu&&e(s,{key:"9b41896802e14e25f0234e3dd714972d9e6c77db",_horizontalHeaderCells:null!=r?r:[]}),e("div",{key:"d004c445641a06efe649a6de3c51a15a2502c0df",ref:e=>this.tableDivElement=e,class:"kol-table__scroll-container",tabindex:this.tableDivElementHasScrollbar?"-1":void 0},e("table",{key:"5119cd5e99cb529baf922b66fc0e3d917886ee07",class:"kol-table__table",style:{minWidth:this.getTableMinWidth()}},e("caption",{key:"961a09c0d6e5faff72e65ef9a3aeaa9df0f0ed41",class:"kol-table__focus-element kol-table__caption",id:"caption",tabindex:this.tableDivElementHasScrollbar?"0":void 0},this.state._label),Array.isArray(r)&&e("thead",{key:"12bb291debe3b8532f7ffa862a3e9698903598f5",class:"kol-table__head"},[r.map((t,r)=>e("tr",{class:"kol-table__head-row",key:`thead-${r}`},this.state._selection&&this.renderHeadingSelectionCell(),0===r&&this.renderHeaderTdCell(),Array.isArray(t)&&t.map((e,t)=>this.renderHeadingCell(e,r,t,!1)))),this.renderSpacer("head",r)]),e("tbody",{key:"bba0270d6ca03234ebe2b12b101c589439bda99d",class:"kol-table__body"},t.map((e,t)=>this.renderTableRow(e,t,!0))),this.renderFoot())))}get host(){return r(this)}static get watchers(){return{_hasSettingsMenu:["validateHasSettingsMenu"],_data:["validateData"],_dataFoot:["validateDataFoot"],_headerCells:["validateHeaderCells"],_label:["validateLabel"],_on:["validateOn"],_selection:["validateSelection"]}}};export{cr as kol_table_stateless_wc};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as n,h as e}from"./index-CuUGQ2WZ.js";import{o as t}from"./component-names-B_kYyA8u.js";import"./common-BXXICkFX.js";const o="@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 opacity: 0.5;\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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 :host {\n display: inline-block;\n }\n .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-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\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-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n gap: 0.25rem;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",i=class{constructor(e){n(this,e)}render(){return e(t,{key:"4f2c23853dd8f38baeb961bf35cc5f651cd45605",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_on:this._on,_selection:this._selection,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
|
|
4
|
+
import{r as n,h as e}from"./index-Zs2j78jP.js";import{o as t}from"./component-names-B_kYyA8u.js";import"./common-BXXICkFX.js";const o="@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 opacity: 0.5;\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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 :host {\n display: inline-block;\n }\n .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-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\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-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(140 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n table-layout: fixed;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__sort {\n display: inline-flex;\n gap: 0.25rem;\n align-items: center;\n }\n .kol-table__sort-order {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",i=class{constructor(e){n(this,e)}render(){return e(t,{key:"4f2c23853dd8f38baeb961bf35cc5f651cd45605",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_on:this._on,_selection:this._selection,_hasSettingsMenu:this._hasSettingsMenu})}};i.style={default:o};export{i as kol_table_stateless};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as n,g as e}from"./index-CuUGQ2WZ.js";import{w as i,d as o,j as a,s,M as l,G as r,H as d,P as h}from"./common-BXXICkFX.js";import{v as c}from"./align-C_bkzA-y.js";import{v as u}from"./label-Dkj9sxQK.js";import{c as f}from"./clsx-eK3rPvPS.js";import{d as p}from"./component-names-B_kYyA8u.js";import{t as b}from"./i18n-CvQhdUrE.js";import{K as m}from"./keyboard-DNd73LVa.js";import{d as g,K as y}from"./events-DHTi_wtD.js";import"./i18n-B0tfVPMa.js";const v=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&v.includes(t),new Set([`KoliBriTabBehavior {${v.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* 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 opacity: 0.5;\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${b("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case m.ArrowRight:this.goToNextTab(t);break;case m.ArrowLeft:this.goToPreviousTab(t);break;case m.Space:case m.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);a("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&g(this.host,y.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(p,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(p,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"kolicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"d2ead3f3fa8c12ae4e4d658ced80bd9915e358ca",ref:t=>{this.tabPanelsElement=t},class:f("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"a0e9d89632c7dd6af0c0d9ed9f53e6a4d9829fe5",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),s(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&g(this.host,y.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};
|
|
4
|
+
import{r as t,h as n,g as e}from"./index-Zs2j78jP.js";import{w as i,d as o,j as a,s,M as l,G as r,H as d,P as h}from"./common-BXXICkFX.js";import{v as c}from"./align-C_bkzA-y.js";import{v as u}from"./label-Dkj9sxQK.js";import{c as f}from"./clsx-eK3rPvPS.js";import{d as p}from"./component-names-B_kYyA8u.js";import{t as b}from"./i18n-CvQhdUrE.js";import{K as m}from"./keyboard-DNd73LVa.js";import{d as g,K as y}from"./events-DHTi_wtD.js";import"./i18n-B0tfVPMa.js";const v=["select-automatic","select-manual"],k=(t,e)=>{i(t,"_behavior",t=>"string"==typeof t&&v.includes(t),new Set([`KoliBriTabBehavior {${v.join(", ")}`]),e)},_=(t,e)=>{o(t,"_hasCreateButton",e)},w="/* 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 opacity: 0.5;\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",x=class{constructor(e){t(this,e),this.onCreateLabel=`${b("kol-new")} …`,this.nextPossibleTabIndex=(t,e,n=1)=>{const o=e+n;return o<t.length?t[o]._disabled?this.nextPossibleTabIndex(t,e,n+1):o:e},this.prevPossibleTabIndex=(t,e,n=1)=>{const o=e-n;return o>=0?t[o]._disabled?this.prevPossibleTabIndex(t,e,n+1):o:e},this.onKeyDown=t=>{switch(t.key){case m.ArrowRight:this.goToNextTab(t);break;case m.ArrowLeft:this.goToPreviousTab(t);break;case m.Space:case m.Enter:this.activateFocusedTab(t)}},this.onClickSelect=(t,e)=>{this.selectNextTabEvent(t,e)},this.onMouseDown=t=>{t.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=t=>{this.tabPanelHost=t},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(t,e,n=!0,o)=>{if(t>e.length-1&&(t=e.length-1),t<0&&(t=0),Array.isArray(e)&&e[t]&&e[t]._disabled){if(!0===n){if(t<e.length-1)return this.selectNextNotDisabledTab(t+1,e,!0,o||t);t=o||t,n=!1}if(!1===n){if(t>0)return this.selectNextNotDisabledTab(t-1,e,!1,o||t);a("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return t},this.syncSelectedAndTabs=(t,e,n,o)=>{let i,a;i="_selected"===o?t:this.state._selected,a="_tabs"===o?t:this.state._tabs,a.length>0&&e.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var t,e,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(t=this.state._tabs)||void 0===t?void 0:t.length);i++){const t=document.createElement("div");t.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),t.setAttribute("id",`tabpanel-${i}`),t.setAttribute("role","tabpanel"),t.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),t.appendChild(a),null===(e=this.tabPanelHost)||void 0===e||e.appendChild(t),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((t,e)=>{e===this.state._selected?t.removeAttribute("hidden"):t.setAttribute("hidden","")})},this.onCreate=t=>{var e,n;t.preventDefault(),null===(n=null===(e=this.state._on)||void 0===e?void 0:e.onCreate)||void 0===n||n.call(e,t),this.host&&g(this.host,y.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(t){const e=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}goToPreviousTab(t){const e=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(t,e,this.getKeyboardTabChangeMode())}activateFocusedTab(t){"number"==typeof this.currentFocusIndex&&this.onSelect(t,this.currentFocusIndex)}selectNextTabEvent(t,e,n="activateCompletely"){var o,i;if(this.currentFocusIndex=e,this.focusTabById(e),"activateCompletely"===n){this._selected=e;null===(i=null===(o=this.state._tabs[e]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,t,e),this.onSelect(t,e)}}renderButtonGroup(){return n("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((t,e)=>n(p,{_disabled:t._disabled,_icons:t._icons,_hideLabel:t._hideLabel,_label:t._label,_on:this.callbacks,_tabIndex:this.state._selected===e?0:-1,_tooltipAlign:t._tooltipAlign,_buttonVariant:this.state._selected===e?"custom":void 0,_customClass:this.state._selected===e?"selected":void 0,_ariaControls:`tabpanel-${e}`,_ariaSelected:this.state._selected===e,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${e}`,_role:"tab",_value:e})),this.state._hasCreateButton&&n(p,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"kolicon-plus","data-testid":"tabs-create-button"}))}render(){return n("div",{key:"d2ead3f3fa8c12ae4e4d658ced80bd9915e358ca",ref:t=>{this.tabPanelsElement=t},class:f("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),n("div",{key:"a0e9d89632c7dd6af0c0d9ed9f53e6a4d9829fe5",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(t){c(this,t)}validateBehavior(t){k(this,t)}validateHasCreateButton(t){_(this,t)}validateLabel(t){u(this,t,{required:!0})}validateOn(t){if("object"==typeof t&&null!==t){const e={};"function"==typeof t.onCreate&&(e.onCreate=t.onCreate),"function"==typeof t.onSelect&&(e.onSelect=t.onSelect),s(this,"_on",e)}}validateSelected(t){l(this,"_selected",t,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(t){r(this,"_tabs",t=>"object"==typeof t&&null!==t&&"string"==typeof t._label&&t._label.length>0,t,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),d("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(t){if(this.tabPanelsElement){const e=h(`button#${this.state._label.replace(/\s/g,"-")}-tab-${t}`,this.tabPanelsElement);null==e||e.focus()}}onSelect(t,e){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,t,e),this.host&&g(this.host,y.select,e),this.focusTabById(e)}get host(){return e(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};x.style={default:w};export{x as kol_tabs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kol-textarea.entry.esm.js","sources":["src/schema/props/resize-textarea.ts","src/functional-components/inputs/TextArea/TextArea.tsx","src/functional-component-wrappers/TextAreaStateWrapper/TextAreaStateWrapper.tsx","src/components/textarea/controller.ts","src/components/textarea/style.scss?tag=kol-textarea&mode=default&encapsulation=shadow","src/components/textarea/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../utils';\n\nexport const textareaResizeOptions = ['vertical', 'none'] as const;\nexport type TextareaResizePropType = (typeof textareaResizeOptions)[number];\n\n/**\n * Defines how the textarea can be resized by the user.\n */\nexport type PropResizeTextarea = {\n\tresize: TextareaResizePropType;\n};\n\nconst isTextareaResizePropType = (value: unknown): value is TextareaResizePropType => {\n\treturn typeof value === 'string' && textareaResizeOptions.includes(value as TextareaResizePropType);\n};\n\nexport const validateResizeTextarea = (component: Generic.Element.Component, value?: TextareaResizePropType): void => {\n\twatchValidator(component, '_resize', isTextareaResizePropType, new Set(textareaResizeOptions), value, {\n\t\tdefaultValue: 'vertical',\n\t});\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { getMsgType, isMsgDefinedAndInputTouched, type MsgPropType, type Stringified } from '../../../schema';\nimport { getDefaultProps } from '../_helpers/getDefaultProps';\nimport type { DefaultInputProps } from '../_types';\n\nexport type TextAreaProps = DefaultInputProps<JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement>> & {\n\tvalue: string;\n\ttouched?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n} & {\n\t[key: `aria-${string}`]: unknown;\n\t[key: `data-${string}`]: unknown;\n};\n\nconst TextAreaFc: FC<TextAreaProps> = (props) => {\n\tconst { class: classNames, msg, touched, readonly, disabled, required, ariaDescribedBy, hideLabel, label, ...other } = props;\n\n\tconst stateCssClasses = {\n\t\t['kol-textarea--disabled']: Boolean(disabled),\n\t\t['kol-textarea--required']: Boolean(required),\n\t\t['kol-textarea--touched']: Boolean(touched),\n\t\t['kol-textarea--readonly']: Boolean(readonly),\n\t\t[`kol-textarea--${getMsgType(msg)}`]: isMsgDefinedAndInputTouched(msg, touched),\n\t};\n\n\tconst inputProps: JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement> = {\n\t\tclass: clsx('kol-textarea', stateCssClasses, classNames),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\treadonly: readonly,\n\t\t...getDefaultProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...other,\n\t};\n\n\treturn <textarea {...inputProps} />;\n};\n\nexport default TextAreaFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolTextAreaFc, { type TextAreaProps } from '../../functional-components/inputs/TextArea';\n\nimport { type MsgPropType, type TextareaStates } from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\n\nexport type TextAreaStateWrapperProps = Partial<TextAreaProps> & {\n\tstate: TextareaStates;\n};\n\nfunction getTextAreaProps(state: TextareaStates, other: Partial<TextAreaProps>): TextAreaProps {\n\tconst renderStates = getRenderStates(state);\n\tconst ariaDescribedBy = [...renderStates.ariaDescribedBy, ...(other.ariaDescribedBy ?? [])];\n\n\tconst props: TextAreaProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tvalue: state._value as string,\n\t\taccessKey: state._accessKey,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\t\trows: state._rows,\n\t\treadonly: state._readOnly,\n\t\trequired: state._required,\n\t\tplaceholder: state._placeholder,\n\t\ttouched: state._touched,\n\t\tmsg: state._msg as MsgPropType,\n\t\t...other,\n\t\tariaDescribedBy,\n\t};\n\n\tif ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') {\n\t\tprops.maxLength = state._maxLength;\n\t}\n\tif ('_shortKey' in state) props['aria-keyshortcuts'] = state._shortKey;\n\n\treturn props;\n}\n\nconst TextAreaStateWrapper: FC<TextAreaStateWrapperProps> = ({ state, ...other }) => {\n\treturn <KolTextAreaFc {...getTextAreaProps(state, other)} />;\n};\n\nexport default TextAreaStateWrapper;\n","import type {\n\tHasCounterPropType,\n\tMaxLengthBehaviorPropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n\tRowsPropType,\n\tSpellCheckPropType,\n\tTextareaProps,\n\tTextareaResizePropType,\n\tTextareaWatches,\n} from '../../schema';\nimport {\n\tvalidateHasCounter,\n\tvalidateMaxLength,\n\tvalidateMaxLengthBehavior,\n\tvalidatePlaceholder,\n\tvalidateReadOnly,\n\tvalidateRequired,\n\tvalidateResizeTextarea,\n\tvalidateRows,\n\tvalidateSpellCheck,\n\twatchString,\n} from '../../schema';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\n\nexport class TextareaController extends InputIconController implements TextareaWatches {\n\tprotected readonly component: Generic.Element.Component & TextareaProps;\n\n\tpublic constructor(component: Generic.Element.Component & TextareaProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string') {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t\tthis.updateCurrentLengthDebounced(this.component._value.length);\n\t\t}\n\t};\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tvalidateMaxLengthBehavior(this.component, value);\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\tvalidateMaxLength(this.component, value, {\n\t\t\thooks: { afterPatch: this.afterSyncCharCounter },\n\t\t});\n\t}\n\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tvalidatePlaceholder(this.component, value);\n\t}\n\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tvalidateReadOnly(this.component, value);\n\t}\n\n\tpublic validateResize(value?: TextareaResizePropType): void {\n\t\tvalidateResizeTextarea(this.component, value);\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tvalidateRows(this.component, value);\n\t}\n\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLengthBehavior(this.component._maxLengthBehavior);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateResize(this.component._resize);\n\t\tthis.validateRows(this.component._rows);\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@use '../../styles/global' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../../styles/kol-form-field-mixin' as *;\n@use '../../styles/kol-input-container-mixin' as *;\n@use '../@shared/mixins' as *;\n@use '../host-display-block' as *;\n\n@layer kol-component {\n\t@include kol-alert;\n\t@include kol-form-field;\n\t@include kol-input-container;\n\n\t.kol-textarea {\n\t\twidth: 100%;\n\n\t\t&:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type {\n\tAdjustHeightPropType,\n\tDisabledPropType,\n\tFocusableElement,\n\tHasCounterPropType,\n\tHideLabelPropType,\n\tHideMsgPropType,\n\tHintPropType,\n\tIconsHorizontalPropType,\n\tIdPropType,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMaxLengthBehaviorPropType,\n\tMsgPropType,\n\tNamePropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n\tRowsPropType,\n\tShortKeyPropType,\n\tSpellCheckPropType,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTextareaAPI,\n\tTextareaResizePropType,\n\tTextareaStates,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper/FormFieldStateWrapper';\nimport KolInputContainerStateWrapperFc from '../../functional-component-wrappers/InputContainerStateWrapper/InputContainerStateWrapper';\nimport KolTextAreaStateWrapperFc, { type TextAreaStateWrapperProps } from '../../functional-component-wrappers/TextAreaStateWrapper/TextAreaStateWrapper';\nimport { nonce } from '../../utils/dev.utils';\nimport { TextareaController } from './controller';\n\n/**\n * https://stackoverflow.com/questions/17772260/textarea-auto-height\n */\nconst increaseTextareaHeight = (el: HTMLTextAreaElement): number => {\n\tel.style.overflow = 'hidden'; // verhindert, dass ein Scrollbalken kurz angezeigt wird\n\tconst currentRows = el.rows;\n\tconst rowHeight = el.clientHeight / currentRows;\n\tel.rows = 1;\n\tconst nextRows = Math.round(el.scrollHeight / rowHeight);\n\tel.rows = currentRows;\n\treturn nextRows;\n};\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-textarea',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTextarea implements TextareaAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolTextareaElement;\n\tprivate textareaRef?: HTMLTextAreaElement;\n\n\tprivate readonly catchRef = (ref?: HTMLTextAreaElement) => {\n\t\tthis.textareaRef = ref;\n\t};\n\n\t/**\n\t * Returns the current value.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<string | undefined> {\n\t\treturn this.textareaRef?.value;\n\t}\n\n\t/**\n\t * Sets focus on the internal element.\n\t */\n\t@Method()\n\tpublic async focus() {\n\t\treturn Promise.resolve(this.textareaRef?.focus());\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tclass: clsx('kol-form-field-textarea', {\n\t\t\t\t'kol-form-field--has-value': this.state._hasValue,\n\t\t\t\t'kol-form-field--has-counter': this.controller.hasSoftCharacterLimit() || this.controller.hasCounter(),\n\t\t\t}),\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\talert: this.showAsAlert(),\n\t\t};\n\t}\n\n\tprivate getTextAreaProps(): TextAreaStateWrapperProps {\n\t\tconst ariaDescribedBy = typeof this.state._maxLength === 'number' ? [`${this.state._id}-character-limit-hint`] : undefined; // When a character limit is defined, we provide an additional hint referenced by aria-describedby.\n\n\t\treturn {\n\t\t\tref: this.catchRef,\n\t\t\tstate: this.state,\n\t\t\tstyle: {\n\t\t\t\tresize: this.state._resize,\n\t\t\t},\n\t\t\tariaDescribedBy,\n\t\t\t...this.controller.onFacade,\n\t\t\tonInput: this.onInput,\n\t\t\tonFocus: (event: Event) => {\n\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\tthis.inputHasFocus = true;\n\t\t\t},\n\t\t\tonBlur: (event: Event) => {\n\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\tthis.inputHasFocus = false;\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()}>\n\t\t\t\t<KolInputContainerStateWrapperFc state={this.state}>\n\t\t\t\t\t<KolTextAreaStateWrapperFc {...this.getTextAreaProps()} />\n\t\t\t\t</KolInputContainerStateWrapperFc>\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: TextareaController;\n\n\t/**\n\t * Defines the key combination that can be used to trigger or focus the component's interactive element.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Adjusts the height of the element to its content.\n\t * @TODO: change back to AdjustHeightPropType after stencil #4663 has been resolved\n\t */\n\t@Prop() public _adjustHeight?: boolean = false;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideMsgPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideMsg?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsHorizontalPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @deprecated Will be removed in the next major version.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Shows a character counter for the input element.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Defines the behavior when maxLength is set. 'hard' sets the maxlength attribute, 'soft' shows a character counter without preventing input.\n\t */\n\t@Prop() public _maxLengthBehavior?: MaxLengthBehaviorPropType = 'hard';\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Defines whether and in which direction the size of the input can be changed by the user. (https://developer.mozilla.org/de/docs/Web/CSS/resize)\n\t * In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `vertical` (default) and `none`.\n\t */\n\t@Prop() public _resize?: TextareaResizePropType = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Maximum number of visible rows of the element.\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _rows?: RowsPropType;\n\n\t/**\n\t * Adds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Defines whether the browser should check the spelling and grammar.\n\t */\n\t@Prop() public _spellCheck?: SpellCheckPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the element.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _value?: string;\n\n\t@State() public state: TextareaStates = {\n\t\t_adjustHeight: false,\n\t\t_currentLength: 0,\n\t\t_currentLengthDebounced: 0,\n\t\t_hasValue: false,\n\t\t_hideMsg: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_resize: 'vertical',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new TextareaController(this, 'textarea', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_adjustHeight')\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tthis.controller.validateAdjustHeight(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: DisabledPropType): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideMsg')\n\tpublic validateHideMsg(value?: HideMsgPropType): void {\n\t\tthis.controller.validateHideMsg(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: HideLabelPropType): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: HintPropType): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: IconsHorizontalPropType): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_maxLengthBehavior')\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tthis.controller.validateMaxLengthBehavior(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_resize')\n\tpublic validateResize(value?: TextareaResizePropType): void {\n\t\tthis.controller.validateResize(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_rows')\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tthis.controller.validateRows(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_spellCheck')\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tthis.controller.validateSpellCheck(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentDidLoad(): void {\n\t\tsetTimeout(() => {\n\t\t\tif (this._adjustHeight === true && this.textareaRef /* SSR instanceof HTMLTextAreaElement */) {\n\t\t\t\tthis._rows =\n\t\t\t\t\tthis.state?._rows && this.state._rows > increaseTextareaHeight(this.textareaRef) ? this.state._rows : increaseTextareaHeight(this.textareaRef);\n\t\t\t} else if (!this._rows) {\n\t\t\t\tthis._rows = 1;\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tprivate readonly onInput = (event: InputEvent) => {\n\t\tif (this.textareaRef instanceof HTMLTextAreaElement) {\n\t\t\tthis._value = this.textareaRef.value;\n\t\t\tif (this.state._adjustHeight) {\n\t\t\t\tthis._rows = increaseTextareaHeight(this.textareaRef);\n\t\t\t}\n\t\t\tthis.controller.onFacade.onInput(event);\n\t\t}\n\t};\n}\n"],"names":["KolTextAreaFc","KolFormFieldStateWrapperFc","KolInputContainerStateWrapperFc","KolTextAreaStateWrapperFc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA2C;AAC7F,gBAAA,IAAI,CAAC,KAAK;oBACT,CAAA,MAAA,IAAI,CAAC,KAAK,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,KAAK,KAAI,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC;;AACzI,iBAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;AACvB,gBAAA,IAAI,CAAC,KAAK,GAAG,CAAC;;AAEhB,SAAC,CAAC;;IAGI,iBAAiB,GAAA;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI;AACtC,QAAA,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE;AACnC,QAAA,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;QAC1C,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"kol-textarea.entry.esm.js","sources":["src/schema/props/resize-textarea.ts","src/functional-components/inputs/TextArea/TextArea.tsx","src/functional-component-wrappers/TextAreaStateWrapper/TextAreaStateWrapper.tsx","src/components/textarea/controller.ts","src/components/textarea/style.scss?tag=kol-textarea&mode=default&encapsulation=shadow","src/components/textarea/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../utils';\n\nexport const textareaResizeOptions = ['vertical', 'none'] as const;\nexport type TextareaResizePropType = (typeof textareaResizeOptions)[number];\n\n/**\n * Defines how the textarea can be resized by the user.\n */\nexport type PropResizeTextarea = {\n\tresize: TextareaResizePropType;\n};\n\nconst isTextareaResizePropType = (value: unknown): value is TextareaResizePropType => {\n\treturn typeof value === 'string' && textareaResizeOptions.includes(value as TextareaResizePropType);\n};\n\nexport const validateResizeTextarea = (component: Generic.Element.Component, value?: TextareaResizePropType): void => {\n\twatchValidator(component, '_resize', isTextareaResizePropType, new Set(textareaResizeOptions), value, {\n\t\tdefaultValue: 'vertical',\n\t});\n};\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { getMsgType, isMsgDefinedAndInputTouched, type MsgPropType, type Stringified } from '../../../schema';\nimport { getDefaultProps } from '../_helpers/getDefaultProps';\nimport type { DefaultInputProps } from '../_types';\n\nexport type TextAreaProps = DefaultInputProps<JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement>> & {\n\tvalue: string;\n\ttouched?: boolean;\n\tmsg?: Stringified<MsgPropType>;\n} & {\n\t[key: `aria-${string}`]: unknown;\n\t[key: `data-${string}`]: unknown;\n};\n\nconst TextAreaFc: FC<TextAreaProps> = (props) => {\n\tconst { class: classNames, msg, touched, readonly, disabled, required, ariaDescribedBy, hideLabel, label, ...other } = props;\n\n\tconst stateCssClasses = {\n\t\t['kol-textarea--disabled']: Boolean(disabled),\n\t\t['kol-textarea--required']: Boolean(required),\n\t\t['kol-textarea--touched']: Boolean(touched),\n\t\t['kol-textarea--readonly']: Boolean(readonly),\n\t\t[`kol-textarea--${getMsgType(msg)}`]: isMsgDefinedAndInputTouched(msg, touched),\n\t};\n\n\tconst inputProps: JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement> = {\n\t\tclass: clsx('kol-textarea', stateCssClasses, classNames),\n\t\trequired: required,\n\t\tdisabled: disabled,\n\t\treadonly: readonly,\n\t\t...getDefaultProps({ ariaDescribedBy, hideLabel, label }),\n\t\t...other,\n\t};\n\n\treturn <textarea {...inputProps} />;\n};\n\nexport default TextAreaFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolTextAreaFc, { type TextAreaProps } from '../../functional-components/inputs/TextArea';\n\nimport { type MsgPropType, type TextareaStates } from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\n\nexport type TextAreaStateWrapperProps = Partial<TextAreaProps> & {\n\tstate: TextareaStates;\n};\n\nfunction getTextAreaProps(state: TextareaStates, other: Partial<TextAreaProps>): TextAreaProps {\n\tconst renderStates = getRenderStates(state);\n\tconst ariaDescribedBy = [...renderStates.ariaDescribedBy, ...(other.ariaDescribedBy ?? [])];\n\n\tconst props: TextAreaProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tvalue: state._value as string,\n\t\taccessKey: state._accessKey,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\t\trows: state._rows,\n\t\treadonly: state._readOnly,\n\t\trequired: state._required,\n\t\tplaceholder: state._placeholder,\n\t\ttouched: state._touched,\n\t\tmsg: state._msg as MsgPropType,\n\t\t...other,\n\t\tariaDescribedBy,\n\t};\n\n\tif ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') {\n\t\tprops.maxLength = state._maxLength;\n\t}\n\tif ('_shortKey' in state) props['aria-keyshortcuts'] = state._shortKey;\n\n\treturn props;\n}\n\nconst TextAreaStateWrapper: FC<TextAreaStateWrapperProps> = ({ state, ...other }) => {\n\treturn <KolTextAreaFc {...getTextAreaProps(state, other)} />;\n};\n\nexport default TextAreaStateWrapper;\n","import type {\n\tHasCounterPropType,\n\tMaxLengthBehaviorPropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n\tRowsPropType,\n\tSpellCheckPropType,\n\tTextareaProps,\n\tTextareaResizePropType,\n\tTextareaWatches,\n} from '../../schema';\nimport {\n\tvalidateHasCounter,\n\tvalidateMaxLength,\n\tvalidateMaxLengthBehavior,\n\tvalidatePlaceholder,\n\tvalidateReadOnly,\n\tvalidateRequired,\n\tvalidateResizeTextarea,\n\tvalidateRows,\n\tvalidateSpellCheck,\n\twatchString,\n} from '../../schema';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\n\nexport class TextareaController extends InputIconController implements TextareaWatches {\n\tprotected readonly component: Generic.Element.Component & TextareaProps;\n\n\tpublic constructor(component: Generic.Element.Component & TextareaProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprivate afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string') {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t\tthis.updateCurrentLengthDebounced(this.component._value.length);\n\t\t}\n\t};\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tvalidateMaxLengthBehavior(this.component, value);\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\tvalidateMaxLength(this.component, value, {\n\t\t\thooks: { afterPatch: this.afterSyncCharCounter },\n\t\t});\n\t}\n\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tvalidatePlaceholder(this.component, value);\n\t}\n\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tvalidateReadOnly(this.component, value);\n\t}\n\n\tpublic validateResize(value?: TextareaResizePropType): void {\n\t\tvalidateResizeTextarea(this.component, value);\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tvalidateRows(this.component, value);\n\t}\n\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLengthBehavior(this.component._maxLengthBehavior);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateResize(this.component._resize);\n\t\tthis.validateRows(this.component._rows);\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@use '../../styles/global' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../../styles/kol-form-field-mixin' as *;\n@use '../../styles/kol-input-container-mixin' as *;\n@use '../@shared/mixins' as *;\n@use '../host-display-block' as *;\n\n@layer kol-component {\n\t@include kol-alert;\n\t@include kol-form-field;\n\t@include kol-input-container;\n\n\t.kol-textarea {\n\t\twidth: 100%;\n\n\t\t&:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type {\n\tAdjustHeightPropType,\n\tDisabledPropType,\n\tFocusableElement,\n\tHasCounterPropType,\n\tHideLabelPropType,\n\tHideMsgPropType,\n\tHintPropType,\n\tIconsHorizontalPropType,\n\tIdPropType,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMaxLengthBehaviorPropType,\n\tMsgPropType,\n\tNamePropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n\tRowsPropType,\n\tShortKeyPropType,\n\tSpellCheckPropType,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTextareaAPI,\n\tTextareaResizePropType,\n\tTextareaStates,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper/FormFieldStateWrapper';\nimport KolInputContainerStateWrapperFc from '../../functional-component-wrappers/InputContainerStateWrapper/InputContainerStateWrapper';\nimport KolTextAreaStateWrapperFc, { type TextAreaStateWrapperProps } from '../../functional-component-wrappers/TextAreaStateWrapper/TextAreaStateWrapper';\nimport { nonce } from '../../utils/dev.utils';\nimport { TextareaController } from './controller';\n\n/**\n * https://stackoverflow.com/questions/17772260/textarea-auto-height\n */\nconst increaseTextareaHeight = (el: HTMLTextAreaElement): number => {\n\tel.style.overflow = 'hidden'; // verhindert, dass ein Scrollbalken kurz angezeigt wird\n\tconst currentRows = el.rows;\n\tconst rowHeight = el.clientHeight / currentRows;\n\tel.rows = 1;\n\tconst nextRows = Math.round(el.scrollHeight / rowHeight);\n\tel.rows = currentRows;\n\treturn nextRows;\n};\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-textarea',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTextarea implements TextareaAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolTextareaElement;\n\tprivate textareaRef?: HTMLTextAreaElement;\n\n\tprivate readonly catchRef = (ref?: HTMLTextAreaElement) => {\n\t\tthis.textareaRef = ref;\n\t};\n\n\t/**\n\t * Returns the current value.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<string | undefined> {\n\t\treturn this.textareaRef?.value;\n\t}\n\n\t/**\n\t * Sets focus on the internal element.\n\t */\n\t@Method()\n\tpublic async focus() {\n\t\treturn Promise.resolve(this.textareaRef?.focus());\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tclass: clsx('kol-form-field-textarea', {\n\t\t\t\t'kol-form-field--has-value': this.state._hasValue,\n\t\t\t\t'kol-form-field--has-counter': this.controller.hasSoftCharacterLimit() || this.controller.hasCounter(),\n\t\t\t}),\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\talert: this.showAsAlert(),\n\t\t};\n\t}\n\n\tprivate getTextAreaProps(): TextAreaStateWrapperProps {\n\t\tconst ariaDescribedBy = typeof this.state._maxLength === 'number' ? [`${this.state._id}-character-limit-hint`] : undefined; // When a character limit is defined, we provide an additional hint referenced by aria-describedby.\n\n\t\treturn {\n\t\t\tref: this.catchRef,\n\t\t\tstate: this.state,\n\t\t\tstyle: {\n\t\t\t\tresize: this.state._resize,\n\t\t\t},\n\t\t\tariaDescribedBy,\n\t\t\t...this.controller.onFacade,\n\t\t\tonInput: this.onInput,\n\t\t\tonFocus: (event: Event) => {\n\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\tthis.inputHasFocus = true;\n\t\t\t},\n\t\t\tonBlur: (event: Event) => {\n\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\tthis.inputHasFocus = false;\n\t\t\t},\n\t\t};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()}>\n\t\t\t\t<KolInputContainerStateWrapperFc state={this.state}>\n\t\t\t\t\t<KolTextAreaStateWrapperFc {...this.getTextAreaProps()} />\n\t\t\t\t</KolInputContainerStateWrapperFc>\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: TextareaController;\n\n\t/**\n\t * Defines the key combination that can be used to trigger or focus the component's interactive element.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Adjusts the height of the element to its content.\n\t * @TODO: change back to AdjustHeightPropType after stencil #4663 has been resolved\n\t */\n\t@Prop() public _adjustHeight?: boolean = false;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideMsgPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideMsg?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsHorizontalPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @deprecated Will be removed in the next major version.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Shows a character counter for the input element.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Defines the behavior when maxLength is set. 'hard' sets the maxlength attribute, 'soft' shows a character counter without preventing input.\n\t */\n\t@Prop() public _maxLengthBehavior?: MaxLengthBehaviorPropType = 'hard';\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Defines whether and in which direction the size of the input can be changed by the user. (https://developer.mozilla.org/de/docs/Web/CSS/resize)\n\t * In version 3 (v3), horizontal resizing is abolished. The corresponding property is then reduced to the properties `vertical` (default) and `none`.\n\t */\n\t@Prop() public _resize?: TextareaResizePropType = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Maximum number of visible rows of the element.\n\t */\n\t@Prop({ mutable: true, reflect: false }) public _rows?: RowsPropType;\n\n\t/**\n\t * Adds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Defines whether the browser should check the spelling and grammar.\n\t */\n\t@Prop() public _spellCheck?: SpellCheckPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the element.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _value?: string;\n\n\t@State() public state: TextareaStates = {\n\t\t_adjustHeight: false,\n\t\t_currentLength: 0,\n\t\t_currentLengthDebounced: 0,\n\t\t_hasValue: false,\n\t\t_hideMsg: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_resize: 'vertical',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new TextareaController(this, 'textarea', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_adjustHeight')\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tthis.controller.validateAdjustHeight(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: DisabledPropType): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideMsg')\n\tpublic validateHideMsg(value?: HideMsgPropType): void {\n\t\tthis.controller.validateHideMsg(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: HideLabelPropType): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: HintPropType): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: IconsHorizontalPropType): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_maxLengthBehavior')\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tthis.controller.validateMaxLengthBehavior(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_resize')\n\tpublic validateResize(value?: TextareaResizePropType): void {\n\t\tthis.controller.validateResize(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_rows')\n\tpublic validateRows(value?: RowsPropType): void {\n\t\tthis.controller.validateRows(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_spellCheck')\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tthis.controller.validateSpellCheck(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentDidLoad(): void {\n\t\tsetTimeout(() => {\n\t\t\tif (this._adjustHeight === true && this.textareaRef /* SSR instanceof HTMLTextAreaElement */) {\n\t\t\t\tthis._rows =\n\t\t\t\t\tthis.state?._rows && this.state._rows > increaseTextareaHeight(this.textareaRef) ? this.state._rows : increaseTextareaHeight(this.textareaRef);\n\t\t\t} else if (!this._rows) {\n\t\t\t\tthis._rows = 1;\n\t\t\t}\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tprivate readonly onInput = (event: InputEvent) => {\n\t\tif (this.textareaRef instanceof HTMLTextAreaElement) {\n\t\t\tthis._value = this.textareaRef.value;\n\t\t\tif (this.state._adjustHeight) {\n\t\t\t\tthis._rows = increaseTextareaHeight(this.textareaRef);\n\t\t\t}\n\t\t\tthis.controller.onFacade.onInput(event);\n\t\t}\n\t};\n}\n"],"names":["KolTextAreaFc","KolFormFieldStateWrapperFc","KolInputContainerStateWrapperFc","KolTextAreaStateWrapperFc"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAM,qBAAqB,GAAG,CAAC,UAAU,EAAE,MAAM,CAAU;AAUlE,MAAM,wBAAwB,GAAG,CAAC,KAAc,KAAqC;IACpF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,qBAAqB,CAAC,QAAQ,CAAC,KAA+B,CAAC;AACpG,CAAC;AAEM,MAAM,sBAAsB,GAAG,CAAC,SAAoC,EAAE,KAA8B,KAAU;AACpH,IAAA,cAAc,CAAC,SAAS,EAAE,SAAS,EAAE,wBAAwB,EAAE,IAAI,GAAG,CAAC,qBAAqB,CAAC,EAAE,KAAK,EAAE;AACrG,QAAA,YAAY,EAAE,UAAU;AACxB,KAAA,CAAC;AACH,CAAC;;ACND,MAAM,UAAU,GAAsB,CAAC,KAAK,KAAI;IAC/C,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAe,GAAA,KAAK,EAAf,KAAK,GAAK,MAAA,CAAA,KAAK,EAAtH,CAAA,OAAA,EAAA,KAAA,EA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AM,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,r as t,g as n}from"./index-CuUGQ2WZ.js";import{c as i}from"./clsx-eK3rPvPS.js";import{d as a,g as o,i as s,a as l,F as r}from"./FormFieldStateWrapper-MGp6AfXi.js";import{I as d,a as h}from"./controller-icon-CGtdyUoC.js";import{_ as c}from"./tslib.es6-CxX45GIN.js";import{w as m,e as p}from"./common-BXXICkFX.js";import{n as u}from"./dev.utils-DmS6gtOI.js";import{a as f,v as b,b as v}from"./max-length-behavior-C7oPJjTW.js";import{v as y}from"./placeholder-C0qu-_xi.js";import{v as g}from"./read-only-DqzvkuwG.js";import{v as k}from"./required-IJ-wNQGn.js";import{v as _}from"./rows-CaNxvJ4Y.js";import{v as w}from"./spell-check-BBqBRmnp.js";import"./access-and-short-key-BlB0ZAri.js";import"./disabled-D0wfAqak.js";import"./hide-label-90DGA8H4.js";import"./label-Dkj9sxQK.js";import"./tooltip-align-P-7pyT1i.js";import"./align-C_bkzA-y.js";import"./events-DHTi_wtD.js";import"./associated.controller-ByKVIoVY.js";import"./bootstrap-bsjlQuLF.js";import"./component-names-B_kYyA8u.js";import"./i18n-B0tfVPMa.js";import"./isObject-DvSELytj.js";import"./reuse-CX4AQDkS.js";import"./i18n-CvQhdUrE.js";import"./InternalUnderlinedBadgeText-DzxAa9aS.js";import"./Alert-DPypTbnj.js";import"./bem-De7JANRY.js";import"./browser-DaourpHc.js";import"./Heading-Cv4P3nNi.js";import"./Icon-CyIigrVK.js";import"./icons-DpMX_jnF.js";const x=["vertical","none"],j=e=>"string"==typeof e&&x.includes(e),z=(e,t)=>{m(e,"_resize",j,new Set(x),t,{defaultValue:"vertical"})},B=t=>{const{class:n,msg:l,touched:r,readonly:d,disabled:h,required:m,ariaDescribedBy:p,hideLabel:u,label:f}=t,v=c(t,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),b={"kol-textarea--disabled":Boolean(h),"kol-textarea--required":Boolean(m),"kol-textarea--touched":Boolean(r),"kol-textarea--readonly":Boolean(d),[`kol-textarea--${o(l)}`]:s(l,r)},_=Object.assign(Object.assign({class:i("kol-textarea",b,n),required:m,disabled:h,readonly:d},a({ariaDescribedBy:p,hideLabel:u,label:f})),v);return e("textarea",Object.assign({},_))};function L(e,t){var n;const a=[...l(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],i=Object.assign(Object.assign({id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,touched:e._touched,msg:e._msg},t),{ariaDescribedBy:a});return"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(i.maxLength=e._maxLength),"_shortKey"in e&&(i["aria-keyshortcuts"]=e._shortKey),i}const S=t=>{var{state:n}=t,a=c(t,["state"]);return e(B,Object.assign({},L(n,a)))};class T extends d{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=e}validateHasCounter(e){f(this.component,e)}validateMaxLengthBehavior(e){b(this.component,e)}validateMaxLength(e){v(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){y(this.component,e)}validateReadOnly(e){g(this.component,e)}validateResize(e){z(this.component,e)}validateRequired(e){k(this.component,e)}validateRows(e){_(this.component,e)}validateSpellCheck(e){w(this.component,e)}validateValue(e){p(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateResize(this.component._resize),this.validateRows(this.component._rows),this.validateSpellCheck(this.component._spellCheck),this.validateValue(this.component._value)}}const A='/*\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 opacity: 0.5;\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*"/"";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .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:not(:empty)) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end:not(:empty)) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start:not(:empty)):has(> .kol-input-container__adornment--end:not(:empty)) {\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 height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}',C=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},D=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){var e;return Promise.resolve(null===(e=this.textareaRef)||void 0===e?void 0:e.focus())}getFormFieldProps(){return{state:this.state,class:i("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getTextAreaProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize},ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return e(r,Object.assign({key:"55fb2285f0d4035a7468359c26d7eae0333ebe2d"},this.getFormFieldProps()),e(h,{key:"2db1a595b9eef777a40f716b8596a03e03144aa7",state:this.state},e(S,Object.assign({key:"14d56cb30389a03cbb82ca2b76ee96eb60488e9e"},this.getTextAreaProps()))))}constructor(e){t(this,e),this.catchRef=e=>{this.textareaRef=e},this._adjustHeight=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._hasCounter=!1,this._maxLengthBehavior="hard",this._readOnly=!1,this._resize="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_adjustHeight:!1,_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${u()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(this._value=this.textareaRef.value,this.state._adjustHeight&&(this._rows=C(this.textareaRef)),this.controller.onFacade.onInput(e))},this.controller=new T(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout(()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>C(this.textareaRef)?this.state._rows:C(this.textareaRef):this._rows||(this._rows=1)})}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}get host(){return n(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_maxLengthBehavior:["validateMaxLengthBehavior"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};D.style={default:A};export{D as kol_textarea};
|
|
4
|
+
import{h as e,r as t,g as n}from"./index-Zs2j78jP.js";import{c as i}from"./clsx-eK3rPvPS.js";import{d as a,g as o,i as s,a as l,F as r}from"./FormFieldStateWrapper-D_aUwxXi.js";import{I as d,a as h}from"./controller-icon-BIEa5J_H.js";import{_ as c}from"./tslib.es6-CxX45GIN.js";import{w as m,e as p}from"./common-BXXICkFX.js";import{n as u}from"./dev.utils-DIHEE-25.js";import{a as f,v as b,b as v}from"./max-length-behavior-C7oPJjTW.js";import{v as y}from"./placeholder-C0qu-_xi.js";import{v as k}from"./read-only-DqzvkuwG.js";import{v as g}from"./required-IJ-wNQGn.js";import{v as _}from"./rows-CaNxvJ4Y.js";import{v as w}from"./spell-check-BBqBRmnp.js";import"./access-and-short-key-BlB0ZAri.js";import"./disabled-D0wfAqak.js";import"./hide-label-90DGA8H4.js";import"./label-Dkj9sxQK.js";import"./tooltip-align-P-7pyT1i.js";import"./align-C_bkzA-y.js";import"./events-DHTi_wtD.js";import"./associated.controller-ByKVIoVY.js";import"./bootstrap-bsjlQuLF.js";import"./component-names-B_kYyA8u.js";import"./i18n-B0tfVPMa.js";import"./isObject-DvSELytj.js";import"./reuse-CX4AQDkS.js";import"./i18n-CvQhdUrE.js";import"./InternalUnderlinedBadgeText-D3cO4EMH.js";import"./Alert-CQ_GJc9Z.js";import"./bem-De7JANRY.js";import"./browser-DaourpHc.js";import"./Heading-DZVP6zXi.js";import"./Icon-BSA26eyB.js";import"./icons-DpMX_jnF.js";const x=["vertical","none"],j=e=>"string"==typeof e&&x.includes(e),z=(e,t)=>{m(e,"_resize",j,new Set(x),t,{defaultValue:"vertical"})},B=t=>{const{class:n,msg:l,touched:r,readonly:d,disabled:h,required:m,ariaDescribedBy:p,hideLabel:u,label:f}=t,v=c(t,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),b={"kol-textarea--disabled":Boolean(h),"kol-textarea--required":Boolean(m),"kol-textarea--touched":Boolean(r),"kol-textarea--readonly":Boolean(d),[`kol-textarea--${o(l)}`]:s(l,r)},_=Object.assign(Object.assign({class:i("kol-textarea",b,n),required:m,disabled:h,readonly:d},a({ariaDescribedBy:p,hideLabel:u,label:f})),v);return e("textarea",Object.assign({},_))};function L(e,t){var n;const a=[...l(e).ariaDescribedBy,...null!==(n=t.ariaDescribedBy)&&void 0!==n?n:[]],i=Object.assign(Object.assign({id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,rows:e._rows,readonly:e._readOnly,required:e._required,placeholder:e._placeholder,touched:e._touched,msg:e._msg},t),{ariaDescribedBy:a});return"_maxLength"in e&&"_maxLengthBehavior"in e&&"hard"===e._maxLengthBehavior&&(i.maxLength=e._maxLength),"_shortKey"in e&&(i["aria-keyshortcuts"]=e._shortKey),i}const S=t=>{var{state:n}=t,a=c(t,["state"]);return e(B,Object.assign({},L(n,a)))};class T extends d{constructor(e,t,n){super(e,t,n),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=e}validateHasCounter(e){f(this.component,e)}validateMaxLengthBehavior(e){b(this.component,e)}validateMaxLength(e){v(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){y(this.component,e)}validateReadOnly(e){k(this.component,e)}validateResize(e){z(this.component,e)}validateRequired(e){g(this.component,e)}validateRows(e){_(this.component,e)}validateSpellCheck(e){w(this.component,e)}validateValue(e){p(this.component,"_value",e,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMaxLength(this.component._maxLength),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateResize(this.component._resize),this.validateRows(this.component._rows),this.validateSpellCheck(this.component._spellCheck),this.validateValue(this.component._value)}}const A="/*\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 opacity: 0.5;\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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\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 {\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--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text:not(:has(> [name]))::after,\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\"/\"\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\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:not(:empty)) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end:not(:empty)) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start:not(:empty)):has(> .kol-input-container__adornment--end:not(:empty)) {\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 height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}",D=e=>{e.style.overflow="hidden";const t=e.rows,n=e.clientHeight/t;e.rows=1;const a=Math.round(e.scrollHeight/n);return e.rows=t,a},q=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){var e;return Promise.resolve(null===(e=this.textareaRef)||void 0===e?void 0:e.focus())}getFormFieldProps(){return{state:this.state,class:i("kol-form-field-textarea",{"kol-form-field--has-value":this.state._hasValue,"kol-form-field--has-counter":this.controller.hasSoftCharacterLimit()||this.controller.hasCounter()}),tooltipAlign:this._tooltipAlign,alert:this.showAsAlert()}}getTextAreaProps(){const e="number"==typeof this.state._maxLength?[`${this.state._id}-character-limit-hint`]:void 0;return Object.assign(Object.assign({ref:this.catchRef,state:this.state,style:{resize:this.state._resize},ariaDescribedBy:e},this.controller.onFacade),{onInput:this.onInput,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}render(){return e(r,Object.assign({key:"55fb2285f0d4035a7468359c26d7eae0333ebe2d"},this.getFormFieldProps()),e(h,{key:"2db1a595b9eef777a40f716b8596a03e03144aa7",state:this.state},e(S,Object.assign({key:"14d56cb30389a03cbb82ca2b76ee96eb60488e9e"},this.getTextAreaProps()))))}constructor(e){t(this,e),this.catchRef=e=>{this.textareaRef=e},this._adjustHeight=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._hasCounter=!1,this._maxLengthBehavior="hard",this._readOnly=!1,this._resize="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_adjustHeight:!1,_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${u()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(this._value=this.textareaRef.value,this.state._adjustHeight&&(this._rows=D(this.textareaRef)),this.controller.onFacade.onInput(e))},this.controller=new T(this,"textarea",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAdjustHeight(e){this.controller.validateAdjustHeight(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHasCounter(e){this.controller.validateHasCounter(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout(()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>D(this.textareaRef)?this.state._rows:D(this.textareaRef):this._rows||(this._rows=1)})}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener(e=>this.state._hasValue=!!e)}get host(){return n(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_maxLengthBehavior:["validateMaxLengthBehavior"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};q.style={default:A};export{q as kol_textarea};
|