@public-ui/components 3.0.8-rc.1 → 3.0.8-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1 -1
- package/dist/cjs/{Alert-DV-4s1Xb.js → Alert-Bd6RKJBA.js} +1 -1
- package/dist/cjs/{Alert-DV-4s1Xb.js.map → Alert-Bd6RKJBA.js.map} +1 -1
- package/dist/cjs/{Collapsible-Dc2UP6Fq.js → Collapsible-c0UbSu8F.js} +1 -1
- package/dist/cjs/{Collapsible-Dc2UP6Fq.js.map → Collapsible-c0UbSu8F.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-BBkNAS1H.js → CustomSuggestionsOptionsGroup-r5WexI45.js} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-BBkNAS1H.js.map → CustomSuggestionsOptionsGroup-r5WexI45.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-CLQjSzCV.js → FieldControlStateWrapper-Csh2Lt3p.js} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-CLQjSzCV.js.map → FieldControlStateWrapper-Csh2Lt3p.js.map} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-Dc4wsP5R.js → FormFieldStateWrapper-ms9MM_hC.js} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-Dc4wsP5R.js.map → FormFieldStateWrapper-ms9MM_hC.js.map} +1 -1
- package/dist/cjs/{Heading-DxQNJzeS.js → Heading-BbFdSzWc.js} +1 -1
- package/dist/cjs/{Heading-DxQNJzeS.js.map → Heading-BbFdSzWc.js.map} +1 -1
- package/dist/cjs/{Icon-rMLb2zeC.js → Icon-D4z1Ua5c.js} +1 -1
- package/dist/cjs/{Icon-rMLb2zeC.js.map → Icon-D4z1Ua5c.js.map} +1 -1
- package/dist/cjs/{Input-GSpNdBwc.js → Input-BFxXowd4.js} +1 -1
- package/dist/cjs/{Input-GSpNdBwc.js.map → Input-BFxXowd4.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-q1xpVuqJ.js → InputStateWrapper-7sRdDcCC.js} +1 -1
- package/dist/cjs/{InputStateWrapper-q1xpVuqJ.js.map → InputStateWrapper-7sRdDcCC.js.map} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-BCjxHsIf.js → InternalUnderlinedBadgeText-D_EDrZAP.js} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-BCjxHsIf.js.map → InternalUnderlinedBadgeText-D_EDrZAP.js.map} +1 -1
- package/dist/cjs/{Span-5wAoBjAv.js → Span-CoHw4Fxy.js} +1 -1
- package/dist/cjs/{Span-5wAoBjAv.js.map → Span-CoHw4Fxy.js.map} +1 -1
- package/dist/cjs/{app-globals-Bvdv6BV6.js → app-globals-CkWpyP_W.js} +1 -1
- package/dist/cjs/{app-globals-Bvdv6BV6.js.map → app-globals-CkWpyP_W.js.map} +1 -1
- package/dist/cjs/{controller-q6EnLJOP.js → controller-CfNPWWTZ.js} +1 -1
- package/dist/cjs/{controller-q6EnLJOP.js.map → controller-CfNPWWTZ.js.map} +1 -1
- package/dist/cjs/{controller-C7ONLqfz.js → controller-Da2K1P8P.js} +1 -1
- package/dist/cjs/{controller-C7ONLqfz.js.map → controller-Da2K1P8P.js.map} +1 -1
- package/dist/cjs/{controller-BG68H9_f.js → controller-fCkUnV5u.js} +1 -1
- package/dist/cjs/{controller-BG68H9_f.js.map → controller-fCkUnV5u.js.map} +1 -1
- package/dist/cjs/{controller-icon-JVj5EC2t.js → controller-icon-CtMwV7B8.js} +1 -1
- package/dist/cjs/{controller-icon-JVj5EC2t.js.map → controller-icon-CtMwV7B8.js.map} +1 -1
- package/dist/cjs/{dev.utils-Cz8uPtt2.js → dev.utils-CaZivRsv.js} +1 -1
- package/dist/cjs/{dev.utils-Cz8uPtt2.js.map → dev.utils-CaZivRsv.js.map} +1 -1
- package/dist/cjs/{devtools-WX2qN2B0.js → devtools-BWIQ6t6e.js} +1 -1
- package/dist/cjs/{devtools-WX2qN2B0.js.map → devtools-BWIQ6t6e.js.map} +1 -1
- package/dist/cjs/index-p66prV0P.js +4 -0
- package/dist/cjs/index-p66prV0P.js.map +1 -0
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-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-combobox.cjs.entry.js +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-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-wc.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-wc.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.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-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-settings-wc.entry.cjs.js.map +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-wc.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-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/kolibri.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-accordion.js.map +1 -1
- package/dist/components/kol-breadcrumb.js +1 -1
- package/dist/components/kol-button-link.js +1 -1
- package/dist/components/kol-button-wc.js +1 -1
- package/dist/components/kol-button-wc.js.map +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-details.js.map +1 -1
- package/dist/components/kol-form.js +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-link-wc.js +1 -1
- package/dist/components/kol-link-wc.js.map +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-popover-button-wc.js +1 -1
- package/dist/components/kol-popover-button-wc.js.map +1 -1
- package/dist/components/kol-popover-wc.js +1 -1
- package/dist/components/kol-popover-wc.js.map +1 -1
- package/dist/components/kol-quote.js +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-select.js.map +1 -1
- package/dist/components/kol-table-settings-wc.js +1 -1
- package/dist/components/kol-table-settings-wc.js.map +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateful.js.map +1 -1
- package/dist/components/kol-table-stateless-wc.js +1 -1
- package/dist/components/kol-table-stateless-wc.js.map +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-table-stateless.js.map +1 -1
- package/dist/components/kol-tooltip-wc.js +1 -1
- package/dist/components/kol-tooltip-wc.js.map +1 -1
- package/dist/esm/{Alert-B3jx2jlL.js → Alert-_tq2FoQ5.js} +1 -1
- package/dist/{kolibri/Alert-B3jx2jlL.js.map → esm/Alert-_tq2FoQ5.js.map} +1 -1
- package/dist/esm/{Collapsible-DOnIFY33.js → Collapsible-CDwlCzFc.js} +1 -1
- package/dist/esm/{Collapsible-DOnIFY33.js.map → Collapsible-CDwlCzFc.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-BiywiWxx.js → CustomSuggestionsOptionsGroup-tYcs0PjI.js} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-BiywiWxx.js.map → CustomSuggestionsOptionsGroup-tYcs0PjI.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-oMcmUdOF.js → FieldControlStateWrapper-DPS47DdW.js} +1 -1
- package/dist/{kolibri/FieldControlStateWrapper-oMcmUdOF.js.map → esm/FieldControlStateWrapper-DPS47DdW.js.map} +1 -1
- package/dist/esm/{FormFieldStateWrapper-BBrHIwy9.js → FormFieldStateWrapper-CXX3L-J-.js} +1 -1
- package/dist/{kolibri/FormFieldStateWrapper-BBrHIwy9.js.map → esm/FormFieldStateWrapper-CXX3L-J-.js.map} +1 -1
- package/dist/esm/{Heading-DqUSmJEO.js → Heading-ClMNjISM.js} +1 -1
- package/dist/{kolibri/Heading-DqUSmJEO.js.map → esm/Heading-ClMNjISM.js.map} +1 -1
- package/dist/esm/Icon-DbAAa0Pk.js +4 -0
- package/dist/esm/{Icon-B-YLFbev.js.map → Icon-DbAAa0Pk.js.map} +1 -1
- package/dist/esm/Input-BeGyOfuS.js +4 -0
- package/dist/esm/{Input-D-UExd4D.js.map → Input-BeGyOfuS.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-WDItQP2r.js → InputStateWrapper-DhEnE4BK.js} +1 -1
- package/dist/esm/{InputStateWrapper-WDItQP2r.js.map → InputStateWrapper-DhEnE4BK.js.map} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-CodJXcQG.js → InternalUnderlinedBadgeText-DoYMr6GR.js} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-CodJXcQG.js.map → InternalUnderlinedBadgeText-DoYMr6GR.js.map} +1 -1
- package/dist/esm/{Span-BUH9xZLf.js → Span-B8GtyhT-.js} +1 -1
- package/dist/esm/{Span-BUH9xZLf.js.map → Span-B8GtyhT-.js.map} +1 -1
- package/dist/esm/{app-globals-C4Hgadub.js → app-globals-BIPpDlEg.js} +1 -1
- package/dist/esm/{app-globals-C4Hgadub.js.map → app-globals-BIPpDlEg.js.map} +1 -1
- package/dist/esm/{controller-CzLzXDtQ.js → controller-Cxj0GMIA.js} +1 -1
- package/dist/esm/{controller-CzLzXDtQ.js.map → controller-Cxj0GMIA.js.map} +1 -1
- package/dist/esm/{controller-CBNM6BpO.js → controller-DdswdfgO.js} +1 -1
- package/dist/esm/{controller-CBNM6BpO.js.map → controller-DdswdfgO.js.map} +1 -1
- package/dist/esm/{controller-icon-DNLRSXZr.js → controller-icon-DIQMFP0b.js} +1 -1
- package/dist/esm/{controller-icon-DNLRSXZr.js.map → controller-icon-DIQMFP0b.js.map} +1 -1
- package/dist/esm/{controller-BPnEmeBr.js → controller-xTkXmOlE.js} +1 -1
- package/dist/esm/{controller-BPnEmeBr.js.map → controller-xTkXmOlE.js.map} +1 -1
- package/dist/esm/{dev.utils-BB49mRnl.js → dev.utils-Cn_6kyQ0.js} +1 -1
- package/dist/esm/{dev.utils-BB49mRnl.js.map → dev.utils-Cn_6kyQ0.js.map} +1 -1
- package/dist/esm/{devtools-6yxauOZx.js → devtools-COtKdu8_.js} +1 -1
- package/dist/esm/{devtools-6yxauOZx.js.map → devtools-COtKdu8_.js.map} +1 -1
- package/dist/esm/index-pomHlJYE.js +4 -0
- package/dist/esm/index-pomHlJYE.js.map +1 -0
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js.map +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-wc.entry.js +1 -1
- package/dist/esm/kol-button-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-combobox.entry.js +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-drawer.entry.js +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-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-wc.entry.js.map +1 -1
- package/dist/esm/kol-popover-button.entry.js +1 -1
- package/dist/esm/kol-popover-wc.entry.js +1 -1
- package/dist/esm/kol-popover-wc.entry.js.map +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-select.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-skip-nav.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-table-settings-wc.entry.js +1 -1
- package/dist/esm/kol-table-settings-wc.entry.js.map +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-wc.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js.map +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toolbar.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-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/kolibri.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/Alert-_tq2FoQ5.js +4 -0
- package/dist/{esm/Alert-B3jx2jlL.js.map → kolibri/Alert-_tq2FoQ5.js.map} +1 -1
- package/dist/kolibri/{Collapsible-DOnIFY33.js → Collapsible-CDwlCzFc.js} +1 -1
- package/dist/kolibri/{Collapsible-DOnIFY33.js.map → Collapsible-CDwlCzFc.js.map} +1 -1
- package/dist/kolibri/{CustomSuggestionsOptionsGroup-BiywiWxx.js → CustomSuggestionsOptionsGroup-tYcs0PjI.js} +1 -1
- package/dist/kolibri/{CustomSuggestionsOptionsGroup-BiywiWxx.js.map → CustomSuggestionsOptionsGroup-tYcs0PjI.js.map} +1 -1
- package/dist/kolibri/FieldControlStateWrapper-DPS47DdW.js +4 -0
- package/dist/{esm/FieldControlStateWrapper-oMcmUdOF.js.map → kolibri/FieldControlStateWrapper-DPS47DdW.js.map} +1 -1
- package/dist/kolibri/{FormFieldStateWrapper-BBrHIwy9.js → FormFieldStateWrapper-CXX3L-J-.js} +1 -1
- package/dist/{esm/FormFieldStateWrapper-BBrHIwy9.js.map → kolibri/FormFieldStateWrapper-CXX3L-J-.js.map} +1 -1
- package/dist/kolibri/{Heading-DqUSmJEO.js → Heading-ClMNjISM.js} +1 -1
- package/dist/{esm/Heading-DqUSmJEO.js.map → kolibri/Heading-ClMNjISM.js.map} +1 -1
- package/dist/kolibri/Icon-DbAAa0Pk.js +4 -0
- package/dist/kolibri/{Icon-B-YLFbev.js.map → Icon-DbAAa0Pk.js.map} +1 -1
- package/dist/kolibri/Input-BeGyOfuS.js +4 -0
- package/dist/kolibri/{Input-D-UExd4D.js.map → Input-BeGyOfuS.js.map} +1 -1
- package/dist/kolibri/{InputStateWrapper-WDItQP2r.js → InputStateWrapper-DhEnE4BK.js} +1 -1
- package/dist/kolibri/{InputStateWrapper-WDItQP2r.js.map → InputStateWrapper-DhEnE4BK.js.map} +1 -1
- package/dist/kolibri/InternalUnderlinedBadgeText-DoYMr6GR.js +4 -0
- package/dist/kolibri/{InternalUnderlinedBadgeText-CodJXcQG.js.map → InternalUnderlinedBadgeText-DoYMr6GR.js.map} +1 -1
- package/dist/kolibri/Span-B8GtyhT-.js +4 -0
- package/dist/kolibri/{Span-BUH9xZLf.js.map → Span-B8GtyhT-.js.map} +1 -1
- package/dist/kolibri/{app-globals-C4Hgadub.js → app-globals-BIPpDlEg.js} +1 -1
- package/dist/kolibri/{app-globals-C4Hgadub.js.map → app-globals-BIPpDlEg.js.map} +1 -1
- package/dist/kolibri/{controller-CzLzXDtQ.js → controller-Cxj0GMIA.js} +1 -1
- package/dist/kolibri/{controller-CzLzXDtQ.js.map → controller-Cxj0GMIA.js.map} +1 -1
- package/dist/kolibri/{controller-CBNM6BpO.js → controller-DdswdfgO.js} +1 -1
- package/dist/kolibri/{controller-CBNM6BpO.js.map → controller-DdswdfgO.js.map} +1 -1
- package/dist/kolibri/{controller-icon-DNLRSXZr.js → controller-icon-DIQMFP0b.js} +1 -1
- package/dist/kolibri/{controller-icon-DNLRSXZr.js.map → controller-icon-DIQMFP0b.js.map} +1 -1
- package/dist/kolibri/{controller-BPnEmeBr.js → controller-xTkXmOlE.js} +1 -1
- package/dist/kolibri/{controller-BPnEmeBr.js.map → controller-xTkXmOlE.js.map} +1 -1
- package/dist/kolibri/{dev.utils-BB49mRnl.js → dev.utils-Cn_6kyQ0.js} +1 -1
- package/dist/kolibri/{dev.utils-BB49mRnl.js.map → dev.utils-Cn_6kyQ0.js.map} +1 -1
- package/dist/kolibri/{devtools-6yxauOZx.js → devtools-COtKdu8_.js} +1 -1
- package/dist/kolibri/{devtools-6yxauOZx.js.map → devtools-COtKdu8_.js.map} +1 -1
- package/dist/kolibri/index-pomHlJYE.js +5 -0
- package/dist/kolibri/index-pomHlJYE.js.map +1 -0
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js.map +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.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.entry.js +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-drawer.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js +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.esm.js.map +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.js +1 -1
- package/dist/kolibri/kol-popover-wc.entry.esm.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.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js.map +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js.map +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.esm.js.map +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-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/kolibri.esm.js.map +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components/button/component.d.ts +1 -1
- package/dist/types/components/icon/bem.d.ts +5 -5
- package/dist/types/components/link/component.d.ts +2 -0
- package/dist/types/components/popover/component.d.ts +13 -6
- package/dist/types/components/table-stateless/component.d.ts +1 -0
- package/dist/types/components/table-stateless/table-settings.d.ts +1 -1
- package/dist/types/components/tooltip/component.d.ts +3 -0
- package/dist/types/components.d.ts +0 -4
- package/dist/types/functional-components/Alert/bem.d.ts +5 -5
- package/dist/types/schema/props/popover-callbacks.d.ts +2 -1
- package/dist/types/schema/types/table-settings.d.ts +2 -1
- package/dist/types/schema/types/table.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +19 -9
- package/package.json +3 -3
- package/dist/cjs/index-D8K3Ng5k.js +0 -4
- package/dist/cjs/index-D8K3Ng5k.js.map +0 -1
- package/dist/esm/Icon-B-YLFbev.js +0 -4
- package/dist/esm/Input-D-UExd4D.js +0 -4
- package/dist/esm/index-BG8JuXph.js +0 -4
- package/dist/esm/index-BG8JuXph.js.map +0 -1
- package/dist/kolibri/Alert-B3jx2jlL.js +0 -4
- package/dist/kolibri/FieldControlStateWrapper-oMcmUdOF.js +0 -4
- package/dist/kolibri/Icon-B-YLFbev.js +0 -4
- package/dist/kolibri/Input-D-UExd4D.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-CodJXcQG.js +0 -4
- package/dist/kolibri/Span-BUH9xZLf.js +0 -4
- package/dist/kolibri/index-BG8JuXph.js +0 -5
- package/dist/kolibri/index-BG8JuXph.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-D8K3Ng5k.js"),componentNames=require("./component-names-D7MwtuB7.js");require("./common-Cd2qH809.js");const defaultStyleCss="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\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 width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__table {\n width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n justify-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n justify-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStateless=class{constructor(n){index.registerInstance(this,n)}render(){return index.h(componentNames.KolTableStatelessWcTag,{key:"3f600244a23f03d0dfbddb1be4006cc50b1cf46f",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_hasSettingsMenu:this._hasSettingsMenu})}};KolTableStateless.style={default:defaultStyleCss},exports.kol_table_stateless=KolTableStateless;
|
|
4
|
+
"use strict";var index=require("./index-p66prV0P.js"),componentNames=require("./component-names-D7MwtuB7.js");require("./common-Cd2qH809.js");const defaultStyleCss="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\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 width: 100%;\n }\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n margin: 0;\n padding: 0;\n border: 0;\n }\n .kol-table-settings {\n background: #fff;\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n }\n .kol-table-settings .kol-popover-button__popover {\n background: #fff;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n border-radius: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n border: 1px solid #d1d5db;\n }\n .kol-table-settings__columns-container {\n max-height: calc(200 * 1rem / var(--kolibri-root-font-size, 16));\n margin-top: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n overflow: auto;\n }\n .kol-table-settings__columns {\n display: grid;\n gap: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-auto-rows: min-content;\n grid-template-columns: min-content minmax(max-content, 1fr) calc(100 * 1rem / var(--kolibri-root-font-size, 16)) auto auto;\n }\n .kol-table-settings__column {\n display: contents;\n }\n .kol-table {\n display: block;\n position: relative;\n max-width: 100%;\n }\n .kol-table:has(.kol-table__focus-element:focus) .kol-table__scroll-container {\n /* @see https://remysharp.com/til/css/focus-ring-default-styles */\n outline: 5px auto Highlight;\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n .kol-table__scroll-container {\n overflow-x: auto;\n overflow-y: hidden;\n }\n .kol-table__table {\n width: 100%;\n }\n .kol-table__caption {\n min-height: var(--a11y-min-size);\n padding-right: var(--a11y-min-size);\n text-align: start;\n }\n .kol-table__sort-button .kol-button {\n color: inherit;\n }\n .kol-table__body {\n text-align: left;\n }\n .kol-table__body .kol-button__text {\n justify-items: start;\n }\n .kol-table__cell--align-left {\n text-align: left;\n }\n .kol-table__cell--align-left .kol-button__text {\n align-items: start;\n }\n .kol-table__cell--align-center {\n text-align: center;\n }\n .kol-table__cell--align-center .kol-button__text {\n align-items: center;\n }\n .kol-table__cell--align-right {\n text-align: right;\n }\n .kol-table__cell--align-right .kol-button__text {\n align-items: end;\n }\n .kol-table__cell--selection {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n white-space: nowrap;\n }\n .kol-table__spacer {\n display: none;\n }\n .kol-table__selection-label {\n display: flex;\n position: relative;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n align-items: center;\n justify-content: center;\n cursor: pointer;\n }\n .kol-table__selection-label--disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-icon {\n display: block;\n position: absolute;\n inset: auto;\n z-index: 1;\n }\n .kol-table__selection-input {\n border-style: solid;\n margin: 0;\n appearance: none;\n cursor: pointer;\n }\n .kol-table__selection-input:disabled {\n cursor: not-allowed;\n }\n .kol-table__selection-input:before {\n content: \"\";\n }\n .kol-table__selection-input--checkbox {\n background-color: rgb(255, 255, 255);\n display: flex;\n position: relative;\n width: calc(var(--a11y-min-size) / 2);\n height: calc(var(--a11y-min-size) / 2);\n border-width: 2px;\n align-items: center;\n justify-content: center;\n line-height: 1.5;\n }\n .kol-table__selection-input--radio {\n border-radius: 100%;\n display: flex;\n width: 1.5em;\n min-width: 1.5em;\n height: 1.5em;\n min-height: 1.5em;\n padding: 0;\n border-width: 2px;\n }\n .kol-table__selection-input--radio:before {\n border-radius: 100%;\n width: 0.75em;\n height: 0.75em;\n margin: auto;\n }\n .kol-table__selection-input--radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-table__selection-input--radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n}",KolTableStateless=class{constructor(n){index.registerInstance(this,n)}render(){return index.h(componentNames.KolTableStatelessWcTag,{key:"3f600244a23f03d0dfbddb1be4006cc50b1cf46f",_data:this._data,_dataFoot:this._dataFoot,_headerCells:this._headerCells,_label:this._label,_minWidth:this._minWidth,_on:this._on,_selection:this._selection,_tableSettings:this._tableSettings,_hasSettingsMenu:this._hasSettingsMenu})}};KolTableStateless.style={default:defaultStyleCss},exports.kol_table_stateless=KolTableStateless;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kol-table-stateless.entry.cjs.js","sources":["src/components/table-stateless/style.scss?tag=kol-table-stateless&mode=default&encapsulation=shadow","src/components/table-stateless/shadow.tsx"],"sourcesContent":["@use '../../styles/global' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../@shared/kol-button-mixin' as *;\n@use '../@shared/kol-popover-button-mixin' as *;\n@use '../@shared/kol-table-stateless-mixin' as *;\n@use '../@shared/mixins' as *;\n@use '../host-display-block' as *;\n@use '../tooltip/style' as *;\n\n@layer kol-component {\n\t@include kol-alert;\n\t@include kol-button-styles('kol-button');\n\t@include kol-popover-button-styles;\n\t@include kol-table-stateless-styles;\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Prop } from '@stencil/core';\nimport { KolTableStatelessWcTag } from '../../core/component-names';\nimport type {\n\tHasSettingsMenuPropType,\n\tTableCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableSelectionPropType,\n\tTableStatelessProps,\n} from '../../schema';\nimport type { MinWidthPropType } from '../../schema/props/min-width';\nimport type { TableSettingsPropType } from '../../schema/props/table-settings';\n\n@Component({\n\ttag: 'kol-table-stateless',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateless implements TableStatelessProps {\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: TableDataPropType;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: TableDataFootPropType;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headerCells!: TableHeaderCellsPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width (CSS width values).\n\t */\n\t@Prop() public _minWidth!: MinWidthPropType;\n\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableCallbacksPropType;\n\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\n\t/**\n\t * Defines the table settings including column visibility, order and width.\n\t */\n\t@Prop() public _tableSettings?: TableSettingsPropType;\n\n\t/**\n\t * Enables the settings menu if true (default: false).\n\t */\n\t@Prop() public _hasSettingsMenu?: HasSettingsMenuPropType;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolTableStatelessWcTag\n\t\t\t\t_data={this._data}\n\t\t\t\t_dataFoot={this._dataFoot}\n\t\t\t\t_headerCells={this._headerCells}\n\t\t\t\t_label={this._label}\n\t\t\t\t_minWidth={this._minWidth}\n\t\t\t\t_on={this._on}\n\t\t\t\t_selection={this._selection}\n\t\t\t\t_tableSettings={this._tableSettings}\n\t\t\t\t_hasSettingsMenu={this._hasSettingsMenu}\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"names":["h","KolTableStatelessWcTag"],"mappings":";;;;;;;;;AAAA,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"kol-table-stateless.entry.cjs.js","sources":["src/components/table-stateless/style.scss?tag=kol-table-stateless&mode=default&encapsulation=shadow","src/components/table-stateless/shadow.tsx"],"sourcesContent":["@use '../../styles/global' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../@shared/kol-button-mixin' as *;\n@use '../@shared/kol-popover-button-mixin' as *;\n@use '../@shared/kol-table-stateless-mixin' as *;\n@use '../@shared/mixins' as *;\n@use '../host-display-block' as *;\n@use '../tooltip/style' as *;\n\n@layer kol-component {\n\t@include kol-alert;\n\t@include kol-button-styles('kol-button');\n\t@include kol-popover-button-styles;\n\t@include kol-table-stateless-styles;\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Prop } from '@stencil/core';\nimport { KolTableStatelessWcTag } from '../../core/component-names';\nimport type {\n\tHasSettingsMenuPropType,\n\tTableCallbacksPropType,\n\tTableDataFootPropType,\n\tTableDataPropType,\n\tTableHeaderCellsPropType,\n\tTableSelectionPropType,\n\tTableStatelessProps,\n} from '../../schema';\nimport type { MinWidthPropType } from '../../schema/props/min-width';\nimport type { TableSettingsPropType } from '../../schema/props/table-settings';\n\n@Component({\n\ttag: 'kol-table-stateless',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTableStateless implements TableStatelessProps {\n\t/**\n\t * Defines the primary table data.\n\t */\n\t@Prop() public _data!: TableDataPropType;\n\n\t/**\n\t * Defines the data for the table footer.\n\t */\n\t@Prop() public _dataFoot?: TableDataFootPropType;\n\n\t/**\n\t * Defines the horizontal and vertical table headers.\n\t */\n\t@Prop() public _headerCells!: TableHeaderCellsPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the table min-width (CSS width values).\n\t */\n\t@Prop() public _minWidth!: MinWidthPropType;\n\n\t/**\n\t * Defines the callback functions for table events.\n\t */\n\t@Prop() public _on?: TableCallbacksPropType;\n\n\t/**\n\t * Defines how rows can be selected and the current selection.\n\t */\n\t@Prop() public _selection?: TableSelectionPropType;\n\n\t/**\n\t * Defines the table settings including column visibility, order and width.\n\t */\n\t@Prop() public _tableSettings?: TableSettingsPropType;\n\n\t/**\n\t * Enables the settings menu if true (default: false).\n\t */\n\t@Prop() public _hasSettingsMenu?: HasSettingsMenuPropType;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolTableStatelessWcTag\n\t\t\t\t_data={this._data}\n\t\t\t\t_dataFoot={this._dataFoot}\n\t\t\t\t_headerCells={this._headerCells}\n\t\t\t\t_label={this._label}\n\t\t\t\t_minWidth={this._minWidth}\n\t\t\t\t_on={this._on}\n\t\t\t\t_selection={this._selection}\n\t\t\t\t_tableSettings={this._tableSettings}\n\t\t\t\t_hasSettingsMenu={this._hasSettingsMenu}\n\t\t\t/>\n\t\t);\n\t}\n}\n"],"names":["h","KolTableStatelessWcTag"],"mappings":";;;;;;;;;AAAA,MAAM,eAAe,GAAG,2vXAA2vX;;MCsBtwX,iBAAiB,GAAA,MAAA;;;;IA8CtB,MAAM,GAAA;AACZ,QAAA,QACCA,OAAC,CAAAC,qCAAsB,EACtB,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,cAAc,EAAE,IAAI,CAAC,cAAc,EACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACtC,CAAA;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-D8K3Ng5k.js"),common=require("./common-Cd2qH809.js"),align=require("./align-CGG5V8xM.js"),label=require("./label-Nicf9N_T.js"),clsx=require("./clsx-CkZlkaek.js"),componentNames=require("./component-names-D7MwtuB7.js"),i18n=require("./i18n-NiDr3RbD.js"),keyboard=require("./keyboard-C096g_BV.js"),events=require("./events-cX8h6I3p.js");require("./i18n-Drgbs46L.js");const tabBehaviorPropTypeOptions=["select-automatic","select-manual"],validateTabBehavior=(e,t)=>{common.watchValidator(e,"_behavior",e=>"string"==typeof e&&tabBehaviorPropTypeOptions.includes(e),new Set([`KoliBriTabBehavior {${tabBehaviorPropTypeOptions.join(", ")}`]),t)},validateHasCreateButton=(e,t)=>{common.watchBoolean(e,"_hasCreateButton",t)},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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",KolTabs=class{constructor(e){index.registerInstance(this,e),this.onCreateLabel=`${i18n.translate("kol-new")} …`,this.nextPossibleTabIndex=(e,t,n=1)=>{const o=t+n;return o<e.length?e[o]._disabled?this.nextPossibleTabIndex(e,t,n+1):o:t},this.prevPossibleTabIndex=(e,t,n=1)=>{const o=t-n;return o>=0?e[o]._disabled?this.prevPossibleTabIndex(e,t,n+1):o:t},this.onKeyDown=e=>{switch(e.key){case keyboard.KeyboardKey.ArrowRight:this.goToNextTab(e);break;case keyboard.KeyboardKey.ArrowLeft:this.goToPreviousTab(e);break;case keyboard.KeyboardKey.Space:case keyboard.KeyboardKey.Enter:this.activateFocusedTab(e)}},this.onClickSelect=(e,t)=>{this.selectNextTabEvent(e,t)},this.onMouseDown=e=>{e.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=e=>{this.tabPanelHost=e},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(e,t,n=!0,o)=>{if(e>t.length-1&&(e=t.length-1),e<0&&(e=0),Array.isArray(t)&&t[e]&&t[e]._disabled){if(!0===n){if(e<t.length-1)return this.selectNextNotDisabledTab(e+1,t,!0,o||e);e=o||e,n=!1}if(!1===n){if(e>0)return this.selectNextNotDisabledTab(e-1,t,!1,o||e);common.devHint("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return e},this.syncSelectedAndTabs=(e,t,n,o)=>{let i,a;i="_selected"===o?e:this.state._selected,a="_tabs"===o?e:this.state._tabs,a.length>0&&t.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var e,t,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(e=this.state._tabs)||void 0===e?void 0:e.length);i++){const e=document.createElement("div");e.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),e.setAttribute("id",`tabpanel-${i}`),e.setAttribute("role","tabpanel"),e.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),e.appendChild(a),null===(t=this.tabPanelHost)||void 0===t||t.appendChild(e),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((e,t)=>{t===this.state._selected?e.removeAttribute("hidden"):e.setAttribute("hidden","")})},this.onCreate=e=>{var t,n;e.preventDefault(),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onCreate)||void 0===n||n.call(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(e){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}goToPreviousTab(e){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}activateFocusedTab(e){"number"==typeof this.currentFocusIndex&&this.onSelect(e,this.currentFocusIndex)}selectNextTabEvent(e,t,n="activateCompletely"){var o,i;if(this.currentFocusIndex=t,this.focusTabById(t),"activateCompletely"===n){this._selected=t;null===(i=null===(o=this.state._tabs[t]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,e,t),this.onSelect(e,t)}}renderButtonGroup(){return index.h("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((e,t)=>index.h(componentNames.KolButtonWcTag,{_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===t?0:-1,_tooltipAlign:e._tooltipAlign,_buttonVariant:this.state._selected===t?"custom":void 0,_customClass:this.state._selected===t?"selected":void 0,_ariaControls:`tabpanel-${t}`,_ariaSelected:this.state._selected===t,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${t}`,_role:"tab",_value:t})),this.state._hasCreateButton&&index.h(componentNames.KolButtonWcTag,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return index.h("div",{key:"651b397e4e56da8694268e5670dd12da67fb4430",ref:e=>{this.tabPanelsElement=e},class:clsx.clsx("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),index.h("div",{key:"2583e66740101758cdf796a45961142384bf9fdf",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(e){align.validateAlign(this,e)}validateBehavior(e){validateTabBehavior(this,e)}validateHasCreateButton(e){validateHasCreateButton(this,e)}validateLabel(e){label.validateLabel(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){const t={};"function"==typeof e.onCreate&&(t.onCreate=e.onCreate),"function"==typeof e.onSelect&&(t.onSelect=e.onSelect),common.setState(this,"_on",t)}}validateSelected(e){common.watchNumber(this,"_selected",e,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(e){common.watchJsonArrayString(this,"_tabs",e=>"object"==typeof e&&null!==e&&"string"==typeof e._label&&e._label.length>0,e,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),common.uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(e){if(this.tabPanelsElement){const t=common.koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}onSelect(e,t){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,e,t),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.select,t),this.focusTabById(t)}get host(){return index.getElement(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};KolTabs.style={default:defaultStyleCss},exports.kol_tabs=KolTabs;
|
|
4
|
+
"use strict";var index=require("./index-p66prV0P.js"),common=require("./common-Cd2qH809.js"),align=require("./align-CGG5V8xM.js"),label=require("./label-Nicf9N_T.js"),clsx=require("./clsx-CkZlkaek.js"),componentNames=require("./component-names-D7MwtuB7.js"),i18n=require("./i18n-NiDr3RbD.js"),keyboard=require("./keyboard-C096g_BV.js"),events=require("./events-cX8h6I3p.js");require("./i18n-Drgbs46L.js");const tabBehaviorPropTypeOptions=["select-automatic","select-manual"],validateTabBehavior=(e,t)=>{common.watchValidator(e,"_behavior",e=>"string"==typeof e&&tabBehaviorPropTypeOptions.includes(e),new Set([`KoliBriTabBehavior {${tabBehaviorPropTypeOptions.join(", ")}`]),t)},validateHasCreateButton=(e,t)=>{common.watchBoolean(e,"_hasCreateButton",t)},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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-tabs {\n display: var(--display);\n grid-template-columns: var(--grid-template-columns);\n grid-template-rows: var(--grid-template-rows);\n }\n .kol-tabs--align-right {\n --display: grid;\n --grid-template-columns: 1fr auto;\n --button-group-flex-direction: column;\n --button-group-order: 2;\n }\n .kol-tabs--align-left {\n --display: grid;\n --grid-template-columns: auto 1fr;\n --button-group-flex-direction: column;\n --button-group-order: 0;\n }\n .kol-tabs--align-bottom {\n --display: grid;\n --grid-template-rows: 1fr auto;\n --button-group-order: 2;\n }\n .kol-tabs__tabs-align-top {\n --display: grid;\n --grid-template-rows: auto 1fr;\n --button-group-order: 0;\n }\n .kol-tabs__button-group {\n display: flex;\n order: var(--button-group-order);\n flex-direction: var(--button-group-flex-direction);\n flex-wrap: wrap;\n }\n .kol-tabs__button-group .kol-button {\n border-bottom-color: transparent;\n display: block;\n border-bottom-style: solid;\n }\n .kol-tabs__panel {\n height: 100%;\n }\n}",KolTabs=class{constructor(e){index.registerInstance(this,e),this.onCreateLabel=`${i18n.translate("kol-new")} …`,this.nextPossibleTabIndex=(e,t,n=1)=>{const o=t+n;return o<e.length?e[o]._disabled?this.nextPossibleTabIndex(e,t,n+1):o:t},this.prevPossibleTabIndex=(e,t,n=1)=>{const o=t-n;return o>=0?e[o]._disabled?this.prevPossibleTabIndex(e,t,n+1):o:t},this.onKeyDown=e=>{switch(e.key){case keyboard.KeyboardKey.ArrowRight:this.goToNextTab(e);break;case keyboard.KeyboardKey.ArrowLeft:this.goToPreviousTab(e);break;case keyboard.KeyboardKey.Space:case keyboard.KeyboardKey.Enter:this.activateFocusedTab(e)}},this.onClickSelect=(e,t)=>{this.selectNextTabEvent(e,t)},this.onMouseDown=e=>{e.preventDefault()},this.callbacks={onClick:this.onClickSelect,onMouseDown:this.onMouseDown},this.catchTabPanelHost=e=>{this.tabPanelHost=e},this._align="top",this._hasCreateButton=!1,this._selected=0,this.state={_align:"top",_label:"",_selected:0,_tabs:[]},this.selectNextNotDisabledTab=(e,t,n=!0,o)=>{if(e>t.length-1&&(e=t.length-1),e<0&&(e=0),Array.isArray(t)&&t[e]&&t[e]._disabled){if(!0===n){if(e<t.length-1)return this.selectNextNotDisabledTab(e+1,t,!0,o||e);e=o||e,n=!1}if(!1===n){if(e>0)return this.selectNextNotDisabledTab(e-1,t,!1,o||e);common.devHint("[KolTabs] All tabs are disabled, and therefore no tab can be displayed.")}}return e},this.syncSelectedAndTabs=(e,t,n,o)=>{let i,a;i="_selected"===o?e:this.state._selected,a="_tabs"===o?e:this.state._tabs,a.length>0&&t.set("_selected",this.selectNextNotDisabledTab(i,a))},this.refreshTabPanels=()=>{var e,t,n,o;if(this.tabPanelHost){for(;this.tabPanelHost.firstChild;)this.tabPanelHost.removeChild(this.tabPanelHost.firstChild);for(let i=0;i<(null===(e=this.state._tabs)||void 0===e?void 0:e.length);i++){const e=document.createElement("div");e.setAttribute("aria-labelledby",`${this.state._label.replace(/\s/g,"-")}-tab-${i}`),e.setAttribute("id",`tabpanel-${i}`),e.setAttribute("role","tabpanel"),e.setAttribute("hidden","");const a=document.createElement("slot");a.setAttribute("name",`tabpanel-slot-${i}`),e.appendChild(a),null===(t=this.tabPanelHost)||void 0===t||t.appendChild(e),"undefined"!=typeof HTMLCollection&&(null===(n=this.host)||void 0===n?void 0:n.children)instanceof HTMLCollection&&(null===(o=this.host)||void 0===o?void 0:o.children[i])&&this.host.children[i].setAttribute("slot",`tabpanel-slot-${i}`)}this.updateVisiblePanel()}},this.updateVisiblePanel=()=>{this.tabPanelHost&&Array.from(this.tabPanelHost.children).forEach((e,t)=>{t===this.state._selected?e.removeAttribute("hidden"):e.setAttribute("hidden","")})},this.onCreate=e=>{var t,n;e.preventDefault(),null===(n=null===(t=this.state._on)||void 0===t?void 0:t.onCreate)||void 0===n||n.call(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.create)},this.onBlur=()=>{this.currentFocusIndex=void 0}}getCurrentFocusIndex(){return"number"==typeof this.currentFocusIndex?this.currentFocusIndex:this.state._selected}getKeyboardTabChangeMode(){return"select-manual"===this._behavior?"selectFocusOnly":"activateCompletely"}goToNextTab(e){const t=this.nextPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}goToPreviousTab(e){const t=this.prevPossibleTabIndex(this.state._tabs,this.getCurrentFocusIndex());this.selectNextTabEvent(e,t,this.getKeyboardTabChangeMode())}activateFocusedTab(e){"number"==typeof this.currentFocusIndex&&this.onSelect(e,this.currentFocusIndex)}selectNextTabEvent(e,t,n="activateCompletely"){var o,i;if(this.currentFocusIndex=t,this.focusTabById(t),"activateCompletely"===n){this._selected=t;null===(i=null===(o=this.state._tabs[t]._on)||void 0===o?void 0:o.onSelect)||void 0===i||i.call(o,e,t),this.onSelect(e,t)}}renderButtonGroup(){return index.h("div",{"aria-label":this.state._label,class:"kol-tabs__button-group",role:"tablist",onKeyDown:this.onKeyDown,onBlur:this.onBlur},this.state._tabs.map((e,t)=>index.h(componentNames.KolButtonWcTag,{_disabled:e._disabled,_icons:e._icons,_hideLabel:e._hideLabel,_label:e._label,_on:this.callbacks,_tabIndex:this.state._selected===t?0:-1,_tooltipAlign:e._tooltipAlign,_buttonVariant:this.state._selected===t?"custom":void 0,_customClass:this.state._selected===t?"selected":void 0,_ariaControls:`tabpanel-${t}`,_ariaSelected:this.state._selected===t,_id:`${this.state._label.replace(/\s/g,"-")}-tab-${t}`,_role:"tab",_value:t})),this.state._hasCreateButton&&index.h(componentNames.KolButtonWcTag,{class:"kol-tabs__button-create",_label:this.onCreateLabel,_on:{onClick:this.onCreate},_icons:"codicon codicon-plus","data-testid":"tabs-create-button"}))}render(){return index.h("div",{key:"651b397e4e56da8694268e5670dd12da67fb4430",ref:e=>{this.tabPanelsElement=e},class:clsx.clsx("kol-tabs",`kol-tabs--align-${this.state._align}`)},this.renderButtonGroup(),index.h("div",{key:"2583e66740101758cdf796a45961142384bf9fdf",class:"kol-tabs__content",ref:this.catchTabPanelHost}))}validateAlign(e){align.validateAlign(this,e)}validateBehavior(e){validateTabBehavior(this,e)}validateHasCreateButton(e){validateHasCreateButton(this,e)}validateLabel(e){label.validateLabel(this,e,{required:!0})}validateOn(e){if("object"==typeof e&&null!==e){const t={};"function"==typeof e.onCreate&&(t.onCreate=e.onCreate),"function"==typeof e.onSelect&&(t.onSelect=e.onSelect),common.setState(this,"_on",t)}}validateSelected(e){common.watchNumber(this,"_selected",e,{hooks:{beforePatch:this.syncSelectedAndTabs}})}validateTabs(e){common.watchJsonArrayString(this,"_tabs",e=>"object"==typeof e&&null!==e&&"string"==typeof e._label&&e._label.length>0,e,void 0,{hooks:{beforePatch:this.syncSelectedAndTabs,afterPatch:this.refreshTabPanels}}),common.uiUxHintMillerscheZahl("KolTabs",this.state._tabs.length)}componentWillLoad(){this.validateAlign(this._align),this.validateLabel(this._label),this.validateOn(this._on),this.validateSelected(this._selected),this.validateTabs(this._tabs),this.validateBehavior(this._behavior),this.validateHasCreateButton(this._hasCreateButton)}componentDidRender(){this.refreshTabPanels()}focusTabById(e){if(this.tabPanelsElement){const t=common.koliBriQuerySelector(`button#${this.state._label.replace(/\s/g,"-")}-tab-${e}`,this.tabPanelsElement);null==t||t.focus()}}onSelect(e,t){var n,o;null===(o=null===(n=this._on)||void 0===n?void 0:n.onSelect)||void 0===o||o.call(n,e,t),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.select,t),this.focusTabById(t)}get host(){return index.getElement(this)}static get watchers(){return{_align:["validateAlign"],_behavior:["validateBehavior"],_hasCreateButton:["validateHasCreateButton"],_label:["validateLabel"],_on:["validateOn"],_selected:["validateSelected"],_tabs:["validateTabs"]}}};KolTabs.style={default:defaultStyleCss},exports.kol_tabs=KolTabs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-D8K3Ng5k.js"),clsx=require("./clsx-CkZlkaek.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Dc4wsP5R.js"),controllerIcon=require("./controller-icon-JVj5EC2t.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),common=require("./common-Cd2qH809.js"),dev_utils=require("./dev.utils-Cz8uPtt2.js"),maxLengthBehavior=require("./max-length-behavior-Bvbwhaxv.js"),placeholder=require("./placeholder-BncK-3gZ.js"),readOnly=require("./read-only-dIvCm73W.js"),required=require("./required-CXU7vdyH.js"),rows=require("./rows-BUvz5j5U.js"),spellCheck=require("./spell-check-Bkq4G9L7.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-cX8h6I3p.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./reuse-Cs36Ddzu.js"),require("./i18n-NiDr3RbD.js"),require("./InternalUnderlinedBadgeText-BCjxHsIf.js"),require("./Alert-DV-4s1Xb.js"),require("./bem-Bu0VYjZa.js"),require("./browser-D7A31aEp.js"),require("./Heading-DxQNJzeS.js"),require("./Icon-rMLb2zeC.js"),require("./icons-CvKgcv20.js");const textareaResizeOptions=["vertical","none"],isTextareaResizePropType=e=>"string"==typeof e&&textareaResizeOptions.includes(e),validateResizeTextarea=(e,t)=>{common.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,h=tslib_es6.__rest(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),c=FormFieldStateWrapper.checkHasMsg(n,a),u="string"==typeof n?"error":null==n?void 0:n._type,p={"kol-textarea--disabled":Boolean(o),"kol-textarea--required":Boolean(l),"kol-textarea--touched":Boolean(a),"kol-textarea--readonly":Boolean(i),[`kol-textarea--${u||"error"}`]:c},m=Object.assign(Object.assign({class:clsx.clsx("kol-textarea",p,t),required:l,disabled:o,readonly:i},FormFieldStateWrapper.getDefaultProps({ariaDescribedBy:r,hideLabel:s,label:d})),h);return index.h("textarea",Object.assign({},m))};function getTextAreaProps(e,t){var n;const a=[...FormFieldStateWrapper.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=tslib_es6.__rest(e,["state"]);return index.h(TextAreaFc,Object.assign({},getTextAreaProps(t,n)))};class TextareaController extends controllerIcon.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){maxLengthBehavior.validateHasCounter(this.component,e)}validateMaxLengthBehavior(e){maxLengthBehavior.validateMaxLengthBehavior(this.component,e)}validateMaxLength(e){maxLengthBehavior.validateMaxLength(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){placeholder.validatePlaceholder(this.component,e)}validateReadOnly(e){readOnly.validateReadOnly(this.component,e)}validateResize(e){validateResizeTextarea(this.component,e)}validateRequired(e){required.validateRequired(this.component,e)}validateRows(e){rows.validateRows(this.component,e)}validateSpellCheck(e){spellCheck.validateSpellCheck(this.component,e)}validateValue(e){common.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="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}",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=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"c076b1045358547d15574bfb7d4fbd82ec63984d"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"320aa1104bb568da2c2f09660792f4be5de05a33",state:this.state},index.h(TextAreaStateWrapper,Object.assign({key:"e5ab010f74cc7d2ed882121bc4373ee15dd70593"},this.getTextAreaProps()))))}constructor(e){index.registerInstance(this,e),this.catchRef=e=>{this.textareaRef=e},this._adjustHeight=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._hasCounter=!1,this._maxLengthBehavior="hard",this._readOnly=!1,this._resize="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_adjustHeight:!1,_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${dev_utils.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)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout(()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>increaseTextareaHeight(this.textareaRef)?this.state._rows:increaseTextareaHeight(this.textareaRef):this._rows||(this._rows=1)},0)}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 index.getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_maxLengthBehavior:["validateMaxLengthBehavior"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};KolTextarea.style={default:defaultStyleCss},exports.kol_textarea=KolTextarea;
|
|
4
|
+
"use strict";var index=require("./index-p66prV0P.js"),clsx=require("./clsx-CkZlkaek.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-ms9MM_hC.js"),controllerIcon=require("./controller-icon-CtMwV7B8.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),common=require("./common-Cd2qH809.js"),dev_utils=require("./dev.utils-CaZivRsv.js"),maxLengthBehavior=require("./max-length-behavior-Bvbwhaxv.js"),placeholder=require("./placeholder-BncK-3gZ.js"),readOnly=require("./read-only-dIvCm73W.js"),required=require("./required-CXU7vdyH.js"),rows=require("./rows-BUvz5j5U.js"),spellCheck=require("./spell-check-Bkq4G9L7.js");require("./access-and-short-key-BExF929g.js"),require("./disabled-DT-7CUov.js"),require("./hide-label-DdGk9NfD.js"),require("./label-Nicf9N_T.js"),require("./tooltip-align-WJPFINTL.js"),require("./align-CGG5V8xM.js"),require("./events-cX8h6I3p.js"),require("./associated.controller-Dpp0zVIP.js"),require("./bootstrap-B3uKTmEF.js"),require("./component-names-D7MwtuB7.js"),require("./i18n-Drgbs46L.js"),require("./isObject-DMA85Fq4.js"),require("./reuse-Cs36Ddzu.js"),require("./i18n-NiDr3RbD.js"),require("./InternalUnderlinedBadgeText-D_EDrZAP.js"),require("./Alert-Bd6RKJBA.js"),require("./bem-Bu0VYjZa.js"),require("./browser-D7A31aEp.js"),require("./Heading-BbFdSzWc.js"),require("./Icon-D4z1Ua5c.js"),require("./icons-CvKgcv20.js");const textareaResizeOptions=["vertical","none"],isTextareaResizePropType=e=>"string"==typeof e&&textareaResizeOptions.includes(e),validateResizeTextarea=(e,t)=>{common.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,h=tslib_es6.__rest(e,["class","msg","touched","readonly","disabled","required","ariaDescribedBy","hideLabel","label"]),c=FormFieldStateWrapper.checkHasMsg(n,a),u="string"==typeof n?"error":null==n?void 0:n._type,p={"kol-textarea--disabled":Boolean(o),"kol-textarea--required":Boolean(l),"kol-textarea--touched":Boolean(a),"kol-textarea--readonly":Boolean(i),[`kol-textarea--${u||"error"}`]:c},m=Object.assign(Object.assign({class:clsx.clsx("kol-textarea",p,t),required:l,disabled:o,readonly:i},FormFieldStateWrapper.getDefaultProps({ariaDescribedBy:r,hideLabel:s,label:d})),h);return index.h("textarea",Object.assign({},m))};function getTextAreaProps(e,t){var n;const a=[...FormFieldStateWrapper.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=tslib_es6.__rest(e,["state"]);return index.h(TextAreaFc,Object.assign({},getTextAreaProps(t,n)))};class TextareaController extends controllerIcon.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){maxLengthBehavior.validateHasCounter(this.component,e)}validateMaxLengthBehavior(e){maxLengthBehavior.validateMaxLengthBehavior(this.component,e)}validateMaxLength(e){maxLengthBehavior.validateMaxLength(this.component,e,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePlaceholder(e){placeholder.validatePlaceholder(this.component,e)}validateReadOnly(e){readOnly.validateReadOnly(this.component,e)}validateResize(e){validateResizeTextarea(this.component,e)}validateRequired(e){required.validateRequired(this.component,e)}validateRows(e){rows.validateRows(this.component,e)}validateSpellCheck(e){spellCheck.validateSpellCheck(this.component,e)}validateValue(e){common.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="/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field {\n display: grid;\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n .kol-input-container {\n background-color: transparent;\n display: grid;\n width: 100%;\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n align-items: center;\n grid-template-columns: 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-textarea {\n width: 100%;\n }\n .kol-textarea:focus {\n outline: none;\n }\n}",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=class{async getValue(){var e;return null===(e=this.textareaRef)||void 0===e?void 0:e.value}async kolFocus(){var e;null===(e=this.textareaRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:clsx.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 index.h(FormFieldStateWrapper.FormFieldStateWrapper,Object.assign({key:"c076b1045358547d15574bfb7d4fbd82ec63984d"},this.getFormFieldProps()),index.h(controllerIcon.InputContainerStateWrapperFc,{key:"320aa1104bb568da2c2f09660792f4be5de05a33",state:this.state},index.h(TextAreaStateWrapper,Object.assign({key:"e5ab010f74cc7d2ed882121bc4373ee15dd70593"},this.getTextAreaProps()))))}constructor(e){index.registerInstance(this,e),this.catchRef=e=>{this.textareaRef=e},this._adjustHeight=!1,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._hasCounter=!1,this._maxLengthBehavior="hard",this._readOnly=!1,this._resize="vertical",this._required=!1,this._tooltipAlign="top",this._touched=!1,this.state={_adjustHeight:!1,_currentLength:0,_currentLengthDebounced:0,_hasValue:!1,_hideMsg:!1,_id:`id-${dev_utils.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)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMaxLength(e){this.controller.validateMaxLength(e)}validateMaxLengthBehavior(e){this.controller.validateMaxLengthBehavior(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateReadOnly(e){this.controller.validateReadOnly(e)}validateResize(e){this.controller.validateResize(e)}validateRequired(e){this.controller.validateRequired(e)}validateRows(e){this.controller.validateRows(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSpellCheck(e){this.controller.validateSpellCheck(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentDidLoad(){setTimeout(()=>{var e;!0===this._adjustHeight&&this.textareaRef?this._rows=(null===(e=this.state)||void 0===e?void 0:e._rows)&&this.state._rows>increaseTextareaHeight(this.textareaRef)?this.state._rows:increaseTextareaHeight(this.textareaRef):this._rows||(this._rows=1)},0)}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 index.getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_adjustHeight:["validateAdjustHeight"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hasCounter:["validateHasCounter"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_maxLengthBehavior:["validateMaxLengthBehavior"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_resize:["validateResize"],_required:["validateRequired"],_rows:["validateRows"],_shortKey:["validateShortKey"],_spellCheck:["validateSpellCheck"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}};KolTextarea.style={default:defaultStyleCss},exports.kol_textarea=KolTextarea;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-D8K3Ng5k.js"),i18n=require("./i18n-NiDr3RbD.js"),dev_utils=require("./dev.utils-Cz8uPtt2.js"),componentNames=require("./component-names-D7MwtuB7.js"),Alert=require("./Alert-DV-4s1Xb.js");require("./common-Cd2qH809.js"),require("./markdown-1dxeA2q6.js");var tslib_es6=require("./tslib.es6-7DbU_BSw.js"),clsx=require("./clsx-CkZlkaek.js");require("./i18n-Drgbs46L.js"),require("./bem-Bu0VYjZa.js"),require("./browser-D7A31aEp.js"),require("./Heading-DxQNJzeS.js");const ToastItemFc=t=>{var{status:n,toast:e,onClose:o}=t,i=tslib_es6.__rest(t,["status","toast","onClose"]);const{type:s,label:a,description:l,variant:r}=e;return index.h("div",{class:clsx.clsx("kol-toast-item",`kol-toast-item--${n}`)},index.h(Alert.KolAlertFc,{class:"kol-toast-item__alert",alert:!0,label:a,level:0,hasCloser:!0,type:s,variant:r||"card",onCloserClick:o},index.h("div",Object.assign({},i),l)))},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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",TRANSITION_TIMEOUT=300,KolToastContainer=class{constructor(t){index.registerInstance(this,t),this.state={_toastStates:[]},this.translateToastCloseAll=i18n.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-${dev_utils.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 index.h(index.Host,{key:"59038f1cc016df1fb76b2436b4ad4598700e66a9",class:"kol-toast-container"},this.state._toastStates.length>1&&index.h(componentNames.KolButtonTag,{key:"d2aea02a378c5631da3d47e8ab947e81eaa4174b",_label:this.translateToastCloseAll,class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map(t=>index.h(ToastItemFc,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status})))}};KolToastContainer.style={default:defaultStyleCss},exports.kol_toast_container=KolToastContainer;
|
|
4
|
+
"use strict";var index=require("./index-p66prV0P.js"),i18n=require("./i18n-NiDr3RbD.js"),dev_utils=require("./dev.utils-CaZivRsv.js"),componentNames=require("./component-names-D7MwtuB7.js"),Alert=require("./Alert-Bd6RKJBA.js");require("./common-Cd2qH809.js"),require("./markdown-1dxeA2q6.js");var tslib_es6=require("./tslib.es6-7DbU_BSw.js"),clsx=require("./clsx-CkZlkaek.js");require("./i18n-Drgbs46L.js"),require("./bem-Bu0VYjZa.js"),require("./browser-D7A31aEp.js"),require("./Heading-BbFdSzWc.js");const ToastItemFc=t=>{var{status:n,toast:e,onClose:o}=t,i=tslib_es6.__rest(t,["status","toast","onClose"]);const{type:s,label:a,description:l,variant:r}=e;return index.h("div",{class:clsx.clsx("kol-toast-item",`kol-toast-item--${n}`)},index.h(Alert.KolAlertFc,{class:"kol-toast-item__alert",alert:!0,label:a,level:0,hasCloser:!0,type:s,variant:r||"card",onCloserClick:o},index.h("div",Object.assign({},i),l)))},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}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}",TRANSITION_TIMEOUT=300,KolToastContainer=class{constructor(t){index.registerInstance(this,t),this.state={_toastStates:[]},this.translateToastCloseAll=i18n.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-${dev_utils.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 index.h(index.Host,{key:"59038f1cc016df1fb76b2436b4ad4598700e66a9",class:"kol-toast-container"},this.state._toastStates.length>1&&index.h(componentNames.KolButtonTag,{key:"d2aea02a378c5631da3d47e8ab947e81eaa4174b",_label:this.translateToastCloseAll,class:"kol-toast-container__button-close-all",_on:{onClick:()=>{this.closeAll()}}}),this.state._toastStates.map(t=>index.h(ToastItemFc,{key:t.id,onClose:()=>this.handleClose(t),ref:n=>this.handleToastRef(t,n),toast:t.toast,status:t.status})))}};KolToastContainer.style={default:defaultStyleCss},exports.kol_toast_container=KolToastContainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-D8K3Ng5k.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),componentNames=require("./component-names-D7MwtuB7.js"),common=require("./common-Cd2qH809.js"),label=require("./label-Nicf9N_T.js"),keyboard=require("./keyboard-C096g_BV.js"),orientation=require("./orientation-BGODo_Ua.js");const validateToolbarItems=(n,e)=>{common.emptyStringByArrayHandler(e,()=>{common.objectObjectHandler(e,()=>{void 0===e&&(e=[]);try{e=common.parseJson(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&common.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}\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: inline-flex;\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 width: 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=class{constructor(n){index.registerInstance(this,n),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"_href"in t?index.h(componentNames.KolLinkWcTag,Object.assign({},t,i,{ref:a})):index.h(componentNames.KolButtonWcTag,Object.assign({},t,i,{ref:a}))}}normalizeItem(n){const{_icons:e,_disabled:t}=n,o=tslib_es6.__rest(n,["_icons","_disabled"]);return Object.assign(Object.assign({},o),{_icons:e,_disabled:t})}render(){return index.h("div",{key:"21d9f22b65a5da8bf4467287754233720e9de61d",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){label.validateLabel(this,n)}validateItems(n){validateToolbarItems(this,n),this.indexToElement.clear(),this.setFirstEnabledItemIndex()}validateOrientation(n){orientation.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(![keyboard.KeyboardKey.ArrowUp,keyboard.KeyboardKey.ArrowDown,keyboard.KeyboardKey.ArrowRight,keyboard.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 keyboard.KeyboardKey.ArrowUp:case keyboard.KeyboardKey.ArrowLeft:d=s>0?s-1:r;break;case keyboard.KeyboardKey.ArrowDown:case keyboard.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.kolFocus()))}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 index.getElement(this)}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}};KolToolbar.style={default:defaultStyleCss},exports.kol_toolbar=KolToolbar;
|
|
4
|
+
"use strict";var index=require("./index-p66prV0P.js"),tslib_es6=require("./tslib.es6-7DbU_BSw.js"),componentNames=require("./component-names-D7MwtuB7.js"),common=require("./common-Cd2qH809.js"),label=require("./label-Nicf9N_T.js"),keyboard=require("./keyboard-C096g_BV.js"),orientation=require("./orientation-BGODo_Ua.js");const validateToolbarItems=(n,e)=>{common.emptyStringByArrayHandler(e,()=>{common.objectObjectHandler(e,()=>{void 0===e&&(e=[]);try{e=common.parseJson(e)}catch(n){}Array.isArray(e)&&e.every(n=>"object"==typeof n&&null!==n)&&common.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}\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: inline-flex;\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 width: 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=class{constructor(n){index.registerInstance(this,n),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"_href"in t?index.h(componentNames.KolLinkWcTag,Object.assign({},t,i,{ref:a})):index.h(componentNames.KolButtonWcTag,Object.assign({},t,i,{ref:a}))}}normalizeItem(n){const{_icons:e,_disabled:t}=n,o=tslib_es6.__rest(n,["_icons","_disabled"]);return Object.assign(Object.assign({},o),{_icons:e,_disabled:t})}render(){return index.h("div",{key:"21d9f22b65a5da8bf4467287754233720e9de61d",class:`kol-toolbar kol-toolbar--orientation-${this.state._orientation}`,role:"toolbar","aria-label":this.state._label},this.state._items.map(this.renderItem))}validateLabel(n){label.validateLabel(this,n)}validateItems(n){validateToolbarItems(this,n),this.indexToElement.clear(),this.setFirstEnabledItemIndex()}validateOrientation(n){orientation.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(![keyboard.KeyboardKey.ArrowUp,keyboard.KeyboardKey.ArrowDown,keyboard.KeyboardKey.ArrowRight,keyboard.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 keyboard.KeyboardKey.ArrowUp:case keyboard.KeyboardKey.ArrowLeft:d=s>0?s-1:r;break;case keyboard.KeyboardKey.ArrowDown:case keyboard.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.kolFocus()))}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 index.getElement(this)}static get watchers(){return{_label:["validateLabel"],_items:["validateItems"],_orientation:["validateOrientation"]}}};KolToolbar.style={default:defaultStyleCss},exports.kol_toolbar=KolToolbar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-
|
|
4
|
+
"use strict";var index=require("./index-p66prV0P.js"),alignFloatingElements=require("./align-floating-elements-Bxx5nIn-.js"),common=require("./common-Cd2qH809.js"),align=require("./align-CGG5V8xM.js"),label=require("./label-Nicf9N_T.js");require("./Alert-Bd6RKJBA.js"),require("./i18n-NiDr3RbD.js");var Span=require("./Span-CoHw4Fxy.js"),tooltipOpenTracking=require("./tooltip-open-tracking-Ba0udJRU.js");require("./tslib.es6-7DbU_BSw.js"),require("./clsx-CkZlkaek.js"),require("./component-names-D7MwtuB7.js"),require("./bem-Bu0VYjZa.js"),require("./browser-D7A31aEp.js"),require("./Heading-BbFdSzWc.js"),require("./i18n-Drgbs46L.js"),require("./Icon-D4z1Ua5c.js"),require("./reuse-Cs36Ddzu.js"),require("./markdown-1dxeA2q6.js"),require("./InternalUnderlinedBadgeText-D_EDrZAP.js"),require("./isObject-DMA85Fq4.js");const validateBadgeText=(e,t)=>{common.watchString(e,"_badgeText",t)},validateId=(e,t)=>{common.watchString(e,"_id",t)},VISIBLE_OVERLAYS=new Set;function showOverlay(e){VISIBLE_OVERLAYS.forEach(e=>{e.style.setProperty("z-index","999")}),VISIBLE_OVERLAYS.add(e),e.style.setProperty("z-index","1000")}function hideOverlay(e){if(VISIBLE_OVERLAYS.delete(e),VISIBLE_OVERLAYS.size>0){const e=Array.from(VISIBLE_OVERLAYS).pop();e&&e.style.setProperty("z-index","1000")}}const KolTooltipWc=class{constructor(e){index.registerInstance(this,e),this.hasFocusIn=!1,this.hasMouseIn=!1,this.isHiddenForCurrentVisit=!1,this.resetHideFlag=()=>{this.isNewVisit()&&(this.isHiddenForCurrentVisit=!1)},this.showTooltip=()=>{if(!this.isHiddenForCurrentVisit&&this.previousSibling&&this.tooltipElement){showOverlay(this.tooltipElement),tooltipOpenTracking.tooltipOpened(),this.tooltipElement.classList.remove("hide"),this.tooltipElement.classList.add("show"),this.tooltipElement.style.setProperty("display","block"),common.getDocument().addEventListener("keyup",this.hideTooltipByEscape,{once:!0});const e=this.previousSibling,t=this.tooltipElement;this.cleanupAutoPositioning=alignFloatingElements.autoUpdate(e,t,()=>{this.alignTooltip()})}},this.hideTooltipByEscape=e=>{"Escape"===e.key&&this.hideTooltip()},this.handleMouseEnter=()=>{const e=this.isNewVisit();this.hasMouseIn=!0,e&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleMouseleave=e=>{var t,i;this.hasMouseIn=null!==(i=null===(t=this.tooltipElement)||void 0===t?void 0:t.contains(e.relatedTarget))&&void 0!==i&&i,this.resetHideFlag(),this.showOrHideTooltip()},this.handleFocusIn=()=>{const e=this.isNewVisit();this.hasFocusIn=!0,e&&(this.isHiddenForCurrentVisit=!1),this.showOrHideTooltip()},this.handleFocusout=()=>{this.hasFocusIn=!1,this.resetHideFlag(),this.showOrHideTooltip()},this.addListeners=e=>{e.addEventListener("mouseenter",this.handleMouseEnter),e.addEventListener("mouseleave",this.handleMouseleave),e.addEventListener("focusin",this.handleFocusIn),e.addEventListener("focusout",this.handleFocusout)},this.removeListeners=e=>{e.removeEventListener("mouseenter",this.handleMouseEnter),e.removeEventListener("mouseleave",this.handleMouseleave),e.removeEventListener("focusin",this.handleFocusIn),e.removeEventListener("focusout",this.handleFocusout)},this.resyncListeners=(e,t,i=!1)=>{e&&this.removeListeners(e),t&&(i&&(this.previousSibling=t),this.addListeners(t))},this.catchTooltipElement=e=>{this.tooltipElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this._align="top",this.state={_align:"top",_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.alignFloatingElements({align:this._align,referenceElement:this.previousSibling,arrowElement:this.arrowElement,floatingElement:this.tooltipElement})}async hideTooltip(){this.isHiddenForCurrentVisit=!0,this.tooltipElement&&(hideOverlay(this.tooltipElement),tooltipOpenTracking.tooltipClosed(),this.tooltipElement.classList.remove("show"),this.tooltipElement.classList.add("hide"),this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)),common.getDocument().removeEventListener("keyup",this.hideTooltipByEscape)}render(){return index.h(index.Host,{key:"7a998733dae6a2c928b4107d885c19f5988fa24a",class:"kol-tooltip"},""!==this.state._label&&index.h("div",{key:"6b53ddaa12ca15d4822a4d4945d823f699d76510",class:"kol-tooltip__floating",ref:this.catchTooltipElement},index.h("div",{key:"0b48b4b9938ac6830b84c7731b9b5df89cbf9da7",class:"kol-tooltip__arrow",ref:this.catchArrowElement}),index.h(Span.KolSpanFc,{key:"0531c8d02198e37b81b9110cc683852730caa5fb",class:"kol-tooltip__content",id:this.state._id,badgeText:this._badgeText,label:this.state._label})))}validateBadgeText(e){validateBadgeText(this,e)}validateAlign(e){align.validateAlign(this,e)}validateId(e){validateId(this,e)}validateLabel(e){label.validateLabel(this,e,{required:!0})}componentWillLoad(){this.validateBadgeText(this._badgeText),this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label)}handleEventListeners(){var e,t;const i=null!==(t=null===(e=this.host)||void 0===e?void 0:e.previousElementSibling)&&void 0!==t?t:null;this.resyncListeners(this.previousSibling,i,!0),this.resyncListeners(this.tooltipElement,this.tooltipElement)}connectedCallback(){var e,t;this.previousSibling=null!==(t=null===(e=this.host)||void 0===e?void 0:e.previousElementSibling)&&void 0!==t?t:null}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 index.getElement(this)}static get watchers(){return{_badgeText:["validateBadgeText"],_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};exports.kol_tooltip_wc=KolTooltipWc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kol-tooltip-wc.entry.cjs.js","sources":["src/schema/props/badge-text.ts","src/schema/props/id.ts","src/utils/overlay.ts","src/components/tooltip/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport { watchString } from '../utils';\nimport type { AccessKeyPropType } from './access-key';\nimport type { ShortKeyPropType } from './short-key';\n\n/* types */\nexport type BadgeTextPropType = AccessKeyPropType | ShortKeyPropType;\n\n/**\n * Defines the elements badge text.\n */\nexport type PropBadgeText = {\n\tbadgeText: BadgeTextPropType;\n};\n\n/* validator */\nexport const validateBadgeText = (component: Generic.Element.Component, value?: BadgeTextPropType): void => {\n\twatchString(component, '_badgeText', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString } from '../utils';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n * @deprecated Will be removed in the next major version.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\n/** @deprecated Will be removed in the next major version. */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","import { autoUpdate } from '@floating-ui/dom';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport type { AlignPropType, BadgeTextPropType, IdPropType, LabelPropType, TooltipAPI, TooltipStates } from '../../schema';\nimport { getDocument, validateAlign, validateBadgeText, validateId, validateLabel } from '../../schema';\n\nimport { KolSpanFc } from '../../functional-components';\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { tooltipClosed, tooltipOpened } from '../../utils/tooltip-open-tracking';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tshadow: false,\n})\nexport class KolTooltipWc implements TooltipAPI {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\tprivate hasFocusIn = false;\n\tprivate hasMouseIn = false;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\tprivate async alignTooltip(): Promise<void> {\n\t\tif (this.tooltipElement && this.previousSibling) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.previousSibling,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.tooltipElement,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\ttooltipOpened();\n\t\t\tthis.tooltipElement.classList.remove('hide');\n\t\t\tthis.tooltipElement.classList.add('show');\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().addEventListener('keyup', this.hideTooltipByEscape, {\n\t\t\t\tonce: true,\n\t\t\t});\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, () => {\n\t\t\t\tvoid this.alignTooltip();\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Hides the tooltip.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async hideTooltip() {\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\ttooltipClosed();\n\t\t\tthis.tooltipElement.classList.remove('show');\n\t\t\tthis.tooltipElement.classList.add('hide');\n\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t\tgetDocument().removeEventListener('keyup', this.hideTooltipByEscape);\n\t}\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tvoid this.hideTooltip();\n\t\t}\n\t};\n\n\tprivate handleMouseEnter = (): void => {\n\t\tthis.hasMouseIn = true;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate handleMouseleave = (event: Event): void => {\n\t\tthis.hasMouseIn = this.tooltipElement?.contains((event as MouseEvent).relatedTarget as Node) ?? false;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate handleFocusIn = (): void => {\n\t\tthis.hasFocusIn = true;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate handleFocusout = (): void => {\n\t\tthis.hasFocusIn = false;\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseenter', this.handleMouseEnter);\n\t\tel.addEventListener('mouseleave', this.handleMouseleave);\n\t\tel.addEventListener('focusin', this.handleFocusIn);\n\t\tel.addEventListener('focusout', this.handleFocusout);\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseenter', this.handleMouseEnter);\n\t\tel.removeEventListener('mouseleave', this.handleMouseleave);\n\t\tel.removeEventListener('focusin', this.handleFocusIn);\n\t\tel.removeEventListener('focusout', this.handleFocusout);\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-tooltip\">\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"kol-tooltip__floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"kol-tooltip__arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<KolSpanFc class=\"kol-tooltip__content\" id={this.state._id} badgeText={this._badgeText} label={this.state._label} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements badge text.\n\t */\n\t@Prop() public _badgeText?: BadgeTextPropType;\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @internal\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: TooltipStates = {\n\t\t_align: 'top',\n\t\t_label: '', // ⚠ required\n\t};\n\n\t@Watch('_badgeText')\n\tpublic validateBadgeText(value?: BadgeTextPropType): void {\n\t\tvalidateBadgeText(this, value);\n\t}\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tprivate overFocusTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate showOrHideTooltip = (): void => {\n\t\tclearTimeout(this.overFocusTimeout);\n\t\tthis.overFocusTimeout = setTimeout(() => {\n\t\t\tif (this.hasMouseIn || this.hasFocusIn) {\n\t\t\t\tthis.showTooltip();\n\t\t\t} else {\n\t\t\t\tvoid this.hideTooltip();\n\t\t\t}\n\t\t\t// Timing Guidelines for Exposing Hidden Content: https://www.nngroup.com/articles/timing-exposing-content/\n\t\t}, 300);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateBadgeText(this._badgeText);\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tconst nextSibling = this.host?.previousElementSibling ?? null;\n\t\tthis.resyncListeners(this.previousSibling, nextSibling as Element, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling ?? null;\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"names":["watchString","tooltipOpened","getDocument","autoUpdate","alignFloatingElements","tooltipClosed","h","Host","KolSpanFc","validateAlign","validateLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAyB,KAAU;AAC1G,IAAAA,kBAAW,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC;AAC5C,CAAC;;ACDM,MAAM,UAAU,GAAG,CAAC,SAAoC,EAAE,KAAkB,KAAU;AAC5F,IAAAA,kBAAW,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC;AACrC,CAAC;;ACZD,MAAM,gBAAgB,GAAqB,IAAI,GAAG,EAAE;AAS9C,SAAU,WAAW,CAAC,OAAoB,EAAA;AAC/C,IAAA,gBAAgB,CAAC,OAAO,CAAC,CAAC,cAAc,KAAI;QAC3C,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC;AACnD,KAAC,CAAC;AACF,IAAA,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC;IAC7B,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC;AAC7C;AASM,SAAU,WAAW,CAAC,OAAoB,EAAA;AAC/C,IAAA,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC;AAChC,IAAA,IAAI,gBAAgB,CAAC,IAAI,GAAG,CAAC,EAAE;QAC9B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,GAAG,EAAE;QAC/C,IAAI,IAAI,EAAE;YACT,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC;;;AAG5C;;MCrBa,YAAY,GAAA,MAAA;AAJzB,IAAA,WAAA,CAAA,OAAA,EAAA;;AAUS,QAAA,IAAU,CAAA,UAAA,GAAG,KAAK;AAClB,QAAA,IA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,CAAA,sBAAsB,MAAI,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAA,IAAI;;IAG1D,kBAAkB,GAAA;QACxB,IAAI,CAAC,oBAAoB,EAAE;;IAMrB,oBAAoB,GAAA;AAC1B,QAAA,IAAI,IAAI,CAAC,eAAe,EAAmC;AAC1D,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC;AAC1C,YAAA,IAAI,CAAC,eAAe,GAAG,SAAS;;AAEjC,QAAA,IAAI,IAAI,CAAC,cAAc,EAAmC;AACzD,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC;;AAE1C,QAAA,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,sBAAsB,EAAE;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"kol-tooltip-wc.entry.cjs.js","sources":["src/schema/props/badge-text.ts","src/schema/props/id.ts","src/utils/overlay.ts","src/components/tooltip/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport { watchString } from '../utils';\nimport type { AccessKeyPropType } from './access-key';\nimport type { ShortKeyPropType } from './short-key';\n\n/* types */\nexport type BadgeTextPropType = AccessKeyPropType | ShortKeyPropType;\n\n/**\n * Defines the elements badge text.\n */\nexport type PropBadgeText = {\n\tbadgeText: BadgeTextPropType;\n};\n\n/* validator */\nexport const validateBadgeText = (component: Generic.Element.Component, value?: BadgeTextPropType): void => {\n\twatchString(component, '_badgeText', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString } from '../utils';\n\n/* types */\nexport type IdPropType = string;\n\n/**\n * Defines the internal ID of the primary component element.\n * @deprecated Will be removed in the next major version.\n */\nexport type PropId = {\n\tid: IdPropType;\n};\n\n/* validator */\n/** @deprecated Will be removed in the next major version. */\nexport const validateId = (component: Generic.Element.Component, value?: IdPropType): void => {\n\twatchString(component, '_id', value);\n};\n","/**\n * This file contains the functions used to manage the visible overlays.\n */\n\n/**\n * This set contains all the visible overlays.\n */\nconst VISIBLE_OVERLAYS: Set<HTMLElement> = new Set();\n\n/**\n * This function is used to add an overlay to the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function showOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.forEach((visibleOverlay) => {\n\t\tvisibleOverlay.style.setProperty('z-index', '999');\n\t});\n\tVISIBLE_OVERLAYS.add(overlay);\n\toverlay.style.setProperty('z-index', '1000');\n}\n\n/**\n * This function is used to remove an overlay from the visible overlay list.\n * All overlays in the list will have a z-index of 999, except the last\n * one, which will have a z-index of 1000.\n *\n * @param overlay Get the overlay element reference\n */\nexport function hideOverlay(overlay: HTMLElement): void {\n\tVISIBLE_OVERLAYS.delete(overlay);\n\tif (VISIBLE_OVERLAYS.size > 0) {\n\t\tconst last = Array.from(VISIBLE_OVERLAYS).pop();\n\t\tif (last) {\n\t\t\tlast.style.setProperty('z-index', '1000');\n\t\t}\n\t}\n}\n","import { autoUpdate } from '@floating-ui/dom';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, h, Host, Method, Prop, State, Watch } from '@stencil/core';\nimport type { AlignPropType, BadgeTextPropType, IdPropType, LabelPropType, TooltipAPI, TooltipStates } from '../../schema';\nimport { getDocument, validateAlign, validateBadgeText, validateId, validateLabel } from '../../schema';\n\nimport { KolSpanFc } from '../../functional-components';\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\nimport { hideOverlay, showOverlay } from '../../utils/overlay';\nimport { tooltipClosed, tooltipOpened } from '../../utils/tooltip-open-tracking';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-tooltip-wc',\n\tshadow: false,\n})\nexport class KolTooltipWc implements TooltipAPI {\n\t@Element() private host!: HTMLKolTooltipWcElement;\n\n\tprivate arrowElement?: HTMLDivElement;\n\tprivate previousSibling?: Element | null;\n\tprivate tooltipElement?: HTMLDivElement;\n\tprivate hasFocusIn = false;\n\tprivate hasMouseIn = false;\n\n\t/**\n\t * Prevents the tooltip from showing during the current interaction session.\n\t * An \"interaction session\" (visit) is active while the user hovers over or focuses the trigger element.\n\t *\n\t * Behavior:\n\t * - Set to true when hideTooltip() is called (e.g., via Escape key, click, or programmatically)\n\t * - Remains true for the entire session, even if interaction type changes (e.g., from click to hover)\n\t * - Reset to false when the session ends (user leaves the element completely)\n\t * - Tooltip will show again on the next session unless manually hidden again\n\t */\n\tprivate isHiddenForCurrentVisit = false;\n\n\tprivate cleanupAutoPositioning?: () => void;\n\n\t/**\n\t * Checks if a new interaction session is starting (no prior hover or focus active).\n\t */\n\tprivate isNewVisit(): boolean {\n\t\treturn !this.hasMouseIn && !this.hasFocusIn;\n\t}\n\n\t/**\n\t * Resets the hide flag when the interaction session ends.\n\t */\n\tprivate resetHideFlag = (): void => {\n\t\tif (this.isNewVisit()) {\n\t\t\tthis.isHiddenForCurrentVisit = false;\n\t\t}\n\t};\n\n\tprivate async alignTooltip(): Promise<void> {\n\t\tif (this.tooltipElement && this.previousSibling) {\n\t\t\tawait alignFloatingElements({\n\t\t\t\talign: this._align,\n\t\t\t\treferenceElement: this.previousSibling,\n\t\t\t\tarrowElement: this.arrowElement,\n\t\t\t\tfloatingElement: this.tooltipElement,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate showTooltip = (): void => {\n\t\tif (this.isHiddenForCurrentVisit) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.previousSibling && this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tshowOverlay(this.tooltipElement);\n\t\t\ttooltipOpened();\n\t\t\tthis.tooltipElement.classList.remove('hide');\n\t\t\tthis.tooltipElement.classList.add('show');\n\t\t\tthis.tooltipElement.style.setProperty('display', 'block');\n\t\t\tgetDocument().addEventListener('keyup', this.hideTooltipByEscape, {\n\t\t\t\tonce: true,\n\t\t\t});\n\n\t\t\tconst target = this.previousSibling;\n\t\t\tconst tooltipEl = this.tooltipElement;\n\t\t\tthis.cleanupAutoPositioning = autoUpdate(target, tooltipEl, () => {\n\t\t\t\tvoid this.alignTooltip();\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\n\t * Hides the tooltip.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async hideTooltip() {\n\t\tthis.isHiddenForCurrentVisit = true;\n\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\thideOverlay(this.tooltipElement);\n\t\t\ttooltipClosed();\n\t\t\tthis.tooltipElement.classList.remove('show');\n\t\t\tthis.tooltipElement.classList.add('hide');\n\n\t\t\tif (this.cleanupAutoPositioning) {\n\t\t\t\tthis.cleanupAutoPositioning();\n\t\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t\t}\n\t\t}\n\t\tgetDocument().removeEventListener('keyup', this.hideTooltipByEscape);\n\t}\n\n\tprivate hideTooltipByEscape = (event: KeyboardEvent): void => {\n\t\tif (event.key === 'Escape') {\n\t\t\tvoid this.hideTooltip();\n\t\t}\n\t};\n\n\tprivate handleMouseEnter = (): void => {\n\t\tconst isNewVisit = this.isNewVisit();\n\t\tthis.hasMouseIn = true;\n\t\tif (isNewVisit) {\n\t\t\tthis.isHiddenForCurrentVisit = false;\n\t\t}\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate handleMouseleave = (event: Event): void => {\n\t\tthis.hasMouseIn = this.tooltipElement?.contains((event as MouseEvent).relatedTarget as Node) ?? false;\n\t\tthis.resetHideFlag();\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate handleFocusIn = (): void => {\n\t\tconst isNewVisit = this.isNewVisit();\n\t\tthis.hasFocusIn = true;\n\t\tif (isNewVisit) {\n\t\t\tthis.isHiddenForCurrentVisit = false;\n\t\t}\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate handleFocusout = (): void => {\n\t\tthis.hasFocusIn = false;\n\t\tthis.resetHideFlag();\n\t\tthis.showOrHideTooltip();\n\t};\n\n\tprivate addListeners = (el: Element): void => {\n\t\tel.addEventListener('mouseenter', this.handleMouseEnter);\n\t\tel.addEventListener('mouseleave', this.handleMouseleave);\n\t\tel.addEventListener('focusin', this.handleFocusIn);\n\t\tel.addEventListener('focusout', this.handleFocusout);\n\t};\n\n\tprivate removeListeners = (el: Element): void => {\n\t\tel.removeEventListener('mouseenter', this.handleMouseEnter);\n\t\tel.removeEventListener('mouseleave', this.handleMouseleave);\n\t\tel.removeEventListener('focusin', this.handleFocusIn);\n\t\tel.removeEventListener('focusout', this.handleFocusout);\n\t};\n\n\tprivate resyncListeners = (last?: Element | null, next?: Element | null, replacePreviousSibling = false): void => {\n\t\tif (last) {\n\t\t\tthis.removeListeners(last);\n\t\t}\n\t\tif (next) {\n\t\t\t/**\n\t\t\t * This makes the next element to the last element for the next resync cycle.\n\t\t\t */\n\t\t\tif (replacePreviousSibling) {\n\t\t\t\tthis.previousSibling = next;\n\t\t\t}\n\t\t\tthis.addListeners(next);\n\t\t}\n\t};\n\n\tprivate catchTooltipElement = (el?: HTMLDivElement): void => {\n\t\tthis.tooltipElement = el;\n\t};\n\tprivate catchArrowElement = (element?: HTMLDivElement): void => {\n\t\tthis.arrowElement = element;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-tooltip\">\n\t\t\t\t{this.state._label !== '' && (\n\t\t\t\t\t<div class=\"kol-tooltip__floating\" ref={this.catchTooltipElement}>\n\t\t\t\t\t\t<div class=\"kol-tooltip__arrow\" ref={this.catchArrowElement} />\n\t\t\t\t\t\t<KolSpanFc class=\"kol-tooltip__content\" id={this.state._id} badgeText={this._badgeText} label={this.state._label} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements badge text.\n\t */\n\t@Prop() public _badgeText?: BadgeTextPropType;\n\n\t/**\n\t * Defines the alignment of the tooltip, popover or tabs in relation to the element.\n\t */\n\t@Prop() public _align?: AlignPropType = 'top';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @internal\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: TooltipStates = {\n\t\t_align: 'top',\n\t\t_label: '', // ⚠ required\n\t};\n\n\t@Watch('_badgeText')\n\tpublic validateBadgeText(value?: BadgeTextPropType): void {\n\t\tvalidateBadgeText(this, value);\n\t}\n\n\t@Watch('_align')\n\tpublic validateAlign(value?: AlignPropType): void {\n\t\tvalidateAlign(this, value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: IdPropType): void {\n\t\tvalidateId(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tprivate overFocusTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate showOrHideTooltip = (): void => {\n\t\tclearTimeout(this.overFocusTimeout);\n\t\tthis.overFocusTimeout = setTimeout(() => {\n\t\t\tif (this.hasMouseIn || this.hasFocusIn) {\n\t\t\t\tthis.showTooltip();\n\t\t\t} else {\n\t\t\t\tvoid this.hideTooltip();\n\t\t\t}\n\t\t\t// Timing Guidelines for Exposing Hidden Content: https://www.nngroup.com/articles/timing-exposing-content/\n\t\t}, 300);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateBadgeText(this._badgeText);\n\t\tthis.validateAlign(this._align);\n\t\tthis.validateId(this._id);\n\t\tthis.validateLabel(this._label);\n\t}\n\n\tprivate handleEventListeners(): void {\n\t\tconst nextSibling = this.host?.previousElementSibling ?? null;\n\t\tthis.resyncListeners(this.previousSibling, nextSibling as Element, true);\n\t\tthis.resyncListeners(this.tooltipElement, this.tooltipElement);\n\t}\n\n\tpublic connectedCallback(): void {\n\t\tthis.previousSibling = this.host?.previousElementSibling ?? null;\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tthis.handleEventListeners();\n\t}\n\n\t/**\n\t * @see: components/abbr/component.tsx (componentDidLoad)\n\t */\n\tpublic disconnectedCallback(): void {\n\t\tif (this.previousSibling /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.previousSibling);\n\t\t\tthis.previousSibling = undefined;\n\t\t}\n\t\tif (this.tooltipElement /* SSR instanceof HTMLElement */) {\n\t\t\tthis.removeListeners(this.tooltipElement);\n\t\t}\n\t\tif (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t}\n\t}\n}\n"],"names":["watchString","tooltipOpened","getDocument","autoUpdate","alignFloatingElements","tooltipClosed","h","Host","KolSpanFc","validateAlign","validateLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBO,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAyB,KAAU;AAC1G,IAAAA,kBAAW,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC;AAC5C,CAAC;;ACDM,MAAM,UAAU,GAAG,CAAC,SAAoC,EAAE,KAAkB,KAAU;AAC5F,IAAAA,kBAAW,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC;AACrC,CAAC;;ACZD,MAAM,gBAAgB,GAAqB,IAAI,GAAG,EAAE;AAS9C,SAAU,WAAW,CAAC,OAAoB,EAAA;AAC/C,IAAA,gBAAgB,CAAC,OAAO,CAAC,CAAC,cAAc,KAAI;QAC3C,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC;AACnD,KAAC,CAAC;AACF,IAAA,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC;IAC7B,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC;AAC7C;AASM,SAAU,WAAW,CAAC,OAAoB,EAAA;AAC/C,IAAA,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC;AA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eAAe,EAAmC;AAC1D,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC;AAC1C,YAAA,IAAI,CAAC,eAAe,GAAG,SAAS;;AAEjC,QAAA,IAAI,IAAI,CAAC,cAAc,EAAmC;AACzD,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC;;AAE1C,QAAA,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAChC,IAAI,CAAC,sBAAsB,EAAE;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var index=require("./index-
|
|
4
|
+
"use strict";var index=require("./index-p66prV0P.js"),clsx=require("./clsx-CkZlkaek.js"),componentNames=require("./component-names-D7MwtuB7.js"),common=require("./common-Cd2qH809.js"),href=require("./href-BxaZOlRE.js"),label=require("./label-Nicf9N_T.js"),open=require("./open-CFgcd51_.js"),dev_utils=require("./dev.utils-CaZivRsv.js");const validateActive=(e,t,i)=>{common.watchBoolean(e,"_active",t,i)},KolTreeItemWc=class{constructor(e){index.registerInstance(this,e),this.groupId=`tree-group-${dev_utils.nonce()}`,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1}}render(){const{_href:e,_active:t,_hasChildren:i,_open:a,_label:l}=this.state;return index.h(index.Host,{key:"5649eea22138bfd4814d801dd32e28cd352eef6d",onSlotchange:this.handleSlotchange.bind(this)},index.h("li",{key:"0d8e7319a392ac8166d0fca80c297a1569de922a",class:"kol-tree-item",style:{"--level":`${this.level}`}},index.h(componentNames.KolLinkWcTag,{key:"9e92a6b0d8d17160ea861b805a4dd86454045445",class:clsx.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:i?a:void 0,_ariaOwns:i?this.groupId:void 0,ref:e=>this.linkElement=e},index.h("span",{key:"ac68d83264cfa4386a054df43eb84ccb63451607",class:"kol-tree-item__link-inner",slot:"expert"},i?index.h("span",{class:"kol-tree-item__toggle-button",onClick:e=>a?void this.handleCollapseClick(e):void this.handleExpandClick(e)},index.h(componentNames.KolIconTag,{class:"kol-tree-item__toggle-button-icon",_icons:"codicon codicon-"+(a?"chevron-down":"chevron-right"),_label:""})):index.h("span",{class:"kol-tree-item__toggle-button-placeholder"}),index.h("span",{key:"3d339257fdc8689130aadcd4ebeb0d1fc3c4a1be",class:"kol-tree-item__text"},l))),index.h("ul",{key:"81618223386fe6386d556613e487fcd51f60c573",class:"kol-tree-item__children",hidden:!i||!a,role:"group",id:this.groupId},index.h("slot",{key:"3192a75104bc09cdb9713f220cda421b5a210d58"}))))}validateActive(e){validateActive(this,e||!1)}validateLabel(e){label.validateLabel(this,e)}validateOpen(e){open.validateOpen(this,e)}validateHref(e){href.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()!==componentNames.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 focusLink(){await this.linkElement.kolFocus()}async handleExpandClick(e){e.preventDefault(),await this.linkElement.kolFocus(),await this.expand()}async expand(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!0}))}async handleCollapseClick(e){e.preventDefault(),this.linkElement.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 index.getElement(this)}static get watchers(){return{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}}};exports.kol_tree_item_wc=KolTreeItemWc;
|