@public-ui/components 3.0.6-rc.1 → 3.0.6-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 +41 -41
- package/dist/cjs/{Alert-CBvu4Azg.js → Alert-Do6ehPPd.js} +1 -1
- package/dist/cjs/{Alert-CBvu4Azg.js.map → Alert-Do6ehPPd.js.map} +1 -1
- package/dist/cjs/{Collapsible-BAxPaMNA.js → Collapsible-DLJ9ngpN.js} +1 -1
- package/dist/cjs/{Collapsible-BAxPaMNA.js.map → Collapsible-DLJ9ngpN.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsToggle-HrRlyQdj.js → CustomSuggestionsToggle-CQNbxrFu.js} +1 -1
- package/dist/cjs/{CustomSuggestionsToggle-HrRlyQdj.js.map → CustomSuggestionsToggle-CQNbxrFu.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-BawtYKZv.js → FieldControlStateWrapper-BTPMHsM1.js} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-BawtYKZv.js.map → FieldControlStateWrapper-BTPMHsM1.js.map} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-BeUWCap8.js → FormFieldStateWrapper-C8Ds5tPB.js} +1 -1
- package/dist/cjs/{FormFieldStateWrapper-BeUWCap8.js.map → FormFieldStateWrapper-C8Ds5tPB.js.map} +1 -1
- package/dist/cjs/{Heading-J0dL_R-5.js → Heading-DGnr9w8b.js} +1 -1
- package/dist/cjs/{Heading-J0dL_R-5.js.map → Heading-DGnr9w8b.js.map} +1 -1
- package/dist/cjs/{Icon-D9wRYhin.js → Icon-CrlBnVcz.js} +1 -1
- package/dist/cjs/{Icon-D9wRYhin.js.map → Icon-CrlBnVcz.js.map} +1 -1
- package/dist/cjs/Input-DMeMmmBn.js +4 -0
- package/dist/cjs/{Input-CNhngTOz.js.map → Input-DMeMmmBn.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-BHeGLakM.js → InputStateWrapper-0zKOwPtz.js} +1 -1
- package/dist/{kolibri/InputStateWrapper-7LSQHzG0.js.map → cjs/InputStateWrapper-0zKOwPtz.js.map} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-BFV_mwUE.js → InternalUnderlinedBadgeText-DPW4yX2Z.js} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-BFV_mwUE.js.map → InternalUnderlinedBadgeText-DPW4yX2Z.js.map} +1 -1
- package/dist/cjs/Span-BBoWRjZC.js +4 -0
- package/dist/cjs/{Span-BxoC47SY.js.map → Span-BBoWRjZC.js.map} +1 -1
- package/dist/cjs/access-and-short-key-BExF929g.js.map +1 -1
- package/dist/cjs/{app-globals-pL5YD7vG.js → app-globals-9cT_8sCJ.js} +1 -1
- package/dist/cjs/{app-globals-pL5YD7vG.js.map → app-globals-9cT_8sCJ.js.map} +1 -1
- package/dist/cjs/{controller-DE364s7d.js → controller-C2cxr6Rw.js} +1 -1
- package/dist/cjs/{controller-DE364s7d.js.map → controller-C2cxr6Rw.js.map} +1 -1
- package/dist/cjs/{controller-DVa19V7D.js → controller-Ccj6Gm2M.js} +1 -1
- package/dist/cjs/{controller-DVa19V7D.js.map → controller-Ccj6Gm2M.js.map} +1 -1
- package/dist/cjs/{controller-C9D9ASx9.js → controller-DvExtwnx.js} +1 -1
- package/dist/cjs/{controller-C9D9ASx9.js.map → controller-DvExtwnx.js.map} +1 -1
- package/dist/cjs/{controller-icon-DXOo7KJs.js → controller-icon-QLNq0HO6.js} +1 -1
- package/dist/cjs/{controller-icon-DXOo7KJs.js.map → controller-icon-QLNq0HO6.js.map} +1 -1
- package/dist/cjs/{dev.utils-CQU7aXbA.js → dev.utils-UE8Qk4FC.js} +1 -1
- package/dist/cjs/{dev.utils-CQU7aXbA.js.map → dev.utils-UE8Qk4FC.js.map} +1 -1
- package/dist/cjs/{devtools-CAiSzX10.js → devtools-DaWRMPjB.js} +1 -1
- package/dist/cjs/{devtools-CAiSzX10.js.map → devtools-DaWRMPjB.js.map} +1 -1
- package/dist/cjs/{index-qkwtLaak.js → index-CMEXkCjL.js} +1 -1
- package/dist/cjs/{index-qkwtLaak.js.map → index-CMEXkCjL.js.map} +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.entry.cjs.js.map +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-button.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.entry.cjs.js.map +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-link.entry.cjs.js.map +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-button.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-single-select.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/InputStateWrapper.js +1 -1
- package/dist/components/InputStateWrapper.js.map +1 -1
- package/dist/components/access-and-short-key.js.map +1 -1
- package/dist/components/kol-button-link.js.map +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-button.js.map +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-combobox.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-color.js.map +1 -1
- package/dist/components/kol-input-date.js.map +1 -1
- package/dist/components/kol-input-email.js.map +1 -1
- package/dist/components/kol-input-file.js.map +1 -1
- package/dist/components/kol-input-number.js.map +1 -1
- package/dist/components/kol-input-password.js.map +1 -1
- package/dist/components/kol-input-range.js.map +1 -1
- package/dist/components/kol-input-text.js.map +1 -1
- package/dist/components/kol-link-button.js.map +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.map +1 -1
- package/dist/components/kol-popover-button-wc.js.map +1 -1
- package/dist/components/kol-popover-button.js.map +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-select.js.map +1 -1
- package/dist/components/kol-single-select.js +1 -1
- package/dist/components/kol-single-select.js.map +1 -1
- package/dist/components/kol-split-button.js.map +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateful.js.map +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-textarea.js.map +1 -1
- package/dist/esm/{Alert-B377MRFO.js → Alert-qbdf_fcL.js} +1 -1
- package/dist/esm/{Alert-B377MRFO.js.map → Alert-qbdf_fcL.js.map} +1 -1
- package/dist/esm/{Collapsible-C7BOCNYK.js → Collapsible-CIrvKN_B.js} +1 -1
- package/dist/esm/{Collapsible-C7BOCNYK.js.map → Collapsible-CIrvKN_B.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsToggle-BNy3sFNW.js → CustomSuggestionsToggle-DElswCqH.js} +1 -1
- package/dist/esm/{CustomSuggestionsToggle-BNy3sFNW.js.map → CustomSuggestionsToggle-DElswCqH.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-DRnIsegE.js → FieldControlStateWrapper-CHywsLUV.js} +1 -1
- package/dist/{kolibri/FieldControlStateWrapper-DRnIsegE.js.map → esm/FieldControlStateWrapper-CHywsLUV.js.map} +1 -1
- package/dist/esm/{FormFieldStateWrapper-DiolLYSq.js → FormFieldStateWrapper-CmxXneQY.js} +1 -1
- package/dist/esm/{FormFieldStateWrapper-DiolLYSq.js.map → FormFieldStateWrapper-CmxXneQY.js.map} +1 -1
- package/dist/esm/{Heading-BX2W3g7O.js → Heading-CKpEiZDI.js} +1 -1
- package/dist/esm/{Heading-BX2W3g7O.js.map → Heading-CKpEiZDI.js.map} +1 -1
- package/dist/esm/Icon-CPnthaTn.js +4 -0
- package/dist/esm/{Icon-Dh17fWbe.js.map → Icon-CPnthaTn.js.map} +1 -1
- package/dist/esm/Input-BHMhOXxm.js +4 -0
- package/dist/esm/{Input-45FxkhGc.js.map → Input-BHMhOXxm.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-7LSQHzG0.js → InputStateWrapper-CqJvkzZt.js} +1 -1
- package/dist/esm/InputStateWrapper-CqJvkzZt.js.map +1 -0
- package/dist/esm/InternalUnderlinedBadgeText-DOCFbPLy.js +4 -0
- package/dist/esm/{InternalUnderlinedBadgeText-CLrx-9jT.js.map → InternalUnderlinedBadgeText-DOCFbPLy.js.map} +1 -1
- package/dist/esm/{Span-DBghS6-J.js → Span-BZB_bkKp.js} +1 -1
- package/dist/esm/{Span-DBghS6-J.js.map → Span-BZB_bkKp.js.map} +1 -1
- package/dist/esm/access-and-short-key-bcID78Ha.js.map +1 -1
- package/dist/esm/{app-globals-BUWWVWda.js → app-globals-Bd-b6ifP.js} +1 -1
- package/dist/esm/{app-globals-BUWWVWda.js.map → app-globals-Bd-b6ifP.js.map} +1 -1
- package/dist/esm/{controller-CUCw249W.js → controller-BORRr_3T.js} +1 -1
- package/dist/esm/{controller-CUCw249W.js.map → controller-BORRr_3T.js.map} +1 -1
- package/dist/esm/{controller-mAs3LHlE.js → controller-CBTEbm6r.js} +1 -1
- package/dist/esm/{controller-mAs3LHlE.js.map → controller-CBTEbm6r.js.map} +1 -1
- package/dist/esm/{controller-BD70cDIh.js → controller-Cb9l3YaE.js} +1 -1
- package/dist/{kolibri/controller-BD70cDIh.js.map → esm/controller-Cb9l3YaE.js.map} +1 -1
- package/dist/esm/{controller-icon-bVTIf-z3.js → controller-icon-CvKGJIGZ.js} +1 -1
- package/dist/{kolibri/controller-icon-bVTIf-z3.js.map → esm/controller-icon-CvKGJIGZ.js.map} +1 -1
- package/dist/esm/{dev.utils-BxUNRHGK.js → dev.utils-D4rfC2RQ.js} +1 -1
- package/dist/esm/{dev.utils-BxUNRHGK.js.map → dev.utils-D4rfC2RQ.js.map} +1 -1
- package/dist/esm/{devtools-CJch3vCJ.js → devtools-DosNZdSl.js} +1 -1
- package/dist/esm/{devtools-CJch3vCJ.js.map → devtools-DosNZdSl.js.map} +1 -1
- package/dist/esm/{index-DOWoBMgb.js → index-D7gsjUuJ.js} +1 -1
- package/dist/esm/{index-DOWoBMgb.js.map → index-D7gsjUuJ.js.map} +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js.map +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-button.entry.js.map +1 -1
- package/dist/esm/kol-card-wc.entry.js +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js.map +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-drawer.entry.js +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js.map +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js.map +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js.map +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js.map +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js.map +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js.map +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js.map +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js.map +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js.map +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-link.entry.js.map +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-button.entry.js.map +1 -1
- package/dist/esm/kol-popover-wc.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-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-single-select.entry.js.map +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js.map +1 -1
- package/dist/esm/kol-table-settings-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js.map +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toolbar.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item.entry.js +1 -1
- package/dist/esm/kol-tree-wc.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/{Alert-B377MRFO.js → Alert-qbdf_fcL.js} +1 -1
- package/dist/kolibri/{Alert-B377MRFO.js.map → Alert-qbdf_fcL.js.map} +1 -1
- package/dist/kolibri/Collapsible-CIrvKN_B.js +4 -0
- package/dist/kolibri/{Collapsible-C7BOCNYK.js.map → Collapsible-CIrvKN_B.js.map} +1 -1
- package/dist/kolibri/{CustomSuggestionsToggle-BNy3sFNW.js → CustomSuggestionsToggle-DElswCqH.js} +1 -1
- package/dist/kolibri/{CustomSuggestionsToggle-BNy3sFNW.js.map → CustomSuggestionsToggle-DElswCqH.js.map} +1 -1
- package/dist/kolibri/FieldControlStateWrapper-CHywsLUV.js +4 -0
- package/dist/{esm/FieldControlStateWrapper-DRnIsegE.js.map → kolibri/FieldControlStateWrapper-CHywsLUV.js.map} +1 -1
- package/dist/kolibri/FormFieldStateWrapper-CmxXneQY.js +4 -0
- package/dist/kolibri/{FormFieldStateWrapper-DiolLYSq.js.map → FormFieldStateWrapper-CmxXneQY.js.map} +1 -1
- package/dist/kolibri/{Heading-BX2W3g7O.js → Heading-CKpEiZDI.js} +1 -1
- package/dist/kolibri/{Heading-BX2W3g7O.js.map → Heading-CKpEiZDI.js.map} +1 -1
- package/dist/kolibri/{Icon-Dh17fWbe.js → Icon-CPnthaTn.js} +1 -1
- package/dist/kolibri/{Icon-Dh17fWbe.js.map → Icon-CPnthaTn.js.map} +1 -1
- package/dist/kolibri/Input-BHMhOXxm.js +4 -0
- package/dist/kolibri/{Input-45FxkhGc.js.map → Input-BHMhOXxm.js.map} +1 -1
- package/dist/kolibri/{InputStateWrapper-7LSQHzG0.js → InputStateWrapper-CqJvkzZt.js} +1 -1
- package/dist/kolibri/InputStateWrapper-CqJvkzZt.js.map +1 -0
- package/dist/kolibri/InternalUnderlinedBadgeText-DOCFbPLy.js +4 -0
- package/dist/kolibri/{InternalUnderlinedBadgeText-CLrx-9jT.js.map → InternalUnderlinedBadgeText-DOCFbPLy.js.map} +1 -1
- package/dist/kolibri/Span-BZB_bkKp.js +4 -0
- package/dist/kolibri/{Span-DBghS6-J.js.map → Span-BZB_bkKp.js.map} +1 -1
- package/dist/kolibri/access-and-short-key-bcID78Ha.js.map +1 -1
- package/dist/kolibri/app-globals-Bd-b6ifP.js +4 -0
- package/dist/kolibri/{app-globals-BUWWVWda.js.map → app-globals-Bd-b6ifP.js.map} +1 -1
- package/dist/kolibri/controller-BORRr_3T.js +4 -0
- package/dist/kolibri/{controller-CUCw249W.js.map → controller-BORRr_3T.js.map} +1 -1
- package/dist/kolibri/{controller-mAs3LHlE.js → controller-CBTEbm6r.js} +1 -1
- package/dist/kolibri/{controller-mAs3LHlE.js.map → controller-CBTEbm6r.js.map} +1 -1
- package/dist/kolibri/{controller-BD70cDIh.js → controller-Cb9l3YaE.js} +1 -1
- package/dist/{esm/controller-BD70cDIh.js.map → kolibri/controller-Cb9l3YaE.js.map} +1 -1
- package/dist/kolibri/{controller-icon-bVTIf-z3.js → controller-icon-CvKGJIGZ.js} +1 -1
- package/dist/{esm/controller-icon-bVTIf-z3.js.map → kolibri/controller-icon-CvKGJIGZ.js.map} +1 -1
- package/dist/kolibri/{dev.utils-BxUNRHGK.js → dev.utils-D4rfC2RQ.js} +1 -1
- package/dist/kolibri/{dev.utils-BxUNRHGK.js.map → dev.utils-D4rfC2RQ.js.map} +1 -1
- package/dist/kolibri/{devtools-CJch3vCJ.js → devtools-DosNZdSl.js} +1 -1
- package/dist/kolibri/{devtools-CJch3vCJ.js.map → devtools-DosNZdSl.js.map} +1 -1
- package/dist/kolibri/{index-DOWoBMgb.js → index-D7gsjUuJ.js} +1 -1
- package/dist/kolibri/{index-DOWoBMgb.js.map → index-D7gsjUuJ.js.map} +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.esm.js.map +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.esm.js.map +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js.map +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.esm.js.map +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.esm.js.map +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.esm.js.map +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.esm.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.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-popover-button.entry.js +1 -1
- package/dist/kolibri/kol-popover-wc.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js.map +1 -1
- package/dist/kolibri/kol-single-select.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-single-select.entry.js.map +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.esm.js.map +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js.map +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components.d.ts +88 -88
- package/dist/types/functional-components/inputs/NativeSelect/NativeSelect.d.ts +3 -0
- package/dist/types/functional-components/inputs/TextArea/TextArea.d.ts +3 -0
- package/doc/button-link.md +2 -2
- package/doc/button.md +2 -2
- package/doc/combobox.md +2 -2
- package/doc/input-checkbox.md +2 -2
- package/doc/input-color.md +2 -2
- package/doc/input-date.md +2 -2
- package/doc/input-email.md +2 -2
- package/doc/input-file.md +2 -2
- package/doc/input-number.md +2 -2
- package/doc/input-password.md +2 -2
- package/doc/input-range.md +2 -2
- package/doc/input-text.md +2 -2
- package/doc/link-button.md +2 -2
- package/doc/link.md +2 -2
- package/doc/popover-button.md +2 -2
- package/doc/select.md +2 -2
- package/doc/single-select.md +2 -2
- package/doc/split-button.md +2 -2
- package/doc/textarea.md +2 -2
- package/package.json +1 -1
- package/vscode-custom-data.json +40 -40
- package/dist/cjs/Input-CNhngTOz.js +0 -4
- package/dist/cjs/InputStateWrapper-BHeGLakM.js.map +0 -1
- package/dist/cjs/Span-BxoC47SY.js +0 -4
- package/dist/esm/Icon-Dh17fWbe.js +0 -4
- package/dist/esm/Input-45FxkhGc.js +0 -4
- package/dist/esm/InputStateWrapper-7LSQHzG0.js.map +0 -1
- package/dist/esm/InternalUnderlinedBadgeText-CLrx-9jT.js +0 -4
- package/dist/kolibri/Collapsible-C7BOCNYK.js +0 -4
- package/dist/kolibri/FieldControlStateWrapper-DRnIsegE.js +0 -4
- package/dist/kolibri/FormFieldStateWrapper-DiolLYSq.js +0 -4
- package/dist/kolibri/Input-45FxkhGc.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-CLrx-9jT.js +0 -4
- package/dist/kolibri/Span-DBghS6-J.js +0 -4
- package/dist/kolibri/app-globals-BUWWVWda.js +0 -4
- package/dist/kolibri/controller-CUCw249W.js +0 -4
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as n,h as e}from"./index-DOWoBMgb.js";import{d as t,u as i,c as o,j as a,w as l}from"./common-8fBdMvJM.js";import{v as s}from"./hide-label-DRunOux4.js";import{v as r}from"./label-CdtNxOKu.js";import{t as d}from"./i18n-CdSCDnmA.js";import{r as c,a as h}from"./unique-nav-labels-C_NhdgGz.js";import{w as p}from"./validation-DoIjmu3L.js";import{f,d as m}from"./component-names-CkE54Ym7.js";import{c as b}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.js";const u=(n,e)=>{t(n,"_collapsible",e)},v=(n,e)=>{t(n,"_hasCompactButton",e)},_=(n,e)=>{t(n,"_hasIconsWhenExpanded",e)},k="/* 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(44rem / 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 * {\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 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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\n@layer kol-component {\n .kol-nav {\n display: grid;\n place-items: center;\n }\n .kol-nav--horizontal {\n width: 100%;\n }\n .kol-nav:not(.kol-nav--is-compact) .kol-nav__navigation {\n width: 100%;\n }\n .kol-nav__list {\n display: flex;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-nav__list--vertical {\n flex-direction: column;\n }\n .kol-nav__list--horizontal {\n flex-wrap: wrap;\n }\n .kol-nav__entry-wrapper {\n display: flex;\n }\n .kol-nav__entry {\n flex-grow: 1;\n }\n .kol-button {\n text-align: left;\n }\n}",y=n=>"string"==typeof n._href,g=n=>{var e;return void 0===n._href&&"function"==typeof(null===(e=n._on)||void 0===e?void 0:e.onClick)},w=class{constructor(t){n(this,t),this.handleToggleExpansionClick=n=>{n&&(this.state._expandedChildren.includes(n)?this.collapseChildren(n):this.expandChildren(n))},this.linkList=n=>e("ul",{class:b("kol-nav__list",{"kol-nav__list--nested":n.deep>0,"kol-nav__list--horizontal":0===n.deep&&"horizontal"===n.orientation,"kol-nav__list--vertical":0!==n.deep||"vertical"===n.orientation}),"data-deep":n.deep},n.links.map((e,t)=>this.li(n.collapsible,n.hideLabel,n.deep,t,e,n.orientation))),this._collapsible=!0,this._hasCompactButton=!1,this._hasIconsWhenExpanded=!1,this._hideLabel=!1,this._orientation="vertical",this.state={_collapsible:!0,_hasCompactButton:!1,_hasIconsWhenExpanded:!1,_hideLabel:!1,_label:"",_links:[],_orientation:"vertical",_expandedChildren:[]}}expandChildren(n){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:[...this.state._expandedChildren,n]})}collapseChildren(n){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:this.state._expandedChildren.filter(e=>e!==n)})}entry(n,t,i,a,o){const l=this.state._hasIconsWhenExpanded||this.state._hideLabel?a._icons||(this.state._hideLabel?"codicon codicon-symbol-method":void 0):void 0;return e("div",{class:"kol-nav__entry-wrapper"},y(a)?e(f,Object.assign({class:"kol-nav__entry kol-nav__entry--link"},a,{_hideLabel:t,_icons:l})):e(m,{class:"kol-nav__entry kol-nav__entry--button",_label:a._label,_hideLabel:t,_icons:l,_on:{onClick:(n,e)=>{g(a)&&"function"==typeof a._on.onClick?a._on.onClick(n,e):this.handleToggleExpansionClick(a._children)}}}),i?this.expandButton(n,a,o):"")}expandButton(n,t,i){return e(m,{class:b("kol-nav__expand-button",{"kol-nav__expand-button--expanded":i}),_ariaExpanded:i,_disabled:!n,_icons:"codicon codicon-"+(i?"remove":"add"),_hideLabel:!0,_label:`${d(i?"kol-nav-label-close":"kol-nav-label-open",{placeholders:{label:t._label}})}`,_on:{onClick:()=>this.handleToggleExpansionClick(t._children)}})}li(n,t,i,a,o,l){const s=!!o._active,d=Array.isArray(o._children)&&o._children.length>0,r=Boolean(o._children&&this.state._expandedChildren.includes(o._children));return e("li",{class:b("kol-nav__list-item",{"kol-nav__list-item--active":s,"kol-nav__list-item--expanded":r,"kol-nav__list-item--has-children":d}),key:a},this.entry(n,t,d,o,r),r&&e(this.linkList,{collapsible:n,hideLabel:t,deep:i+1,links:o._children||[],orientation:l}))}initializeExpandedChildren(){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:[]});const n=e=>{if(e._active)return e._children&&this.expandChildren(e._children),!0;if(e._children)for(const t of e._children)if(n(t))return this.expandChildren(e._children),!0;return!1};this.state._links.forEach(n)}render(){let n=this.state._hasCompactButton;"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(n=!1,i("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const t=!0===this.state._collapsible,a=!0===this.state._hideLabel,o=this.state._orientation;return e("div",{key:"1768f2d1d6794f07607ad8a9f3953a4f17d3cd06",class:b("kol-nav",`kol-nav--${o}`,{"kol-nav--is-compact":this.state._hideLabel})},e("nav",{key:"6fceaf6abe991a38a3c4bb98741c9e1c5ad2f11a",class:"kol-nav__navigation","aria-label":this.state._label,id:"nav"},e(this.linkList,{key:"5ee2d35517877fad58f3c37446a88a4753a80bf5",collapsible:t,hideLabel:a,deep:0,links:this.state._links,orientation:o})),n&&e("div",{key:"d8b7bcb8d56bad5fadc02fc6362d84c597c5f0c8",class:"kol-nav__compact"},e(m,{key:"a6e055cb523095f7dfeed9edc1fd4a847973cc55",class:"kol-nav__toggle-button",_ariaControls:"nav",_ariaExpanded:!a,_icons:a?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:d(a?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_hideLabel:!1===this.state._hideLabel})}},_tooltipAlign:"right",_buttonVariant:"ghost"})))}validateCollapsible(n){u(this,n)}validateHasCompactButton(n){v(this,n)}validateHasIconsWhenExpanded(n){_(this,n)}validateHideLabel(n){s(this,n)}validateLabel(n,e,t=!1){t||c(this.state._label),r(this,n,{required:!0}),o(n),h(this.state._label)}validateLinks(n){p("KolNav",this,n),a("[KolNav] The navigation structure is not yet validated recursively."),this.initializeExpandedChildren()}validateOrientation(n){l(this,"_orientation",n=>"horizontal"===n||"vertical"===n,new Set(["Orientation {horizontal, vertical}"]),n,{defaultValue:"vertical"})}componentWillLoad(){this.validateCollapsible(this._collapsible),this.validateHideLabel(this._hideLabel),this.validateHasCompactButton(this._hasCompactButton),this.validateHasIconsWhenExpanded(this._hasIconsWhenExpanded),this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links),this.validateOrientation(this._orientation),this.initializeExpandedChildren()}disconnectedCallback(){c(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};w.style={default:k};export{w as kol_nav};
|
4
|
+
import{r as n,h as e}from"./index-D7gsjUuJ.js";import{d as t,u as i,c as o,j as a,w as l}from"./common-8fBdMvJM.js";import{v as s}from"./hide-label-DRunOux4.js";import{v as r}from"./label-CdtNxOKu.js";import{t as d}from"./i18n-CdSCDnmA.js";import{r as c,a as h}from"./unique-nav-labels-C_NhdgGz.js";import{w as p}from"./validation-DoIjmu3L.js";import{f,d as m}from"./component-names-CkE54Ym7.js";import{c as b}from"./clsx-eK3rPvPS.js";import"./i18n-ZF6JbdVP.js";const u=(n,e)=>{t(n,"_collapsible",e)},v=(n,e)=>{t(n,"_hasCompactButton",e)},_=(n,e)=>{t(n,"_hasIconsWhenExpanded",e)},k="/* 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(44rem / 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 * {\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 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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\n@layer kol-component {\n .kol-nav {\n display: grid;\n place-items: center;\n }\n .kol-nav--horizontal {\n width: 100%;\n }\n .kol-nav:not(.kol-nav--is-compact) .kol-nav__navigation {\n width: 100%;\n }\n .kol-nav__list {\n display: flex;\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .kol-nav__list--vertical {\n flex-direction: column;\n }\n .kol-nav__list--horizontal {\n flex-wrap: wrap;\n }\n .kol-nav__entry-wrapper {\n display: flex;\n }\n .kol-nav__entry {\n flex-grow: 1;\n }\n .kol-button {\n text-align: left;\n }\n}",y=n=>"string"==typeof n._href,g=n=>{var e;return void 0===n._href&&"function"==typeof(null===(e=n._on)||void 0===e?void 0:e.onClick)},w=class{constructor(t){n(this,t),this.handleToggleExpansionClick=n=>{n&&(this.state._expandedChildren.includes(n)?this.collapseChildren(n):this.expandChildren(n))},this.linkList=n=>e("ul",{class:b("kol-nav__list",{"kol-nav__list--nested":n.deep>0,"kol-nav__list--horizontal":0===n.deep&&"horizontal"===n.orientation,"kol-nav__list--vertical":0!==n.deep||"vertical"===n.orientation}),"data-deep":n.deep},n.links.map((e,t)=>this.li(n.collapsible,n.hideLabel,n.deep,t,e,n.orientation))),this._collapsible=!0,this._hasCompactButton=!1,this._hasIconsWhenExpanded=!1,this._hideLabel=!1,this._orientation="vertical",this.state={_collapsible:!0,_hasCompactButton:!1,_hasIconsWhenExpanded:!1,_hideLabel:!1,_label:"",_links:[],_orientation:"vertical",_expandedChildren:[]}}expandChildren(n){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:[...this.state._expandedChildren,n]})}collapseChildren(n){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:this.state._expandedChildren.filter(e=>e!==n)})}entry(n,t,i,a,o){const l=this.state._hasIconsWhenExpanded||this.state._hideLabel?a._icons||(this.state._hideLabel?"codicon codicon-symbol-method":void 0):void 0;return e("div",{class:"kol-nav__entry-wrapper"},y(a)?e(f,Object.assign({class:"kol-nav__entry kol-nav__entry--link"},a,{_hideLabel:t,_icons:l})):e(m,{class:"kol-nav__entry kol-nav__entry--button",_label:a._label,_hideLabel:t,_icons:l,_on:{onClick:(n,e)=>{g(a)&&"function"==typeof a._on.onClick?a._on.onClick(n,e):this.handleToggleExpansionClick(a._children)}}}),i?this.expandButton(n,a,o):"")}expandButton(n,t,i){return e(m,{class:b("kol-nav__expand-button",{"kol-nav__expand-button--expanded":i}),_ariaExpanded:i,_disabled:!n,_icons:"codicon codicon-"+(i?"remove":"add"),_hideLabel:!0,_label:`${d(i?"kol-nav-label-close":"kol-nav-label-open",{placeholders:{label:t._label}})}`,_on:{onClick:()=>this.handleToggleExpansionClick(t._children)}})}li(n,t,i,a,o,l){const s=!!o._active,d=Array.isArray(o._children)&&o._children.length>0,r=Boolean(o._children&&this.state._expandedChildren.includes(o._children));return e("li",{class:b("kol-nav__list-item",{"kol-nav__list-item--active":s,"kol-nav__list-item--expanded":r,"kol-nav__list-item--has-children":d}),key:a},this.entry(n,t,d,o,r),r&&e(this.linkList,{collapsible:n,hideLabel:t,deep:i+1,links:o._children||[],orientation:l}))}initializeExpandedChildren(){this.state=Object.assign(Object.assign({},this.state),{_expandedChildren:[]});const n=e=>{if(e._active)return e._children&&this.expandChildren(e._children),!0;if(e._children)for(const t of e._children)if(n(t))return this.expandChildren(e._children),!0;return!1};this.state._links.forEach(n)}render(){let n=this.state._hasCompactButton;"horizontal"===this.state._orientation&&!0===this.state._hasCompactButton&&(n=!1,i("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const t=!0===this.state._collapsible,a=!0===this.state._hideLabel,o=this.state._orientation;return e("div",{key:"1768f2d1d6794f07607ad8a9f3953a4f17d3cd06",class:b("kol-nav",`kol-nav--${o}`,{"kol-nav--is-compact":this.state._hideLabel})},e("nav",{key:"6fceaf6abe991a38a3c4bb98741c9e1c5ad2f11a",class:"kol-nav__navigation","aria-label":this.state._label,id:"nav"},e(this.linkList,{key:"5ee2d35517877fad58f3c37446a88a4753a80bf5",collapsible:t,hideLabel:a,deep:0,links:this.state._links,orientation:o})),n&&e("div",{key:"d8b7bcb8d56bad5fadc02fc6362d84c597c5f0c8",class:"kol-nav__compact"},e(m,{key:"a6e055cb523095f7dfeed9edc1fd4a847973cc55",class:"kol-nav__toggle-button",_ariaControls:"nav",_ariaExpanded:!a,_icons:a?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:d(a?"kol-nav-maximize":"kol-nav-minimize"),_on:{onClick:()=>{this.state=Object.assign(Object.assign({},this.state),{_hideLabel:!1===this.state._hideLabel})}},_tooltipAlign:"right",_buttonVariant:"ghost"})))}validateCollapsible(n){u(this,n)}validateHasCompactButton(n){v(this,n)}validateHasIconsWhenExpanded(n){_(this,n)}validateHideLabel(n){s(this,n)}validateLabel(n,e,t=!1){t||c(this.state._label),r(this,n,{required:!0}),o(n),h(this.state._label)}validateLinks(n){p("KolNav",this,n),a("[KolNav] The navigation structure is not yet validated recursively."),this.initializeExpandedChildren()}validateOrientation(n){l(this,"_orientation",n=>"horizontal"===n||"vertical"===n,new Set(["Orientation {horizontal, vertical}"]),n,{defaultValue:"vertical"})}componentWillLoad(){this.validateCollapsible(this._collapsible),this.validateHideLabel(this._hideLabel),this.validateHasCompactButton(this._hasCompactButton),this.validateHasIconsWhenExpanded(this._hasIconsWhenExpanded),this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links),this.validateOrientation(this._orientation),this.initializeExpandedChildren()}disconnectedCallback(){c(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};w.style={default:k};export{w as kol_nav};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as t,h as i,H as s,g as e}from"./index-
|
4
|
+
import{r as t,h as i,H as s,g as e}from"./index-D7gsjUuJ.js";import{N as o,S as a,w as n,H as l,p as h}from"./common-8fBdMvJM.js";import{v as r}from"./custom-class-CA0KGtrM.js";import{v as p}from"./label-CdtNxOKu.js";import{v as _}from"./tooltip-align-_VI7LehI.js";import{t as c}from"./i18n-CdSCDnmA.js";import{n as u}from"./dev.utils-D4rfC2RQ.js";import{r as g,a as d}from"./unique-nav-labels-C_NhdgGz.js";import{r as f,d as b}from"./component-names-CkE54Ym7.js";import{d as m,K as v}from"./events-CoPFQEiC.js";import"./align-CyK0wp7d.js";import"./i18n-ZF6JbdVP.js";const k=(t,a,s)=>{o(t,"_max",a,s)},C={left:"codicon codicon-debug-reverse-continue"},y={left:"codicon codicon-chevron-left"},S={right:"codicon codicon-chevron-right"},x={right:"codicon codicon-debug-continue"};function z(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}const j=z(),P=new Intl.NumberFormat(j,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),B=class{constructor(s){t(this,s),this.nonce=u(),this.translatePageFirst=c("kol-page-first"),this.translatePageBack=c("kol-page-back"),this.translatePageNext=c("kol-page-next"),this.translatePageLast=c("kol-page-last"),this.translateEntriesPerSite=c("kol-entries-per-site"),this.translatePage=c("kol-page"),this.translatePagination=c("kol-pagination"),this.calcCount=(t,a=1)=>Math.ceil(t/a),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this._boundaryCount=1,this._hasButtons=!0,this._pageSize=1,this._pageSizeOptions=[],this._siblingCount=1,this._tooltipAlign="top",this.state={_boundaryCount:1,_label:this.translatePagination,_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0},this.onClick=(t,a)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,a),this.host&&m(this.host,v.click,a),this.onChangePage(t,a)},this.onChangePage=(t,a)=>{const s=setTimeout(()=>{clearTimeout(s),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,a),this.host&&m(this.host,v.changePage,a)})},this.onChangePageSize=(t,a)=>{if("number"==typeof(a=parseInt(a))&&a>0&&this._pageSize!==a){this._pageSize=a;const s=setTimeout(()=>{clearTimeout(s),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize),this.host&&m(this.host,v.changePageSize,this._pageSize)})}},this.onGoToFirst={onClick:t=>{this.onClick(t,1)}},this.onGoToEnd={onClick:t=>{this.onClick(t,this.getCount())}},this.onGoBackward={onClick:t=>{this.onClick(t,this.state._page-1)}},this.onGoForward={onClick:t=>{this.onClick(t,this.state._page+1)}},this.beforePageSize=(t,a)=>{let s=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize;const i=a.has("_pageSizeOptions")?a.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find(t=>t.value===s);s=void 0===t?i[0].value:t.value,a.set("_pageSize",s)}const e=a.has("_page")?a.get("_page"):this.state._page,o=a.has("_max")?a.get("_max"):this.state._max;this.syncPage(a,e,a.get("_pageSize"),o)},this.syncPage=(t,s,i,e)=>{if(e>0){const o=this.calcCount(e,i);o>0&&(s>o?(t.set("_page",o),this.onChangePage(a,o)):s<1&&(t.set("_page",1),this.onChangePage(a,1)))}},this.beforePageSizeOptions=(t,a)=>{const s=[];if(Array.isArray(t))for(const a of t)"number"==typeof a&&s.push({label:c("kol-page-per-site",{placeholders:{entries:`${a}`}}),value:a});a.set("_pageSizeOptions",s),this.beforePageSize(s,a)}}render(){var t;let a=!1;const e=this.getCount(),o=Array.from(Array(e).keys()).map(t=>t+1).map(t=>t<=this.state._boundaryCount||t>e-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(a=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===a?(a=!1,i("li",{key:u()},i("span",{class:"kol-pagination__separator","aria-hidden":"true"}))):null);return i(s,{class:"kol-pagination"},i("nav",{class:"kol-pagination__navigation","aria-label":this.state._label},i("ul",{class:"kol-pagination__navigation-list"},this.state._hasButtons.first&&i("li",null,i(b,{class:"kol-pagination__button kol-pagination__button--first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:C,_hideLabel:!0,_label:this.translatePageFirst,_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&i("li",null,i(b,{class:"kol-pagination__button kol-pagination__button--previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:y,_hideLabel:!0,_label:this.translatePageBack,_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),o,this.state._hasButtons.next&&i("li",null,i(b,{class:"kol-pagination__button kol-pagination__button--next",exportparts:"icon",_customClass:this.state._customClass,_disabled:e<=this.state._page,_icons:S,_hideLabel:!0,_label:this.translatePageNext,_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&i("li",null,i(b,{class:"kol-pagination__button kol-pagination__button--last",exportparts:"icon",_customClass:this.state._customClass,_disabled:e<=this.state._page,_icons:x,_hideLabel:!0,_label:this.translatePageLast,_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&i(f,{class:"kol-pagination__page-size-select",_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:this.translateEntriesPerSite,_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:this.state._pageSize}))}getUnselectedPageButton(t){return i("li",{key:u()},i(b,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:a=>{this.onClick(a,t)}}},i("span",{slot:"expert"},i("span",{class:"visually-hidden"},this.translatePage)," ",P.format(t))))}getSelectedPageButton(t){return i("li",{key:u()},i(b,{class:"kol-pagination__button kol-pagination__button--selected",_customClass:this.state._customClass,_disabled:!0,_label:""},i("span",{slot:"expert"},i("span",{class:"visually-hidden"},this.translatePage)," ",P.format(t))))}validateBoundaryCount(t){o(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){r(this,t)}validateLabel(t,a,s=!1){s||g(this.state._label),p(this,t),d(this.state._label)}validateHasButtons(t){n(this,"_hasButtons",t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t,new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,a)=>{if("boolean"==typeof t)a.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=h(t)}catch(t){a.delete("_hasButtons")}"object"==typeof t&&null!==t&&a.set("_hasButtons",Object.assign(Object.assign({},this.state._hasButtons),{first:"boolean"==typeof t.first?!0===t.first:this.state._hasButtons.first,last:"boolean"==typeof t.last?!0===t.last:this.state._hasButtons.last,next:"boolean"==typeof t.next?!0===t.next:this.state._hasButtons.next,previous:"boolean"==typeof t.previous?!0===t.previous:this.state._hasButtons.previous}))}}}})}validateOn(t){"object"==typeof t&&null!==t&&(this.state=Object.assign(Object.assign({},this.state),{_on:t}))}validatePage(t){o(this,"_page",t,{hooks:{beforePatch:(t,a)=>{const s=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize,i=a.has("_max")?a.get("_max"):this.state._max;this.syncPage(a,t,s,i)}}})}validatePageSize(t){o(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){l(this,"_pageSizeOptions",t=>"number"==typeof t,t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){o(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){k(this,t,{hooks:{beforePatch:(t,a)=>{const s=a.has("_page")?a.get("_page"):this.state._page,i=a.has("_pageSize")?a.get("_pageSize"):this.state._pageSize;this.syncPage(a,s,i,t)}}})}validateTooltipAlign(t){_(this,t)}componentWillLoad(){this.validateBoundaryCount(this._boundaryCount),this.validateCustomClass(this._customClass),this.validateHasButtons(this._hasButtons),this.validateLabel(this._label,void 0,!0),this.validateOn(this._on),this.validatePage(this._page),this.validatePageSize(this._pageSize),this.validatePageSizeOptions(this._pageSizeOptions),this.validateSiblingCount(this._siblingCount),this.validateTooltipAlign(this._tooltipAlign),this.validateMax(this._max),this.validatePage(this._page)}disconnectedCallback(){g(this.state._label)}get host(){return e(this)}static get watchers(){return{_boundaryCount:["validateBoundaryCount"],_customClass:["validateCustomClass"],_label:["validateLabel"],_hasButtons:["validateHasButtons"],_on:["validateOn"],_page:["validatePage"],_pageSize:["validatePageSize"],_pageSizeOptions:["validatePageSizeOptions"],_siblingCount:["validateSiblingCount"],_max:["validateMax"],_tooltipAlign:["validateTooltipAlign"]}}};export{B as kol_pagination_wc};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as n,h as e}from"./index-
|
4
|
+
import{r as n,h as e}from"./index-D7gsjUuJ.js";import{i as t}from"./component-names-CkE54Ym7.js";import"./common-8fBdMvJM.js";const i="@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(44rem / 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 * {\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 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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\n@layer kol-component {\n .kol-pagination {\n display: grid;\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n align-items: center;\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n display: inline-flex;\n margin: 0;\n padding: 0;\n gap: 0.5em;\n flex-wrap: wrap;\n align-items: center;\n list-style: none;\n }\n .kol-pagination__separator:before {\n content: \"•••\";\n }\n}",o=class{constructor(e){n(this,e),this._boundaryCount=1,this._hasButtons=!0,this._pageSize=1,this._pageSizeOptions=[],this._siblingCount=1,this._tooltipAlign="top"}render(){return e(t,{key:"14b17e953d67caaa9892271b9c19d40044558418",_boundaryCount:this._boundaryCount,_label:this._label,_customClass:this._customClass,_on:this._on,_hasButtons:this._hasButtons,_page:this._page,_pageSize:this._pageSize,_pageSizeOptions:this._pageSizeOptions,_siblingCount:this._siblingCount,_tooltipAlign:this._tooltipAlign,_max:this._max})}};o.style={default:i};export{o as kol_pagination};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"kol-popover-button-wc.entry.esm.js","sources":["src/schema/props/popover-align.ts","src/components/popover-button/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { validateAlignment } from '../validators';\n\nimport type { AlignPropType } from './align';\n\n/* types */\nexport type PopoverAlignPropType = AlignPropType;\n\n/**\n * Defines where to show the popover preferably: top, right, bottom or left.\n */\nexport type PropPopoverAlign = {\n\tpopoverAlign: PopoverAlignPropType;\n};\n\n/* validator */\nexport const validatePopoverAlign = (component: Generic.Element.Component, value?: PopoverAlignPropType): void => {\n\tvalidateAlignment(component, '_popoverAlign', value);\n};\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { autoUpdate } from '@floating-ui/dom';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\nimport type { PopoverButtonProps, PopoverButtonStates } from '../../schema/components/popover-button';\nimport type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tAriaDescriptionPropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelWithExpertSlotPropType,\n\tPopoverAlignPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport { validatePopoverAlign } from '../../schema';\n\n/**\n * @slot - The popover content.\n */\n@Component({\n\ttag: 'kol-popover-button-wc',\n\tshadow: false,\n})\n// class implementing PopoverButtonProps and not API because we don't want to repeat the entire state and validation for button props\nexport class KolPopoverButton implements PopoverButtonProps {\n\tprivate refButton?: HTMLKolButtonWcElement;\n\tprivate refPopover?: HTMLDivElement;\n\tprivate cleanupAutoPositioning?: () => void;\n\n\t@State() public state: PopoverButtonStates = {\n\t\t_label: '',\n\t\t_popoverAlign: 'bottom',\n\t};\n\t@State() private justClosed = false;\n\t@State() private popoverOpen = false;\n\n\t/**\n\t * Hides the popover programmatically by calling the native hidePopover method.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async hidePopover() {\n\t\tvoid this.refPopover?.hidePopover();\n\t}\n\n\t/* Regarding type issue see https://github.com/microsoft/TypeScript/issues/54864 */\n\tprivate handleBeforeToggle(event: Event) {\n\t\tif ((event as ToggleEvent).newState === 'closed') {\n\t\t\tthis.justClosed = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\t// Reset the flag after the event loop tick.\n\t\t\t\tthis.justClosed = false;\n\t\t\t}, 10); // timeout of 0 should be sufficient but doesn't work in Safari Mobile (needs further investigation).\n\t\t} else {\n\t\t\tif (this.refPopover) {\n\t\t\t\t/**\n\t\t\t\t * Avoid \"flicker\" by hiding the element until the position is set in the `toggle` event handler. `alignFloatingElements` is responsible for setting the visibility back to 'visible'.\n\t\t\t\t */\n\t\t\t\tthis.refPopover.style.visibility = 'hidden';\n\t\t\t}\n\n\t\t\tvoid this.refButton?.hideTooltip();\n\t\t}\n\t}\n\n\tprivate alignPopover() {\n\t\tif (this.refPopover && this.refButton) {\n\t\t\tvoid alignFloatingElements({\n\t\t\t\talign: this.state._popoverAlign,\n\t\t\t\tfloatingElement: this.refPopover,\n\t\t\t\treferenceElement: this.refButton,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate handleToggle(event: Event) {\n\t\tthis.popoverOpen = (event as ToggleEvent).newState === 'open';\n\n\t\tif (this.popoverOpen) {\n\t\t\tif (this.refPopover && this.refButton) {\n\t\t\t\tthis.cleanupAutoPositioning = autoUpdate(this.refButton, this.refPopover, () => {\n\t\t\t\t\tthis.alignPopover();\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t}\n\t}\n\n\tprivate handleButtonClick() {\n\t\t// If the popover was just closed by native behavior, do nothing (and let it stay closed).\n\t\tif (!this.justClosed) {\n\t\t\tthis.refPopover?.togglePopover();\n\t\t}\n\t}\n\n\tpublic componentDidRender() {\n\t\tthis.refPopover?.addEventListener('toggle', this.handleToggle.bind(this));\n\t\tthis.refPopover?.addEventListener('beforetoggle', this.handleBeforeToggle.bind(this));\n\t}\n\n\tpublic disconnectedCallback() {\n\t\tthis.refPopover?.removeEventListener('toggle', this.handleToggle.bind(this));\n\t\tthis.refPopover?.removeEventListener('beforetoggle', this.handleBeforeToggle.bind(this));\n\t\tthis.cleanupAutoPositioning?.();\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<div class=\"kol-popover-button\">\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t_aria-controls=\"popover\"\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaDescription={this._ariaDescription}\n\t\t\t\t\t_ariaExpanded={this.popoverOpen}\n\t\t\t\t\t_ariaHasPopup={'dialog'}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t\t_icons={this._icons}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_name={this._name}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_shortKey={this._shortKey}\n\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_buttonVariant={this._variant}\n\t\t\t\t\tdata-testid=\"popover-button\"\n\t\t\t\t\tclass=\"kol-popover-button__button\"\n\t\t\t\t\tref={(element) => (this.refButton = element)}\n\t\t\t\t\tonClick={this.handleButtonClick.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</KolButtonWcTag>\n\n\t\t\t\t<div ref={(element) => (this.refPopover = element)} data-testid=\"popover-content\" popover=\"auto\" id=\"popover\" class=\"kol-popover-button__popover\">\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Defines the value for the aria-description attribute.\n\t */\n\t@Prop() public _ariaDescription?: AriaDescriptionPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @internal\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines where to show the Popover preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _popoverAlign?: PopoverAlignPropType = 'bottom';\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: StencilUnknown;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@Watch('_popoverAlign')\n\tpublic validatePopoverAlign(value?: PopoverAlignPropType): void {\n\t\tvalidatePopoverAlign(this, value);\n\t}\n\n\tpublic componentWillLoad() {\n\t\tthis.validatePopoverAlign(this._popoverAlign);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;AAiBO,MAAM,oBAAoB,GAAG,CAAC,S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AAA;AACvB,QAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"kol-popover-button-wc.entry.esm.js","sources":["src/schema/props/popover-align.ts","src/components/popover-button/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { validateAlignment } from '../validators';\n\nimport type { AlignPropType } from './align';\n\n/* types */\nexport type PopoverAlignPropType = AlignPropType;\n\n/**\n * Defines where to show the popover preferably: top, right, bottom or left.\n */\nexport type PropPopoverAlign = {\n\tpopoverAlign: PopoverAlignPropType;\n};\n\n/* validator */\nexport const validatePopoverAlign = (component: Generic.Element.Component, value?: PopoverAlignPropType): void => {\n\tvalidateAlignment(component, '_popoverAlign', value);\n};\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { autoUpdate } from '@floating-ui/dom';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { alignFloatingElements } from '../../utils/align-floating-elements';\nimport type { PopoverButtonProps, PopoverButtonStates } from '../../schema/components/popover-button';\nimport type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tAriaDescriptionPropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelWithExpertSlotPropType,\n\tPopoverAlignPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport { validatePopoverAlign } from '../../schema';\n\n/**\n * @slot - The popover content.\n */\n@Component({\n\ttag: 'kol-popover-button-wc',\n\tshadow: false,\n})\n// class implementing PopoverButtonProps and not API because we don't want to repeat the entire state and validation for button props\nexport class KolPopoverButton implements PopoverButtonProps {\n\tprivate refButton?: HTMLKolButtonWcElement;\n\tprivate refPopover?: HTMLDivElement;\n\tprivate cleanupAutoPositioning?: () => void;\n\n\t@State() public state: PopoverButtonStates = {\n\t\t_label: '',\n\t\t_popoverAlign: 'bottom',\n\t};\n\t@State() private justClosed = false;\n\t@State() private popoverOpen = false;\n\n\t/**\n\t * Hides the popover programmatically by calling the native hidePopover method.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async hidePopover() {\n\t\tvoid this.refPopover?.hidePopover();\n\t}\n\n\t/* Regarding type issue see https://github.com/microsoft/TypeScript/issues/54864 */\n\tprivate handleBeforeToggle(event: Event) {\n\t\tif ((event as ToggleEvent).newState === 'closed') {\n\t\t\tthis.justClosed = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\t// Reset the flag after the event loop tick.\n\t\t\t\tthis.justClosed = false;\n\t\t\t}, 10); // timeout of 0 should be sufficient but doesn't work in Safari Mobile (needs further investigation).\n\t\t} else {\n\t\t\tif (this.refPopover) {\n\t\t\t\t/**\n\t\t\t\t * Avoid \"flicker\" by hiding the element until the position is set in the `toggle` event handler. `alignFloatingElements` is responsible for setting the visibility back to 'visible'.\n\t\t\t\t */\n\t\t\t\tthis.refPopover.style.visibility = 'hidden';\n\t\t\t}\n\n\t\t\tvoid this.refButton?.hideTooltip();\n\t\t}\n\t}\n\n\tprivate alignPopover() {\n\t\tif (this.refPopover && this.refButton) {\n\t\t\tvoid alignFloatingElements({\n\t\t\t\talign: this.state._popoverAlign,\n\t\t\t\tfloatingElement: this.refPopover,\n\t\t\t\treferenceElement: this.refButton,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate handleToggle(event: Event) {\n\t\tthis.popoverOpen = (event as ToggleEvent).newState === 'open';\n\n\t\tif (this.popoverOpen) {\n\t\t\tif (this.refPopover && this.refButton) {\n\t\t\t\tthis.cleanupAutoPositioning = autoUpdate(this.refButton, this.refPopover, () => {\n\t\t\t\t\tthis.alignPopover();\n\t\t\t\t});\n\t\t\t}\n\t\t} else if (this.cleanupAutoPositioning) {\n\t\t\tthis.cleanupAutoPositioning();\n\t\t\tthis.cleanupAutoPositioning = undefined;\n\t\t}\n\t}\n\n\tprivate handleButtonClick() {\n\t\t// If the popover was just closed by native behavior, do nothing (and let it stay closed).\n\t\tif (!this.justClosed) {\n\t\t\tthis.refPopover?.togglePopover();\n\t\t}\n\t}\n\n\tpublic componentDidRender() {\n\t\tthis.refPopover?.addEventListener('toggle', this.handleToggle.bind(this));\n\t\tthis.refPopover?.addEventListener('beforetoggle', this.handleBeforeToggle.bind(this));\n\t}\n\n\tpublic disconnectedCallback() {\n\t\tthis.refPopover?.removeEventListener('toggle', this.handleToggle.bind(this));\n\t\tthis.refPopover?.removeEventListener('beforetoggle', this.handleBeforeToggle.bind(this));\n\t\tthis.cleanupAutoPositioning?.();\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<div class=\"kol-popover-button\">\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t_aria-controls=\"popover\"\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaDescription={this._ariaDescription}\n\t\t\t\t\t_ariaExpanded={this.popoverOpen}\n\t\t\t\t\t_ariaHasPopup={'dialog'}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t\t_icons={this._icons}\n\t\t\t\t\t_id={this._id}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_name={this._name}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role={this._role}\n\t\t\t\t\t_shortKey={this._shortKey}\n\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_type={this._type}\n\t\t\t\t\t_value={this._value}\n\t\t\t\t\t_buttonVariant={this._variant}\n\t\t\t\t\tdata-testid=\"popover-button\"\n\t\t\t\t\tclass=\"kol-popover-button__button\"\n\t\t\t\t\tref={(element) => (this.refButton = element)}\n\t\t\t\t\tonClick={this.handleButtonClick.bind(this)}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</KolButtonWcTag>\n\n\t\t\t\t<div ref={(element) => (this.refPopover = element)} data-testid=\"popover-content\" popover=\"auto\" id=\"popover\" class=\"kol-popover-button__popover\">\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the key combination that can be used to trigger or focus the component’s interactive element.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Defines the value for the aria-description attribute.\n\t */\n\t@Prop() public _ariaDescription?: AriaDescriptionPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @internal\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines where to show the Popover preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _popoverAlign?: PopoverAlignPropType = 'bottom';\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Adds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: StencilUnknown;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@Watch('_popoverAlign')\n\tpublic validatePopoverAlign(value?: PopoverAlignPropType): void {\n\t\tvalidatePopoverAlign(this, value);\n\t}\n\n\tpublic componentWillLoad() {\n\t\tthis.validatePopoverAlign(this._popoverAlign);\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;AAiBO,MAAM,oBAAoB,GAAG,CAA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B,GAAA;AACvB,QAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC;;;;;;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as t,h as i}from"./index-
|
4
|
+
import{r as t,h as i}from"./index-D7gsjUuJ.js";import{a as s,b as o}from"./align-floating-elements-Bx4ukVlr.js";import{d as e}from"./component-names-CkE54Ym7.js";import"./common-8fBdMvJM.js";import{a}from"./align-CyK0wp7d.js";const l=(e,t)=>{a(e,"_popoverAlign",t)},h=class{constructor(e){t(this,e),this.state={_label:"",_popoverAlign:"bottom"},this.justClosed=!1,this.popoverOpen=!1,this._disabled=!1,this._hideLabel=!1,this._popoverAlign="bottom",this._tooltipAlign="top",this._type="button",this._variant="normal"}async hidePopover(){var e;null===(e=this.refPopover)||void 0===e||e.hidePopover()}handleBeforeToggle(e){var t;"closed"===e.newState?(this.justClosed=!0,setTimeout(()=>{this.justClosed=!1},10)):(this.refPopover&&(this.refPopover.style.visibility="hidden"),null===(t=this.refButton)||void 0===t||t.hideTooltip())}alignPopover(){this.refPopover&&this.refButton&&s({align:this.state._popoverAlign,floatingElement:this.refPopover,referenceElement:this.refButton})}handleToggle(e){this.popoverOpen="open"===e.newState,this.popoverOpen?this.refPopover&&this.refButton&&(this.cleanupAutoPositioning=o(this.refButton,this.refPopover,()=>{this.alignPopover()})):this.cleanupAutoPositioning&&(this.cleanupAutoPositioning(),this.cleanupAutoPositioning=void 0)}handleButtonClick(){var e;this.justClosed||null===(e=this.refPopover)||void 0===e||e.togglePopover()}componentDidRender(){var e,t;null===(e=this.refPopover)||void 0===e||e.addEventListener("toggle",this.handleToggle.bind(this)),null===(t=this.refPopover)||void 0===t||t.addEventListener("beforetoggle",this.handleBeforeToggle.bind(this))}disconnectedCallback(){var e,t,o;null===(e=this.refPopover)||void 0===e||e.removeEventListener("toggle",this.handleToggle.bind(this)),null===(t=this.refPopover)||void 0===t||t.removeEventListener("beforetoggle",this.handleBeforeToggle.bind(this)),null===(o=this.cleanupAutoPositioning)||void 0===o||o.call(this)}render(){return i("div",{key:"ed9bd3791a41c429effa8bba1fd4f835b26e7417",class:"kol-popover-button"},i(e,{key:"43ae7fc22399fd5d6aa526eb9c9402e877a71f3e",_accessKey:this._accessKey,"_aria-controls":"popover",_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this.popoverOpen,_ariaHasPopup:"dialog",_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel,_icons:this._icons,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:this._role,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_buttonVariant:this._variant,"data-testid":"popover-button",class:"kol-popover-button__button",ref:e=>this.refButton=e,onClick:this.handleButtonClick.bind(this)},i("slot",{key:"4e312ac4d1c7e5695d78cd48feba9b3738a540a6",name:"expert",slot:"expert"})),i("div",{key:"c5dccff4d149aa043963ed1c81ba0f2391526a18",ref:e=>this.refPopover=e,"data-testid":"popover-content",popover:"auto",id:"popover",class:"kol-popover-button__popover"},i("slot",{key:"36f4ed8c4df5e3c80d6706ea3bdc440c77b987fc"})))}validatePopoverAlign(e){l(this,e)}componentWillLoad(){this.validatePopoverAlign(this._popoverAlign)}static get watchers(){return{_popoverAlign:["validatePopoverAlign"]}}};export{h as kol_popover_button_wc};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"kol-popover-button.entry.esm.js","sources":["src/components/popover-button/style.scss?tag=kol-popover-button&mode=default&encapsulation=shadow","src/components/popover-button/shadow.tsx"],"sourcesContent":["@use '../../styles/global' as *;\n@use '../@shared/kol-button-mixin' as *;\n@use '../@shared/kol-popover-button-mixin' as *;\n@use '../tooltip/style' as *;\n\n@layer kol-component {\n\t@include kol-button-styles('kol-button');\n\t@include kol-popover-button-styles;\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop } from '@stencil/core';\nimport { KolPopoverButtonWcTag } from '../../core/component-names';\nimport type { PopoverButtonProps } from '../../schema/components/popover-button';\nimport type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tAriaDescriptionPropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelWithExpertSlotPropType,\n\tPopoverAlignPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\n/**\n * @slot - The popover content.\n */\n@Component({\n\ttag: 'kol-popover-button',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolPopoverButton implements PopoverButtonProps {\n\tprivate ref?: HTMLKolPopoverButtonWcElement;\n\n\t/**\n\t * Hides the popover programmatically by forwarding the call to the web component.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async hidePopover() {\n\t\tvoid this.ref?.hidePopover();\n\t}\n\n\tprivate catchRef = (ref?: HTMLKolPopoverButtonWcElement) => {\n\t\tthis.ref = ref;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolPopoverButtonWcTag\n\t\t\t\tref={this.catchRef}\n\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t_ariaDescription={this._ariaDescription}\n\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t_customClass={this._customClass}\n\t\t\t\t_disabled={this._disabled}\n\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t_icons={this._icons}\n\t\t\t\t_id={this._id}\n\t\t\t\t_label={this._label}\n\t\t\t\t_name={this._name}\n\t\t\t\t_on={this._on}\n\t\t\t\t_popoverAlign={this._popoverAlign}\n\t\t\t\t_shortKey={this._shortKey}\n\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t_type={this._type}\n\t\t\t\t_value={this._value}\n\t\t\t\t_variant={this._variant}\n\t\t\t>\n\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t<slot />\n\t\t\t</KolPopoverButtonWcTag>\n\t\t);\n\t}\n\n\t/**\n\t * Defines
|
1
|
+
{"version":3,"file":"kol-popover-button.entry.esm.js","sources":["src/components/popover-button/style.scss?tag=kol-popover-button&mode=default&encapsulation=shadow","src/components/popover-button/shadow.tsx"],"sourcesContent":["@use '../../styles/global' as *;\n@use '../@shared/kol-button-mixin' as *;\n@use '../@shared/kol-popover-button-mixin' as *;\n@use '../tooltip/style' as *;\n\n@layer kol-component {\n\t@include kol-button-styles('kol-button');\n\t@include kol-popover-button-styles;\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop } from '@stencil/core';\nimport { KolPopoverButtonWcTag } from '../../core/component-names';\nimport type { PopoverButtonProps } from '../../schema/components/popover-button';\nimport type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tAriaDescriptionPropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelWithExpertSlotPropType,\n\tPopoverAlignPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\n/**\n * @slot - The popover content.\n */\n@Component({\n\ttag: 'kol-popover-button',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolPopoverButton implements PopoverButtonProps {\n\tprivate ref?: HTMLKolPopoverButtonWcElement;\n\n\t/**\n\t * Hides the popover programmatically by forwarding the call to the web component.\n\t */\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async hidePopover() {\n\t\tvoid this.ref?.hidePopover();\n\t}\n\n\tprivate catchRef = (ref?: HTMLKolPopoverButtonWcElement) => {\n\t\tthis.ref = ref;\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolPopoverButtonWcTag\n\t\t\t\tref={this.catchRef}\n\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t_ariaDescription={this._ariaDescription}\n\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t_customClass={this._customClass}\n\t\t\t\t_disabled={this._disabled}\n\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t_icons={this._icons}\n\t\t\t\t_id={this._id}\n\t\t\t\t_label={this._label}\n\t\t\t\t_name={this._name}\n\t\t\t\t_on={this._on}\n\t\t\t\t_popoverAlign={this._popoverAlign}\n\t\t\t\t_shortKey={this._shortKey}\n\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t_type={this._type}\n\t\t\t\t_value={this._value}\n\t\t\t\t_variant={this._variant}\n\t\t\t>\n\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t<slot />\n\t\t\t</KolPopoverButtonWcTag>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the key combination that can be used to trigger or focus the component’s interactive element.\n\t */\n\t@Prop() public _accessKey?: AccessKeyPropType;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Defines the value for the aria-description attribute.\n\t */\n\t@Prop() public _ariaDescription?: AriaDescriptionPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t * @deprecated Will be removed in the next major version.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines where to show the Popover preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _popoverAlign?: PopoverAlignPropType = 'bottom';\n\n\t/**\n\t * Defines the role of the components primary element.\n\t *\n\t * @deprecated We prefer the semantic role of the HTML element and do not allow for customization. We will remove this prop in the future.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\n\n\t/**\n\t * Adds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: StencilUnknown;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n}\n"],"names":[],"mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,+lNAA+lN;;MC+B1mN,gBAAgB,GAAA,MAAA;AAP7B,IAAA,WAAA,CAAA,OAAA,EAAA;;AAmBS,QAAA,IAAA,CAAA,QAAQ,GAAG,CAAC,GAAmC,KAAI;AAC1D,YAAA,IAAI,CAAC,GAAG,GAAG,GAAG;AACf,SAAC;AA6Dc,QAAA,IAAS,CAAA,SAAA,GAAa,KAAK;AAO3B,QAAA,IAAU,CAAA,UAAA,GAAa,KAAK;AA+B5B,QAAA,IAAa,CAAA,aAAA,GAA0B,QAAQ;AA4B/C,QAAA,IAAa,CAAA,aAAA,GAA0B,KAAK;AAK5C,QAAA,IAAK,CAAA,KAAA,GAAwB,QAAQ;AAUrC,QAAA,IAAQ,CAAA,QAAA,GAA2B,QAAQ;AAC1D;AArJO,IAAA,MAAM,WAAW,GAAA;;AACvB,QAAA,MAAK,MAAA,IAAI,CAAC,GAAG,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,WAAW,EAAE,CAAA;;IAOtB,MAAM,GAAA;AACZ,QAAA,QACC,CAAA,CAAC,qBAAqB,EAAA,EAAA,GAAA,EAAA,0CAAA,EACrB,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,EAEvB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAQ,CAAA,EACzC,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACe;;;;;;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as n,h as e}from"./index-
|
4
|
+
import{r as n,h as e}from"./index-D7gsjUuJ.js";import{j as t}from"./component-names-CkE54Ym7.js";import"./common-8fBdMvJM.js";const o="@charset \"UTF-8\";\n/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / 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 * {\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 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(16rem / 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: grid;\n place-items: 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 place-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 @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\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);\n max-width: 90vw;\n max-height: 90vh;\n visibility: hidden;\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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(10rem / var(--kolibri-root-font-size, 16));\n height: calc(10rem / 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}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-button {\n display: inline-flex;\n place-items: center;\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n text-align: center;\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 margin: auto;\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}",i=class{constructor(e){n(this,e),this.catchRef=n=>{this.ref=n},this._disabled=!1,this._hideLabel=!1,this._popoverAlign="bottom",this._tooltipAlign="top",this._type="button",this._variant="normal"}async hidePopover(){var n;null===(n=this.ref)||void 0===n||n.hidePopover()}render(){return e(t,{key:"874bfd4d3738aee7db007df7f1f072a312bda82b",ref:this.catchRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_hideLabel:this._hideLabel,_icons:this._icons,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_popoverAlign:this._popoverAlign,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},e("slot",{key:"3e3353a2aa09a4ab53145811a9baaf69c6eb5fe7",name:"expert",slot:"expert"}),e("slot",{key:"ae349ddc431b20ba527dac3c30edf1ba9e61cb2d"}))}};i.style={default:o};export{i as kol_popover_button};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as s,h as i,H as t}from"./index-
|
4
|
+
import{r as s,h as i,H as t}from"./index-D7gsjUuJ.js";import{w as o,A as e}from"./common-8fBdMvJM.js";import{v as a}from"./align-CyK0wp7d.js";import{v as l}from"./show-DsV_Vx8g.js";import{a as h}from"./align-floating-elements-Bx4ukVlr.js";import{c as r}from"./clsx-eK3rPvPS.js";import{d as n,K as c}from"./events-CoPFQEiC.js";const v=(e,t)=>{o(e,"_on",e=>"object"==typeof e&&null!==e,new Set(["PopoverCallbacksPropType {Events.onClose}"]),t)},d=class{constructor(e){s(this,e),this.hidePopoverByEscape=e=>{"Escape"===e.key&&this.hidePopover(e)},this.hidePopoverByClickOutside=e=>{this.host&&!this.host.contains(e.target)&&this.hidePopover(e)},this.catchHostAndTriggerElement=e=>{e&&(this.host=e,this.triggerElement=e.previousElementSibling)},this.catchPopoverElement=e=>{this.popoverElement=e},this.catchArrowElement=e=>{this.arrowElement=e},this._align="top",this._show=!1,this.state={_align:"top",_on:{},_show:!1,_visible:!1}}async showPopover(){this.addListenersToBody(),this.triggerElement&&this.popoverElement&&(await h({align:this._align,referenceElement:this.triggerElement,arrowElement:this.arrowElement,floatingElement:this.popoverElement}),this.state=Object.assign(Object.assign({},this.state),{_visible:!0}))}hidePopover(e){var t,s,o;this.state=Object.assign(Object.assign({},this.state),{_visible:!1}),this._show=!1,null===(t=this.triggerElement)||void 0===t||t.focus(),this.removeListenersToBody(),null===(o=null===(s=this.state._on)||void 0===s?void 0:s.onClose)||void 0===o||o.call(s,e),this.host&&n(this.host,c.close)}addListenersToBody(){var t;const s=e().body;s.addEventListener("keyup",this.hidePopoverByEscape),s.addEventListener("click",this.hidePopoverByClickOutside),null===(t=document.scrollingElement)||void 0===t||t.addEventListener("scroll",()=>{this.showPopover()},{passive:!0})}removeListenersToBody(){var t;const s=e().body;s.removeEventListener("keyup",this.hidePopoverByEscape),s.removeEventListener("click",this.hidePopoverByClickOutside),null===(t=document.scrollingElement)||void 0===t||t.removeEventListener("scroll",()=>{this.showPopover()})}render(){return i(t,{key:"53179ace5c0dfabbe1dd00ba8ddfe453ef55ccd5",ref:this.catchHostAndTriggerElement,class:"kol-popover"},i("div",{key:"f42aafe81aaa0a09526b4e9923a96133ee81c5d2",class:r("kol-popover__content",{"kol-popover__content--visible":this.state._visible}),ref:this.catchPopoverElement,hidden:!this.state._show},i("div",{key:"25719436c820c214a2e3c0fac47449f842c4f68c",class:r("kol-popover__arrow",`kol-popover__arrow--${this.state._align}`),ref:this.catchArrowElement}),i("slot",{key:"fff04758761fb36389c6698b17730b604981ca66"})))}validateAlign(e){a(this,e)}validateOn(e){v(this,e)}validateShow(e){l(this,e),e&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}}};export{d as kol_popover_wc};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as e,h as n}from"./index-DOWoBMgb.js";import{e as t,w as r,N as s}from"./common-8fBdMvJM.js";import{v as o}from"./label-CdtNxOKu.js";const i=(e,n)=>{t(e,"_unit",n)},l=["bar","cycle"],a=e=>"string"==typeof e&&l.includes(e),c=(e,n)=>{r(e,"_variant",a,new Set(l),n)},d="/* 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(44rem / 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 * {\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 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(16rem / 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: grid;\n place-items: 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 place-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-progress__bar {\n display: grid;\n column-gap: 0.05rem;\n align-items: center;\n grid-template-areas: \"LABEL LABEL LABEL\" \"BAR VALUE UNIT\";\n grid-template-columns: 1fr auto;\n }\n .kol-progress__bar-label {\n grid-column-end: 2;\n grid-area: LABEL;\n }\n .kol-progress__bar svg {\n grid-area: BAR;\n }\n .kol-progress__bar-value {\n grid-area: VALUE;\n text-align: right;\n }\n .kol-progress__bar-unit {\n grid-area: UNIT;\n }\n .kol-progress__bar-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__bar-background {\n fill: lightgray;\n stroke: white;\n }\n .kol-progress__bar-progress {\n fill: #0075ff;\n stroke: transparent;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__bar-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n .kol-progress__cycle {\n display: grid;\n align-content: center;\n justify-items: center;\n grid-template-areas: \"ALL\";\n grid-template-columns: auto;\n }\n .kol-progress__cycle > * {\n grid-area: ALL;\n }\n .kol-progress__cycle-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: x-small;\n text-align: center;\n }\n .kol-progress__cycle-text * {\n background-color: white;\n }\n .kol-progress__cycle-background {\n fill: transparent;\n stroke: lightgray;\n }\n .kol-progress__cycle-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__cycle-whitespace {\n fill: transparent;\n stroke: white;\n }\n .kol-progress__cycle-progress {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n fill: transparent;\n stroke: #0075ff;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__cycle-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n}",h=({state:e})=>n("svg",{width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},n("circle",{class:"kol-progress__cycle-background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),n("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),n("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),n("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),n("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),n("circle",{class:"kol-progress__cycle-progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"})),p=({state:e})=>{const t=e._value/e._max*100;return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},n("rect",{class:"kol-progress__bar-background",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100%"}),n("rect",{class:"kol-progress__bar-border",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100%"}),n("rect",{class:"kol-progress__bar-progress",x:"3",y:"3",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${t}% - 4px)`}}))},b=e=>{switch(e._variant){case"cycle":return n(h,{state:e});case"bar":return n(p,{state:e});default:throw new Error(`Progress variant ${e._variant} not implemented.`)}},u=class{constructor(n){e(this,n),this._unit="%",this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){const e="%"===this.state._unit,t=e?`${Math.round(this.state._liveValue/this.state._max*100)}`:this.state._liveValue,r=e?Math.round(this.state._value/this.state._max*100):this.state._value;return n("div",{key:"30c2914505a2921a767ffb7b9e8e120bf2c0f371",class:"kol-progress"},n("div",{key:"b78153292354cb734b5ce72cb024b7b05ff65ecb","aria-hidden":"true",class:{"kol-progress__cycle":"cycle"===this.state._variant,"kol-progress__bar":"bar"===this.state._variant}},"bar"===this.state._variant&&this.state._label&&n("div",{key:"d19dd3020c5e756eee36d11ed3f108d74ae2ad3b",class:"kol-progress__bar-label"},this.state._label),b(this.state),"cycle"===this.state._variant&&n("div",{key:"412a00560e3d04e9eaba630bc18b1b0911a1739e",class:"kol-progress__cycle-text"},this.state._label&&n("div",{key:"6c95c1357dfbfb5e9659081753c19c977ec1d307",class:"kol-progress__cycle-label"},this.state._label),n("div",{key:"654bb1038ac1202cec59740dcfb781a83e7f3b0e",class:"kol-progress__cycle-value"},`${r} ${this.state._unit}`)),"bar"===this.state._variant&&n("div",{key:"79f03f81f500e7806c470f7e862e84d923ca019a",class:"kol-progress__bar-value",style:{width:`${`${(e?100:this.state._max)+1}`.length}ch`}},r),"bar"===this.state._variant&&n("div",{key:"91e7c2d27ad4734119d125b7839d8c64ac67b089",class:"kol-progress__bar-unit"},this.state._unit)),n("progress",{key:"036f25010c9d5581020aa33c8dd2c2e562a421be",class:"visually-hidden","aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),n("span",{key:"9704c069d644b44000003e1147395f930e634dd7","aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},e?`${t} %`:`${t} von ${this.state._max} ${this.state._unit}`))}validateLabel(e){o(this,e)}validateMax(e){"number"!=typeof e&&(e=100),s(this,"_max",e,{required:!0})}validateUnit(e){i(this,e)}validateValue(e){"number"!=typeof e&&(e=0),s(this,"_value",e,{required:!0})}validateVariant(e){c(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}),this.interval=setInterval(()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))},5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}}};u.style={default:d};export{u as kol_progress};
|
4
|
+
import{r as e,h as n}from"./index-D7gsjUuJ.js";import{e as t,w as r,N as s}from"./common-8fBdMvJM.js";import{v as o}from"./label-CdtNxOKu.js";const i=(e,n)=>{t(e,"_unit",n)},l=["bar","cycle"],a=e=>"string"==typeof e&&l.includes(e),c=(e,n)=>{r(e,"_variant",a,new Set(l),n)},d="/* 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(44rem / 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 * {\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 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(16rem / 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: grid;\n place-items: 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 place-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-progress__bar {\n display: grid;\n column-gap: 0.05rem;\n align-items: center;\n grid-template-areas: \"LABEL LABEL LABEL\" \"BAR VALUE UNIT\";\n grid-template-columns: 1fr auto;\n }\n .kol-progress__bar-label {\n grid-column-end: 2;\n grid-area: LABEL;\n }\n .kol-progress__bar svg {\n grid-area: BAR;\n }\n .kol-progress__bar-value {\n grid-area: VALUE;\n text-align: right;\n }\n .kol-progress__bar-unit {\n grid-area: UNIT;\n }\n .kol-progress__bar-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__bar-background {\n fill: lightgray;\n stroke: white;\n }\n .kol-progress__bar-progress {\n fill: #0075ff;\n stroke: transparent;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__bar-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n .kol-progress__cycle {\n display: grid;\n align-content: center;\n justify-items: center;\n grid-template-areas: \"ALL\";\n grid-template-columns: auto;\n }\n .kol-progress__cycle > * {\n grid-area: ALL;\n }\n .kol-progress__cycle-text {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: x-small;\n text-align: center;\n }\n .kol-progress__cycle-text * {\n background-color: white;\n }\n .kol-progress__cycle-background {\n fill: transparent;\n stroke: lightgray;\n }\n .kol-progress__cycle-border {\n fill: transparent;\n stroke: black;\n }\n .kol-progress__cycle-whitespace {\n fill: transparent;\n stroke: white;\n }\n .kol-progress__cycle-progress {\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n fill: transparent;\n stroke: #0075ff;\n }\n @media (prefers-reduced-motion: no-preference) {\n .kol-progress__cycle-progress {\n transition: 250ms ease-in-out 50ms;\n }\n }\n}",h=({state:e})=>n("svg",{width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},n("circle",{class:"kol-progress__cycle-background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),n("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),n("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),n("circle",{class:"kol-progress__cycle-whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),n("circle",{class:"kol-progress__cycle-border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),n("circle",{class:"kol-progress__cycle-progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(e._value/e._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"})),p=({state:e})=>{const t=e._value/e._max*100;return n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"12",overflow:"visible"},n("rect",{class:"kol-progress__bar-background",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100%"}),n("rect",{class:"kol-progress__bar-border",x:"1",y:"1",height:"11",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100%"}),n("rect",{class:"kol-progress__bar-progress",x:"3",y:"3",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",style:{width:`calc(${t}% - 4px)`}}))},b=e=>{switch(e._variant){case"cycle":return n(h,{state:e});case"bar":return n(p,{state:e});default:throw new Error(`Progress variant ${e._variant} not implemented.`)}},u=class{constructor(n){e(this,n),this._unit="%",this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){const e="%"===this.state._unit,t=e?`${Math.round(this.state._liveValue/this.state._max*100)}`:this.state._liveValue,r=e?Math.round(this.state._value/this.state._max*100):this.state._value;return n("div",{key:"30c2914505a2921a767ffb7b9e8e120bf2c0f371",class:"kol-progress"},n("div",{key:"b78153292354cb734b5ce72cb024b7b05ff65ecb","aria-hidden":"true",class:{"kol-progress__cycle":"cycle"===this.state._variant,"kol-progress__bar":"bar"===this.state._variant}},"bar"===this.state._variant&&this.state._label&&n("div",{key:"d19dd3020c5e756eee36d11ed3f108d74ae2ad3b",class:"kol-progress__bar-label"},this.state._label),b(this.state),"cycle"===this.state._variant&&n("div",{key:"412a00560e3d04e9eaba630bc18b1b0911a1739e",class:"kol-progress__cycle-text"},this.state._label&&n("div",{key:"6c95c1357dfbfb5e9659081753c19c977ec1d307",class:"kol-progress__cycle-label"},this.state._label),n("div",{key:"654bb1038ac1202cec59740dcfb781a83e7f3b0e",class:"kol-progress__cycle-value"},`${r} ${this.state._unit}`)),"bar"===this.state._variant&&n("div",{key:"79f03f81f500e7806c470f7e862e84d923ca019a",class:"kol-progress__bar-value",style:{width:`${`${(e?100:this.state._max)+1}`.length}ch`}},r),"bar"===this.state._variant&&n("div",{key:"91e7c2d27ad4734119d125b7839d8c64ac67b089",class:"kol-progress__bar-unit"},this.state._unit)),n("progress",{key:"036f25010c9d5581020aa33c8dd2c2e562a421be",class:"visually-hidden","aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),n("span",{key:"9704c069d644b44000003e1147395f930e634dd7","aria-live":"polite","aria-relevant":"removals text",class:"visually-hidden"},e?`${t} %`:`${t} von ${this.state._max} ${this.state._unit}`))}validateLabel(e){o(this,e)}validateMax(e){"number"!=typeof e&&(e=100),s(this,"_max",e,{required:!0})}validateUnit(e){i(this,e)}validateValue(e){"number"!=typeof e&&(e=0),s(this,"_value",e,{required:!0})}validateVariant(e){c(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}),this.interval=setInterval(()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))},5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}}};u.style={default:d};export{u as kol_progress};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as n,h as e}from"./index-
|
4
|
+
import{r as n,h as e}from"./index-D7gsjUuJ.js";import{e as t,w as i}from"./common-8fBdMvJM.js";import{s as o}from"./reuse-CX4AQDkS.js";import{v as a}from"./label-CdtNxOKu.js";import{k as l}from"./component-names-CkE54Ym7.js";import{c as s}from"./clsx-eK3rPvPS.js";const r=(e,n)=>{t(e,"_quote",n,{required:!0})},d=["block","inline"],h=e=>"string"==typeof e&&d.includes(e),c=(e,n)=>{i(e,"_variant",h,new Set(d),n)},u="@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(44rem / 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 * {\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 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(16rem / 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: grid;\n place-items: 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 place-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-quote {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__cite::before {\n content: \"—\";\n }\n .kol-quote--block .kol-quote__cite::before {\n padding-right: 0.5em;\n }\n .kol-quote--inline .kol-quote__cite::before {\n padding: 0.5em;\n }\n .kol-quote--block .kol-quote__figcaption {\n display: inline;\n margin: 0;\n padding: 0;\n }\n .kol-quote__blockquote::before {\n content: open-quote;\n }\n .kol-quote__blockquote::after {\n content: close-quote;\n }\n}",p=class{constructor(e){n(this,e),this._variant="inline",this.state={_href:"",_quote:"",_variant:"inline"}}validateLabel(e){a(this,e)}validateHref(e){t(this,"_href",e,{required:!0})}validateQuote(e){r(this,e)}validateVariant(e){c(this,e)}componentWillLoad(){this.validateHref(this._href),this.validateLabel(this._label),this.validateQuote(this._quote),this.validateVariant(this._variant)}render(){const n=o(this.state._quote);return e("figure",{key:"3577d4eb15e4d4fb90bb23b73b070b84af133407",class:s("kol-quote",`kol-quote--${this.state._variant}`)},"block"===this.state._variant?e("blockquote",{class:"kol-quote__blockquote",cite:this.state._href},this.state._quote,e("span",{"aria-hidden":n?void 0:"true",hidden:!n},e("slot",{name:"expert"}))):e("q",{class:"kol-quote__quote",cite:this.state._href},this.state._quote,e("span",{"aria-hidden":n?void 0:"true",hidden:!n},e("slot",{name:"expert"}))),"string"==typeof this.state._label&&this.state._label.length>0&&e("figcaption",{key:"1b5f3dd6c8b687afdc02679fb0d4a2ec978c2adf",class:"kol-quote__figcaption"},e("cite",{key:"bfe86e4a9b0e10a45973d76f68c699771f59b4be",class:"kol-quote__cite"},e(l,{key:"146d5d83a83a8b8a5688be828a605c65c0d703dd",_href:this.state._href,_label:this.state._label,_target:"_blank"}))))}static get watchers(){return{_label:["validateLabel"],_href:["validateHref"],_quote:["validateQuote"],_variant:["validateVariant"]}}};p.style={default:u};export{p as kol_quote};
|