@public-ui/components 3.0.1 → 3.0.2-6ae0104cda0b7b19a5b0d6bbc5f990b9fe544fa0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -8
- package/custom-elements.json +72 -1
- package/dist/cjs/Alert-5ca7c116.js +4 -0
- package/dist/cjs/Alert-5ca7c116.js.map +1 -0
- package/dist/cjs/{Collapsible-5aa541cb.js → Collapsible-2225015b.js} +1 -1
- package/dist/cjs/{Collapsible-5aa541cb.js.map → Collapsible-2225015b.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-421dca3c.js → CustomSuggestionsOptionsGroup-fd532c80.js} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-421dca3c.js.map → CustomSuggestionsOptionsGroup-fd532c80.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-18976ee0.js → FieldControlStateWrapper-736434ca.js} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-18976ee0.js.map → FieldControlStateWrapper-736434ca.js.map} +1 -1
- package/dist/cjs/{Heading-90ce384c.js → Heading-6bf1ffac.js} +1 -1
- package/dist/cjs/{Heading-90ce384c.js.map → Heading-6bf1ffac.js.map} +1 -1
- package/dist/cjs/Icon-0537cd28.js +4 -0
- package/dist/cjs/{Icon-add098ba.js.map → Icon-0537cd28.js.map} +1 -1
- package/dist/cjs/{Input-4af8f547.js → Input-b7b2e83b.js} +1 -1
- package/dist/cjs/{Input-4af8f547.js.map → Input-b7b2e83b.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-587d58dd.js → InputStateWrapper-5c622a6d.js} +1 -1
- package/dist/cjs/{InputStateWrapper-587d58dd.js.map → InputStateWrapper-5c622a6d.js.map} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-63e8b102.js → InternalUnderlinedBadgeText-a54799ae.js} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-63e8b102.js.map → InternalUnderlinedBadgeText-a54799ae.js.map} +1 -1
- package/dist/cjs/{Span-cd26b541.js → Span-c9f5cc1a.js} +1 -1
- package/dist/cjs/{Span-cd26b541.js.map → Span-c9f5cc1a.js.map} +1 -1
- package/dist/cjs/{app-globals-81f95eac.js → app-globals-171737a2.js} +1 -1
- package/dist/cjs/{app-globals-81f95eac.js.map → app-globals-171737a2.js.map} +1 -1
- package/dist/cjs/{associated.controller-03ae298d.js → associated.controller-103272e2.js} +1 -1
- package/dist/cjs/{associated.controller-03ae298d.js.map → associated.controller-103272e2.js.map} +1 -1
- package/dist/cjs/{bootstrap-e11bb4f7.js → bootstrap-a35cdb5f.js} +1 -1
- package/dist/cjs/{bootstrap-e11bb4f7.js.map → bootstrap-a35cdb5f.js.map} +1 -1
- package/dist/cjs/component-names-f5f2ca3a.js +4 -0
- package/dist/cjs/component-names-f5f2ca3a.js.map +1 -0
- package/dist/cjs/{controller-ead08764.js → controller-1ead3829.js} +1 -1
- package/dist/cjs/{controller-ead08764.js.map → controller-1ead3829.js.map} +1 -1
- package/dist/cjs/{controller-61f2f5b4.js → controller-57e0e326.js} +1 -1
- package/dist/cjs/{controller-61f2f5b4.js.map → controller-57e0e326.js.map} +1 -1
- package/dist/cjs/{controller-cb68b652.js → controller-b85b16a2.js} +1 -1
- package/dist/cjs/{controller-cb68b652.js.map → controller-b85b16a2.js.map} +1 -1
- package/dist/cjs/{controller-b2da8abe.js → controller-c6c3ab7a.js} +1 -1
- package/dist/cjs/{controller-b2da8abe.js.map → controller-c6c3ab7a.js.map} +1 -1
- package/dist/cjs/{controller-icon-429a5f31.js → controller-icon-cbcacd17.js} +1 -1
- package/dist/cjs/{controller-icon-429a5f31.js.map → controller-icon-cbcacd17.js.map} +1 -1
- package/dist/cjs/{dev.utils-6759aaf5.js → dev.utils-bfd07ca6.js} +1 -1
- package/dist/cjs/{dev.utils-6759aaf5.js.map → dev.utils-bfd07ca6.js.map} +1 -1
- package/dist/cjs/{devtools-3485dda6.js → devtools-c3023af8.js} +1 -1
- package/dist/cjs/{devtools-3485dda6.js.map → devtools-c3023af8.js.map} +1 -1
- package/dist/cjs/{getRenderStates-8372d842.js → getRenderStates-f985f2e4.js} +1 -1
- package/dist/cjs/{getRenderStates-8372d842.js.map → getRenderStates-f985f2e4.js.map} +1 -1
- package/dist/cjs/index-ae732dfd.js +4 -0
- package/dist/cjs/index-ae732dfd.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-card-wc.cjs.entry.js +4 -0
- package/dist/cjs/kol-card-wc.cjs.entry.js.map +1 -0
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-single-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.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-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-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/Alert.js +1 -1
- package/dist/components/Alert.js.map +1 -1
- package/dist/components/component-names.js +1 -1
- package/dist/components/component-names.js.map +1 -1
- package/dist/components/kol-alert-wc.js +1 -1
- package/dist/components/kol-alert-wc.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-card-wc.d.ts +11 -0
- package/dist/components/kol-card-wc.js +4 -0
- package/dist/components/kol-card-wc.js.map +1 -0
- package/dist/components/kol-card.js +1 -1
- package/dist/components/kol-card.js.map +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-drawer.js +1 -1
- package/dist/components/kol-drawer.js.map +1 -1
- package/dist/components/kol-form.js +1 -1
- package/dist/components/kol-heading.js +1 -1
- package/dist/components/kol-icon.js +1 -1
- package/dist/components/kol-icon.js.map +1 -1
- package/dist/components/kol-image.js +1 -1
- package/dist/components/kol-image.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-radio.js +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link-wc.js +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-pagination.js +1 -1
- package/dist/components/kol-popover-button-wc.js +1 -1
- package/dist/components/kol-popover-button-wc.js.map +1 -1
- package/dist/components/kol-popover-button.js +1 -1
- package/dist/components/kol-popover-wc.js +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-quote.js +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-single-select.js +1 -1
- package/dist/components/kol-skip-nav.js +1 -1
- package/dist/components/kol-spin.js +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-split-button.js.map +1 -1
- package/dist/components/kol-table-settings-wc.js +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateless-wc.js +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toolbar.js +1 -1
- package/dist/components/kol-tooltip-wc.js +1 -1
- package/dist/components/kol-tooltip-wc.js.map +1 -1
- package/dist/components/kol-tree-item-wc.js +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/components/kol-tree-wc.js +1 -1
- package/dist/components/kol-tree.js +1 -1
- package/dist/components/kol-version.js +1 -1
- package/dist/esm/Alert-c6ac1427.js +4 -0
- package/dist/esm/Alert-c6ac1427.js.map +1 -0
- package/dist/esm/{Collapsible-af548d40.js → Collapsible-7be44a00.js} +1 -1
- package/dist/esm/{Collapsible-af548d40.js.map → Collapsible-7be44a00.js.map} +1 -1
- package/dist/esm/CustomSuggestionsOptionsGroup-cdea277e.js +4 -0
- package/dist/esm/{CustomSuggestionsOptionsGroup-dcff90e4.js.map → CustomSuggestionsOptionsGroup-cdea277e.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-7dba1400.js → FieldControlStateWrapper-6c17f96e.js} +1 -1
- package/dist/esm/{FieldControlStateWrapper-7dba1400.js.map → FieldControlStateWrapper-6c17f96e.js.map} +1 -1
- package/dist/esm/{Heading-733c8dda.js → Heading-31a470a8.js} +1 -1
- package/dist/esm/{Heading-733c8dda.js.map → Heading-31a470a8.js.map} +1 -1
- package/dist/esm/Icon-e36657fc.js +4 -0
- package/dist/esm/{Icon-446dff9e.js.map → Icon-e36657fc.js.map} +1 -1
- package/dist/esm/{Input-8502a991.js → Input-b352cf7a.js} +1 -1
- package/dist/esm/{Input-8502a991.js.map → Input-b352cf7a.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-9b8419a8.js → InputStateWrapper-38536b7a.js} +1 -1
- package/dist/esm/{InputStateWrapper-9b8419a8.js.map → InputStateWrapper-38536b7a.js.map} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-781ef373.js → InternalUnderlinedBadgeText-b1330190.js} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-781ef373.js.map → InternalUnderlinedBadgeText-b1330190.js.map} +1 -1
- package/dist/esm/{Span-d15a3ea1.js → Span-88b22574.js} +1 -1
- package/dist/esm/{Span-d15a3ea1.js.map → Span-88b22574.js.map} +1 -1
- package/dist/esm/{app-globals-081a982f.js → app-globals-f7121568.js} +1 -1
- package/dist/esm/{app-globals-081a982f.js.map → app-globals-f7121568.js.map} +1 -1
- package/dist/esm/{associated.controller-92af2554.js → associated.controller-22684481.js} +1 -1
- package/dist/esm/{associated.controller-92af2554.js.map → associated.controller-22684481.js.map} +1 -1
- package/dist/esm/{bootstrap-93c7a706.js → bootstrap-dcdb1765.js} +1 -1
- package/dist/esm/{bootstrap-93c7a706.js.map → bootstrap-dcdb1765.js.map} +1 -1
- package/dist/esm/component-names-553d8bfa.js +4 -0
- package/dist/esm/component-names-553d8bfa.js.map +1 -0
- package/dist/esm/{controller-f5a335ce.js → controller-7a002c8f.js} +1 -1
- package/dist/esm/{controller-f5a335ce.js.map → controller-7a002c8f.js.map} +1 -1
- package/dist/esm/{controller-ce246aad.js → controller-8b5dbe81.js} +1 -1
- package/dist/esm/{controller-ce246aad.js.map → controller-8b5dbe81.js.map} +1 -1
- package/dist/esm/{controller-912bda08.js → controller-ac40e13c.js} +1 -1
- package/dist/esm/{controller-912bda08.js.map → controller-ac40e13c.js.map} +1 -1
- package/dist/esm/{controller-91a4c3ba.js → controller-cf01f031.js} +1 -1
- package/dist/esm/{controller-91a4c3ba.js.map → controller-cf01f031.js.map} +1 -1
- package/dist/esm/{controller-icon-de12de48.js → controller-icon-0d71a8a2.js} +1 -1
- package/dist/esm/{controller-icon-de12de48.js.map → controller-icon-0d71a8a2.js.map} +1 -1
- package/dist/esm/{dev.utils-cb61837d.js → dev.utils-ffecab2f.js} +1 -1
- package/dist/esm/{dev.utils-cb61837d.js.map → dev.utils-ffecab2f.js.map} +1 -1
- package/dist/esm/{devtools-90d0e710.js → devtools-a4e8658c.js} +1 -1
- package/dist/esm/{devtools-90d0e710.js.map → devtools-a4e8658c.js.map} +1 -1
- package/dist/esm/{getRenderStates-c4b5c6cb.js → getRenderStates-c4bde254.js} +1 -1
- package/dist/esm/{getRenderStates-c4b5c6cb.js.map → getRenderStates-c4bde254.js.map} +1 -1
- package/dist/esm/index-02bdb302.js +4 -0
- package/dist/esm/index-02bdb302.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js.map +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-wc.entry.js +1 -1
- package/dist/esm/kol-button-wc.entry.js.map +1 -1
- package/dist/esm/kol-button.entry.js +1 -1
- package/dist/esm/kol-card-wc.entry.js +4 -0
- package/dist/esm/kol-card-wc.entry.js.map +1 -0
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-card.entry.js.map +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-drawer.entry.js +1 -1
- package/dist/esm/kol-drawer.entry.js.map +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js.map +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-image.entry.js.map +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-popover-button-wc.entry.js +1 -1
- package/dist/esm/kol-popover-button-wc.entry.js.map +1 -1
- package/dist/esm/kol-popover-button.entry.js +1 -1
- package/dist/esm/kol-popover-wc.entry.js +1 -1
- package/dist/esm/kol-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-single-select.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-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-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-toast-container.entry.js +1 -1
- package/dist/esm/kol-toolbar.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js.map +1 -1
- package/dist/esm/kol-tree-item-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item.entry.js +1 -1
- package/dist/esm/kol-tree-wc.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/Alert-c6ac1427.js +4 -0
- package/dist/kolibri/Alert-c6ac1427.js.map +1 -0
- package/dist/kolibri/{Collapsible-af548d40.js → Collapsible-7be44a00.js} +1 -1
- package/dist/kolibri/{CustomSuggestionsOptionsGroup-dcff90e4.js → CustomSuggestionsOptionsGroup-cdea277e.js} +1 -1
- package/dist/kolibri/{FieldControlStateWrapper-7dba1400.js → FieldControlStateWrapper-6c17f96e.js} +1 -1
- package/dist/kolibri/{Heading-733c8dda.js → Heading-31a470a8.js} +1 -1
- package/dist/kolibri/Icon-e36657fc.js +4 -0
- package/dist/kolibri/{Input-8502a991.js → Input-b352cf7a.js} +1 -1
- package/dist/kolibri/{InputStateWrapper-9b8419a8.js → InputStateWrapper-38536b7a.js} +1 -1
- package/dist/kolibri/InternalUnderlinedBadgeText-b1330190.js +4 -0
- package/dist/kolibri/Span-88b22574.js +4 -0
- package/dist/kolibri/app-globals-f7121568.js +4 -0
- package/dist/kolibri/{app-globals-081a982f.js.map → app-globals-f7121568.js.map} +1 -1
- package/dist/kolibri/{associated.controller-92af2554.js → associated.controller-22684481.js} +1 -1
- package/dist/kolibri/{bootstrap-93c7a706.js → bootstrap-dcdb1765.js} +1 -1
- package/dist/kolibri/component-names-553d8bfa.js +4 -0
- package/dist/kolibri/component-names-553d8bfa.js.map +1 -0
- package/dist/kolibri/{controller-f5a335ce.js → controller-7a002c8f.js} +1 -1
- package/dist/kolibri/{controller-ce246aad.js → controller-8b5dbe81.js} +1 -1
- package/dist/kolibri/{controller-912bda08.js → controller-ac40e13c.js} +1 -1
- package/dist/kolibri/{controller-91a4c3ba.js → controller-cf01f031.js} +1 -1
- package/dist/kolibri/{controller-icon-de12de48.js → controller-icon-0d71a8a2.js} +1 -1
- package/dist/kolibri/{dev.utils-cb61837d.js → dev.utils-ffecab2f.js} +1 -1
- package/dist/kolibri/{devtools-90d0e710.js → devtools-a4e8658c.js} +1 -1
- package/dist/kolibri/{getRenderStates-c4b5c6cb.js → getRenderStates-c4bde254.js} +1 -1
- package/dist/kolibri/{index-1ed13705.js → index-02bdb302.js} +2 -2
- package/dist/kolibri/index-02bdb302.js.map +1 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.entry.js +4 -0
- package/dist/kolibri/kol-card-wc.entry.js.map +1 -0
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js.map +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js.map +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js.map +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-popover-button-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-popover-button.entry.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.js +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js.map +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +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.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/kolibri.esm.js.map +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components/button/component.d.ts +1 -2
- package/dist/types/components/card/component.d.ts +19 -0
- package/dist/types/components/card/shadow.d.ts +2 -12
- package/dist/types/components/drawer/shadow.d.ts +3 -1
- package/dist/types/components/split-button/shadow.d.ts +11 -4
- package/dist/types/components/tooltip/component.d.ts +5 -5
- package/dist/types/components.d.ts +89 -8
- package/dist/types/core/component-names.d.ts +1 -0
- package/dist/types/schema/components/drawer.d.ts +3 -3
- package/dist/types/schema/components/image.d.ts +5 -16
- package/dist/types/schema/props/alt.d.ts +7 -0
- package/dist/types/schema/props/image-sizes.d.ts +7 -0
- package/dist/types/schema/props/image-srcset.d.ts +7 -0
- package/dist/types/schema/props/index.d.ts +1 -1
- package/dist/types/schema/props/loading.d.ts +3 -0
- package/doc/card.md +1 -1
- package/doc/components.md +4 -4
- package/doc/drawer.md +7 -6
- package/doc/split-button.md +41 -18
- package/package.json +1 -1
- package/vscode-custom-data.json +37 -0
- package/dist/cjs/Alert-22627abf.js +0 -4
- package/dist/cjs/Alert-22627abf.js.map +0 -1
- package/dist/cjs/Icon-add098ba.js +0 -4
- package/dist/cjs/component-names-82c4d68d.js +0 -4
- package/dist/cjs/component-names-82c4d68d.js.map +0 -1
- package/dist/cjs/index-a40019ac.js +0 -4
- package/dist/cjs/index-a40019ac.js.map +0 -1
- package/dist/esm/Alert-112aec59.js +0 -4
- package/dist/esm/Alert-112aec59.js.map +0 -1
- package/dist/esm/CustomSuggestionsOptionsGroup-dcff90e4.js +0 -4
- package/dist/esm/Icon-446dff9e.js +0 -4
- package/dist/esm/component-names-7924d82a.js +0 -4
- package/dist/esm/component-names-7924d82a.js.map +0 -1
- package/dist/esm/index-1ed13705.js +0 -4
- package/dist/esm/index-1ed13705.js.map +0 -1
- package/dist/kolibri/Alert-112aec59.js +0 -4
- package/dist/kolibri/Alert-112aec59.js.map +0 -1
- package/dist/kolibri/Icon-446dff9e.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-781ef373.js +0 -4
- package/dist/kolibri/Span-d15a3ea1.js +0 -4
- package/dist/kolibri/app-globals-081a982f.js +0 -4
- package/dist/kolibri/component-names-7924d82a.js +0 -4
- package/dist/kolibri/component-names-7924d82a.js.map +0 -1
- package/dist/kolibri/index-1ed13705.js.map +0 -1
- /package/dist/kolibri/{Collapsible-af548d40.js.map → Collapsible-7be44a00.js.map} +0 -0
- /package/dist/kolibri/{CustomSuggestionsOptionsGroup-dcff90e4.js.map → CustomSuggestionsOptionsGroup-cdea277e.js.map} +0 -0
- /package/dist/kolibri/{FieldControlStateWrapper-7dba1400.js.map → FieldControlStateWrapper-6c17f96e.js.map} +0 -0
- /package/dist/kolibri/{Heading-733c8dda.js.map → Heading-31a470a8.js.map} +0 -0
- /package/dist/kolibri/{Icon-446dff9e.js.map → Icon-e36657fc.js.map} +0 -0
- /package/dist/kolibri/{Input-8502a991.js.map → Input-b352cf7a.js.map} +0 -0
- /package/dist/kolibri/{InputStateWrapper-9b8419a8.js.map → InputStateWrapper-38536b7a.js.map} +0 -0
- /package/dist/kolibri/{InternalUnderlinedBadgeText-781ef373.js.map → InternalUnderlinedBadgeText-b1330190.js.map} +0 -0
- /package/dist/kolibri/{Span-d15a3ea1.js.map → Span-88b22574.js.map} +0 -0
- /package/dist/kolibri/{associated.controller-92af2554.js.map → associated.controller-22684481.js.map} +0 -0
- /package/dist/kolibri/{bootstrap-93c7a706.js.map → bootstrap-dcdb1765.js.map} +0 -0
- /package/dist/kolibri/{controller-f5a335ce.js.map → controller-7a002c8f.js.map} +0 -0
- /package/dist/kolibri/{controller-ce246aad.js.map → controller-8b5dbe81.js.map} +0 -0
- /package/dist/kolibri/{controller-912bda08.js.map → controller-ac40e13c.js.map} +0 -0
- /package/dist/kolibri/{controller-91a4c3ba.js.map → controller-cf01f031.js.map} +0 -0
- /package/dist/kolibri/{controller-icon-de12de48.js.map → controller-icon-0d71a8a2.js.map} +0 -0
- /package/dist/kolibri/{dev.utils-cb61837d.js.map → dev.utils-ffecab2f.js.map} +0 -0
- /package/dist/kolibri/{devtools-90d0e710.js.map → devtools-a4e8658c.js.map} +0 -0
- /package/dist/kolibri/{getRenderStates-c4b5c6cb.js.map → getRenderStates-c4bde254.js.map} +0 -0
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-ae732dfd.js"),index$1=require("./index-94c17ce6.js"),i18n=require("./i18n-b01aa5d0.js"),color=require("./color-9f3a33be.js");require("./i18n-8c288a27.js");const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\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-kolibri {\n display: inline-block;\n max-height: 100%;\n }\n .kol-kolibri__text {\n font-size: calc(90rem / var(--kolibri-root-font-size, 16));\n letter-spacing: normal;\n word-spacing: normal;\n }\n}",KolKolibriDefaultStyle0=defaultStyleCss,KolKolibri=class{constructor(e){index.registerInstance(this,e),this.handleColorChange=(e,n)=>{if("string"==typeof e){const t=color.colorRgba(e);n.set("_color",{red:t[0],green:t[1],blue:t[2]})}else index$1.devHint("[KolKolibri] You used the complex color schema. For the KoliBri we use need the color as hex string.")},this._color="#003c78",this._labeled=!0,this.state={_color:{red:0,green:60,blue:120},_labeled:!0}}render(){const e=`rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;return index.h("svg",{key:"1945fdcb58c141c29f0d1c8a50916c355b6d3803",class:"kol-kolibri",role:"img","aria-label":i18n.translate("kol-kolibri-logo"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 600",fill:e},index.h("path",{key:"c274327a042aff7394850483cf48e2e0f5009f16",d:"M353 322L213 304V434L353 322Z"}),index.h("path",{key:"d2dcf55ef33f5fa55cbf780c53eb78b318c5ee1a",d:"M209 564V304L149 434L209 564Z"}),index.h("path",{key:"94bee6eb94b3a33895d6ad1e42e10ff5f579dd34",d:"M357 316L417 250L361 210L275 244L357 316Z"}),index.h("path",{key:"19a48f90c9f6d24391a2b5bdaaec0205ef6b346d",d:"M329 218L237 92L250 222L272 241L329 218Z"}),index.h("path",{key:"e8e04281d24bd01ef48b98a7396603c31557bb81",d:"M353 318L35 36L213 300L353 318Z"}),index.h("path",{key:"ce6865b2cb1f6e3d1782e257e9ba409daa48074d",d:"M391 286L565 272L421 252L391 286Z"}),!0===this.state._labeled&&index.h("text",{key:"01776673c11b8869494caa3df7fafc847f8e8276",class:"kol-kolibri__text",x:"250",y:"525",fill:e},"KoliBri"))}validateColor(e){color.validateColor(this,e,{defaultValue:"#003c78",hooks:{beforePatch:this.handleColorChange}})}validateLabeled(e){index$1.watchBoolean(this,"_labeled",e,{defaultValue:!0})}componentWillLoad(){this.validateColor(this._color),this.validateLabeled(this._labeled)}static get watchers(){return{_color:["validateColor"],_labeled:["validateLabeled"]}}};KolKolibri.style={default:KolKolibriDefaultStyle0},exports.kol_kolibri=KolKolibri;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-ae732dfd.js"),componentNames=require("./component-names-f5f2ca3a.js"),defaultStyleCss="@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-link {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-flex;\n place-items: center;\n text-align: center;\n text-decoration-line: none;\n }\n .kol-link::before {\n /* Render zero-width character as first element to set the baseline correctly. */\n content: \"\";\n }\n .kol-link__text {\n margin: auto;\n width: 100%;\n }\n}",KolLinkButtonDefaultStyle0=defaultStyleCss,KolLinkButton=class{constructor(n){index.registerInstance(this,n),this.catchRef=n=>{this.linkWcRef=n},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._customClass=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._target=void 0,this._tooltipAlign="right",this._variant="normal"}async kolFocus(){var n;await(null===(n=this.linkWcRef)||void 0===n?void 0:n.kolFocus())}render(){return index.h(componentNames.KolLinkWcTag,{key:"c43e9c9834dff4e54aa321ef464b9e6f95019dc5",ref:this.catchRef,_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_ariaDescription:this._ariaDescription,_customClass:this._customClass,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_on:this._on,_role:"button",_shortKey:this._shortKey,_target:this._target,_tooltipAlign:this._tooltipAlign,_buttonVariant:this._variant},index.h("slot",{key:"c2d514cb0c22f129364fb59ec873c91f826043fe",name:"expert",slot:"expert"}))}static get delegatesFocus(){return!0}};KolLinkButton.style={default:KolLinkButtonDefaultStyle0},exports.kol_link_button=KolLinkButton;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-ae732dfd.js"),index=require("./index-94c17ce6.js"),ariaCurrentService=require("./ariaCurrentService-53afa476.js"),events=require("./events-df7aa71f.js"),dev_utils=require("./dev.utils-bfd07ca6.js"),componentNames=require("./component-names-f5f2ca3a.js"),i18n=require("./i18n-b01aa5d0.js"),accessAndShortKey=require("./access-and-short-key-ba5dc318.js"),clsx=require("./clsx-dd4d6dd1.js");require("./bem-85316256.js");const Span=require("./Span-c9f5cc1a.js"),href=require("./href-b36c8e1d.js"),linkVariant=require("./link-variant-fa5e798a.js"),customClass=require("./custom-class-65fdabdc.js"),disabled=require("./disabled-1872d3f6.js"),hideLabel=require("./hide-label-18d6d9e2.js"),icons=require("./icons-99569c9b.js"),label=require("./label-7b22af75.js"),tooltipAlign=require("./tooltip-align-6938fb01.js");require("./i18n-8c288a27.js"),require("./browser-4433089a.js"),require("./tslib.es6-5e301284.js"),require("./Icon-0537cd28.js"),require("./markdown-164534bf.js"),require("./InternalUnderlinedBadgeText-a54799ae.js"),require("./isArray-e114fe6e.js"),require("./isObject-6090b636.js"),require("./align-6dbf7621.js");const ariaCurrentValuePropTypeOptions=["date","location","page","step","time","true","false"],validateAriaCurrentValue=(t,e)=>{index.watchValidator(t,"_ariaCurrentValue",(t=>"string"==typeof t&&ariaCurrentValuePropTypeOptions.includes(t)),new Set([`AriaCurrentValue {${ariaCurrentValuePropTypeOptions.join(", ")}`]),e,{defaultValue:"page"})},validateAriaOwns=(t,e)=>{index.watchString(t,"_ariaOwns",e,{defaultValue:void 0})},validateDownload=(t,e)=>{index.watchString(t,"_download",e)},validateLinkCallbacks=(t,e)=>{"object"==typeof e&&"function"==typeof(null==e?void 0:e.onClick)&&(t.state=Object.assign(Object.assign({},t.state),{_on:e}))},validateLinkTarget=(t,e)=>{index.watchString(t,"_target",e)},KolLinkWc=class{constructor(t){index$1.registerInstance(this,t),this.internalDescriptionById=dev_utils.nonce(),this.catchRef=t=>{this.anchorRef=t},this.onClick=t=>{var e,a;!0===this.state._disabled?t.preventDefault():("function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&(t.preventDefault(),index.setEventTarget(t,this.anchorRef),null===(a=this.state._on)||void 0===a||a.onClick(t,this.state._href)),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.click,this.state._href))},this.getRenderValues=()=>{const t="string"==typeof this.state._target&&"_self"!==this.state._target,e={href:"string"==typeof this.state._href&&this.state._href.length>0?this.state._href:"javascript:void(0);",target:"string"==typeof this.state._target&&this.state._target.length>0?this.state._target:void 0,rel:t?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return!0!==this.state._hideLabel||this.state._label||index.devHint("[KolLink] An aria-label must be set when _hide-label is set."),{isExternal:t,tagAttrs:e}},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaOwns=void 0,this._customClass=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._linkVariant=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._tabIndex=void 0,this._target=void 0,this._tooltipAlign="right",this._buttonVariant="normal",this.state={_ariaCurrentValue:"page",_href:"",_icons:{}}}async kolFocus(){var t;null===(t=this.anchorRef)||void 0===t||t.focus()}render(){var t,e;const{isExternal:a,tagAttrs:i}=this.getRenderValues(),s=index.showExpertSlot(this.state._label),n=Boolean(null===(e=null===(t=this.state._ariaDescription)||void 0===t?void 0:t.trim())||void 0===e?void 0:e.length);return index$1.h(index$1.Host,{key:"9fd3ab61de61d27594a243f8b0eeb4ac2f303eec"},index$1.h("a",Object.assign({key:"2c1ecc6b981fa646bd9b2f16aaf13c586deb503d",ref:this.catchRef},i,{accessKey:this.state._accessKey,"aria-current":this.state._ariaCurrent,"aria-describedby":n?this.internalDescriptionById:void 0,"aria-disabled":this.state._disabled?"true":void 0,"aria-expanded":"boolean"==typeof this.state._ariaExpanded?String(this.state._ariaExpanded):void 0,"aria-owns":this.state._ariaOwns,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?`${this.state._label}${a?` (${i18n.translate("kol-open-link-in-tab")})`:""}`:void 0,class:clsx.clsx("kol-link",{"kol-link--disabled":!0===this.state._disabled,"kol-link--external-link":a,"kol-link--hide-label":!0===this.state._hideLabel,[`kol-link--${this.state._buttonVariant}`]:"button"===this.state._role&&"custom"!==this.state._buttonVariant,[`kol-link--${this.state._linkVariant}`]:this.state._linkVariant,[this.state._customClass]:"custom"===this.state._buttonVariant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0})},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick,role:this.state._role,tabIndex:this.state._disabled?-1:this.state._tabIndex}),index$1.h(Span.KolSpanFc,{key:"e5ef2f2e1c87c31ecc1ef6407f096d167350c0f2",class:"kol-link__text",badgeText:this.state._accessKey||this.state._shortKey,icons:this.state._icons,hideLabel:this.state._hideLabel,label:s?"":this.state._label||this.state._href},index$1.h("slot",{key:"60d906388bd1cf763c2bd4631945e3926c478086",name:"expert",slot:"expert"})),a&&index$1.h(componentNames.KolIconTag,{key:"137e738b086d43c2cbc619b2a57b980609e79bc1",class:"kol-link__icon",_label:this.state._hideLabel?"":i18n.translate("kol-open-link-in-tab"),_icons:"codicon codicon-link-external","aria-hidden":this.state._hideLabel})),index$1.h(componentNames.KolTooltipWcTag,{key:"e0064f0ca3a2e2b579ca411d9734ef8e4beaaa75","aria-hidden":"true",class:"kol-link__tooltip",hidden:s||!this.state._hideLabel,_badgeText:this.state._accessKey||this.state._shortKey,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}),n&&index$1.h("span",{key:"3563c0639768272faaabcba6ff98327c5997f69b",class:"visually-hidden",id:this.internalDescriptionById},this.state._ariaDescription))}validateAccessKey(t){accessAndShortKey.validateAccessKey(this,t),accessAndShortKey.validateAccessAndShortKey(t,this._shortKey)}validateAriaCurrentValue(t){validateAriaCurrentValue(this,t)}validateAriaDescription(t){linkVariant.validateAriaDescription(this,t)}validateAriaExpanded(t){linkVariant.validateAriaExpanded(this,t)}validateAriaOwns(t){validateAriaOwns(this,t)}validateCustomClass(t){customClass.validateCustomClass(this,t)}validateDisabled(t){disabled.validateDisabled(this,t)}validateDownload(t){validateDownload(this,t)}validateHideLabel(t){hideLabel.validateHideLabel(this,t)}validateHref(t){href.validateHref(this,t,{required:!0})}validateIcons(t){icons.validateIcons(this,t)}validateLabel(t){label.validateLabelWithExpertSlot(this,t)}validateLinkVariant(t){linkVariant.validateLinkVariant(this,t)}validateOn(t){validateLinkCallbacks(this,t)}validateRole(t){linkVariant.validateAlternativeButtonLinkRole(this,t)}validateShortKey(t){accessAndShortKey.validateShortKey(this,t),accessAndShortKey.validateAccessAndShortKey(this._accessKey,t)}validateTabIndex(t){accessAndShortKey.validateTabIndex(this,t)}validateTarget(t){validateLinkTarget(this,t)}validateTooltipAlign(t){tooltipAlign.validateTooltipAlign(this,t)}validateButtonVariant(t){linkVariant.validateButtonVariant(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaCurrentValue(this._ariaCurrentValue),this.validateAriaDescription(this._ariaDescription),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaOwns(this._ariaOwns),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel),this.validateHref(this._href),this.validateIcons(this._icons),this.validateLabel(this._label),this.validateLinkVariant(this._linkVariant),this.validateOn(this._on),this.validateRole(this._role),this.validateShortKey(this._shortKey),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTooltipAlign(this._tooltipAlign),this.validateButtonVariant(this._buttonVariant),this.unsubscribeOnLocationChange=ariaCurrentService.onLocationChange((t=>{this.state._ariaCurrent=t===this.state._href?this.state._ariaCurrentValue:void 0})),accessAndShortKey.validateAccessAndShortKey(this._accessKey,this._shortKey)}disconnectedCallback(){this.unsubscribeOnLocationChange&&this.unsubscribeOnLocationChange()}get host(){return index$1.getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaCurrentValue:["validateAriaCurrentValue"],_ariaDescription:["validateAriaDescription"],_ariaExpanded:["validateAriaExpanded"],_ariaOwns:["validateAriaOwns"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icons:["validateIcons"],_label:["validateLabel"],_linkVariant:["validateLinkVariant"],_on:["validateOn"],_role:["validateRole"],_shortKey:["validateShortKey"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_tooltipAlign:["validateTooltipAlign"],_buttonVariant:["validateButtonVariant"]}}};exports.kol_link_wc=KolLinkWc;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-ae732dfd.js"),componentNames=require("./component-names-f5f2ca3a.js"),defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-link {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n .kol-link--standalone {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n .kol-link__text .kol-span__label {\n text-decoration-line: underline;\n }\n .kol-link:is(:focus, :hover):not([aria-disabled], [disabled]) .kol-link__text .kol-span__label {\n text-decoration-thickness: 0.2em;\n }\n .kol-link__icon {\n display: inline-flex;\n margin-left: calc(8rem / var(--kolibri-root-font-size, 16));\n }\n}",KolLinkDefaultStyle0=defaultStyleCss,KolLink=class{constructor(n){index.registerInstance(this,n),this.catchRef=n=>{this.linkWcRef=n},this._accessKey=void 0,this._ariaCurrentValue=void 0,this._ariaDescription=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icons=void 0,this._label=void 0,this._variant="inline",this._on=void 0,this._role=void 0,this._shortKey=void 0,this._target=void 0,this._tooltipAlign="right"}async kolFocus(){var n;await(null===(n=this.linkWcRef)||void 0===n?void 0:n.kolFocus())}render(){return index.h(componentNames.KolLinkWcTag,{key:"90543b09e049e96279c230a150f090deaf7bbb72",ref:this.catchRef,_accessKey:this._accessKey,_ariaCurrentValue:this._ariaCurrentValue,_ariaDescription:this._ariaDescription,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icons:this._icons,_label:this._label,_linkVariant:this._variant,_on:this._on,_role:this._role,_shortKey:this._shortKey,_target:this._target,_tooltipAlign:this._tooltipAlign},index.h("slot",{key:"3fa4b6a10a59453f0ebd3114bfa6811eb44cea92",name:"expert",slot:"expert"}))}static get delegatesFocus(){return!0}};KolLink.style={default:KolLinkDefaultStyle0},exports.kol_link=KolLink;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-ae732dfd.js"),index=require("./index-94c17ce6.js"),events=require("./events-df7aa71f.js"),componentNames=require("./component-names-f5f2ca3a.js"),i18n=require("./i18n-b01aa5d0.js"),clsx=require("./clsx-dd4d6dd1.js"),label=require("./label-7b22af75.js");require("./i18n-8c288a27.js");const ModalVariantPropTypeOptions=["blank","card"],validateModalVariant=(n,e)=>{index.watchValidator(n,"_variant",(n=>"string"==typeof n&&ModalVariantPropTypeOptions.includes(n)),new Set(ModalVariantPropTypeOptions),e)},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-modal {\n border: 0;\n padding: 0;\n position: relative;\n min-height: var(--a11y-min-size);\n }\n .kol-modal::backdrop {\n background-color: rgba(0, 0, 0, 0.33);\n }\n .kol-modal__close-button {\n position: absolute;\n top: calc(1rem / var(--kolibri-root-font-size, 16));\n right: calc(1rem / var(--kolibri-root-font-size, 16));\n z-index: 1;\n }\n}",KolModalDefaultStyle0=defaultStyleCss,KolModal=class{constructor(n){index$1.registerInstance(this,n),this.on={onClick:async()=>{await this.closeModal()}},this._label=void 0,this._on=void 0,this._width="100%",this._variant="blank",this.state={_label:"",_width:"100%"}}disconnectedCallback(){this.closeModal()}handleNativeCloseEvent(){var n,e;null===(e=null===(n=this.state._on)||void 0===n?void 0:n.onClose)||void 0===e||e.call(n),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.close)}async openModal(){var n;null===(n=this.refDialog)||void 0===n||n.showModal()}async closeModal(){var n,e;null===(e=null===(n=this.refDialog)||void 0===n?void 0:n.close)||void 0===e||e.call(n)}render(){return index$1.h("dialog",{key:"e78e57c1eb66cde98ff6fa4149a2589ee16ba9cf",class:clsx.clsx("kol-modal",{"kol-modal__card":"card"===this.state._variant}),ref:n=>{this.refDialog=n},style:{width:this.state._width},"aria-label":this.state._label,onClose:this.handleNativeCloseEvent.bind(this)},index$1.h("div",{key:"695626e109e7026ed4ec1bf8cbfe8b60125d64f6",tabindex:"-1"},index$1.h("slot",{key:"ef6165e95f52d3a4ea08058bd8a6f05e7487066e"})),"card"===this.state._variant&&index$1.h(componentNames.KolButtonWcTag,{key:"1b591e2d72673fbd7ee85ae77568997af248ce85",class:"kol-modal__close-button","data-testid":"modal-close-button",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:i18n.translate("kol-close"),_on:this.on,_tooltipAlign:"left"}))}validateLabel(n){label.validateLabel(this,n,{required:!0})}validateOn(n){if("object"==typeof n&&null!==n){const e={};"function"!=typeof n.onClose&&!0!==n.onClose||(e.onClose=n.onClose),index.setState(this,"_on",e)}}validateWidth(n){index.watchString(this,"_width",n,{defaultValue:"100%"})}validateVariant(n){validateModalVariant(this,n)}componentWillLoad(){this.validateLabel(this._label),this.validateOn(this._on),this.validateWidth(this._width),this.validateVariant(this._variant)}get host(){return index$1.getElement(this)}static get watchers(){return{_label:["validateLabel"],_on:["validateOn"],_width:["validateWidth"],_variant:["validateVariant"]}}};KolModal.style={default:KolModalDefaultStyle0},exports.kol_modal=KolModal;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-a40019ac.js"),index=require("./index-94c17ce6.js"),i18n=require("./i18n-b01aa5d0.js"),uniqueNavLabels=require("./unique-nav-labels-eee92e0a.js"),validation=require("./validation-515de18a.js"),componentNames=require("./component-names-82c4d68d.js"),clsx=require("./clsx-dd4d6dd1.js"),hideLabel=require("./hide-label-18d6d9e2.js"),label=require("./label-7b22af75.js");require("./i18n-8c288a27.js");const validateCollapsible=(n,e)=>{index.watchBoolean(n,"_collapsible",e)},validateHasCompactButton=(n,e)=>{index.watchBoolean(n,"_hasCompactButton",e)},validateHasIconsWhenExpanded=(n,e)=>{index.watchBoolean(n,"_hasIconsWhenExpanded",e)},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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 list-style: none;\n margin: 0;\n padding: 0;\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}",KolNavDefaultStyle0=defaultStyleCss,entryIsLink=n=>"string"==typeof n._href,entryIsButton=n=>{var e;return void 0===n._href&&"function"==typeof(null===(e=n._on)||void 0===e?void 0:e.onClick)},KolNav=class{constructor(n){index$1.registerInstance(this,n),this.handleToggleExpansionClick=n=>{n&&(this.state._expandedChildren.includes(n)?this.collapseChildren(n):this.expandChildren(n))},this.linkList=n=>index$1.h("ul",{class:clsx.clsx("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._label=void 0,this._links=void 0,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,e,t,i,a){const l=this.state._hasIconsWhenExpanded||this.state._hideLabel?i._icons||(this.state._hideLabel?"codicon codicon-symbol-method":void 0):void 0;return index$1.h("div",{class:"kol-nav__entry-wrapper"},entryIsLink(i)?index$1.h(componentNames.KolLinkWcTag,Object.assign({class:"kol-nav__entry kol-nav__entry--link"},i,{_hideLabel:e,_icons:l})):index$1.h(componentNames.KolButtonWcTag,{class:"kol-nav__entry kol-nav__entry--button",_label:i._label,_hideLabel:e,_icons:l,_on:{onClick:(n,e)=>{entryIsButton(i)&&"function"==typeof i._on.onClick?i._on.onClick(n,e):this.handleToggleExpansionClick(i._children)}}}),t?this.expandButton(n,i,a):"")}expandButton(n,e,t){return index$1.h(componentNames.KolButtonWcTag,{class:clsx.clsx("kol-nav__expand-button",{"kol-nav__expand-button--expanded":t}),_ariaExpanded:t,_disabled:!n,_icons:"codicon codicon-"+(t?"remove":"add"),_hideLabel:!0,_label:`${t?i18n.translate("kol-nav-label-close",{placeholders:{label:e._label}}):i18n.translate("kol-nav-label-open",{placeholders:{label:e._label}})}`,_on:{onClick:()=>this.handleToggleExpansionClick(e._children)}})}li(n,e,t,i,a,l){const o=!!a._active,s=Array.isArray(a._children)&&a._children.length>0,d=Boolean(a._children&&this.state._expandedChildren.includes(a._children));return index$1.h("li",{class:clsx.clsx("kol-nav__list-item",{"kol-nav__list-item--active":o,"kol-nav__list-item--expanded":d,"kol-nav__list-item--has-children":s}),key:i},this.entry(n,e,s,a,d),d&&index$1.h(this.linkList,{collapsible:n,hideLabel:e,deep:t+1,links:a._children||[],orientation:l}))}initializeExpandedChildren(){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,index.devWarning("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const e=!0===this.state._collapsible,t=!0===this.state._hideLabel,i=this.state._orientation;return index$1.h("div",{key:"e1017686dbaff0b5e937753f1d31d358dc26275b",class:clsx.clsx("kol-nav",`kol-nav--${i}`,{"kol-nav--is-compact":this.state._hideLabel})},index$1.h("nav",{key:"9b231aa86130dc61157a18ab253981a794f35879",class:"kol-nav__navigation","aria-label":this.state._label,id:"nav"},index$1.h(this.linkList,{key:"c363f2c816f0d762212c78ddba77624a461534d4",collapsible:e,hideLabel:t,deep:0,links:this.state._links,orientation:i})),n&&index$1.h("div",{key:"b8c48aa28e97d7b3f0aafbb21e40f2a88f4afa24",class:"kol-nav__compact"},index$1.h(componentNames.KolButtonWcTag,{key:"5e9c3b8abd99125fde3a7318e6841ea7fcc82c8a",class:"kol-nav__toggle-button",_ariaControls:"nav",_ariaExpanded:!t,_icons:t?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:i18n.translate(t?"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){validateCollapsible(this,n)}validateHasCompactButton(n){validateHasCompactButton(this,n)}validateHasIconsWhenExpanded(n){validateHasIconsWhenExpanded(this,n)}validateHideLabel(n){hideLabel.validateHideLabel(this,n)}validateLabel(n,e,t=!1){t||uniqueNavLabels.removeNavLabel(this.state._label),label.validateLabel(this,n,{required:!0}),index.a11yHintLabelingLandmarks(n),uniqueNavLabels.addNavLabel(this.state._label)}validateLinks(n){validation.watchNavLinks("KolNav",this,n),index.devHint("[KolNav] The navigation structure is not yet validated recursively.")}validateOrientation(n){index.watchValidator(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(){uniqueNavLabels.removeNavLabel(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};KolNav.style={default:KolNavDefaultStyle0},exports.kol_nav=KolNav;
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-ae732dfd.js"),index=require("./index-94c17ce6.js"),i18n=require("./i18n-b01aa5d0.js"),uniqueNavLabels=require("./unique-nav-labels-eee92e0a.js"),validation=require("./validation-515de18a.js"),componentNames=require("./component-names-f5f2ca3a.js"),clsx=require("./clsx-dd4d6dd1.js"),hideLabel=require("./hide-label-18d6d9e2.js"),label=require("./label-7b22af75.js");require("./i18n-8c288a27.js");const validateCollapsible=(n,e)=>{index.watchBoolean(n,"_collapsible",e)},validateHasCompactButton=(n,e)=>{index.watchBoolean(n,"_hasCompactButton",e)},validateHasIconsWhenExpanded=(n,e)=>{index.watchBoolean(n,"_hasIconsWhenExpanded",e)},defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\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 list-style: none;\n margin: 0;\n padding: 0;\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}",KolNavDefaultStyle0=defaultStyleCss,entryIsLink=n=>"string"==typeof n._href,entryIsButton=n=>{var e;return void 0===n._href&&"function"==typeof(null===(e=n._on)||void 0===e?void 0:e.onClick)},KolNav=class{constructor(n){index$1.registerInstance(this,n),this.handleToggleExpansionClick=n=>{n&&(this.state._expandedChildren.includes(n)?this.collapseChildren(n):this.expandChildren(n))},this.linkList=n=>index$1.h("ul",{class:clsx.clsx("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._label=void 0,this._links=void 0,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,e,t,i,a){const l=this.state._hasIconsWhenExpanded||this.state._hideLabel?i._icons||(this.state._hideLabel?"codicon codicon-symbol-method":void 0):void 0;return index$1.h("div",{class:"kol-nav__entry-wrapper"},entryIsLink(i)?index$1.h(componentNames.KolLinkWcTag,Object.assign({class:"kol-nav__entry kol-nav__entry--link"},i,{_hideLabel:e,_icons:l})):index$1.h(componentNames.KolButtonWcTag,{class:"kol-nav__entry kol-nav__entry--button",_label:i._label,_hideLabel:e,_icons:l,_on:{onClick:(n,e)=>{entryIsButton(i)&&"function"==typeof i._on.onClick?i._on.onClick(n,e):this.handleToggleExpansionClick(i._children)}}}),t?this.expandButton(n,i,a):"")}expandButton(n,e,t){return index$1.h(componentNames.KolButtonWcTag,{class:clsx.clsx("kol-nav__expand-button",{"kol-nav__expand-button--expanded":t}),_ariaExpanded:t,_disabled:!n,_icons:"codicon codicon-"+(t?"remove":"add"),_hideLabel:!0,_label:`${t?i18n.translate("kol-nav-label-close",{placeholders:{label:e._label}}):i18n.translate("kol-nav-label-open",{placeholders:{label:e._label}})}`,_on:{onClick:()=>this.handleToggleExpansionClick(e._children)}})}li(n,e,t,i,a,l){const o=!!a._active,s=Array.isArray(a._children)&&a._children.length>0,d=Boolean(a._children&&this.state._expandedChildren.includes(a._children));return index$1.h("li",{class:clsx.clsx("kol-nav__list-item",{"kol-nav__list-item--active":o,"kol-nav__list-item--expanded":d,"kol-nav__list-item--has-children":s}),key:i},this.entry(n,e,s,a,d),d&&index$1.h(this.linkList,{collapsible:n,hideLabel:e,deep:t+1,links:a._children||[],orientation:l}))}initializeExpandedChildren(){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,index.devWarning("[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden."));const e=!0===this.state._collapsible,t=!0===this.state._hideLabel,i=this.state._orientation;return index$1.h("div",{key:"41b5171c34c2c740b8b4dd8449e6334721e7cb19",class:clsx.clsx("kol-nav",`kol-nav--${i}`,{"kol-nav--is-compact":this.state._hideLabel})},index$1.h("nav",{key:"b0604a9fda51cb5e6435eb6187f3b461acc6743c",class:"kol-nav__navigation","aria-label":this.state._label,id:"nav"},index$1.h(this.linkList,{key:"ef7b63a443cf20b1ae7dfe96ce4561da14e26ef6",collapsible:e,hideLabel:t,deep:0,links:this.state._links,orientation:i})),n&&index$1.h("div",{key:"b65cdbaa29dbb9c490223969949eeaa28e9ad99e",class:"kol-nav__compact"},index$1.h(componentNames.KolButtonWcTag,{key:"06923cae2ce196795887157deb943ce2009bddaf",class:"kol-nav__toggle-button",_ariaControls:"nav",_ariaExpanded:!t,_icons:t?"codicon codicon-chevron-right":"codicon codicon-chevron-left",_hideLabel:!0,_label:i18n.translate(t?"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){validateCollapsible(this,n)}validateHasCompactButton(n){validateHasCompactButton(this,n)}validateHasIconsWhenExpanded(n){validateHasIconsWhenExpanded(this,n)}validateHideLabel(n){hideLabel.validateHideLabel(this,n)}validateLabel(n,e,t=!1){t||uniqueNavLabels.removeNavLabel(this.state._label),label.validateLabel(this,n,{required:!0}),index.a11yHintLabelingLandmarks(n),uniqueNavLabels.addNavLabel(this.state._label)}validateLinks(n){validation.watchNavLinks("KolNav",this,n),index.devHint("[KolNav] The navigation structure is not yet validated recursively.")}validateOrientation(n){index.watchValidator(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(){uniqueNavLabels.removeNavLabel(this.state._label)}static get watchers(){return{_collapsible:["validateCollapsible"],_hasCompactButton:["validateHasCompactButton"],_hasIconsWhenExpanded:["validateHasIconsWhenExpanded"],_hideLabel:["validateHideLabel"],_label:["validateLabel"],_links:["validateLinks"],_orientation:["validateOrientation"]}}};KolNav.style={default:KolNavDefaultStyle0},exports.kol_nav=KolNav;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-a40019ac.js"),index=require("./index-94c17ce6.js"),i18n=require("./i18n-b01aa5d0.js"),dev_utils=require("./dev.utils-6759aaf5.js"),uniqueNavLabels=require("./unique-nav-labels-eee92e0a.js"),componentNames=require("./component-names-82c4d68d.js"),events=require("./events-df7aa71f.js"),customClass=require("./custom-class-65fdabdc.js"),label=require("./label-7b22af75.js"),tooltipAlign=require("./tooltip-align-6938fb01.js");require("./i18n-8c288a27.js"),require("./align-6dbf7621.js");const validateMax=(t,e,n)=>{index.watchNumber(t,"_max",e,n)},defaultStyleCss="@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n /* TODO. Once #7126 is completed, move :host block into .kol-pagination */\n :host {\n align-items: center;\n display: grid;\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .kol-pagination__separator:before {\n content: \"•••\";\n }\n}",KolPaginationDefaultStyle0=defaultStyleCss,leftDoubleArrowIcon={left:"codicon codicon-debug-reverse-continue"},leftSingleArrow={left:"codicon codicon-chevron-left"},rightSingleArrowIcon={right:"codicon codicon-chevron-right"},rightDoubleArrowIcon={right:"codicon codicon-debug-continue"};function getUserLanguage(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}const userLanguage=getUserLanguage(),NUMBER_FORMATTER=new Intl.NumberFormat(userLanguage,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),KolPagination=class{constructor(t){index$1.registerInstance(this,t),this.nonce=dev_utils.nonce(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.click,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.changePage,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.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,e)=>{let n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const i=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find((t=>t.value===n));n=void 0===t?i[0].value:t.value,e.set("_pageSize",n)}const a=e.has("_page")?e.get("_page"):this.state._page,o=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,a,e.get("_pageSize"),o)},this.syncPage=(t,e,n,i)=>{if(i>0){const a=this.calcCount(i,n);a>0&&(e>a?(t.set("_page",a),this.onChangePage(index.STATE_CHANGE_EVENT,a)):e<1&&(t.set("_page",1),this.onChangePage(index.STATE_CHANGE_EVENT,1)))}},this.beforePageSizeOptions=(t,e)=>{const n=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&n.push({label:i18n.translate("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",n),this.beforePageSize(n,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:i18n.translate("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const n=this.getCount(),i=Array.from(Array(n).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>n-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,index$1.h("li",{key:dev_utils.nonce()},index$1.h("span",{class:"kol-pagination__separator","aria-hidden":"true"}))):null));return index$1.h(index$1.Host,{class:"kol-pagination"},index$1.h("nav",{class:"kol-pagination__navigation","aria-label":this.state._label},index$1.h("ul",{class:"kol-pagination__navigation-list"},this.state._hasButtons.first&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftDoubleArrowIcon,_hideLabel:!0,_label:i18n.translate("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftSingleArrow,_hideLabel:!0,_label:i18n.translate("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),i,this.state._hasButtons.next&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--next",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:rightSingleArrowIcon,_hideLabel:!0,_label:i18n.translate("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--last",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:rightDoubleArrowIcon,_hideLabel:!0,_label:i18n.translate("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&index$1.h(componentNames.KolSelectTag,{class:"kol-pagination__page-size-select",_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:i18n.translate("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return index$1.h("li",{key:dev_utils.nonce()},index$1.h(componentNames.KolButtonWcTag,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},index$1.h("span",{slot:"expert"},index$1.h("span",{class:"visually-hidden"},i18n.translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}getSelectedPageButton(t){return index$1.h("li",{key:dev_utils.nonce()},index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--selected",_customClass:this.state._customClass,_disabled:!0,_label:""},index$1.h("span",{slot:"expert"},index$1.h("span",{class:"visually-hidden"},i18n.translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}validateBoundaryCount(t){index.watchNumber(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){customClass.validateCustomClass(this,t)}validateLabel(t,e,n=!1){n||uniqueNavLabels.removeNavLabel(this.state._label),label.validateLabel(this,t),uniqueNavLabels.addNavLabel(this.state._label)}validateHasButtons(t){index.watchValidator(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=index.parseJson(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.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){index.watchNumber(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,i=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,n,i)}}})}validatePageSize(t){index.watchNumber(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){index.watchJsonArrayString(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){index.watchNumber(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){validateMax(this,t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_page")?e.get("_page"):this.state._page,i=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,n,i,t)}}})}validateTooltipAlign(t){tooltipAlign.validateTooltipAlign(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(){uniqueNavLabels.removeNavLabel(this.state._label)}get host(){return index$1.getElement(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"]}}};KolPagination.style={default:KolPaginationDefaultStyle0},exports.kol_pagination=KolPagination;
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-ae732dfd.js"),index=require("./index-94c17ce6.js"),i18n=require("./i18n-b01aa5d0.js"),dev_utils=require("./dev.utils-bfd07ca6.js"),uniqueNavLabels=require("./unique-nav-labels-eee92e0a.js"),componentNames=require("./component-names-f5f2ca3a.js"),events=require("./events-df7aa71f.js"),customClass=require("./custom-class-65fdabdc.js"),label=require("./label-7b22af75.js"),tooltipAlign=require("./tooltip-align-6938fb01.js");require("./i18n-8c288a27.js"),require("./align-6dbf7621.js");const validateMax=(t,e,n)=>{index.watchNumber(t,"_max",e,n)},defaultStyleCss="@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n /* TODO. Once #7126 is completed, move :host block into .kol-pagination */\n :host {\n align-items: center;\n display: grid;\n gap: calc(16rem / var(--kolibri-root-font-size, 16));\n grid-template-columns: 1fr auto;\n }\n .kol-pagination__navigation-list {\n align-items: center;\n display: inline-flex;\n flex-wrap: wrap;\n gap: 0.5em;\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .kol-pagination__separator:before {\n content: \"•••\";\n }\n}",KolPaginationDefaultStyle0=defaultStyleCss,leftDoubleArrowIcon={left:"codicon codicon-debug-reverse-continue"},leftSingleArrow={left:"codicon codicon-chevron-left"},rightSingleArrowIcon={right:"codicon codicon-chevron-right"},rightDoubleArrowIcon={right:"codicon codicon-debug-continue"};function getUserLanguage(){const t=navigator.language||"de-DE";return t.includes("-")?t:`${t}-${t.toUpperCase()}`}const userLanguage=getUserLanguage(),NUMBER_FORMATTER=new Intl.NumberFormat(userLanguage,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}),KolPagination=class{constructor(t){index$1.registerInstance(this,t),this.nonce=dev_utils.nonce(),this.calcCount=(t,e=1)=>Math.ceil(t/e),this.getCount=()=>this.calcCount(this.state._max,this.state._pageSize),this.onClick=(t,e)=>{"function"==typeof this.state._on.onClick&&this.state._on.onClick(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.click,e),this.onChangePage(t,e)},this.onChangePage=(t,e)=>{const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePage&&this.state._on.onChangePage(t,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.changePage,e)}))},this.onChangePageSize=(t,e)=>{if("number"==typeof(e=parseInt(e[0]))&&e>0&&this._pageSize!==e){this._pageSize=e;const n=setTimeout((()=>{clearTimeout(n),"function"==typeof this.state._on.onChangePageSize&&this.state._on.onChangePageSize(t,this._pageSize),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.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,e)=>{let n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;const i=e.has("_pageSizeOptions")?e.get("_pageSizeOptions"):this.state._pageSizeOptions;if(Array.isArray(i)&&i.length>0){const t=i.find((t=>t.value===n));n=void 0===t?i[0].value:t.value,e.set("_pageSize",n)}const a=e.has("_page")?e.get("_page"):this.state._page,o=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,a,e.get("_pageSize"),o)},this.syncPage=(t,e,n,i)=>{if(i>0){const a=this.calcCount(i,n);a>0&&(e>a?(t.set("_page",a),this.onChangePage(index.STATE_CHANGE_EVENT,a)):e<1&&(t.set("_page",1),this.onChangePage(index.STATE_CHANGE_EVENT,1)))}},this.beforePageSizeOptions=(t,e)=>{const n=[];if(Array.isArray(t))for(const e of t)"number"==typeof e&&n.push({label:i18n.translate("kol-page-per-site",{placeholders:{entries:`${e}`}}),value:e});e.set("_pageSizeOptions",n),this.beforePageSize(n,e)},this._boundaryCount=1,this._customClass=void 0,this._label=void 0,this._hasButtons=!0,this._page=void 0,this._pageSize=1,this._pageSizeOptions=[],this._on=void 0,this._siblingCount=1,this._tooltipAlign="top",this._max=void 0,this.state={_boundaryCount:1,_label:i18n.translate("kol-pagination"),_hasButtons:{first:!0,last:!0,next:!0,previous:!0},_on:{onClick:()=>null},_page:0,_pageSize:1,_pageSizeOptions:[],_siblingCount:1,_max:0}}render(){var t;let e=!1;const n=this.getCount(),i=Array.from(Array(n).keys()).map((t=>t+1)).map((t=>t<=this.state._boundaryCount||t>n-this.state._boundaryCount||t>=this.state._page-this.state._siblingCount&&t<=this.state._page+this.state._siblingCount?(e=!0,this.state._page===t?this.getSelectedPageButton(t):this.getUnselectedPageButton(t)):!0===e?(e=!1,index$1.h("li",{key:dev_utils.nonce()},index$1.h("span",{class:"kol-pagination__separator","aria-hidden":"true"}))):null));return index$1.h(index$1.Host,{class:"kol-pagination"},index$1.h("nav",{class:"kol-pagination__navigation","aria-label":this.state._label},index$1.h("ul",{class:"kol-pagination__navigation-list"},this.state._hasButtons.first&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--first",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftDoubleArrowIcon,_hideLabel:!0,_label:i18n.translate("kol-page-first"),_on:this.onGoToFirst,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.previous&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--previous",exportparts:"icon",_customClass:this.state._customClass,_disabled:this.state._page<=1,_icons:leftSingleArrow,_hideLabel:!0,_label:i18n.translate("kol-page-back"),_on:this.onGoBackward,_tooltipAlign:this.state._tooltipAlign})),i,this.state._hasButtons.next&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--next",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:rightSingleArrowIcon,_hideLabel:!0,_label:i18n.translate("kol-page-next"),_on:this.onGoForward,_tooltipAlign:this.state._tooltipAlign})),this.state._hasButtons.last&&index$1.h("li",null,index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--last",exportparts:"icon",_customClass:this.state._customClass,_disabled:n<=this.state._page,_icons:rightDoubleArrowIcon,_hideLabel:!0,_label:i18n.translate("kol-page-last"),_on:this.onGoToEnd,_tooltipAlign:this.state._tooltipAlign})))),(null===(t=this.state._pageSizeOptions)||void 0===t?void 0:t.length)>0&&index$1.h(componentNames.KolSelectTag,{class:"kol-pagination__page-size-select",_hideLabel:!0,_id:`pagination-size-${this.nonce}`,_label:i18n.translate("kol-entries-per-site"),_options:this.state._pageSizeOptions,_on:{onChange:this.onChangePageSize},_value:[this.state._pageSize]}))}getUnselectedPageButton(t){return index$1.h("li",{key:dev_utils.nonce()},index$1.h(componentNames.KolButtonWcTag,{exportparts:"icon",_customClass:this.state._customClass,_label:"",_on:{onClick:e=>{this.onClick(e,t)}}},index$1.h("span",{slot:"expert"},index$1.h("span",{class:"visually-hidden"},i18n.translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}getSelectedPageButton(t){return index$1.h("li",{key:dev_utils.nonce()},index$1.h(componentNames.KolButtonWcTag,{class:"kol-pagination__button kol-pagination__button--selected",_customClass:this.state._customClass,_disabled:!0,_label:""},index$1.h("span",{slot:"expert"},index$1.h("span",{class:"visually-hidden"},i18n.translate("kol-page"))," ",NUMBER_FORMATTER.format(t))))}validateBoundaryCount(t){index.watchNumber(this,"_boundaryCount",Math.max(0,null!=t?t:1))}validateCustomClass(t){customClass.validateCustomClass(this,t)}validateLabel(t,e,n=!1){n||uniqueNavLabels.removeNavLabel(this.state._label),label.validateLabel(this,t),uniqueNavLabels.addNavLabel(this.state._label)}validateHasButtons(t){index.watchValidator(this,"_hasButtons",(t=>"boolean"==typeof t||"string"==typeof t||"object"==typeof t&&null!==t),new Set(["Boolean","PaginationHasButton"]),t,{hooks:{beforePatch:(t,e)=>{if("boolean"==typeof t)e.set("_hasButtons",{first:t,last:t,next:t,previous:t});else{if("string"==typeof t)try{t=index.parseJson(t)}catch(t){e.delete("_hasButtons")}"object"==typeof t&&null!==t&&e.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){index.watchNumber(this,"_page",t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize,i=e.has("_max")?e.get("_max"):this.state._max;this.syncPage(e,t,n,i)}}})}validatePageSize(t){index.watchNumber(this,"_pageSize",t,{hooks:{beforePatch:this.beforePageSize}})}validatePageSizeOptions(t){index.watchJsonArrayString(this,"_pageSizeOptions",(t=>"number"==typeof t),t,void 0,{hooks:{beforePatch:this.beforePageSizeOptions}})}validateSiblingCount(t){index.watchNumber(this,"_siblingCount",Math.max(0,null!=t?t:1))}validateMax(t){validateMax(this,t,{hooks:{beforePatch:(t,e)=>{const n=e.has("_page")?e.get("_page"):this.state._page,i=e.has("_pageSize")?e.get("_pageSize"):this.state._pageSize;this.syncPage(e,n,i,t)}}})}validateTooltipAlign(t){tooltipAlign.validateTooltipAlign(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(){uniqueNavLabels.removeNavLabel(this.state._label)}get host(){return index$1.getElement(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"]}}};KolPagination.style={default:KolPaginationDefaultStyle0},exports.kol_pagination=KolPagination;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-ae732dfd.js"),alignFloatingElements=require("./align-floating-elements-7e50809a.js"),componentNames=require("./component-names-f5f2ca3a.js");require("./index-94c17ce6.js");const align=require("./align-6dbf7621.js"),validatePopoverAlign=(e,t)=>{align.validateAlignment(e,"_popoverAlign",t)},KolPopoverButton=class{constructor(e){index.registerInstance(this,e),this.state={_label:"",_popoverAlign:"bottom"},this.justClosed=!1,this.popoverOpen=!1,this._accessKey=void 0,this._ariaControls=void 0,this._ariaDescription=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._popoverAlign="bottom",this._role=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}async hidePopover(){var e;null===(e=this.refPopover)||void 0===e||e.hidePopover()}handleBeforeToggle(e){"closed"===e.newState?(this.justClosed=!0,setTimeout((()=>{this.justClosed=!1}),10)):this.refPopover&&(this.refPopover.style.visibility="hidden")}alignPopover(){this.refPopover&&this.refButton&&alignFloatingElements.alignFloatingElements({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=alignFloatingElements.autoUpdate(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 index.h("div",{key:"2dacb79a5409c806df4d034ae9cd6aa3decb9a63",class:"kol-popover-button"},index.h(componentNames.KolButtonWcTag,{key:"d514f8f8e3208f140aed7ed14b263467e6f6b065",_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)},index.h("slot",{key:"e052e61aff815944f46363f663df0f1db3b0da24",name:"expert",slot:"expert"})),index.h("div",{key:"82aa1f6d4bfc555726160e50a2dd0000e4324847",ref:e=>this.refPopover=e,"data-testid":"popover-content",popover:"auto",id:"popover",class:"kol-popover-button__popover"},index.h("slot",{key:"fa8ac92afc9062d727dfc8599f83515b1523d9ba"})))}validatePopoverAlign(e){validatePopoverAlign(this,e)}componentWillLoad(){this.validatePopoverAlign(this._popoverAlign)}static get watchers(){return{_popoverAlign:["validatePopoverAlign"]}}};exports.kol_popover_button_wc=KolPopoverButton;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-popover-button-wc.entry.cjs.js","mappings":";;;;;;;;;;;;;AAiBO,MAAM,oBAAoB,GAAG,CAAC,SAAoC,EAAE,KAA4B;IACtGA,uBAAiB,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC;;MCaY,gBAAgB;;;qBAKiB;YAC5C,MAAM,EAAE,EAAE;YACV,aAAa,EAAE,QAAQ;SACvB;0BAC6B,KAAK;2BACJ,KAAK;;;;;;yBAiJC,KAAK;0BAOJ,KAAK;;;;;;6BA8BW,QAAQ;;;;;6BA0BR,KAAK;qBAKf,QAAQ;;wBAUF,QAAQ;;IAxNnD,MAAM,WAAW;;QACvB,MAAK,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,EAAE,CAAA,CAAC;KACpC;IAGO,kBAAkB,CAAC,KAAY;;QACtC,IAAK,KAAqB,CAAC,QAAQ,KAAK,QAAQ,EAAE;YACjD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YAEvB,UAAU,CAAC;gBAEV,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;aACxB,EAAE,EAAE,CAAC,CAAC;SACP;aAAM;YACN,IAAI,IAAI,CAAC,UAAU,EAAE;gBAIpB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;aAC5C;YAED,MAAK,MAAA,IAAI,CAAC,SAAS,0CAAE,WAAW,EAAE,CAAA,CAAC;SACnC;KACD;IAEO,YAAY;QACnB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE;YACtC,KAAKC,2CAAqB,CAAC;gBAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;gBAC/B,eAAe,EAAE,IAAI,CAAC,UAAU;gBAChC,gBAAgB,EAAE,IAAI,CAAC,SAAS;aAChC,CAAC,CAAC;SACH;KACD;IAEO,YAAY,CAAC,KAAY;QAChC,IAAI,CAAC,WAAW,GAAI,KAAqB,CAAC,QAAQ,KAAK,MAAM,CAAC;QAE9D,IAAI,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE;gBACtC,IAAI,CAAC,sBAAsB,GAAGC,gCAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE;oBACzE,IAAI,CAAC,YAAY,EAAE,CAAC;iBACpB,CAAC,CAAC;aACH;SACD;aAAM,IAAI,IAAI,CAAC,sBAAsB,EAAE;YACvC,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC9B,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;SACxC;KACD;IAEO,iBAAiB;;QAExB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACrB,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,EAAE,CAAC;SACjC;KACD;IAEM,kBAAkB;;QACxB,MAAA,IAAI,CAAC,UAAU,0CAAE,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1E,MAAA,IAAI,CAAC,UAAU,0CAAE,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACtF;IAEM,oBAAoB;;QAC1B,MAAA,IAAI,CAAC,UAAU,0CAAE,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7E,MAAA,IAAI,CAAC,UAAU,0CAAE,mBAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACzF,MAAA,IAAI,CAAC,sBAAsB,oDAAI,CAAC;KAChC;IAEM,MAAM;QACZ,QACCC,kEAAK,KAAK,EAAC,oBAAoB,IAC9BA,QAACC,6BAAc,qDACd,UAAU,EAAE,IAAI,CAAC,UAAU,oBACZ,SAAS,EACxB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,aAAa,EAAE,IAAI,CAAC,WAAW,EAC/B,aAAa,EAAE,QAAQ,EACvB,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,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,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,cAAc,EAAE,IAAI,CAAC,QAAQ,iBACjB,gBAAgB,EAC5B,KAAK,EAAC,4BAA4B,EAClC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,EAC5C,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,IAE1CD,mEAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAQ,CACzB,EAEjBA,kEAAK,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,iBAAc,iBAAiB,EAAC,OAAO,EAAC,MAAM,EAAC,EAAE,EAAC,SAAS,EAAC,KAAK,EAAC,6BAA6B,IAChJA,oEAAQ,CACH,CACD,EACL;KACF;IA+GM,oBAAoB,CAAC,KAA4B;QACvD,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAClC;IAEM,iBAAiB;QACvB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;KAC9C;;;;;;;;","names":["validateAlignment","alignFloatingElements","autoUpdate","h","KolButtonWcTag"],"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 */\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"],"version":3}
|
1
|
+
{"file":"kol-popover-button-wc.entry.cjs.js","mappings":";;;;;;;;;;;;;AAiBO,MAAM,oBAAoB,GAAG,CAAC,SAAoC,EAAE,KAA4B;IACtGA,uBAAiB,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC;;MCaY,gBAAgB;;;qBAKiB;YAC5C,MAAM,EAAE,EAAE;YACV,aAAa,EAAE,QAAQ;SACvB;0BAC6B,KAAK;2BACJ,KAAK;;;;;;yBA6IC,KAAK;0BAOJ,KAAK;;;;;;6BA8BW,QAAQ;;;;;6BA0BR,KAAK;qBAKf,QAAQ;;wBAUF,QAAQ;;IApNnD,MAAM,WAAW;;QACvB,MAAK,MAAA,IAAI,CAAC,UAAU,0CAAE,WAAW,EAAE,CAAA,CAAC;KACpC;IAGO,kBAAkB,CAAC,KAAY;QACtC,IAAK,KAAqB,CAAC,QAAQ,KAAK,QAAQ,EAAE;YACjD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YAEvB,UAAU,CAAC;gBAEV,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;aACxB,EAAE,EAAE,CAAC,CAAC;SACP;aAAM,IAAI,IAAI,CAAC,UAAU,EAAE;YAI3B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;SAC5C;KACD;IAEO,YAAY;QACnB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE;YACtC,KAAKC,2CAAqB,CAAC;gBAC1B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;gBAC/B,eAAe,EAAE,IAAI,CAAC,UAAU;gBAChC,gBAAgB,EAAE,IAAI,CAAC,SAAS;aAChC,CAAC,CAAC;SACH;KACD;IAEO,YAAY,CAAC,KAAY;QAChC,IAAI,CAAC,WAAW,GAAI,KAAqB,CAAC,QAAQ,KAAK,MAAM,CAAC;QAE9D,IAAI,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,EAAE;gBACtC,IAAI,CAAC,sBAAsB,GAAGC,gCAAU,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE;oBACzE,IAAI,CAAC,YAAY,EAAE,CAAC;iBACpB,CAAC,CAAC;aACH;SACD;aAAM,IAAI,IAAI,CAAC,sBAAsB,EAAE;YACvC,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC9B,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;SACxC;KACD;IAEO,iBAAiB;;QAExB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACrB,MAAA,IAAI,CAAC,UAAU,0CAAE,aAAa,EAAE,CAAC;SACjC;KACD;IAEM,kBAAkB;;QACxB,MAAA,IAAI,CAAC,UAAU,0CAAE,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1E,MAAA,IAAI,CAAC,UAAU,0CAAE,gBAAgB,CAAC,cAAc,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;KACtF;IAEM,oBAAoB;;QAC1B,MAAA,IAAI,CAAC,UAAU,0CAAE,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7E,MAAA,IAAI,CAAC,UAAU,0CAAE,mBAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACzF,MAAA,IAAI,CAAC,sBAAsB,oDAAI,CAAC;KAChC;IAEM,MAAM;QACZ,QACCC,kEAAK,KAAK,EAAC,oBAAoB,IAC9BA,QAACC,6BAAc,qDACd,UAAU,EAAE,IAAI,CAAC,UAAU,oBACZ,SAAS,EACxB,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EACvC,aAAa,EAAE,IAAI,CAAC,WAAW,EAC/B,aAAa,EAAE,QAAQ,EACvB,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,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,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,cAAc,EAAE,IAAI,CAAC,QAAQ,iBACjB,gBAAgB,EAC5B,KAAK,EAAC,4BAA4B,EAClC,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,EAC5C,OAAO,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,IAE1CD,mEAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAQ,CACzB,EAEjBA,kEAAK,GAAG,EAAE,CAAC,OAAO,MAAM,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,iBAAc,iBAAiB,EAAC,OAAO,EAAC,MAAM,EAAC,EAAE,EAAC,SAAS,EAAC,KAAK,EAAC,6BAA6B,IAChJA,oEAAQ,CACH,CACD,EACL;KACF;IA+GM,oBAAoB,CAAC,KAA4B;QACvD,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;KAClC;IAEM,iBAAiB;QACvB,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;KAC9C;;;;;;;;","names":["validateAlignment","alignFloatingElements","autoUpdate","h","KolButtonWcTag"],"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 if (this.refPopover) {\n\t\t\t/**\n\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 */\n\t\t\tthis.refPopover.style.visibility = 'hidden';\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 */\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"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-ae732dfd.js"),componentNames=require("./component-names-f5f2ca3a.js"),defaultStyleCss="@charset \"UTF-8\";\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\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 a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\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 * 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 * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: 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}\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 clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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 border: none;\n margin: 0;\n padding: 0;\n width: 100%;\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 background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\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 }\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 cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n }\n .kol-button {\n font-style: calc(16rem / var(--kolibri-root-font-size, 16));\n display: inline-flex;\n place-items: center;\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 margin: auto;\n width: 100%;\n }\n}\n@layer kol-component {\n .kol-popover-button__button {\n display: inline-block;\n }\n .kol-popover-button__popover {\n border: 1px solid #000;\n margin: 0;\n padding: 0;\n }\n}",KolPopoverButtonDefaultStyle0=defaultStyleCss,KolPopoverButton=class{constructor(n){index.registerInstance(this,n),this._accessKey=void 0,this._ariaControls=void 0,this._ariaDescription=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._popoverAlign="bottom",this._role=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal"}async hidePopover(){var n;null===(n=this.ref)||void 0===n||n.hidePopover()}render(){return index.h(componentNames.KolPopoverButtonWcTag,{key:"f116338f1f3cd8bb93907e4609d0fcbfea9992c4",ref:n=>this.ref=n,_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,_role:this._role,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_variant:this._variant},index.h("slot",{key:"93fe9317598006721f26047934b261bdcb6274b2",name:"expert",slot:"expert"}),index.h("slot",{key:"ec45ecc130d0d980a933fc83a01ef2d5d61b7a93"}))}};KolPopoverButton.style={default:KolPopoverButtonDefaultStyle0},exports.kol_popover_button=KolPopoverButton;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-
|
4
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index$1=require("./index-ae732dfd.js"),index=require("./index-94c17ce6.js"),alignFloatingElements=require("./align-floating-elements-7e50809a.js"),clsx=require("./clsx-dd4d6dd1.js"),events=require("./events-df7aa71f.js"),align=require("./align-6dbf7621.js"),show=require("./show-0449c2d9.js"),validatePopoverCallbacks=(e,t)=>{index.watchValidator(e,"_on",(e=>"object"==typeof e&&null!==e),new Set(["PopoverCallbacksPropType {Events.onClose}"]),t)},KolPopover=class{constructor(e){index$1.registerInstance(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._on=void 0,this._show=!1,this.state={_align:"top",_on:{},_show:!1,_visible:!1}}async showPopover(){this.addListenersToBody(),this.triggerElement&&this.popoverElement&&(await alignFloatingElements.alignFloatingElements({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,i,s;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===(s=null===(i=this.state._on)||void 0===i?void 0:i.onClose)||void 0===s||s.call(i,e),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.close)}addListenersToBody(){var e;const t=index.getDocument().body;t.addEventListener("keyup",this.hidePopoverByEscape),t.addEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.addEventListener("scroll",(()=>{this.showPopover()}),{passive:!0})}removeListenersToBody(){var e;const t=index.getDocument().body;t.removeEventListener("keyup",this.hidePopoverByEscape),t.removeEventListener("click",this.hidePopoverByClickOutside),null===(e=document.scrollingElement)||void 0===e||e.removeEventListener("scroll",(()=>{this.showPopover()}))}render(){return index$1.h(index$1.Host,{key:"0e4417b04026533fed39e55e37c4b0257d1619ed",ref:this.catchHostAndTriggerElement,class:"kol-popover"},index$1.h("div",{key:"3135a074c8effed62444d63f72b17f4857532f21",class:clsx.clsx("kol-popover__content",{"kol-popover__content--visible":this.state._visible}),ref:this.catchPopoverElement,hidden:!this.state._show},index$1.h("div",{key:"f058aefc95d866b4fdb21b13ea1ca865b9e27106",class:clsx.clsx("kol-popover__arrow",`kol-popover__arrow--${this.state._align}`),ref:this.catchArrowElement}),index$1.h("slot",{key:"9828753438fb3c917db8fd27ca1063b8acc09d84"})))}validateAlign(e){align.validateAlign(this,e)}validateOn(e){validatePopoverCallbacks(this,e)}validateShow(e){show.validateShow(this,e),e&&this.showPopover()}componentWillLoad(){this.validateAlign(this._align),this.validateShow(this._show)}static get watchers(){return{_align:["validateAlign"],_on:["validateOn"],_show:["validateShow"]}}};exports.kol_popover_wc=KolPopover;
|