@public-ui/components 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +9 -38
- package/dist/cjs/align-floating-elements-615a9802.js +4 -0
- package/dist/cjs/align-floating-elements-615a9802.js.map +1 -0
- package/dist/cjs/app-globals-87fb9784.js +4 -0
- package/dist/cjs/app-globals-87fb9784.js.map +1 -0
- package/dist/cjs/color-55efaf6b.js +4 -0
- package/dist/cjs/color-55efaf6b.js.map +1 -0
- package/dist/cjs/controller-815d3790.js +4 -0
- package/dist/cjs/controller-815d3790.js.map +1 -0
- package/dist/cjs/controller-e04cbd17.js +4 -0
- package/dist/cjs/controller-e04cbd17.js.map +1 -0
- package/dist/cjs/{controller-e9bd89d3.js → controller-f787d978.js} +1 -1
- package/dist/cjs/{controller-e9bd89d3.js.map → controller-f787d978.js.map} +1 -1
- package/dist/cjs/{dev.utils-6269fd5e.js → dev.utils-15a6b064.js} +1 -1
- package/dist/cjs/{dev.utils-6269fd5e.js.map → dev.utils-15a6b064.js.map} +1 -1
- package/dist/cjs/dev.utils-3e595d38.js.map +1 -1
- package/dist/cjs/{devtools-cfd80347.js → devtools-2e58d67d.js} +1 -1
- package/dist/cjs/{devtools-cfd80347.js.map → devtools-2e58d67d.js.map} +1 -1
- package/dist/cjs/{i18n-7734d6cc.js → i18n-86815e80.js} +1 -1
- package/dist/cjs/{i18n-7734d6cc.js.map → i18n-86815e80.js.map} +1 -1
- package/dist/cjs/i18n-bbd0642f.js +4 -0
- package/dist/cjs/i18n-bbd0642f.js.map +1 -0
- package/dist/cjs/index-b404dbee.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +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-password.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-group.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-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-logo.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-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-span.cjs.entry.js +1 -1
- package/dist/cjs/kol-span.cjs.entry.js.map +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-symbol.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-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-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/kolibri.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/unique-nav-labels-e8b42978.js +4 -0
- package/dist/cjs/unique-nav-labels-e8b42978.js.map +1 -0
- package/dist/components/align-floating-elements.js +1 -1
- package/dist/components/align-floating-elements.js.map +1 -1
- package/dist/components/color.js +1 -1
- package/dist/components/color.js.map +1 -1
- package/dist/components/controller.js +1 -1
- package/dist/components/controller.js.map +1 -1
- package/dist/components/controller5.js +1 -1
- package/dist/components/controller5.js.map +1 -1
- package/dist/components/dev.utils.js.map +1 -1
- package/dist/components/dev.utils2.js +1 -1
- package/dist/components/dev.utils2.js.map +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/i18n.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/kol-button-link.js +1 -1
- package/dist/components/kol-button-link.js.map +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-combobox.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-password.js.map +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-link.js.map +1 -1
- package/dist/components/kol-span-wc.js +1 -1
- package/dist/components/kol-span-wc.js.map +1 -1
- package/dist/components/kol-span.js +1 -1
- package/dist/components/kol-span.js.map +1 -1
- package/dist/components/unique-nav-labels.js +1 -1
- package/dist/components/unique-nav-labels.js.map +1 -1
- package/dist/esm/align-floating-elements-a2bc42d2.js +4 -0
- package/dist/esm/align-floating-elements-a2bc42d2.js.map +1 -0
- package/dist/esm/app-globals-60d73ce0.js +4 -0
- package/dist/esm/app-globals-60d73ce0.js.map +1 -0
- package/dist/{cjs/color-db334198.js → esm/color-1d05d57c.js} +1 -1
- package/dist/esm/color-1d05d57c.js.map +1 -0
- package/dist/esm/{controller-c1cc25c9.js → controller-65e00bdd.js} +1 -1
- package/dist/esm/{controller-c1cc25c9.js.map → controller-65e00bdd.js.map} +1 -1
- package/dist/esm/controller-a3ede655.js +4 -0
- package/dist/esm/controller-a3ede655.js.map +1 -0
- package/dist/esm/controller-b76f9bb2.js +4 -0
- package/dist/esm/controller-b76f9bb2.js.map +1 -0
- package/dist/esm/dev.utils-1ca991a2.js.map +1 -1
- package/dist/esm/{dev.utils-eeeb0158.js → dev.utils-698b2d79.js} +1 -1
- package/dist/esm/{dev.utils-eeeb0158.js.map → dev.utils-698b2d79.js.map} +1 -1
- package/dist/esm/{devtools-a014b26f.js → devtools-8e11b70a.js} +1 -1
- package/dist/esm/{devtools-a014b26f.js.map → devtools-8e11b70a.js.map} +1 -1
- package/dist/esm/i18n-112381e9.js +4 -0
- package/dist/esm/{i18n-342bc196.js.map → i18n-112381e9.js.map} +1 -1
- package/dist/esm/i18n-66b52d13.js +4 -0
- package/dist/esm/i18n-66b52d13.js.map +1 -0
- package/dist/esm/index-360ad69b.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js.map +1 -1
- package/dist/esm/kol-button-wc.entry.js +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js.map +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-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-password.entry.js.map +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-input.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-group.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-link.entry.js.map +1 -1
- package/dist/esm/kol-logo.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-wc.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-span-wc.entry.js +1 -1
- package/dist/esm/kol-span-wc.entry.js.map +1 -1
- package/dist/esm/kol-span.entry.js +1 -1
- package/dist/esm/kol-span.entry.js.map +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-symbol.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-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-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/kolibri.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/unique-nav-labels-29aef441.js +4 -0
- package/dist/esm/unique-nav-labels-29aef441.js.map +1 -0
- package/dist/kolibri/align-floating-elements-a2bc42d2.js +4 -0
- package/dist/kolibri/align-floating-elements-a2bc42d2.js.map +1 -0
- package/dist/kolibri/app-globals-60d73ce0.js +4 -0
- package/dist/kolibri/app-globals-60d73ce0.js.map +1 -0
- package/dist/kolibri/color-1d05d57c.js +4 -0
- package/dist/kolibri/color-1d05d57c.js.map +1 -0
- package/dist/kolibri/{controller-c1cc25c9.js → controller-65e00bdd.js} +1 -1
- package/dist/kolibri/controller-a3ede655.js +4 -0
- package/dist/kolibri/controller-a3ede655.js.map +1 -0
- package/dist/kolibri/controller-b76f9bb2.js +4 -0
- package/dist/kolibri/controller-b76f9bb2.js.map +1 -0
- package/dist/kolibri/dev.utils-1ca991a2.js.map +1 -1
- package/dist/kolibri/dev.utils-698b2d79.js +4 -0
- package/dist/kolibri/{dev.utils-eeeb0158.js.map → dev.utils-698b2d79.js.map} +1 -1
- package/dist/kolibri/{devtools-a014b26f.js → devtools-8e11b70a.js} +1 -1
- package/dist/kolibri/i18n-112381e9.js +4 -0
- package/dist/kolibri/i18n-66b52d13.js +4 -0
- package/dist/kolibri/i18n-66b52d13.js.map +1 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/index.esm.js.map +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.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-link.entry.js.map +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js.map +1 -1
- package/dist/kolibri/kol-form.entry.js +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-password.entry.js.map +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-input.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-group.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-link.entry.js.map +1 -1
- package/dist/kolibri/kol-logo.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-wc.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-span-wc.entry.js +1 -1
- package/dist/kolibri/kol-span-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-span.entry.js +1 -1
- package/dist/kolibri/kol-span.entry.js.map +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-symbol.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-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-tooltip-wc.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/unique-nav-labels-29aef441.js +4 -0
- package/dist/kolibri/unique-nav-labels-29aef441.js.map +1 -0
- package/dist/types/components/input-checkbox/shadow.d.ts +2 -2
- package/dist/types/components/input-password/controller.d.ts +2 -0
- package/dist/types/components/input-password/shadow.d.ts +4 -0
- package/dist/types/components.d.ts +11 -1
- package/dist/types/locales/de.d.ts +2 -0
- package/dist/types/locales/en.d.ts +2 -0
- package/dist/types/schema/components/input-password.d.ts +3 -2
- package/dist/types/schema/props/variant/password-variant.d.ts +8 -0
- package/doc/input-checkbox.md +2 -2
- package/doc/input-date.md +7 -7
- package/doc/input-password.md +1 -0
- package/doc/span.md +1 -5
- package/package.json +1 -1
- package/vscode-custom-data.json +12 -25
- package/dist/cjs/align-floating-elements-915d7026.js +0 -4
- package/dist/cjs/align-floating-elements-915d7026.js.map +0 -1
- package/dist/cjs/app-globals-d8811028.js +0 -4
- package/dist/cjs/app-globals-d8811028.js.map +0 -1
- package/dist/cjs/color-db334198.js.map +0 -1
- package/dist/cjs/controller-0bd89e13.js +0 -4
- package/dist/cjs/controller-0bd89e13.js.map +0 -1
- package/dist/cjs/controller-586919c6.js +0 -4
- package/dist/cjs/controller-586919c6.js.map +0 -1
- package/dist/cjs/details-synced-open-state-e88811c7.js +0 -4
- package/dist/cjs/details-synced-open-state-e88811c7.js.map +0 -1
- package/dist/cjs/i18n-b542daad.js +0 -4
- package/dist/cjs/i18n-b542daad.js.map +0 -1
- package/dist/cjs/index-ba8af7c0.js +0 -4
- package/dist/cjs/index-ba8af7c0.js.map +0 -1
- package/dist/cjs/input-error-ac3a12f5.js +0 -4
- package/dist/cjs/input-error-ac3a12f5.js.map +0 -1
- package/dist/cjs/reprod-accordion-does-not-toggle-with-open-092e559d.js +0 -4
- package/dist/cjs/reprod-accordion-does-not-toggle-with-open-092e559d.js.map +0 -1
- package/dist/cjs/table-render-function-7d9ebadc.js +0 -4
- package/dist/cjs/table-render-function-7d9ebadc.js.map +0 -1
- package/dist/cjs/toaster-4691f9e0.js +0 -4
- package/dist/cjs/toaster-4691f9e0.js.map +0 -1
- package/dist/cjs/toaster-b20f853f.js +0 -4
- package/dist/cjs/toaster-b20f853f.js.map +0 -1
- package/dist/cjs/unique-nav-labels-363e1d71.js +0 -4
- package/dist/cjs/unique-nav-labels-363e1d71.js.map +0 -1
- package/dist/components/details-synced-open-state.js +0 -4
- package/dist/components/details-synced-open-state.js.map +0 -1
- package/dist/components/index2.js +0 -4
- package/dist/components/index2.js.map +0 -1
- package/dist/components/input-error.js +0 -4
- package/dist/components/input-error.js.map +0 -1
- package/dist/components/reprod-accordion-does-not-toggle-with-open.js +0 -4
- package/dist/components/reprod-accordion-does-not-toggle-with-open.js.map +0 -1
- package/dist/components/table-render-function.js +0 -4
- package/dist/components/table-render-function.js.map +0 -1
- package/dist/components/toaster.js +0 -4
- package/dist/components/toaster.js.map +0 -1
- package/dist/esm/align-floating-elements-1c3e002c.js +0 -4
- package/dist/esm/align-floating-elements-1c3e002c.js.map +0 -1
- package/dist/esm/app-globals-c0120fb2.js +0 -4
- package/dist/esm/app-globals-c0120fb2.js.map +0 -1
- package/dist/esm/color-e0b3e0c8.js +0 -4
- package/dist/esm/color-e0b3e0c8.js.map +0 -1
- package/dist/esm/controller-279935b0.js +0 -4
- package/dist/esm/controller-279935b0.js.map +0 -1
- package/dist/esm/controller-f204bd94.js +0 -4
- package/dist/esm/controller-f204bd94.js.map +0 -1
- package/dist/esm/details-synced-open-state-45ecc035.js +0 -4
- package/dist/esm/details-synced-open-state-45ecc035.js.map +0 -1
- package/dist/esm/i18n-342bc196.js +0 -4
- package/dist/esm/i18n-ebe0c4cb.js +0 -4
- package/dist/esm/i18n-ebe0c4cb.js.map +0 -1
- package/dist/esm/index-fc91b59f.js +0 -4
- package/dist/esm/index-fc91b59f.js.map +0 -1
- package/dist/esm/input-error-bc5a177b.js +0 -4
- package/dist/esm/input-error-bc5a177b.js.map +0 -1
- package/dist/esm/reprod-accordion-does-not-toggle-with-open-930fccf8.js +0 -4
- package/dist/esm/reprod-accordion-does-not-toggle-with-open-930fccf8.js.map +0 -1
- package/dist/esm/table-render-function-835a18a0.js +0 -4
- package/dist/esm/table-render-function-835a18a0.js.map +0 -1
- package/dist/esm/toaster-2a2c09ae.js +0 -4
- package/dist/esm/toaster-2a2c09ae.js.map +0 -1
- package/dist/esm/toaster-3755abc8.js +0 -4
- package/dist/esm/toaster-3755abc8.js.map +0 -1
- package/dist/esm/unique-nav-labels-62d9802d.js +0 -4
- package/dist/esm/unique-nav-labels-62d9802d.js.map +0 -1
- package/dist/kolibri/align-floating-elements-1c3e002c.js +0 -4
- package/dist/kolibri/align-floating-elements-1c3e002c.js.map +0 -1
- package/dist/kolibri/app-globals-c0120fb2.js +0 -4
- package/dist/kolibri/app-globals-c0120fb2.js.map +0 -1
- package/dist/kolibri/color-e0b3e0c8.js +0 -4
- package/dist/kolibri/color-e0b3e0c8.js.map +0 -1
- package/dist/kolibri/controller-279935b0.js +0 -4
- package/dist/kolibri/controller-279935b0.js.map +0 -1
- package/dist/kolibri/controller-f204bd94.js +0 -4
- package/dist/kolibri/controller-f204bd94.js.map +0 -1
- package/dist/kolibri/details-synced-open-state-45ecc035.js +0 -4
- package/dist/kolibri/details-synced-open-state-45ecc035.js.map +0 -1
- package/dist/kolibri/dev.utils-eeeb0158.js +0 -4
- package/dist/kolibri/i18n-342bc196.js +0 -4
- package/dist/kolibri/i18n-ebe0c4cb.js +0 -4
- package/dist/kolibri/i18n-ebe0c4cb.js.map +0 -1
- package/dist/kolibri/index-fc91b59f.js +0 -4
- package/dist/kolibri/index-fc91b59f.js.map +0 -1
- package/dist/kolibri/input-error-bc5a177b.js +0 -4
- package/dist/kolibri/input-error-bc5a177b.js.map +0 -1
- package/dist/kolibri/reprod-accordion-does-not-toggle-with-open-930fccf8.js +0 -4
- package/dist/kolibri/reprod-accordion-does-not-toggle-with-open-930fccf8.js.map +0 -1
- package/dist/kolibri/table-render-function-835a18a0.js +0 -4
- package/dist/kolibri/table-render-function-835a18a0.js.map +0 -1
- package/dist/kolibri/toaster-2a2c09ae.js +0 -4
- package/dist/kolibri/toaster-2a2c09ae.js.map +0 -1
- package/dist/kolibri/toaster-3755abc8.js +0 -4
- package/dist/kolibri/toaster-3755abc8.js.map +0 -1
- package/dist/kolibri/unique-nav-labels-62d9802d.js +0 -4
- package/dist/kolibri/unique-nav-labels-62d9802d.js.map +0 -1
- package/dist/types/dev/details-synced-open-state.d.ts +0 -2
- package/dist/types/dev/index.d.ts +0 -1
- package/dist/types/dev/input-error.d.ts +0 -2
- package/dist/types/dev/reprod-accordion-does-not-toggle-with-open.d.ts +0 -2
- package/dist/types/dev/table-render-function.d.ts +0 -1
- package/dist/types/dev/theme-registration.d.ts +0 -1
- package/dist/types/dev/toaster.d.ts +0 -1
- /package/dist/kolibri/{controller-c1cc25c9.js.map → controller-65e00bdd.js.map} +0 -0
- /package/dist/kolibri/{devtools-a014b26f.js.map → devtools-8e11b70a.js.map} +0 -0
- /package/dist/kolibri/{i18n-342bc196.js.map → i18n-112381e9.js.map} +0 -0
package/dist/esm/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{o as oe}from"./index-db4aa6e4.js";export{s as setCurrentLocation}from"./ariaCurrentService-6fe36ebc.js";
|
4
|
+
import{o as oe,G}from"./index-db4aa6e4.js";export{s as setCurrentLocation}from"./ariaCurrentService-6fe36ebc.js";import{s as setCustomTagNames,K as KolToastContainerTag}from"./component-names-e522484e.js";import{i as initializeI18n}from"./i18n-66b52d13.js";import{L as Log}from"./dev.utils-1ca991a2.js";export{c as BUNDESAEMTER,e as BUNDESANSTALTEN,a as BUNDESMINISTERIEN,f as BUND_LOGO_TEXT_MAP,b as Bundesamt,d as Bundesanstalt,B as Bundesministerium}from"./bund-ad41b762.js";export{K as KoliBriDevHelper}from"./prop.validators-f2b9a155.js";var KeyEnum,TagEnum;!function(t){t[t.error=0]="error",t[t.warning=1]="warning",t[t.info=2]="info",t[t.success=3]="success",t[t.message=4]="message",t[t.close=5]="close",t[t["form-description"]=6]="form-description",t[t.of=7]="of",t[t.characters=8]="characters",t[t.new=9]="new",t[t["no-entries"]=10]="no-entries",t[t["change-order"]=11]="change-order",t[t["action-running"]=12]="action-running",t[t["action-done"]=13]="action-done",t[t["page-first"]=14]="page-first",t[t["page-back"]=15]="page-back",t[t["page-next"]=16]="page-next",t[t["page-last"]=17]="page-last",t[t["entries-per-site"]=18]="entries-per-site",t[t["page-current"]=19]="page-current",t[t["page-selected"]=20]="page-selected",t[t["page-per-site"]=21]="page-per-site",t[t["logo-description"]=22]="logo-description",t[t["open-link-in-tab"]=23]="open-link-in-tab",t[t["kolibri-logo"]=24]="kolibri-logo"}(KeyEnum||(KeyEnum={})),function(t){t[t.abbr=0]="abbr",t[t.accordion=1]="accordion",t[t["accordion-group"]=2]="accordion-group",t[t.alert=3]="alert",t[t.avatar=4]="avatar",t[t.badge=5]="badge",t[t.breadcrumb=6]="breadcrumb",t[t.button=7]="button",t[t["button-group"]=8]="button-group",t[t["button-link"]=9]="button-link",t[t.card=10]="card",t[t.combobox=11]="combobox",t[t.details=12]="details",t[t.form=13]="form",t[t.heading=14]="heading",t[t.icon=15]="icon",t[t.image=16]="image",t[t["indented-text"]=17]="indented-text",t[t["input-checkbox"]=18]="input-checkbox",t[t["input-color"]=19]="input-color",t[t["input-date"]=20]="input-date",t[t["input-email"]=21]="input-email",t[t["input-file"]=22]="input-file",t[t["input-number"]=23]="input-number",t[t["input-password"]=24]="input-password",t[t["input-radio"]=25]="input-radio",t[t["input-range"]=26]="input-range",t[t["input-text"]=27]="input-text",t[t.kolibri=28]="kolibri",t[t.link=29]="link",t[t["link-button"]=30]="link-button",t[t["link-group"]=31]="link-group",t[t.logo=32]="logo",t[t.modal=33]="modal",t[t.nav=34]="nav",t[t.pagination=35]="pagination",t[t.progress=36]="progress",t[t.select=37]="select",t[t.separator=38]="separator",t[t["skip-nav"]=39]="skip-nav",t[t.spin=40]="spin",t[t["split-button"]=41]="split-button",t[t.symbol=42]="symbol",t[t.table=43]="table",t[t["table-stateless"]=44]="table-stateless",t[t["table-stateful"]=45]="table-stateful",t[t.tabs=46]="tabs",t[t.textarea=47]="textarea",t[t["toast-container"]=48]="toast-container",t[t.toolbar=49]="toolbar",t[t.tooltip=50]="tooltip",t[t.tree=51]="tree",t[t["tree-item"]=52]="tree-item"}(TagEnum||(TagEnum={}));const KoliBri=new oe("kol",KeyEnum,TagEnum);let initialized=!1;const bootstrap=async(t,e,n)=>{var o,i;initializeI18n(null!==(i=null===(o=null==n?void 0:n.translation)||void 0===o?void 0:o.name)&&void 0!==i?i:"de",null==n?void 0:n.translations),(null==n?void 0:n.transformTagName)&&setCustomTagNames(null==n?void 0:n.transformTagName);const a=await G(t,e,n);return initialized=!0,a},register=bootstrap,isInitialized=()=>initialized;class ToasterService{constructor(t,e){this.document=t,this.options=e,this.toastContainerElement=this.document.createElement(KolToastContainerTag),this.document.body.prepend(this.toastContainerElement)}static getInstance(t,e){if(!isInitialized())throw new Error("Toaster: Call KoliBri bootstrap/register method first.");let n=this.instances.get(t);return n||(n=new ToasterService(t,e),this.instances.set(t,n)),n}dispose(){const t=this.toastContainerElement;t?(this.toastContainerElement=void 0,t.remove()):Log.warn("Toaster service is already disposed.",{forceLog:!0})}enqueue(t){var e,n;if(this.toastContainerElement&&"function"==typeof this.toastContainerElement.enqueue)return!t.alertVariant&&(null===(e=this.options)||void 0===e?void 0:e.defaultAlertVariant)&&(t.alertVariant=null===(n=this.options)||void 0===n?void 0:n.defaultAlertVariant),this.toastContainerElement.enqueue(t)}closeAll(t=!1){this.toastContainerElement&&"function"==typeof this.toastContainerElement.closeAll&&this.toastContainerElement.closeAll(t)}}ToasterService.instances=new Map;export{KoliBri,ToasterService,bootstrap,register};
|
package/dist/esm/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"file":"index.js","mappings":"
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;AAAA,IAAY,OA0BX;AA1BD,WAAY,OAAO;IAClB,uCAAO,CAAA;IACP,2CAAS,CAAA;IACT,qCAAM,CAAA;IACN,2CAAS,CAAA;IACT,2CAAS,CAAA;IACT,uCAAO,CAAA;IACP,6DAAkB,CAAA;IAClB,iCAAI,CAAA;IACJ,iDAAY,CAAA;IACZ,mCAAK,CAAA;IACL,kDAAY,CAAA;IACZ,sDAAc,CAAA;IACd,0DAAgB,CAAA;IAChB,oDAAa,CAAA;IACb,kDAAY,CAAA;IACZ,gDAAW,CAAA;IACX,gDAAW,CAAA;IACX,gDAAW,CAAA;IACX,8DAAkB,CAAA;IAClB,sDAAc,CAAA;IACd,wDAAe,CAAA;IACf,wDAAe,CAAA;IACf,8DAAkB,CAAA;IAClB,8DAAkB,CAAA;IAClB,sDAAc,CAAA;AACf,CAAC,EA1BW,OAAO,KAAP,OAAO;;ACAnB,IAAY,OAsDX;AAtDD,WAAY,OAAO;IAClB,qCAAM,CAAA;IACN,+CAAW,CAAA;IACX,2DAAiB,CAAA;IACjB,uCAAO,CAAA;IACP,yCAAQ,CAAA;IACR,uCAAO,CAAA;IACP,iDAAY,CAAA;IACZ,yCAAQ,CAAA;IACR,qDAAc,CAAA;IACd,mDAAa,CAAA;IACb,sCAAM,CAAA;IACN,8CAAU,CAAA;IACV,4CAAS,CAAA;IACT,sCAAM,CAAA;IACN,4CAAS,CAAA;IACT,sCAAM,CAAA;IACN,wCAAO,CAAA;IACP,wDAAe,CAAA;IACf,0DAAgB,CAAA;IAChB,oDAAa,CAAA;IACb,kDAAY,CAAA;IACZ,oDAAa,CAAA;IACb,kDAAY,CAAA;IACZ,sDAAc,CAAA;IACd,0DAAgB,CAAA;IAChB,oDAAa,CAAA;IACb,oDAAa,CAAA;IACb,kDAAY,CAAA;IACZ,4CAAS,CAAA;IACT,sCAAM,CAAA;IACN,oDAAa,CAAA;IACb,kDAAY,CAAA;IACZ,sCAAM,CAAA;IACN,wCAAO,CAAA;IACP,oCAAK,CAAA;IACL,kDAAY,CAAA;IACZ,8CAAU,CAAA;IACV,0CAAQ,CAAA;IACR,gDAAW,CAAA;IACX,8CAAU,CAAA;IACV,sCAAM,CAAA;IACN,sDAAc,CAAA;IACd,0CAAQ,CAAA;IACR,wCAAO,CAAA;IACP,4DAAiB,CAAA;IACjB,0DAAgB,CAAA;IAChB,sCAAM,CAAA;IACN,8CAAU,CAAA;IACV,4DAAiB,CAAA;IACjB,4CAAS,CAAA;IACT,4CAAS,CAAA;IACT,sCAAM,CAAA;IACN,gDAAW,CAAA;AACZ,CAAC,EAtDW,OAAO,KAAP,OAAO;;MCKN,OAAO,GAAG,IAAIA,EAAK,CAAoD,KAAK,EAAE,OAAO,EAAE,OAAO;;ACA3G,IAAI,WAAW,GAAG,KAAK,CAAC;MAMX,SAAS,GAAG,OACxB,MAG6D,EAC7D,OAAgE,EAChE,OAAwB;;IAExB,cAAc,CAAC,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,0CAAE,IAAI,mCAAI,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,YAAY,CAAC,CAAC;IAC1E,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,EAAE;QAC9B,iBAAiB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,CAAC,CAAC;KAC7C;IACD,MAAM,uBAAuB,GAAG,MAAMC,CAAY,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC7E,WAAW,GAAG,IAAI,CAAC;IAEnB,OAAO,uBAAuB,CAAC;AAChC,EAAE;MAEW,QAAQ,GAAG,UAAU;AAC3B,MAAM,aAAa,GAAG,MAAM,WAAW;;MCzBjC,cAAc;IAK1B,YACkB,QAAkB,EAClB,OAAwB;QADxB,aAAQ,GAAR,QAAQ,CAAU;QAClB,YAAO,GAAP,OAAO,CAAiB;QAEzC,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;QAC/E,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;KACvD;IAKM,OAAO,WAAW,CAAC,QAAkB,EAAE,OAAwB;QACrE,IAAI,CAAC,aAAa,EAAE,EAAE;YACrB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;SAC1E;QAED,IAAI,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,EAAE;YACd,QAAQ,GAAG,IAAI,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACjD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;SACvC;QACD,OAAO,QAAQ,CAAC;KAChB;IAEM,OAAO;QACb,MAAM,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC;QAC3C,IAAI,OAAO,EAAE;YACZ,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC;YACvC,OAAO,CAAC,MAAM,EAAE,CAAC;SACjB;aAAM;YACN,GAAG,CAAC,IAAI,CAAC,sCAAsC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;SACrE;KACD;IAEM,OAAO,CAAC,KAAY;;QAK1B,IAAI,IAAI,CAAC,qBAAqB,IAAI,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,KAAK,UAAU,EAAE;YAC3F,IAAI,CAAC,KAAK,CAAC,YAAY,KAAI,MAAA,IAAI,CAAC,OAAO,0CAAE,mBAAmB,CAAA,EAAE;gBAC7D,KAAK,CAAC,YAAY,GAAG,MAAA,IAAI,CAAC,OAAO,0CAAE,mBAAmB,CAAC;aACvD;YAED,OAAO,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;SACjD;KACD;IAEM,QAAQ,CAAC,YAAqB,KAAK;QACzC,IAAI,IAAI,CAAC,qBAAqB,IAAI,OAAO,IAAI,CAAC,qBAAqB,CAAC,QAAQ,KAAK,UAAU,EAAE;YAC5F,KAAK,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;SACpD;KACD;;AAxDuB,wBAAS,GAAkC,IAAI,GAAG,EAA4B;;;;","names":["Theme","coreRegister"],"sources":["src/schema/i18n-keys.ts","src/schema/tag-names.ts","src/schema/index.ts","src/core/bootstrap.ts","src/components/toaster/toaster.tsx"],"sourcesContent":["export enum KeyEnum {\n\t'error',\n\t'warning',\n\t'info',\n\t'success',\n\t'message',\n\t'close',\n\t'form-description',\n\t'of',\n\t'characters',\n\t'new',\n\t'no-entries',\n\t'change-order',\n\t'action-running',\n\t'action-done',\n\t'page-first',\n\t'page-back',\n\t'page-next',\n\t'page-last',\n\t'entries-per-site',\n\t'page-current',\n\t'page-selected',\n\t'page-per-site',\n\t'logo-description',\n\t'open-link-in-tab',\n\t'kolibri-logo',\n}\n","export enum TagEnum {\n\t'abbr',\n\t'accordion',\n\t'accordion-group', // TODO: github pr link\n\t'alert',\n\t'avatar',\n\t'badge',\n\t'breadcrumb',\n\t'button',\n\t'button-group',\n\t'button-link',\n\t'card',\n\t'combobox',\n\t'details',\n\t'form',\n\t'heading',\n\t'icon',\n\t'image',\n\t'indented-text',\n\t'input-checkbox',\n\t'input-color',\n\t'input-date',\n\t'input-email',\n\t'input-file',\n\t'input-number',\n\t'input-password',\n\t'input-radio',\n\t'input-range',\n\t'input-text',\n\t'kolibri',\n\t'link',\n\t'link-button',\n\t'link-group',\n\t'logo',\n\t'modal',\n\t'nav',\n\t'pagination',\n\t'progress',\n\t'select',\n\t'separator', // TODO: github pr link\n\t'skip-nav',\n\t'spin',\n\t'split-button',\n\t'symbol',\n\t'table',\n\t'table-stateless',\n\t'table-stateful',\n\t'tabs',\n\t'textarea',\n\t'toast-container',\n\t'toolbar', // TODO: github pr link\n\t'tooltip',\n\t'tree',\n\t'tree-item',\n}\n","import { Theme } from 'adopted-style-sheets';\n\nimport { KeyEnum } from './i18n-keys';\nimport { TagEnum } from './tag-names';\n\nexport const KoliBri = new Theme<'kol', keyof typeof KeyEnum, keyof typeof TagEnum>('kol', KeyEnum, TagEnum);\n\nexport * from './components';\n// export * from './enums'; only for internal use\nexport * from './props';\nexport * from './types';\nexport * from './utils';\nexport * from './validators';\n","import type { Generic, LoaderCallback, RegisterOptions } from 'adopted-style-sheets';\nimport { register as coreRegister } from 'adopted-style-sheets';\nimport { initializeI18n } from './i18n';\nimport { setCustomTagNames } from './component-names';\n\nlet initialized = false;\n\ntype KoliBriOptions = RegisterOptions & {\n\ttransformTagName?: (tagName: string) => string;\n};\n\nexport const bootstrap = async (\n\tthemes:\n\t\t| Generic.Theming.RegisterPatch<string, string, string>\n\t\t| Generic.Theming.RegisterPatch<string, string, string>[]\n\t\t| Set<Generic.Theming.RegisterPatch<string, string, string>>,\n\tloaders: LoaderCallback | LoaderCallback[] | Set<LoaderCallback>,\n\toptions?: KoliBriOptions,\n): Promise<void[]> => {\n\tinitializeI18n(options?.translation?.name ?? 'de', options?.translations);\n\tif (options?.transformTagName) {\n\t\tsetCustomTagNames(options?.transformTagName);\n\t}\n\tconst coreRegisterReturnValue = await coreRegister(themes, loaders, options);\n\tinitialized = true;\n\n\treturn coreRegisterReturnValue;\n};\n\nexport const register = bootstrap;\nexport const isInitialized = () => initialized;\n","import type { Toast, ToasterOptions } from '../../schema';\nimport { Log } from '../../schema';\nimport { KolToastContainerTag } from '../../core/component-names';\nimport { isInitialized } from '../../core/bootstrap';\n\nexport class ToasterService {\n\tprivate static readonly instances: Map<Document, ToasterService> = new Map<Document, ToasterService>();\n\n\tprivate toastContainerElement?: HTMLKolToastContainerElement;\n\n\tprivate constructor(\n\t\tprivate readonly document: Document,\n\t\tprivate readonly options?: ToasterOptions,\n\t) {\n\t\tthis.toastContainerElement = this.document.createElement(KolToastContainerTag);\n\t\tthis.document.body.prepend(this.toastContainerElement);\n\t}\n\n\t/**\n\t * Get a toaster for the specified document environment. Each environment has exactly one instance of the service.\n\t */\n\tpublic static getInstance(document: Document, options?: ToasterOptions): ToasterService {\n\t\tif (!isInitialized()) {\n\t\t\tthrow new Error('Toaster: Call KoliBri bootstrap/register method first.');\n\t\t}\n\n\t\tlet instance = this.instances.get(document);\n\t\tif (!instance) {\n\t\t\tinstance = new ToasterService(document, options);\n\t\t\tthis.instances.set(document, instance);\n\t\t}\n\t\treturn instance;\n\t}\n\n\tpublic dispose() {\n\t\tconst element = this.toastContainerElement;\n\t\tif (element) {\n\t\t\tthis.toastContainerElement = undefined;\n\t\t\telement.remove();\n\t\t} else {\n\t\t\tLog.warn('Toaster service is already disposed.', { forceLog: true });\n\t\t}\n\t}\n\n\tpublic enqueue(toast: Toast): Promise<() => void> | undefined {\n\t\t/**\n\t\t * We need this condition for SSR. The toast container is not rendered on the server,\n\t\t * so we can't enqueue toasts.\n\t\t */\n\t\tif (this.toastContainerElement && typeof this.toastContainerElement.enqueue === 'function') {\n\t\t\tif (!toast.alertVariant && this.options?.defaultAlertVariant) {\n\t\t\t\ttoast.alertVariant = this.options?.defaultAlertVariant;\n\t\t\t}\n\n\t\t\treturn this.toastContainerElement.enqueue(toast);\n\t\t}\n\t}\n\n\tpublic closeAll(immediate: boolean = false): void {\n\t\tif (this.toastContainerElement && typeof this.toastContainerElement.closeAll === 'function') {\n\t\t\tvoid this.toastContainerElement.closeAll(immediate);\n\t\t}\n\t}\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{n as nonce}from"./dev.utils-
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{n as nonce}from"./dev.utils-698b2d79.js";import{a as KolTooltipWcTag}from"./component-names-e522484e.js";import{v as validateLabel}from"./label-452f8c01.js";import{v as validateTooltipAlign}from"./tooltip-align-676fe651.js";import"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./prop.validators-f2b9a155.js";import"./index-db4aa6e4.js";import"./align-6595a6d6.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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > abbr {\n cursor: help;\n }\n}",KolAbbrDefaultStyle0=defaultStyleCss,KolAbbr=class{constructor(n){registerInstance(this,n),this.nonce=nonce(),this._label=void 0,this._tooltipAlign="top",this.state={_label:"",_tooltipAlign:"top"}}render(){return h(Host,{key:"598d706f074db11649d068894821a214d3373d11",class:"kol-abbr"},h("abbr",{key:"cea033577a07ea9cbc48cf32f2afa798b2f70c1b","aria-labelledby":this.nonce,role:"definition",tabindex:"0",title:this.state._label},h("span",{key:"f28a0dacfb9e1d5807f763e03401e1b71c0414c3",title:""},h("slot",{key:"c72ee140bfc1c43d781a5309c07f9a47689d6f4e"}))),h(KolTooltipWcTag,{key:"2743bb91c1b770375bda8e19668e7ad698b10baa",_align:this.state._tooltipAlign,_id:this.nonce,_label:this.state._label}))}validateLabel(n){validateLabel(this,n,{required:!0})}validateTooltipAlign(n){validateTooltipAlign(this,n)}componentWillLoad(){this.validateLabel(this._label),this.validateTooltipAlign(this._tooltipAlign)}static get watchers(){return{_label:["validateLabel"],_tooltipAlign:["validateTooltipAlign"]}}};KolAbbr.style={default:KolAbbrDefaultStyle0};export{KolAbbr as kol_abbr};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-360ad69b.js";import{n as nonce}from"./dev.utils-
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-360ad69b.js";import{n as nonce}from"./dev.utils-698b2d79.js";import{w as watchHeadingLevel}from"./validation-00baa068.js";import{b as KolHeadingWcTag,c as KolButtonWcTag}from"./component-names-e522484e.js";import{f as featureHint,s as setState}from"./prop.validators-f2b9a155.js";import{a as propagateFocus}from"./reuse-b66836de.js";import{v as validateDisabled}from"./disabled-7ce039e2.js";import{v as validateOpen}from"./open-ef237788.js";import{v as validateLabel}from"./label-452f8c01.js";import"./dev.utils-1ca991a2.js";import"./index-db4aa6e4.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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n /* For animation technique see https://css-tricks.com/css-grid-can-do-auto-height-transitions/ */\n .wrapper {\n display: grid;\n grid-template-rows: 0fr;\n overflow: hidden;\n transition: grid-template-rows 0.3s;\n }\n .accordion.open .wrapper {\n grid-template-rows: 1fr;\n }\n .animation-wrapper {\n min-height: 0;\n transition: visibility 0.3s;\n /* This property is important to keep in sync with the visual transition (template-rows). Without it interactive elements within the accordion would stay focusable. */\n visibility: hidden;\n }\n .accordion.open .animation-wrapper {\n visibility: visible;\n }\n @media (prefers-reduced-motion) {\n .animation-wrapper,\n .wrapper {\n transition-duration: 0s;\n }\n }\n /* @see https://github.com/public-ui/kolibri/issues/5952 */\n @media print {\n .accordion:not(.open) .animation-wrapper {\n display: none;\n }\n }\n /*\n * Inside a button, the caption text is always centered.\n * So we have to align the text to the left.\n */\n .accordion .kol-heading-wc .kol-button-wc button .kol-span-wc {\n justify-items: start;\n }\n}",KolAccordionDefaultStyle0=defaultStyleCss;featureHint("[KolAccordion] Anfrage nach einer KolAccordionGroup bei dem immer nur ein Accordion geöffnet ist.\n\n- onClick auf der KolAccordion anwenden\n- Click-Event prüft den _open-Status der Accordions\n- Logik Öffnet und Schließt entsprechend"),featureHint("[KolAccordion] Tab-Sperre des Inhalts im geschlossenen Zustand.");const KolAccordion=class{constructor(n){registerInstance(this,n),this.nonce=nonce(),this.catchRef=n=>{propagateFocus(this.host,n)},this.onClick=n=>{this._open=!this._open,setTimeout((()=>{var e;"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onClick)&&this.state._on.onClick(n,!0===this._open)}))},this._disabled=!1,this._label=void 0,this._level=1,this._on=void 0,this._open=!1,this.state={_label:"",_level:1}}render(){return h(Host,{key:"f1672f2cf8b9aa85b1f63ab68d00300b74638dd8",class:"kol-accordion"},h("div",{key:"e80bb532a6f148e9608b9d5b4eca382cf8c01e8d",class:{accordion:!0,disabled:!0===this.state._disabled,open:!0===this.state._open}},h(KolHeadingWcTag,{key:"e221fc0ccd86504a3e491a8e32c55da5fa76a365",_label:"",_level:this.state._level,class:"accordion-heading"},h(KolButtonWcTag,{key:"f65af86aab71ff029bba8108495477d7be05c2f3",class:"accordion-button",ref:this.catchRef,slot:"expert",_ariaControls:this.nonce,_ariaExpanded:this.state._open,_disabled:this.state._disabled,_icons:this.state._open?"codicon codicon-remove":"codicon codicon-add",_label:this.state._label,_on:{onClick:this.onClick}})),h("div",{key:"5435d015a21707724c7180dbb96e7a0af30f9d42",class:"wrapper"},h("div",{key:"5a9958a91c49d8b807627f7029ad975e52c6e1ea",class:"animation-wrapper"},h("div",{key:"367a024dca25373063df9ec0e679161ad26bffb8","aria-hidden":!1===this.state._open?"true":void 0,class:"content",id:this.nonce},h("slot",{key:"dfbbf47f20297d5f5052d7df8f74bd659ce054fd"}))))))}validateDisabled(n){validateDisabled(this,n)}validateLabel(n){validateLabel(this,n,{required:!0})}validateLevel(n){watchHeadingLevel(this,n)}validateOn(n){"object"==typeof n&&null!==n&&"function"==typeof n.onClick&&setState(this,"_on",n)}validateOpen(n){validateOpen(this,n)}componentWillLoad(){this.validateDisabled(this._disabled),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateOpen(this._open)}get host(){return getElement(this)}static get watchers(){return{_disabled:["validateDisabled"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_open:["validateOpen"]}}};KolAccordion.style={default:KolAccordionDefaultStyle0};export{KolAccordion as kol_accordion};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{t as translate}from"./i18n-
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{t as translate}from"./i18n-112381e9.js";import{w as watchHeadingLevel}from"./validation-00baa068.js";import{b as KolHeadingWcTag,c as KolButtonWcTag,g as KolIconTag}from"./component-names-e522484e.js";import{L as Log}from"./dev.utils-1ca991a2.js";import{b as watchBoolean,s as setState,w as watchValidator}from"./prop.validators-f2b9a155.js";import{v as validateHasCloser}from"./has-closer-b81b200a.js";import{v as validateLabel}from"./label-452f8c01.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],Icon=a=>h(KolIconTag,{class:"heading-icon",_label:"string"==typeof a.label&&a.label.length>0?"":a.ariaLabel,_icons:a.icon}),AlertIcon=a=>{switch(a.type){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:a.label});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:a.label});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:a.label});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:a.label});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:a.label})}},KolAlertWc=class{constructor(a){registerInstance(this,a),this.close=()=>{var a;void 0!==(null===(a=this._on)||void 0===a?void 0:a.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=a=>"object"==typeof a&&null!==a&&"function"==typeof a.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var a;if(this.state._alert){try{Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(a){Log.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return h(Host,{key:"ecb2cd45b14f92cc1c337d2b81382a8cc820e869",class:{"kol-alert-wc":!0,alert:!0,[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},h("div",{key:"b190de9f62c33d970daabc1b5638132da33c936e",class:"heading"},h(AlertIcon,{key:"e1da8b194a13ec6f9270efc2234caadcee77e827",label:this.state._label,type:this.state._type}),h("div",{key:"7ffd000cfbe218c582791e8646ff5caf9bad5b25",class:"heading-content"},"string"==typeof this.state._label&&(null===(a=this.state._label)||void 0===a?void 0:a.length)>0&&h(KolHeadingWcTag,{key:"f9e7c598243a4868b80b248fdf4dfdeed5d24a2b",_label:this.state._label,_level:this.state._level}),"msg"===this.state._variant&&h("div",{key:"b5b70319b6c7747872e9d8072a1fe7565938f7c1",class:"content"},h("slot",{key:"b75edf24762d861147d5ee5fa0701b4c5a30eed1"}))),this.state._hasCloser&&h(KolButtonWcTag,{key:"cd46afacd1afbc415e1184604b3b1ac9af901c97",class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close-alert",{placeholders:{label:this.state._label}}),_on:this.on,_tooltipAlign:"left"})),"card"===this.state._variant&&h("div",{key:"2a9670974b00907497abd255e02194301df0c0a2",class:"content"},h("slot",{key:"9bd3de7e485b9865d5f74dfbce4f421d4b1dc9b5"})))}validateAlert(a){watchBoolean(this,"_alert",a)}validateHasCloser(a){validateHasCloser(this,a)}validateLabel(a){validateLabel(this,a)}validateLevel(a){watchHeadingLevel(this,a)}validateOn(a){this.validateOnValue(a)&&setState(this,"_on",{onClose:a.onClose})}validateType(a){watchValidator(this,"_type",(a=>"string"==typeof a&&alertTypeOptions.includes(a)),new Set(`String {${alertTypeOptions.join(", ")}`),a)}validateVariant(a){watchValidator(this,"_variant",(a=>"string"==typeof a&&alertVariantOptions.includes(a)),new Set(`AlertVariant {${alertVariantOptions.join(", ")}`),a)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}};export{KolAlertWc as kol_alert_wc};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{t as translate}from"./i18n-
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{t as translate}from"./i18n-112381e9.js";import{v as validateImageSource}from"./image-source-3bde4a5d.js";import{v as validateLabel}from"./label-452f8c01.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./prop.validators-f2b9a155.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.js";const formatNameAsInitial=a=>0===a.length?"":a[0].toUpperCase(),formatLabelAsInitials=a=>{const t=a.split(/\s+/),e=t.at(0),s=t.at(-1);return t.length>=2&&e&&s?`${formatNameAsInitial(e)}${formatNameAsInitial(s)}`:formatNameAsInitial(a)},KolAvatarWc=class{constructor(a){registerInstance(this,a),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return h(Host,{key:"672b71c600e54214bbaf86210fe439af3f187c83",class:"kol-avatar-wc"},h("div",{key:"8631bb174ac54c1677149d12979f6837dddd692d","aria-label":translate("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"container",role:"img"},this.state._src?h("img",{alt:"","aria-hidden":"true",class:"image",src:this.state._src}):h("span",{"aria-hidden":"true",class:"initials"},formatLabelAsInitials(this.state._label.trim()))))}validateSrc(a){validateImageSource(this,a)}validateLabel(a){validateLabel(this,a,{required:!0})}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};export{KolAvatarWc as kol_avatar_wc};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{c as KolButtonWcTag,f as KolSpanWcTag}from"./component-names-e522484e.js";import{n as nonce}from"./dev.utils-
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{c as KolButtonWcTag,f as KolSpanWcTag}from"./component-names-e522484e.js";import{n as nonce}from"./dev.utils-698b2d79.js";import{h as handleColorChange,v as validateColor}from"./color-1d05d57c.js";import{f as featureHint,o as objectObjectHandler,p as parseJson,s as setState}from"./prop.validators-f2b9a155.js";import"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./index-db4aa6e4.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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n /* :host implicitly inherits font-size, e.g. for usage in headlines */\n :host > span {\n display: inline-flex;\n place-items: center;\n /* Visible with forced colors */\n outline: transparent solid 1px;\n }\n :host > span > .kol-button-wc button {\n color: inherit;\n }\n}",KolBadgeDefaultStyle0=defaultStyleCss;featureHint("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const KolBadge=class{constructor(n){registerInstance(this,n),this.bgColorStr="#000",this.colorStr="#fff",this.id=nonce(),this.handleColorChange=n=>{const t=handleColorChange(n);this.bgColorStr=t.backgroundColor,this.colorStr=t.foregroundColor},this._color="#000",this._icons=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"}}}renderSmartButton(n){return h(KolButtonWcTag,{_ariaControls:this.id,_customClass:n._customClass,_disabled:n._disabled,_hideLabel:!0,_icons:n._icons,_id:n._id,_label:n._label,_on:n._on,_tooltipAlign:n._tooltipAlign,_variant:n._variant})}render(){const n="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return h(Host,{key:"0b334746c26463bbc697f08077e165e56b34a97f",class:"kol-badge"},h("span",{key:"83210f467b224cb691d844a0311f4a31a1ad6e79",class:{"smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton},style:{backgroundColor:this.bgColorStr,color:this.colorStr}},h(KolSpanWcTag,{key:"d5a3248d67baa494d9671e0da7de918511af084b",id:n?this.id:void 0,_allowMarkdown:!0,_icons:this._icons,_label:this._label}),n&&this.renderSmartButton(this.state._smartButton)))}validateColor(n){validateColor(this,n,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(n){objectObjectHandler(n,(()=>{try{n=parseJson(n)}catch(n){}setState(this,"_smartButton",n)}))}componentWillLoad(){this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_color:["validateColor"],_smartButton:["validateSmartButton"]}}};KolBadge.style={default:KolBadgeDefaultStyle0};export{KolBadge as kol_badge};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,F as Fragment,H as Host}from"./index-360ad69b.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-
|
4
|
+
import{r as registerInstance,h,F as Fragment,H as Host}from"./index-360ad69b.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-29aef441.js";import{w as watchNavLinks}from"./validation-3f609300.js";import{g as KolIconTag,h as KolLinkTag}from"./component-names-e522484e.js";import{e as a11yHintLabelingLandmarks}from"./prop.validators-f2b9a155.js";import{v as validateLabel}from"./label-452f8c01.js";import"./dev.utils-1ca991a2.js";import"./index-db4aa6e4.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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n li,\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n gap: 0.5em;\n flex-wrap: wrap;\n place-items: center;\n }\n .kol-icon::part(separator) {\n font-weight: 900;\n font-size: 0.7em;\n }\n .kol-icon::part(separator):before {\n content: \"\\f054\";\n font-family: \"Font Awesome 6 Free\";\n }\n}",KolBreadcrumbDefaultStyle0=defaultStyleCss,KolBreadcrumb=class{constructor(n){registerInstance(this,n),this.renderLink=(n,e)=>{const t=this.state._links.length-1;return h("li",{key:e},0!==e&&h(KolIconTag,{_label:"",_icons:"codicon codicon-chevron-right"}),e===t?h("span",null,n._hideLabel?h(KolIconTag,{_label:n._label,_icons:"string"==typeof n._icons?n._icons:"codicon codicon-symbol-event"}):h(Fragment,null,n._label)):h(KolLinkTag,Object.assign({},n)))},this._label=void 0,this._links=void 0,this.state={_label:"",_links:[]}}render(){return h(Host,{key:"1cfa36fa9a381d7b470854ec4a550b54817e37d6",class:"kol-breadcrumb"},h("nav",{key:"d913f0b8853e65302801b62abb9ee1a7911ba264","aria-label":this.state._label},h("ul",{key:"9719d99bcfedb925e819b0abf14977692fdabc76"},0===this.state._links.length&&h("li",{key:"1681efdfcdb0eb6d31fe0baf14efa89208ef04e9"},h(KolIconTag,{key:"21f1969a164aaa85d48a8e985e2e788be10a5135",_label:"",_icons:"codicon codicon-home"}),"…"),this.state._links.map(this.renderLink))))}validateLabel(n,e,t=!1){t||removeNavLabel(this.state._label),validateLabel(this,n,{required:!0}),a11yHintLabelingLandmarks(n),addNavLabel(this.state._label)}validateLinks(n){watchNavLinks("KolBreadcrumb",this,n)}componentWillLoad(){this.validateLabel(this._label,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_label:["validateLabel"],_links:["validateLinks"]}}};KolBreadcrumb.style={default:KolBreadcrumbDefaultStyle0};export{KolBreadcrumb as kol_breadcrumb};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-360ad69b.js";import{c as KolButtonWcTag}from"./component-names-e522484e.js";import{a as propagateFocus}from"./reuse-b66836de.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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :is(a, button) {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: underline;\n }\n a:is(:focus, :hover):not([aria-disabled]),\n button:is(:focus, :hover):not([disabled]) {\n text-decoration-thickness: 0.2em;\n }\n .skip {\n left: -99999px;\n overflow: hidden;\n position: absolute;\n z-index: 9999999;\n line-height: 1em;\n }\n .skip:focus {\n background-color: #fff;\n left: unset;\n padding: 1em;\n position: unset;\n }\n .kol-icon.external-link-icon {\n display: inline-flex;\n }\n}",KolButtonLinkDefaultStyle0=defaultStyleCss,KolButtonLink=class{constructor(n){registerInstance(this,n),this.catchRef=n=>{propagateFocus(this.host,n)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaExpanded=void 0,this._ariaSelected=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._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0}async getValue(){return this._value}render(){return h(Host,{key:"bcca14709dca36d36884f1bda80d249ef151cf03",class:"kol-button-link"},h(KolButtonWcTag,{key:"1601a8be9c9c8c85cb776f95aa3981ccc388d978",ref:this.catchRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_icons:this._icons,_hideLabel:this._hideLabel,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:"link",_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value},h("slot",{key:"dd476ba7cf6a6d3b08553cc7490ee51d4f08fff0",name:"expert",slot:"expert"})))}get host(){return getElement(this)}};KolButtonLink.style={default:KolButtonLinkDefaultStyle0};export{KolButtonLink as kol_button_link};
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-360ad69b.js";import{c as KolButtonWcTag}from"./component-names-e522484e.js";import{a as propagateFocus}from"./reuse-b66836de.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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: inline-block;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :is(a, button) {\n align-items: baseline;\n display: inline-flex;\n place-items: center;\n text-align: left;\n text-decoration-line: none;\n }\n :is(a, button) .kol-span-wc .span-label {\n text-decoration-line: underline;\n }\n a:is(:focus, :hover):not([aria-disabled]) .kol-span-wc .span-label,\n button:is(:focus, :hover):not([disabled]) .kol-span-wc .span-label {\n text-decoration-thickness: 0.2em;\n }\n .skip {\n left: -99999px;\n overflow: hidden;\n position: absolute;\n z-index: 9999999;\n line-height: 1em;\n }\n .skip:focus {\n background-color: #fff;\n left: unset;\n padding: 1em;\n position: unset;\n }\n .kol-icon.external-link-icon {\n display: inline-flex;\n }\n}",KolButtonLinkDefaultStyle0=defaultStyleCss,KolButtonLink=class{constructor(n){registerInstance(this,n),this.catchRef=n=>{propagateFocus(this.host,n)},this._accessKey=void 0,this._ariaControls=void 0,this._ariaExpanded=void 0,this._ariaSelected=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._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0}async getValue(){return this._value}render(){return h(Host,{key:"bcca14709dca36d36884f1bda80d249ef151cf03",class:"kol-button-link"},h(KolButtonWcTag,{key:"1601a8be9c9c8c85cb776f95aa3981ccc388d978",ref:this.catchRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_icons:this._icons,_hideLabel:this._hideLabel,_id:this._id,_label:this._label,_name:this._name,_on:this._on,_role:"link",_syncValueBySelector:this._syncValueBySelector,_tabIndex:this._tabIndex,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value},h("slot",{key:"dd476ba7cf6a6d3b08553cc7490ee51d4f08fff0",name:"expert",slot:"expert"})))}get host(){return getElement(this)}};KolButtonLink.style={default:KolButtonLinkDefaultStyle0};export{KolButtonLink as kol_button_link};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-button-link.entry.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,
|
1
|
+
{"file":"kol-button-link.entry.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,+0JAA+0J,CAAC;AACx2J,mCAAe,eAAe;;MC0BjB,aAAa;;;QAGR,aAAQ,GAAG,CAAC,GAA4B;YACxD,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC/B,CAAC;;;;;yBA+DmC,KAAK;0BAOJ,KAAK;;;;;;;;;6BA8CW,KAAK;qBAKf,QAAQ;;;IArH7C,MAAM,QAAQ;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IAEM,MAAM;QACZ,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,iBAAiB,IAC5B,EAAC,cAAc,qDACd,GAAG,EAAE,IAAI,CAAC,QAAQ,EAClB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,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,EAAC,MAAM,EACZ,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,IAEnB,6DAAM,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,GAAQ,CACzB,CACX,EACN;KACF;;;;;;;;;","names":[],"sources":["src/components/button-link/style.scss?tag=kol-button-link&mode=default&encapsulation=shadow","src/components/button-link/shadow.tsx"],"sourcesContent":["@import '../link';\n","import type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tButtonCallbacksPropType,\n\tButtonLinkProps,\n\tButtonTypePropType,\n\tIconsPropType,\n\tIdPropType,\n\tLabelWithExpertSlotPropType,\n\tNamePropType,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport { propagateFocus } from '../../schema';\nimport { Component, Element, h, Host, Method, Prop } from '@stencil/core';\n\nimport type { JSX } from '@stencil/core';\nimport { KolButtonWcTag } from '../../core/component-names';\n@Component({\n\ttag: 'kol-button-link',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolButtonLink implements ButtonLinkProps {\n\t@Element() private readonly host?: HTMLKolButtonLinkElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tpropagateFocus(this.host, ref);\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<Stringified<StencilUnknown> | undefined> {\n\t\treturn this._value;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-button-link\">\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_icons={this._icons}\n\t\t\t\t\t_hideLabel={this._hideLabel}\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=\"link\"\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>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</KolButtonWcTag>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the elements access key.\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 whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t * @TODO: Change type back to `AriaExpandedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\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 * @TODO: Change type back to `AriaSelectedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the 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?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für die Button-Events an.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\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 * 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?: Stringified<StencilUnknown>;\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h,H as Host,r as registerInstance,g as getElement}from"./index-360ad69b.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events-29e84d75.js";import{p as propagateSubmitEventToForm,a as propagateResetEventToForm}from"./controller-
|
4
|
+
import{h,H as Host,r as registerInstance,g as getElement}from"./index-360ad69b.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events-29e84d75.js";import{p as propagateSubmitEventToForm,a as propagateResetEventToForm}from"./controller-b76f9bb2.js";import{A as AssociatedInputController}from"./associated.controller-ad89c814.js";import{a as KolTooltipWcTag,f as KolSpanWcTag}from"./component-names-e522484e.js";import{i as watchString,b as watchBoolean,w as watchValidator,x as mapBoolean2String,y as mapStringOrBoolean2String,q as setEventTarget,s as setState}from"./prop.validators-f2b9a155.js";import{v as validateAccessKey}from"./access-key-e22ec35a.js";import{v as validateIcons}from"./icons-9784d978.js";import{v as validateAlternativeButtonLinkRole}from"./alternative-button-link-role-435f91d3.js";import{s as showExpertSlot,a as propagateFocus}from"./reuse-b66836de.js";import{v as validateCustomClass}from"./custom-class-9daf0e87.js";import{v as validateDisabled}from"./disabled-7ce039e2.js";import{v as validateHideLabel}from"./hide-label-f5e03637.js";import{a as validateLabelWithExpertSlot}from"./label-452f8c01.js";import{v as validateTabIndex}from"./tab-index-bffbd9f3.js";import{v as validateTooltipAlign}from"./tooltip-align-676fe651.js";import"./dev.utils-1ca991a2.js";import"./index-db4aa6e4.js";import"./align-6595a6d6.js";const validateAriaControls=(t,a)=>{watchString(t,"_ariaControls",a)},validateAriaExpanded=(t,a)=>{watchBoolean(t,"_ariaExpanded",a)},validateAriaSelected=(t,a)=>{watchBoolean(t,"_ariaSelected",a)},validateButtonCallbacks=(t,a)=>{watchValidator(t,"_on",(t=>"object"==typeof t&&null!==t),new Set(["ButtonCallbacksPropType {Events.onClick, Events.onMouseDown}"]),a)},buttonTypePropTypeOptions=["button","reset","submit"],validateButtonType=(t,a)=>{watchValidator(t,"_type",(t=>"string"==typeof t&&buttonTypePropTypeOptions.includes(t)),new Set([`KoliBriButtonType {${buttonTypePropTypeOptions.join(", ")}`]),a)},buttonVariantPropTypeOptions=["primary","secondary","normal","tertiary","danger","ghost","custom"],validateButtonVariant=(t,a)=>{watchValidator(t,"_variant",(t=>"string"==typeof t&&buttonVariantPropTypeOptions.includes(t)),new Set([`KoliBriButtonVariant {${buttonVariantPropTypeOptions.join(", ")}`]),a,{defaultValue:"normal"})},KolButtonWc=class{render(){const t=showExpertSlot(this.state._label);return h(Host,{key:"c0d16e55ccda6586451460ed73035afc5094a20c",class:"kol-button-wc"},h("button",Object.assign({key:"6ee3c6aa4c7eb2870b69369ae303b344f9243615",ref:this.catchRef,accessKey:this.state._accessKey||void 0,"aria-controls":this.state._ariaControls,"aria-expanded":mapBoolean2String(this.state._ariaExpanded),"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":mapStringOrBoolean2String(this.state._ariaSelected),class:{button:!0,disabled:!0===this.state._disabled,[this.state._variant]:"custom"!==this.state._variant,[this.state._customClass]:"custom"===this.state._variant&&"string"==typeof this.state._customClass&&this.state._customClass.length>0,"hide-label":!0===this.state._hideLabel},disabled:this.state._disabled,id:this.state._id,name:this.state._name},this.state._on,{onClick:this.onClick,role:this.state._role,tabIndex:this.state._tabIndex,type:this.state._type}),h(KolSpanWcTag,{key:"89e898b52482ab8f2b991ee630d3c01eba2c5673",class:"button-inner",_accessKey:this.state._accessKey,_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:t?"":this.state._label},h("slot",{key:"c7f11890216223942c6adea500e5904409877564",name:"expert",slot:"expert"}))),h(KolTooltipWcTag,{key:"31d7ab91f54a8046442ffdb435f55cb4681d1b32","aria-hidden":"true",hidden:t||!this.state._hideLabel,_accessKey:this._accessKey,_align:this.state._tooltipAlign,_label:"string"==typeof this.state._label?this.state._label:""}))}constructor(t){registerInstance(this,t),this.catchRef=t=>{this.ref=t,propagateFocus(this.host,this.ref)},this.onClick=t=>{var a,e;"submit"===this.state._type?propagateSubmitEventToForm({form:this.host,ref:this.ref}):"reset"===this.state._type?propagateResetEventToForm({form:this.host,ref:this.ref}):(stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host,this.state._value),this.controller.setFormAssociatedValue(this.state._value),"function"==typeof(null===(a=this.state._on)||void 0===a?void 0:a.onClick)&&(setEventTarget(t,this.ref),null===(e=this.state._on)||void 0===e||e.onClick(t,this.state._value)))},this._accessKey=void 0,this._ariaControls=void 0,this._ariaExpanded=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._role=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_icons:{},_label:"",_on:{},_type:"button",_variant:"normal"},this.controller=new AssociatedInputController(this,"button",this.host)}validateAccessKey(t){validateAccessKey(this,t)}validateAriaControls(t){validateAriaControls(this,t)}validateAriaExpanded(t){validateAriaExpanded(this,t)}validateAriaSelected(t){validateAriaSelected(this,t)}validateCustomClass(t){validateCustomClass(this,t)}validateDisabled(t){validateDisabled(this,t)}validateHideLabel(t){validateHideLabel(this,t)}validateIcons(t){validateIcons(this,t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){validateLabelWithExpertSlot(this,t,{required:!0})}validateName(t){this.controller.validateName(t)}validateOn(t){validateButtonCallbacks(this,t)}validateRole(t){validateAlternativeButtonLinkRole(this,t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){validateTabIndex(this,t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}validateType(t){validateButtonType(this,t)}validateValue(t){setState(this,"_value",t),this.controller.setFormAssociatedValue(this.state._value)}validateVariant(t){validateButtonVariant(this,t)}componentWillLoad(){this.validateAccessKey(this._accessKey),this.validateAriaControls(this._ariaControls),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateCustomClass(this._customClass),this.validateDisabled(this._disabled),this.validateHideLabel(this._hideLabel),this.validateIcons(this._icons),this.validateId(this._id),this.validateLabel(this._label),this.validateName(this._name),this.validateOn(this._on),this.validateRole(this._role),this.validateSyncValueBySelector(this._syncValueBySelector),this.validateTabIndex(this._tabIndex),this.validateTooltipAlign(this._tooltipAlign),this.validateType(this._type),this.validateValue(this._value),this.validateVariant(this._variant)}get host(){return getElement(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_ariaControls:["validateAriaControls"],_ariaExpanded:["validateAriaExpanded"],_ariaSelected:["validateAriaSelected"],_customClass:["validateCustomClass"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_name:["validateName"],_on:["validateOn"],_role:["validateRole"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_tooltipAlign:["validateTooltipAlign"],_type:["validateType"],_value:["validateValue"],_variant:["validateVariant"]}}};export{KolButtonWc as kol_button_wc};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{t as translate}from"./i18n-
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-360ad69b.js";import{t as translate}from"./i18n-112381e9.js";import{w as watchHeadingLevel}from"./validation-00baa068.js";import{b as KolHeadingWcTag,c as KolButtonWcTag}from"./component-names-e522484e.js";import{v as validateHasCloser}from"./has-closer-b81b200a.js";import{s as setState}from"./prop.validators-f2b9a155.js";import{v as validateLabel}from"./label-452f8c01.js";import"./i18n-66b52d13.js";import"./reuse-b66836de.js";import"./index-db4aa6e4.js";import"./dev.utils-1ca991a2.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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n :host > div.card {\n height: 100%;\n position: relative;\n /* Visible with forced colors */\n outline: transparent solid 1px;\n }\n .close {\n position: absolute;\n top: 0;\n right: 0;\n }\n}",KolCardDefaultStyle0=defaultStyleCss,KolCard=class{constructor(e){registerInstance(this,e),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._on=void 0,this._hasCloser=!1,this._label=void 0,this._level=1,this.state={_label:""}}render(){return h(Host,{key:"6a075e6c225c33dbfab5bbc6e78751eb1a2ee474",class:"kol-card"},h("div",{key:"a3aee1a0c51e4aadd5bab63252686a9adfa7cfb6",class:"card"},h("div",{key:"1f73f4e0302ba9bb5b7fb5e0cbc6b00e7a3abdde",class:"header"},h(KolHeadingWcTag,{key:"0d077a8431e89744ed58c51d5e645f445e009169",_label:this.state._label,_level:this.state._level})),h("div",{key:"aef0ace6767b8978efd6a14967d51808660cdcad",class:"content"},h("slot",{key:"7fe022672f6e418364f63cb0a72dfbed09207c8e"})),this.state._hasCloser&&h(KolButtonWcTag,{key:"ff59bb6a947d9d435f4c2a2cf968daa5064ec2d3",class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close"),_on:this.on,_tooltipAlign:"left"})))}validateOn(e){this.validateOnValue(e)&&setState(this,"_on",{onClose:e.onClose})}validateHasCloser(e){validateHasCloser(this,e)}validateLabel(e){validateLabel(this,e,{required:!0})}validateLevel(e){watchHeadingLevel(this,e)}componentWillLoad(){this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};KolCard.style={default:KolCardDefaultStyle0};export{KolCard as kol_card};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-360ad69b.js";import{n as nonce}from"./dev.utils-eeeb0158.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events-29e84d75.js";import{I as InputIconController}from"./controller-icon-a494ea46.js";import{v as validateSuggestions}from"./suggestions-602b6090.js";import{b as watchBoolean,i as watchString}from"./prop.validators-f2b9a155.js";import{v as validateMsg,g as getRenderStates}from"./controller-a8e66789.js";import{l as KolInputWcTag,g as KolIconTag}from"./component-names-e522484e.js";import{I as InternalUnderlinedAccessKey}from"./InternalUnderlinedAccessKey-d35d1ac0.js";import{t as translate}from"./i18n-342bc196.js";import{s as showExpertSlot}from"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./icons-9784d978.js";import"./index-db4aa6e4.js";import"./associated.controller-ad89c814.js";import"./hide-label-f5e03637.js";import"./label-452f8c01.js";import"./tab-index-bffbd9f3.js";import"./tooltip-align-676fe651.js";import"./align-6595a6d6.js";import"./i18n-ebe0c4cb.js";class ComboboxController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateSuggestions(e){validateSuggestions(this.component,e)}validateRequired(e){watchBoolean(this.component,"_required",e)}validateValue(e){watchString(this.component,"_value",e)}validateMsg(e){validateMsg(this.component,e)}validatePlaceholder(e){watchString(this.component,"_placeholder",e)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder)}}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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .combobox {\n position: relative;\n }\n .combobox.disabled, .combobox.disabled * {\n cursor: not-allowed !important;\n }\n .combobox.disabled {\n opacity: 0.5;\n outline: none;\n }\n .combobox__group {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n .combobox__input {\n flex-grow: 1;\n }\n .combobox__listbox {\n display: block;\n position: absolute;\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 2;\n background-color: white;\n max-height: calc(250rem / var(--kolibri-root-font-size, 16));\n }\n}",KolComboboxDefaultStyle0=defaultStyleCss,KolCombobox=class{async getValue(){return this._value}selectOption(e){this.state._value=e}onInput(e){const t=e.target;this._value=t.value,this.setFilteredSuggestionsByQuery(t.value)}handleKeyDownDropdown(e){1===e.key.length&&/[a-z0-9]/i.test(e.key)&&(this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredSuggestionsByQuery(e){""===e.trim()?this._filteredSuggestions=[...this._suggestions]:(this._filteredSuggestions=this._suggestions.filter((t=>t.toLowerCase().includes(e.toLowerCase()))),this._isOpen=this._filteredSuggestions&&this._filteredSuggestions.length>0)}moveFocus(e){if(console.log(this._focusedOptionIndex),!this._filteredSuggestions)return;let t=this._focusedOptionIndex+e;t>=this._filteredSuggestions.length&&(t=0),t<0&&(t=this._filteredSuggestions.length-1),this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex)}focusOption(e){if(this.refSuggestions){const t=this.refSuggestions[e];null==t||t.focus(),this._value=t.textContent||""}}focusSuggestionStartingWith(e){const t=e.toLowerCase(),n=Array.isArray(this._filteredSuggestions)&&this._filteredSuggestions.length>0&&this._filteredSuggestions.findIndex((e=>e.toLowerCase().startsWith(t)));"number"==typeof n&&(this._focusedOptionIndex=n,this.focusOption(n))}render(){const e=showExpertSlot(this.state._label),{ariaDescribedBy:t}=getRenderStates(this.state);return h(Host,{key:"1af2b8f8c476758f027d42cf7e6416b9d6c3ae12",class:"kol-combobox"},h("div",{key:"c9d69c60e32ab7d7fe200573633c4da7b5998df7",class:`combobox ${!0===this.state._disabled?"disabled":""} `},h(KolInputWcTag,{key:"1c6606677208f5f52574d313fe8713d8cbe997b8",_accessKey:this.state._accessKey,_disabled:this.state._disabled,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_msg:this.state._msg,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.ref)||void 0===e?void 0:e.focus()},role:"presentation"},h("span",{key:"a1a8ec632be8e3762a541c24ce222bdf8322f51a",slot:"label"},e?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h(Fragment,null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{key:"279f24fdddbbaa57ccf9bcfb37d443f5d8b1fc77",slot:"input"},h("div",{key:"b910a87bcba22d01e9bdfec5fcfd3df615118052",class:"combobox__group"},h("input",Object.assign({key:"dbc9ba00e3ca432b4c7d5b06d24df573b682548d",class:"combobox__input",type:"text",role:"combobox","aria-autocomplete":"both","aria-expanded":this._isOpen?"true":"false","aria-controls":"listbox",value:this.state._value,accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-labelledby":this.state._id,"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,name:this.state._name,required:this.state._required,spellcheck:"false"},this.controller.onFacade,{onInput:this.onInput.bind(this),onClick:this.toggleListbox.bind(this),onChange:this.onChange.bind(this),placeholder:this.state._placeholder})),h("span",{key:"7b93670b4bb63730fc7411579bdc8ed0c6d9bdc5",class:{combobox__icon:!0}},h(KolIconTag,{key:"c555963b3e56c67932e81df6e3ad7502c86bc232",_icons:"codicon codicon-triangle-down",_label:translate("kol-dropdown"),onClick:this.toggleListbox.bind(this)}))),this._isOpen&&!(!0===this.state._disabled)&&h("ul",{key:"ac189288aa30581c45bc1d7b4fc0d49353755c7c",role:"listbox","aria-label":"",class:{combobox__listbox:!0},onKeyDown:this.handleKeyDownDropdown.bind(this)},Array.isArray(this._filteredSuggestions)&&this._filteredSuggestions.length>0&&this._filteredSuggestions.map(((e,t)=>h("li",{id:`option-${t}`,key:`-${t}`,ref:e=>{e&&(this.refSuggestions[t]=e)},"data-index":t,tabIndex:0,role:"option","aria-selected":this.state._value===e,onClick:()=>{this.selectOption(e),this.toggleListbox()},class:"combobox__item",onKeyDown:t=>{"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),t.preventDefault())}},e))))))))}handleKeyDown(e){const t=(t,n)=>{e.preventDefault(),void 0!==t&&(this._isOpen=t),null==n||n()};switch(e.key){case"Down":case"ArrowDown":t(!0,(()=>this.moveFocus(1)));break;case"Up":case"ArrowUp":t(!0,(()=>this.moveFocus(-1)));break;case"Esc":case"Escape":t(!1);break;case"NumpadEnter":case"Enter":this.toggleListbox();break;case"Home":t(void 0,(()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))}));break;case"End":t(void 0,(()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredSuggestions?this._filteredSuggestions.length-1:0,this.focusOption(this._focusedOptionIndex))}));break;case"PageUp":t(void 0,(()=>this._isOpen&&this.moveFocus(10)));break;case"PageDown":t(void 0,(()=>this._isOpen&&this.moveFocus(-10)))}}handleWindowClick(e){null==this.host||this.host.contains(e.target)||(this._isOpen=!1)}constructor(e){registerInstance(this,e),this.refSuggestions=[],this.toggleListbox=()=>{if(!0===this.state._disabled)this._isOpen=!1;else if(this._isOpen=!this._isOpen,this._isOpen&&Array.isArray(this._filteredSuggestions)&&this._filteredSuggestions.length>0){const e=this._filteredSuggestions.findIndex((e=>e===this._value));this._focusedOptionIndex=e>=0?e:0,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredSuggestions=void 0,this._accessKey=void 0,this._placeholder=void 0,this._alert=!0,this._disabled=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._suggestions=void 0,this._required=!1,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_value:""},this.controller=new ComboboxController(this,"select",this.host),this.onInput=this.onInput.bind(this)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateRequired(e){this.controller.validateRequired(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this.refSuggestions=[],this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e)),this._filteredSuggestions=this.state._suggestions}onChange(e){var t;stopPropagation(e),tryToDispatchKoliBriEvent("change",this.host,this._value),this.controller.setFormAssociatedValue(this._value),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onChange)&&this.state._on.onChange(e,this._value)}get host(){return getElement(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_suggestions:["validateSuggestions"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolCombobox.style={default:KolComboboxDefaultStyle0};export{KolCombobox as kol_combobox};
|
4
|
+
import{h,F as Fragment,H as Host,r as registerInstance,g as getElement}from"./index-360ad69b.js";import{n as nonce}from"./dev.utils-698b2d79.js";import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events-29e84d75.js";import{I as InputIconController}from"./controller-icon-a494ea46.js";import{v as validateSuggestions}from"./suggestions-602b6090.js";import{b as watchBoolean,i as watchString}from"./prop.validators-f2b9a155.js";import{v as validateMsg,g as getRenderStates}from"./controller-a8e66789.js";import{l as KolInputWcTag,g as KolIconTag}from"./component-names-e522484e.js";import{I as InternalUnderlinedAccessKey}from"./InternalUnderlinedAccessKey-d35d1ac0.js";import{t as translate}from"./i18n-112381e9.js";import{s as showExpertSlot}from"./reuse-b66836de.js";import"./dev.utils-1ca991a2.js";import"./icons-9784d978.js";import"./index-db4aa6e4.js";import"./associated.controller-ad89c814.js";import"./hide-label-f5e03637.js";import"./label-452f8c01.js";import"./tab-index-bffbd9f3.js";import"./tooltip-align-676fe651.js";import"./align-6595a6d6.js";import"./i18n-66b52d13.js";class ComboboxController extends InputIconController{constructor(e,t,n){super(e,t,n),this.component=e}validateSuggestions(e){validateSuggestions(this.component,e)}validateRequired(e){watchBoolean(this.component,"_required",e)}validateValue(e){watchString(this.component,"_value",e)}validateMsg(e){validateMsg(this.component,e)}validatePlaceholder(e){watchString(this.component,"_placeholder",e)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validatePlaceholder(this.component._placeholder)}}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: 44px;\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 * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\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 * 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 44px.\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%; /* 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}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\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-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .required label > span::after,\n .required legend > span::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n input,\n textarea {\n cursor: text;\n }\n input[type=checkbox],\n input[type=color],\n input[type=file],\n input[type=radio],\n input[type=range],\n label,\n option,\n select {\n cursor: pointer;\n }\n /* input[type='checkbox'], */\n /* input[type='radio'], */\n /* input[type='range'], */\n input[type=color],\n input[type=date],\n input[type=datetime-local],\n input[type=email],\n input[type=file],\n input[type=month],\n input[type=number],\n input[type=password],\n input[type=search],\n input[type=tel],\n input[type=text],\n input[type=time],\n input[type=url],\n input[type=week],\n select,\n select[multiple] option,\n textarea {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n width: 100%;\n }\n /* needed hack for vertical alignment */\n input[type=file] {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 10) 0.5em;\n }\n /* needed hack for vertical alignment */\n select[multiple] option {\n padding: calc((var(--a11y-min-size) - (16rem / var(--kolibri-root-font-size, 16))) / 2) 0.5em;\n }\n}\n@layer kol-component {\n .kol-input {\n display: grid;\n }\n .kol-input .input-slot {\n flex-grow: 1;\n }\n input:not([type=checkbox], [type=radio]),\n select:not([multiple], [size]) {\n height: 2.75em;\n }\n input:focus,\n option:focus,\n select:focus,\n textarea:focus {\n outline: 0;\n }\n .input {\n display: flex;\n align-items: center;\n }\n .input > .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n .kol-input.required .input-tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .combobox {\n position: relative;\n }\n .combobox.disabled, .combobox.disabled * {\n cursor: not-allowed !important;\n }\n .combobox.disabled {\n opacity: 0.5;\n outline: none;\n }\n .combobox__group {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n }\n .combobox__input {\n flex-grow: 1;\n }\n .combobox__listbox {\n display: block;\n position: absolute;\n list-style-type: none;\n margin: 0;\n padding: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 2;\n background-color: white;\n max-height: calc(250rem / var(--kolibri-root-font-size, 16));\n }\n}",KolComboboxDefaultStyle0=defaultStyleCss,KolCombobox=class{async getValue(){return this._value}selectOption(e){this.state._value=e}onInput(e){const t=e.target;this._value=t.value,this.setFilteredSuggestionsByQuery(t.value)}handleKeyDownDropdown(e){1===e.key.length&&/[a-z0-9]/i.test(e.key)&&(this._isOpen=!0,this.focusSuggestionStartingWith(e.key))}setFilteredSuggestionsByQuery(e){""===e.trim()?this._filteredSuggestions=[...this._suggestions]:(this._filteredSuggestions=this._suggestions.filter((t=>t.toLowerCase().includes(e.toLowerCase()))),this._isOpen=this._filteredSuggestions&&this._filteredSuggestions.length>0)}moveFocus(e){if(!this._filteredSuggestions)return;let t=this._focusedOptionIndex+e;t>=this._filteredSuggestions.length&&(t=0),t<0&&(t=this._filteredSuggestions.length-1),this._focusedOptionIndex=t,this.focusOption(this._focusedOptionIndex)}focusOption(e){if(this.refSuggestions){const t=this.refSuggestions[e];null==t||t.focus(),this._value=t.textContent||""}}focusSuggestionStartingWith(e){const t=e.toLowerCase(),n=Array.isArray(this._filteredSuggestions)&&this._filteredSuggestions.length>0&&this._filteredSuggestions.findIndex((e=>e.toLowerCase().startsWith(t)));"number"==typeof n&&(this._focusedOptionIndex=n,this.focusOption(n))}render(){const e=showExpertSlot(this.state._label),{ariaDescribedBy:t}=getRenderStates(this.state);return h(Host,{key:"704090cd2a268049146c3beb049a6b7c31f20489",class:"kol-combobox"},h("div",{key:"274df37ac0efd60063add6442119417815237090",class:`combobox ${!0===this.state._disabled?"disabled":""} `},h(KolInputWcTag,{key:"a208f04cd5a3b8a77b3fef2cde01b6ee60c787d9",_accessKey:this.state._accessKey,_disabled:this.state._disabled,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_msg:this.state._msg,_required:this.state._required,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var e;return null===(e=this.ref)||void 0===e?void 0:e.focus()},role:"presentation"},h("span",{key:"2fe387ffa8d894ecd48e86d3477f3ad0bc5ca8c2",slot:"label"},e?h("slot",{name:"expert"}):"string"==typeof this.state._accessKey?h(Fragment,null,h(InternalUnderlinedAccessKey,{accessKey:this.state._accessKey,label:this.state._label})," ",h("span",{class:"access-key-hint","aria-hidden":"true"},this.state._accessKey)):h("span",null,this.state._label)),h("div",{key:"52c6eb36e536839e87bce8f2142ecaa99a878619",slot:"input"},h("div",{key:"40ad24ed304eda6677585902534fc3ffc9a5a6b9",class:"combobox__group"},h("input",Object.assign({key:"c98bee5037381d8fcc85f5f5b2c2f2baa3edf7ee",class:"combobox__input",type:"text",role:"combobox","aria-autocomplete":"both","aria-expanded":this._isOpen?"true":"false","aria-controls":"listbox",value:this.state._value,accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-labelledby":this.state._id,"aria-activedescendant":this._isOpen&&this._focusedOptionIndex>=0?`option-${this._focusedOptionIndex}`:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,name:this.state._name,required:this.state._required,spellcheck:"false"},this.controller.onFacade,{onInput:this.onInput.bind(this),onClick:this.toggleListbox.bind(this),onChange:this.onChange.bind(this),placeholder:this.state._placeholder})),h("span",{key:"0dea84633da8b79af3e5edd65987a57a99ec15d4",class:{combobox__icon:!0}},h(KolIconTag,{key:"ed839aa136a761c491aef51e8c8ab4770d922824",_icons:"codicon codicon-triangle-down",_label:translate("kol-dropdown"),onClick:this.toggleListbox.bind(this)}))),this._isOpen&&!(!0===this.state._disabled)&&h("ul",{key:"7fae643dfa418239be55b2b2f754ce4de38e0cdb",role:"listbox","aria-label":"",class:{combobox__listbox:!0},onKeyDown:this.handleKeyDownDropdown.bind(this)},Array.isArray(this._filteredSuggestions)&&this._filteredSuggestions.length>0&&this._filteredSuggestions.map(((e,t)=>h("li",{id:`option-${t}`,key:`-${t}`,ref:e=>{e&&(this.refSuggestions[t]=e)},"data-index":t,tabIndex:0,role:"option","aria-selected":this.state._value===e,onClick:()=>{this.selectOption(e),this.toggleListbox()},class:"combobox__item",onKeyDown:t=>{"Enter"!==t.key&&"NumpadEnter"!==t.key||(this.selectOption(e),t.preventDefault())}},e))))))))}handleKeyDown(e){const t=(t,n)=>{e.preventDefault(),void 0!==t&&(this._isOpen=t),null==n||n()};switch(e.key){case"Down":case"ArrowDown":t(!0,(()=>this.moveFocus(1)));break;case"Up":case"ArrowUp":t(!0,(()=>this.moveFocus(-1)));break;case"Esc":case"Escape":t(!1);break;case"NumpadEnter":case"Enter":this.toggleListbox();break;case"Home":t(void 0,(()=>{this._isOpen&&(this._focusedOptionIndex=0,this.focusOption(this._focusedOptionIndex))}));break;case"End":t(void 0,(()=>{this._isOpen&&(this._focusedOptionIndex=this._filteredSuggestions?this._filteredSuggestions.length-1:0,this.focusOption(this._focusedOptionIndex))}));break;case"PageUp":t(void 0,(()=>this._isOpen&&this.moveFocus(10)));break;case"PageDown":t(void 0,(()=>this._isOpen&&this.moveFocus(-10)))}}handleWindowClick(e){null==this.host||this.host.contains(e.target)||(this._isOpen=!1)}constructor(e){registerInstance(this,e),this.refSuggestions=[],this.toggleListbox=()=>{if(!0===this.state._disabled)this._isOpen=!1;else if(this._isOpen=!this._isOpen,this._isOpen&&Array.isArray(this._filteredSuggestions)&&this._filteredSuggestions.length>0){const e=this._filteredSuggestions.findIndex((e=>e===this._value));this._focusedOptionIndex=e>=0?e:0,this.focusOption(this._focusedOptionIndex)}},this._focusedOptionIndex=-1,this._isOpen=!1,this._filteredSuggestions=void 0,this._accessKey=void 0,this._placeholder=void 0,this._alert=!0,this._disabled=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._suggestions=void 0,this._required=!1,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hasValue:!1,_hideError:!1,_id:`id-${nonce()}`,_label:"",_suggestions:[],_value:""},this.controller=new ComboboxController(this,"select",this.host),this.onInput=this.onInput.bind(this)}validatePlaceholder(e){this.controller.validatePlaceholder(e)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateSuggestions(e){this.controller.validateSuggestions(e)}validateRequired(e){this.controller.validateRequired(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this.refSuggestions=[],this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((e=>this.state._hasValue=!!e)),this._filteredSuggestions=this.state._suggestions}onChange(e){var t;stopPropagation(e),tryToDispatchKoliBriEvent("change",this.host,this._value),this.controller.setFormAssociatedValue(this._value),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onChange)&&this.state._on.onChange(e,this._value)}get host(){return getElement(this)}static get watchers(){return{_placeholder:["validatePlaceholder"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_suggestions:["validateSuggestions"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};KolCombobox.style={default:KolComboboxDefaultStyle0};export{KolCombobox as kol_combobox};
|