@public-ui/components 1.7.0-rc.15 → 1.7.0-rc.16
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 +215 -37
- package/dist/cjs/{a11y.tipps-0134082a.js → a11y.tipps-260facf8.js} +1 -1
- package/dist/cjs/{a11y.tipps-0134082a.js.map → a11y.tipps-260facf8.js.map} +1 -1
- package/dist/cjs/align-1a364b3a.js +4 -0
- package/dist/cjs/{align-ffcd671e.js.map → align-1a364b3a.js.map} +1 -1
- package/dist/cjs/{alignment-a90208e0.js → alignment-2c1a15a4.js} +1 -1
- package/dist/cjs/{alignment-a90208e0.js.map → alignment-2c1a15a4.js.map} +1 -1
- package/dist/cjs/{app-globals-8c537471.js → app-globals-61d84daf.js} +1 -1
- package/dist/cjs/{app-globals-8c537471.js.map → app-globals-61d84daf.js.map} +1 -1
- package/dist/cjs/aria-current-d3cc1ff0.js +4 -0
- package/dist/cjs/{aria-current-e275ab88.js.map → aria-current-d3cc1ff0.js.map} +1 -1
- package/dist/cjs/{associated.controller-fd72aae6.js → associated.controller-9f25abae.js} +1 -1
- package/dist/cjs/{associated.controller-fd72aae6.js.map → associated.controller-9f25abae.js.map} +1 -1
- package/dist/cjs/{color-8637b9a0.js → color-0412d850.js} +1 -1
- package/dist/cjs/{color-8637b9a0.js.map → color-0412d850.js.map} +1 -1
- package/dist/cjs/{controller-45b12d27.js → controller-31aba003.js} +1 -1
- package/dist/cjs/{controller-45b12d27.js.map → controller-31aba003.js.map} +1 -1
- package/dist/cjs/{controller-183d5276.js → controller-408d6731.js} +1 -1
- package/dist/cjs/{controller-183d5276.js.map → controller-408d6731.js.map} +1 -1
- package/dist/cjs/{controller-2b446dfd.js → controller-4dccdbb6.js} +1 -1
- package/dist/cjs/{controller-2b446dfd.js.map → controller-4dccdbb6.js.map} +1 -1
- package/dist/cjs/{controller-f66c143b.js → controller-a881f829.js} +1 -1
- package/dist/cjs/{controller-f66c143b.js.map → controller-a881f829.js.map} +1 -1
- package/dist/cjs/{controller-cf3f0890.js → controller-def30bbb.js} +1 -1
- package/dist/cjs/{controller-cf3f0890.js.map → controller-def30bbb.js.map} +1 -1
- package/dist/cjs/controller-icon-f59e43f5.js +4 -0
- package/dist/cjs/controller-icon-f59e43f5.js.map +1 -0
- package/dist/cjs/{custom-class-d62facd4.js → custom-class-b674a58e.js} +1 -1
- package/dist/cjs/{custom-class-d62facd4.js.map → custom-class-b674a58e.js.map} +1 -1
- package/dist/cjs/{dev.utils-d2b2471b.js → dev.utils-90d81078.js} +1 -1
- package/dist/cjs/{dev.utils-d2b2471b.js.map → dev.utils-90d81078.js.map} +1 -1
- package/dist/cjs/{devtools-9fa399ce.js → devtools-b317b279.js} +1 -1
- package/dist/cjs/{devtools-9fa399ce.js.map → devtools-b317b279.js.map} +1 -1
- package/dist/cjs/has-closer-f1128c09.js +4 -0
- package/dist/cjs/{has-closer-f703dbb9.js.map → has-closer-f1128c09.js.map} +1 -1
- package/dist/cjs/hide-label-abb553ce.js +4 -0
- package/dist/cjs/{hide-label-1c014425.js.map → hide-label-abb553ce.js.map} +1 -1
- package/dist/cjs/{i18n-f4e809a6.js → i18n-05b9ef37.js} +1 -1
- package/dist/cjs/{i18n-f4e809a6.js.map → i18n-05b9ef37.js.map} +1 -1
- package/dist/cjs/icons-62b2009b.js +4 -0
- package/dist/cjs/icons-62b2009b.js.map +1 -0
- package/dist/cjs/image-source-9dc3f869.js +4 -0
- package/dist/cjs/{image-source-8630b8ab.js.map → image-source-9dc3f869.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert-wc_3.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc_3.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js.map +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-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +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.cjs.entry.js +1 -1
- package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-adapter-leanup.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-color.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js.map +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-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input.cjs.entry.js +1 -1
- package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js.map +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-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc_2.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc_2.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-split-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
- package/dist/cjs/kol-table.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/{label-d1cec9a8.js → label-8301d6ab.js} +1 -1
- package/dist/cjs/{label-d1cec9a8.js.map → label-8301d6ab.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/open-0da313e6.js +4 -0
- package/dist/cjs/{open-4cc804c4.js.map → open-0da313e6.js.map} +1 -1
- package/dist/cjs/{prop.validators-ac830edb.js → prop.validators-2c7f3599.js} +1 -1
- package/dist/cjs/{prop.validators-ac830edb.js.map → prop.validators-2c7f3599.js.map} +1 -1
- package/dist/cjs/rows-aba76e0e.js +4 -0
- package/dist/cjs/{rows-bbcd466f.js.map → rows-aba76e0e.js.map} +1 -1
- package/dist/cjs/show-06a4c817.js +4 -0
- package/dist/cjs/{show-c1eb3e41.js.map → show-06a4c817.js.map} +1 -1
- package/dist/cjs/{suggestions-f1a217a2.js → suggestions-2125ddc8.js} +1 -1
- package/dist/cjs/{suggestions-f1a217a2.js.map → suggestions-2125ddc8.js.map} +1 -1
- package/dist/cjs/{tab-index-caf936cb.js → tab-index-b2546748.js} +1 -1
- package/dist/cjs/{tab-index-caf936cb.js.map → tab-index-b2546748.js.map} +1 -1
- package/dist/cjs/{tooltip-align-b3044d73.js → tooltip-align-56f49aad.js} +1 -1
- package/dist/cjs/{tooltip-align-b3044d73.js.map → tooltip-align-56f49aad.js.map} +1 -1
- package/dist/cjs/validation-2a3a7907.js +4 -0
- package/dist/cjs/{validation-d2c4dbc0.js.map → validation-2a3a7907.js.map} +1 -1
- package/dist/cjs/{validation-fa972660.js → validation-a77a5bc8.js} +1 -1
- package/dist/cjs/{validation-fa972660.js.map → validation-a77a5bc8.js.map} +1 -1
- package/dist/components/component.js +1 -1
- package/dist/components/component.js.map +1 -1
- package/dist/components/component13.js +1 -1
- package/dist/components/component13.js.map +1 -1
- package/dist/components/component14.js +1 -1
- package/dist/components/component14.js.map +1 -1
- package/dist/components/component16.js +1 -1
- package/dist/components/component16.js.map +1 -1
- package/dist/components/component2.js +1 -1
- package/dist/components/component2.js.map +1 -1
- package/dist/components/component5.js +1 -1
- package/dist/components/component5.js.map +1 -1
- package/dist/components/component6.js +1 -1
- package/dist/components/component6.js.map +1 -1
- package/dist/components/component8.js +1 -1
- package/dist/components/component8.js.map +1 -1
- package/dist/components/component9.js +1 -1
- package/dist/components/component9.js.map +1 -1
- package/dist/components/controller-icon.js +1 -1
- package/dist/components/controller-icon.js.map +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-accordion.js.map +1 -1
- package/dist/components/kol-breadcrumb.js +1 -1
- package/dist/components/kol-breadcrumb.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-card.js +1 -1
- package/dist/components/kol-card.js.map +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-details.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-color.js.map +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-date.js.map +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-email.js.map +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-file.js.map +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-number.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-input-radio-group.js +1 -1
- package/dist/components/kol-input-radio-group.js.map +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-range.js.map +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-input-text.js.map +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-kolibri.js.map +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link-button.js.map +1 -1
- package/dist/components/kol-link-group.js +1 -1
- package/dist/components/kol-link-group.js.map +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-nav.js.map +1 -1
- package/dist/components/kol-span.js +1 -1
- package/dist/components/kol-span.js.map +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-split-button.js.map +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-tabs.js.map +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-textarea.js.map +1 -1
- package/dist/components/prop.validators.js +1 -1
- package/dist/components/prop.validators.js.map +1 -1
- package/dist/components/shadow.js +1 -1
- package/dist/components/shadow.js.map +1 -1
- package/dist/components/shadow2.js +1 -1
- package/dist/components/shadow2.js.map +1 -1
- package/dist/components/shadow3.js +1 -1
- package/dist/components/shadow3.js.map +1 -1
- package/dist/esm/{a11y.tipps-86d2943f.js → a11y.tipps-955454c7.js} +1 -1
- package/dist/esm/{a11y.tipps-86d2943f.js.map → a11y.tipps-955454c7.js.map} +1 -1
- package/dist/esm/{align-40fbf369.js → align-17f6295e.js} +1 -1
- package/dist/esm/{align-40fbf369.js.map → align-17f6295e.js.map} +1 -1
- package/dist/esm/{alignment-f29c9e3c.js → alignment-62e2fe88.js} +1 -1
- package/dist/esm/{alignment-f29c9e3c.js.map → alignment-62e2fe88.js.map} +1 -1
- package/dist/esm/{app-globals-50958dcb.js → app-globals-ce06eaca.js} +1 -1
- package/dist/esm/{app-globals-50958dcb.js.map → app-globals-ce06eaca.js.map} +1 -1
- package/dist/esm/{aria-current-3785ded3.js → aria-current-33e3c97e.js} +1 -1
- package/dist/esm/{aria-current-3785ded3.js.map → aria-current-33e3c97e.js.map} +1 -1
- package/dist/esm/{associated.controller-12885637.js → associated.controller-a8392d1c.js} +1 -1
- package/dist/esm/{associated.controller-12885637.js.map → associated.controller-a8392d1c.js.map} +1 -1
- package/dist/esm/{color-3286e820.js → color-2b3a5310.js} +1 -1
- package/dist/esm/{color-3286e820.js.map → color-2b3a5310.js.map} +1 -1
- package/dist/esm/{controller-e361e808.js → controller-0cdd226f.js} +1 -1
- package/dist/esm/{controller-e361e808.js.map → controller-0cdd226f.js.map} +1 -1
- package/dist/esm/{controller-d5bd0829.js → controller-11647277.js} +1 -1
- package/dist/esm/{controller-d5bd0829.js.map → controller-11647277.js.map} +1 -1
- package/dist/esm/{controller-7378fe29.js → controller-21b27bb0.js} +1 -1
- package/dist/esm/{controller-7378fe29.js.map → controller-21b27bb0.js.map} +1 -1
- package/dist/esm/{controller-9313a601.js → controller-d497e95c.js} +1 -1
- package/dist/esm/{controller-9313a601.js.map → controller-d497e95c.js.map} +1 -1
- package/dist/esm/{controller-0214ed78.js → controller-e640c812.js} +1 -1
- package/dist/esm/{controller-0214ed78.js.map → controller-e640c812.js.map} +1 -1
- package/dist/esm/controller-icon-480ef779.js +4 -0
- package/dist/esm/controller-icon-480ef779.js.map +1 -0
- package/dist/esm/{custom-class-08f5fafe.js → custom-class-0d8ba497.js} +1 -1
- package/dist/esm/{custom-class-08f5fafe.js.map → custom-class-0d8ba497.js.map} +1 -1
- package/dist/esm/{dev.utils-387eb46c.js → dev.utils-de957095.js} +1 -1
- package/dist/esm/{dev.utils-387eb46c.js.map → dev.utils-de957095.js.map} +1 -1
- package/dist/esm/{devtools-4ffc0378.js → devtools-cf3722d6.js} +1 -1
- package/dist/esm/{devtools-4ffc0378.js.map → devtools-cf3722d6.js.map} +1 -1
- package/dist/esm/{has-closer-e73838e1.js → has-closer-25b01859.js} +1 -1
- package/dist/esm/{has-closer-e73838e1.js.map → has-closer-25b01859.js.map} +1 -1
- package/dist/esm/{hide-label-fa80738c.js → hide-label-04a37e65.js} +1 -1
- package/dist/esm/{hide-label-fa80738c.js.map → hide-label-04a37e65.js.map} +1 -1
- package/dist/esm/{i18n-bbfd20b1.js → i18n-bc04aa53.js} +1 -1
- package/dist/esm/{i18n-bbfd20b1.js.map → i18n-bc04aa53.js.map} +1 -1
- package/dist/esm/icons-3e49b4a0.js +4 -0
- package/dist/esm/icons-3e49b4a0.js.map +1 -0
- package/dist/esm/{image-source-e8ad9cfc.js → image-source-bc13c942.js} +1 -1
- package/dist/esm/{image-source-e8ad9cfc.js.map → image-source-bc13c942.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js.map +1 -1
- package/dist/esm/kol-alert-wc_3.entry.js +1 -1
- package/dist/esm/kol-alert-wc_3.entry.js.map +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js.map +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-badge.entry.js.map +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js.map +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.entry.js +1 -1
- package/dist/esm/kol-button.entry.js.map +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-card.entry.js.map +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-details.entry.js.map +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js.map +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-input-adapter-leanup.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js.map +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js.map +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js.map +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js.map +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js.map +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js.map +1 -1
- package/dist/esm/kol-input-radio-group.entry.js +1 -1
- package/dist/esm/kol-input-radio-group.entry.js.map +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js.map +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js.map +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js.map +1 -1
- package/dist/esm/kol-input.entry.js +1 -1
- package/dist/esm/kol-input.entry.js.map +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js.map +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js.map +1 -1
- package/dist/esm/kol-link-group.entry.js +1 -1
- package/dist/esm/kol-link-group.entry.js.map +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js.map +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-link.entry.js.map +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js.map +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-popover.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-select.entry.js.map +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-span-wc_2.entry.js +1 -1
- package/dist/esm/kol-span-wc_2.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-split-button.entry.js.map +1 -1
- package/dist/esm/kol-symbol.entry.js +1 -1
- package/dist/esm/kol-table.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js.map +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js.map +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toast.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/{label-4bb4b8b0.js → label-75e66cca.js} +1 -1
- package/dist/esm/{label-4bb4b8b0.js.map → label-75e66cca.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{open-1bbc69de.js → open-c7533c31.js} +1 -1
- package/dist/esm/{open-1bbc69de.js.map → open-c7533c31.js.map} +1 -1
- package/dist/esm/{prop.validators-25add96a.js → prop.validators-4b478b27.js} +1 -1
- package/dist/esm/{prop.validators-25add96a.js.map → prop.validators-4b478b27.js.map} +1 -1
- package/dist/esm/{rows-727d397f.js → rows-4c316968.js} +1 -1
- package/dist/esm/{rows-727d397f.js.map → rows-4c316968.js.map} +1 -1
- package/dist/esm/{show-fc17fc91.js → show-66ad1c38.js} +1 -1
- package/dist/esm/{show-fc17fc91.js.map → show-66ad1c38.js.map} +1 -1
- package/dist/esm/{suggestions-20b7d471.js → suggestions-1e1bc6c7.js} +1 -1
- package/dist/esm/{suggestions-20b7d471.js.map → suggestions-1e1bc6c7.js.map} +1 -1
- package/dist/esm/{tab-index-f5544a7b.js → tab-index-0032cfde.js} +1 -1
- package/dist/esm/{tab-index-f5544a7b.js.map → tab-index-0032cfde.js.map} +1 -1
- package/dist/esm/{tooltip-align-87f02e9d.js → tooltip-align-d07756e6.js} +1 -1
- package/dist/esm/{tooltip-align-87f02e9d.js.map → tooltip-align-d07756e6.js.map} +1 -1
- package/dist/esm/validation-311fef33.js +4 -0
- package/dist/esm/{validation-ff9bb97a.js.map → validation-311fef33.js.map} +1 -1
- package/dist/esm/validation-ea94708d.js +4 -0
- package/dist/esm/{validation-b971b214.js.map → validation-ea94708d.js.map} +1 -1
- package/dist/kolibri/{a11y.tipps-86d2943f.js → a11y.tipps-955454c7.js} +1 -1
- package/dist/kolibri/align-17f6295e.js +4 -0
- package/dist/kolibri/alignment-62e2fe88.js +4 -0
- package/dist/kolibri/{app-globals-50958dcb.js → app-globals-ce06eaca.js} +1 -1
- package/dist/kolibri/{aria-current-3785ded3.js → aria-current-33e3c97e.js} +1 -1
- package/dist/kolibri/assets/simulations/nav-simulation.js +1 -1
- package/dist/kolibri/assets/simulations/smart-button-simulation.js +1 -1
- package/dist/kolibri/assets/simulations/tabs-simulation.js +1 -1
- package/dist/kolibri/{associated.controller-12885637.js → associated.controller-a8392d1c.js} +1 -1
- package/dist/kolibri/{color-3286e820.js → color-2b3a5310.js} +1 -1
- package/dist/kolibri/{controller-e361e808.js → controller-0cdd226f.js} +1 -1
- package/dist/kolibri/{controller-d5bd0829.js → controller-11647277.js} +1 -1
- package/dist/kolibri/controller-21b27bb0.js +4 -0
- package/dist/kolibri/{controller-7378fe29.js.map → controller-21b27bb0.js.map} +1 -1
- package/dist/kolibri/{controller-9313a601.js → controller-d497e95c.js} +1 -1
- package/dist/kolibri/{controller-0214ed78.js → controller-e640c812.js} +1 -1
- package/dist/kolibri/controller-icon-480ef779.js +4 -0
- package/dist/kolibri/controller-icon-480ef779.js.map +1 -0
- package/dist/kolibri/{custom-class-08f5fafe.js → custom-class-0d8ba497.js} +1 -1
- package/dist/kolibri/{dev.utils-387eb46c.js → dev.utils-de957095.js} +1 -1
- package/dist/kolibri/{dev.utils-387eb46c.js.map → dev.utils-de957095.js.map} +1 -1
- package/dist/kolibri/devtools-cf3722d6.js +4 -0
- package/dist/kolibri/has-closer-25b01859.js +4 -0
- package/dist/kolibri/{has-closer-e73838e1.js.map → has-closer-25b01859.js.map} +1 -1
- package/dist/kolibri/hide-label-04a37e65.js +4 -0
- package/dist/kolibri/{i18n-bbfd20b1.js → i18n-bc04aa53.js} +1 -1
- package/dist/kolibri/icons-3e49b4a0.js +4 -0
- package/dist/kolibri/icons-3e49b4a0.js.map +1 -0
- package/dist/kolibri/image-source-bc13c942.js +4 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js.map +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js.map +1 -1
- package/dist/kolibri/kol-alert-wc_3.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc_3.entry.js.map +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js.map +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-badge.entry.js.map +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js.map +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.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js.map +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js.map +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js.map +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js.map +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-input-adapter-leanup.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-color.entry.js.map +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js.map +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js.map +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js.map +1 -1
- package/dist/kolibri/kol-input-radio-group.entry.js +1 -1
- package/dist/kolibri/kol-input-radio-group.entry.js.map +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js.map +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js.map +1 -1
- package/dist/kolibri/kol-input.entry.js +1 -1
- package/dist/kolibri/kol-input.entry.js.map +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js.map +1 -1
- package/dist/kolibri/kol-link-group.entry.js +1 -1
- package/dist/kolibri/kol-link-group.entry.js.map +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js.map +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js.map +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-span-wc_2.entry.js +1 -1
- package/dist/kolibri/kol-span-wc_2.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-split-button.entry.js.map +1 -1
- package/dist/kolibri/kol-symbol.entry.js +1 -1
- package/dist/kolibri/kol-table.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js.map +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js.map +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toast.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/{label-4bb4b8b0.js → label-75e66cca.js} +1 -1
- package/dist/kolibri/open-c7533c31.js +4 -0
- package/dist/kolibri/{open-1bbc69de.js.map → open-c7533c31.js.map} +1 -1
- package/dist/kolibri/{prop.validators-25add96a.js → prop.validators-4b478b27.js} +1 -1
- package/dist/kolibri/rows-4c316968.js +4 -0
- package/dist/kolibri/show-66ad1c38.js +4 -0
- package/dist/kolibri/{show-fc17fc91.js.map → show-66ad1c38.js.map} +1 -1
- package/dist/kolibri/{suggestions-20b7d471.js → suggestions-1e1bc6c7.js} +1 -1
- package/dist/kolibri/tab-index-0032cfde.js +4 -0
- package/dist/kolibri/{tab-index-f5544a7b.js.map → tab-index-0032cfde.js.map} +1 -1
- package/dist/kolibri/tooltip-align-d07756e6.js +4 -0
- package/dist/kolibri/validation-311fef33.js +4 -0
- package/dist/kolibri/validation-ea94708d.js +4 -0
- package/dist/types/components/@deprecated/input/controller-icon.d.ts +3 -2
- package/dist/types/components/@deprecated/input/types-icon.d.ts +3 -2
- package/dist/types/components/badge/component.d.ts +3 -2
- package/dist/types/components/badge/types.d.ts +3 -2
- package/dist/types/components/button/component.d.ts +5 -3
- package/dist/types/components/button/shadow.d.ts +3 -2
- package/dist/types/components/button/types.d.ts +5 -4
- package/dist/types/components/button-link/component.d.ts +3 -2
- package/dist/types/components/icon/component.d.ts +3 -1
- package/dist/types/components/icon/types.d.ts +4 -4
- package/dist/types/components/input/component.d.ts +4 -2
- package/dist/types/components/input/types.d.ts +3 -2
- package/dist/types/components/input-checkbox/component.d.ts +5 -3
- package/dist/types/components/input-checkbox/controller.d.ts +3 -2
- package/dist/types/components/input-checkbox/types.d.ts +6 -5
- package/dist/types/components/input-color/component.d.ts +5 -3
- package/dist/types/components/input-color/types.d.ts +4 -3
- package/dist/types/components/input-date/component.d.ts +5 -3
- package/dist/types/components/input-date/types.d.ts +2 -2
- package/dist/types/components/input-email/component.d.ts +5 -3
- package/dist/types/components/input-email/types.d.ts +4 -3
- package/dist/types/components/input-file/component.d.ts +5 -3
- package/dist/types/components/input-file/types.d.ts +4 -3
- package/dist/types/components/input-number/component.d.ts +5 -3
- package/dist/types/components/input-number/types.d.ts +2 -2
- package/dist/types/components/input-password/component.d.ts +5 -3
- package/dist/types/components/input-password/types.d.ts +4 -3
- package/dist/types/components/input-range/component.d.ts +5 -3
- package/dist/types/components/input-range/types.d.ts +4 -3
- package/dist/types/components/input-text/component.d.ts +5 -3
- package/dist/types/components/input-text/types.d.ts +4 -3
- package/dist/types/components/link/component.d.ts +5 -3
- package/dist/types/components/link/shadow.d.ts +3 -2
- package/dist/types/components/link/types.d.ts +4 -3
- package/dist/types/components/link-button/component.d.ts +2 -2
- package/dist/types/components/select/component.d.ts +5 -3
- package/dist/types/components/select/types.d.ts +4 -3
- package/dist/types/components/span/component.d.ts +5 -3
- package/dist/types/components/span/shadow.d.ts +3 -2
- package/dist/types/components/span/types.d.ts +4 -3
- package/dist/types/components/split-button/component.d.ts +3 -2
- package/dist/types/components/split-button/types.d.ts +4 -3
- package/dist/types/components/tabs/types.d.ts +3 -2
- package/dist/types/components.d.ts +250 -94
- package/dist/types/types/button-link-text.d.ts +3 -2
- package/dist/types/types/{icon.d.ts → icons.d.ts} +5 -5
- package/dist/types/types/input/control/number.d.ts +3 -2
- package/dist/types/types/props/icons.d.ts +12 -0
- package/doc/alert.md +2 -2
- package/doc/badge.md +14 -13
- package/doc/button-group.md +1 -1
- package/doc/button-link.md +4 -3
- package/doc/button.md +5 -4
- package/doc/card.md +2 -2
- package/doc/icon-font-awesome.md +1 -1
- package/doc/icon.md +7 -6
- package/doc/input-checkbox.md +6 -5
- package/doc/input-color.md +23 -22
- package/doc/input-date.md +29 -28
- package/doc/input-email.md +31 -30
- package/doc/input-file.md +23 -22
- package/doc/input-number.md +30 -29
- package/doc/input-password.md +28 -27
- package/doc/input-radio-group.md +4 -4
- package/doc/input-radio.md +3 -3
- package/doc/input-range.md +5 -4
- package/doc/input-text.md +31 -30
- package/doc/kolibri.md +1 -1
- package/doc/link-button.md +3 -3
- package/doc/link-group.md +1 -1
- package/doc/link.md +5 -4
- package/doc/nav.md +11 -11
- package/doc/select.md +6 -5
- package/doc/span.md +7 -6
- package/doc/split-button.md +4 -3
- package/doc/textarea.md +6 -6
- package/package.json +1 -1
- package/vscode-custom-data.json +89 -21
- package/dist/cjs/align-ffcd671e.js +0 -4
- package/dist/cjs/aria-current-e275ab88.js +0 -4
- package/dist/cjs/controller-icon-0ced64f4.js +0 -4
- package/dist/cjs/controller-icon-0ced64f4.js.map +0 -1
- package/dist/cjs/has-closer-f703dbb9.js +0 -4
- package/dist/cjs/hide-label-1c014425.js +0 -4
- package/dist/cjs/icon-685623ce.js +0 -4
- package/dist/cjs/icon-685623ce.js.map +0 -1
- package/dist/cjs/image-source-8630b8ab.js +0 -4
- package/dist/cjs/open-4cc804c4.js +0 -4
- package/dist/cjs/rows-bbcd466f.js +0 -4
- package/dist/cjs/show-c1eb3e41.js +0 -4
- package/dist/cjs/validation-d2c4dbc0.js +0 -4
- package/dist/esm/controller-icon-516c3ff2.js +0 -4
- package/dist/esm/controller-icon-516c3ff2.js.map +0 -1
- package/dist/esm/icon-91abf20b.js +0 -4
- package/dist/esm/icon-91abf20b.js.map +0 -1
- package/dist/esm/validation-b971b214.js +0 -4
- package/dist/esm/validation-ff9bb97a.js +0 -4
- package/dist/kolibri/align-40fbf369.js +0 -4
- package/dist/kolibri/alignment-f29c9e3c.js +0 -4
- package/dist/kolibri/controller-7378fe29.js +0 -4
- package/dist/kolibri/controller-icon-516c3ff2.js +0 -4
- package/dist/kolibri/controller-icon-516c3ff2.js.map +0 -1
- package/dist/kolibri/devtools-4ffc0378.js +0 -4
- package/dist/kolibri/has-closer-e73838e1.js +0 -4
- package/dist/kolibri/hide-label-fa80738c.js +0 -4
- package/dist/kolibri/icon-91abf20b.js +0 -4
- package/dist/kolibri/icon-91abf20b.js.map +0 -1
- package/dist/kolibri/image-source-e8ad9cfc.js +0 -4
- package/dist/kolibri/open-1bbc69de.js +0 -4
- package/dist/kolibri/rows-727d397f.js +0 -4
- package/dist/kolibri/show-fc17fc91.js +0 -4
- package/dist/kolibri/tab-index-f5544a7b.js +0 -4
- package/dist/kolibri/tooltip-align-87f02e9d.js +0 -4
- package/dist/kolibri/validation-b971b214.js +0 -4
- package/dist/kolibri/validation-ff9bb97a.js +0 -4
- package/dist/types/types/props/icon.d.ts +0 -12
- /package/dist/kolibri/{a11y.tipps-86d2943f.js.map → a11y.tipps-955454c7.js.map} +0 -0
- /package/dist/kolibri/{align-40fbf369.js.map → align-17f6295e.js.map} +0 -0
- /package/dist/kolibri/{alignment-f29c9e3c.js.map → alignment-62e2fe88.js.map} +0 -0
- /package/dist/kolibri/{app-globals-50958dcb.js.map → app-globals-ce06eaca.js.map} +0 -0
- /package/dist/kolibri/{aria-current-3785ded3.js.map → aria-current-33e3c97e.js.map} +0 -0
- /package/dist/kolibri/{associated.controller-12885637.js.map → associated.controller-a8392d1c.js.map} +0 -0
- /package/dist/kolibri/{color-3286e820.js.map → color-2b3a5310.js.map} +0 -0
- /package/dist/kolibri/{controller-e361e808.js.map → controller-0cdd226f.js.map} +0 -0
- /package/dist/kolibri/{controller-d5bd0829.js.map → controller-11647277.js.map} +0 -0
- /package/dist/kolibri/{controller-9313a601.js.map → controller-d497e95c.js.map} +0 -0
- /package/dist/kolibri/{controller-0214ed78.js.map → controller-e640c812.js.map} +0 -0
- /package/dist/kolibri/{custom-class-08f5fafe.js.map → custom-class-0d8ba497.js.map} +0 -0
- /package/dist/kolibri/{devtools-4ffc0378.js.map → devtools-cf3722d6.js.map} +0 -0
- /package/dist/kolibri/{hide-label-fa80738c.js.map → hide-label-04a37e65.js.map} +0 -0
- /package/dist/kolibri/{i18n-bbfd20b1.js.map → i18n-bc04aa53.js.map} +0 -0
- /package/dist/kolibri/{image-source-e8ad9cfc.js.map → image-source-bc13c942.js.map} +0 -0
- /package/dist/kolibri/{label-4bb4b8b0.js.map → label-75e66cca.js.map} +0 -0
- /package/dist/kolibri/{prop.validators-25add96a.js.map → prop.validators-4b478b27.js.map} +0 -0
- /package/dist/kolibri/{rows-727d397f.js.map → rows-4c316968.js.map} +0 -0
- /package/dist/kolibri/{suggestions-20b7d471.js.map → suggestions-1e1bc6c7.js.map} +0 -0
- /package/dist/kolibri/{tooltip-align-87f02e9d.js.map → tooltip-align-d07756e6.js.map} +0 -0
- /package/dist/kolibri/{validation-ff9bb97a.js.map → validation-311fef33.js.map} +0 -0
- /package/dist/kolibri/{validation-b971b214.js.map → validation-ea94708d.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["validateAlert","component","value","watchBoolean","defaultStyleCss","featureHint","KolInputText","render","ariaDescribedBy","getRenderStates","this","state","hasSuggestions","Array","isArray","_suggestions","length","hasExpertSlot","showExpertSlot","_label","h","Host","class","_hasValue","_type","_hideLabel","_currentLength","_disabled","_error","_hideError","_hasCounter","_hint","_icon","_id","_maxLength","_readOnly","_required","_smartButton","_tooltipAlign","_touched","onClick","_a","ref","focus","slot","Object","assign","catchRef","title","accessKey","_accessKey","join","undefined","autoCapitalize","autoComplete","_autoComplete","autoCorrect","disabled","id","list","maxlength","name","_name","pattern","_pattern","placeholder","_placeholder","readOnly","required","size","_size","spellcheck","type","_value","controller","onFacade","onKeyUp","constructor","hostRef","propagateFocus","host","disconnectedCallback","addEventListener","onChange","event","setState","target","code","propagateSubmitEventToForm","form","oldValue","_b","nonce","InputTextController","validateAccessKey","validateAutoComplete","validateDisabled","validateError","validateHasCounter","validateHideError","validateHideLabel","validateHint","validateIcon","validateId","validateLabel","validateList","validateSuggestions","validateMaxLength","validateName","validateOn","validatePattern","validatePlaceholder","validateReadOnly","validateRequired","validateSize","validateSmartButton","validateSyncValueBySelector","validateTabIndex","validateTouched","validateType","validateValue","componentWillLoad","_alert","addValueChangeListener","v","removeEventListener"],"sources":["src/types/props/alert.ts","src/components/input-text/style.css?tag=kol-input-text&mode=default&encapsulation=shadow","src/components/input-text/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type AlertPropType = boolean;\n\n/**\n * Defines whether the screen-readers should read out the notification.\n */\nexport type PropAlert = {\n\talert: AlertPropType;\n};\n\n/* validator */\nexport const validateAlert = (component: Generic.Element.Component, value?: AlertPropType): void => {\n\twatchBoolean(component, '_alert', value);\n};\n","@import url(../input-line.css);\n.error.hidden {\n\tdisplay: none;\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { KoliBriHorizontalIcon } from '../../types/icon';\nimport { InputTextType } from '../../types/input/control/text';\nimport { InputTypeOnDefault, InputTypeOnOff } from '../../types/input/types';\nimport { AlertPropType, validateAlert } from '../../types/props/alert';\nimport { HideErrorPropType } from '../../types/props/hide-error';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { NamePropType } from '../../types/props/name';\nimport { SuggestionsPropType } from '../../types/props/suggestions';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { setState } from '../../utils/prop.validators';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { Props as ButtonProps } from '../button/types';\nimport { propagateSubmitEventToForm } from '../form/controller';\nimport { getRenderStates } from '../input/controller';\nimport { InputTextController } from './controller';\nimport { API, States } from './types';\n\nfeatureHint(`[KolInputText] Pre- und post-Label für Währung usw.`);\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-input-text',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolInputText implements API {\n\t@Element() private readonly host?: HTMLKolInputTextElement;\n\tprivate ref?: HTMLInputElement;\n\tprivate oldValue?: string;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t\tthis.disconnectedCallback();\n\t\tthis.ref?.addEventListener('search', this.onChange);\n\t};\n\n\tprivate readonly onKeyUp = (event: KeyboardEvent) => {\n\t\tsetState(this, '_currentLength', (event.target as HTMLInputElement).value.length);\n\t\tif (event.code === 'Enter' || event.code === 'NumpadEnter') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.onChange(event);\n\t\t}\n\t};\n\n\tprivate readonly onChange = (event: Event) => {\n\t\tif (this.oldValue !== this.ref?.value) {\n\t\t\tthis.oldValue = this.ref?.value;\n\t\t\tthis.controller.onFacade.onChange(event);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\t'has-value': this.state._hasValue,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<kol-input\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._type]: true,\n\t\t\t\t\t\t'hide-label': !!this.state._hideLabel,\n\t\t\t\t\t}}\n\t\t\t\t\t_currentLength={this.state._currentLength}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_error={this.state._error}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hasCounter={this.state._hasCounter}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_icon={this.state._icon}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_suggestions={this.state._suggestions}\n\t\t\t\t\t_maxLength={this.state._maxLength}\n\t\t\t\t\t_readOnly={this.state._readOnly}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_smartButton={this.state._smartButton}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\tonClick={() => this.ref?.focus()}\n\t\t\t\t>\n\t\t\t\t\t{/* TODO: der folgende Slot ohne Name muss später entfernt werden */}\n\t\t\t\t\t<span slot=\"label\">{hasExpertSlot ? <slot></slot> : this.state._label}</span>\n\t\t\t\t\t<div slot=\"input\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\t\t\tautoComplete={this.state._autoComplete}\n\t\t\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tlist={hasSuggestions ? `${this.state._id}-list` : undefined}\n\t\t\t\t\t\t\tmaxlength={this.state._maxLength}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\tpattern={this.state._pattern}\n\t\t\t\t\t\t\tplaceholder={this.state._placeholder}\n\t\t\t\t\t\t\treadOnly={this.state._readOnly}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\tsize={this.state._size}\n\t\t\t\t\t\t\tspellcheck=\"false\"\n\t\t\t\t\t\t\ttype={this.state._type}\n\t\t\t\t\t\t\tvalue={this.state._value as string}\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\t// onInput={this.controller.onFacade.onChange}\n\t\t\t\t\t\t\tonKeyUp={this.onKeyUp}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</kol-input>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputTextController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Defines whether the input can be auto-completed.\n\t */\n\t@Prop() public _autoComplete?: InputTypeOnOff;\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;\n\n\t/**\n\t * Defines the error message text.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: 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;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icon=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriHorizontalIcon>;\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 * Deprecated: Gibt die Liste der Vorschlagswörter an.\n\t * @deprecated Use _suggestions.\n\t */\n\t@Prop() public _list?: Stringified<string[]>;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\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 das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines a validation pattern for the input field.\n\t */\n\t@Prop() public _pattern?: string;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean;\n\n\t/**\n\t * Setzt die Breite des Eingabefeldes in Buchstabenbreiten.\n\t */\n\t@Prop() public _size?: number;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\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 * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\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?: InputTextType = 'text';\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop({ mutable: true }) public _value?: string;\n\n\t@State() public state: States = {\n\t\t_autoComplete: 'off',\n\t\t_currentLength: 0,\n\t\t_hasValue: false,\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_suggestions: [],\n\t\t_type: 'text',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new InputTextController(this, 'input-text', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: AlertPropType): void {\n\t\tvalidateAlert(this, value);\n\t}\n\n\t@Watch('_autoComplete')\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\tthis.controller.validateAutoComplete(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: boolean): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icon')\n\tpublic validateIcon(value?: Stringified<KoliBriHorizontalIcon>): void {\n\t\tthis.controller.validateIcon(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_list')\n\tpublic validateList(value?: SuggestionsPropType): void {\n\t\tthis.validateSuggestions(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_pattern')\n\tpublic validatePattern(value?: string): void {\n\t\tthis.controller.validatePattern(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: string): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: boolean): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_size')\n\tpublic validateSize(value?: number): void {\n\t\tthis.controller.validateSize(value);\n\t}\n\n\t@Watch('_suggestions')\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tthis.controller.validateSuggestions(value);\n\t}\n\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tthis.controller.validateSmartButton(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: InputTextType): void {\n\t\tthis.controller.validateType(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._alert = this._alert === true;\n\t\tthis._touched = this._touched === true;\n\t\tthis.oldValue = this._value;\n\t\tthis.controller.componentWillLoad();\n\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tthis.ref?.removeEventListener('search', this.onChange);\n\t}\n}\n"],"mappings":";;;2sBAeO,MAAMA,EAAgB,CAACC,EAAsCC,KACnEC,EAAaF,EAAW,SAAUC,EAAM,EChBzC,MAAME,EAAkB,+7DCwBxBC,EAAY,uD,MAYCC,EAAY,MA+BjB,MAAAC,GACN,MAAMC,gBAAEA,GAAoBC,EAAgBC,KAAKC,OACjD,MAAMC,EAAiB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ACtBQ,KAAKgE,WAAWoC,gBAAgB5G,E,CAI1B,mBAAA6G,CAAoB7G,GAC1BQ,KAAKgE,WAAWqC,oBAAoB7G,E,CAI9B,gBAAA8G,CAAiB9G,GACvBQ,KAAKgE,WAAWsC,iBAAiB9G,E,CAI3B,gBAAA+G,CAAiB/G,GACvBQ,KAAKgE,WAAWuC,iBAAiB/G,E,CAO3B,YAAAgH,CAAahH,GACnBQ,KAAKgE,WAAWwC,aAAahH,E,CAIvB,mBAAAwG,CAAoBxG,GAC1BQ,KAAKgE,WAAWgC,oBAAoBxG,E,CAI9B,mBAAAiH,CAAoBjH,GAC1BQ,KAAKgE,WAAWyC,oBAAoBjH,E,CAI9B,2BAAAkH,CAA4BlH,GAClCQ,KAAKgE,WAAW0C,4BAA4BlH,E,CAItC,gBAAAmH,CAAiBnH,GACvBQ,KAAKgE,WAAW2C,iBAAiBnH,E,CAI3B,eAAAoH,CAAgBpH,GACtBQ,KAAKgE,WAAW4C,gBAAgBpH,E,CAI1B,YAAAqH,CAAarH,GACnBQ,KAAKgE,WAAW6C,aAAarH,E,CAIvB,aAAAsH,CAActH,GACpBQ,KAAKgE,WAAW8C,cAActH,E,CAGxB,iBAAAuH,GACN/G,KAAKgH,OAAShH,KAAKgH,SAAW,KAC9BhH,KAAK6B,SAAW7B,KAAK6B,WAAa,KAClC7B,KAAKgF,SAAWhF,KAAK+D,OACrB/D,KAAKgE,WAAW+C,oBAEhB/G,KAAKC,MAAMY,YAAcb,KAAKC,MAAM8D,OACpC/D,KAAKgE,WAAWiD,wBAAwBC,GAAOlH,KAAKC,MAAMY,YAAcqG,G,CAGlE,oBAAA3C,G,OACNxC,EAAA/B,KAAKgC,OAAG,MAAAD,SAAA,SAAAA,EAAEoF,oBAAoB,SAAUnH,KAAKyE,S"}
|
|
1
|
+
{"version":3,"names":["validateAlert","component","value","watchBoolean","defaultStyleCss","featureHint","KolInputText","render","ariaDescribedBy","getRenderStates","this","state","hasSuggestions","Array","isArray","_suggestions","length","hasExpertSlot","showExpertSlot","_label","h","Host","class","_hasValue","_type","_hideLabel","_currentLength","_disabled","_error","_hideError","_hasCounter","_hint","_icons","_id","_maxLength","_readOnly","_required","_smartButton","_tooltipAlign","_touched","onClick","_a","ref","focus","slot","Object","assign","catchRef","title","accessKey","_accessKey","join","undefined","autoCapitalize","autoComplete","_autoComplete","autoCorrect","disabled","id","list","maxlength","name","_name","pattern","_pattern","placeholder","_placeholder","readOnly","required","size","_size","spellcheck","type","_value","controller","onFacade","onKeyUp","constructor","hostRef","propagateFocus","host","disconnectedCallback","addEventListener","onChange","event","setState","target","code","propagateSubmitEventToForm","form","oldValue","_b","nonce","InputTextController","validateAccessKey","validateAutoComplete","validateDisabled","validateError","validateHasCounter","validateHideError","validateHideLabel","validateHint","validateIcon","validateIcons","validateId","validateLabel","validateList","validateSuggestions","validateMaxLength","validateName","validateOn","validatePattern","validatePlaceholder","validateReadOnly","validateRequired","validateSize","validateSmartButton","validateSyncValueBySelector","validateTabIndex","validateTouched","validateType","validateValue","componentWillLoad","_alert","addValueChangeListener","v","removeEventListener"],"sources":["src/types/props/alert.ts","src/components/input-text/style.css?tag=kol-input-text&mode=default&encapsulation=shadow","src/components/input-text/component.tsx"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type AlertPropType = boolean;\n\n/**\n * Defines whether the screen-readers should read out the notification.\n */\nexport type PropAlert = {\n\talert: AlertPropType;\n};\n\n/* validator */\nexport const validateAlert = (component: Generic.Element.Component, value?: AlertPropType): void => {\n\twatchBoolean(component, '_alert', value);\n};\n","@import url(../input-line.css);\n.error.hidden {\n\tdisplay: none;\n}\n","import { Component, Element, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { KoliBriHorizontalIcons } from '../../types/icons';\nimport { InputTextType } from '../../types/input/control/text';\nimport { InputTypeOnDefault, InputTypeOnOff } from '../../types/input/types';\nimport { AlertPropType, validateAlert } from '../../types/props/alert';\nimport { HideErrorPropType } from '../../types/props/hide-error';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { NamePropType } from '../../types/props/name';\nimport { SuggestionsPropType } from '../../types/props/suggestions';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { featureHint } from '../../utils/a11y.tipps';\nimport { nonce } from '../../utils/dev.utils';\nimport { setState } from '../../utils/prop.validators';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { Props as ButtonProps } from '../button/types';\nimport { propagateSubmitEventToForm } from '../form/controller';\nimport { getRenderStates } from '../input/controller';\nimport { InputTextController } from './controller';\nimport { API, States } from './types';\n\nfeatureHint(`[KolInputText] Pre- und post-Label für Währung usw.`);\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-input-text',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolInputText implements API {\n\t@Element() private readonly host?: HTMLKolInputTextElement;\n\tprivate ref?: HTMLInputElement;\n\tprivate oldValue?: string;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t\tthis.disconnectedCallback();\n\t\tthis.ref?.addEventListener('search', this.onChange);\n\t};\n\n\tprivate readonly onKeyUp = (event: KeyboardEvent) => {\n\t\tsetState(this, '_currentLength', (event.target as HTMLInputElement).value.length);\n\t\tif (event.code === 'Enter' || event.code === 'NumpadEnter') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.ref,\n\t\t\t});\n\t\t} else {\n\t\t\tthis.onChange(event);\n\t\t}\n\t};\n\n\tprivate readonly onChange = (event: Event) => {\n\t\tif (this.oldValue !== this.ref?.value) {\n\t\t\tthis.oldValue = this.ref?.value;\n\t\t\tthis.controller.onFacade.onChange(event);\n\t\t}\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy } = getRenderStates(this.state);\n\t\tconst hasSuggestions = Array.isArray(this.state._suggestions) && this.state._suggestions.length > 0;\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\t'has-value': this.state._hasValue,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<kol-input\n\t\t\t\t\tclass={{\n\t\t\t\t\t\t[this.state._type]: true,\n\t\t\t\t\t\t'hide-label': !!this.state._hideLabel,\n\t\t\t\t\t}}\n\t\t\t\t\t_currentLength={this.state._currentLength}\n\t\t\t\t\t_disabled={this.state._disabled}\n\t\t\t\t\t_error={this.state._error}\n\t\t\t\t\t_hideError={this.state._hideError}\n\t\t\t\t\t_hasCounter={this.state._hasCounter}\n\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t_icons={this.state._icons}\n\t\t\t\t\t_id={this.state._id}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t\t_suggestions={this.state._suggestions}\n\t\t\t\t\t_maxLength={this.state._maxLength}\n\t\t\t\t\t_readOnly={this.state._readOnly}\n\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t_smartButton={this.state._smartButton}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\tonClick={() => this.ref?.focus()}\n\t\t\t\t>\n\t\t\t\t\t{/* TODO: der folgende Slot ohne Name muss später entfernt werden */}\n\t\t\t\t\t<span slot=\"label\">{hasExpertSlot ? <slot></slot> : this.state._label}</span>\n\t\t\t\t\t<div slot=\"input\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\taccessKey={this.state._accessKey}\n\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof this.state._label === 'string' ? this.state._label : undefined}\n\t\t\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\t\t\tautoComplete={this.state._autoComplete}\n\t\t\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\t\t\tdisabled={this.state._disabled}\n\t\t\t\t\t\t\tid={this.state._id}\n\t\t\t\t\t\t\tlist={hasSuggestions ? `${this.state._id}-list` : undefined}\n\t\t\t\t\t\t\tmaxlength={this.state._maxLength}\n\t\t\t\t\t\t\tname={this.state._name}\n\t\t\t\t\t\t\tpattern={this.state._pattern}\n\t\t\t\t\t\t\tplaceholder={this.state._placeholder}\n\t\t\t\t\t\t\treadOnly={this.state._readOnly}\n\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\tsize={this.state._size}\n\t\t\t\t\t\t\tspellcheck=\"false\"\n\t\t\t\t\t\t\ttype={this.state._type}\n\t\t\t\t\t\t\tvalue={this.state._value as string}\n\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\t// onInput={this.controller.onFacade.onChange}\n\t\t\t\t\t\t\tonKeyUp={this.onKeyUp}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</kol-input>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputTextController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\n\n\t/**\n\t * Defines whether the input can be auto-completed.\n\t */\n\t@Prop() public _autoComplete?: InputTypeOnOff;\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 * Defines the error message text.\n\t */\n\t@Prop() public _error?: string;\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: 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 hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: Stringified<KoliBriHorizontalIcons>;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<KoliBriHorizontalIcons>;\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 * Deprecated: Gibt die Liste der Vorschlagswörter an.\n\t * @deprecated Use _suggestions.\n\t */\n\t@Prop() public _list?: Stringified<string[]>;\n\n\t/**\n\t * Defines the maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\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 das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Defines a validation pattern for the input field.\n\t */\n\t@Prop() public _pattern?: string;\n\n\t/**\n\t * Defines the placeholder for input field. To be shown when there's no value.\n\t */\n\t@Prop() public _placeholder?: string;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Setzt die Breite des Eingabefeldes in Buchstabenbreiten.\n\t */\n\t@Prop() public _size?: number;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\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 * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\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?: InputTextType = 'text';\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop({ mutable: true }) public _value?: string;\n\n\t@State() public state: States = {\n\t\t_autoComplete: 'off',\n\t\t_currentLength: 0,\n\t\t_hasValue: false,\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_suggestions: [],\n\t\t_type: 'text',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new InputTextController(this, 'input-text', this.host);\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: AlertPropType): void {\n\t\tvalidateAlert(this, value);\n\t}\n\n\t@Watch('_autoComplete')\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\tthis.controller.validateAutoComplete(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_error')\n\tpublic validateError(value?: string): void {\n\t\tthis.controller.validateError(value);\n\t}\n\n\t@Watch('_hasCounter')\n\tpublic validateHasCounter(value?: boolean): void {\n\t\tthis.controller.validateHasCounter(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icon')\n\tpublic validateIcon(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tthis.validateIcons(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_list')\n\tpublic validateList(value?: SuggestionsPropType): void {\n\t\tthis.validateSuggestions(value);\n\t}\n\n\t@Watch('_maxLength')\n\tpublic validateMaxLength(value?: number): void {\n\t\tthis.controller.validateMaxLength(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_pattern')\n\tpublic validatePattern(value?: string): void {\n\t\tthis.controller.validatePattern(value);\n\t}\n\n\t@Watch('_placeholder')\n\tpublic validatePlaceholder(value?: string): void {\n\t\tthis.controller.validatePlaceholder(value);\n\t}\n\n\t@Watch('_readOnly')\n\tpublic validateReadOnly(value?: boolean): void {\n\t\tthis.controller.validateReadOnly(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_size')\n\tpublic validateSize(value?: number): void {\n\t\tthis.controller.validateSize(value);\n\t}\n\n\t@Watch('_suggestions')\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tthis.controller.validateSuggestions(value);\n\t}\n\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tthis.controller.validateSmartButton(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: InputTextType): void {\n\t\tthis.controller.validateType(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._alert = this._alert === true;\n\t\tthis._touched = this._touched === true;\n\t\tthis.oldValue = this._value;\n\t\tthis.controller.componentWillLoad();\n\n\t\tthis.state._hasValue = !!this.state._value;\n\t\tthis.controller.addValueChangeListener((v) => (this.state._hasValue = !!v));\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tthis.ref?.removeEventListener('search', this.onChange);\n\t}\n}\n"],"mappings":";;;4sBAeO,MAAMA,EAAgB,CAACC,EAAsCC,KACnEC,EAAaF,EAAW,SAAUC,EAAM,EChBzC,MAAME,EAAkB,+7DCwBxBC,EAAY,uD,MAYCC,EAAY,MA+BjB,MAAAC,GACN,MAAMC,gBAAEA,GAAoBC,EAAgBC,KAAKC,OACjD,MAAMC,EAAiBC,MAAMC,QAAQJ,KAAKC,MAAMI,eAAiBL,KAAKC,MAAMI,aAAaC,OAAS,EAClG,MAAMC,EAAgBC,EAAeR,KAAKC,MAAMQ,QAEhD,OACCC,EAACC,EAAI,CACJC,MAAO,CACN,YAAaZ,KAAKC,MAAMY,YAGzBH,EAAA,aACCE,MAAO,CACN,CAACZ,KAAKC,MAAMa,OAAQ,KACpB,eAAgBd,KAAKC,MAAMc,YAE5BC,eAAgBhB,KAAKC,MAAMe,eAC3BC,UAAWjB,KAAKC,MAAMgB,UACtBC,OAAQlB,KAAKC,MAAMiB,OACnBC,WAAYnB,KAAKC,MAAMkB,WACvBC,YAAapB,KAAKC,MAAMmB,YACxBL,WAAYf,KAAKC,MAAMc,WACvBM,MAAOrB,KAAKC,MAAMoB,MAClBC,OAAQtB,KAAKC,MAAMqB,OACnBC,IAAKvB,KAAKC,MAAMsB,IAChBd,OAAQT,KAAKC,MAAMQ,OACnBJ,aAAcL,KAAKC,MAAMI,aACzBmB,WAAYxB,KAAKC,MAAMuB,WACvBC,UAAWzB,KAAKC,MAAMwB,UACtBC,UAAW1B,KA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,KAAKgE,WAAW6C,gBAAgBrH,E,CAI1B,YAAAsH,CAAatH,GACnBQ,KAAKgE,WAAW8C,aAAatH,E,CAIvB,aAAAuH,CAAcvH,GACpBQ,KAAKgE,WAAW+C,cAAcvH,E,CAGxB,iBAAAwH,GACNhH,KAAKiH,OAASjH,KAAKiH,SAAW,KAC9BjH,KAAK6B,SAAW7B,KAAK6B,WAAa,KAClC7B,KAAKgF,SAAWhF,KAAK+D,OACrB/D,KAAKgE,WAAWgD,oBAEhBhH,KAAKC,MAAMY,YAAcb,KAAKC,MAAM8D,OACpC/D,KAAKgE,WAAWkD,wBAAwBC,GAAOnH,KAAKC,MAAMY,YAAcsG,G,CAGlE,oBAAA5C,G,OACNxC,EAAA/B,KAAKgC,OAAG,MAAAD,SAAA,SAAAA,EAAEqF,oBAAoB,SAAUpH,KAAKyE,S"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as t,F as s,H as e,g as
|
|
4
|
+
import{r as i,h as t,F as s,H as e,g as h}from"./index-536799d5.js";import{a as n}from"./i18n-bc04aa53.js";import{h as l,s as o}from"./reuse-b3566e4c.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-955454c7.js";import"./dev.utils-de957095.js";const r=class{constructor(t){i(this,t),this.slotName="input",this.catchInputSlot=t=>{l(this.host,t,this.slotName)},this._alert=!0,this._currentLength=void 0,this._disabled=!1,this._error="",this._hasCounter=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icon=void 0,this._icons=void 0,this._id=void 0,this._label=void 0,this._maxLength=void 0,this._readOnly=!1,this._renderNoLabel=!1,this._required=!1,this._slotName=void 0,this._suggestions=void 0,this._smartButton=void 0,this._tooltipAlign="top",this._touched=!1}componentWillRender(){this.slotName=this._slotName?this._slotName:"input"}getIconsProp(){return this._icons||this._icon}render(){var i,r,h,l,a,_;const d="string"==typeof this._error&&this._error.length>0&&!0===this._touched,c=o(this._label),u="string"==typeof this._hint&&this._hint.length>0,p=!c&&this._hideLabel;return t(e,{class:{disabled:!0===this._disabled,error:!0===d,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError}},t("label",{id:p?void 0:`${this._id}-label`,hidden:p,htmlFor:this._id},t("span",null,t("slot",{name:"label"}))),u&&t("span",{class:"hint",id:`${this._id}-hint`},this._hint),t("div",{class:{input:!0,"icon-left":"object"==typeof(null===(i=this.getIconsProp())||void 0===i?void 0:i.left),"icon-right":"object"==typeof(null===(r=this.getIconsProp())||void 0===r?void 0:r.right)}},(null===(h=this.getIconsProp())||void 0===h?void 0:h.left)&&t("kol-icon",{_ariaLabel:"",_icons:(null===(l=this.getIconsProp())||void 0===l?void 0:l.left).icon}),t("div",{ref:this.catchInputSlot,id:this.slotName,class:"input-slot"}),"object"==typeof this._smartButton&&null!==this._smartButton&&t("kol-button-wc",{_customClass:this._smartButton._customClass,_disabled:this._smartButton._disabled,_icons:this._smartButton._icons,_hideLabel:!0,_id:this._smartButton._id,_label:this._smartButton._label,_on:this._smartButton._on,_tooltipAlign:this._smartButton._tooltipAlign,_variant:this._smartButton._variant}),(null===(a=this.getIconsProp())||void 0===a?void 0:a.right)&&t("kol-icon",{_ariaLabel:"",_icons:(null===(_=this.getIconsProp())||void 0===_?void 0:_.right).icon})),p&&t("kol-tooltip-wc",{"aria-hidden":"true",class:"input-tooltip",_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),d&&t("kol-alert",{_alert:this._alert,_type:"error",_variant:"msg","aria-hidden":this._hideError,class:"error"+(this._hideError?" hidden":""),id:`${this._id}-error`},this._error),Array.isArray(this._suggestions)&&this._suggestions.length>0&&t("datalist",{id:`${this._id}-list`},this._suggestions.map((i=>t("option",{value:i})))),this._hasCounter&&t("span",{class:"counter","aria-atomic":"true","aria-live":"polite"},this._currentLength,this._maxLength&&t(s,null,t("span",{"aria-label":n("kol-of"),role:"img"},"/"),this._maxLength)," ",t("span",null,n("kol-characters"))))}get host(){return h(this)}};export{r as kol_input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KolInput","this","slotName","catchInputSlot","slot","handleSlotContent","host","componentWillRender","_slotName","render","hasError","_error","length","_touched","hasExpertSlot","showExpertSlot","_label","hasHint","_hint","useTooltopInsteadOfLabel","_hideLabel","h","Host","class","disabled","_disabled","error","_readOnly","required","_required","touched","_hideError","id","_id","undefined","hidden","htmlFor","name","input","_a","_icon","left","_b","right","_c","_ariaLabel","icon","ref","_smartButton","_customClass","_on","_tooltipAlign","_variant","_d","_align","_alert","_type","Array","isArray","_suggestions","map","option","value","_hasCounter","_currentLength","_maxLength","Fragment","translate","role"],"sources":["src/components/input/component.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, Element, Fragment, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { KoliBriCustomIcon, KoliBriHorizontalIcon } from '../../types/icon';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { SuggestionsPropType } from '../../types/props/suggestions';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { W3CInputValue } from '../../types/w3c';\nimport { handleSlotContent, showExpertSlot } from '../../utils/reuse';\nimport { Props as ButtonProps } from '../button/types';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\t@Element() private readonly host?: HTMLElement;\n\n\tprivate slotName: string = 'input';\n\n\tpublic componentWillRender(): void {\n\t\tthis.slotName = this._slotName ? this._slotName : 'input';\n\t}\n\n\tprivate catchInputSlot = (slot?: HTMLDivElement): void => {\n\t\thandleSlotContent(this.host!, slot!, this.slotName);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasExpertSlot = showExpertSlot(this._label);\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst useTooltopInsteadOfLabel = !hasExpertSlot && this._hideLabel;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<label id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>\n\t\t\t\t\t{/* INFO: span is needed for css styling :after content like a star (*) or optional text ! */}\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this._icon?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this._icon?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this._icon?.left && <kol-icon _ariaLabel=\"\" _icon={(this._icon.left as KoliBriCustomIcon).icon}></kol-icon>}\n\t\t\t\t\t<div ref={this.catchInputSlot} id={this.slotName} class=\"input-slot\"></div>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icon={this._smartButton._icon}\n\t\t\t\t\t\t\t_hideLabel={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t\t{this._icon?.right && <kol-icon _ariaLabel=\"\" _icon={(this._icon.right as KoliBriCustomIcon).icon}></kol-icon>}\n\t\t\t\t</div>\n\t\t\t\t{useTooltopInsteadOfLabel && (\n\t\t\t\t\t<kol-tooltip-wc\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"input-tooltip\"\n\t\t\t\t\t\t_align={this._tooltipAlign}\n\t\t\t\t\t\t_id={this._hideLabel ? `${this._id}-label` : undefined}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></kol-tooltip-wc>\n\t\t\t\t)}\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert\n\t\t\t\t\t\t_alert={this._alert}\n\t\t\t\t\t\t_type=\"error\"\n\t\t\t\t\t\t_variant=\"msg\"\n\t\t\t\t\t\taria-hidden={this._hideError}\n\t\t\t\t\t\tclass={`error${this._hideError ? ' hidden' : ''}`}\n\t\t\t\t\t\tid={`${this._id}-error`}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._suggestions) && this._suggestions.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._suggestions.map((option: W3CInputValue) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t\t{this._hasCounter && (\n\t\t\t\t\t<span class=\"counter\" aria-atomic=\"true\" aria-live=\"polite\">\n\t\t\t\t\t\t{this._currentLength}\n\t\t\t\t\t\t{this._maxLength && (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<span aria-label={translate('kol-of')} role=\"img\">\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{this._maxLength}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t<span>{translate('kol-characters')}</span>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _alert?: boolean = true;\n\n\t/**\n\t * @internal\n\t */\n\t@Prop() public _currentLength?: number;\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;\n\n\t/**\n\t * Defines the error message text.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideError?: boolean;\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;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icon=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcon;\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 maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop() public _renderNoLabel?: boolean;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean;\n\n\t/**\n\t * Ermöglicht den Slotnamen zu bestimmen. Wird nur verwendet, wenn sonst mehrere Slots mit dem gleichen Namen innerhalb eines Shadow DOMs existieren würden.\n\t * @internal\n\t */\n\t@Prop() public _slotName?: string;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\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 * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Pr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YAEL,IACH5C,EAAA,YAAO8C,EAAU,oB"}
|
|
1
|
+
{"version":3,"names":["KolInput","this","slotName","catchInputSlot","slot","handleSlotContent","host","componentWillRender","_slotName","getIconsProp","_icons","_icon","render","hasError","_error","length","_touched","hasExpertSlot","showExpertSlot","_label","hasHint","_hint","useTooltopInsteadOfLabel","_hideLabel","h","Host","class","disabled","_disabled","error","_readOnly","required","_required","touched","_hideError","id","_id","undefined","hidden","htmlFor","name","input","_a","left","_b","right","_c","_ariaLabel","_d","icon","ref","_smartButton","_customClass","_on","_tooltipAlign","_variant","_e","_f","_align","_alert","_type","Array","isArray","_suggestions","map","option","value","_hasCounter","_currentLength","_maxLength","Fragment","translate","role"],"sources":["src/components/input/component.tsx"],"sourcesContent":["/* eslint-disable jsx-a11y/label-has-associated-control */\nimport { Component, Element, Fragment, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { KoliBriCustomIcon, KoliBriHorizontalIcons } from '../../types/icons';\nimport { IdPropType } from '../../types/props/id';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { SuggestionsPropType } from '../../types/props/suggestions';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { W3CInputValue } from '../../types/w3c';\nimport { handleSlotContent, showExpertSlot } from '../../utils/reuse';\nimport { Props as ButtonProps } from '../button/types';\nimport { Props } from './types';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-input',\n\tshadow: false,\n})\nexport class KolInput implements Props {\n\t@Element() private readonly host?: HTMLElement;\n\n\tprivate slotName: string = 'input';\n\n\tpublic componentWillRender(): void {\n\t\tthis.slotName = this._slotName ? this._slotName : 'input';\n\t}\n\n\tprivate catchInputSlot = (slot?: HTMLDivElement): void => {\n\t\thandleSlotContent(this.host!, slot!, this.slotName);\n\t};\n\n\tprivate getIconsProp(): KoliBriHorizontalIcons | undefined {\n\t\treturn this._icons || this._icon;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\tconst hasError = typeof this._error === 'string' && this._error.length > 0 && this._touched === true;\n\t\tconst hasExpertSlot = showExpertSlot(this._label);\n\t\tconst hasHint = typeof this._hint === 'string' && this._hint.length > 0;\n\t\tconst useTooltopInsteadOfLabel = !hasExpertSlot && this._hideLabel;\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{\n\t\t\t\t\tdisabled: this._disabled === true,\n\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t'read-only': this._readOnly === true,\n\t\t\t\t\trequired: this._required === true,\n\t\t\t\t\ttouched: this._touched === true,\n\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<label id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>\n\t\t\t\t\t{/* INFO: span is needed for css styling :after content like a star (*) or optional text ! */}\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t\t</span>\n\t\t\t\t</label>\n\t\t\t\t{hasHint && (\n\t\t\t\t\t<span class=\"hint\" id={`${this._id}-hint`}>\n\t\t\t\t\t\t{this._hint}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<div\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tinput: true,\n\t\t\t\t\t\t'icon-left': typeof this.getIconsProp()?.left === 'object',\n\t\t\t\t\t\t'icon-right': typeof this.getIconsProp()?.right === 'object',\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{this.getIconsProp()?.left && <kol-icon _ariaLabel=\"\" _icons={(this.getIconsProp()?.left as KoliBriCustomIcon).icon}></kol-icon>}\n\t\t\t\t\t<div ref={this.catchInputSlot} id={this.slotName} class=\"input-slot\"></div>\n\t\t\t\t\t{typeof this._smartButton === 'object' && this._smartButton !== null && (\n\t\t\t\t\t\t<kol-button-wc\n\t\t\t\t\t\t\t_customClass={this._smartButton._customClass}\n\t\t\t\t\t\t\t_disabled={this._smartButton._disabled}\n\t\t\t\t\t\t\t_icons={this._smartButton._icons}\n\t\t\t\t\t\t\t_hideLabel={true}\n\t\t\t\t\t\t\t_id={this._smartButton._id}\n\t\t\t\t\t\t\t_label={this._smartButton._label}\n\t\t\t\t\t\t\t_on={this._smartButton._on}\n\t\t\t\t\t\t\t_tooltipAlign={this._smartButton._tooltipAlign}\n\t\t\t\t\t\t\t_variant={this._smartButton._variant}\n\t\t\t\t\t\t></kol-button-wc>\n\t\t\t\t\t)}\n\t\t\t\t\t{this.getIconsProp()?.right && <kol-icon _ariaLabel=\"\" _icons={(this.getIconsProp()?.right as KoliBriCustomIcon).icon}></kol-icon>}\n\t\t\t\t</div>\n\t\t\t\t{useTooltopInsteadOfLabel && (\n\t\t\t\t\t<kol-tooltip-wc\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Dieses Aria-Hidden verhindert das doppelte Vorlesen des Labels,\n\t\t\t\t\t\t * verhindert aber nicht das Aria-Labelledby vorgelesen wird.\n\t\t\t\t\t\t */\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"input-tooltip\"\n\t\t\t\t\t\t_align={this._tooltipAlign}\n\t\t\t\t\t\t_id={this._hideLabel ? `${this._id}-label` : undefined}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t></kol-tooltip-wc>\n\t\t\t\t)}\n\t\t\t\t{hasError && (\n\t\t\t\t\t<kol-alert\n\t\t\t\t\t\t_alert={this._alert}\n\t\t\t\t\t\t_type=\"error\"\n\t\t\t\t\t\t_variant=\"msg\"\n\t\t\t\t\t\taria-hidden={this._hideError}\n\t\t\t\t\t\tclass={`error${this._hideError ? ' hidden' : ''}`}\n\t\t\t\t\t\tid={`${this._id}-error`}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._error}\n\t\t\t\t\t</kol-alert>\n\t\t\t\t)}\n\t\t\t\t{Array.isArray(this._suggestions) && this._suggestions.length > 0 && (\n\t\t\t\t\t<datalist id={`${this._id}-list`}>\n\t\t\t\t\t\t{this._suggestions.map((option: W3CInputValue) => (\n\t\t\t\t\t\t\t<option value={option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</datalist>\n\t\t\t\t)}\n\t\t\t\t{this._hasCounter && (\n\t\t\t\t\t<span class=\"counter\" aria-atomic=\"true\" aria-live=\"polite\">\n\t\t\t\t\t\t{this._currentLength}\n\t\t\t\t\t\t{this._maxLength && (\n\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t<span aria-label={translate('kol-of')} role=\"img\">\n\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{this._maxLength}\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t<span>{translate('kol-characters')}</span>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t * @TODO: Change type back to `AlertPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _alert?: boolean = true;\n\n\t/**\n\t * @internal\n\t */\n\t@Prop() public _currentLength?: number;\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 * Defines the error message text.\n\t */\n\t@Prop() public _error?: string = '';\n\n\t/**\n\t * Shows the character count on the lower border of the input.\n\t * @TODO: Change type back to `HasCounterPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCounter?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideError?: 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 hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * @deprecated Use _icons.\n\t */\n\t@Prop() public _icon?: KoliBriHorizontalIcons;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: KoliBriHorizontalIcons;\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 maximum number of input characters.\n\t */\n\t@Prop() public _maxLength?: number;\n\n\t/**\n\t * Makes the input element read only.\n\t * @TODO: Change type back to `ReadOnlyPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _readOnly?: boolean = false;\n\n\t/**\n\t * Gibt an, ob die Komponente kein Label rendern soll.\n\t */\n\t@Prop() public _renderNoLabel?: boolean = false;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Ermöglicht den Slotnamen zu bestimmen. Wird nur verwendet, wenn sonst mehrere Slots mit dem gleichen Namen innerhalb eines Shadow DOMs existieren würden.\n\t * @internal\n\t */\n\t@Prop() public _slotName?: string;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\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 * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _touched?: boolean = false;\n}\n"],"mappings":";;;yRAsBaA,EAAQ,M,yBAGZC,KAAAC,SAAmB,QAMnBD,KAAAE,eAAkBC,IACzBC,EAAkBJ,KAAKK,KAAOF,EAAOH,KAAKC,SAAS,E,YAkHlB,K,6CAWG,M,YAKJ,G,iBAMM,M,gBAMD,M,gBAOA,M,WAKN,G,6HA+BK,M,oBAKK,M,eAML,M,oGAqBiB,M,cAMlB,K,CApO7B,mBAAAK,GACNN,KAAKC,SAAWD,KAAKO,UAAYP,KAAKO,UAAY,O,CAO3C,YAAAC,GACP,OAAOR,KAAKS,QAAUT,KAAKU,K,CAGrB,MAAAC,G,gBACN,MAAMC,SAAkBZ,KAAKa,SAAW,UAAYb,KAAKa,OAAOC,OAAS,GAAKd,KAAKe,WAAa,KAChG,MAAMC,EAAgBC,EAAejB,KAAKkB,QAC1C,MAAMC,SAAiBnB,KAAKoB,QAAU,UAAYpB,KAAKoB,MAAMN,OAAS,EACtE,MAAMO,GAA4BL,GAAiBhB,KAAKsB,WAExD,OACCC,EAACC,EAAI,CACJC,MAAO,CACNC,SAAU1B,KAAK2B,YAAc,KAC7BC,MAAOhB,IAAa,KACpB,YAAaZ,KAAK6B,YAAc,KAChCC,SAAU9B,KAAK+B,YAAc,KAC7BC,QAAShC,KAAKe,WAAa,KAC3B,eAAgBf,KAAKiC,aAAe,OAGrCV,EAAA,SAAOW,IAAKb,EAA2B,GAAGrB,KAAKmC,YAAcC,UAAWC,OAAQhB,EAA0BiB,QAAStC,KAAKmC,KAEvHZ,EAAA,YAECA,EAAA,QAAMgB,KAAK,YAGZpB,GACAI,EAAA,QAAME,MAAM,OAAOS,GAAI,GAAGlC,KAAKmC,YAC7BnC,KAAKoB,OAGRG,EAAA,OACCE,MAA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AAKa,QAGP+C,MAAMC,QAAQ7D,KAAK8D,eAAiB9D,KAAK8D,aAAahD,OAAS,GAC/DS,EAAA,YAAUW,GAAI,GAAGlC,KAAKmC,YACpBnC,KAAK8D,aAAaC,KAAKC,GACvBzC,EAAA,UAAQ0C,MAAOD,OAIjBhE,KAAKkE,aACL3C,EAAA,QAAME,MAAM,UAAS,cAAa,OAAM,YAAW,UACjDzB,KAAKmE,eACLnE,KAAKoE,YACL7C,EAAC8C,EAAQ,KACR9C,EAAA,qBAAkB+C,EAAU,UAAWC,KAAK,OAAK,KAGhDvE,KAAKoE,YAEL,IACH7C,EAAA,YAAO+C,EAAU,oB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as
|
|
4
|
+
import{r as t,h as i,H as e}from"./index-536799d5.js";import{a}from"./i18n-bc04aa53.js";import{c as o,v as s}from"./color-2b3a5310.js";import{d as r}from"./a11y.tipps-955454c7.js";import{a as n}from"./prop.validators-4b478b27.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./dev.utils-de957095.js";import"./reuse-b3566e4c.js";const l=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:inline-block}text{font-size:90px;letter-spacing:normal;word-spacing:normal}svg{max-height:100%}",h=360;function d(t){return t*Math.PI/180}function c(t){return Math.round((Math.cos(d(t))+1)/2*225)}const p=class{constructor(e){t(this,e),this.handleColorChange=(t,e)=>{if("string"==typeof t){const i=o(t);e.set("_color",{red:i[0],green:i[1],blue:i[2]})}else r("[KolKolibri] You used the complex color schema. For the KoliBri we use need the color as hex string.")},this._animate=!1,this._color="#003c78",this._labeled=void 0,this.state={_animate:!1,_color:{red:0,green:60,blue:120},_labeled:!0}}render(){const t=!0===this.state._animate?`rgb(${c(this.state._color.red)},${c(this.state._color.green)},${c(this.state._color.blue)})`:`rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;return i(e,null,i("svg",{role:"img","aria-label":a("kol-kolibri-logo"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 600",fill:t},i("path",{d:"M353 322L213 304V434L353 322Z"}),i("path",{d:"M209 564V304L149 434L209 564Z"}),i("path",{d:"M357 316L417 250L361 210L275 244L357 316Z"}),i("path",{d:"M329 218L237 92L250 222L272 241L329 218Z"}),i("path",{d:"M353 318L35 36L213 300L353 318Z"}),i("path",{d:"M391 286L565 272L421 252L391 286Z"}),!0===this.state._labeled&&i("text",{x:"250",y:"525",fill:t},"KoliBri")))}validateAnimate(t){n(this,"_animate",t)}validateColor(t){s(this,t,{defaultValue:"#003c78",hooks:{beforePatch:this.handleColorChange}})}validateLabeled(t){n(this,"_labeled",t)}componentWillLoad(){this.validateAnimate(this._animate),this.validateColor(this._color),this.validateLabeled(this._labeled)}componentDidRender(){clearInterval(this.interval),this.state._animate&&(this.interval=setInterval((()=>{this.state=Object.assign(Object.assign({},this.state),{_color:{red:(this.state._color.red+1)%h,green:(this.state._color.green+2)%h,blue:(this.state._color.blue+3)%h}})}),50))}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_animate:["validateAnimate"],_color:["validateColor"],_labeled:["validateLabeled"]}}};p.style={default:l};export{p as kol_kolibri};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultStyleCss","max","degreeToRadians","degree","Math","PI","getColorNumber","round","cos","KolKolibri","this","handleColorChange","nextValue","nextState","rgba","colorRgba","set","red","green","blue","devHint","_animate","_color","_labeled","render","fillColor","state","h","Host","role","translate","xmlns","viewBox","fill","d","x","y","validateAnimate","value","watchBoolean","validateColor","defaultValue","hooks","beforePatch","validateLabeled","componentWillLoad","componentDidRender","clearInterval","interval","setInterval","Object","assign","disconnectedCallback"],"sources":["src/components/kolibri/style.css?tag=kol-kolibri&mode=default&encapsulation=shadow","src/components/kolibri/component.tsx"],"sourcesContent":["@import url(../style.css);\n:host {\n\tdisplay: inline-block;\n}\ntext {\n\tfont-size: 90px;\n\tletter-spacing: normal;\n\tword-spacing: normal;\n}\nsvg {\n\tmax-height: 100%;\n}\n","import { Generic } from '@a11y-ui/core';\nimport { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { PropColor, validateColor } from '../../types/props/color';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { colorRgba } from '../badge/color-rgba';\nimport { API, States } from './types';\n\nconst max = 360;\nfunction degreeToRadians(degree: number): number {\n\treturn (degree * Math.PI) / 180;\n}\nfunction getColorNumber(degree: number): number {\n\treturn Math.round(((Math.cos(degreeToRadians(degree)) + 1) / 2) * 225);\n}\n\n@Component({\n\ttag: 'kol-kolibri',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolKolibri implements API {\n\tpublic render(): JSX.Element {\n\t\tconst fillColor: string =\n\t\t\tthis.state._animate === true\n\t\t\t\t? `rgb(${getColorNumber(this.state._color.red)},${getColorNumber(this.state._color.green)},${getColorNumber(this.state._color.blue)})`\n\t\t\t\t: `rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<svg role=\"img\" aria-label={translate('kol-kolibri-logo')} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 600 600\" fill={fillColor}>\n\t\t\t\t\t<path d=\"M353 322L213 304V434L353 322Z\" />\n\t\t\t\t\t<path d=\"M209 564V304L149 434L209 564Z\" />\n\t\t\t\t\t<path d=\"M357 316L417 250L361 210L275 244L357 316Z\" />\n\t\t\t\t\t<path d=\"M329 218L237 92L250 222L272 241L329 218Z\" />\n\t\t\t\t\t<path d=\"M353 318L35 36L213 300L353 318Z\" />\n\t\t\t\t\t<path d=\"M391 286L565 272L421 252L391 286Z\" />\n\t\t\t\t\t{this.state._labeled === true && (\n\t\t\t\t\t\t<text x=\"250\" y=\"525\" fill={fillColor}>\n\t\t\t\t\t\t\tKoliBri\n\t\t\t\t\t\t</text>\n\t\t\t\t\t)}\n\t\t\t\t</svg>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate interval?: number;\n\n\t/**\n\t * Gibt an, ob das Bild-Logo farblich animiert werden soll.\n\t */\n\t@Prop() public _animate?: boolean;\n\n\t/**\n\t * Gibt an, in welcher Farbe das Bild-Logo initial dargestellt werden soll.\n\t */\n\t@Prop() public _color?: Stringified<PropColor> = '#003c78';\n\n\t/**\n\t * Defines whether the component has a label.\n\t */\n\t@Prop() public _labeled?: boolean;\n\n\t@State() public state: States = {\n\t\t_animate: false,\n\t\t_color: {\n\t\t\tred: 0,\n\t\t\tgreen: 60,\n\t\t\tblue: 120,\n\t\t},\n\t\t_labeled: true,\n\t};\n\n\t@Watch('_animate')\n\tpublic validateAnimate(value?: boolean): void {\n\t\twatchBoolean(this, '_animate', value);\n\t}\n\n\tprivate handleColorChange: Generic.Element.NextStateHooksCallback = (nextValue: unknown, nextState: Map<string, unknown>): void => {\n\t\tif (typeof nextValue === 'string') {\n\t\t\tconst rgba = colorRgba(nextValue);\n\t\t\tnextState.set('_color', {\n\t\t\t\tred: rgba[0],\n\t\t\t\tgreen: rgba[1],\n\t\t\t\tblue: rgba[2],\n\t\t\t});\n\t\t} else {\n\t\t\tdevHint(`[KolKolibri] You used the complex color schema. For the KoliBri we use need the color as hex string.`);\n\t\t}\n\t};\n\n\t@Watch('_color')\n\tpublic validateColor(value?: Stringified<PropColor>): void {\n\t\tvalidateColor(this, value, {\n\t\t\tdefaultValue: '#003c78',\n\t\t\thooks: {\n\t\t\t\tbeforePatch: this.handleColorChange,\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_labeled')\n\tpublic validateLabeled(value?: boolean): void {\n\t\twatchBoolean(this, '_labeled', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAnimate(this._animate);\n\t\tthis.validateColor(this._color);\n\t\tthis.validateLabeled(this._labeled);\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tclearInterval(this.interval);\n\t\tif (this.state._animate) {\n\t\t\tthis.interval = setInterval(() => {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_color: {\n\t\t\t\t\t\tred: (this.state._color.red + 1) % max,\n\t\t\t\t\t\tgreen: (this.state._color.green + 2) % max,\n\t\t\t\t\t\tblue: (this.state._color.blue + 3) % max,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}, 50) as unknown as number;\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tclearInterval(this.interval);\n\t}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["defaultStyleCss","max","degreeToRadians","degree","Math","PI","getColorNumber","round","cos","KolKolibri","this","handleColorChange","nextValue","nextState","rgba","colorRgba","set","red","green","blue","devHint","_animate","_color","_labeled","render","fillColor","state","h","Host","role","translate","xmlns","viewBox","fill","d","x","y","validateAnimate","value","watchBoolean","validateColor","defaultValue","hooks","beforePatch","validateLabeled","componentWillLoad","componentDidRender","clearInterval","interval","setInterval","Object","assign","disconnectedCallback"],"sources":["src/components/kolibri/style.css?tag=kol-kolibri&mode=default&encapsulation=shadow","src/components/kolibri/component.tsx"],"sourcesContent":["@import url(../style.css);\n:host {\n\tdisplay: inline-block;\n}\ntext {\n\tfont-size: 90px;\n\tletter-spacing: normal;\n\tword-spacing: normal;\n}\nsvg {\n\tmax-height: 100%;\n}\n","import { Generic } from '@a11y-ui/core';\nimport { Component, h, Host, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { Stringified } from '../../types/common';\nimport { PropColor, validateColor } from '../../types/props/color';\nimport { devHint } from '../../utils/a11y.tipps';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { colorRgba } from '../badge/color-rgba';\nimport { API, States } from './types';\n\nconst max = 360;\nfunction degreeToRadians(degree: number): number {\n\treturn (degree * Math.PI) / 180;\n}\nfunction getColorNumber(degree: number): number {\n\treturn Math.round(((Math.cos(degreeToRadians(degree)) + 1) / 2) * 225);\n}\n\n@Component({\n\ttag: 'kol-kolibri',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolKolibri implements API {\n\tpublic render(): JSX.Element {\n\t\tconst fillColor: string =\n\t\t\tthis.state._animate === true\n\t\t\t\t? `rgb(${getColorNumber(this.state._color.red)},${getColorNumber(this.state._color.green)},${getColorNumber(this.state._color.blue)})`\n\t\t\t\t: `rgb(${this.state._color.red},${this.state._color.green},${this.state._color.blue})`;\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<svg role=\"img\" aria-label={translate('kol-kolibri-logo')} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 600 600\" fill={fillColor}>\n\t\t\t\t\t<path d=\"M353 322L213 304V434L353 322Z\" />\n\t\t\t\t\t<path d=\"M209 564V304L149 434L209 564Z\" />\n\t\t\t\t\t<path d=\"M357 316L417 250L361 210L275 244L357 316Z\" />\n\t\t\t\t\t<path d=\"M329 218L237 92L250 222L272 241L329 218Z\" />\n\t\t\t\t\t<path d=\"M353 318L35 36L213 300L353 318Z\" />\n\t\t\t\t\t<path d=\"M391 286L565 272L421 252L391 286Z\" />\n\t\t\t\t\t{this.state._labeled === true && (\n\t\t\t\t\t\t<text x=\"250\" y=\"525\" fill={fillColor}>\n\t\t\t\t\t\t\tKoliBri\n\t\t\t\t\t\t</text>\n\t\t\t\t\t)}\n\t\t\t\t</svg>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate interval?: number;\n\n\t/**\n\t * Gibt an, ob das Bild-Logo farblich animiert werden soll.\n\t */\n\t@Prop() public _animate?: boolean = false;\n\n\t/**\n\t * Gibt an, in welcher Farbe das Bild-Logo initial dargestellt werden soll.\n\t */\n\t@Prop() public _color?: Stringified<PropColor> = '#003c78';\n\n\t/**\n\t * Defines whether the component has a label.\n\t */\n\t@Prop() public _labeled?: boolean;\n\n\t@State() public state: States = {\n\t\t_animate: false,\n\t\t_color: {\n\t\t\tred: 0,\n\t\t\tgreen: 60,\n\t\t\tblue: 120,\n\t\t},\n\t\t_labeled: true,\n\t};\n\n\t@Watch('_animate')\n\tpublic validateAnimate(value?: boolean): void {\n\t\twatchBoolean(this, '_animate', value);\n\t}\n\n\tprivate handleColorChange: Generic.Element.NextStateHooksCallback = (nextValue: unknown, nextState: Map<string, unknown>): void => {\n\t\tif (typeof nextValue === 'string') {\n\t\t\tconst rgba = colorRgba(nextValue);\n\t\t\tnextState.set('_color', {\n\t\t\t\tred: rgba[0],\n\t\t\t\tgreen: rgba[1],\n\t\t\t\tblue: rgba[2],\n\t\t\t});\n\t\t} else {\n\t\t\tdevHint(`[KolKolibri] You used the complex color schema. For the KoliBri we use need the color as hex string.`);\n\t\t}\n\t};\n\n\t@Watch('_color')\n\tpublic validateColor(value?: Stringified<PropColor>): void {\n\t\tvalidateColor(this, value, {\n\t\t\tdefaultValue: '#003c78',\n\t\t\thooks: {\n\t\t\t\tbeforePatch: this.handleColorChange,\n\t\t\t},\n\t\t});\n\t}\n\n\t@Watch('_labeled')\n\tpublic validateLabeled(value?: boolean): void {\n\t\twatchBoolean(this, '_labeled', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAnimate(this._animate);\n\t\tthis.validateColor(this._color);\n\t\tthis.validateLabeled(this._labeled);\n\t}\n\n\tpublic componentDidRender(): void {\n\t\tclearInterval(this.interval);\n\t\tif (this.state._animate) {\n\t\t\tthis.interval = setInterval(() => {\n\t\t\t\tthis.state = {\n\t\t\t\t\t...this.state,\n\t\t\t\t\t_color: {\n\t\t\t\t\t\tred: (this.state._color.red + 1) % max,\n\t\t\t\t\t\tgreen: (this.state._color.green + 2) % max,\n\t\t\t\t\t\tblue: (this.state._color.blue + 3) % max,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}, 50) as unknown as number;\n\t\t}\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tclearInterval(this.interval);\n\t}\n}\n"],"mappings":";;;0VAAA,MAAMA,EAAkB,wzBCWxB,MAAMC,EAAM,IACZ,SAASC,EAAgBC,GACxB,OAAQA,EAASC,KAAKC,GAAM,GAC7B,CACA,SAASC,EAAeH,GACvB,OAAOC,KAAKG,OAAQH,KAAKI,IAAIN,EAAgBC,IAAW,GAAK,EAAK,IACnE,C,MASaM,EAAU,M,yBAyDdC,KAAAC,kBAA4D,CAACC,EAAoBC,KACxF,UAAWD,IAAc,SAAU,CAClC,MAAME,EAAOC,EAAUH,GACvBC,EAAUG,IAAI,SAAU,CACvBC,IAAKH,EAAK,GACVI,MAAOJ,EAAK,GACZK,KAAML,EAAK,I,KAEN,CACNM,EAAQ,uG,iBApC0B,M,YAKa,U,mCAOjB,CAC/BC,SAAU,MACVC,OAAQ,CACPL,IAAK,EACLC,MAAO,GACPC,KAAM,KAEPI,SAAU,K,CAhDJ,MAAAC,GACN,MAAMC,EACLf,KAAKgB,MAAML,WAAa,KACrB,OAAOf,EAAeI,KAAKgB,MAAMJ,OAAOL,QAAQX,EAAeI,KAAKgB,MAAMJ,OAAOJ,UAAUZ,EAAeI,KAAKgB,MAAMJ,OAAOH,SAC5H,OAAOT,KAAKgB,MAAMJ,OAAOL,OAAOP,KAAKgB,MAAMJ,OAAOJ,SAASR,KAAKgB,MAAMJ,OAAOH,QACjF,OACCQ,EAACC,EAA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5.js";import{a as s}from"./i18n-
|
|
4
|
+
import{r as t,h as i,H as n,g as e}from"./index-536799d5.js";import{a as s}from"./i18n-bc04aa53.js";import{a as o}from"./reuse-b3566e4c.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-955454c7.js";import"./dev.utils-de957095.js";const a=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}:host{display:inline-block}:is(a,button){display:inline-flex;place-items:center;text-align:center;text-decoration-line:none}:is(a,button)>kol-span-wc{margin:auto;width:100%}:is(button):disabled{cursor:not-allowed;opacity:0.5}",r=class{constructor(i){t(this,i),this.catchRef=t=>{this.ref=t,o(this.host,this.ref)},this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icon=void 0,this._iconOnly=void 0,this._label=void 0,this._listenAriaCurrent=void 0,this._on=void 0,this._role=void 0,this._tabIndex=void 0,this._target=void 0,this._targetDescription=s("kol-open-link-in-tab"),this._tooltipAlign="right",this._variant="normal"}render(){return i(n,null,i("kol-link-wc",{ref:this.catchRef,class:{button:!0,[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0},_ariaControls:this._ariaControls,_ariaCurrent:this._ariaCurrent,_ariaExpanded:this._ariaExpanded,_ariaLabel:this._ariaLabel,_ariaSelected:this._ariaSelected,_disabled:this._disabled,_download:this._download,_hideLabel:this._hideLabel,_href:this._href,_icon:this._icon,_label:this._label,_listenAriaCurrent:this._listenAriaCurrent,_on:this._on,_role:"button",_tabIndex:this._tabIndex,_target:this._target,_targetDescription:this._targetDescription,_tooltipAlign:this._tooltipAlign},i("slot",{name:"expert",slot:"expert"})))}get host(){return e(this)}};r.style={default:a};export{r as kol_link_button};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultStyleCss","KolLinkButton","this","catchRef","ref","propagateFocus","host","translate","render","h","Host","class","button","_variant","_customClass","length","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_download","_hideLabel","_href","_icon","_label","_listenAriaCurrent","_on","_role","_tabIndex","_target","_targetDescription","_tooltipAlign","name","slot"],"sources":["src/components/link-button/style.css?tag=kol-link-button&mode=default&encapsulation=shadow","src/components/link-button/component.tsx"],"sourcesContent":["@import url(../button.css);\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { AlternativeButtonLinkRolePropType } from '../../types/props/alternative-button-link-role';\nimport { AriaCurrentPropType } from '../../types/props/aria-current';\nimport { ButtonVariantPropType } from '../../types/props/button-variant';\nimport { CustomClassPropType } from '../../types/props/custom-class';\nimport { DownloadPropType } from '../../types/props/download';\nimport { HrefPropType } from '../../types/props/href';\nimport {
|
|
1
|
+
{"version":3,"names":["defaultStyleCss","KolLinkButton","this","catchRef","ref","propagateFocus","host","translate","render","h","Host","class","button","_variant","_customClass","length","_ariaControls","_ariaCurrent","_ariaExpanded","_ariaLabel","_ariaSelected","_disabled","_download","_hideLabel","_href","_icon","_label","_listenAriaCurrent","_on","_role","_tabIndex","_target","_targetDescription","_tooltipAlign","name","slot"],"sources":["src/components/link-button/style.css?tag=kol-link-button&mode=default&encapsulation=shadow","src/components/link-button/component.tsx"],"sourcesContent":["@import url(../button.css);\n","import { Component, Element, h, Host, JSX, Prop } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { AlternativeButtonLinkRolePropType } from '../../types/props/alternative-button-link-role';\nimport { AriaCurrentPropType } from '../../types/props/aria-current';\nimport { ButtonVariantPropType } from '../../types/props/button-variant';\nimport { CustomClassPropType } from '../../types/props/custom-class';\nimport { DownloadPropType } from '../../types/props/download';\nimport { HrefPropType } from '../../types/props/href';\nimport { IconsPropType } from '../../types/props/icons';\nimport { LabelWithExpertSlotPropType } from '../../types/props/label';\nimport { LinkOnCallbacksPropType } from '../../types/props/link-on-callbacks';\nimport { LinkTargetPropType } from '../../types/props/link-target';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { propagateFocus } from '../../utils/reuse';\nimport { Props } from './types';\n\n@Component({\n\ttag: 'kol-link-button',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkButton implements Props {\n\t@Element() private readonly host?: HTMLKolLinkButtonElement;\n\tprivate ref?: HTMLKolLinkWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<kol-link-wc\n\t\t\t\t\tref={this.catchRef}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tbutton: true,\n\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t}}\n\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t_ariaCurrent={this._ariaCurrent}\n\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t_ariaLabel={this._ariaLabel}\n\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t_download={this._download}\n\t\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t\t_href={this._href}\n\t\t\t\t\t_icon={this._icon}\n\t\t\t\t\t_label={this._label}\n\t\t\t\t\t_listenAriaCurrent={this._listenAriaCurrent}\n\t\t\t\t\t_on={this._on}\n\t\t\t\t\t_role=\"button\"\n\t\t\t\t\t_tabIndex={this._tabIndex}\n\t\t\t\t\t_target={this._target}\n\t\t\t\t\t_targetDescription={this._targetDescription}\n\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"expert\" slot=\"expert\"></slot>\n\t\t\t\t</kol-link-wc>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Deprecated: 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 * @deprecated will be removed in v2\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Deprecated: Marks the element as the selected in a group of related elements. Can be one of the following: `date` | `location` | `page` | `step` | `time` | `true`. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n\t *\n\t * @deprecated use _listen-aria-current instead\n\t */\n\t@Prop() public _ariaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Deprecated: 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 *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Deprecated: Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t *\n\t * @deprecated will be removed in v2\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Deprecated: Makes the element not focusable and ignore all events.\n\t *\n\t * @deprecated Ein Link kann nicht deaktiviert werden, nutzen Sie den Button-Link stattdessen.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Tells the browser that the link contains a file. Optionally sets the filename.\n\t */\n\t@Prop() public _download?: DownloadPropType;\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 target URI of the link.\n\t */\n\t@Prop() public _href!: HrefPropType;\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icon?: IconsPropType;\n\n\t/**\n\t * Deprecated: Hides the label and shows the description in a Tooltip instead.\n\t * @deprecated use _hide-label\n\t */\n\t@Prop() public _iconOnly?: boolean;\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 * Listen on a aria-current event with this value. If the value matches the current value and the href is the same as the current url, the aria-current attribute will be set to current value.\n\t */\n\t@Prop() public _listenAriaCurrent?: AriaCurrentPropType;\n\n\t/**\n\t * Defines the callback functions for links.\n\t */\n\t@Prop() public _on?: LinkOnCallbacksPropType;\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 * 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 open the link.\n\t */\n\t@Prop() public _target?: LinkTargetPropType;\n\n\t/**\n\t * Defines the description to use when the link is going to be opened in another application.\n\t */\n\t@Prop() public _targetDescription?: string = translate('kol-open-link-in-tab');\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 = 'right';\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n}\n"],"mappings":";;;qQAAA,MAAMA,EAAkB,46B,MCwBXC,EAAa,M,yBAIRC,KAAAC,SAAYC,IAC5BF,KAAKE,IAAMA,EACXC,EAAeH,KAAKI,KAAMJ,KAAKE,IAAI,E,wLAmFC,M,yCAYC,M,2OAmDOG,EAAU,wB,mBAKD,Q,cAKJ,Q,CAzJ3C,MAAAC,GACN,OACCC,EAACC,EAAI,KACJD,EAAA,eACCL,IAAKF,KAAKC,SACVQ,MAAO,CACNC,OAAQ,KACR,CAACV,KAAKW,UAAqBX,KAAKW,WAAa,SAC7C,CAACX,KAAKY,cAAyBZ,KAAKW,WAAa,iBAAmBX,KAAKY,eAAiB,UAAYZ,KAAKY,aAAaC,OAAS,GAElIC,cAAed,KAAKc,cACpBC,aAAcf,KAAKe,aACnBC,cAAehB,KAAKgB,cACpBC,WAAYjB,KAAKiB,WACjBC,cAAelB,KAAKkB,cACpBC,UAAWnB,KAAKmB,UAChBC,UAAWpB,KAAKoB,UAChBC,WAAYrB,KAAKqB,WACjBC,MAAOtB,KAAKsB,MACZC,MAAOvB,KAAKuB,MACZC,OAAQxB,KAAKwB,OACbC,mBAAoBzB,KAAKyB,mBACzBC,IAAK1B,KAAK0B,IACVC,MAAM,SACNC,UAAW5B,KAAK4B,UAChBC,QAAS7B,KAAK6B,QACdC,mBAAoB9B,KAAK8B,mBACzBC,cAAe/B,KAAK+B,eAEpBxB,EAAA,QAAMyB,KAAK,SAASC,KAAK,Y"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as t}from"./index-536799d5.js";import{v as e}from"./label-
|
|
4
|
+
import{r as i,h as t}from"./index-536799d5.js";import{v as e}from"./label-75e66cca.js";import{d as a,w as l,a as s}from"./prop.validators-4b478b27.js";import{r as n,a as r}from"./unique-nav-labels-c6750f60.js";import{w as o}from"./validation-ea94708d.js";import{w as h}from"./validation-311fef33.js";import"./a11y.tipps-955454c7.js";import"./dev.utils-de957095.js";import"./reuse-b3566e4c.js";import"./index-3822b0c5.js";const d=":host{--a11y-min-size:44px;font-size:inherit}*{font-family:Verdana;hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role='button'],button:not([role='link']),kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}:host{max-width:100%}*{box-sizing:border-box}kol-span-wc{display:grid;place-items:center}kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}button,input,option,select,textarea{font-family:inherit}.icon-only>kol-span-wc>span>span{display:none}ul{list-style:none;margin:0;padding:0}nav.horizontal ul{display:flex;flex-wrap:wrap}nav.horizontal li{margin-left:1.25rem;margin-right:0.25rem}nav.horizontal li:first-child{margin-left:0}nav.horizontal li:last-child{margin-right:0}nav.vertical li{margin-left:1.75rem;margin-right:0.5rem}li.list-none{list-style-type:none !important;margin-left:0}",c=i=>{const e=[];return i.links.map(((a,l)=>{e.push(t("li",{key:l,class:{ident:l>0&&"vertical"===i.orientation,"list-none":0===l&&"horizontal"===i.orientation},style:{listStyleType:i.listStyleType}},t("kol-link",Object.assign({},a))))})),e},p=class{constructor(t){i(this,t),this.isUl=!0,this._ariaLabel=void 0,this._listStyleType=void 0,this._heading=void 0,this._label=void 0,this._level=void 0,this._links=void 0,this._ordered=!1,this._orientation="vertical",this.state={_label:"…",_listStyleType:"disc",_links:[],_orientation:"vertical"}}render(){var i;return t("nav",{"aria-label":this.state._label,class:{vertical:"vertical"===this.state._orientation,horizontal:"horizontal"===this.state._orientation}},"string"==typeof this.state._heading&&(null===(i=this.state._heading)||void 0===i?void 0:i.length)>0&&t("kol-heading-wc",{_label:this.state._heading,_level:this.state._level}),!1===this.isUl?t("ol",null,t(c,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})):t("ul",null,t(c,{links:this.state._links,orientation:this.state._orientation,listStyleType:this.state._listStyleType})))}validateAriaLabel(t){this.validateLabel(t)}validateHeading(t){a(this,"_heading",t)}validateLabel(t,i,a=!1){a||n(this.state._label),e(this,t),r(this.state._label)}validateLevel(t){o(this,t)}validateListStyleType(t){l(this,"_listStyleType",(t=>{switch(t){case"disc":case"circle":case"square":case"none":return this.isUl=!0,!0;case"decimal":case"decimal-leading-zero":case"lower-alpha":case"lower-latin":case"lower-greek":case"lower-roman":case"upper-alpha":case"upper-latin":case"upper-roman":return this.isUl=!1,!0;default:return!1}}),new Set(["https://www.w3schools.com/tags/tag_ol.asp"]),t)}validateLinks(t){h("KolLinkGroup",this,t)}validateOrdered(t){s(this,"_ordered",t)}validateOrientation(t){l(this,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}componentWillLoad(){this.validateHeading(this._heading),this.validateLabel(this._label||this._ariaLabel,void 0,!0),this.validateLevel(this._level),this.validateListStyleType(this._listStyleType),this.validateLinks(this._links),this.validateOrientation(this._orientation)}disconnectedCallback(){n(this.state._label)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_heading:["validateHeading"],_label:["validateLabel"],_level:["validateLevel"],_listStyleType:["validateListStyleType"],_links:["validateLinks"],_ordered:["validateOrdered"],_orientation:["validateOrientation"]}}};p.style={default:d};export{p as kol_link_group};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultStyleCss","ListItem","props","list","links","map","link","index","push","h","key","class","ident","orientation","style","listStyleType","Object","assign","KolLinkGroup","this","isUl","_label","_listStyleType","_links","_orientation","render","state","vertical","horizontal","_heading","_a","length","_level","validateAriaLabel","value","validateLabel","validateHeading","watchString","_oldValue","initial","removeNavLabel","addNavLabel","validateLevel","watchHeadingLevel","validateListStyleType","watchValidator","Set","validateLinks","watchNavLinks","validateOrdered","watchBoolean","validateOrientation","defaultValue","componentWillLoad","_ariaLabel","undefined","disconnectedCallback"],"sources":["src/components/link-group/style.css?tag=kol-link-group&mode=default&encapsulation=shadow","src/components/link-group/component.tsx"],"sourcesContent":["@import url(../style.css);\nul {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\nnav.horizontal ul {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\nnav.horizontal li {\n\tmargin-left: 1.25rem;\n\tmargin-right: 0.25rem;\n}\nnav.horizontal li:first-child {\n\tmargin-left: 0;\n}\nnav.horizontal li:last-child {\n\tmargin-right: 0;\n}\nnav.vertical li {\n\tmargin-left: 1.75rem;\n\tmargin-right: 0.5rem;\n}\nli.list-none {\n\tlist-style-type: none !important;\n\tmargin-left: 0;\n}\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { Orientation } from '../../types/orientation';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { addNavLabel, removeNavLabel } from '../../utils/unique-nav-labels';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { LinkProps } from '../link/types';\nimport { watchNavLinks } from '../nav/validation';\nimport { API, ListStyleType, States } from './types';\n\nconst ListItem = (props: { links: LinkProps[]; orientation: Orientation; listStyleType: ListStyleType }): JSX.Element => {\n\tconst list: JSX.Element[] = [];\n\tprops.links.map((link, index: number) => {\n\t\tlist.push(\n\t\t\t(\n\t\t\t\t<li\n\t\t\t\t\tkey={index}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tident: index > 0 && props.orientation === 'vertical',\n\t\t\t\t\t\t'list-none': index === 0 && props.orientation === 'horizontal',\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tlistStyleType: props.listStyleType,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-link {...link}></kol-link>\n\t\t\t\t</li>\n\t\t\t) as JSX.Element\n\t\t);\n\t});\n\treturn list;\n};\n\n@Component({\n\ttag: 'kol-link-group',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkGroup implements API {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<nav\n\t\t\t\taria-label={this.state._label}\n\t\t\t\tclass={{\n\t\t\t\t\tvertical: this.state._orientation === 'vertical',\n\t\t\t\t\thorizontal: this.state._orientation === 'horizontal',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{/* @deprecated remove in the next major version */}\n\t\t\t\t{typeof this.state._heading === 'string' && this.state._heading?.length > 0 && (\n\t\t\t\t\t<kol-heading-wc _label={this.state._heading} _level={this.state._level}></kol-heading-wc>\n\t\t\t\t)}\n\n\t\t\t\t{this.isUl === false ? (\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ol>\n\t\t\t\t) : (\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ul>\n\t\t\t\t)}\n\t\t\t</nav>\n\t\t);\n\t}\n\n\tprivate isUl = true;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Gibt den List-Style-Typen für ungeordnete Listen aus. Wird bei horizontalen LinkGroups als Trenner verwendet\n\t */\n\t@Prop() public _listStyleType?: ListStyleType;\n\n\t/**\n\t * Deprecated: Gibt die optionale Überschrift zur Link-Gruppe an.\n\t * @deprecated remove in the next major version\n\t */\n\t@Prop() public _heading?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: LabelPropType; // TODO: required in v2\n\n\t/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel;\n\n\t/**\n\t * Defines the list of links to render.\n\t */\n\t@Prop() public _links!: Stringified<LinkProps[]>;\n\n\t/**\n\t * Deprecated: Gibt an, ob eine Ordered- oder eine Unordered-List verwendet werden soll.\n\t * @deprecated Wird mittels der Property _list-style-type automatisch gesteuert.\n\t */\n\t@Prop() public _ordered?: boolean;\n\n\t/**\n\t * Defines whether the orientation of the component is horizontal or vertical.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\n\n\t@State() public state: States = {\n\t\t_label: '…', // ⚠ required\n\t\t_listStyleType: 'disc',\n\t\t_links: [],\n\t\t_orientation: 'vertical',\n\t};\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\twatchString(this, '_heading', value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType, _oldValue?: LabelPropType, initial = false): void {\n\t\tif (!initial) {\n\t\t\tremoveNavLabel(this.state._label); // remove the current\n\t\t}\n\t\tvalidateLabel(this, value);\n\t\taddNavLabel(this.state._label); // add the state instead of prop, because the prop could be invalid and not set as new label\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t@Watch('_listStyleType')\n\tpublic validateListStyleType(value?: ListStyleType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_listStyleType',\n\t\t\t(value) => {\n\t\t\t\tswitch (value) {\n\t\t\t\t\tcase 'disc':\n\t\t\t\t\tcase 'circle':\n\t\t\t\t\tcase 'square':\n\t\t\t\t\tcase 'none':\n\t\t\t\t\t\tthis.isUl = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase 'decimal':\n\t\t\t\t\tcase 'decimal-leading-zero':\n\t\t\t\t\tcase 'lower-alpha':\n\t\t\t\t\tcase 'lower-latin':\n\t\t\t\t\tcase 'lower-greek':\n\t\t\t\t\tcase 'lower-roman':\n\t\t\t\t\tcase 'upper-alpha':\n\t\t\t\t\tcase 'upper-latin':\n\t\t\t\t\tcase 'upper-roman':\n\t\t\t\t\t\tthis.isUl = false;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tnew Set(['https://www.w3schools.com/tags/tag_ol.asp']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\t@Watch('_links')\n\tpublic validateLinks(value?: Stringified<LinkProps[]>): void {\n\t\twatchNavLinks('KolLinkGroup', this, value);\n\t}\n\n\t@Watch('_ordered')\n\tpublic validateOrdered(value?: boolean): void {\n\t\twatchBoolean(this, '_ordered', value);\n\t}\n\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateHeading(this._heading);\n\t\tthis.validateLabel(this._label || this._ariaLabel, undefined, true);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateListStyleType(this._listStyleType);\n\t\tthis.validateLinks(this._links);\n\t\tthis.validateOrientation(this._orientation);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tremoveNavLabel(this.state._label);\n\t}\n}\n\n// console.log(\n// stringifyJson([\n// { _label: 'Fehler 1', _id: '#anschrift_anschrift_adresse_strasse', _icon: 'error' },\n// { _label: 'Fehler 2', _id: '#anschrift_anschrift_adresse_hausnummer', _icon: 'error' },\n// ])\n// );\n"],"mappings":";;;qaAAA,MAAMA,EAAkB,qiCCaxB,MAAMC,EAAYC,IACjB,MAAMC,EAAsB,GAC5BD,EAAME,MAAMC,KAAI,CAACC,EAAMC,KACtBJ,EAAKK,KAEHC,EAAA,MACCC,IAAKH,EACLI,MAAO,CACNC,MAAOL,EAAQ,GAAKL,EAAMW,cAAgB,WAC1C,YAAaN,IAAU,GAAKL,EAAMW,cAAgB,cAEnDC,MAAO,CACNC,cAAeb,EAAMa,gBAGtBN,EAAA,WAAAO,OAAAC,OAAA,GAAcX,KAGhB,IAEF,OAAOH,CAAI,E,MAUCe,EAAY,M,yBA4BhBC,KAAAC,KAAO,K,4LA4C6B,W,WAEZ,CAC/BC,OAAQ,IACRC,eAAgB,OAChBC,OAAQ,GACRC,aAAc,W,CA7ER,MAAAC,G,MACN,OACChB,EAAA,oBACaU,KAAKO,MAAML,OACvBV,MAAO,CACNgB,SAAUR,KAAKO,MAAMF,eAAiB,WACtCI,WAAYT,KAAKO,MAAMF,eAAiB,sBAIjCL,KAAKO,MAAMG,WAAa,YAAYC,EAAAX,KAAKO,MAAMG,YAAQ,MAAAC,SAAA,SAAAA,EAAEC,QAAS,GACzEtB,EAAA,kBAAgBY,OAAQF,KAAKO,MAAMG,SAAUG,OAAQb,KAAKO,MAAMM,SAGhEb,KAAKC,OAAS,MACdX,EAAA,UACCA,EAACR,EAAQ,CAACG,MAAOe,KAAKO,MAAMH,OAAQV,YAAaM,KAAKO,MAAMF,aAAcT,cAAeI,KAAKO,MAAMJ,kBAGrGb,EAAA,UACCA,EAAC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GACNhB,EAAerB,KAAKO,MAAML,O"}
|
|
1
|
+
{"version":3,"names":["defaultStyleCss","ListItem","props","list","links","map","link","index","push","h","key","class","ident","orientation","style","listStyleType","Object","assign","KolLinkGroup","this","isUl","_label","_listStyleType","_links","_orientation","render","state","vertical","horizontal","_heading","_a","length","_level","validateAriaLabel","value","validateLabel","validateHeading","watchString","_oldValue","initial","removeNavLabel","addNavLabel","validateLevel","watchHeadingLevel","validateListStyleType","watchValidator","Set","validateLinks","watchNavLinks","validateOrdered","watchBoolean","validateOrientation","defaultValue","componentWillLoad","_ariaLabel","undefined","disconnectedCallback"],"sources":["src/components/link-group/style.css?tag=kol-link-group&mode=default&encapsulation=shadow","src/components/link-group/component.tsx"],"sourcesContent":["@import url(../style.css);\nul {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\nnav.horizontal ul {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n}\nnav.horizontal li {\n\tmargin-left: 1.25rem;\n\tmargin-right: 0.25rem;\n}\nnav.horizontal li:first-child {\n\tmargin-left: 0;\n}\nnav.horizontal li:last-child {\n\tmargin-right: 0;\n}\nnav.vertical li {\n\tmargin-left: 1.75rem;\n\tmargin-right: 0.5rem;\n}\nli.list-none {\n\tlist-style-type: none !important;\n\tmargin-left: 0;\n}\n","import { Component, h, JSX, Prop, State, Watch } from '@stencil/core';\n\nimport { Stringified } from '../../types/common';\nimport { HeadingLevel } from '../../types/heading-level';\nimport { Orientation } from '../../types/orientation';\nimport { LabelPropType, validateLabel } from '../../types/props/label';\nimport { watchBoolean, watchString, watchValidator } from '../../utils/prop.validators';\nimport { addNavLabel, removeNavLabel } from '../../utils/unique-nav-labels';\nimport { watchHeadingLevel } from '../heading/validation';\nimport { LinkProps } from '../link/types';\nimport { watchNavLinks } from '../nav/validation';\nimport { API, ListStyleType, States } from './types';\n\nconst ListItem = (props: { links: LinkProps[]; orientation: Orientation; listStyleType: ListStyleType }): JSX.Element => {\n\tconst list: JSX.Element[] = [];\n\tprops.links.map((link, index: number) => {\n\t\tlist.push(\n\t\t\t(\n\t\t\t\t<li\n\t\t\t\t\tkey={index}\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tident: index > 0 && props.orientation === 'vertical',\n\t\t\t\t\t\t'list-none': index === 0 && props.orientation === 'horizontal',\n\t\t\t\t\t}}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tlistStyleType: props.listStyleType,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<kol-link {...link}></kol-link>\n\t\t\t\t</li>\n\t\t\t) as JSX.Element\n\t\t);\n\t});\n\treturn list;\n};\n\n@Component({\n\ttag: 'kol-link-group',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolLinkGroup implements API {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<nav\n\t\t\t\taria-label={this.state._label}\n\t\t\t\tclass={{\n\t\t\t\t\tvertical: this.state._orientation === 'vertical',\n\t\t\t\t\thorizontal: this.state._orientation === 'horizontal',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{/* @deprecated remove in the next major version */}\n\t\t\t\t{typeof this.state._heading === 'string' && this.state._heading?.length > 0 && (\n\t\t\t\t\t<kol-heading-wc _label={this.state._heading} _level={this.state._level}></kol-heading-wc>\n\t\t\t\t)}\n\n\t\t\t\t{this.isUl === false ? (\n\t\t\t\t\t<ol>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ol>\n\t\t\t\t) : (\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<ListItem links={this.state._links} orientation={this.state._orientation} listStyleType={this.state._listStyleType} />\n\t\t\t\t\t</ul>\n\t\t\t\t)}\n\t\t\t</nav>\n\t\t);\n\t}\n\n\tprivate isUl = true;\n\n\t/**\n\t * Deprecated: Setzt die semantische Beschriftung der Komponente.\n\t *\n\t * @deprecated use _label instead\n\t */\n\t@Prop() public _ariaLabel?: string;\n\n\t/**\n\t * Gibt den List-Style-Typen für ungeordnete Listen aus. Wird bei horizontalen LinkGroups als Trenner verwendet\n\t */\n\t@Prop() public _listStyleType?: ListStyleType;\n\n\t/**\n\t * Deprecated: Gibt die optionale Überschrift zur Link-Gruppe an.\n\t * @deprecated remove in the next major version\n\t */\n\t@Prop() public _heading?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: LabelPropType; // TODO: required in v2\n\n\t/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel;\n\n\t/**\n\t * Defines the list of links to render.\n\t */\n\t@Prop() public _links!: Stringified<LinkProps[]>;\n\n\t/**\n\t * Deprecated: Gibt an, ob eine Ordered- oder eine Unordered-List verwendet werden soll.\n\t * @deprecated Wird mittels der Property _list-style-type automatisch gesteuert.\n\t */\n\t@Prop() public _ordered?: boolean = false;\n\n\t/**\n\t * Defines whether the orientation of the component is horizontal or vertical.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\n\n\t@State() public state: States = {\n\t\t_label: '…', // ⚠ required\n\t\t_listStyleType: 'disc',\n\t\t_links: [],\n\t\t_orientation: 'vertical',\n\t};\n\n\t/**\n\t * @deprecated\n\t */\n\t@Watch('_ariaLabel')\n\tpublic validateAriaLabel(value?: string): void {\n\t\tthis.validateLabel(value);\n\t}\n\n\t@Watch('_heading')\n\tpublic validateHeading(value?: string): void {\n\t\twatchString(this, '_heading', value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType, _oldValue?: LabelPropType, initial = false): void {\n\t\tif (!initial) {\n\t\t\tremoveNavLabel(this.state._label); // remove the current\n\t\t}\n\t\tvalidateLabel(this, value);\n\t\taddNavLabel(this.state._label); // add the state instead of prop, because the prop could be invalid and not set as new label\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t@Watch('_listStyleType')\n\tpublic validateListStyleType(value?: ListStyleType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_listStyleType',\n\t\t\t(value) => {\n\t\t\t\tswitch (value) {\n\t\t\t\t\tcase 'disc':\n\t\t\t\t\tcase 'circle':\n\t\t\t\t\tcase 'square':\n\t\t\t\t\tcase 'none':\n\t\t\t\t\t\tthis.isUl = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase 'decimal':\n\t\t\t\t\tcase 'decimal-leading-zero':\n\t\t\t\t\tcase 'lower-alpha':\n\t\t\t\t\tcase 'lower-latin':\n\t\t\t\t\tcase 'lower-greek':\n\t\t\t\t\tcase 'lower-roman':\n\t\t\t\t\tcase 'upper-alpha':\n\t\t\t\t\tcase 'upper-latin':\n\t\t\t\t\tcase 'upper-roman':\n\t\t\t\t\t\tthis.isUl = false;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tnew Set(['https://www.w3schools.com/tags/tag_ol.asp']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\t@Watch('_links')\n\tpublic validateLinks(value?: Stringified<LinkProps[]>): void {\n\t\twatchNavLinks('KolLinkGroup', this, value);\n\t}\n\n\t@Watch('_ordered')\n\tpublic validateOrdered(value?: boolean): void {\n\t\twatchBoolean(this, '_ordered', value);\n\t}\n\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateHeading(this._heading);\n\t\tthis.validateLabel(this._label || this._ariaLabel, undefined, true);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateListStyleType(this._listStyleType);\n\t\tthis.validateLinks(this._links);\n\t\tthis.validateOrientation(this._orientation);\n\t}\n\n\tpublic disconnectedCallback(): void {\n\t\tremoveNavLabel(this.state._label);\n\t}\n}\n\n// console.log(\n// stringifyJson([\n// { _label: 'Fehler 1', _id: '#anschrift_anschrift_adresse_strasse', _icons: 'error' },\n// { _label: 'Fehler 2', _id: '#anschrift_anschrift_adresse_hausnummer', _icons: 'error' },\n// ])\n// );\n"],"mappings":";;;qaAAA,MAAMA,EAAkB,qiCCaxB,MAAMC,EAAYC,IACjB,MAAMC,EAAsB,GAC5BD,EAAME,MAAMC,KAAI,CAACC,EAAMC,KACtBJ,EAAKK,KAEHC,EAAA,MACCC,IAAKH,EACLI,MAAO,CACNC,MAAOL,EAAQ,GAAKL,EAAMW,cAAgB,WAC1C,YAAaN,IAAU,GAAKL,EAAMW,cAAgB,cAEnDC,MAAO,CACNC,cAAeb,EAAMa,gBAGtBN,EAAA,WAAAO,OAAAC,OAAA,GAAcX,KAGhB,IAEF,OAAOH,CAAI,E,MAUCe,EAAY,M,yBA4BhBC,KAAAC,KAAO,K,gKAuCqB,M,kBAKQ,W,WAEZ,CAC/BC,OAAQ,IACRC,eAAgB,OAChBC,OAAQ,GACRC,aAAc,W,CA7ER,MAAAC,G,MACN,OACChB,EAAA,oBACaU,KAAKO,MAAML,OACvBV,MAAO,CACNgB,SAAUR,KAAKO,MAAMF,eAAiB,WACtCI,WAAYT,KAAKO,MAAMF,eAAiB,sBAIjCL,KAAKO,MAAMG,WAAa,YAAYC,EAAAX,KAAKO,MAAMG,YAAQ,MAAAC,SAAA,SAAAA,EAAEC,QAAS,GACzEtB,EAAA,kBAAgBY,OAAQF,KAAKO,MAAMG,SAAUG,OAAQb,KAAKO,MAAMM,SAGhEb,KAAKC,OAAS,MACdX,EAAA,UACCA,EAACR,EAAQ,CAACG,MAAOe,KAAKO,MA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G,gBAChCH,KAAK4B,cAAc5B,KAAKI,QACxBJ,KAAKgC,oBAAoBhC,KAAKK,a,CAGxB,oBAAAgC,GACNhB,EAAerB,KAAKO,MAAML,O"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as t,H as e,g as s}from"./index-536799d5.js";import{a}from"./i18n-
|
|
4
|
+
import{r as i,h as t,H as e,g as s}from"./index-536799d5.js";import{a}from"./i18n-bc04aa53.js";import{v as n,a as h,b as l,c as d}from"./aria-current-33e3c97e.js";import{a as r,d as o,f as c,h as f,i as v,j as p}from"./prop.validators-4b478b27.js";import{v as u}from"./hide-label-04a37e65.js";import{v as _,w as b}from"./icons-3e49b4a0.js";import{a as g}from"./label-75e66cca.js";import{v as m}from"./tooltip-align-d07756e6.js";import{d as j,h as x,g as A}from"./a11y.tipps-955454c7.js";import{a as k,s as y}from"./reuse-b3566e4c.js";import{v as C}from"./tab-index-0032cfde.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./dev.utils-de957095.js";import"./alignment-62e2fe88.js";const L=(t,i)=>{r(t,"_ariaSelected",i)},I=(t,i)=>{o(t,"_download",i)},w=(t,i,e={})=>{o(t,"_href",i,e)},T=(t,i)=>{"object"==typeof i&&"function"==typeof(null==i?void 0:i.onClick)&&(t.state=Object.assign(Object.assign({},t.state),{_on:i}))},O=(t,i)=>{o(t,"_target",i)},D=(t,i)=>{r(t,"_stealth",i)},S=class{constructor(t){i(this,t),this.catchRef=t=>{this.ref=t,k(this.host,this.ref)},this.onClick=t=>{var i,e;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onClick)&&(t.preventDefault(),t.stopPropagation(),c(t,this.ref),null===(e=this.state._on)||void 0===e||e.onClick(t,this.state._href))},this.getRenderValues=()=>{let t={};"string"==typeof this.state._selector&&(t={role:"link",tabIndex:0,onClick:()=>{p(this.state._selector)},onKeyPress:()=>{p(this.state._selector)}});const i="string"==typeof this.state._target&&"_self"!==this.state._target,e={href:"string"==typeof this.state._href&&this.state._href.length>0?this.state._href:"javascript:void(0);",target:"string"==typeof this.state._target&&this.state._target.length>0?this.state._target:void 0,rel:i?"noopener":void 0,download:"string"==typeof this.state._download?this.state._download:void 0};return"image"!==this.state._useCase&&!0!==this.state._hideLabel||this.state._label||j("[KolLink] Es muss ein Aria-Label gesetzt werden, wenn eine Grafik verlinkt oder der _hide-label gesetzt ist."),{isExternal:i,tagAttrs:e,goToProps:t}},this.unsubscribeAriaCurrentSubject=f.subscribe((t=>{try{this.state._listenAriaCurrent&&this.state._listenAriaCurrent===t.ariaCurrent&&(this.state._href===t.href?this.validateAriaCurrent(t.ariaCurrent):this.validateAriaCurrent(!1))}catch(t){x("The aria-current event is not valid.")}})),this._ariaControls=void 0,this._ariaCurrent=void 0,this._ariaExpanded=void 0,this._ariaLabel=void 0,this._ariaSelected=void 0,this._disabled=!1,this._download=void 0,this._hideLabel=!1,this._href=void 0,this._icon=void 0,this._icons=void 0,this._iconAlign=void 0,this._iconOnly=void 0,this._label=void 0,this._listenAriaCurrent=void 0,this._on=void 0,this._role=void 0,this._selector=void 0,this._stealth=!1,this._tabIndex=void 0,this._target=void 0,this._targetDescription=a("kol-open-link-in-tab"),this._tooltipAlign="right",this._useCase="text",this.state={_href:"…",_icons:{}}}render(){const{isExternal:i,tagAttrs:a,goToProps:s}=this.getRenderValues(),l=y(this.state._label);return t(e,null,t("a",Object.assign({ref:this.catchRef},a,{"aria-controls":this.state._ariaControls,"aria-current":this.state._ariaCurrent,"aria-expanded":v(this.state._ariaExpanded),"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,"aria-selected":v(this.state._ariaSelected),class:{disabled:!0===this.state._disabled,"skip ":!1!==this.state._stealth,"icon-only":!0===this.state._hideLabel,"hide-label":!0===this.state._hideLabel,"external-link":i}},this.state._on,{onClick:this.onClick,onKeyPress:this.onClick},s,{role:this.state._role,tabIndex:this.state._tabIndex}),t("kol-span-wc",{_icons:this.state._icons,_hideLabel:this.state._hideLabel,_label:l?"":this.state._label||this.state._href},t("slot",{name:"expert",slot:"expert"})),i&&t("kol-icon",{class:"external-link-icon",_label:this.state._targetDescription,_icons:"codicon codicon-link-external"})),t("kol-tooltip-wc",{"aria-hidden":"true",hidden:l||!this.state._hideLabel,_align:this.state._tooltipAlign,_label:this.state._label||this.state._href}))}validateAriaControls(t){n(this,t)}validateAriaCurrent(t){h(this,t)}validateAriaExpanded(t){r(this,"_ariaExpanded",t)}validateAriaLabel(t){this.validateLabel(t)}validateAriaSelected(t){L(this,t)}validateDisabled(t){r(this,"_disabled",t),!0===t&&A()}validateDownload(t){I(this,t)}validateHideLabel(t){u(this,t)}validateHref(t){w(this,t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){_(this,t)}validateIconAlign(t){b(this,t)}validateIconOnly(t){this.validateHideLabel(t)}validateLabel(t){g(this,t)}validateListenAriaCurrent(t){l(this,t)}validateOn(t){T(this,t)}validateRole(t){d(this,t)}validateSelector(t){o(this,"_selector",t)}validateStealth(t){D(this,t)}validateTabIndex(t){C(this,t)}validateTarget(t){O(this,t)}validateTargetDescription(t){o(this,"_targetDescription",t)}validateTooltipAlign(t){m(this,t)}validateUseCase(t){"string"==typeof t&&(this.state=Object.assign(Object.assign({},this.state),{_useCase:t}))}componentWillLoad(){this.validateAriaControls(this._ariaControls),this.validateAriaCurrent(this._ariaCurrent),this.validateAriaExpanded(this._ariaExpanded),this.validateAriaSelected(this._ariaSelected),this.validateDisabled(this._disabled),this.validateDownload(this._download),this.validateHideLabel(this._hideLabel||this._iconOnly),this.validateHref(this._href),this.validateIcon(this._icons||this._icon),this.validateIconAlign(this._iconAlign),this.validateLabel(this._label||this._ariaLabel),this.validateListenAriaCurrent(this._listenAriaCurrent),this.validateOn(this._on),this.validateRole(this._role),this.validateSelector(this._selector),this.validateStealth(this._stealth),this.validateTabIndex(this._tabIndex),this.validateTarget(this._target),this.validateTargetDescription(this._targetDescription),this.validateTooltipAlign(this._tooltipAlign),this.validateUseCase(this._useCase)}disconnectedCallback(){this.unsubscribeAriaCurrentSubject.unsubscribe()}get host(){return s(this)}static get watchers(){return{_ariaControls:["validateAriaControls"],_ariaCurrent:["validateAriaCurrent"],_ariaExpanded:["validateAriaExpanded"],_ariaLabel:["validateAriaLabel"],_ariaSelected:["validateAriaSelected"],_disabled:["validateDisabled"],_download:["validateDownload"],_hideLabel:["validateHideLabel"],_href:["validateHref"],_icon:["validateIcon"],_icons:["validateIcons"],_iconAlign:["validateIconAlign"],_iconOnly:["validateIconOnly"],_label:["validateLabel"],_listenAriaCurrent:["validateListenAriaCurrent"],_on:["validateOn"],_role:["validateRole"],_selector:["validateSelector"],_stealth:["validateStealth"],_tabIndex:["validateTabIndex"],_target:["validateTarget"],_targetDescription:["validateTargetDescription"],_tooltipAlign:["validateTooltipAlign"],_useCase:["validateUseCase"]}}};export{S as kol_link_wc};
|