@public-ui/components 1.7.3 → 1.7.5
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 +45 -9
- package/dist/cjs/{a11y.tipps-dd4d7aa2.js → a11y.tipps-c5387a76.js} +1 -1
- package/dist/cjs/{a11y.tipps-dd4d7aa2.js.map → a11y.tipps-c5387a76.js.map} +1 -1
- package/dist/cjs/align-82c5c7e6.js +4 -0
- package/dist/cjs/{align-4833e7b8.js.map → align-82c5c7e6.js.map} +1 -1
- package/dist/cjs/{alignment-1cddb2bb.js → alignment-1a7ee008.js} +1 -1
- package/dist/cjs/{alignment-1cddb2bb.js.map → alignment-1a7ee008.js.map} +1 -1
- package/dist/cjs/{app-globals-07a61e76.js → app-globals-fb8b4444.js} +1 -1
- package/dist/cjs/{app-globals-07a61e76.js.map → app-globals-fb8b4444.js.map} +1 -1
- package/dist/cjs/aria-current-a6b40d0a.js +4 -0
- package/dist/cjs/{aria-current-3574d27e.js.map → aria-current-a6b40d0a.js.map} +1 -1
- package/dist/cjs/{associated.controller-25bdbc4c.js → associated.controller-3a3616f9.js} +1 -1
- package/dist/cjs/{associated.controller-25bdbc4c.js.map → associated.controller-3a3616f9.js.map} +1 -1
- package/dist/cjs/{color-1477dad9.js → color-15d2ce6c.js} +1 -1
- package/dist/cjs/{color-1477dad9.js.map → color-15d2ce6c.js.map} +1 -1
- package/dist/cjs/{controller-f84cb32e.js → controller-0e5697e2.js} +1 -1
- package/dist/cjs/{controller-f84cb32e.js.map → controller-0e5697e2.js.map} +1 -1
- package/dist/cjs/{controller-635f84bb.js → controller-2e53480f.js} +1 -1
- package/dist/cjs/{controller-635f84bb.js.map → controller-2e53480f.js.map} +1 -1
- package/dist/cjs/{controller-07933f8a.js → controller-462acf6c.js} +1 -1
- package/dist/cjs/{controller-07933f8a.js.map → controller-462acf6c.js.map} +1 -1
- package/dist/cjs/{controller-75aab3d6.js → controller-bc7d30fb.js} +1 -1
- package/dist/cjs/{controller-75aab3d6.js.map → controller-bc7d30fb.js.map} +1 -1
- package/dist/cjs/{controller-2e93aa0b.js → controller-c1375efb.js} +1 -1
- package/dist/cjs/{controller-2e93aa0b.js.map → controller-c1375efb.js.map} +1 -1
- package/dist/cjs/{controller-icon-c806e1ed.js → controller-icon-b12193a9.js} +1 -1
- package/dist/cjs/{controller-icon-c806e1ed.js.map → controller-icon-b12193a9.js.map} +1 -1
- package/dist/cjs/{custom-class-50a75474.js → custom-class-3ab4628f.js} +1 -1
- package/dist/cjs/{custom-class-50a75474.js.map → custom-class-3ab4628f.js.map} +1 -1
- package/dist/cjs/{dev.utils-da95732f.js → dev.utils-2073dc09.js} +1 -1
- package/dist/cjs/{dev.utils-da95732f.js.map → dev.utils-2073dc09.js.map} +1 -1
- package/dist/cjs/{devtools-5f4087de.js → devtools-b02532ad.js} +1 -1
- package/dist/cjs/{devtools-5f4087de.js.map → devtools-b02532ad.js.map} +1 -1
- package/dist/cjs/has-closer-5b5049c7.js +4 -0
- package/dist/cjs/{has-closer-ee730a2c.js.map → has-closer-5b5049c7.js.map} +1 -1
- package/dist/cjs/hide-label-661c1bad.js +4 -0
- package/dist/cjs/{hide-label-4f46ef6b.js.map → hide-label-661c1bad.js.map} +1 -1
- package/dist/cjs/{i18n-883db212.js → i18n-3dd524d2.js} +1 -1
- package/dist/cjs/{i18n-883db212.js.map → i18n-3dd524d2.js.map} +1 -1
- package/dist/cjs/{icons-d26ec242.js → icons-c987957e.js} +1 -1
- package/dist/cjs/{icons-d26ec242.js.map → icons-c987957e.js.map} +1 -1
- package/dist/cjs/image-source-b5a9c8f9.js +4 -0
- package/dist/cjs/{image-source-aad3340f.js.map → image-source-b5a9c8f9.js.map} +1 -1
- package/dist/cjs/{index-d94c6297.js → index-c3cd3623.js} +1 -1
- package/dist/cjs/{index-d94c6297.js.map → index-c3cd3623.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert-wc_3.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button.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-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-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js.map +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-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio-group.cjs.entry.js +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-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-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-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover.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-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc_2.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-toast.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/{label-467a936d.js → label-63f8275b.js} +1 -1
- package/dist/cjs/{label-467a936d.js.map → label-63f8275b.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/open-bde18e22.js +4 -0
- package/dist/cjs/{open-e9be21cc.js.map → open-bde18e22.js.map} +1 -1
- package/dist/cjs/{prop.validators-6f92dc96.js → prop.validators-aa13f60a.js} +1 -1
- package/dist/cjs/{prop.validators-6f92dc96.js.map → prop.validators-aa13f60a.js.map} +1 -1
- package/dist/cjs/rows-fc5f60d9.js +4 -0
- package/dist/cjs/{rows-bb440aec.js.map → rows-fc5f60d9.js.map} +1 -1
- package/dist/cjs/show-f026dc23.js +4 -0
- package/dist/cjs/{show-9b0c1d00.js.map → show-f026dc23.js.map} +1 -1
- package/dist/cjs/{suggestions-7985373a.js → suggestions-d04d1b81.js} +1 -1
- package/dist/cjs/{suggestions-7985373a.js.map → suggestions-d04d1b81.js.map} +1 -1
- package/dist/cjs/{tab-index-6b2fbb7c.js → tab-index-98bcc858.js} +1 -1
- package/dist/cjs/{tab-index-6b2fbb7c.js.map → tab-index-98bcc858.js.map} +1 -1
- package/dist/cjs/{toaster-82cf12c5.js → toaster-2958db57.js} +1 -1
- package/dist/cjs/{toaster-82cf12c5.js.map → toaster-2958db57.js.map} +1 -1
- package/dist/cjs/toaster-d55e9636.js +4 -0
- package/dist/cjs/toaster-d55e9636.js.map +1 -0
- package/dist/cjs/{tooltip-align-c1ab918f.js → tooltip-align-671c6a40.js} +1 -1
- package/dist/cjs/{tooltip-align-c1ab918f.js.map → tooltip-align-671c6a40.js.map} +1 -1
- package/dist/cjs/{validation-a79c30cf.js → validation-43b5bf59.js} +1 -1
- package/dist/cjs/{validation-a79c30cf.js.map → validation-43b5bf59.js.map} +1 -1
- package/dist/cjs/{validation-2a513f8b.js → validation-e91934ad.js} +1 -1
- package/dist/cjs/{validation-2a513f8b.js.map → validation-e91934ad.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/component5.js +1 -1
- package/dist/components/component6.js +1 -1
- package/dist/components/component8.js +1 -1
- package/dist/components/component9.js +1 -1
- package/dist/components/controller.js +1 -1
- package/dist/components/controller2.js +1 -1
- package/dist/components/devtools.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.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-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-details.js +1 -1
- package/dist/components/kol-details.js.map +1 -1
- package/dist/components/kol-image.js +1 -1
- package/dist/components/kol-image.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-text.js +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-logo.js +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-table.js +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toast-container.js.map +1 -1
- package/dist/components/kol-toast.js +1 -1
- package/dist/components/kol-toast.js.map +1 -1
- package/dist/components/prop.validators.js +1 -1
- package/dist/components/prop.validators.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/components/toaster.js +1 -1
- package/dist/esm/{a11y.tipps-ba672890.js → a11y.tipps-54065212.js} +1 -1
- package/dist/esm/{a11y.tipps-ba672890.js.map → a11y.tipps-54065212.js.map} +1 -1
- package/dist/esm/{align-6791f42e.js → align-a2401a24.js} +1 -1
- package/dist/esm/{align-6791f42e.js.map → align-a2401a24.js.map} +1 -1
- package/dist/esm/{alignment-5e6dbd7f.js → alignment-2171a053.js} +1 -1
- package/dist/esm/{alignment-5e6dbd7f.js.map → alignment-2171a053.js.map} +1 -1
- package/dist/esm/{app-globals-25ce2ed6.js → app-globals-770cf469.js} +1 -1
- package/dist/esm/{app-globals-25ce2ed6.js.map → app-globals-770cf469.js.map} +1 -1
- package/dist/esm/{aria-current-b3fb717c.js → aria-current-87734eb8.js} +1 -1
- package/dist/esm/{aria-current-b3fb717c.js.map → aria-current-87734eb8.js.map} +1 -1
- package/dist/esm/{associated.controller-d519d4fd.js → associated.controller-a1ec4433.js} +1 -1
- package/dist/esm/{associated.controller-d519d4fd.js.map → associated.controller-a1ec4433.js.map} +1 -1
- package/dist/esm/{color-66412a88.js → color-9cbf6d52.js} +1 -1
- package/dist/esm/{color-66412a88.js.map → color-9cbf6d52.js.map} +1 -1
- package/dist/esm/{controller-0407a8fc.js → controller-23b9e0a2.js} +1 -1
- package/dist/esm/{controller-0407a8fc.js.map → controller-23b9e0a2.js.map} +1 -1
- package/dist/esm/{controller-4418a153.js → controller-8aaf4af5.js} +1 -1
- package/dist/esm/{controller-4418a153.js.map → controller-8aaf4af5.js.map} +1 -1
- package/dist/esm/{controller-4a327464.js → controller-b4428245.js} +1 -1
- package/dist/esm/{controller-4a327464.js.map → controller-b4428245.js.map} +1 -1
- package/dist/esm/{controller-04e4f9f3.js → controller-b84eace4.js} +1 -1
- package/dist/esm/{controller-04e4f9f3.js.map → controller-b84eace4.js.map} +1 -1
- package/dist/esm/{controller-a2e99cf4.js → controller-d80a67d0.js} +1 -1
- package/dist/esm/{controller-a2e99cf4.js.map → controller-d80a67d0.js.map} +1 -1
- package/dist/esm/{controller-icon-5552f237.js → controller-icon-ef27c916.js} +1 -1
- package/dist/esm/{controller-icon-5552f237.js.map → controller-icon-ef27c916.js.map} +1 -1
- package/dist/esm/{custom-class-503e41f2.js → custom-class-833c9c0b.js} +1 -1
- package/dist/esm/{custom-class-503e41f2.js.map → custom-class-833c9c0b.js.map} +1 -1
- package/dist/esm/{dev.utils-aea04f25.js → dev.utils-ad367f40.js} +1 -1
- package/dist/esm/{dev.utils-aea04f25.js.map → dev.utils-ad367f40.js.map} +1 -1
- package/dist/esm/{devtools-151a8a80.js → devtools-73dc1f39.js} +1 -1
- package/dist/esm/{devtools-151a8a80.js.map → devtools-73dc1f39.js.map} +1 -1
- package/dist/esm/{has-closer-fe2d4781.js → has-closer-3f2a115a.js} +1 -1
- package/dist/esm/{has-closer-fe2d4781.js.map → has-closer-3f2a115a.js.map} +1 -1
- package/dist/esm/{hide-label-2e0f24b2.js → hide-label-310fe1b8.js} +1 -1
- package/dist/esm/{hide-label-2e0f24b2.js.map → hide-label-310fe1b8.js.map} +1 -1
- package/dist/esm/{i18n-3c8ef0a3.js → i18n-ad401ed8.js} +1 -1
- package/dist/esm/{i18n-3c8ef0a3.js.map → i18n-ad401ed8.js.map} +1 -1
- package/dist/esm/{icons-a05b3daf.js → icons-c28cff87.js} +1 -1
- package/dist/esm/{icons-a05b3daf.js.map → icons-c28cff87.js.map} +1 -1
- package/dist/esm/{image-source-f838da2a.js → image-source-3f04add1.js} +1 -1
- package/dist/esm/{image-source-f838da2a.js.map → image-source-3f04add1.js.map} +1 -1
- package/dist/esm/{index-e51de689.js → index-fb9ac195.js} +1 -1
- package/dist/esm/{index-e51de689.js.map → index-fb9ac195.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js.map +1 -1
- package/dist/esm/kol-alert-wc_3.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js.map +1 -1
- package/dist/esm/kol-button.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-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-image.entry.js +1 -1
- package/dist/esm/kol-image.entry.js.map +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-date.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-radio-group.entry.js +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-text.entry.js +1 -1
- package/dist/esm/kol-input.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-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-wc.entry.js +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-link.entry.js.map +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-popover.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-skip-nav.entry.js +1 -1
- package/dist/esm/kol-span-wc_2.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-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-textarea.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js.map +1 -1
- package/dist/esm/kol-toast.entry.js +1 -1
- package/dist/esm/kol-toast.entry.js.map +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/{label-2cb3f0a1.js → label-57859a5a.js} +1 -1
- package/dist/esm/{label-2cb3f0a1.js.map → label-57859a5a.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{open-f70592c1.js → open-29222e31.js} +1 -1
- package/dist/esm/{open-f70592c1.js.map → open-29222e31.js.map} +1 -1
- package/dist/esm/{prop.validators-7087c1e6.js → prop.validators-251589c8.js} +1 -1
- package/dist/esm/{prop.validators-7087c1e6.js.map → prop.validators-251589c8.js.map} +1 -1
- package/dist/esm/{rows-9a9a2940.js → rows-c8fb93ae.js} +1 -1
- package/dist/esm/{rows-9a9a2940.js.map → rows-c8fb93ae.js.map} +1 -1
- package/dist/esm/{show-8c3c4865.js → show-6fddf77c.js} +1 -1
- package/dist/esm/{show-8c3c4865.js.map → show-6fddf77c.js.map} +1 -1
- package/dist/esm/{suggestions-689ff138.js → suggestions-1e0fe6e9.js} +1 -1
- package/dist/esm/{suggestions-689ff138.js.map → suggestions-1e0fe6e9.js.map} +1 -1
- package/dist/esm/{tab-index-4f18f869.js → tab-index-39708fff.js} +1 -1
- package/dist/esm/{tab-index-4f18f869.js.map → tab-index-39708fff.js.map} +1 -1
- package/dist/esm/toaster-210e0b2c.js +4 -0
- package/dist/esm/toaster-210e0b2c.js.map +1 -0
- package/dist/esm/{toaster-1ee75e55.js → toaster-5d1ee30b.js} +1 -1
- package/dist/esm/{toaster-1ee75e55.js.map → toaster-5d1ee30b.js.map} +1 -1
- package/dist/esm/{tooltip-align-b8d9da02.js → tooltip-align-d0d73d60.js} +1 -1
- package/dist/esm/{tooltip-align-b8d9da02.js.map → tooltip-align-d0d73d60.js.map} +1 -1
- package/dist/esm/{validation-5429f00c.js → validation-3e123430.js} +1 -1
- package/dist/esm/{validation-5429f00c.js.map → validation-3e123430.js.map} +1 -1
- package/dist/esm/validation-74fe1552.js +4 -0
- package/dist/esm/{validation-906faec2.js.map → validation-74fe1552.js.map} +1 -1
- package/dist/kolibri/{a11y.tipps-ba672890.js → a11y.tipps-54065212.js} +1 -1
- package/dist/kolibri/align-a2401a24.js +4 -0
- package/dist/kolibri/{alignment-5e6dbd7f.js → alignment-2171a053.js} +1 -1
- package/dist/kolibri/app-globals-770cf469.js +4 -0
- package/dist/kolibri/aria-current-87734eb8.js +4 -0
- package/dist/kolibri/{associated.controller-d519d4fd.js → associated.controller-a1ec4433.js} +1 -1
- package/dist/kolibri/{color-66412a88.js → color-9cbf6d52.js} +1 -1
- package/dist/kolibri/{controller-0407a8fc.js → controller-23b9e0a2.js} +1 -1
- package/dist/kolibri/controller-8aaf4af5.js +4 -0
- package/dist/kolibri/{controller-4418a153.js.map → controller-8aaf4af5.js.map} +1 -1
- package/dist/kolibri/{controller-4a327464.js → controller-b4428245.js} +1 -1
- package/dist/kolibri/{controller-04e4f9f3.js → controller-b84eace4.js} +1 -1
- package/dist/kolibri/{controller-a2e99cf4.js → controller-d80a67d0.js} +1 -1
- package/dist/kolibri/controller-icon-ef27c916.js +4 -0
- package/dist/kolibri/{custom-class-503e41f2.js → custom-class-833c9c0b.js} +1 -1
- package/dist/kolibri/{dev.utils-aea04f25.js → dev.utils-ad367f40.js} +1 -1
- package/dist/kolibri/{dev.utils-aea04f25.js.map → dev.utils-ad367f40.js.map} +1 -1
- package/dist/kolibri/{devtools-151a8a80.js → devtools-73dc1f39.js} +1 -1
- package/dist/kolibri/has-closer-3f2a115a.js +4 -0
- package/dist/kolibri/hide-label-310fe1b8.js +4 -0
- package/dist/kolibri/{i18n-3c8ef0a3.js → i18n-ad401ed8.js} +1 -1
- package/dist/kolibri/{icons-a05b3daf.js → icons-c28cff87.js} +1 -1
- package/dist/kolibri/image-source-3f04add1.js +4 -0
- package/dist/kolibri/{index-e51de689.js → index-fb9ac195.js} +1 -1
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/index.esm.js.map +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js.map +1 -1
- package/dist/kolibri/kol-alert-wc_3.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js.map +1 -1
- package/dist/kolibri/kol-button.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-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-image.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js.map +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-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio-group.entry.js +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-text.entry.js +1 -1
- package/dist/kolibri/kol-input.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-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-wc.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js.map +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover.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-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-span-wc_2.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-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-textarea.entry.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
- package/dist/kolibri/kol-toast.entry.js +1 -1
- package/dist/kolibri/kol-toast.entry.js.map +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-2cb3f0a1.js → label-57859a5a.js} +1 -1
- package/dist/kolibri/open-29222e31.js +4 -0
- package/dist/kolibri/{prop.validators-7087c1e6.js → prop.validators-251589c8.js} +1 -1
- package/dist/kolibri/rows-c8fb93ae.js +4 -0
- package/dist/kolibri/show-6fddf77c.js +4 -0
- package/dist/kolibri/{suggestions-689ff138.js → suggestions-1e0fe6e9.js} +1 -1
- package/dist/kolibri/{tab-index-4f18f869.js → tab-index-39708fff.js} +1 -1
- package/dist/kolibri/toaster-210e0b2c.js +4 -0
- package/dist/kolibri/toaster-210e0b2c.js.map +1 -0
- package/dist/kolibri/toaster-5d1ee30b.js +4 -0
- package/dist/kolibri/tooltip-align-d0d73d60.js +4 -0
- package/dist/kolibri/{validation-5429f00c.js → validation-3e123430.js} +1 -1
- package/dist/kolibri/validation-74fe1552.js +4 -0
- package/dist/types/components/accordion/component.d.ts +2 -0
- package/dist/types/components/button/shadow.d.ts +0 -1
- package/dist/types/components/button-link/component.d.ts +0 -1
- package/dist/types/components/details/component.d.ts +1 -0
- package/dist/types/components/input-checkbox/component.d.ts +0 -1
- package/dist/types/components/input-radio/component.d.ts +0 -1
- package/dist/types/components/link/shadow.d.ts +0 -1
- package/dist/types/components/link-button/component.d.ts +0 -1
- package/dist/types/components/toast/component.d.ts +18 -4
- package/dist/types/components/toast/toaster.d.ts +14 -3
- package/dist/types/components/toast/types.d.ts +9 -5
- package/dist/types/components/toaster/InternalToast.d.ts +8 -0
- package/dist/types/components/toaster/toaster.d.ts +10 -0
- package/dist/types/components/{toast-container → toaster}/types.d.ts +6 -3
- package/dist/types/components.d.ts +68 -10
- package/dist/types/index.d.ts +1 -1
- package/doc/button.md +1 -1
- package/doc/toast.md +41 -28
- package/doc/toaster.md +103 -0
- package/package.json +1 -1
- package/vscode-custom-data.json +24 -15
- package/dist/cjs/align-4833e7b8.js +0 -4
- package/dist/cjs/aria-current-3574d27e.js +0 -4
- package/dist/cjs/has-closer-ee730a2c.js +0 -4
- package/dist/cjs/hide-label-4f46ef6b.js +0 -4
- package/dist/cjs/image-source-aad3340f.js +0 -4
- package/dist/cjs/open-e9be21cc.js +0 -4
- package/dist/cjs/rows-bb440aec.js +0 -4
- package/dist/cjs/show-9b0c1d00.js +0 -4
- package/dist/cjs/toaster-d370fe6a.js +0 -4
- package/dist/cjs/toaster-d370fe6a.js.map +0 -1
- package/dist/components/component17.js +0 -4
- package/dist/components/component17.js.map +0 -1
- package/dist/esm/toaster-2dda6584.js +0 -4
- package/dist/esm/toaster-2dda6584.js.map +0 -1
- package/dist/esm/validation-906faec2.js +0 -4
- package/dist/kolibri/align-6791f42e.js +0 -4
- package/dist/kolibri/app-globals-25ce2ed6.js +0 -4
- package/dist/kolibri/aria-current-b3fb717c.js +0 -4
- package/dist/kolibri/controller-4418a153.js +0 -4
- package/dist/kolibri/controller-icon-5552f237.js +0 -4
- package/dist/kolibri/has-closer-fe2d4781.js +0 -4
- package/dist/kolibri/hide-label-2e0f24b2.js +0 -4
- package/dist/kolibri/image-source-f838da2a.js +0 -4
- package/dist/kolibri/open-f70592c1.js +0 -4
- package/dist/kolibri/rows-9a9a2940.js +0 -4
- package/dist/kolibri/show-8c3c4865.js +0 -4
- package/dist/kolibri/toaster-1ee75e55.js +0 -4
- package/dist/kolibri/toaster-2dda6584.js +0 -4
- package/dist/kolibri/toaster-2dda6584.js.map +0 -1
- package/dist/kolibri/tooltip-align-b8d9da02.js +0 -4
- package/dist/kolibri/validation-906faec2.js +0 -4
- package/doc/toast-container.md +0 -46
- /package/dist/kolibri/{a11y.tipps-ba672890.js.map → a11y.tipps-54065212.js.map} +0 -0
- /package/dist/kolibri/{align-6791f42e.js.map → align-a2401a24.js.map} +0 -0
- /package/dist/kolibri/{alignment-5e6dbd7f.js.map → alignment-2171a053.js.map} +0 -0
- /package/dist/kolibri/{app-globals-25ce2ed6.js.map → app-globals-770cf469.js.map} +0 -0
- /package/dist/kolibri/{aria-current-b3fb717c.js.map → aria-current-87734eb8.js.map} +0 -0
- /package/dist/kolibri/{associated.controller-d519d4fd.js.map → associated.controller-a1ec4433.js.map} +0 -0
- /package/dist/kolibri/{color-66412a88.js.map → color-9cbf6d52.js.map} +0 -0
- /package/dist/kolibri/{controller-0407a8fc.js.map → controller-23b9e0a2.js.map} +0 -0
- /package/dist/kolibri/{controller-4a327464.js.map → controller-b4428245.js.map} +0 -0
- /package/dist/kolibri/{controller-04e4f9f3.js.map → controller-b84eace4.js.map} +0 -0
- /package/dist/kolibri/{controller-a2e99cf4.js.map → controller-d80a67d0.js.map} +0 -0
- /package/dist/kolibri/{controller-icon-5552f237.js.map → controller-icon-ef27c916.js.map} +0 -0
- /package/dist/kolibri/{custom-class-503e41f2.js.map → custom-class-833c9c0b.js.map} +0 -0
- /package/dist/kolibri/{devtools-151a8a80.js.map → devtools-73dc1f39.js.map} +0 -0
- /package/dist/kolibri/{has-closer-fe2d4781.js.map → has-closer-3f2a115a.js.map} +0 -0
- /package/dist/kolibri/{hide-label-2e0f24b2.js.map → hide-label-310fe1b8.js.map} +0 -0
- /package/dist/kolibri/{i18n-3c8ef0a3.js.map → i18n-ad401ed8.js.map} +0 -0
- /package/dist/kolibri/{icons-a05b3daf.js.map → icons-c28cff87.js.map} +0 -0
- /package/dist/kolibri/{image-source-f838da2a.js.map → image-source-3f04add1.js.map} +0 -0
- /package/dist/kolibri/{index-e51de689.js.map → index-fb9ac195.js.map} +0 -0
- /package/dist/kolibri/{label-2cb3f0a1.js.map → label-57859a5a.js.map} +0 -0
- /package/dist/kolibri/{open-f70592c1.js.map → open-29222e31.js.map} +0 -0
- /package/dist/kolibri/{prop.validators-7087c1e6.js.map → prop.validators-251589c8.js.map} +0 -0
- /package/dist/kolibri/{rows-9a9a2940.js.map → rows-c8fb93ae.js.map} +0 -0
- /package/dist/kolibri/{show-8c3c4865.js.map → show-6fddf77c.js.map} +0 -0
- /package/dist/kolibri/{suggestions-689ff138.js.map → suggestions-1e0fe6e9.js.map} +0 -0
- /package/dist/kolibri/{tab-index-4f18f869.js.map → tab-index-39708fff.js.map} +0 -0
- /package/dist/kolibri/{toaster-1ee75e55.js.map → toaster-5d1ee30b.js.map} +0 -0
- /package/dist/kolibri/{tooltip-align-b8d9da02.js.map → tooltip-align-d0d73d60.js.map} +0 -0
- /package/dist/kolibri/{validation-5429f00c.js.map → validation-3e123430.js.map} +0 -0
- /package/dist/kolibri/{validation-906faec2.js.map → validation-74fe1552.js.map} +0 -0
- /package/dist/types/components/{toast-container → toaster}/component.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,H as e,r as i,g as a}from"./index-536799d5.js";import{n as s}from"./dev.utils-
|
|
4
|
+
import{h as t,H as e,r as i,g as a}from"./index-536799d5.js";import{n as s}from"./dev.utils-ad367f40.js";import{s as n,t as l}from"./events-2bb1065b.js";import{a as o,s as r}from"./reuse-b3566e4c.js";import{v as d,g as h}from"./controller-8aaf4af5.js";import{a as p}from"./a11y.tipps-54065212.js";import{d as u,a as c}from"./prop.validators-251589c8.js";import{I as f}from"./controller-icon-ef27c916.js";import"./hide-label-310fe1b8.js";import"./label-57859a5a.js";import"./tab-index-39708fff.js";import"./associated.controller-a1ec4433.js";import"./index-3822b0c5.js";import"./icons-c28cff87.js";class m extends f{constructor(t,e,i){super(t,e,i),this.component=t}validateAccept(t){u(this.component,"_accept",t)}validateHideError(t){d(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&p("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateMultiple(t){c(this.component,"_multiple",t)}validateRequired(t){c(this.component,"_required",t)}validateValue(t){u(this.component,"_value",t),this.setFormAssociatedValue(this.component._value)}componentWillLoad(){super.componentWillLoad(),this.validateAccept(this.component._accept),this.validateHideError(this.component._hideError),this.validateMultiple(this.component._multiple),this.validateRequired(this.component._required),this.validateValue(this.component._value)}}const v=":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}.required label>span::after,.required legend>span::after{content:'*'}:host{display:block}input,textarea{cursor:text}input[type='checkbox'],input[type='color'],input[type='file'],input[type='radio'],input[type='range'],label,option,select{cursor:pointer}input[type='color'],input[type='date'],input[type='datetime-local'],input[type='email'],input[type='file'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='time'],input[type='url'],input[type='week'],select,select[multiple] option,textarea{font-size:1rem;width:100%}input[type='file']{padding:calc((var(--a11y-min-size) - 1rem) / 10) 0.5em}select[multiple] option{padding:calc((var(--a11y-min-size) - 1rem) / 2) 0.5em}kol-input.disabled :is(button,input,label,option,select,textarea){cursor:not-allowed;opacity:0.5}kol-input{display:grid}kol-input .input-slot{flex-grow:1}input:not([type='checkbox'],[type='radio']),select:not([multiple],[size]){height:2.75em}input:focus,option:focus,select:focus,textarea:focus{outline:0}.input{display:flex;align-items:center}.input>kol-icon{display:grid;height:var(--a11y-min-size);place-items:center}kol-input.required .input-tooltip .span-label::after{content:'*'}label input[type='file']::-webkit-file-upload-button{display:none}label input[type='file']:before{content:'Datei auswählen'}label input[multiple]:before{content:'Dateien auswählen'}div.input{cursor:pointer}.error.hidden{display:none}",b=class{render(){const{ariaDescribedBy:i}=h(this.state),a=r(this.state._label);return t(e,null,t("kol-input",{class:{file:!0,"hide-label":!!this.state._hideLabel},_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},t("span",{slot:"label"},a?t("slot",null):this.state._label),t("div",{slot:"input"},t("input",Object.assign({ref:this.catchRef,title:"",accept:this.state._accept,accessKey:this.state._accessKey,"aria-describedby":i.length>0?i.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,multiple:this.state._multiple,name:this.state._name,required:this.state._required,spellcheck:"false",type:"file",value:this.state._value},this.controller.onFacade,{onChange:this.onChange})))))}constructor(t){i(this,t),this.catchRef=t=>{this.ref=t,o(this.host,this.ref)},this.onChange=t=>{var e;if(this.ref instanceof HTMLInputElement&&"file"===this.ref.type){const i=this.ref.files;n(t),l("change",this.host,i),this.controller.setFormAssociatedValue(i),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onChange)&&this.state._on.onChange(t,i)}},this._accept=void 0,this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,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._multiple=!1,this._name=void 0,this._on=void 0,this._required=!1,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hideError:!1,_id:`id-${s()}`,_label:""},this.controller=new m(this,"input-file",this.host)}validateAccept(t){this.controller.validateAccept(t)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMultiple(t){this.controller.validateMultiple(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return a(this)}static get watchers(){return{_accept:["validateAccept"],_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icon:["validateIcon"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_multiple:["validateMultiple"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};b.style={default:v};export{b as kol_input_file};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,H as e,r as i,g as s}from"./index-536799d5.js";import{n as a}from"./dev.utils-aea04f25.js";import{a as n,s as l}from"./reuse-b3566e4c.js";import{p as o}from"./controller-0407a8fc.js";import{v as d,g as r}from"./controller-4418a153.js";import{v as h}from"./suggestions-689ff138.js";import{a as p}from"./a11y.tipps-ba672890.js";import{w as u,d as c,a as f,e as m}from"./prop.validators-7087c1e6.js";import{I as v}from"./controller-icon-5552f237.js";import"./hide-label-2e0f24b2.js";import"./label-2cb3f0a1.js";import"./events-2bb1065b.js";import"./tab-index-4f18f869.js";import"./associated.controller-d519d4fd.js";import"./index-3822b0c5.js";import"./icons-a05b3daf.js";class y extends v{constructor(t,e,i){super(t,e,i),this.numberOrIsoDateRegex=/^\d+$|(^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])([T ][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?([+-][0-2]\d:[0-5]\d|Z)?)?$)|(^[0-2]\d:[0-5]\d(:[0-5]\d)?$)/,this.parseToString=t=>"string"==typeof t?t:"number"==typeof t?`${t}`:"object"==typeof t&&t instanceof Date?t.toISOString():"",this.validateIso8601=(t,e,i)=>{const a=parseFloat(e),s=a==e;return u(this.component,t,(t=>void 0===t||""===t||s&&"number"==typeof a||this.numberOrIsoDateRegex.test(t)),new Set(["number","Date","string{ISO-8601}"]),this.parseToString(e),{hooks:{afterPatch:t=>{"string"==typeof t&&i&&i(t)}}})},this.component=t}validateAutoComplete(t){u(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHideError(t){d(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&p("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateList(){}validateSuggestions(t){h(this.component,t)}onChange(t){super.onChange(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){this.validateIso8601("_max",t)}validateMin(t){this.validateIso8601("_min",t)}validatePlaceholder(t){c(this.component,"_placeholder",t)}validateReadOnly(t){f(this.component,"_readOnly",t)}validateRequired(t){f(this.component,"_required",t)}validateStep(t){m(this.component,"_step",t)}validateType(t){u(this.component,"_type",(t=>"string"==typeof t&&("date"===t||"datetime-local"===t||"month"===t||"number"===t||"time"===t||"week"===t)),new Set(["String {date, datetime-local, month, number, time, week}"]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHideError(this.component._hideError),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions||this.component._list),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}const b=":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}.required label>span::after,.required legend>span::after{content:'*'}:host{display:block}input,textarea{cursor:text}input[type='checkbox'],input[type='color'],input[type='file'],input[type='radio'],input[type='range'],label,option,select{cursor:pointer}input[type='color'],input[type='date'],input[type='datetime-local'],input[type='email'],input[type='file'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='time'],input[type='url'],input[type='week'],select,select[multiple] option,textarea{font-size:1rem;width:100%}input[type='file']{padding:calc((var(--a11y-min-size) - 1rem) / 10) 0.5em}select[multiple] option{padding:calc((var(--a11y-min-size) - 1rem) / 2) 0.5em}kol-input.disabled :is(button,input,label,option,select,textarea){cursor:not-allowed;opacity:0.5}kol-input{display:grid}kol-input .input-slot{flex-grow:1}input:not([type='checkbox'],[type='radio']),select:not([multiple],[size]){height:2.75em}input:focus,option:focus,select:focus,textarea:focus{outline:0}.input{display:flex;align-items:center}.input>kol-icon{display:grid;height:var(--a11y-min-size);place-items:center}kol-input.required .input-tooltip .span-label::after{content:'*'}.error.hidden{display:none}",_=class{render(){const{ariaDescribedBy:i}=r(this.state),a=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,s=l(this.state._label);return t(e,{class:{"has-value":this.state._hasValue}},t("kol-input",{class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},t("span",{slot:"label"},s?t("slot",null):this.state._label),t("div",{slot:"input"},t("input",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":i.length>0?i.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:a?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,placeholder:this.state._placeholder,step:this.state._step,spellcheck:"false",type:this.state._type,value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(t){i(this,t),this.catchRef=t=>{this.ref=t,n(this.host,this.ref)},this.onKeyUp=t=>{"Enter"===t.code?o({form:this.host,ref:this.ref}):this.controller.onFacade.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,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._list=void 0,this._max=void 0,this._min=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="number",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${a()}`,_label:"",_suggestions:[],_type:"number"},this.controller=new y(this,"input-number",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateList(t){this.validateSuggestions(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValueEx(t,(t=>{""===t&&this.ref&&(this.ref.value="")}))}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}get host(){return s(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icon:["validateIcon"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_list:["validateList"],_max:["validateMax"],_min:["validateMin"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};_.style={default:b};export{_ as kol_input_number};
|
|
4
|
+
import{h as t,H as e,r as i,g as s}from"./index-536799d5.js";import{n as a}from"./dev.utils-ad367f40.js";import{a as n,s as l}from"./reuse-b3566e4c.js";import{p as o}from"./controller-23b9e0a2.js";import{v as d,g as r}from"./controller-8aaf4af5.js";import{v as h}from"./suggestions-1e0fe6e9.js";import{a as p}from"./a11y.tipps-54065212.js";import{w as u,d as c,a as f,e as m}from"./prop.validators-251589c8.js";import{I as v}from"./controller-icon-ef27c916.js";import"./hide-label-310fe1b8.js";import"./label-57859a5a.js";import"./events-2bb1065b.js";import"./tab-index-39708fff.js";import"./associated.controller-a1ec4433.js";import"./index-3822b0c5.js";import"./icons-c28cff87.js";class y extends v{constructor(t,e,i){super(t,e,i),this.numberOrIsoDateRegex=/^\d+$|(^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])([T ][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?([+-][0-2]\d:[0-5]\d|Z)?)?$)|(^[0-2]\d:[0-5]\d(:[0-5]\d)?$)/,this.parseToString=t=>"string"==typeof t?t:"number"==typeof t?`${t}`:"object"==typeof t&&t instanceof Date?t.toISOString():"",this.validateIso8601=(t,e,i)=>{const a=parseFloat(e),s=a==e;return u(this.component,t,(t=>void 0===t||""===t||s&&"number"==typeof a||this.numberOrIsoDateRegex.test(t)),new Set(["number","Date","string{ISO-8601}"]),this.parseToString(e),{hooks:{afterPatch:t=>{"string"==typeof t&&i&&i(t)}}})},this.component=t}validateAutoComplete(t){u(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHideError(t){d(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&p("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateList(){}validateSuggestions(t){h(this.component,t)}onChange(t){super.onChange(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){this.validateIso8601("_max",t)}validateMin(t){this.validateIso8601("_min",t)}validatePlaceholder(t){c(this.component,"_placeholder",t)}validateReadOnly(t){f(this.component,"_readOnly",t)}validateRequired(t){f(this.component,"_required",t)}validateStep(t){m(this.component,"_step",t)}validateType(t){u(this.component,"_type",(t=>"string"==typeof t&&("date"===t||"datetime-local"===t||"month"===t||"number"===t||"time"===t||"week"===t)),new Set(["String {date, datetime-local, month, number, time, week}"]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHideError(this.component._hideError),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateSuggestions(this.component._suggestions||this.component._list),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}const b=":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}.required label>span::after,.required legend>span::after{content:'*'}:host{display:block}input,textarea{cursor:text}input[type='checkbox'],input[type='color'],input[type='file'],input[type='radio'],input[type='range'],label,option,select{cursor:pointer}input[type='color'],input[type='date'],input[type='datetime-local'],input[type='email'],input[type='file'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='time'],input[type='url'],input[type='week'],select,select[multiple] option,textarea{font-size:1rem;width:100%}input[type='file']{padding:calc((var(--a11y-min-size) - 1rem) / 10) 0.5em}select[multiple] option{padding:calc((var(--a11y-min-size) - 1rem) / 2) 0.5em}kol-input.disabled :is(button,input,label,option,select,textarea){cursor:not-allowed;opacity:0.5}kol-input{display:grid}kol-input .input-slot{flex-grow:1}input:not([type='checkbox'],[type='radio']),select:not([multiple],[size]){height:2.75em}input:focus,option:focus,select:focus,textarea:focus{outline:0}.input{display:flex;align-items:center}.input>kol-icon{display:grid;height:var(--a11y-min-size);place-items:center}kol-input.required .input-tooltip .span-label::after{content:'*'}.error.hidden{display:none}",_=class{render(){const{ariaDescribedBy:i}=r(this.state),a=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,s=l(this.state._label);return t(e,{class:{"has-value":this.state._hasValue}},t("kol-input",{class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},t("span",{slot:"label"},s?t("slot",null):this.state._label),t("div",{slot:"input"},t("input",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":i.length>0?i.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:a?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name,readOnly:this.state._readOnly,required:this.state._required,placeholder:this.state._placeholder,step:this.state._step,spellcheck:"false",type:this.state._type,value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(t){i(this,t),this.catchRef=t=>{this.ref=t,n(this.host,this.ref)},this.onKeyUp=t=>{"Enter"===t.code?o({form:this.host,ref:this.ref}):this.controller.onFacade.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,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._list=void 0,this._max=void 0,this._min=void 0,this._name=void 0,this._on=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._smartButton=void 0,this._suggestions=void 0,this._step=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="number",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${a()}`,_label:"",_suggestions:[],_type:"number"},this.controller=new y(this,"input-number",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateList(t){this.validateSuggestions(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValueEx(t,(t=>{""===t&&this.ref&&(this.ref.value="")}))}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}get host(){return s(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icon:["validateIcon"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_list:["validateList"],_max:["validateMax"],_min:["validateMin"],_name:["validateName"],_on:["validateOn"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};_.style={default:b};export{_ as kol_input_number};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,H as e,r as i,g as a}from"./index-536799d5.js";import{d as s}from"./a11y.tipps-
|
|
4
|
+
import{h as t,H as e,r as i,g as a}from"./index-536799d5.js";import{d as s}from"./a11y.tipps-54065212.js";import{n}from"./dev.utils-ad367f40.js";import{s as l}from"./prop.validators-251589c8.js";import{a as o,s as r}from"./reuse-b3566e4c.js";import{p as d}from"./controller-23b9e0a2.js";import{g as h}from"./controller-8aaf4af5.js";import{I as p}from"./controller-d80a67d0.js";import"./index-3822b0c5.js";import"./hide-label-310fe1b8.js";import"./label-57859a5a.js";import"./events-2bb1065b.js";import"./tab-index-39708fff.js";import"./associated.controller-a1ec4433.js";import"./controller-icon-ef27c916.js";import"./icons-c28cff87.js";const u=":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}.required label>span::after,.required legend>span::after{content:'*'}:host{display:block}input,textarea{cursor:text}input[type='checkbox'],input[type='color'],input[type='file'],input[type='radio'],input[type='range'],label,option,select{cursor:pointer}input[type='color'],input[type='date'],input[type='datetime-local'],input[type='email'],input[type='file'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='time'],input[type='url'],input[type='week'],select,select[multiple] option,textarea{font-size:1rem;width:100%}input[type='file']{padding:calc((var(--a11y-min-size) - 1rem) / 10) 0.5em}select[multiple] option{padding:calc((var(--a11y-min-size) - 1rem) / 2) 0.5em}kol-input.disabled :is(button,input,label,option,select,textarea){cursor:not-allowed;opacity:0.5}kol-input{display:grid}kol-input .input-slot{flex-grow:1}input:not([type='checkbox'],[type='radio']),select:not([multiple],[size]){height:2.75em}input:focus,option:focus,select:focus,textarea:focus{outline:0}.input{display:flex;align-items:center}.input>kol-icon{display:grid;height:var(--a11y-min-size);place-items:center}kol-input.required .input-tooltip .span-label::after{content:'*'}.error.hidden{display:none}",c=class{render(){const{ariaDescribedBy:a}=h(this.state),i=r(this.state._label);return t(e,{class:{"has-value":this.state._hasValue}},t("kol-input",{class:{"hide-label":!!this.state._hideLabel,password:!0},_currentLength:this.state._currentLength,_disabled:this.state._disabled,_error:this.state._error,_hasCounter:this.state._hasCounter,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},t("span",{slot:"label"},i?t("slot",null):this.state._label),t("div",{slot:"input"},t("input",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":a.length>0?a.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,size:this.state._size,spellcheck:"false",type:"password",value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(t){i(this,t),this.catchRef=t=>{this.ref=t,o(this.host,this.ref)},this.onKeyUp=t=>{l(this,"_currentLength",t.target.value.length),"Enter"===t.code?d({form:this.host,ref:this.ref}):this.controller.onFacade.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,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._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._size=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${n()}`,_label:""},this.controller=new p(this,"input-password",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t),"on"===t&&s("[KolInputPassword] Die Option 'autocomplete' sollte bei einem Passwort-Eingabefeld nicht auf \"on\" gesetzt werden.")}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSize(t){this.controller.validateSize(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}get host(){return a(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icon:["validateIcon"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_size:["validateSize"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};c.style={default:u};export{c as kol_input_password};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as i,h as e}from"./index-536799d5.js";import{e as t}from"./a11y.tipps-
|
|
4
|
+
import{r as i,h as e}from"./index-536799d5.js";import{e as t}from"./a11y.tipps-54065212.js";import"./dev.utils-ad367f40.js";import"./reuse-b3566e4c.js";const s=class{constructor(t){i(this,t),this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._list=void 0,this._name=void 0,this._on=void 0,this._orientation="vertical",this._required=!1,this._tabIndex=void 0,this._touched=!1,this._value=void 0}render(){return t("[KolInputRadioGroup] Die Komponenten Input-Radio-Group und Input-Radio werden zur Komponente Input-Radio zusammengeführt. Wir empfehlen den Tag <kol-input-radio> statt <kol-input-radio-group> zu verwenden.\n\nMit der Version 1.1 wird die Komponente KolInputRadioGroup aus der Bibliothek entfernt."),e("kol-input-radio",{_accessKey:this._accessKey,_disabled:this._disabled,_error:this._error,_hideLabel:this._hideLabel,_id:this._id,_label:this._label,_list:this._list,_name:this._name,_on:this._on,_orientation:this._orientation,_required:this._required,_tabIndex:this._tabIndex,_touched:this._touched,_value:this._value},e("slot",null))}};export{s as kol_input_radio_group};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,H as i,r as t,g as a}from"./index-536799d5.js";import{n as s}from"./dev.utils-
|
|
4
|
+
import{h as e,H as i,r as t,g as a}from"./index-536799d5.js";import{n as s}from"./dev.utils-ad367f40.js";import{s as n,t as r}from"./events-2bb1065b.js";import{a as l,s as d}from"./reuse-b3566e4c.js";import{g as o}from"./controller-8aaf4af5.js";import{a as h}from"./controller-b4428245.js";import"./prop.validators-251589c8.js";import"./a11y.tipps-54065212.js";import"./index-3822b0c5.js";import"./hide-label-310fe1b8.js";import"./label-57859a5a.js";import"./tab-index-39708fff.js";import"./associated.controller-a1ec4433.js";const p=":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}.required label>span::after,.required legend>span::after{content:'*'}:host{display:block}input,textarea{cursor:text}input[type='checkbox'],input[type='color'],input[type='file'],input[type='radio'],input[type='range'],label,option,select{cursor:pointer}input[type='color'],input[type='date'],input[type='datetime-local'],input[type='email'],input[type='file'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='time'],input[type='url'],input[type='week'],select,select[multiple] option,textarea{font-size:1rem;width:100%}input[type='file']{padding:calc((var(--a11y-min-size) - 1rem) / 10) 0.5em}select[multiple] option{padding:calc((var(--a11y-min-size) - 1rem) / 2) 0.5em}kol-input.disabled :is(button,input,label,option,select,textarea){cursor:not-allowed;opacity:0.5}:host{--border-width:2px;--input-size:1.5em}kol-input .icons{display:none}label{cursor:pointer}input{appearance:none;border-width:var(--border-width);border-style:solid;border-radius:100%;cursor:pointer;display:flex;height:var(--input-size);margin:0;min-height:var(--input-size);min-width:var(--input-size);padding:0;width:var(--input-size)}input:before{border-radius:100%;content:'';margin:auto;height:calc(var(--input-size) / 2);width:calc(var(--input-size) / 2)}input:checked:before{background-color:#000}fieldset{display:flex}fieldset.vertical{flex-direction:column}fieldset .input-slot{align-items:center;display:flex}.required label>span::after{content:''}.error.hidden{display:none}",u=class{render(){const{ariaDescribedBy:t,hasError:a}=o(this.state),l=d(this.state._label);return e(i,null,e("fieldset",{class:{disabled:!0===this.state._disabled,error:!0===a,required:!0===this.state._required,"hidden-error":!0===this._hideError,[this.state._orientation]:!0}},e("legend",{class:"block w-full mb-1 leading-normal"},e("span",null,e("span",{slot:"label"},l?e("slot",null):this.state._label))),this.state._options.map(((i,a)=>{const l=`${this.state._id}-${a}`,r=`radio-${a}`;return e("kol-input",{class:"radio",key:l,_disabled:this.state._disabled||i.disabled,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_id:l,_label:i.label,_renderNoLabel:!0,_required:this.state._required,_slotName:r,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},e("div",{slot:r,class:"radio-input-wrapper"},e("input",Object.assign({ref:this.state._value===i.value?this.catchRef:void 0,title:"",accessKey:this.state._accessKey,"aria-describedby":t.length>0?t.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof i.label?i.label:void 0,type:"radio",id:l,checked:this.state._value===i.value,name:this.state._name||this.state._id,disabled:this.state._disabled||i.disabled,required:this.state._required,tabIndex:this.state._tabIndex,value:`-${a}`},this.controller.onFacade,{onChange:this.onChange,onClick:void 0})),e("label",{class:"radio-label",htmlFor:`${l}`,style:{height:this.state._hideLabel?"0":void 0,margin:this.state._hideLabel?"0":void 0,padding:this.state._hideLabel?"0":void 0,visibility:this.state._hideLabel?"hidden":void 0}},e("span",null,e("span",null,i.label)))))})),a&&e("kol-alert",{id:"error",_alert:!0,_type:"error",_variant:"msg","aria-hidden":this._hideError,class:"error"+(this._hideError?" hidden":"")},this.state._error)))}constructor(e){t(this,e),this.catchRef=e=>{l(this.host,e)},this.onChange=e=>{var t;if(e.target instanceof HTMLInputElement){const i=this.controller.getOptionByKey(e.target.value);void 0!==i&&(n(e),r("change",this.host,i.value),this.controller.setFormAssociatedValue(i.value),"function"==typeof(null===(t=this.state._on)||void 0===t?void 0:t.onChange)&&this.state._on.onChange(e,i.value),this.controller.setValue(e,i.value))}},this._accessKey=void 0,this._alert=!0,this._disabled=!1,this._error=void 0,this._hideError=!1,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._list=void 0,this._name=void 0,this._on=void 0,this._options=void 0,this._orientation="vertical",this._required=!1,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_hideError:!1,_id:`id-${s()}`,_label:"",_options:[],_orientation:"vertical"},this.controller=new h(this,"input-radio",this.host)}validateAccessKey(e){this.controller.validateAccessKey(e)}validateAlert(e){this.controller.validateAlert(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateError(e){this.controller.validateError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHideError(e){this.controller.validateHideError(e)}validateHint(e){this.controller.validateHint(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateList(e){this.validateOptions(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateOrientation(e){this.controller.validateOrientation(e)}validateRequired(e){this.controller.validateRequired(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad(this.onChange)}get host(){return a(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_disabled:["validateDisabled"],_error:["validateError"],_hideLabel:["validateHideLabel"],_hideError:["validateHideError"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_list:["validateList"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};u.style={default:p};export{u as kol_input_radio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultStyleCss","KolInputRadio","render","ariaDescribedBy","hasError","getRenderStates","this","state","hasExpertSlot","showExpertSlot","_label","h","Host","class","disabled","_disabled","error","required","_required","_hideError","_orientation","slot","_options","map","option","index","customId","_id","slotName","key","_hideLabel","_hint","label","_renderNoLabel","_slotName","_tooltipAlign","_touched","Object","assign","ref","_value","value","catchRef","undefined","title","accessKey","_accessKey","length","join","type","id","checked","name","_name","tabIndex","_tabIndex","controller","onFacade","onChange","onClick","htmlFor","style","height","margin","padding","visibility","_alert","_type","_variant","_error","constructor","hostRef","propagateFocus","host","event","target","HTMLInputElement","getOptionByKey","stopPropagation","tryToDispatchKoliBriEvent","setFormAssociatedValue","_a","_on","setValue","nonce","InputRadioController","validateAccessKey","validateAlert","validateDisabled","validateError","validateHideLabel","validateHideError","validateHint","validateId","validateLabel","validateList","validateOptions","validateName","validateOn","validateOrientation","validateRequired","validateSyncValueBySelector","validateTabIndex","validateTouched","validateValue","componentWillLoad"],"sources":["src/components/input-radio/style.css?tag=kol-input-radio&mode=default&encapsulation=shadow","src/components/input-radio/component.tsx"],"sourcesContent":["@import url(../input.css);\n:host {\n\t--border-width: 2px;\n\t--input-size: 1.5em;\n}\nkol-input .icons {\n\tdisplay: none;\n}\nlabel {\n\tcursor: pointer;\n}\ninput {\n\tappearance: none;\n\tborder-width: var(--border-width);\n\tborder-style: solid;\n\tborder-radius: 100%;\n\tcursor: pointer;\n\tdisplay: flex;\n\theight: var(--input-size);\n\tmargin: 0;\n\tmin-height: var(--input-size);\n\tmin-width: var(--input-size);\n\tpadding: 0;\n\twidth: var(--input-size);\n}\ninput:before {\n\tborder-radius: 100%;\n\tcontent: '';\n\tmargin: auto;\n\theight: calc(var(--input-size) / 2);\n\twidth: calc(var(--input-size) / 2);\n}\ninput:checked:before {\n\tbackground-color: #000;\n}\nfieldset {\n\tdisplay: flex;\n}\nfieldset.vertical {\n\tflex-direction: column;\n}\nfieldset .input-slot {\n\talign-items: center;\n\tdisplay: flex;\n}\n/* required star is on fieldset legend */\n.required label > span::after {\n\tcontent: '';\n}\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 { InputTypeOnDefault, Option } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\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 { OptionsPropType } from '../../types/props/options';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { W3CInputValue } from '../../types/w3c';\nimport { nonce } from '../../utils/dev.utils';\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { getRenderStates } from '../input/controller';\nimport { InputRadioController } from './controller';\nimport { API, States } from './types';\n\n/**\n * @slot - Die Legende/Überschrift der Radiobuttons.\n */\n@Component({\n\ttag: 'kol-input-radio',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolInputRadio implements API {\n\t@Element() private readonly host?: HTMLKolInputRadioElement;\n\tprivate ref?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.ref = ref;\n\t\tpropagateFocus(this.host, this.ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy, hasError } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<fieldset\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tdisabled: this.state._disabled === true,\n\t\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t\trequired: this.state._required === true,\n\t\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t\t\t[this.state._orientation]: true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<legend class=\"block w-full mb-1 leading-normal\">\n\t\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\t<span>\n\t\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t\t{/* TODO: der folgende Slot ohne Name muss später entfernt werden */}\n\t\t\t\t\t\t\t<span slot=\"label\">{hasExpertSlot ? <slot></slot> : this.state._label}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</legend>\n\t\t\t\t\t{this.state._options.map((option, index) => {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Damit der Value einer Option ein beliebigen Typ haben kann\n\t\t\t\t\t\t * muss man auf HTML-Ebene den Value auf einen String-Wert\n\t\t\t\t\t\t * mappen. Das tun wir mittels der Map.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tconst customId = `${this.state._id}-${index}`;\n\t\t\t\t\t\tconst slotName = `radio-${index}`;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<kol-input\n\t\t\t\t\t\t\t\tclass=\"radio\"\n\t\t\t\t\t\t\t\tkey={customId}\n\t\t\t\t\t\t\t\t_disabled={this.state._disabled || option.disabled}\n\t\t\t\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t\t\t\t_id={customId}\n\t\t\t\t\t\t\t\t_label={option.label as string}\n\t\t\t\t\t\t\t\t_renderNoLabel={true}\n\t\t\t\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t\t\t\t_slotName={slotName}\n\t\t\t\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div slot={slotName} class=\"radio-input-wrapper\">\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tref={this.state._value === option.value ? this.catchRef : undefined}\n\t\t\t\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\t\t\t\taccessKey={this.state._accessKey} // by radio?!\n\t\t\t\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof option.label === 'string' ? option.label : undefined}\n\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\tid={customId}\n\t\t\t\t\t\t\t\t\t\tchecked={this.state._value === option.value}\n\t\t\t\t\t\t\t\t\t\tname={this.state._name || this.state._id}\n\t\t\t\t\t\t\t\t\t\tdisabled={this.state._disabled || option.disabled}\n\t\t\t\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\t\t\t\t\t\tvalue={`-${index}`}\n\t\t\t\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\t\t\t\t\tonClick={undefined} // onClick is not needed since onChange already triggers the correct event\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\tclass=\"radio-label\"\n\t\t\t\t\t\t\t\t\t\thtmlFor={`${customId}`}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\theight: this.state._hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\t\t\t\t\tmargin: this.state._hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\t\t\t\t\tpadding: this.state._hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\t\t\t\t\tvisibility: this.state._hideLabel ? 'hidden' : undefined,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{option.label}</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</kol-input>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t\t{hasError && (\n\t\t\t\t\t\t<kol-alert id=\"error\" _alert={true} _type=\"error\" _variant=\"msg\" aria-hidden={this._hideError} class={`error${this._hideError ? ' hidden' : ''}`}>\n\t\t\t\t\t\t\t{this.state._error}\n\t\t\t\t\t\t</kol-alert>\n\t\t\t\t\t)}\n\t\t\t\t</fieldset>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputRadioController;\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 */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\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 * 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 * 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 Optionen für das Eingabefeld an.\n\t * @deprecated Use _options.\n\t */\n\t@Prop() public _list?: Stringified<Option<W3CInputValue>[]>;\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 * Options the user can choose from.\n\t */\n\t@Prop() public _options?: OptionsPropType;\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/**\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 * 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 the value of the input.\n\t * @see Known bug: https://github.com/ionic-team/stencil/issues/3902\n\t */\n\t@Prop() public _value?: Stringified<W3CInputValue>;\n\n\t@State() public state: States = {\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_options: [],\n\t\t_orientation: 'vertical',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new InputRadioController(this, 'input-radio', 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?: boolean): void {\n\t\tthis.controller.validateAlert(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('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(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('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(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?: Stringified<Option<W3CInputValue>[]>): void {\n\t\tthis.validateOptions(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('_options')\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tthis.controller.validateOptions(value);\n\t}\n\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\tthis.controller.validateOrientation(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@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('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): 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.controller.componentWillLoad(this.onChange);\n\t}\n\n\tprivate onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tconst option = this.controller.getOptionByKey(event.target.value);\n\t\t\tif (option !== undefined) {\n\t\t\t\t// Event handling\n\t\t\t\tstopPropagation(event);\n\t\t\t\ttryToDispatchKoliBriEvent('change', this.host, option.value);\n\n\t\t\t\t// Static form handling\n\t\t\t\tthis.controller.setFormAssociatedValue(option.value);\n\n\t\t\t\t// Callback\n\t\t\t\tif (typeof this.state._on?.onChange === 'function') {\n\t\t\t\t\tthis.state._on.onChange(event, option.value);\n\t\t\t\t}\n\n\t\t\t\t// TODO: Prüfen, was setValue noch genau macht, wir syncValue ja jetzt.\n\t\t\t\tthis.controller.setValue(event, option.value as string); // TODO: fix type\n\t\t\t}\n\t\t}\n\t};\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"names":["defaultStyleCss","KolInputRadio","render","ariaDescribedBy","hasError","getRenderStates","this","state","hasExpertSlot","showExpertSlot","_label","h","Host","class","disabled","_disabled","error","required","_required","_hideError","_orientation","slot","_options","map","option","index","customId","_id","slotName","key","_hideLabel","_hint","label","_renderNoLabel","_slotName","_tooltipAlign","_touched","Object","assign","ref","_value","value","catchRef","undefined","title","accessKey","_accessKey","length","join","type","id","checked","name","_name","tabIndex","_tabIndex","controller","onFacade","onChange","onClick","htmlFor","style","height","margin","padding","visibility","_alert","_type","_variant","_error","constructor","hostRef","propagateFocus","host","event","target","HTMLInputElement","getOptionByKey","stopPropagation","tryToDispatchKoliBriEvent","setFormAssociatedValue","_a","_on","setValue","nonce","InputRadioController","validateAccessKey","validateAlert","validateDisabled","validateError","validateHideLabel","validateHideError","validateHint","validateId","validateLabel","validateList","validateOptions","validateName","validateOn","validateOrientation","validateRequired","validateSyncValueBySelector","validateTabIndex","validateTouched","validateValue","componentWillLoad"],"sources":["src/components/input-radio/style.css?tag=kol-input-radio&mode=default&encapsulation=shadow","src/components/input-radio/component.tsx"],"sourcesContent":["@import url(../input.css);\n:host {\n\t--border-width: 2px;\n\t--input-size: 1.5em;\n}\nkol-input .icons {\n\tdisplay: none;\n}\nlabel {\n\tcursor: pointer;\n}\ninput {\n\tappearance: none;\n\tborder-width: var(--border-width);\n\tborder-style: solid;\n\tborder-radius: 100%;\n\tcursor: pointer;\n\tdisplay: flex;\n\theight: var(--input-size);\n\tmargin: 0;\n\tmin-height: var(--input-size);\n\tmin-width: var(--input-size);\n\tpadding: 0;\n\twidth: var(--input-size);\n}\ninput:before {\n\tborder-radius: 100%;\n\tcontent: '';\n\tmargin: auto;\n\theight: calc(var(--input-size) / 2);\n\twidth: calc(var(--input-size) / 2);\n}\ninput:checked:before {\n\tbackground-color: #000;\n}\nfieldset {\n\tdisplay: flex;\n}\nfieldset.vertical {\n\tflex-direction: column;\n}\nfieldset .input-slot {\n\talign-items: center;\n\tdisplay: flex;\n}\n/* required star is on fieldset legend */\n.required label > span::after {\n\tcontent: '';\n}\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 { InputTypeOnDefault, Option } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\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 { OptionsPropType } from '../../types/props/options';\nimport { SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { TooltipAlignPropType } from '../../types/props/tooltip-align';\nimport { StencilUnknown } from '../../types/unknown';\nimport { W3CInputValue } from '../../types/w3c';\nimport { nonce } from '../../utils/dev.utils';\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../utils/events';\nimport { propagateFocus, showExpertSlot } from '../../utils/reuse';\nimport { getRenderStates } from '../input/controller';\nimport { InputRadioController } from './controller';\nimport { API, States } from './types';\n\n/**\n * @slot - Die Legende/Überschrift der Radiobuttons.\n */\n@Component({\n\ttag: 'kol-input-radio',\n\tstyleUrls: {\n\t\tdefault: './style.css',\n\t},\n\tshadow: true,\n})\nexport class KolInputRadio implements API {\n\t@Element() private readonly host?: HTMLKolInputRadioElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tpropagateFocus(this.host, ref);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { ariaDescribedBy, hasError } = getRenderStates(this.state);\n\t\tconst hasExpertSlot = showExpertSlot(this.state._label);\n\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<fieldset\n\t\t\t\t\tclass={{\n\t\t\t\t\t\tdisabled: this.state._disabled === true,\n\t\t\t\t\t\terror: hasError === true,\n\t\t\t\t\t\trequired: this.state._required === true,\n\t\t\t\t\t\t'hidden-error': this._hideError === true,\n\t\t\t\t\t\t[this.state._orientation]: true,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<legend class=\"block w-full mb-1 leading-normal\">\n\t\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\t<span>\n\t\t\t\t\t\t\t{/* INFO: label comes with any html tag or as plain text! */}\n\t\t\t\t\t\t\t{/* TODO: der folgende Slot ohne Name muss später entfernt werden */}\n\t\t\t\t\t\t\t<span slot=\"label\">{hasExpertSlot ? <slot></slot> : this.state._label}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</legend>\n\t\t\t\t\t{this.state._options.map((option, index) => {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Damit der Value einer Option ein beliebigen Typ haben kann\n\t\t\t\t\t\t * muss man auf HTML-Ebene den Value auf einen String-Wert\n\t\t\t\t\t\t * mappen. Das tun wir mittels der Map.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tconst customId = `${this.state._id}-${index}`;\n\t\t\t\t\t\tconst slotName = `radio-${index}`;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<kol-input\n\t\t\t\t\t\t\t\tclass=\"radio\"\n\t\t\t\t\t\t\t\tkey={customId}\n\t\t\t\t\t\t\t\t_disabled={this.state._disabled || option.disabled}\n\t\t\t\t\t\t\t\t_hideLabel={this.state._hideLabel}\n\t\t\t\t\t\t\t\t_hint={this.state._hint}\n\t\t\t\t\t\t\t\t_id={customId}\n\t\t\t\t\t\t\t\t_label={option.label as string}\n\t\t\t\t\t\t\t\t_renderNoLabel={true}\n\t\t\t\t\t\t\t\t_required={this.state._required}\n\t\t\t\t\t\t\t\t_slotName={slotName}\n\t\t\t\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t\t\t\t_touched={this.state._touched}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div slot={slotName} class=\"radio-input-wrapper\">\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\tref={this.state._value === option.value ? this.catchRef : undefined}\n\t\t\t\t\t\t\t\t\t\ttitle=\"\"\n\t\t\t\t\t\t\t\t\t\taccessKey={this.state._accessKey} // by radio?!\n\t\t\t\t\t\t\t\t\t\taria-describedby={ariaDescribedBy.length > 0 ? ariaDescribedBy.join(' ') : undefined}\n\t\t\t\t\t\t\t\t\t\taria-label={this.state._hideLabel && typeof option.label === 'string' ? option.label : undefined}\n\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\tid={customId}\n\t\t\t\t\t\t\t\t\t\tchecked={this.state._value === option.value}\n\t\t\t\t\t\t\t\t\t\tname={this.state._name || this.state._id}\n\t\t\t\t\t\t\t\t\t\tdisabled={this.state._disabled || option.disabled}\n\t\t\t\t\t\t\t\t\t\trequired={this.state._required}\n\t\t\t\t\t\t\t\t\t\ttabIndex={this.state._tabIndex}\n\t\t\t\t\t\t\t\t\t\tvalue={`-${index}`}\n\t\t\t\t\t\t\t\t\t\t{...this.controller.onFacade}\n\t\t\t\t\t\t\t\t\t\tonChange={this.onChange}\n\t\t\t\t\t\t\t\t\t\tonClick={undefined} // onClick is not needed since onChange already triggers the correct event\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\tclass=\"radio-label\"\n\t\t\t\t\t\t\t\t\t\thtmlFor={`${customId}`}\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\theight: this.state._hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\t\t\t\t\tmargin: this.state._hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\t\t\t\t\tpadding: this.state._hideLabel ? '0' : undefined,\n\t\t\t\t\t\t\t\t\t\t\tvisibility: this.state._hideLabel ? 'hidden' : undefined,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{option.label}</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</kol-input>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t\t{hasError && (\n\t\t\t\t\t\t<kol-alert id=\"error\" _alert={true} _type=\"error\" _variant=\"msg\" aria-hidden={this._hideError} class={`error${this._hideError ? ' hidden' : ''}`}>\n\t\t\t\t\t\t\t{this.state._error}\n\t\t\t\t\t\t</kol-alert>\n\t\t\t\t\t)}\n\t\t\t\t</fieldset>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputRadioController;\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 */\n\t@Prop({ mutable: true, reflect: true }) public _alert?: boolean = true;\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 * 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 * 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 Optionen für das Eingabefeld an.\n\t * @deprecated Use _options.\n\t */\n\t@Prop() public _list?: Stringified<Option<W3CInputValue>[]>;\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 * Options the user can choose from.\n\t */\n\t@Prop() public _options?: OptionsPropType;\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/**\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 * 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 the value of the input.\n\t * @see Known bug: https://github.com/ionic-team/stencil/issues/3902\n\t */\n\t@Prop() public _value?: Stringified<W3CInputValue>;\n\n\t@State() public state: States = {\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`, // ⚠ required\n\t\t_label: '', // ⚠ required\n\t\t_options: [],\n\t\t_orientation: 'vertical',\n\t};\n\n\tpublic constructor() {\n\t\tthis.controller = new InputRadioController(this, 'input-radio', 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?: boolean): void {\n\t\tthis.controller.validateAlert(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('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(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('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(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?: Stringified<Option<W3CInputValue>[]>): void {\n\t\tthis.validateOptions(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('_options')\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tthis.controller.validateOptions(value);\n\t}\n\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\tthis.controller.validateOrientation(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@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('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): 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.controller.componentWillLoad(this.onChange);\n\t}\n\n\tprivate onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tconst option = this.controller.getOptionByKey(event.target.value);\n\t\t\tif (option !== undefined) {\n\t\t\t\t// Event handling\n\t\t\t\tstopPropagation(event);\n\t\t\t\ttryToDispatchKoliBriEvent('change', this.host, option.value);\n\n\t\t\t\t// Static form handling\n\t\t\t\tthis.controller.setFormAssociatedValue(option.value);\n\n\t\t\t\t// Callback\n\t\t\t\tif (typeof this.state._on?.onChange === 'function') {\n\t\t\t\t\tthis.state._on.onChange(event, option.value);\n\t\t\t\t}\n\n\t\t\t\t// TODO: Prüfen, was setValue noch genau macht, wir syncValue ja jetzt.\n\t\t\t\tthis.controller.setValue(event, option.value as string); // TODO: fix type\n\t\t\t}\n\t\t}\n\t};\n}\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,H as i,r as e,g as s}from"./index-536799d5.js";import{n as a}from"./dev.utils-
|
|
4
|
+
import{h as t,H as i,r as e,g as s}from"./index-536799d5.js";import{n as a}from"./dev.utils-ad367f40.js";import{a as n,s as o}from"./reuse-b3566e4c.js";import{p as r}from"./controller-23b9e0a2.js";import{v as l,g as d}from"./controller-8aaf4af5.js";import{v as h}from"./suggestions-1e0fe6e9.js";import{a as p}from"./a11y.tipps-54065212.js";import{w as u,e as c}from"./prop.validators-251589c8.js";import{I as f}from"./controller-icon-ef27c916.js";import"./hide-label-310fe1b8.js";import"./label-57859a5a.js";import"./events-2bb1065b.js";import"./tab-index-39708fff.js";import"./associated.controller-a1ec4433.js";import"./index-3822b0c5.js";import"./icons-c28cff87.js";class m extends f{constructor(t,e,i){super(t,e,i),this.component=t}validateAutoComplete(t){u(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHideError(t){l(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&p("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateList(t){Array.isArray(t)&&this.validateSuggestions(t.map((t=>t.value)))}validateMax(t){c(this.component,"_max",t)}validateMin(t){c(this.component,"_min",t)}validateStep(t){c(this.component,"_step",t)}validateSuggestions(t){h(this.component,t)}validateValue(t){c(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHideError(this.component._hideError),this.validateList(this.component._list),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateStep(this.component._step),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const b=":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}.required label>span::after,.required legend>span::after{content:'*'}:host{display:block}input,textarea{cursor:text}input[type='checkbox'],input[type='color'],input[type='file'],input[type='radio'],input[type='range'],label,option,select{cursor:pointer}input[type='color'],input[type='date'],input[type='datetime-local'],input[type='email'],input[type='file'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='time'],input[type='url'],input[type='week'],select,select[multiple] option,textarea{font-size:1rem;width:100%}input[type='file']{padding:calc((var(--a11y-min-size) - 1rem) / 10) 0.5em}select[multiple] option{padding:calc((var(--a11y-min-size) - 1rem) / 2) 0.5em}kol-input.disabled :is(button,input,label,option,select,textarea){cursor:not-allowed;opacity:0.5}kol-input{display:grid}kol-input .input-slot{flex-grow:1}input:not([type='checkbox'],[type='radio']),select:not([multiple],[size]){height:2.75em}input:focus,option:focus,select:focus,textarea:focus{outline:0}.input{display:flex;align-items:center}.input>kol-icon{display:grid;height:var(--a11y-min-size);place-items:center}kol-input.required .input-tooltip .span-label::after{content:'*'}.inputs-wrapper{align-items:center;display:flex;flex-direction:row}input[type='number']{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size);width:var(--kolibri-input-range--input-number--width)}input[type='range']{appearance:none;background-color:#d3d3d3;border:1px solid #000;display:inline-block;flex-grow:1;height:0.5rem;line-height:1.5em;padding:0;margin:0;width:0;}input[type='range']::-webkit-slider-thumb{box-sizing:border-box;background-color:#000;height:20px;width:20px;border-radius:20px;cursor:pointer;-webkit-appearance:none}input[type='range']::-moz-range-thumb{box-sizing:border-box;background-color:#000;height:20px;width:20px;border-radius:20px;cursor:pointer;-moz-appearance:none}.error.hidden{display:none}@media (prefers-contrast: more){::-webkit-slider-thumb{outline:1px solid currentColor}}",v=class{render(){const{ariaDescribedBy:e}=d(this.state),a=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,s=o(this.state._label);return t(i,null,t("kol-input",{class:{range:!0,"hide-label":!!this.state._hideLabel},_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched},t("span",{slot:"label"},s?t("slot",null):this.state._label),t("div",{slot:"input"},t("div",{class:"inputs-wrapper",style:{"--kolibri-input-range--input-number--width":`${this.state._max}`.length+.5+"em"}},t("input",Object.assign({title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,list:a?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name?`${this.state._name}-range`:void 0,spellcheck:"false",step:this.state._step,tabIndex:-1,type:"range",value:this.state._value},this.controller.onFacade,{onChange:this.onChange})),t("input",Object.assign({ref:this.catchInputNumberRef,title:"",accessKey:this.state._accessKey,"aria-describedby":e.length>0?e.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:a?`${this.state._id}-list`:void 0,max:this.state._max,min:this.state._min,name:this.state._name?`${this.state._name}-number`:void 0,step:this.state._step,type:"number",value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp,onChange:this.onChange}))),a&&[t("datalist",{id:`${this.state._id}-list`},this.state._suggestions.map((e=>t("option",{value:e}))))])))}constructor(t){e(this,t),this.catchInputNumberRef=t=>{var e;t&&(this.ref=t,n(this.host,t),!this._value&&(null===(e=this.ref)||void 0===e?void 0:e.value)&&this.validateValue(parseFloat(this.ref.value)))},this.onChange=t=>{var e,i;let a=parseFloat(t.target.value);this.state._max&&a>this.state._max&&(a=this.state._max),this.state._min&&a<this.state._min&&(a=this.state._min),this.validateValue(a),"function"==typeof(null===(e=this.state._on)||void 0===e?void 0:e.onChange)&&(null===(i=this.state._on)||void 0===i||i.onChange(t,a))},this.onKeyUp=t=>{"Enter"===t.code?r({form:this.host,ref:this.ref}):this.onChange(t)},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,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._list=void 0,this._max=void 0,this._min=void 0,this._name=void 0,this._on=void 0,this._step=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideError:!1,_id:`id-${a()}`,_label:"",_suggestions:[]},this.controller=new m(this,"input-range",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){this.controller.validateAlert(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateList(t){this.controller.validateList(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateStep(t){this.controller.validateStep(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.controller.componentWillLoad()}get host(){return s(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icon:["validateIcon"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_list:["validateList"],_max:["validateMax"],_min:["validateMin"],_name:["validateName"],_on:["validateOn"],_step:["validateStep"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};v.style={default:b};export{v as kol_input_range};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{h as t,H as e,r as i,g as a}from"./index-536799d5.js";import{a as s,s as n}from"./prop.validators-
|
|
4
|
+
import{h as t,H as e,r as i,g as a}from"./index-536799d5.js";import{a as s,s as n}from"./prop.validators-251589c8.js";import{f as l}from"./a11y.tipps-54065212.js";import{n as o}from"./dev.utils-ad367f40.js";import{a as r,s as d}from"./reuse-b3566e4c.js";import{p as h}from"./controller-23b9e0a2.js";import{g as p}from"./controller-8aaf4af5.js";import{a as u}from"./controller-b84eace4.js";import"./index-3822b0c5.js";import"./hide-label-310fe1b8.js";import"./label-57859a5a.js";import"./events-2bb1065b.js";import"./tab-index-39708fff.js";import"./associated.controller-a1ec4433.js";import"./controller-d80a67d0.js";import"./controller-icon-ef27c916.js";import"./icons-c28cff87.js";import"./suggestions-1e0fe6e9.js";const c=(t,e)=>{s(t,"_alert",e)},f=":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}.required label>span::after,.required legend>span::after{content:'*'}:host{display:block}input,textarea{cursor:text}input[type='checkbox'],input[type='color'],input[type='file'],input[type='radio'],input[type='range'],label,option,select{cursor:pointer}input[type='color'],input[type='date'],input[type='datetime-local'],input[type='email'],input[type='file'],input[type='month'],input[type='number'],input[type='password'],input[type='search'],input[type='tel'],input[type='text'],input[type='time'],input[type='url'],input[type='week'],select,select[multiple] option,textarea{font-size:1rem;width:100%}input[type='file']{padding:calc((var(--a11y-min-size) - 1rem) / 10) 0.5em}select[multiple] option{padding:calc((var(--a11y-min-size) - 1rem) / 2) 0.5em}kol-input.disabled :is(button,input,label,option,select,textarea){cursor:not-allowed;opacity:0.5}kol-input{display:grid}kol-input .input-slot{flex-grow:1}input:not([type='checkbox'],[type='radio']),select:not([multiple],[size]){height:2.75em}input:focus,option:focus,select:focus,textarea:focus{outline:0}.input{display:flex;align-items:center}.input>kol-icon{display:grid;height:var(--a11y-min-size);place-items:center}kol-input.required .input-tooltip .span-label::after{content:'*'}.error.hidden{display:none}";l("[KolInputText] Pre- und post-Label für Währung usw.");const v=class{render(){const{ariaDescribedBy:i}=p(this.state),a=Array.isArray(this.state._suggestions)&&this.state._suggestions.length>0,s=d(this.state._label);return t(e,{class:{"has-value":this.state._hasValue}},t("kol-input",{class:{[this.state._type]:!0,"hide-label":!!this.state._hideLabel},_currentLength:this.state._currentLength,_disabled:this.state._disabled,_error:this.state._error,_hideError:this.state._hideError,_hasCounter:this.state._hasCounter,_hideLabel:this.state._hideLabel,_hint:this.state._hint,_icons:this.state._icons,_id:this.state._id,_label:this.state._label,_suggestions:this.state._suggestions,_maxLength:this.state._maxLength,_readOnly:this.state._readOnly,_required:this.state._required,_smartButton:this.state._smartButton,_tooltipAlign:this._tooltipAlign,_touched:this.state._touched,onClick:()=>{var t;return null===(t=this.ref)||void 0===t?void 0:t.focus()}},t("span",{slot:"label"},s?t("slot",null):this.state._label),t("div",{slot:"input"},t("input",Object.assign({ref:this.catchRef,title:"",accessKey:this.state._accessKey,"aria-describedby":i.length>0?i.join(" "):void 0,"aria-label":this.state._hideLabel&&"string"==typeof this.state._label?this.state._label:void 0,autoCapitalize:"off",autoComplete:this.state._autoComplete,autoCorrect:"off",disabled:this.state._disabled,id:this.state._id,list:a?`${this.state._id}-list`:void 0,maxlength:this.state._maxLength,name:this.state._name,pattern:this.state._pattern,placeholder:this.state._placeholder,readOnly:this.state._readOnly,required:this.state._required,size:this.state._size,spellcheck:"false",type:this.state._type,value:this.state._value},this.controller.onFacade,{onKeyUp:this.onKeyUp})))))}constructor(t){i(this,t),this.catchRef=t=>{var e;this.ref=t,r(this.host,this.ref),this.disconnectedCallback(),null===(e=this.ref)||void 0===e||e.addEventListener("search",this.onChange)},this.onKeyUp=t=>{n(this,"_currentLength",t.target.value.length),"Enter"===t.code||"NumpadEnter"===t.code?h({form:this.host,ref:this.ref}):this.onChange(t)},this.onChange=t=>{var e,i;this.oldValue!==(null===(e=this.ref)||void 0===e?void 0:e.value)&&(this.oldValue=null===(i=this.ref)||void 0===i?void 0:i.value,this.controller.onFacade.onChange(t))},this._accessKey=void 0,this._alert=!0,this._autoComplete=void 0,this._disabled=!1,this._error=void 0,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._list=void 0,this._maxLength=void 0,this._name=void 0,this._on=void 0,this._pattern=void 0,this._placeholder=void 0,this._readOnly=!1,this._required=!1,this._size=void 0,this._suggestions=void 0,this._smartButton=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="text",this._value=void 0,this.state={_autoComplete:"off",_currentLength:0,_hasValue:!1,_hideError:!1,_id:`id-${o()}`,_label:"",_suggestions:[],_type:"text"},this.controller=new u(this,"input-text",this.host)}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAlert(t){c(this,t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateError(t){this.controller.validateError(t)}validateHasCounter(t){this.controller.validateHasCounter(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcon(t){this.validateIcons(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateList(t){this.validateSuggestions(t)}validateMaxLength(t){this.controller.validateMaxLength(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validatePattern(t){this.controller.validatePattern(t)}validatePlaceholder(t){this.controller.validatePlaceholder(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateSize(t){this.controller.validateSize(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._alert=!0===this._alert,this._touched=!0===this._touched,this.oldValue=this._value,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}disconnectedCallback(){var t;null===(t=this.ref)||void 0===t||t.removeEventListener("search",this.onChange)}get host(){return a(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_alert:["validateAlert"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_error:["validateError"],_hasCounter:["validateHasCounter"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icon:["validateIcon"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_list:["validateList"],_maxLength:["validateMaxLength"],_name:["validateName"],_on:["validateOn"],_pattern:["validatePattern"],_placeholder:["validatePlaceholder"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_size:["validateSize"],_suggestions:["validateSuggestions"],_smartButton:["validateSmartButton"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};v.style={default:f};export{v as kol_input_text};
|
|
@@ -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 h}from"./index-536799d5.js";import{a as l}from"./i18n-
|
|
4
|
+
import{r as i,h as t,F as s,H as e,g as h}from"./index-536799d5.js";import{a as l}from"./i18n-ad401ed8.js";import{h as o,s as n}from"./reuse-b3566e4c.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-54065212.js";import"./dev.utils-ad367f40.js";const r=class{constructor(t){i(this,t),this.slotName="input",this.catchInputSlot=t=>{o(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}getIconStyles(t){return t&&"object"==typeof t&&t.style?t.style:{}}render(){var i,o,r,h,a,_,d,c;const u="string"==typeof this._error&&this._error.length>0&&!0===this._touched,p=n(this._label),g="string"==typeof this._hint&&this._hint.length>0,m=!p&&this._hideLabel;return t(e,{class:{disabled:!0===this._disabled,error:!0===u,"read-only":!0===this._readOnly,required:!0===this._required,touched:!0===this._touched,"hidden-error":!0===this._hideError}},t("label",{id:m?void 0:`${this._id}-label`,hidden:m,htmlFor:this._id},t("span",null,t("slot",{name:"label"}))),g&&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===(o=this.getIconsProp())||void 0===o?void 0:o.right)}},(null===(r=this.getIconsProp())||void 0===r?void 0:r.left)&&t("kol-icon",{_ariaLabel:"",_icons:(null===(h=this.getIconsProp())||void 0===h?void 0:h.left).icon,style:this.getIconStyles(null===(a=this.getIconsProp())||void 0===a?void 0:a.left)}),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===(_=this.getIconsProp())||void 0===_?void 0:_.right)&&t("kol-icon",{_ariaLabel:"",_icons:(null===(d=this.getIconsProp())||void 0===d?void 0:d.right).icon,style:this.getIconStyles(null===(c=this.getIconsProp())||void 0===c?void 0:c.right)})),m&&t("kol-tooltip-wc",{"aria-hidden":"true",class:"input-tooltip",_align:this._tooltipAlign,_id:this._hideLabel?`${this._id}-label`:void 0,_label:this._label}),u&&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":l("kol-of"),role:"img"},"/"),this._maxLength)," ",t("span",null,l("kol-characters"))))}get host(){return h(this)}};export{r as kol_input};
|
|
@@ -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 as o}from"./i18n-ad401ed8.js";import{c as a,v as s}from"./color-9cbf6d52.js";import{d as r}from"./a11y.tipps-54065212.js";import{a as n}from"./prop.validators-251589c8.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./dev.utils-ad367f40.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=a(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":o("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 = 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":"
|
|
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":";;;+VAAA,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,EAAI,KACJD,EAAA,OAAKE,KAAK,MAAK,aAAaC,EAAU,oBAAqBC,MAAM,6BAA6BC,QAAQ,cAAcC,KAAMR,GACzHE,EAAA,QAAMO,EAAE,kCACRP,EAAA,QAAMO,EAAE,kCACRP,EAAA,QAAMO,EAAE,8CACRP,EAAA,QAAMO,EAAE,6CACRP,EAAA,QAAMO,EAAE,oCACRP,EAAA,QAAMO,EAAE,sCACPxB,KAAKgB,MAAMH,WAAa,MACxBI,EAAA,QAAMQ,EAAE,MAAMC,EAAE,MAAMH,KAAMR,GAAS,Y,CAqCnC,eAAAY,CAAgBC,GACtBC,EAAa7B,KAAM,WAAY4B,E,CAiBzB,aAAAE,CAAcF,GACpBE,EAAc9B,KAAM4B,EAAO,CAC1BG,aAAc,UACdC,MAAO,CACNC,YAAajC,KAAKC,oB,CAMd,eAAAiC,CAAgBN,GACtBC,EAAa7B,KAAM,WAAY4B,E,CAGzB,iBAAAO,GACNnC,KAAK2B,gBAAgB3B,KAAKW,UAC1BX,KAAK8B,cAAc9B,KAAKY,QACxBZ,KAAKkC,gBAAgBlC,KAAKa,S,CAGpB,kBAAAuB,GACNC,cAAcrC,KAAKsC,UACnB,GAAItC,KAAKgB,MAAML,SAAU,CACxBX,KAAKsC,SAAWC,aAAY,KAC3BvC,KAAKgB,MAAKwB,OAAAC,OAAAD,OAAAC,OAAA,GACNzC,KAAKgB,OAAK,CACbJ,OAAQ,CACPL,KAAMP,KAAKgB,MAAMJ,OAAOL,IAAM,GAAKhB,EACnCiB,OAAQR,KAAKgB,MAAMJ,OAAOJ,MAAQ,GAAKjB,EACvCkB,MAAOT,KAAKgB,MAAMJ,OAAOH,KAAO,GAAKlB,IAEtC,GACC,G,EAIE,oBAAAmD,GACNL,cAAcrC,KAAKsC,S"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,h as i,H as n,g as e}from"./index-536799d5.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-ad401ed8.js";import{a as o}from"./reuse-b3566e4c.js";import"./index-23225963.js";import"./index-3822b0c5.js";import"./a11y.tipps-54065212.js";import"./dev.utils-ad367f40.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=>{o(this.host,t)},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 { 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\
|
|
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\n\tprivate readonly catchRef = (ref?: HTMLKolLinkWcElement) => {\n\t\tpropagateFocus(this.host, 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,yBAGRC,KAAAC,SAAYC,IAC5BC,EAAeH,KAAKI,KAAMF,EAAI,E,wLAmFM,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"}
|