@public-ui/components 4.1.0 → 4.1.1-rc.1
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 +3 -5
- package/dist/cjs/{Alert-DaPojoDU.js → Alert-Db_ZEbGF.js} +1 -1
- package/dist/cjs/{Alert-DaPojoDU.js.map → Alert-Db_ZEbGF.js.map} +1 -1
- package/dist/cjs/{Collapsible-DtXj6HDK.js → Collapsible-PRnFyRUg.js} +1 -1
- package/dist/cjs/{Collapsible-DtXj6HDK.js.map → Collapsible-PRnFyRUg.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-BS8W6wzK.js → CustomSuggestionsOptionsGroup-BUi1zYwc.js} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-BS8W6wzK.js.map → CustomSuggestionsOptionsGroup-BUi1zYwc.js.map} +1 -1
- package/dist/cjs/FieldControlStateWrapper-BJlxfzl8.js +4 -0
- package/dist/cjs/{FieldControlStateWrapper-D1hdQ7_r.js.map → FieldControlStateWrapper-BJlxfzl8.js.map} +1 -1
- package/dist/cjs/FormFieldStateWrapper-BuI8MZey.js +4 -0
- package/dist/{kolibri/FormFieldStateWrapper-CZK7fy0I.js.map → cjs/FormFieldStateWrapper-BuI8MZey.js.map} +1 -1
- package/dist/cjs/{Heading-D0BN7_te.js → Heading-BxFn-5MB.js} +1 -1
- package/dist/cjs/{Heading-D0BN7_te.js.map → Heading-BxFn-5MB.js.map} +1 -1
- package/dist/cjs/{Icon-C074TTjg.js → Icon-C4f2m8-1.js} +1 -1
- package/dist/cjs/{Icon-C074TTjg.js.map → Icon-C4f2m8-1.js.map} +1 -1
- package/dist/cjs/{Input-BCqNjVe9.js → Input-BSSIWKSb.js} +1 -1
- package/dist/cjs/{Input-BCqNjVe9.js.map → Input-BSSIWKSb.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-B7s578UP.js → InputStateWrapper-LfZ-7FVe.js} +1 -1
- package/dist/cjs/{InputStateWrapper-B7s578UP.js.map → InputStateWrapper-LfZ-7FVe.js.map} +1 -1
- package/dist/cjs/InternalUnderlinedBadgeText-UMxcIT5f.js +4 -0
- package/dist/cjs/InternalUnderlinedBadgeText-UMxcIT5f.js.map +1 -0
- package/dist/cjs/Span-Bbfquyqf.js +4 -0
- package/dist/{esm/Span-K7CeTQnL.js.map → cjs/Span-Bbfquyqf.js.map} +1 -1
- package/dist/cjs/align-floating-elements-BokToY9Z.js +4 -0
- package/dist/cjs/align-floating-elements-BokToY9Z.js.map +1 -0
- package/dist/cjs/{app-globals-DE3XBQPi.js → app-globals-DwfsOZ9N.js} +1 -1
- package/dist/cjs/{app-globals-DE3XBQPi.js.map → app-globals-DwfsOZ9N.js.map} +1 -1
- package/dist/cjs/base-controller-Bb3KT5qb.js +4 -0
- package/dist/cjs/base-controller-Bb3KT5qb.js.map +1 -0
- package/dist/cjs/{bem-registry-DKrpaGx4.js → bem-registry-Nu8Olg0G.js} +1 -1
- package/dist/cjs/bem-registry-Nu8Olg0G.js.map +1 -0
- package/dist/cjs/controller-B6NQTXWH.js +4 -0
- package/dist/cjs/{controller-CrQCNnjJ.js.map → controller-B6NQTXWH.js.map} +1 -1
- package/dist/cjs/{controller-Bw7wVfGk.js → controller-BZcJinG_.js} +1 -1
- package/dist/cjs/{controller-Bw7wVfGk.js.map → controller-BZcJinG_.js.map} +1 -1
- package/dist/cjs/controller-D9u3kano.js +4 -0
- package/dist/cjs/{controller-BwOAbtj1.js.map → controller-D9u3kano.js.map} +1 -1
- package/dist/cjs/{controller-omsVepC6.js → controller-Dy3aGyVD.js} +1 -1
- package/dist/cjs/{controller-omsVepC6.js.map → controller-Dy3aGyVD.js.map} +1 -1
- package/dist/cjs/{controller-icon-_mRbPpze.js → controller-icon-BC2BKHwx.js} +1 -1
- package/dist/cjs/{controller-icon-_mRbPpze.js.map → controller-icon-BC2BKHwx.js.map} +1 -1
- package/dist/cjs/{dev.utils-9_C9HRCM.js → dev.utils-DphBw782.js} +1 -1
- package/dist/cjs/{dev.utils-9_C9HRCM.js.map → dev.utils-DphBw782.js.map} +1 -1
- package/dist/cjs/{devtools-C_l_Kr2L.js → devtools-CMTh3yM9.js} +1 -1
- package/dist/cjs/{devtools-C_l_Kr2L.js.map → devtools-CMTh3yM9.js.map} +1 -1
- package/dist/cjs/index-R5lmd7Z_.js +4 -0
- package/dist/cjs/index-R5lmd7Z_.js.map +1 -0
- package/dist/cjs/index.cjs.js +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-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.entry.cjs.js.map +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-wc.entry.cjs.js.map +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-click-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-click-button.entry.cjs.js.map +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-details.entry.cjs.js.map +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-image.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-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-wc.entry.cjs.js.map +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-popover-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button.entry.cjs.js.map +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-progress.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-select-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-select-wc.entry.cjs.js.map +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-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/kol-skeleton.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-spin.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-tooltip-wc.entry.cjs.js.map +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/label-Cnh0Go2j.js +4 -0
- package/dist/cjs/label-Cnh0Go2j.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/src-DqQgiFGx.js +4 -0
- package/dist/cjs/src-DqQgiFGx.js.map +1 -0
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/FieldControlStateWrapper.js +1 -1
- package/dist/components/InternalUnderlinedBadgeText.js +1 -1
- package/dist/components/InternalUnderlinedBadgeText.js.map +1 -1
- package/dist/components/Span.js +1 -1
- package/dist/components/Span.js.map +1 -1
- package/dist/components/align-floating-elements.js +1 -1
- package/dist/components/align-floating-elements.js.map +1 -1
- package/dist/components/base-controller.js +1 -1
- package/dist/components/base-controller.js.map +1 -1
- package/dist/components/bem-registry.js +1 -1
- package/dist/components/bem-registry.js.map +1 -1
- package/dist/components/controller2.js +1 -1
- package/dist/components/controller2.js.map +1 -1
- package/dist/components/controller3.js +1 -1
- package/dist/components/controller3.js.map +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-accordion.js.map +1 -1
- package/dist/components/kol-avatar.js +1 -1
- package/dist/components/kol-avatar.js.map +1 -1
- package/dist/components/kol-button-wc.js +1 -1
- package/dist/components/kol-card-wc.js +1 -1
- package/dist/components/kol-click-button.js +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-details.js.map +1 -1
- package/dist/components/kol-icon.js +1 -1
- package/dist/components/kol-image.js +1 -1
- package/dist/components/kol-image.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-file.js.map +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-radio.js +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link-wc.js +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-pagination.js +1 -1
- package/dist/components/kol-popover-button-wc.js +1 -1
- package/dist/components/kol-popover-button.js +1 -1
- package/dist/components/kol-popover-button.js.map +1 -1
- package/dist/components/kol-popover-wc.js +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-progress.js.map +1 -1
- package/dist/components/kol-quote.js +1 -1
- package/dist/components/kol-quote.js.map +1 -1
- package/dist/components/kol-select-wc.js +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-skeleton.js +1 -1
- package/dist/components/kol-skeleton.js.map +1 -1
- package/dist/components/kol-skip-nav.js +1 -1
- package/dist/components/kol-spin.js +1 -1
- package/dist/components/kol-spin.js.map +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-table-settings-wc.js +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateful.js.map +1 -1
- package/dist/components/kol-table-stateless-wc.js +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-table-stateless.js.map +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toolbar.js +1 -1
- package/dist/components/kol-tooltip-wc.js +1 -1
- package/dist/components/kol-tree-item-wc.js +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/components/kol-tree-wc.js +1 -1
- package/dist/components/kol-tree.js +1 -1
- package/dist/components/kol-version.js +1 -1
- package/dist/components/label2.js +4 -0
- package/dist/components/label2.js.map +1 -0
- package/dist/components/src.js +4 -0
- package/dist/components/src.js.map +1 -0
- package/dist/esm/{Alert-D1w-DbWU.js → Alert-DY4wIJCN.js} +1 -1
- package/dist/esm/{Alert-D1w-DbWU.js.map → Alert-DY4wIJCN.js.map} +1 -1
- package/dist/esm/{Collapsible-B92_dsH_.js → Collapsible-Upq6chrL.js} +1 -1
- package/dist/esm/{Collapsible-B92_dsH_.js.map → Collapsible-Upq6chrL.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-D7fMGjn3.js → CustomSuggestionsOptionsGroup-wGKqStNB.js} +1 -1
- package/dist/{kolibri/CustomSuggestionsOptionsGroup-D7fMGjn3.js.map → esm/CustomSuggestionsOptionsGroup-wGKqStNB.js.map} +1 -1
- package/dist/esm/FieldControlStateWrapper-DCIZHOWR.js +4 -0
- package/dist/{kolibri/FieldControlStateWrapper-GQxrJWNC.js.map → esm/FieldControlStateWrapper-DCIZHOWR.js.map} +1 -1
- package/dist/esm/FormFieldStateWrapper-C5-XgdrG.js +4 -0
- package/dist/{cjs/FormFieldStateWrapper-l95qrVY4.js.map → esm/FormFieldStateWrapper-C5-XgdrG.js.map} +1 -1
- package/dist/esm/{Heading-CEAHWwGh.js → Heading-DjpTyUay.js} +1 -1
- package/dist/{kolibri/Heading-CEAHWwGh.js.map → esm/Heading-DjpTyUay.js.map} +1 -1
- package/dist/esm/{Icon-DLb0_FDJ.js → Icon-DFoU1x_z.js} +1 -1
- package/dist/esm/{Icon-DLb0_FDJ.js.map → Icon-DFoU1x_z.js.map} +1 -1
- package/dist/esm/{Input-BENY2di3.js → Input-CiOaVStR.js} +1 -1
- package/dist/{kolibri/Input-BENY2di3.js.map → esm/Input-CiOaVStR.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-D5H_a30o.js → InputStateWrapper-Cq9j-3jw.js} +1 -1
- package/dist/{kolibri/InputStateWrapper-D5H_a30o.js.map → esm/InputStateWrapper-Cq9j-3jw.js.map} +1 -1
- package/dist/esm/InternalUnderlinedBadgeText-BCOuG2r0.js +4 -0
- package/dist/esm/InternalUnderlinedBadgeText-BCOuG2r0.js.map +1 -0
- package/dist/esm/Span-AR30plJF.js +4 -0
- package/dist/{cjs/Span-CHwx-AkR.js.map → esm/Span-AR30plJF.js.map} +1 -1
- package/dist/esm/align-floating-elements-DGbaInbL.js +4 -0
- package/dist/esm/align-floating-elements-DGbaInbL.js.map +1 -0
- package/dist/esm/{app-globals-GWfJBh4P.js → app-globals-BTeg0whH.js} +1 -1
- package/dist/esm/{app-globals-GWfJBh4P.js.map → app-globals-BTeg0whH.js.map} +1 -1
- package/dist/esm/base-controller-CUXUgRY-.js +4 -0
- package/dist/esm/base-controller-CUXUgRY-.js.map +1 -0
- package/dist/esm/{bem-registry-B0PxCYiM.js → bem-registry-DRYZs7IX.js} +1 -1
- package/dist/esm/bem-registry-DRYZs7IX.js.map +1 -0
- package/dist/esm/{controller-KWdnVY-8.js → controller-BErnEI7p.js} +1 -1
- package/dist/esm/{controller-KWdnVY-8.js.map → controller-BErnEI7p.js.map} +1 -1
- package/dist/esm/controller-CCjZ2b0T.js +4 -0
- package/dist/esm/{controller-BEstaUsJ.js.map → controller-CCjZ2b0T.js.map} +1 -1
- package/dist/esm/{controller-DY4cAFgs.js → controller-CrtH_HOv.js} +1 -1
- package/dist/esm/{controller-DY4cAFgs.js.map → controller-CrtH_HOv.js.map} +1 -1
- package/dist/esm/{controller-icon-CQA7r0gp.js → controller-icon-40qRNTz0.js} +1 -1
- package/dist/{kolibri/controller-icon-CQA7r0gp.js.map → esm/controller-icon-40qRNTz0.js.map} +1 -1
- package/dist/esm/{controller-BlIcav-T.js → controller-jiynKPwh.js} +1 -1
- package/dist/esm/{controller-BlIcav-T.js.map → controller-jiynKPwh.js.map} +1 -1
- package/dist/esm/{dev.utils-DPrLRasB.js → dev.utils-DNEGN6vR.js} +1 -1
- package/dist/esm/{dev.utils-DPrLRasB.js.map → dev.utils-DNEGN6vR.js.map} +1 -1
- package/dist/esm/{devtools-ZaYUdg3B.js → devtools-DN64MIzS.js} +1 -1
- package/dist/{kolibri/devtools-ZaYUdg3B.js.map → esm/devtools-DN64MIzS.js.map} +1 -1
- package/dist/esm/index-rqIkzkgG.js +4 -0
- package/dist/esm/index-rqIkzkgG.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js.map +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js.map +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js.map +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-wc.entry.js.map +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-click-button.entry.js +1 -1
- package/dist/esm/kol-click-button.entry.js.map +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-details.entry.js.map +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-image.entry.js.map +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-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-wc.entry.js.map +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-popover-button-wc.entry.js +1 -1
- package/dist/esm/kol-popover-button.entry.js +1 -1
- package/dist/esm/kol-popover-button.entry.js.map +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-progress.entry.js.map +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js.map +1 -1
- package/dist/esm/kol-select-wc.entry.js +1 -1
- package/dist/esm/kol-select-wc.entry.js.map +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-skeleton.entry.js +1 -1
- package/dist/esm/kol-skeleton.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-spin.entry.js.map +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-table-settings-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js.map +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-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-tooltip-wc.entry.js.map +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/label-dDkswsUq.js +4 -0
- package/dist/esm/label-dDkswsUq.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/src-CdIzLWIb.js +4 -0
- package/dist/esm/src-CdIzLWIb.js.map +1 -0
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/Alert-DY4wIJCN.js +4 -0
- package/dist/kolibri/{Alert-D1w-DbWU.js.map → Alert-DY4wIJCN.js.map} +1 -1
- package/dist/kolibri/{Collapsible-B92_dsH_.js → Collapsible-Upq6chrL.js} +1 -1
- package/dist/kolibri/{Collapsible-B92_dsH_.js.map → Collapsible-Upq6chrL.js.map} +1 -1
- package/dist/kolibri/{CustomSuggestionsOptionsGroup-D7fMGjn3.js → CustomSuggestionsOptionsGroup-wGKqStNB.js} +1 -1
- package/dist/{esm/CustomSuggestionsOptionsGroup-D7fMGjn3.js.map → kolibri/CustomSuggestionsOptionsGroup-wGKqStNB.js.map} +1 -1
- package/dist/kolibri/FieldControlStateWrapper-DCIZHOWR.js +4 -0
- package/dist/{esm/FieldControlStateWrapper-GQxrJWNC.js.map → kolibri/FieldControlStateWrapper-DCIZHOWR.js.map} +1 -1
- package/dist/kolibri/FormFieldStateWrapper-C5-XgdrG.js +4 -0
- package/dist/{esm/FormFieldStateWrapper-CZK7fy0I.js.map → kolibri/FormFieldStateWrapper-C5-XgdrG.js.map} +1 -1
- package/dist/kolibri/Heading-DjpTyUay.js +4 -0
- package/dist/{esm/Heading-CEAHWwGh.js.map → kolibri/Heading-DjpTyUay.js.map} +1 -1
- package/dist/kolibri/Icon-DFoU1x_z.js +4 -0
- package/dist/kolibri/{Icon-DLb0_FDJ.js.map → Icon-DFoU1x_z.js.map} +1 -1
- package/dist/kolibri/{Input-BENY2di3.js → Input-CiOaVStR.js} +1 -1
- package/dist/{esm/Input-BENY2di3.js.map → kolibri/Input-CiOaVStR.js.map} +1 -1
- package/dist/kolibri/{InputStateWrapper-D5H_a30o.js → InputStateWrapper-Cq9j-3jw.js} +1 -1
- package/dist/{esm/InputStateWrapper-D5H_a30o.js.map → kolibri/InputStateWrapper-Cq9j-3jw.js.map} +1 -1
- package/dist/kolibri/InternalUnderlinedBadgeText-BCOuG2r0.js +4 -0
- package/dist/kolibri/InternalUnderlinedBadgeText-BCOuG2r0.js.map +1 -0
- package/dist/kolibri/Span-AR30plJF.js +4 -0
- package/dist/kolibri/{Span-K7CeTQnL.js.map → Span-AR30plJF.js.map} +1 -1
- package/dist/kolibri/align-floating-elements-DGbaInbL.js +4 -0
- package/dist/kolibri/align-floating-elements-DGbaInbL.js.map +1 -0
- package/dist/kolibri/{app-globals-GWfJBh4P.js → app-globals-BTeg0whH.js} +1 -1
- package/dist/kolibri/{app-globals-GWfJBh4P.js.map → app-globals-BTeg0whH.js.map} +1 -1
- package/dist/kolibri/base-controller-CUXUgRY-.js +4 -0
- package/dist/kolibri/base-controller-CUXUgRY-.js.map +1 -0
- package/dist/kolibri/{bem-registry-B0PxCYiM.js → bem-registry-DRYZs7IX.js} +1 -1
- package/dist/kolibri/bem-registry-DRYZs7IX.js.map +1 -0
- package/dist/kolibri/{controller-KWdnVY-8.js → controller-BErnEI7p.js} +1 -1
- package/dist/kolibri/{controller-KWdnVY-8.js.map → controller-BErnEI7p.js.map} +1 -1
- package/dist/kolibri/controller-CCjZ2b0T.js +4 -0
- package/dist/kolibri/{controller-BEstaUsJ.js.map → controller-CCjZ2b0T.js.map} +1 -1
- package/dist/kolibri/{controller-DY4cAFgs.js → controller-CrtH_HOv.js} +1 -1
- package/dist/kolibri/{controller-DY4cAFgs.js.map → controller-CrtH_HOv.js.map} +1 -1
- package/dist/kolibri/{controller-icon-CQA7r0gp.js → controller-icon-40qRNTz0.js} +1 -1
- package/dist/{esm/controller-icon-CQA7r0gp.js.map → kolibri/controller-icon-40qRNTz0.js.map} +1 -1
- package/dist/kolibri/{controller-BlIcav-T.js → controller-jiynKPwh.js} +1 -1
- package/dist/kolibri/{controller-BlIcav-T.js.map → controller-jiynKPwh.js.map} +1 -1
- package/dist/kolibri/{dev.utils-DPrLRasB.js → dev.utils-DNEGN6vR.js} +1 -1
- package/dist/kolibri/{dev.utils-DPrLRasB.js.map → dev.utils-DNEGN6vR.js.map} +1 -1
- package/dist/kolibri/{devtools-ZaYUdg3B.js → devtools-DN64MIzS.js} +1 -1
- package/dist/{esm/devtools-ZaYUdg3B.js.map → kolibri/devtools-DN64MIzS.js.map} +1 -1
- package/dist/kolibri/{index-0LQrricW.js → index-rqIkzkgG.js} +1 -1
- package/dist/kolibri/index-rqIkzkgG.js.map +1 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js.map +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js.map +1 -1
- package/dist/kolibri/kol-badge.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js.map +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.esm.js.map +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-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-click-button.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-click-button.entry.js +1 -1
- package/dist/kolibri/kol-click-button.entry.js.map +1 -1
- package/dist/kolibri/kol-combobox.entry.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.esm.js.map +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js.map +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.esm.js.map +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.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.esm.js.map +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js.map +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.js +1 -1
- package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-popover-button.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-popover-button.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.entry.js.map +1 -1
- package/dist/kolibri/kol-popover-wc.entry.js +1 -1
- package/dist/kolibri/kol-popover-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-progress.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js.map +1 -1
- package/dist/kolibri/kol-quote.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js.map +1 -1
- package/dist/kolibri/kol-select-wc.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-select-wc.entry.js +1 -1
- package/dist/kolibri/kol-select-wc.entry.js.map +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-skeleton.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-skeleton.entry.js +1 -1
- package/dist/kolibri/kol-skeleton.entry.js.map +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js.map +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js.map +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.esm.js.map +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js.map +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/label-dDkswsUq.js +4 -0
- package/dist/kolibri/label-dDkswsUq.js.map +1 -0
- package/dist/kolibri/src-CdIzLWIb.js +4 -0
- package/dist/kolibri/src-CdIzLWIb.js.map +1 -0
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components/component-list.d.ts +3 -3
- package/dist/types/components/image/component.d.ts +19 -0
- package/dist/types/components/progress/component.d.ts +24 -0
- package/dist/types/components/quote/component.d.ts +17 -0
- package/dist/types/components.d.ts +22 -22
- package/dist/types/internal/functional-components/image/api.d.ts +8 -0
- package/dist/types/internal/functional-components/image/component.d.ts +4 -0
- package/dist/types/internal/functional-components/image/controller.d.ts +13 -0
- package/dist/types/internal/functional-components/progress/api.d.ts +12 -0
- package/dist/types/internal/functional-components/progress/component.d.ts +4 -0
- package/dist/types/internal/functional-components/progress/controller.d.ts +16 -0
- package/dist/types/internal/functional-components/quote/api.d.ts +8 -0
- package/dist/types/internal/functional-components/quote/component.d.ts +4 -0
- package/dist/types/internal/functional-components/quote/controller.d.ts +11 -0
- package/dist/types/internal/props/alt.d.ts +3 -0
- package/dist/types/internal/props/href.d.ts +3 -0
- package/dist/types/internal/props/index.d.ts +1 -1
- package/dist/types/internal/props/loading.d.ts +6 -0
- package/dist/types/internal/props/max.d.ts +3 -0
- package/dist/types/internal/props/quote.d.ts +3 -0
- package/dist/types/internal/props/sizes.d.ts +3 -0
- package/dist/types/internal/props/srcset.d.ts +3 -0
- package/dist/types/internal/props/unit.d.ts +3 -0
- package/dist/types/internal/props/value.d.ts +3 -0
- package/dist/types/internal/props/variant-progress.d.ts +5 -0
- package/dist/types/internal/props/variant-quote.d.ts +6 -0
- package/dist/types/schema/bem-registry.d.ts +17 -0
- package/doc/image.md +3 -3
- package/doc/progress.md +1 -1
- package/package.json +3 -3
- package/vscode-custom-data.json +2 -2
- package/dist/cjs/FieldControlStateWrapper-D1hdQ7_r.js +0 -4
- package/dist/cjs/FormFieldStateWrapper-l95qrVY4.js +0 -4
- package/dist/cjs/InternalUnderlinedBadgeText-DMWXNRGS.js +0 -4
- package/dist/cjs/InternalUnderlinedBadgeText-DMWXNRGS.js.map +0 -1
- package/dist/cjs/Span-CHwx-AkR.js +0 -4
- package/dist/cjs/align-floating-elements-AmA8E0uD.js +0 -4
- package/dist/cjs/align-floating-elements-AmA8E0uD.js.map +0 -1
- package/dist/cjs/base-controller-DBsJfwhu.js +0 -4
- package/dist/cjs/base-controller-DBsJfwhu.js.map +0 -1
- package/dist/cjs/bem-registry-DKrpaGx4.js.map +0 -1
- package/dist/cjs/controller-BwOAbtj1.js +0 -4
- package/dist/cjs/controller-CrQCNnjJ.js +0 -4
- package/dist/cjs/index-TaLgQn_R.js +0 -4
- package/dist/cjs/index-TaLgQn_R.js.map +0 -1
- package/dist/cjs/reuse-Cs36Ddzu.js +0 -4
- package/dist/cjs/reuse-Cs36Ddzu.js.map +0 -1
- package/dist/components/reuse.js +0 -4
- package/dist/components/reuse.js.map +0 -1
- package/dist/esm/FieldControlStateWrapper-GQxrJWNC.js +0 -4
- package/dist/esm/FormFieldStateWrapper-CZK7fy0I.js +0 -4
- package/dist/esm/InternalUnderlinedBadgeText-D8Oo4fKh.js +0 -4
- package/dist/esm/InternalUnderlinedBadgeText-D8Oo4fKh.js.map +0 -1
- package/dist/esm/Span-K7CeTQnL.js +0 -4
- package/dist/esm/align-floating-elements-B53gjKzS.js +0 -4
- package/dist/esm/align-floating-elements-B53gjKzS.js.map +0 -1
- package/dist/esm/base-controller-Cpw4bHkB.js +0 -4
- package/dist/esm/base-controller-Cpw4bHkB.js.map +0 -1
- package/dist/esm/bem-registry-B0PxCYiM.js.map +0 -1
- package/dist/esm/controller-BEstaUsJ.js +0 -4
- package/dist/esm/index-0LQrricW.js +0 -4
- package/dist/esm/index-0LQrricW.js.map +0 -1
- package/dist/esm/reuse-CX4AQDkS.js +0 -4
- package/dist/esm/reuse-CX4AQDkS.js.map +0 -1
- package/dist/kolibri/Alert-D1w-DbWU.js +0 -4
- package/dist/kolibri/FieldControlStateWrapper-GQxrJWNC.js +0 -4
- package/dist/kolibri/FormFieldStateWrapper-CZK7fy0I.js +0 -4
- package/dist/kolibri/Heading-CEAHWwGh.js +0 -4
- package/dist/kolibri/Icon-DLb0_FDJ.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-D8Oo4fKh.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-D8Oo4fKh.js.map +0 -1
- package/dist/kolibri/Span-K7CeTQnL.js +0 -4
- package/dist/kolibri/align-floating-elements-B53gjKzS.js +0 -4
- package/dist/kolibri/align-floating-elements-B53gjKzS.js.map +0 -1
- package/dist/kolibri/base-controller-Cpw4bHkB.js +0 -4
- package/dist/kolibri/base-controller-Cpw4bHkB.js.map +0 -1
- package/dist/kolibri/bem-registry-B0PxCYiM.js.map +0 -1
- package/dist/kolibri/controller-BEstaUsJ.js +0 -4
- package/dist/kolibri/index-0LQrricW.js.map +0 -1
- package/dist/kolibri/reuse-CX4AQDkS.js +0 -4
- package/dist/kolibri/reuse-CX4AQDkS.js.map +0 -1
- package/dist/types/components/image/shadow.d.ts +0 -17
- package/dist/types/components/progress/shadow.d.ts +0 -19
- package/dist/types/components/quote/shadow.d.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{a as getMsgType,i as isMsgDefinedAndInputTouched,d as getDefaultProps,g as getRenderStates,F as FormFieldStateWrapper}from"./controller3.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{_ as __rest}from"./tslib.es6.js";import{b as watchValidator,j as watchString}from"./common.js";import{n as nonce}from"./dev.utils.js";import{a as validateHasCounter,v as validateMaxLengthBehavior,b as validateMaxLength}from"./max-length-behavior.js";import{v as validatePlaceholder}from"./placeholder.js";import{v as validateReadOnly}from"./read-only.js";import{v as validateRequired}from"./required.js";import{v as validateRows}from"./rows.js";import{v as validateSpellCheck}from"./spell-check.js";const textareaResizeOptions=["vertical","none"],isTextareaResizePropType=e=>"string"==typeof e&&textareaResizeOptions.includes(e),validateResizeTextarea=(e,t)=>{watchValidator(e,"_resize",isTextareaResizePropType,new Set(textareaResizeOptions),t,{defaultValue:"vertical"})},TextAreaFc=e=>{const{class:t,msg:n,touched:a,readonly:i,disabled:o,required:l,ariaDescribedBy:r,hideLabel:s,label:d}=e,c=__rest(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),u={"kol-textarea--disabled":Boolean(o),"kol-textarea--required":Boolean(l),"kol-textarea--touched":Boolean(a),"kol-textarea--readonly":Boolean(i),[`kol-textarea--${getMsgType(n)}`]:isMsgDefinedAndInputTouched(n,a)},m=Object.assign(Object.assign({class:clsx("kol-textarea",u,t),required:l,disabled:o,readonly:i},getDefaultProps({ariaDescribedBy:r,hideLabel:s,label:d})),c);return h("textarea",Object.assign({},m))};function getTextAreaProps(e,t){var n;const a=[...getRenderStates(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 TextAreaStateWrapper=e=>{var{state:t}=e,n=__rest(e,["state"]);return h(TextAreaFc,Object.assign({},getTextAreaProps(t,n)))};class TextareaController extends InputIconController{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){validateHasCounter(this.component,e)}validateMaxLengthBehavior(e){validateMaxLengthBehavior(this.component,e)}validateMaxLength(e){validateMaxLength(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateReadOnly(e){validateReadOnly(this.component,e)}validateResize(e){validateResizeTextarea(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateRows(e){validateRows(this.component,e)}validateSpellCheck(e){validateSpellCheck(this.component,e)}validateValue(e){watchString(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 defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !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 :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--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 min-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}',increaseTextareaHeight=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},KolTextarea$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){return new Promise(e=>{requestAnimationFrame(()=>{var t;null===(t=this.textareaRef)||void 0===t||t.focus(),e()})})}getFormFieldProps(){return{state:this.state,class:clsx("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 h(FormFieldStateWrapper,Object.assign({key:"e1a50de8e844b4b8de8363f40f0398e1464a65a8"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"6e6d22422052a45e54cb35054b02853c7ab5d055",state:this.state},h(TextAreaStateWrapper,Object.assign({key:"eadd23eef77edf6963b601582b936d190f455706"},this.getTextAreaProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),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-${nonce()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(this._value=this.textareaRef.value,this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.textareaRef)),this.controller.onFacade.onInput(e))},this.controller=new TextareaController(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)}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>increaseTextareaHeight(this.textareaRef)?this.state._rows:increaseTextareaHeight(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 this}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_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"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_label:[1],_maxLength:[2,"_max-length"],_hasCounter:[4,"_has-counter"],_maxLengthBehavior:[1,"_max-length-behavior"],_msg:[1],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_resize:[1],_required:[4],_rows:[1026],_shortKey:[1,"_short-key"],_spellCheck:[4,"_spell-check"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],state:[32],inputHasFocus:[32],getValue:[64],focus:[64]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_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"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-textarea"].forEach(e=>{if("kol-textarea"===e)customElements.get(e)||customElements.define(e,KolTextarea$1)})}const KolTextarea=KolTextarea$1,defineCustomElement=defineCustomElement$1;export{KolTextarea,defineCustomElement};
|
|
4
|
+
import{h,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{a as getMsgType,i as isMsgDefinedAndInputTouched,d as getDefaultProps,g as getRenderStates,F as FormFieldStateWrapper}from"./controller3.js";import{I as InputIconController,a as InputContainerStateWrapperFc}from"./controller-icon.js";import{_ as __rest}from"./tslib.es6.js";import{b as watchValidator,j as watchString}from"./common.js";import{n as nonce}from"./dev.utils.js";import{a as validateHasCounter,v as validateMaxLengthBehavior,b as validateMaxLength}from"./max-length-behavior.js";import{v as validatePlaceholder}from"./placeholder.js";import{v as validateReadOnly}from"./read-only.js";import{v as validateRequired}from"./required.js";import{v as validateRows}from"./rows.js";import{v as validateSpellCheck}from"./spell-check.js";const textareaResizeOptions=["vertical","none"],isTextareaResizePropType=e=>"string"==typeof e&&textareaResizeOptions.includes(e),validateResizeTextarea=(e,t)=>{watchValidator(e,"_resize",isTextareaResizePropType,new Set(textareaResizeOptions),t,{defaultValue:"vertical"})},TextAreaFc=e=>{const{class:t,msg:n,touched:a,readonly:i,disabled:o,required:l,ariaDescribedBy:r,hideLabel:s,label:d}=e,c=__rest(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),u={"kol-textarea--disabled":Boolean(o),"kol-textarea--required":Boolean(l),"kol-textarea--touched":Boolean(a),"kol-textarea--readonly":Boolean(i),[`kol-textarea--${getMsgType(n)}`]:isMsgDefinedAndInputTouched(n,a)},m=Object.assign(Object.assign({class:clsx("kol-textarea",u,t),required:l,disabled:o,readonly:i},getDefaultProps({ariaDescribedBy:r,hideLabel:s,label:d})),c);return h("textarea",Object.assign({},m))};function getTextAreaProps(e,t){var n;const a=[...getRenderStates(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 TextAreaStateWrapper=e=>{var{state:t}=e,n=__rest(e,["state"]);return h(TextAreaFc,Object.assign({},getTextAreaProps(t,n)))};class TextareaController extends InputIconController{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){validateHasCounter(this.component,e)}validateMaxLengthBehavior(e){validateMaxLengthBehavior(this.component,e)}validateMaxLength(e){validateMaxLength(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){validatePlaceholder(this.component,e)}validateReadOnly(e){validateReadOnly(this.component,e)}validateResize(e){validateResizeTextarea(this.component,e)}validateRequired(e){validateRequired(this.component,e)}validateRows(e){validateRows(this.component,e)}validateSpellCheck(e){validateSpellCheck(this.component,e)}validateValue(e){watchString(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 defaultStyleCss='@charset "UTF-8";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !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 :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: "";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--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 min-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}',increaseTextareaHeight=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},KolTextarea$1=proxyCustomElement(class extends HTMLElement{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async focus(){return new Promise(e=>{requestAnimationFrame(()=>{var t;null===(t=this.textareaRef)||void 0===t||t.focus(),e()})})}getFormFieldProps(){return{state:this.state,class:clsx("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 h(FormFieldStateWrapper,Object.assign({key:"633c65295555ee15873eb7c5944c4df5b8ffe99f"},this.getFormFieldProps()),h(InputContainerStateWrapperFc,{key:"687e9d1ed39ae95c6550dc6c617a3011d05f3857",state:this.state},h(TextAreaStateWrapper,Object.assign({key:"75121bbf58bb7432bd63d2a4e84d028f41b52d7c"},this.getTextAreaProps()))))}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),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-${nonce()}`,_label:"",_resize:"vertical"},this.inputHasFocus=!1,this.onInput=e=>{this.textareaRef instanceof HTMLTextAreaElement&&(this._value=this.textareaRef.value,this.state._adjustHeight&&(this._rows=increaseTextareaHeight(this.textareaRef)),this.controller.onFacade.onInput(e))},this.controller=new TextareaController(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)}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>increaseTextareaHeight(this.textareaRef)?this.state._rows:increaseTextareaHeight(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 this}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_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"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-textarea",{_accessKey:[1,"_access-key"],_adjustHeight:[4,"_adjust-height"],_disabled:[4],_hideMsg:[4,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_icons:[1],_label:[1],_maxLength:[2,"_max-length"],_hasCounter:[4,"_has-counter"],_maxLengthBehavior:[1,"_max-length-behavior"],_msg:[1],_name:[1],_on:[16],_placeholder:[1],_readOnly:[4,"_read-only"],_resize:[1],_required:[4],_rows:[1026],_shortKey:[1,"_short-key"],_spellCheck:[4,"_spell-check"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1537],state:[32],inputHasFocus:[32],getValue:[64],focus:[64]},void 0,{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_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"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-textarea"].forEach(e=>{if("kol-textarea"===e)customElements.get(e)||customElements.define(e,KolTextarea$1)})}const KolTextarea=KolTextarea$1,defineCustomElement=defineCustomElement$1;export{KolTextarea,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h,proxyCustomElement,HTMLElement,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{t as KolButtonTag}from"./component-names.js";import{K as KolAlertFc}from"./Alert.js";import"./common.js";import"./markdown.js";import{_ as __rest}from"./tslib.es6.js";import{c as clsx}from"./clsx.js";const ToastItemFc=t=>{var{status:n,toast:e,onClose:o}=t,i=__rest(t,["status","toast","onClose"]);const{type:s,label:a,description:l,variant:r}=e;return h("div",{class:clsx("kol-toast-item",`kol-toast-item--${n}`)},h(KolAlertFc,{class:"kol-toast-item__alert",alert:!0,label:a,level:0,hasCloser:!0,type:s,variant:r||"card",onCloserClick:o},h("div",Object.assign({},i),l)))},defaultStyleCss="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !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 :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n max-width: 90vw;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",TRANSITION_TIMEOUT=300,KolToastContainer$1=proxyCustomElement(class extends HTMLElement{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.state={_toastStates:[]},this.translateToastCloseAll=translate("kol-toast-close-all"),this.knownRenderFunctions=new Set}async enqueue(t){const n={toast:Object.assign(Object.assign({},t),{variant:"card"}),status:"adding",id:`toast-${nonce()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t)})},300),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(n=>(n.id===t.id&&(n.status="removing"),n))}),setTimeout(()=>{var n,e;this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>n.id!==t.id)}),null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)},300)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map(t=>Object.assign(Object.assign({},t),{status:"removing"}))}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>t.every(t=>t.id!==n.id))}),t.forEach(t=>{var n,e;null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)})},300)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return h(Host,{key:"40e9e249cceebf6d433444192d5199a2d7864f34",class:"kol-toast-container"},this.state._toastStates.length>1&&h(KolButtonTag,{key:"68a998df0fe18affd0db5e06fdfb92c9aee4abd8",_label:this.translateToastCloseAll,class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map(t=>h(ToastItemFc,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status})))}static get style(){return{default:defaultStyleCss}}},[289,"kol-toast-container",{state:[32],enqueue:[64],closeAll:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toast-container"].forEach(t=>{if("kol-toast-container"===t)customElements.get(t)||customElements.define(t,KolToastContainer$1)})}const KolToastContainer=KolToastContainer$1,defineCustomElement=defineCustomElement$1;export{KolToastContainer,defineCustomElement};
|
|
4
|
+
import{h,proxyCustomElement,HTMLElement,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n.js";import{n as nonce}from"./dev.utils.js";import{t as KolButtonTag}from"./component-names.js";import{K as KolAlertFc}from"./Alert.js";import"./common.js";import"./markdown.js";import{_ as __rest}from"./tslib.es6.js";import{c as clsx}from"./clsx.js";const ToastItemFc=t=>{var{status:n,toast:e,onClose:o}=t,i=__rest(t,["status","toast","onClose"]);const{type:s,label:a,description:l,variant:r}=e;return h("div",{class:clsx("kol-toast-item",`kol-toast-item--${n}`)},h(KolAlertFc,{class:"kol-toast-item__alert",alert:!0,label:a,level:0,hasCloser:!0,type:s,variant:r||"card",onCloserClick:o},h("div",Object.assign({},i),l)))},defaultStyleCss="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !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 :host {\n display: inline-block;\n }\n .kol-alert .kol-button {\n display: flex;\n min-height: var(--a11y-min-size);\n font-style: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n text-decoration-line: none;\n }\n .kol-alert .kol-button::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-alert .kol-button__text {\n flex: 1 0 100%;\n }\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n max-width: 90vw;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",TRANSITION_TIMEOUT=300,KolToastContainer$1=proxyCustomElement(class extends HTMLElement{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.state={_toastStates:[]},this.translateToastCloseAll=translate("kol-toast-close-all"),this.knownRenderFunctions=new Set}async enqueue(t){const n={toast:Object.assign(Object.assign({},t),{variant:"card"}),status:"adding",id:`toast-${nonce()}`};return this.state=Object.assign(Object.assign({},this.state),{_toastStates:[n,...this.state._toastStates]}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(t=>t.id===n.id&&"removing"!==t.status?Object.assign(Object.assign({},t),{status:"settled"}):t)})},300),()=>{this.handleClose(n)}}handleClose(t){this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.map(n=>(n.id===t.id&&(n.status="removing"),n))}),setTimeout(()=>{var n,e;this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>n.id!==t.id)}),null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)},300)}async closeAll(t=!1){if(t)this.state=Object.assign(Object.assign({},this.state),{_toastStates:[]});else{const t=[...this.state._toastStates];this.state=Object.assign(Object.assign({},this.state),{_toastStates:t.map(t=>Object.assign(Object.assign({},t),{status:"removing"}))}),setTimeout(()=>{this.state=Object.assign(Object.assign({},this.state),{_toastStates:this.state._toastStates.filter(n=>t.every(t=>t.id!==n.id))}),t.forEach(t=>{var n,e;null===(e=(n=t.toast).onClose)||void 0===e||e.call(n)})},300)}}handleToastRef(t,n){n&&"function"==typeof t.toast.render&&!this.knownRenderFunctions.has(t.toast.render)&&(this.knownRenderFunctions.add(t.toast.render),t.toast.render(n,{close:()=>this.handleClose(t)}))}render(){return h(Host,{key:"de1eab4d373513f210a0ae8d36a457e254e1e076",class:"kol-toast-container"},this.state._toastStates.length>1&&h(KolButtonTag,{key:"f550cd34eec6f1a2a9de5792903034b772de6197",_label:this.translateToastCloseAll,class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map(t=>h(ToastItemFc,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status})))}static get style(){return{default:defaultStyleCss}}},[289,"kol-toast-container",{state:[32],enqueue:[64],closeAll:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toast-container"].forEach(t=>{if("kol-toast-container"===t)customElements.get(t)||customElements.define(t,KolToastContainer$1)})}const KolToastContainer=KolToastContainer$1,defineCustomElement=defineCustomElement$1;export{KolToastContainer,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{_ as __rest}from"./tslib.es6.js";import{e as KolLinkWcTag,c as KolButtonWcTag}from"./component-names.js";import{R as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,s as setState}from"./common.js";import{v as validateLabel}from"./label.js";import{K as KeyboardKey}from"./keyboard.js";import{v as validateOrientation}from"./orientation.js";const validateToolbarItems=(n,e)=>{emptyStringByArrayHandler(e,()=>{objectObjectHandler(e,()=>{void 0===e&&(e=[]);try{e=parseJson(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&setState(n,"_items",e)})})},defaultStyleCss="@charset \"UTF-8\";\n/* 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 .hastooltip {\n z-index: 900 !important;\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 :host {\n display: inline-block;\n }\n .kol-link {\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-link::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-link__text {\n flex: 1 0 100%;\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-toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n .kol-toolbar--orientation-vertical {\n flex-direction: column;\n align-items: stretch;\n }\n .kol-toolbar--orientation-vertical .kol-span {\n align-items: flex-start;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolToolbar$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.state={_label:"",_items:[]},this.currentIndex=0,this.indexToElement=new Map,this.renderItem=(n,e)=>{const t=this.normalizeItem(n),o=e!==this.currentIndex||(null==t?void 0:t._disabled)?-1:0,i={key:e,class:"button normal kol-toolbar__item",_tabIndex:o},a=n=>{n&&this.indexToElement.set(e,n)};return"link"===t.type?h(KolLinkWcTag,Object.assign({},t,i,{ref:a})):h(KolButtonWcTag,Object.assign({},t,i,{ref:a}))}}normalizeItem(n){const{_icons:e,_disabled:t}=n,o=__rest(n,["_icons","_disabled"]);return Object.assign(Object.assign({},o),{_icons:e,_disabled:t})}render(){return h("div",{key:"b8bf5d060d2390c8c4bbf3345d731074ff297541",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){validateLabel(this,n)}validateItems(n){validateToolbarItems(this,n),this.indexToElement.clear(),this.setFirstEnabledItemIndex()}validateOrientation(n){validateOrientation(this,n)}getCurrentToolbarItem(n){return"number"==typeof n?this.indexToElement.get(n):void 0}setFirstEnabledItemIndex(){var n;this.currentIndex=null===(n=this.state._items)||void 0===n?void 0:n.findIndex(n=>!n._disabled)}handleKeyDown(n){var e,t,o,i,a;const l=n.code;if(![KeyboardKey.ArrowUp,KeyboardKey.ArrowDown,KeyboardKey.ArrowRight,KeyboardKey.ArrowLeft].includes(l))return;n.preventDefault();const r=(null!==(t=null===(e=this._items)||void 0===e?void 0:e.length)&&void 0!==t?t:0)-1;if(r<0)return;const s=this.currentIndex;let d=s;switch(l){case KeyboardKey.ArrowUp:case KeyboardKey.ArrowLeft:d=s>0?s-1:r;break;case KeyboardKey.ArrowDown:case KeyboardKey.ArrowRight:d=s<r?s+1:0}s!==d&&((null===(i=null===(o=this.state._items)||void 0===o?void 0:o[d])||void 0===i?void 0:i._disabled)||(this.currentIndex=d,null===(a=this.getCurrentToolbarItem(d))||void 0===a||a.focus()))}handleBlur(n){n.target===this.host&&this.setFirstEnabledItemIndex()}componentWillLoad(){this.validateLabel(this._label),this.validateItems(this._items),this.validateOrientation(this._orientation),this.setFirstEnabledItemIndex()}get host(){return this}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-toolbar",{_label:[1],_items:[16],_orientation:[1],state:[32],currentIndex:[32]},[[0,"keydown","handleKeyDown"],[2,"blur","handleBlur"]],{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toolbar"].forEach(n=>{if("kol-toolbar"===n)customElements.get(n)||customElements.define(n,KolToolbar$1)})}const KolToolbar=KolToolbar$1,defineCustomElement=defineCustomElement$1;export{KolToolbar,defineCustomElement};
|
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{_ as __rest}from"./tslib.es6.js";import{e as KolLinkWcTag,c as KolButtonWcTag}from"./component-names.js";import{R as emptyStringByArrayHandler,o as objectObjectHandler,p as parseJson,s as setState}from"./common.js";import{v as validateLabel}from"./label.js";import{K as KeyboardKey}from"./keyboard.js";import{v as validateOrientation}from"./orientation.js";const validateToolbarItems=(n,e)=>{emptyStringByArrayHandler(e,()=>{objectObjectHandler(e,()=>{void 0===e&&(e=[]);try{e=parseJson(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&setState(n,"_items",e)})})},defaultStyleCss="@charset \"UTF-8\";\n/* 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 .hastooltip {\n z-index: 900 !important;\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 :host {\n display: inline-block;\n }\n .kol-link {\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-link::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-link__text {\n flex: 1 0 100%;\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-toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n .kol-toolbar--orientation-vertical {\n flex-direction: column;\n align-items: stretch;\n }\n .kol-toolbar--orientation-vertical .kol-span {\n align-items: flex-start;\n }\n .kol-toolbar:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolToolbar$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.state={_label:"",_items:[]},this.currentIndex=0,this.indexToElement=new Map,this.renderItem=(n,e)=>{const t=this.normalizeItem(n),o=e!==this.currentIndex||(null==t?void 0:t._disabled)?-1:0,i={key:e,class:"button normal kol-toolbar__item",_tabIndex:o},a=n=>{n&&this.indexToElement.set(e,n)};return"link"===t.type?h(KolLinkWcTag,Object.assign({},t,i,{ref:a})):h(KolButtonWcTag,Object.assign({},t,i,{ref:a}))}}normalizeItem(n){const{_icons:e,_disabled:t}=n,o=__rest(n,["_icons","_disabled"]);return Object.assign(Object.assign({},o),{_icons:e,_disabled:t})}render(){return h("div",{key:"b06dfa2910d806e9bf84be705ddc1052eef2168e",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){validateLabel(this,n)}validateItems(n){validateToolbarItems(this,n),this.indexToElement.clear(),this.setFirstEnabledItemIndex()}validateOrientation(n){validateOrientation(this,n)}getCurrentToolbarItem(n){return"number"==typeof n?this.indexToElement.get(n):void 0}setFirstEnabledItemIndex(){var n;this.currentIndex=null===(n=this.state._items)||void 0===n?void 0:n.findIndex(n=>!n._disabled)}handleKeyDown(n){var e,t,o,i,a;const l=n.code;if(![KeyboardKey.ArrowUp,KeyboardKey.ArrowDown,KeyboardKey.ArrowRight,KeyboardKey.ArrowLeft].includes(l))return;n.preventDefault();const r=(null!==(t=null===(e=this._items)||void 0===e?void 0:e.length)&&void 0!==t?t:0)-1;if(r<0)return;const s=this.currentIndex;let d=s;switch(l){case KeyboardKey.ArrowUp:case KeyboardKey.ArrowLeft:d=s>0?s-1:r;break;case KeyboardKey.ArrowDown:case KeyboardKey.ArrowRight:d=s<r?s+1:0}s!==d&&((null===(i=null===(o=this.state._items)||void 0===o?void 0:o[d])||void 0===i?void 0:i._disabled)||(this.currentIndex=d,null===(a=this.getCurrentToolbarItem(d))||void 0===a||a.focus()))}handleBlur(n){n.target===this.host&&this.setFirstEnabledItemIndex()}componentWillLoad(){this.validateLabel(this._label),this.validateItems(this._items),this.validateOrientation(this._orientation),this.setFirstEnabledItemIndex()}get host(){return this}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-toolbar",{_label:[1],_items:[16],_orientation:[1],state:[32],currentIndex:[32]},[[0,"keydown","handleKeyDown"],[2,"blur","handleBlur"]],{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-toolbar"].forEach(n=>{if("kol-toolbar"===n)customElements.get(n)||customElements.define(n,KolToolbar$1)})}const KolToolbar=KolToolbar$1,defineCustomElement=defineCustomElement$1;export{KolToolbar,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{b as autoUpdate,a as alignFloatingElements}from"./align-floating-elements.js";import{j as watchString,x as getDocument}from"./common.js";import{v as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";import"./Alert.js";import"./i18n.js";import{K as KolSpanFc}from"./Span.js";import{n as nonce}from"./dev.utils.js";import{t as tooltipOpened,a as tooltipClosed}from"./tooltip-open-tracking.js";const validateBadgeText=(t,e)=>{watchString(t,"_badgeText",e)},validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach(t=>{t.style.setProperty("z-index","999")}),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const KolTooltipWc$1=proxyCustomElement(class extends HTMLElement{constructor(t){super(),!1!==t&&this.__registerHost(),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.resetHideFlag=()=>{this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)},this.showTooltip=()=>{var t;if(!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),tooltipOpened(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),null===(t=this.parentElement)||void 0===t||t.classList.add("hastooltip"),getDocument().addEventListener("keyup",this.hideTooltipByEscape,{once:!0});const e=this.previousSibling,i=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(e,i,()=>{this.alignTooltip()})}},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.addEventListener("mouseleave",this.handleMouseLeave.bind(this)),t.addEventListener("focusin",this.handleFocusIn.bind(this)),t.addEventListener("focusout",this.handleFocusOut.bind(this))},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.removeEventListener("mouseleave",this.handleMouseLeave.bind(this)),t.removeEventListener("focusin",this.handleFocusIn.bind(this)),t.removeEventListener("focusout",this.handleFocusOut.bind(this))},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this._align="top",this.state={_align:"top",_id:`id-${nonce()}`,_label:""},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout(()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()},300)}}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await alignFloatingElements({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}async hideTooltip(){var t;this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(hideOverlay(this.tooltipElement),tooltipClosed(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),null===(t=this.parentElement)||void 0===t||t.classList.remove("hastooltip"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),getDocument().removeEventListener("keyup",this.hideTooltipByEscape)}handleMouseEnter(){const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()}handleMouseLeave(){this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}handleFocusIn(){const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()}handleFocusOut(){this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}render(){return h(Host,{key:"
|
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{b as autoUpdate,a as alignFloatingElements}from"./align-floating-elements.js";import{j as watchString,x as getDocument}from"./common.js";import{v as validateAlign}from"./align.js";import{v as validateLabel}from"./label.js";import"./Alert.js";import"./i18n.js";import{K as KolSpanFc}from"./Span.js";import{n as nonce}from"./dev.utils.js";import{t as tooltipOpened,a as tooltipClosed}from"./tooltip-open-tracking.js";const validateBadgeText=(t,e)=>{watchString(t,"_badgeText",e)},validateId=(t,e)=>{watchString(t,"_id",e)},VISIBLE_OVERLAYS=new Set;function showOverlay(t){VISIBLE_OVERLAYS.forEach(t=>{t.style.setProperty("z-index","999")}),VISIBLE_OVERLAYS.add(t),t.style.setProperty("z-index","1000")}function hideOverlay(t){if(VISIBLE_OVERLAYS.delete(t),VISIBLE_OVERLAYS.size>0){const t=Array.from(VISIBLE_OVERLAYS).pop();t&&t.style.setProperty("z-index","1000")}}const KolTooltipWc$1=proxyCustomElement(class extends HTMLElement{constructor(t){super(),!1!==t&&this.__registerHost(),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.resetHideFlag=()=>{this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)},this.showTooltip=()=>{var t;if(!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),tooltipOpened(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),null===(t=this.parentElement)||void 0===t||t.classList.add("hastooltip"),getDocument().addEventListener("keyup",this.hideTooltipByEscape,{once:!0});const e=this.previousSibling,i=this.tooltipElement;this.cleanupAutoPositioning=autoUpdate(e,i,()=>{this.alignTooltip()})}},this.hideTooltipByEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addListeners=t=>{t.addEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.addEventListener("mouseleave",this.handleMouseLeave.bind(this)),t.addEventListener("focusin",this.handleFocusIn.bind(this)),t.addEventListener("focusout",this.handleFocusOut.bind(this))},this.removeListeners=t=>{t.removeEventListener("mouseenter",this.handleMouseEnter.bind(this)),t.removeEventListener("mouseleave",this.handleMouseLeave.bind(this)),t.removeEventListener("focusin",this.handleFocusIn.bind(this)),t.removeEventListener("focusout",this.handleFocusOut.bind(this))},this.resyncListeners=(t,e,i=!1)=>{t&&this.removeListeners(t),e&&(i&&(this.previousSibling=e),this.addListeners(e))},this.catchTooltipElement=t=>{this.tooltipElement=t},this.catchArrowElement=t=>{this.arrowElement=t},this._align="top",this.state={_align:"top",_id:`id-${nonce()}`,_label:""},this.showOrHideTooltip=()=>{clearTimeout(this.overFocusTimeout),this.overFocusTimeout=setTimeout(()=>{this.hasMouseIn||this.hasFocusIn?this.showTooltip():this.hideTooltip()},300)}}isNewVisit(){return!this.hasMouseIn&&!this.hasFocusIn}async alignTooltip(){this.tooltipElement&&this.previousSibling&&await alignFloatingElements({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}async hideTooltip(){var t;this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(hideOverlay(this.tooltipElement),tooltipClosed(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),null===(t=this.parentElement)||void 0===t||t.classList.remove("hastooltip"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),getDocument().removeEventListener("keyup",this.hideTooltipByEscape)}handleMouseEnter(){const t=this.isNewVisit();this.hasMouseIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()}handleMouseLeave(){this.hasMouseIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}handleFocusIn(){const t=this.isNewVisit();this.hasFocusIn=!0,t&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()}handleFocusOut(){this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()}render(){return h(Host,{key:"07e22b125ed6eb3e7fcd14157171288b10065f14",class:"kol-tooltip"},h("div",{key:"8aa3cc6860d49752a3cf50bfa54bb3942e30d35a",class:"kol-tooltip__floating",hidden:0===this.state._label.length,ref:this.catchTooltipElement},h("div",{key:"b75e7e36ee291c6dcddd3a22cf398a92c0410939",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),h(KolSpanFc,{key:"7aba521889cb5624d580719b4d49bd49b8b2a8cf",class:"kol-tooltip__content",id:this.state._id,badgeText:this._badgeText,label:this.state._label})))}validateBadgeText(t){validateBadgeText(this,t)}validateAlign(t){validateAlign(this,t)}validateId(t){validateId(this,t)}validateLabel(t){validateLabel(this,t,{required:!0})}componentWillLoad(){this.validateBadgeText(this._badgeText),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var t;this.resyncListeners(this.previousSibling,null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var t,e;this.previousSibling=null===(t=this.host)||void 0===t?void 0:t.previousElementSibling,this.parentElement=null===(e=this.host)||void 0===e?void 0:e.parentElement}componentDidRender(){this.handleEventListeners()}disconnectedCallback(){this.previousSibling&&(this.removeListeners(this.previousSibling),this.previousSibling=void 0),this.tooltipElement&&this.removeListeners(this.tooltipElement),this.cleanupAutoPositioning&&this.cleanupAutoPositioning()}get host(){return this}static get watchers(){return{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}},[256,"kol-tooltip-wc",{_badgeText:[1,"_badge-text"],_align:[1],_id:[1],_label:[1],state:[32],hideTooltip:[64]},void 0,{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tooltip-wc"].forEach(t=>{if("kol-tooltip-wc"===t)customElements.get(t)||customElements.define(t,KolTooltipWc$1)})}const KolTooltipWc=KolTooltipWc$1,defineCustomElement=defineCustomElement$1;export{KolTooltipWc,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as KolLinkWcTag,d as KolIconTag,w as KolTreeTag}from"./component-names.js";import{d as watchBoolean}from"./common.js";import{v as validateHref}from"./href.js";import{v as validateLabel}from"./label.js";import{v as validateOpen}from"./open.js";import{c as clsx}from"./clsx.js";import{n as nonce}from"./dev.utils.js";const validateActive=(e,t,a)=>{watchBoolean(e,"_active",t,a)},KolTreeItemWc$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.groupId=`tree-group-${nonce()}`,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1}}render(){const{_href:e,_active:t,_hasChildren:a,_open:l,_label:i}=this.state;return h(Host,{key:"
|
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as KolLinkWcTag,d as KolIconTag,w as KolTreeTag}from"./component-names.js";import{d as watchBoolean}from"./common.js";import{v as validateHref}from"./href.js";import{v as validateLabel}from"./label.js";import{v as validateOpen}from"./open.js";import{c as clsx}from"./clsx.js";import{n as nonce}from"./dev.utils.js";const validateActive=(e,t,a)=>{watchBoolean(e,"_active",t,a)},KolTreeItemWc$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.groupId=`tree-group-${nonce()}`,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1}}render(){const{_href:e,_active:t,_hasChildren:a,_open:l,_label:i}=this.state;return h(Host,{key:"0911b3ee1e2a5bbe41270de1d18f08f264a90559",onSlotchange:this.handleSlotchange.bind(this)},h("li",{key:"6e7a15926da303380f7146f0f6fcab1954e6b7bc",class:"kol-tree-item",style:{"--level":`${this.level}`}},h(KolLinkWcTag,{key:"8d4ac9fd10ec270dfc01229ddcc9309d73f7f651",class:clsx("kol-tree-item__link",{"kol-tree-item__link--first-level":0===this.level,"kol-tree-item__link--active":t}),_href:e,_label:"",_role:"treeitem",_tabIndex:t?0:-1,_ariaExpanded:a?l:void 0,_ariaOwns:a?this.groupId:void 0,ref:e=>this.linkElement=e},h("span",{key:"882fd6382f1d4ab63735b1b4e204829e59202957",class:"kol-tree-item__link-inner",slot:"expert"},a?h("span",{class:"kol-tree-item__toggle-button",onClick:e=>l?void this.handleCollapseClick(e):void this.handleExpandClick(e)},h(KolIconTag,{class:"kol-tree-item__toggle-button-icon",_icons:"kolicon kolicon-"+(l?"chevron-down":"chevron-right"),_label:""})):h("span",{class:"kol-tree-item__toggle-button-placeholder"}),h("span",{key:"a114f114a215afab329b9021300f5282322fc2b0",class:"kol-tree-item__text"},i))),h("ul",{key:"9bd5e8bbe1596c83fae014dffe6abb82f16094ed",class:"kol-tree-item__children",hidden:!a||!l,role:"group",id:this.groupId},h("slot",{key:"31018743e2906aaf51f5c8f59e1f7242f111c0f9"}))))}validateActive(e){validateActive(this,e||!1)}validateLabel(e){validateLabel(this,e)}validateOpen(e){validateOpen(this,e)}validateHref(e){validateHref(this,e)}componentWillLoad(){this.validateActive(this._active),this.validateLabel(this._label),this.validateOpen(this._open),this.validateHref(this._href),this.checkForChildren(),this.determineTreeItemDepth()}determineTreeItemDepth(){let e=0,t=this.host.parentNode.host.parentNode;for(;null!==t&&t.tagName.toLowerCase()!==KolTreeTag&&t!==document.body;)t=t.parentElement,e+=1;this.level=e}handleSlotchange(){this.checkForChildren()}checkForChildren(){var e,t;this.state=Object.assign(Object.assign({},this.state),{_hasChildren:Boolean(null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedElements)||void 0===t?void 0:t.call(e).length)})}async focus(){var e;return Promise.resolve(null===(e=this.linkElement)||void 0===e?void 0:e.focus())}async handleExpandClick(e){var t;e.preventDefault(),await(null===(t=this.linkElement)||void 0===t?void 0:t.focus()),await this.expand()}async expand(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!0}))}async handleCollapseClick(e){var t;e.preventDefault(),await(null===(t=this.linkElement)||void 0===t?void 0:t.focus()),await this.collapse()}async collapse(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!1}))}async isOpen(){var e;return null!==(e=this.state._open)&&void 0!==e&&e}get host(){return this}static get watchers(){return{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}}},[260,"kol-tree-item-wc",{_active:[4],_label:[1],_open:[4],_href:[1],level:[32],state:[32],focus:[64],expand:[64],collapse:[64],isOpen:[64]},void 0,{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item-wc"].forEach(e=>{if("kol-tree-item-wc"===e)customElements.get(e)||customElements.define(e,KolTreeItemWc$1)})}const KolTreeItemWc=KolTreeItemWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeItemWc,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{v as KolTreeItemWcTag}from"./component-names.js";const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-tree-item {\n --indentation: var(--tree-item-indentation, calc(10 * 1rem / var(--kolibri-root-font-size, 16)));\n }\n .kol-tree-item__link .kol-link {\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-right: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n padding-left: max(var(--indentation) * var(--level) + 8 * 1rem / var(--kolibri-root-font-size, 16), 8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n display: inline-flex;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}",KolTreeItem$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}async focus(){var e;return Promise.resolve(null===(e=this.element)||void 0===e?void 0:e.focus())}async expand(){var e;return Promise.resolve(null===(e=this.element)||void 0===e?void 0:e.expand())}async collapse(){var e;return Promise.resolve(null===(e=this.element)||void 0===e?void 0:e.collapse())}async isOpen(){var e,n;return null!==(n=await(null===(e=this.element)||void 0===e?void 0:e.isOpen()))&&void 0!==n&&n}render(){return h(KolTreeItemWcTag,{key:"
|
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{v as KolTreeItemWcTag}from"./component-names.js";const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-tree-item {\n --indentation: var(--tree-item-indentation, calc(10 * 1rem / var(--kolibri-root-font-size, 16)));\n }\n .kol-tree-item__link .kol-link {\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-right: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n padding-left: max(var(--indentation) * var(--level) + 8 * 1rem / var(--kolibri-root-font-size, 16), 8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n text-decoration: none;\n }\n .kol-tree-item__link--first-level .kol-link {\n padding-left: calc(6 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tree-item__link-inner {\n display: flex;\n align-items: center;\n }\n .kol-tree-item__children {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree-item .kol-span {\n place-items: unset;\n }\n .kol-tree-item__toggle-button, .kol-tree-item__toggle-button-placeholder {\n display: inline-flex;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n }\n .kol-tree-item__text {\n text-decoration: underline;\n }\n}",KolTreeItem$1=proxyCustomElement(class extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}async focus(){var e;return Promise.resolve(null===(e=this.element)||void 0===e?void 0:e.focus())}async expand(){var e;return Promise.resolve(null===(e=this.element)||void 0===e?void 0:e.expand())}async collapse(){var e;return Promise.resolve(null===(e=this.element)||void 0===e?void 0:e.collapse())}async isOpen(){var e,n;return null!==(n=await(null===(e=this.element)||void 0===e?void 0:e.isOpen()))&&void 0!==n&&n}render(){return h(KolTreeItemWcTag,{key:"1fd84dd20ebe2a6082b026baa4acc28a5c50ab11",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:e=>this.element=e},h("slot",{key:"04feee9cc8420f26d90ae4ad326ae5b18701893d"}))}static get style(){return{default:defaultStyleCss}}},[289,"kol-tree-item",{_active:[4],_label:[1],_open:[4],_href:[1],focus:[64],expand:[64],collapse:[64],isOpen:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item"].forEach(e=>{if("kol-tree-item"===e)customElements.get(e)||customElements.define(e,KolTreeItem$1)})}const KolTreeItem=KolTreeItem$1,defineCustomElement=defineCustomElement$1;export{KolTreeItem,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{x as KolTreeItemTag,w as KolTreeTag}from"./component-names.js";import"./common.js";import{v as validateLabel}from"./label.js";const KolTreeWc$1=proxyCustomElement(class e extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.state={_label:""}}validateLabel(e){validateLabel(this,e)}render(){return h(Host,{key:"
|
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{x as KolTreeItemTag,w as KolTreeTag}from"./component-names.js";import"./common.js";import{v as validateLabel}from"./label.js";const KolTreeWc$1=proxyCustomElement(class e extends HTMLElement{constructor(e){super(),!1!==e&&this.__registerHost(),this.state={_label:""}}validateLabel(e){validateLabel(this,e)}render(){return h(Host,{key:"35a6c7c7cf981eca928ad6e9a3e18c9ce9edf606",onSlotchange:this.handleSlotchange.bind(this)},h("nav",{key:"af115cf6342afeeffe2d4a8b119000f9685f3d26",class:"kol-tree","aria-label":this.state._label},h("ul",{key:"0d86cee9ca2ca5317bf40e7a5acc4adb554b4406",class:"kol-tree__treeview-navigation",role:"tree","aria-label":this.state._label},h("slot",{key:"0aa3900c280259281fe4caedfd62e1800eb193fe"}))))}static isTreeItem(e){return(null==e?void 0:e.tagName)===KolTreeItemTag.toUpperCase()}componentWillLoad(){this.validateLabel(this._label),this.handleTreeChange(),this.observeChildListMutations()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}observeChildListMutations(){this.observer=new MutationObserver(this.handleTreeChange.bind(this)),this.observeTopLevelItems()}handleSlotchange(){this.observeTopLevelItems(),this.handleTreeChange()}observeTopLevelItems(){var e;null===(e=this.getTopLevelTreeItems())||void 0===e||e.forEach(e=>{var t;null===(t=this.observer)||void 0===t||t.observe(e,{childList:!0,subtree:!0})})}getTopLevelTreeItems(){var t,a,l;return null===(l=null===(a=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===a?void 0:a.call(t))||void 0===l?void 0:l.filter(e.isTreeItem)}handleTreeChange(){this.treeItemElements=this.getTreeItemElements(),this.ensureActiveItemVisibility()}getTreeItemElements(){var e;return null===(e=this.getTopLevelTreeItems())||void 0===e?void 0:e.reduce((e,t)=>{const a=t.querySelectorAll(KolTreeItemTag);return[...e,t,...a]},[])}async getOpenTreeItemElements(){if(!this.treeItemElements)return;const t=async a=>!e.isTreeItem(a.parentElement)||await a.parentElement.isOpen()&&await t(a.parentElement);return(await Promise.all(this.treeItemElements.map(async e=>({value:e,include:await t(e)})))).filter(e=>e.include).map(e=>e.value)}async handleKeyDown(e){var t,a,l,i,n,o,s,r,c,d;const u=await this.getOpenTreeItemElements(),v=null===(t=document.activeElement)||void 0===t?void 0:t.closest(KolTreeItemTag),m=e.metaKey||e.altKey||e.ctrlKey||e.shiftKey;if(!u||!v)return;const h=null==u?void 0:u.findIndex(e=>e===v);switch(e.key){case"ArrowDown":await(null===(a=u[h+1])||void 0===a?void 0:a.focus()),e.preventDefault();break;case"ArrowUp":await(null===(l=u[h-1])||void 0===l?void 0:l.focus()),e.preventDefault();break;case"Right":case"ArrowRight":e.preventDefault(),await v.isOpen()?await(null===(i=u[h+1])||void 0===i?void 0:i.focus()):await v.expand();break;case"Left":case"ArrowLeft":if(e.preventDefault(),await v.isOpen())await v.collapse();else{const e=u.findIndex(e=>e===v.parentElement);-1!==e&&await(null===(n=u[e])||void 0===n?void 0:n.focus())}break;case"Home":await(null===(o=u[0])||void 0===o?void 0:o.focus()),e.preventDefault();break;case"End":await(null===(s=u[u.length-1])||void 0===s?void 0:s.focus()),e.preventDefault();break;case null===(r=e.key.match(/^[a-zA-Z0-9]$/))||void 0===r?void 0:r.input:if(!m){const t=e.key.toLowerCase(),a=u.indexOf(v)+1,l=u.concat(u),i=l.slice(a,a+u.length).findIndex(e=>{var a;return null===(a=e.getAttribute("_label"))||void 0===a?void 0:a.trim().toLowerCase().startsWith(t)});-1!==i&&(await(null===(c=l[a+i])||void 0===c?void 0:c.focus()),e.preventDefault())}break;case"*":{const e=null===(d=v.parentElement)||void 0===d?void 0:d.querySelectorAll(KolTreeItemTag);null==e||e.forEach(e=>{e.expand()});break}}}async handleFocusOut(e){e.relatedTarget&&!e.relatedTarget.closest(KolTreeTag)&&await this.ensureActiveItemVisibility()}async ensureActiveItemVisibility(){const t=a=>{e.isTreeItem(a.parentElement)&&(a.parentElement.expand(),t(a.parentElement))},a=(()=>{var t,a,l,i;const n=null!==(i=null===(l=null===(a=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===a?void 0:a.call(t))||void 0===l?void 0:l.filter(e.isTreeItem))&&void 0!==i?i:[];for(const e of n){if(e._active)return e;const t=e.querySelector(`${KolTreeItemTag}[_active="true"]`);if(t&&t._active)return t}})();a&&t(a)}get host(){return this}static get watchers(){return{_label:["validateLabel"]}}},[260,"kol-tree-wc",{_label:[1],state:[32]},[[0,"keydown","handleKeyDown"],[0,"focusout","handleFocusOut"]],{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-wc"].forEach(e=>{if("kol-tree-wc"===e)customElements.get(e)||customElements.define(e,KolTreeWc$1)})}const KolTreeWc=KolTreeWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeWc,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{u as KolTreeWcTag}from"./component-names.js";const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-tree__treeview-navigation {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolTree$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow()}render(){return h(KolTreeWcTag,{key:"
|
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{u as KolTreeWcTag}from"./component-names.js";const defaultStyleCss="/* forward the rem function */\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n 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 .hastooltip {\n z-index: 900 !important;\n }\n}\n@layer kol-component {\n .kol-tree__treeview-navigation {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-tree:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolTree$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow()}render(){return h(KolTreeWcTag,{key:"d80ef53eb88006c0247391eefe6e13dbcfb06b81",_label:this._label},h("slot",{key:"7bd6fbba7b91939d863f0048a06ce2a74d4524fa"}))}static get style(){return{default:defaultStyleCss}}},[289,"kol-tree",{_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree"].forEach(n=>{if("kol-tree"===n)customElements.get(n)||customElements.define(n,KolTree$1)})}const KolTree=KolTree$1,defineCustomElement=defineCustomElement$1;export{KolTree,defineCustomElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import"./common.js";import{v as validateLabel}from"./label.js";import{t as translate}from"./i18n.js";import{y as KolBadgeTag}from"./component-names.js";const defaultStyleCss="/*\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 .hastooltip {\n z-index: 900 !important;\n }\n}",KolVersion$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.translateVersion=translate("kol-version"),this.state={_label:"0.0.0-alpha.0"}}render(){return h(Host,{key:"
|
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import"./common.js";import{v as validateLabel}from"./label.js";import{t as translate}from"./i18n.js";import{y as KolBadgeTag}from"./component-names.js";const defaultStyleCss="/*\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 .hastooltip {\n z-index: 900 !important;\n }\n}",KolVersion$1=proxyCustomElement(class extends HTMLElement{constructor(n){super(),!1!==n&&this.__registerHost(),this.__attachShadow(),this.translateVersion=translate("kol-version"),this.state={_label:"0.0.0-alpha.0"}}render(){return h(Host,{key:"c8e72198321e8cdab71e9292a10c294f979daf51",class:"kol-version"},h(KolBadgeTag,{key:"9c1141344592a00a5d7e3081b397ecf13e8bf6b5",_color:"#bec5c9",_icons:{left:{icon:"kolicon-version",label:this.translateVersion}},_label:this.state._label}))}validateLabel(n){validateLabel(this,n,{required:!0})}componentWillLoad(){this.validateLabel(this._label)}static get watchers(){return{_label:["validateLabel"]}}static get style(){return{default:defaultStyleCss}}},[289,"kol-version",{_label:[1],state:[32]},void 0,{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-version"].forEach(n=>{if("kol-version"===n)customElements.get(n)||customElements.define(n,KolVersion$1)})}const KolVersion=KolVersion$1,defineCustomElement=defineCustomElement$1;export{KolVersion,defineCustomElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"label2.js","mappings":";;;;;AAKa,MAAA,SAAS,GAAG,oBAAoB,CAAY,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,EAAE;;;;","names":[],"sources":["src/internal/props/label.ts"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type LabelProp = SimpleProp<'label', string>;\nexport const labelProp = createPropDefinition<LabelProp>(normalizeString, (v) => v.length >= 2 && v.length <= 80);\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"src.js","mappings":";;;;;AAKO,MAAM,OAAO,GAAG,oBAAoB,CAAU,eAAe,EAAE,MAAM,IAAI;;;;","names":[],"sources":["src/internal/props/src.ts"],"sourcesContent":["import type { SimpleProp } from './helpers/factory';\nimport { createPropDefinition } from './helpers/factory';\nimport { normalizeString } from './helpers/normalizers';\n\nexport type SrcProp = SimpleProp<'src', string>;\nexport const srcProp = createPropDefinition<SrcProp>(normalizeString, () => true);\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{_ as __rest}from"./tslib.es6-CxX45GIN.js";import{h,F as Fragment}from"./index-
|
|
4
|
+
import{_ as __rest}from"./tslib.es6-CxX45GIN.js";import{h,F as Fragment}from"./index-rqIkzkgG.js";import{c as clsx}from"./clsx-COFh-Vc8.js";import{d as KolIconTag,c as KolButtonWcTag}from"./component-names-CqTpXVIM.js";import{t as translate}from"./i18n-DvMeCREp.js";import{b as bem$1}from"./bem-registry-DRYZs7IX.js";import{c}from"./browser-KcXKIKON.js";import{K as KolHeadingFc}from"./Heading-DjpTyUay.js";const bem=c();bem("kol-alert","closer"),bem("kol-alert","content");const BEM_CLASS_ALERT__ICON=bem("kol-alert","icon"),translateError=translate("kol-error"),translateInfo=translate("kol-info"),translateWarning=translate("kol-warning"),translateSuccess=translate("kol-success"),translateMessage=translate("kol-message"),Icon=({ariaLabel:e,icon:a})=>h(Fragment,null,h("span",{class:"visually-hidden"},e),h(KolIconTag,{class:BEM_CLASS_ALERT__ICON,_label:"",_icons:a})),AlertIcon=({type:e,label:a})=>{switch(e){case"error":return h(Icon,{ariaLabel:translateError,icon:"kolicon-alert-error",label:a});case"info":return h(Icon,{ariaLabel:translateInfo,icon:"kolicon-alert-info",label:a});case"warning":return h(Icon,{ariaLabel:translateWarning,icon:"kolicon-alert-warning",label:a});case"success":return h(Icon,{ariaLabel:translateSuccess,icon:"kolicon-alert-success",label:a});default:return h(Icon,{ariaLabel:translateMessage,icon:"kolicon-alert-info",label:a})}},alertBem=bem$1.forBlock("kol-alert"),BEM_CLASS_ALERT__CLOSER=alertBem("closer"),BEM_CLASS_ALERT__CONTENT=alertBem("content"),vibrateOnError=()=>{if("undefined"==typeof navigator||"function"!=typeof navigator.vibrate)return;const e=navigator.userActivation;if(((null==e?void 0:e.isActive)||(null==e?void 0:e.hasBeenActive))&&matchMedia("(any-pointer: coarse)").matches)try{navigator.vibrate([100,75,100,75,100])}catch(e){}},KolAlertFc=(e,a)=>{const{class:t={},alert:l=!1,hasCloser:r=!1,label:o,level:n=0,type:s="default",variant:i="msg",onAlertTimeout:c,onCloserClick:_}=e,m=__rest(e,["class","alert","hasCloser","label","level","type","variant","onAlertTimeout","onCloserClick"]),b=translate("kol-close-alert");l&&(vibrateOnError(),setTimeout(()=>{null==c||c()},1e4));const d=alertBem({hasCloser:!!r,[`type-${s}`]:!0,[`variant-${i}`]:!0}),g=alertBem("heading",{[`h${n}`]:!0}),u=Object.assign({class:clsx(t,d)},m);return h("div",Object.assign({role:l?"alert":void 0},u,{"data-testid":"alert"}),h("div",{class:"kol-alert__container"},h(AlertIcon,{label:o,type:s}),h("div",{class:"kol-alert__container-content"},o&&h(KolHeadingFc,{class:g,level:n,id:"heading"},o),"msg"===i&&h("span",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":o?"heading":void 0},a)),r&&h(KolButtonWcTag,{class:BEM_CLASS_ALERT__CLOSER+" kol-close-button","data-testid":"alert-close-button",_ariaDescription:(null==o?void 0:o.trim())||"",_hideLabel:!0,_icons:{left:{icon:"kolicon-cross"}},_label:b,_on:{onClick:_},_tooltipAlign:"left"})),"card"===i&&h("div",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":o?"heading":void 0},a))};export{KolAlertFc as K};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert-D1w-DbWU.js","sources":["src/functional-components/Alert/bem.ts","src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { generateBemClassNames } from 'typed-bem';\n\n/**\n * This file defines the BEM schema for the kol-alert component.\n */\n\n/**\n * The schema defines the structure of the BEM class names\n */\ntype SCHEMA = {\n\t'kol-alert': {\n\t\t/**\n\t\t * Here we define the elements we needed\n\t\t * to realize a minimal full featured alert\n\t\t * component (DOM).\n\t\t */\n\t\telements: {\n\t\t\tcontainer: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t\ticon: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t\theading: {\n\t\t\t\t/**\n\t\t\t\t * Some elements needs modifiers to\n\t\t\t\t * style them properly.\n\t\t\t\t */\n\t\t\t\tmodifiers: Set<'h0' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;\n\t\t\t};\n\t\t\tcontent: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t\tcloser: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t};\n\t\t/**\n\t\t * Here we define the modifiers related to the\n\t\t * kol-alert component properties.\n\t\t */\n\t\tmodifiers: Set<'hasCloser' | 'type-default' | 'type-error' | 'type-info' | 'type-success' | 'type-warning' | 'variant-card' | 'variant-msg'>;\n\t};\n};\n\n/**\n * Define the generator function for the BEM class names.\n */\nconst bem = generateBemClassNames<SCHEMA>();\n\n/**\n * Define a constants object that contains the BEM schema for\n * reuse to generate SCSS files in themes.\n */\nconst BEM: SCHEMA = {\n\t'kol-alert': {\n\t\telements: {\n\t\t\tcloser: { modifiers: null },\n\t\t\theading: { modifiers: new Set(['h0', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']) },\n\t\t\ticon: { modifiers: null },\n\t\t\tcontent: { modifiers: null },\n\t\t\tcontainer: { modifiers: null },\n\t\t},\n\t\tmodifiers: new Set(['hasCloser', 'type-default', 'type-error', 'type-info', 'type-success', 'type-warning', 'variant-card', 'variant-msg']),\n\t},\n};\n\n/**\n * Define the static BEM class names for the alert component.\n */\nconst BEM_CLASS_ALERT__CLOSER = bem('kol-alert', 'closer');\nconst BEM_CLASS_ALERT__CONTENT = bem('kol-alert', 'content');\nconst BEM_CLASS_ALERT__ICON = bem('kol-alert', 'icon');\n\nexport { BEM as BEM_ALERT, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT, BEM_CLASS_ALERT__ICON, bem as genBemAlert };\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport type { AlertType } from '../../schema';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\nconst translateError = translate('kol-error');\nconst translateInfo = translate('kol-info');\nconst translateWarning = translate('kol-warning');\nconst translateSuccess = translate('kol-success');\nconst translateMessage = translate('kol-message');\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translateError} icon=\"kolicon-alert-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translateInfo} icon=\"kolicon-alert-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translateWarning} icon=\"kolicon-alert-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translateSuccess} icon=\"kolicon-alert-success\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translateMessage} icon=\"kolicon-alert-info\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from '../../utils/clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport { bem } from '../../schema/bem-registry';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\n\nconst alertBem = bem.forBlock('kol-alert');\nconst BEM_CLASS_ALERT__CLOSER = alertBem('closer');\nconst BEM_CLASS_ALERT__CONTENT = alertBem('content');\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\n/**\n * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n * - https://googlechrome.github.io/samples/vibration/\n * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n * @todo Move side-effect out of render-function to avoid multiple incarnations.\n */\nconst vibrateOnError = (): void => {\n\tif (typeof navigator === 'undefined' || typeof navigator.vibrate !== 'function') {\n\t\treturn;\n\t}\n\tconst ua = navigator.userActivation;\n\tconst hasGesture = ua?.isActive || ua?.hasBeenActive;\n\tif (!hasGesture) {\n\t\treturn;\n\t}\n\tif (!matchMedia('(any-pointer: coarse)').matches) {\n\t\treturn;\n\t}\n\ttry {\n\t\tnavigator.vibrate([100, 75, 100, 75, 100]);\n\t} catch {\n\t\t/* no-op */\n\t}\n};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tconst translateCloseAlert = translate('kol-close-alert');\n\n\tif (alert) {\n\t\tvibrateOnError();\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = alertBem({\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = alertBem('heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div role={alert ? 'alert' : undefined} {...rootProps} data-testid=\"alert\">\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER + ' kol-close-button'}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'kolicon-cross',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translateCloseAlert}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"names":["generateBemClassNames","bem"],"mappings":";;;;;;;;;;;;AAgDA,MAAM,GAAG,GAAGA,CAAqB,EAAU;AAsBX,GAAG,CAAC,WAAW,EAAE,QAAQ;AACxB,GAAG,CAAC,WAAW,EAAE,SAAS;AAC3D,MAAM,qBAAqB,GAAG,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC;;AClEtD,MAAM,cAAc,GAAG,SAAS,CAAC,WAAW,CAAC;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC;AAC3C,MAAM,gBAAgB,GAAG,SAAS,CAAC,aAAa,CAAC;AACjD,MAAM,gBAAgB,GAAG,SAAS,CAAC,aAAa,CAAC;AACjD,MAAM,gBAAgB,GAAG,SAAS,CAAC,aAAa,CAAC;AAOjD,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,KAAI;AAC7F,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,IAAA,EACC,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,iBAAiB,EAAA,EAAE,SAAS,CAAQ,EAChD,CAAA,CAAC,UAAU,EAAC,EAAA,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,EAAI,CAAA,CAClE;AAEL,CAAC;AAED,MAAM,SAAS,GAA6C,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAI;IAC/E,QAAQ,IAAI;AACX,QAAA,KAAK,OAAO;AACX,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,cAAc,EAAE,IAAI,EAAC,qBAAqB,EAAC,KAAK,EAAE,KAAK,GAAI;AACpF,QAAA,KAAK,MAAM;AACV,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,aAAa,EAAE,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAE,KAAK,GAAI;AAClF,QAAA,KAAK,SAAS;AACb,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,KAAK,GAAI;AACxF,QAAA,KAAK,SAAS;AACb,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,KAAK,GAAI;AACxF,QAAA;AACC,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAE,KAAK,GAAI;;AAEvF,CAAC;;AC5BD,MAAM,QAAQ,GAAGC,KAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;AAC1C,MAAM,uBAAuB,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAClD,MAAM,wBAAwB,GAAG,QAAQ,CAAC,SAAS,CAAC;AAcpD,MAAM,cAAc,GAAG,MAAW;AACjC,IAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,OAAO,SAAS,CAAC,OAAO,KAAK,UAAU,EAAE;QAChF;;AAED,IAAA,MAAM,EAAE,GAAG,SAAS,CAAC,cAAc;IACnC,MAAM,UAAU,GAAG,CAAA,EAAE,KAAF,IAAA,IAAA,EAAE,uBAAF,EAAE,CAAE,QAAQ,MAAI,EAAE,aAAF,EAAE,KAAA,MAAA,GAAA,MAAA,GAAF,EAAE,CAAE,aAAa,CAAA;IACpD,IAAI,CAAC,UAAU,EAAE;QAChB;;IAED,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,OAAO,EAAE;QACjD;;AAED,IAAA,IAAI;AACH,QAAA,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;;IACzC,OAAA,EAAA,EAAM;;AAGT,CAAC;AAED,MAAM,UAAU,GAAwB,CAAC,KAAK,EAAE,QAAQ,KAAI;AAC3D,IAAA,MAAM,EACL,KAAK,EAAE,UAAU,GAAG,EAAE,EACtB,KAAK,GAAG,KAAK,EACb,SAAS,GAAG,KAAK,EACjB,KAAK,EACL,KAAK,GAAG,CAAC,EACT,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,cAAc,EACd,aAAa,EAEV,GAAA,KAAK,EADL,KAAK,GAAA,MAAA,CACL,KAAK,EAXH,CAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,eAAA,CAWL,CAAQ;AAET,IAAA,MAAM,mBAAmB,GAAG,SAAS,CAAC,iBAAiB,CAAC;IAExD,IAAI,KAAK,EAAE;AACV,QAAA,cAAc,EAAE;QAEhB,UAAU,CAAC,MAAK;AACf,YAAA,cAAc,KAAd,IAAA,IAAA,cAAc,KAAd,MAAA,GAAA,MAAA,GAAA,cAAc,EAAI;SAClB,EAAE,KAAK,CAAC;;IAMV,MAAM,cAAc,GAAG,QAAQ,CAAC;QAC/B,SAAS,EAAE,CAAC,CAAC,SAAS;AACtB,QAAA,CAAC,CAAQ,KAAA,EAAA,IAAI,CAAE,CAAA,GAAG,IAAI;AACtB,QAAA,CAAC,CAAW,QAAA,EAAA,OAAO,CAAE,CAAA,GAAG,IAAI;AAC5B,KAAA,CAAC;AACF,IAAA,MAAM,kBAAkB,GAAG,QAAQ,CAAC,SAAS,EAAE;AAC9C,QAAA,CAAC,CAAI,CAAA,EAAA,KAAK,CAAE,CAAA,GAAG,IAAI;AACnB,KAAA,CAAC;AAEF,IAAA,MAAM,SAAS,GAAA,MAAA,CAAA,MAAA,CAAA,EACd,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EACpC,EAAA,KAAK,CACR;AAED,IAAA,QACC,CAAK,CAAA,KAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,EAAM,EAAA,SAAS,mBAAc,OAAO,EAAA,CAAA,EACzE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,sBAAsB,EAAA,EAChC,CAAC,CAAA,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAI,CAAA,EACvC,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,8BAA8B,EAAA,EACvC,KAAK,KACL,CAAA,CAAC,YAAY,EAAC,EAAA,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,EACjE,EAAA,KAAK,CACQ,CACf,EACA,OAAO,KAAK,KAAK,KACjB,YAAM,KAAK,EAAE,wBAAwB,EAAA,kBAAA,EAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,EACpF,EAAA,QAAQ,CACH,CACP,CACI,EACL,SAAS,KACT,CAAC,CAAA,cAAc,EACd,EAAA,KAAK,EAAE,uBAAuB,GAAG,mBAAmB,EACxC,aAAA,EAAA,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,EAAA,IAAA,EACV,MAAM,EAAE;AACP,YAAA,IAAI,EAAE;AACL,gBAAA,IAAI,EAAE,eAAe;AACrB,aAAA;SACD,EACD,MAAM,EAAE,mBAAmB,EAC3B,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,EAAA,CACnB,CACF,CACI,EACL,OAAO,KAAK,MAAM,KAClB,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,wBAAwB,EAAoB,kBAAA,EAAA,KAAK,GAAG,SAAS,GAAG,SAAS,EAAA,EACnF,QAAQ,CACJ,CACN,CACI;AAER;;;;"}
|
|
1
|
+
{"version":3,"file":"Alert-DY4wIJCN.js","sources":["src/functional-components/Alert/bem.ts","src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { generateBemClassNames } from 'typed-bem';\n\n/**\n * This file defines the BEM schema for the kol-alert component.\n */\n\n/**\n * The schema defines the structure of the BEM class names\n */\ntype SCHEMA = {\n\t'kol-alert': {\n\t\t/**\n\t\t * Here we define the elements we needed\n\t\t * to realize a minimal full featured alert\n\t\t * component (DOM).\n\t\t */\n\t\telements: {\n\t\t\tcontainer: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t\ticon: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t\theading: {\n\t\t\t\t/**\n\t\t\t\t * Some elements needs modifiers to\n\t\t\t\t * style them properly.\n\t\t\t\t */\n\t\t\t\tmodifiers: Set<'h0' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;\n\t\t\t};\n\t\t\tcontent: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t\tcloser: {\n\t\t\t\tmodifiers: null;\n\t\t\t};\n\t\t};\n\t\t/**\n\t\t * Here we define the modifiers related to the\n\t\t * kol-alert component properties.\n\t\t */\n\t\tmodifiers: Set<'hasCloser' | 'type-default' | 'type-error' | 'type-info' | 'type-success' | 'type-warning' | 'variant-card' | 'variant-msg'>;\n\t};\n};\n\n/**\n * Define the generator function for the BEM class names.\n */\nconst bem = generateBemClassNames<SCHEMA>();\n\n/**\n * Define a constants object that contains the BEM schema for\n * reuse to generate SCSS files in themes.\n */\nconst BEM: SCHEMA = {\n\t'kol-alert': {\n\t\telements: {\n\t\t\tcloser: { modifiers: null },\n\t\t\theading: { modifiers: new Set(['h0', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']) },\n\t\t\ticon: { modifiers: null },\n\t\t\tcontent: { modifiers: null },\n\t\t\tcontainer: { modifiers: null },\n\t\t},\n\t\tmodifiers: new Set(['hasCloser', 'type-default', 'type-error', 'type-info', 'type-success', 'type-warning', 'variant-card', 'variant-msg']),\n\t},\n};\n\n/**\n * Define the static BEM class names for the alert component.\n */\nconst BEM_CLASS_ALERT__CLOSER = bem('kol-alert', 'closer');\nconst BEM_CLASS_ALERT__CONTENT = bem('kol-alert', 'content');\nconst BEM_CLASS_ALERT__ICON = bem('kol-alert', 'icon');\n\nexport { BEM as BEM_ALERT, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT, BEM_CLASS_ALERT__ICON, bem as genBemAlert };\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport type { AlertType } from '../../schema';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\nconst translateError = translate('kol-error');\nconst translateInfo = translate('kol-info');\nconst translateWarning = translate('kol-warning');\nconst translateSuccess = translate('kol-success');\nconst translateMessage = translate('kol-message');\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translateError} icon=\"kolicon-alert-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translateInfo} icon=\"kolicon-alert-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translateWarning} icon=\"kolicon-alert-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translateSuccess} icon=\"kolicon-alert-success\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translateMessage} icon=\"kolicon-alert-info\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from '../../utils/clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport { bem } from '../../schema/bem-registry';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\n\nconst alertBem = bem.forBlock('kol-alert');\nconst BEM_CLASS_ALERT__CLOSER = alertBem('closer');\nconst BEM_CLASS_ALERT__CONTENT = alertBem('content');\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\n/**\n * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n * - https://googlechrome.github.io/samples/vibration/\n * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n * @todo Move side-effect out of render-function to avoid multiple incarnations.\n */\nconst vibrateOnError = (): void => {\n\tif (typeof navigator === 'undefined' || typeof navigator.vibrate !== 'function') {\n\t\treturn;\n\t}\n\tconst ua = navigator.userActivation;\n\tconst hasGesture = ua?.isActive || ua?.hasBeenActive;\n\tif (!hasGesture) {\n\t\treturn;\n\t}\n\tif (!matchMedia('(any-pointer: coarse)').matches) {\n\t\treturn;\n\t}\n\ttry {\n\t\tnavigator.vibrate([100, 75, 100, 75, 100]);\n\t} catch {\n\t\t/* no-op */\n\t}\n};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tconst translateCloseAlert = translate('kol-close-alert');\n\n\tif (alert) {\n\t\tvibrateOnError();\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = alertBem({\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = alertBem('heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div role={alert ? 'alert' : undefined} {...rootProps} data-testid=\"alert\">\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER + ' kol-close-button'}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'kolicon-cross',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translateCloseAlert}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"names":["generateBemClassNames","bem"],"mappings":";;;;;;;;;;;;AAgDA,MAAM,GAAG,GAAGA,CAAqB,EAAU;AAsBX,GAAG,CAAC,WAAW,EAAE,QAAQ;AACxB,GAAG,CAAC,WAAW,EAAE,SAAS;AAC3D,MAAM,qBAAqB,GAAG,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC;;AClEtD,MAAM,cAAc,GAAG,SAAS,CAAC,WAAW,CAAC;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,UAAU,CAAC;AAC3C,MAAM,gBAAgB,GAAG,SAAS,CAAC,aAAa,CAAC;AACjD,MAAM,gBAAgB,GAAG,SAAS,CAAC,aAAa,CAAC;AACjD,MAAM,gBAAgB,GAAG,SAAS,CAAC,aAAa,CAAC;AAOjD,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,KAAI;AAC7F,IAAA,QACC,CAAA,CAAA,QAAA,EAAA,IAAA,EACC,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,iBAAiB,EAAA,EAAE,SAAS,CAAQ,EAChD,CAAA,CAAC,UAAU,EAAC,EAAA,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,EAAI,CAAA,CAClE;AAEL,CAAC;AAED,MAAM,SAAS,GAA6C,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAI;IAC/E,QAAQ,IAAI;AACX,QAAA,KAAK,OAAO;AACX,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,cAAc,EAAE,IAAI,EAAC,qBAAqB,EAAC,KAAK,EAAE,KAAK,GAAI;AACpF,QAAA,KAAK,MAAM;AACV,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,aAAa,EAAE,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAE,KAAK,GAAI;AAClF,QAAA,KAAK,SAAS;AACb,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,KAAK,GAAI;AACxF,QAAA,KAAK,SAAS;AACb,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAC,uBAAuB,EAAC,KAAK,EAAE,KAAK,GAAI;AACxF,QAAA;AACC,YAAA,OAAO,CAAC,CAAA,IAAI,EAAC,EAAA,SAAS,EAAE,gBAAgB,EAAE,IAAI,EAAC,oBAAoB,EAAC,KAAK,EAAE,KAAK,GAAI;;AAEvF,CAAC;;AC5BD,MAAM,QAAQ,GAAGC,KAAG,CAAC,QAAQ,CAAC,WAAW,CAAC;AAC1C,MAAM,uBAAuB,GAAG,QAAQ,CAAC,QAAQ,CAAC;AAClD,MAAM,wBAAwB,GAAG,QAAQ,CAAC,SAAS,CAAC;AAcpD,MAAM,cAAc,GAAG,MAAW;AACjC,IAAA,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,OAAO,SAAS,CAAC,OAAO,KAAK,UAAU,EAAE;QAChF;;AAED,IAAA,MAAM,EAAE,GAAG,SAAS,CAAC,cAAc;IACnC,MAAM,UAAU,GAAG,CAAA,EAAE,KAAF,IAAA,IAAA,EAAE,uBAAF,EAAE,CAAE,QAAQ,MAAI,EAAE,aAAF,EAAE,KAAA,MAAA,GAAA,MAAA,GAAF,EAAE,CAAE,aAAa,CAAA;IACpD,IAAI,CAAC,UAAU,EAAE;QAChB;;IAED,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,OAAO,EAAE;QACjD;;AAED,IAAA,IAAI;AACH,QAAA,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;;IACzC,OAAA,EAAA,EAAM;;AAGT,CAAC;AAED,MAAM,UAAU,GAAwB,CAAC,KAAK,EAAE,QAAQ,KAAI;AAC3D,IAAA,MAAM,EACL,KAAK,EAAE,UAAU,GAAG,EAAE,EACtB,KAAK,GAAG,KAAK,EACb,SAAS,GAAG,KAAK,EACjB,KAAK,EACL,KAAK,GAAG,CAAC,EACT,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,cAAc,EACd,aAAa,EAEV,GAAA,KAAK,EADL,KAAK,GAAA,MAAA,CACL,KAAK,EAXH,CAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,OAAA,EAAA,OAAA,EAAA,MAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,eAAA,CAWL,CAAQ;AAET,IAAA,MAAM,mBAAmB,GAAG,SAAS,CAAC,iBAAiB,CAAC;IAExD,IAAI,KAAK,EAAE;AACV,QAAA,cAAc,EAAE;QAEhB,UAAU,CAAC,MAAK;AACf,YAAA,cAAc,KAAd,IAAA,IAAA,cAAc,KAAd,MAAA,GAAA,MAAA,GAAA,cAAc,EAAI;SAClB,EAAE,KAAK,CAAC;;IAMV,MAAM,cAAc,GAAG,QAAQ,CAAC;QAC/B,SAAS,EAAE,CAAC,CAAC,SAAS;AACtB,QAAA,CAAC,CAAQ,KAAA,EAAA,IAAI,CAAE,CAAA,GAAG,IAAI;AACtB,QAAA,CAAC,CAAW,QAAA,EAAA,OAAO,CAAE,CAAA,GAAG,IAAI;AAC5B,KAAA,CAAC;AACF,IAAA,MAAM,kBAAkB,GAAG,QAAQ,CAAC,SAAS,EAAE;AAC9C,QAAA,CAAC,CAAI,CAAA,EAAA,KAAK,CAAE,CAAA,GAAG,IAAI;AACnB,KAAA,CAAC;AAEF,IAAA,MAAM,SAAS,GAAA,MAAA,CAAA,MAAA,CAAA,EACd,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,EACpC,EAAA,KAAK,CACR;AAED,IAAA,QACC,CAAK,CAAA,KAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,EAAM,EAAA,SAAS,mBAAc,OAAO,EAAA,CAAA,EACzE,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,sBAAsB,EAAA,EAChC,CAAC,CAAA,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAI,CAAA,EACvC,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,8BAA8B,EAAA,EACvC,KAAK,KACL,CAAA,CAAC,YAAY,EAAC,EAAA,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,EACjE,EAAA,KAAK,CACQ,CACf,EACA,OAAO,KAAK,KAAK,KACjB,YAAM,KAAK,EAAE,wBAAwB,EAAA,kBAAA,EAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,EACpF,EAAA,QAAQ,CACH,CACP,CACI,EACL,SAAS,KACT,CAAC,CAAA,cAAc,EACd,EAAA,KAAK,EAAE,uBAAuB,GAAG,mBAAmB,EACxC,aAAA,EAAA,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,KAAL,IAAA,IAAA,KAAK,KAAL,MAAA,GAAA,MAAA,GAAA,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,EAAA,IAAA,EACV,MAAM,EAAE;AACP,YAAA,IAAI,EAAE;AACL,gBAAA,IAAI,EAAE,eAAe;AACrB,aAAA;SACD,EACD,MAAM,EAAE,mBAAmB,EAC3B,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,EAAA,CACnB,CACF,CACI,EACL,OAAO,KAAK,MAAM,KAClB,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,wBAAwB,EAAoB,kBAAA,EAAA,KAAK,GAAG,SAAS,GAAG,SAAS,EAAA,EACnF,QAAQ,CACJ,CACN,CACI;AAER;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{_ as __rest}from"./tslib.es6-CxX45GIN.js";import{h}from"./index-
|
|
4
|
+
import{_ as __rest}from"./tslib.es6-CxX45GIN.js";import{h}from"./index-rqIkzkgG.js";import{c as KolButtonWcTag}from"./component-names-CqTpXVIM.js";import{c as clsx}from"./clsx-COFh-Vc8.js";import{K as KolHeadingFc}from"./Heading-DjpTyUay.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:i,label:a,level:e=1,disabled:n,open:c,onClick:r,HeadingProps:d={},HeadingButtonProps:t={},ContentProps:p={}}=l,_=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),b=c?"kolicon-chevron-down":"kolicon-chevron-right";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},i)},_),h(KolHeadingFc,{ref:null==d?void 0:d.ref,level:e,class:clsx("collapsible__heading",null==d?void 0:d.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`${b}`,_label:a,_on:{onClick:r}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
|