@public-ui/components 1.7.0-rc.13 → 1.7.0-rc.14
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 +32 -34
- package/dist/cjs/{a11y.tipps-e6363d33.js → a11y.tipps-66cfefcd.js} +1 -1
- package/dist/cjs/{a11y.tipps-e6363d33.js.map → a11y.tipps-66cfefcd.js.map} +1 -1
- package/dist/cjs/align-a72e532d.js +4 -0
- package/dist/cjs/{align-87240319.js.map → align-a72e532d.js.map} +1 -1
- package/dist/cjs/{alignment-ad6a785d.js → alignment-f0930e04.js} +1 -1
- package/dist/cjs/{alignment-ad6a785d.js.map → alignment-f0930e04.js.map} +1 -1
- package/dist/cjs/{app-globals-ad6b5f49.js → app-globals-f5e7bd78.js} +1 -1
- package/dist/cjs/{app-globals-ad6b5f49.js.map → app-globals-f5e7bd78.js.map} +1 -1
- package/dist/cjs/{aria-current-12a1ec9d.js → aria-current-4e34cb0e.js} +1 -1
- package/dist/cjs/{aria-current-12a1ec9d.js.map → aria-current-4e34cb0e.js.map} +1 -1
- package/dist/cjs/{associated.controller-b11a31b0.js → associated.controller-9fa9fcaa.js} +1 -1
- package/dist/cjs/{associated.controller-b11a31b0.js.map → associated.controller-9fa9fcaa.js.map} +1 -1
- package/dist/cjs/{color-5e6c2ad5.js → color-e18e2142.js} +1 -1
- package/dist/cjs/{color-5e6c2ad5.js.map → color-e18e2142.js.map} +1 -1
- package/dist/cjs/controller-09d250dc.js +4 -0
- package/dist/cjs/{controller-7232329c.js.map → controller-09d250dc.js.map} +1 -1
- package/dist/cjs/controller-21ea2ce0.js +4 -0
- package/dist/cjs/{controller-60867e49.js.map → controller-21ea2ce0.js.map} +1 -1
- package/dist/cjs/controller-465011ed.js +4 -0
- package/dist/cjs/controller-465011ed.js.map +1 -0
- package/dist/cjs/{controller-1bc5791a.js → controller-470ec70f.js} +1 -1
- package/dist/cjs/{controller-1bc5791a.js.map → controller-470ec70f.js.map} +1 -1
- package/dist/cjs/controller-66e67f2f.js +4 -0
- package/dist/cjs/{controller-3492126d.js.map → controller-66e67f2f.js.map} +1 -1
- package/dist/cjs/controller-icon-0d3f95c2.js +4 -0
- package/dist/cjs/{controller-icon-d9be7156.js.map → controller-icon-0d3f95c2.js.map} +1 -1
- package/dist/cjs/{custom-class-1c68b716.js → custom-class-1247b8ff.js} +1 -1
- package/dist/cjs/{custom-class-1c68b716.js.map → custom-class-1247b8ff.js.map} +1 -1
- package/dist/cjs/{dev.utils-758c7a7c.js → dev.utils-17b0ffeb.js} +1 -1
- package/dist/cjs/{dev.utils-758c7a7c.js.map → dev.utils-17b0ffeb.js.map} +1 -1
- package/dist/cjs/{devtools-a71f2b60.js → devtools-a6ae570c.js} +1 -1
- package/dist/cjs/{devtools-a71f2b60.js.map → devtools-a6ae570c.js.map} +1 -1
- package/dist/cjs/has-closer-9b676d55.js +4 -0
- package/dist/cjs/{has-closer-cbf7df9a.js.map → has-closer-9b676d55.js.map} +1 -1
- package/dist/cjs/hide-label-9535ac09.js +4 -0
- package/dist/cjs/{hide-label-7a3d0993.js.map → hide-label-9535ac09.js.map} +1 -1
- package/dist/cjs/{i18n-5a440a87.js → i18n-cfed41ab.js} +1 -1
- package/dist/cjs/{i18n-5a440a87.js.map → i18n-cfed41ab.js.map} +1 -1
- package/dist/cjs/{icon-4e9fb453.js → icon-dc0dad5b.js} +1 -1
- package/dist/cjs/{icon-4e9fb453.js.map → icon-dc0dad5b.js.map} +1 -1
- package/dist/cjs/image-source-24237406.js +4 -0
- package/dist/cjs/{image-source-e3f79fe7.js.map → image-source-24237406.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc_3.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc_3.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-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-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button-group-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-indented-text.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-color.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input.cjs.entry.js +1 -1
- package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js.map +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-quote.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-span-wc_2.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc_2.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js.map +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-table.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-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-e669bbca.js → label-a3f72682.js} +1 -1
- package/dist/cjs/label-a3f72682.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/open-e76337d6.js +4 -0
- package/dist/cjs/{open-2879dec7.js.map → open-e76337d6.js.map} +1 -1
- package/dist/cjs/{prop.validators-39edb5c0.js → prop.validators-c6674982.js} +1 -1
- package/dist/cjs/{prop.validators-39edb5c0.js.map → prop.validators-c6674982.js.map} +1 -1
- package/dist/cjs/{reuse-d70546ae.js → reuse-786396d6.js} +1 -1
- package/dist/cjs/reuse-786396d6.js.map +1 -0
- package/dist/cjs/rows-7cfd562c.js +4 -0
- package/dist/cjs/{rows-2d47c5ab.js.map → rows-7cfd562c.js.map} +1 -1
- package/dist/cjs/show-b711d0dc.js +4 -0
- package/dist/cjs/{show-ebcd65e3.js.map → show-b711d0dc.js.map} +1 -1
- package/dist/cjs/{suggestions-d542ba8c.js → suggestions-3955d219.js} +1 -1
- package/dist/cjs/{suggestions-d542ba8c.js.map → suggestions-3955d219.js.map} +1 -1
- package/dist/cjs/{tab-index-eabf98a8.js → tab-index-be7e3127.js} +1 -1
- package/dist/cjs/{tab-index-eabf98a8.js.map → tab-index-be7e3127.js.map} +1 -1
- package/dist/cjs/tooltip-align-52e80b9f.js +4 -0
- package/dist/cjs/{tooltip-align-e4c65102.js.map → tooltip-align-52e80b9f.js.map} +1 -1
- package/dist/cjs/{validation-54532296.js → validation-274fdcc8.js} +1 -1
- package/dist/cjs/{validation-54532296.js.map → validation-274fdcc8.js.map} +1 -1
- package/dist/cjs/{validation-6cdade68.js → validation-9b4df76d.js} +1 -1
- package/dist/cjs/{validation-6cdade68.js.map → validation-9b4df76d.js.map} +1 -1
- package/dist/components/color.js +1 -1
- package/dist/components/component.js.map +1 -1
- package/dist/components/component10.js.map +1 -1
- package/dist/components/component12.js.map +1 -1
- package/dist/components/component13.js +1 -1
- package/dist/components/component13.js.map +1 -1
- package/dist/components/component14.js +1 -1
- package/dist/components/component14.js.map +1 -1
- package/dist/components/component15.js +1 -1
- package/dist/components/component15.js.map +1 -1
- package/dist/components/component16.js +1 -1
- package/dist/components/component16.js.map +1 -1
- package/dist/components/component17.js +1 -1
- package/dist/components/component17.js.map +1 -1
- package/dist/components/component2.js +1 -1
- package/dist/components/component2.js.map +1 -1
- package/dist/components/component3.js +1 -1
- package/dist/components/component4.js +1 -1
- package/dist/components/component4.js.map +1 -1
- package/dist/components/component5.js +1 -1
- package/dist/components/component5.js.map +1 -1
- package/dist/components/component6.js +1 -1
- package/dist/components/component8.js +1 -1
- package/dist/components/component9.js +1 -1
- package/dist/components/component9.js.map +1 -1
- package/dist/components/controller-icon.js +1 -1
- package/dist/components/controller.js +1 -1
- package/dist/components/controller.js.map +1 -1
- package/dist/components/controller2.js +1 -1
- package/dist/components/controller2.js.map +1 -1
- package/dist/components/controller3.js +1 -1
- package/dist/components/controller3.js.map +1 -1
- package/dist/components/controller4.js +4 -0
- package/dist/components/controller4.js.map +1 -0
- package/dist/components/devtools.js +1 -1
- package/dist/components/kol-abbr.js +1 -1
- package/dist/components/kol-abbr.js.map +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-breadcrumb.js +1 -1
- package/dist/components/kol-breadcrumb.js.map +1 -1
- package/dist/components/kol-button-group.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-heading.js +1 -1
- package/dist/components/kol-input-adapter-leanup.js +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-color.js.map +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-date.js.map +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-email.js.map +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-file.js.map +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-number.js.map +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-password.js.map +1 -1
- package/dist/components/kol-input-radio-group.js +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-range.js.map +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-input-text.js.map +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-kolibri.js.map +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link-button.js.map +1 -1
- package/dist/components/kol-link-group.js +1 -1
- package/dist/components/kol-link-group.js.map +1 -1
- package/dist/components/kol-logo.js +1 -1
- package/dist/components/kol-logo.js.map +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-nav.js.map +1 -1
- package/dist/components/kol-popover.js +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-quote.js +1 -1
- package/dist/components/kol-quote.js.map +1 -1
- package/dist/components/kol-skip-nav.js +1 -1
- package/dist/components/kol-skip-nav.js.map +1 -1
- package/dist/components/kol-span.js +1 -1
- package/dist/components/kol-spin.js +1 -1
- package/dist/components/kol-spin.js.map +1 -1
- package/dist/components/kol-table.js +1 -1
- package/dist/components/kol-table.js.map +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-tabs.js.map +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-textarea.js.map +1 -1
- package/dist/components/kol-toast-container.js.map +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/prop.validators.js +1 -1
- package/dist/components/prop.validators.js.map +1 -1
- package/dist/components/rows.js +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/suggestions.js +1 -1
- package/dist/components/tab-index.js +4 -0
- package/dist/components/tab-index.js.map +1 -0
- package/dist/components/tooltip-align.js +1 -1
- package/dist/components/tooltip-align.js.map +1 -1
- package/dist/components/validation.js +1 -1
- package/dist/esm/{a11y.tipps-a762de67.js → a11y.tipps-d5e71271.js} +1 -1
- package/dist/esm/{a11y.tipps-a762de67.js.map → a11y.tipps-d5e71271.js.map} +1 -1
- package/dist/esm/{align-c607f8b8.js → align-af5d7662.js} +1 -1
- package/dist/esm/{align-c607f8b8.js.map → align-af5d7662.js.map} +1 -1
- package/dist/esm/{alignment-17830483.js → alignment-40963ad9.js} +1 -1
- package/dist/esm/{alignment-17830483.js.map → alignment-40963ad9.js.map} +1 -1
- package/dist/esm/{app-globals-9b8e788b.js → app-globals-28e273ea.js} +1 -1
- package/dist/esm/{app-globals-9b8e788b.js.map → app-globals-28e273ea.js.map} +1 -1
- package/dist/esm/{aria-current-43ddf090.js → aria-current-0d0f1e03.js} +1 -1
- package/dist/esm/{aria-current-43ddf090.js.map → aria-current-0d0f1e03.js.map} +1 -1
- package/dist/esm/{associated.controller-1c434851.js → associated.controller-bcd8b030.js} +1 -1
- package/dist/esm/{associated.controller-1c434851.js.map → associated.controller-bcd8b030.js.map} +1 -1
- package/dist/esm/{color-17311985.js → color-9d685da7.js} +1 -1
- package/dist/esm/{color-17311985.js.map → color-9d685da7.js.map} +1 -1
- package/dist/esm/{controller-633c9c70.js → controller-8f20ca63.js} +1 -1
- package/dist/esm/{controller-633c9c70.js.map → controller-8f20ca63.js.map} +1 -1
- package/dist/esm/{controller-df5bb065.js → controller-ab69b19f.js} +1 -1
- package/dist/esm/{controller-df5bb065.js.map → controller-ab69b19f.js.map} +1 -1
- package/dist/esm/controller-b5d2a6f6.js +4 -0
- package/dist/esm/controller-b5d2a6f6.js.map +1 -0
- package/dist/esm/{controller-c59b1620.js → controller-b7f0906a.js} +1 -1
- package/dist/esm/{controller-c59b1620.js.map → controller-b7f0906a.js.map} +1 -1
- package/dist/esm/{controller-7fe5bd61.js → controller-cca691e0.js} +1 -1
- package/dist/esm/{controller-7fe5bd61.js.map → controller-cca691e0.js.map} +1 -1
- package/dist/esm/{controller-icon-6b7cd7a9.js → controller-icon-290445e9.js} +1 -1
- package/dist/esm/{controller-icon-6b7cd7a9.js.map → controller-icon-290445e9.js.map} +1 -1
- package/dist/esm/{custom-class-a6ec1ec1.js → custom-class-010ba23e.js} +1 -1
- package/dist/esm/{custom-class-a6ec1ec1.js.map → custom-class-010ba23e.js.map} +1 -1
- package/dist/esm/{dev.utils-a3622dee.js → dev.utils-ee97296f.js} +1 -1
- package/dist/esm/{dev.utils-a3622dee.js.map → dev.utils-ee97296f.js.map} +1 -1
- package/dist/esm/{devtools-f2da2eb9.js → devtools-0840683e.js} +1 -1
- package/dist/esm/{devtools-f2da2eb9.js.map → devtools-0840683e.js.map} +1 -1
- package/dist/esm/{has-closer-5a9a536a.js → has-closer-dde3d380.js} +1 -1
- package/dist/esm/{has-closer-5a9a536a.js.map → has-closer-dde3d380.js.map} +1 -1
- package/dist/esm/{hide-label-59a26d29.js → hide-label-69fa12aa.js} +1 -1
- package/dist/esm/{hide-label-59a26d29.js.map → hide-label-69fa12aa.js.map} +1 -1
- package/dist/esm/{i18n-8cbc1706.js → i18n-e8d84b26.js} +1 -1
- package/dist/esm/{i18n-8cbc1706.js.map → i18n-e8d84b26.js.map} +1 -1
- package/dist/esm/{icon-0b0a0629.js → icon-5329489f.js} +1 -1
- package/dist/esm/{icon-0b0a0629.js.map → icon-5329489f.js.map} +1 -1
- package/dist/esm/{image-source-a77aeccd.js → image-source-6b5f8563.js} +1 -1
- package/dist/esm/{image-source-a77aeccd.js.map → image-source-6b5f8563.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-abbr.entry.js.map +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-alert-wc_3.entry.js +1 -1
- package/dist/esm/kol-alert-wc_3.entry.js.map +1 -1
- package/dist/esm/kol-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-breadcrumb.entry.js.map +1 -1
- package/dist/esm/kol-button-group-wc.entry.js.map +1 -1
- package/dist/esm/kol-button-group.entry.js.map +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js.map +1 -1
- package/dist/esm/kol-button.entry.js +1 -1
- package/dist/esm/kol-button.entry.js.map +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-details.entry.js.map +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js.map +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-indented-text.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-color.entry.js.map +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js.map +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js.map +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js.map +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js.map +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js.map +1 -1
- package/dist/esm/kol-input-radio-group.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js.map +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js.map +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js.map +1 -1
- package/dist/esm/kol-input.entry.js +1 -1
- package/dist/esm/kol-input.entry.js.map +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js.map +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js.map +1 -1
- package/dist/esm/kol-link-group.entry.js +1 -1
- package/dist/esm/kol-link-group.entry.js.map +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js.map +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-link.entry.js.map +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-logo.entry.js.map +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js.map +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js.map +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-quote.entry.js.map +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-select.entry.js.map +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js.map +1 -1
- package/dist/esm/kol-span-wc_2.entry.js +1 -1
- package/dist/esm/kol-span-wc_2.entry.js.map +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js.map +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-table.entry.js.map +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js.map +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js.map +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toast-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-9b9b703d.js → label-8045c28a.js} +1 -1
- package/dist/esm/label-8045c28a.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{open-e56c98fc.js → open-18b6a394.js} +1 -1
- package/dist/esm/{open-e56c98fc.js.map → open-18b6a394.js.map} +1 -1
- package/dist/esm/{prop.validators-761de71b.js → prop.validators-86c144b1.js} +1 -1
- package/dist/esm/{prop.validators-761de71b.js.map → prop.validators-86c144b1.js.map} +1 -1
- package/dist/esm/{reuse-3698e2f5.js → reuse-b3566e4c.js} +1 -1
- package/dist/esm/reuse-b3566e4c.js.map +1 -0
- package/dist/esm/{rows-d290d492.js → rows-13a217bd.js} +1 -1
- package/dist/esm/{rows-d290d492.js.map → rows-13a217bd.js.map} +1 -1
- package/dist/esm/{show-77b7321a.js → show-1223e4b7.js} +1 -1
- package/dist/esm/{show-77b7321a.js.map → show-1223e4b7.js.map} +1 -1
- package/dist/esm/{suggestions-715eaf21.js → suggestions-94063690.js} +1 -1
- package/dist/esm/{suggestions-715eaf21.js.map → suggestions-94063690.js.map} +1 -1
- package/dist/esm/{tab-index-ce0ee8db.js → tab-index-e9b61515.js} +1 -1
- package/dist/esm/{tab-index-ce0ee8db.js.map → tab-index-e9b61515.js.map} +1 -1
- package/dist/esm/tooltip-align-fdff250f.js +4 -0
- package/dist/esm/{tooltip-align-4eae0989.js.map → tooltip-align-fdff250f.js.map} +1 -1
- package/dist/esm/{validation-bd9dad37.js → validation-4ded4ab0.js} +1 -1
- package/dist/esm/{validation-bd9dad37.js.map → validation-4ded4ab0.js.map} +1 -1
- package/dist/esm/validation-b9c1d8b0.js +4 -0
- package/dist/esm/{validation-1f72f65c.js.map → validation-b9c1d8b0.js.map} +1 -1
- package/dist/kolibri/{a11y.tipps-a762de67.js → a11y.tipps-d5e71271.js} +1 -1
- package/dist/kolibri/align-af5d7662.js +4 -0
- package/dist/kolibri/{alignment-17830483.js → alignment-40963ad9.js} +1 -1
- package/dist/kolibri/app-globals-28e273ea.js +4 -0
- package/dist/kolibri/aria-current-0d0f1e03.js +4 -0
- package/dist/kolibri/{associated.controller-1c434851.js → associated.controller-bcd8b030.js} +1 -1
- package/dist/kolibri/{associated.controller-1c434851.js.map → associated.controller-bcd8b030.js.map} +1 -1
- package/dist/kolibri/{color-17311985.js → color-9d685da7.js} +1 -1
- package/dist/kolibri/{controller-633c9c70.js → controller-8f20ca63.js} +1 -1
- package/dist/kolibri/{controller-df5bb065.js → controller-ab69b19f.js} +1 -1
- package/dist/kolibri/{controller-df5bb065.js.map → controller-ab69b19f.js.map} +1 -1
- package/dist/kolibri/controller-b5d2a6f6.js +4 -0
- package/dist/kolibri/{hide-error-b281fd9e.js.map → controller-b5d2a6f6.js.map} +1 -1
- package/dist/kolibri/controller-b7f0906a.js +4 -0
- package/dist/kolibri/{controller-c59b1620.js.map → controller-b7f0906a.js.map} +1 -1
- package/dist/kolibri/controller-cca691e0.js +4 -0
- package/dist/kolibri/{controller-7fe5bd61.js.map → controller-cca691e0.js.map} +1 -1
- package/dist/kolibri/controller-icon-290445e9.js +4 -0
- package/dist/kolibri/{custom-class-a6ec1ec1.js → custom-class-010ba23e.js} +1 -1
- package/dist/kolibri/{dev.utils-a3622dee.js → dev.utils-ee97296f.js} +1 -1
- package/dist/kolibri/{dev.utils-a3622dee.js.map → dev.utils-ee97296f.js.map} +1 -1
- package/dist/kolibri/devtools-0840683e.js +4 -0
- package/dist/kolibri/{devtools-f2da2eb9.js.map → devtools-0840683e.js.map} +1 -1
- package/dist/kolibri/has-closer-dde3d380.js +4 -0
- package/dist/kolibri/hide-label-69fa12aa.js +4 -0
- package/dist/kolibri/{i18n-8cbc1706.js → i18n-e8d84b26.js} +1 -1
- package/dist/kolibri/{icon-0b0a0629.js → icon-5329489f.js} +1 -1
- package/dist/kolibri/image-source-6b5f8563.js +4 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js.map +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc_3.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc_3.entry.js.map +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
- package/dist/kolibri/kol-button-group-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-button-group.entry.js.map +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js.map +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js.map +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js.map +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js.map +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-indented-text.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-color.entry.js.map +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js.map +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js.map +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js.map +1 -1
- package/dist/kolibri/kol-input-radio-group.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js.map +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js.map +1 -1
- package/dist/kolibri/kol-input.entry.js +1 -1
- package/dist/kolibri/kol-input.entry.js.map +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js.map +1 -1
- package/dist/kolibri/kol-link-group.entry.js +1 -1
- package/dist/kolibri/kol-link-group.entry.js.map +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js.map +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-logo.entry.js.map +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js.map +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-quote.entry.js.map +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js.map +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-span-wc_2.entry.js +1 -1
- package/dist/kolibri/kol-span-wc_2.entry.js.map +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js.map +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-symbol.entry.js.map +1 -1
- package/dist/kolibri/kol-table.entry.js +1 -1
- package/dist/kolibri/kol-table.entry.js.map +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js.map +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js.map +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toast-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-8045c28a.js +4 -0
- package/dist/kolibri/label-8045c28a.js.map +1 -0
- package/dist/kolibri/open-18b6a394.js +4 -0
- package/dist/kolibri/{prop.validators-761de71b.js → prop.validators-86c144b1.js} +1 -1
- package/dist/kolibri/reuse-b3566e4c.js +4 -0
- package/dist/kolibri/reuse-b3566e4c.js.map +1 -0
- package/dist/kolibri/rows-13a217bd.js +4 -0
- package/dist/kolibri/show-1223e4b7.js +4 -0
- package/dist/kolibri/suggestions-94063690.js +4 -0
- package/dist/kolibri/{tab-index-ce0ee8db.js → tab-index-e9b61515.js} +1 -1
- package/dist/kolibri/tooltip-align-fdff250f.js +4 -0
- package/dist/kolibri/{tooltip-align-4eae0989.js.map → tooltip-align-fdff250f.js.map} +1 -1
- package/dist/kolibri/{validation-bd9dad37.js → validation-4ded4ab0.js} +1 -1
- package/dist/kolibri/validation-b9c1d8b0.js +4 -0
- package/dist/types/components/@deprecated/input/controller.d.ts +1 -1
- package/dist/types/components/@deprecated/input/types.d.ts +1 -1
- package/dist/types/components/abbr/component.d.ts +1 -1
- package/dist/types/components/alert/types.d.ts +1 -1
- package/dist/types/components/badge/types.d.ts +3 -3
- package/dist/types/components/breadcrumb/component.d.ts +2 -2
- package/dist/types/components/breadcrumb/types.d.ts +1 -1
- package/dist/types/components/button/component.d.ts +7 -7
- package/dist/types/components/button/shadow.d.ts +7 -7
- package/dist/types/components/button/types.d.ts +14 -14
- package/dist/types/components/button-link/component.d.ts +7 -7
- package/dist/types/components/button-link/types.d.ts +1 -1
- package/dist/types/components/details/types.d.ts +1 -1
- package/dist/types/components/input/component.d.ts +4 -0
- package/dist/types/components/input/types.d.ts +8 -6
- package/dist/types/components/input-adapter-leanup/associated.controller.d.ts +1 -1
- package/dist/types/components/input-checkbox/component.d.ts +6 -6
- package/dist/types/components/input-checkbox/controller.d.ts +1 -1
- package/dist/types/components/input-checkbox/types.d.ts +5 -5
- package/dist/types/components/input-color/component.d.ts +5 -5
- package/dist/types/components/input-color/controller.d.ts +1 -1
- package/dist/types/components/input-color/types.d.ts +6 -6
- package/dist/types/components/input-date/component.d.ts +6 -6
- package/dist/types/components/input-date/controller.d.ts +1 -1
- package/dist/types/components/input-date/types.d.ts +7 -7
- package/dist/types/components/input-email/component.d.ts +6 -6
- package/dist/types/components/input-email/controller.d.ts +1 -1
- package/dist/types/components/input-email/types.d.ts +8 -8
- package/dist/types/components/input-file/component.d.ts +5 -5
- package/dist/types/components/input-file/controller.d.ts +1 -1
- package/dist/types/components/input-file/types.d.ts +5 -5
- package/dist/types/components/input-number/component.d.ts +5 -5
- package/dist/types/components/input-number/controller.d.ts +1 -1
- package/dist/types/components/input-number/types.d.ts +8 -8
- package/dist/types/components/input-password/component.d.ts +5 -5
- package/dist/types/components/input-password/controller.d.ts +1 -1
- package/dist/types/components/input-password/types.d.ts +6 -6
- package/dist/types/components/input-radio/component.d.ts +5 -5
- package/dist/types/components/input-radio/controller.d.ts +1 -1
- package/dist/types/components/input-radio/types.d.ts +6 -6
- package/dist/types/components/input-range/component.d.ts +5 -5
- package/dist/types/components/input-range/controller.d.ts +1 -1
- package/dist/types/components/input-range/types.d.ts +6 -6
- package/dist/types/components/input-text/component.d.ts +5 -5
- package/dist/types/components/input-text/controller.d.ts +1 -1
- package/dist/types/components/input-text/types.d.ts +6 -6
- package/dist/types/components/link/shadow.d.ts +5 -5
- package/dist/types/components/link/types.d.ts +13 -13
- package/dist/types/components/link-button/component.d.ts +6 -6
- package/dist/types/components/link-button/types.d.ts +1 -1
- package/dist/types/components/link-group/component.d.ts +2 -2
- package/dist/types/components/link-group/types.d.ts +1 -1
- package/dist/types/components/pagination/component.d.ts +2 -2
- package/dist/types/components/pagination/types.d.ts +1 -1
- package/dist/types/components/quote/shadow.d.ts +2 -2
- package/dist/types/components/select/component.d.ts +5 -5
- package/dist/types/components/select/controller.d.ts +1 -1
- package/dist/types/components/select/types.d.ts +7 -7
- package/dist/types/components/skip-nav/component.d.ts +1 -1
- package/dist/types/components/skip-nav/types.d.ts +1 -1
- package/dist/types/components/spin/component.d.ts +1 -1
- package/dist/types/components/split-button/types.d.ts +1 -1
- package/dist/types/components/tabs/types.d.ts +1 -1
- package/dist/types/components/textarea/component.d.ts +6 -6
- package/dist/types/components/textarea/controller.d.ts +2 -2
- package/dist/types/components/textarea/types.d.ts +6 -6
- package/dist/types/components/toast/component.d.ts +1 -1
- package/dist/types/components/version/test/html.mock.d.ts +1 -1
- package/dist/types/components.d.ts +16 -0
- package/dist/types/types/props/download.d.ts +1 -1
- package/dist/types/types/props/label.d.ts +2 -2
- package/dist/types/utils/reuse.d.ts +1 -0
- package/doc/badge.md +8 -8
- package/doc/button-link.md +1 -1
- package/doc/button.md +1 -1
- package/doc/heading.md +1 -1
- package/doc/icon-icofont.md +1 -1
- package/doc/input-checkbox.md +2 -3
- package/doc/input-color.md +23 -24
- package/doc/input-date.md +29 -30
- package/doc/input-email.md +31 -32
- package/doc/input-file.md +23 -24
- package/doc/input-number.md +30 -31
- package/doc/input-password.md +28 -29
- package/doc/input-radio-group.md +2 -2
- package/doc/input-radio.md +2 -3
- package/doc/input-range.md +2 -3
- package/doc/input-text.md +31 -32
- package/doc/link-button.md +2 -2
- package/doc/link.md +2 -2
- package/doc/pagination.md +1 -1
- package/doc/select.md +2 -3
- package/doc/span.md +1 -1
- package/doc/table.md +1 -1
- package/doc/textarea.md +2 -3
- package/doc/tooltip.md +2 -24
- package/package.json +1 -1
- package/vscode-custom-data.json +3 -3
- package/dist/cjs/align-87240319.js +0 -4
- package/dist/cjs/controller-3492126d.js +0 -4
- package/dist/cjs/controller-60867e49.js +0 -4
- package/dist/cjs/controller-7232329c.js +0 -4
- package/dist/cjs/controller-icon-d9be7156.js +0 -4
- package/dist/cjs/has-closer-cbf7df9a.js +0 -4
- package/dist/cjs/hide-error-d5a25827.js +0 -4
- package/dist/cjs/hide-error-d5a25827.js.map +0 -1
- package/dist/cjs/hide-label-7a3d0993.js +0 -4
- package/dist/cjs/image-source-e3f79fe7.js +0 -4
- package/dist/cjs/label-e669bbca.js.map +0 -1
- package/dist/cjs/open-2879dec7.js +0 -4
- package/dist/cjs/reuse-d70546ae.js.map +0 -1
- package/dist/cjs/rows-2d47c5ab.js +0 -4
- package/dist/cjs/show-ebcd65e3.js +0 -4
- package/dist/cjs/tooltip-align-e4c65102.js +0 -4
- package/dist/components/alternative-button-link-role.js +0 -4
- package/dist/components/alternative-button-link-role.js.map +0 -1
- package/dist/components/hide-error.js +0 -4
- package/dist/components/hide-error.js.map +0 -1
- package/dist/esm/hide-error-b281fd9e.js +0 -4
- package/dist/esm/hide-error-b281fd9e.js.map +0 -1
- package/dist/esm/label-9b9b703d.js.map +0 -1
- package/dist/esm/reuse-3698e2f5.js.map +0 -1
- package/dist/esm/tooltip-align-4eae0989.js +0 -4
- package/dist/esm/validation-1f72f65c.js +0 -4
- package/dist/kolibri/align-c607f8b8.js +0 -4
- package/dist/kolibri/app-globals-9b8e788b.js +0 -4
- package/dist/kolibri/aria-current-43ddf090.js +0 -4
- package/dist/kolibri/controller-7fe5bd61.js +0 -4
- package/dist/kolibri/controller-c59b1620.js +0 -4
- package/dist/kolibri/controller-icon-6b7cd7a9.js +0 -4
- package/dist/kolibri/devtools-f2da2eb9.js +0 -4
- package/dist/kolibri/has-closer-5a9a536a.js +0 -4
- package/dist/kolibri/hide-error-b281fd9e.js +0 -4
- package/dist/kolibri/hide-label-59a26d29.js +0 -4
- package/dist/kolibri/image-source-a77aeccd.js +0 -4
- package/dist/kolibri/label-9b9b703d.js +0 -4
- package/dist/kolibri/label-9b9b703d.js.map +0 -1
- package/dist/kolibri/open-e56c98fc.js +0 -4
- package/dist/kolibri/reuse-3698e2f5.js +0 -4
- package/dist/kolibri/reuse-3698e2f5.js.map +0 -1
- package/dist/kolibri/rows-d290d492.js +0 -4
- package/dist/kolibri/show-77b7321a.js +0 -4
- package/dist/kolibri/suggestions-715eaf21.js +0 -4
- package/dist/kolibri/tooltip-align-4eae0989.js +0 -4
- package/dist/kolibri/validation-1f72f65c.js +0 -4
- /package/dist/kolibri/{a11y.tipps-a762de67.js.map → a11y.tipps-d5e71271.js.map} +0 -0
- /package/dist/kolibri/{align-c607f8b8.js.map → align-af5d7662.js.map} +0 -0
- /package/dist/kolibri/{alignment-17830483.js.map → alignment-40963ad9.js.map} +0 -0
- /package/dist/kolibri/{app-globals-9b8e788b.js.map → app-globals-28e273ea.js.map} +0 -0
- /package/dist/kolibri/{aria-current-43ddf090.js.map → aria-current-0d0f1e03.js.map} +0 -0
- /package/dist/kolibri/{color-17311985.js.map → color-9d685da7.js.map} +0 -0
- /package/dist/kolibri/{controller-633c9c70.js.map → controller-8f20ca63.js.map} +0 -0
- /package/dist/kolibri/{controller-icon-6b7cd7a9.js.map → controller-icon-290445e9.js.map} +0 -0
- /package/dist/kolibri/{custom-class-a6ec1ec1.js.map → custom-class-010ba23e.js.map} +0 -0
- /package/dist/kolibri/{has-closer-5a9a536a.js.map → has-closer-dde3d380.js.map} +0 -0
- /package/dist/kolibri/{hide-label-59a26d29.js.map → hide-label-69fa12aa.js.map} +0 -0
- /package/dist/kolibri/{i18n-8cbc1706.js.map → i18n-e8d84b26.js.map} +0 -0
- /package/dist/kolibri/{icon-0b0a0629.js.map → icon-5329489f.js.map} +0 -0
- /package/dist/kolibri/{image-source-a77aeccd.js.map → image-source-6b5f8563.js.map} +0 -0
- /package/dist/kolibri/{open-e56c98fc.js.map → open-18b6a394.js.map} +0 -0
- /package/dist/kolibri/{prop.validators-761de71b.js.map → prop.validators-86c144b1.js.map} +0 -0
- /package/dist/kolibri/{rows-d290d492.js.map → rows-13a217bd.js.map} +0 -0
- /package/dist/kolibri/{show-77b7321a.js.map → show-1223e4b7.js.map} +0 -0
- /package/dist/kolibri/{suggestions-715eaf21.js.map → suggestions-94063690.js.map} +0 -0
- /package/dist/kolibri/{tab-index-ce0ee8db.js.map → tab-index-e9b61515.js.map} +0 -0
- /package/dist/kolibri/{validation-bd9dad37.js.map → validation-4ded4ab0.js.map} +0 -0
- /package/dist/kolibri/{validation-1f72f65c.js.map → validation-b9c1d8b0.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{w as watchValidator}from"./prop.validators-
|
|
4
|
+
import{w as watchValidator}from"./prop.validators-86c144b1.js";const watchHeadingLevel=(e,a)=>{watchValidator(e,"_level",(e=>"number"==typeof e&&0<=e&&e<=6),new Set(["Number {0, 1, 2, 3, 4, 5, 6}"]),a,{defaultValue:1,required:!0})};export{watchHeadingLevel as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"validation-
|
|
1
|
+
{"file":"validation-4ded4ab0.js","mappings":";;;;;MAIa,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAc;EACrF,cAAc,CACb,SAAS,EACT,QAAQ,EACR,CAAC,KAAK;IACL,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC,CAAC;GAC7D,EACD,IAAI,GAAG,CAAC,CAAC,8BAA8B,CAAC,CAAC,EACzC,KAAK,EACL;IAEC,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,IAAI;GACd,CACD,CAAC;AACH;;;;","names":[],"sources":["src/components/heading/validation.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport const watchHeadingLevel = (component: Generic.Element.Component, value?: number): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_level',\n\t\t(value): boolean => {\n\t\t\treturn typeof value === 'number' && 0 <= value && value <= 6;\n\t\t},\n\t\tnew Set(['Number {0, 1, 2, 3, 4, 5, 6}']),\n\t\tvalue,\n\t\t{\n\t\t\t// TODO: options not in the validator\n\t\t\tdefaultValue: 1,\n\t\t\trequired: true,\n\t\t}\n\t);\n};\n"],"version":3}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{c as uiUxHintMillerscheZahl}from"./a11y.tipps-d5e71271.js";import{c as watchJsonArrayString}from"./prop.validators-86c144b1.js";const watchNavLinks=(t,s,a)=>{watchJsonArrayString(s,"_links",(t=>"object"==typeof t&&("string"==typeof t._href||"string"==typeof t._label)),a),uiUxHintMillerscheZahl(t,s.state._links.length)};export{watchNavLinks as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"validation-
|
|
1
|
+
{"file":"validation-b9c1d8b0.js","mappings":";;;;;;MAUa,aAAa,GAAG,CAC5B,SAAiB,EACjB,SAIC,EACD,KAAsC;EAEtC,oBAAoB,CACnB,SAAS,EACT,QAAQ,EACR,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,KAAK,OAAQ,IAAiB,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAQ,IAAkB,CAAC,MAAM,KAAK,QAAQ,CAAC,EACtI,KAAK,CACL,CAAC;EACF,sBAAsB,CAAC,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAClE;;;;","names":[],"sources":["src/components/nav/validation.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { Stringified } from '../../types/common';\nimport { HrefProp } from '../../types/props/href';\nimport { LabelProp } from '../../types/props/label';\nimport { uiUxHintMillerscheZahl } from '../../utils/a11y.tipps';\nimport { watchJsonArrayString } from '../../utils/prop.validators';\n\ntype HrefOrLabelProp = HrefProp | LabelProp;\n\nexport const watchNavLinks = (\n\tclassName: string,\n\tcomponent: Generic.Element.Component & {\n\t\tstate: {\n\t\t\t_links: HrefOrLabelProp[];\n\t\t};\n\t},\n\tvalue?: Stringified<HrefOrLabelProp[]>\n): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_links',\n\t\t(link) => typeof link === 'object' && (typeof (link as HrefProp)._href === 'string' || typeof (link as LabelProp)._label === 'string'),\n\t\tvalue\n\t);\n\tuiUxHintMillerscheZahl(className, component.state._links.length);\n};\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{L as e}from"./dev.utils-
|
|
4
|
+
import{L as e}from"./dev.utils-ee97296f.js";const i=new Set,n=(n,r)=>{(!1===i.has(n)||(null==r?void 0:r.force))&&(i.add(n),e.debug([n].concat((null==r?void 0:r.details)||[]),{classifier:"✋ a11y",overwriteStyle:"; background-color: #09f"}))},o=new Set,r=(n,i)=>{(!1===o.has(n)||(null==i?void 0:i.force))&&(o.add(n),e.warn([n].concat((null==i?void 0:i.details)||[]),{classifier:"🔥 deprecated",overwriteStyle:"; background-color: #f00"}))},t=new Set,s=(n,i)=>{(!1===t.has(n)||(null==i?void 0:i.force))&&(t.add(n),e.debug([n].concat((null==i?void 0:i.details)||[]),{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},l=(n,i)=>{(!1===t.has(n)||(null==i?void 0:i.force))&&(t.add(n),e.warn([n].concat((null==i?void 0:i.details)||[]),{classifier:"💻 dev",overwriteStyle:"; background-color: #f09"}))},a=new Set,d=(n,i=!1,r)=>{(!1===a.has(n)||(null==r?void 0:r.force))&&(a.add(n),n+=!0===i?" ✅":"",e.debug([n].concat((null==r?void 0:r.details)||[]),{classifier:"🌟 feature",overwriteStyle:"; background-color: #309"}))};s("Wir freuen uns über jedes Feedback, Kommentare, Screenshots oder Demo-Links von einer auf KoliBri-basierenden Anwendung (kolibri@itzbund.de). Vielen Dank!");const c=new Set,u=(n,i)=>{(!1===c.has(n)||(null==i?void 0:i.force))&&(c.add(n),e.debug([n].concat((null==i?void 0:i.details)||[]),{classifier:"📑 ui/ux",overwriteStyle:"; background-color: #060;"}))},v=()=>{n('"Disabled" schränkt die Zugänglichkeit und Sichtbarkeit ein. Wir empfehlen aus Sicht der Barrierefreiheit readonly- statt disabled-Attribut zu verwenden.\n- https://uxdesign.cc/is-it-ok-to-grey-out-disabled-buttons-8afa74a0fae')},f=e=>{"string"==typeof e&&""!==e||n("Manche Strukturelemente, wie bspw. der nav-Tag, können mehrfach in einer Webseite verwendet werden. Damit die gleichnamigen Strukturelemente voneinander unterschieden werden können, ist es erforderlich ein Aria-Label zu setzen.\n- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role#accessibility_concerns")},h=(e,n=8)=>{n>7&&u(`[${e}] Innerhalb von Navigationsstrukturen wird empfohlen nicht mehr als 7 Menüpunkte zu verwenden.\n\nLinks:\n- https://de.ryte.com/wiki/Millersche_Zahl\n- https://de.wikipedia.org/wiki/Millersche_Zahl`)};export{n as a,f as b,h as c,s as d,r as e,d as f,v as g,l as h,u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{w as t}from"./prop.validators-
|
|
4
|
+
import{w as t}from"./prop.validators-86c144b1.js";const o=new Set(['"left", "right"']),e=new Set(['"bottom", "top"']),s=new Set([...o,...e]),n=(o,e,p)=>{t(o,e,(t=>"bottom"===t||"left"===t||"right"===t||"top"===t),s,p,{defaultValue:"top"})};export{n as v};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{a as o}from"./index-c51a2b6f.js";import{r as e}from"./index-98978c65.js";import{L as s}from"./dev.utils-ee97296f.js";import{p as t}from"./reuse-b3566e4c.js";import{s as i,g as r}from"./index-d49940eb.js";const a=async()=>{o((o=>(o.shadowRoot instanceof ShadowRoot&&i(o,r(o)),"default"))),await e([],[]),import("./devtools-0840683e.js").then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{s.error(o)})),t&&import("./index-e51de689.js")},f=a;export{f as g};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{d as a,w as t}from"./prop.validators-86c144b1.js";const o=(t,e)=>{a(t,"_role",e)},s=(t,e)=>{a(t,"_ariaControls",e)},e=(a,e,o)=>{t(a,e,(a=>"date"===a||"location"===a||"page"===a||"step"===a||"time"===a||!0===a||!1===a),new Set(["String {data, location, page, step, time}","boolean"]),o)},r=(a,t)=>{e(a,"_ariaCurrent",t)},n=(a,t)=>{e(a,"_listenAriaCurrent",t)};export{r as a,n as b,o as c,s as v};
|
package/dist/kolibri/{associated.controller-1c434851.js → associated.controller-bcd8b030.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{d as t}from"./prop.validators-
|
|
4
|
+
import{d as t}from"./prop.validators-86c144b1.js";import{d as e,h as i}from"./a11y.tipps-d5e71271.js";import{b as s}from"./dev.utils-ee97296f.js";const o=(e,o,i)=>{t(e,"_name",o,i)},n=s();class a{constructor(t,o,i){var s,a;if(this.setFormAssociatedValue=t=>{var o;const i=null===(o=this.formAssociated)||void 0===o?void 0:o.getAttribute("name");null!==i&&""!==i||e(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);const s=this.tryToStringifyValue(t);this.syncValue(t,s,this.formAssociated),this.syncValue(t,s,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(i),this.name=o,n){switch(null===(s=this.host)||void 0===s||s.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.name){case"button":this.formAssociated=document.createElement("button");break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("aria-hidden","true"),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(a=this.host)||void 0===a||a.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,o){if(n)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==e||e.setAttribute(t,`${o}`)}catch(o){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return i(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){if(o)if("select"===this.name)o.querySelectorAll("option").forEach((t=>{o.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),o.appendChild(t)}}));else"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value="")}validateName(t){o(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&e("Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateSyncValueBySelector(t){if(n&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}export{a as A};
|
package/dist/kolibri/{associated.controller-1c434851.js.map → associated.controller-bcd8b030.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["validateName","component","value","options","watchString","EXPERIMENTAL_MODE","getExperimentalMode","AssociatedInputController","constructor","name","host","this","setFormAssociatedValue","rawValue","_a","formAssociated","getAttribute","devHint","strValue","tryToStringifyValue","syncValue","syncToOwnInput","findHostWithShadowRoot","querySelectorAll","forEach","el","removeChild","document","createElement","setAttribute","_b","appendChild","shadowRoot","body","parentNode","qualifiedName","element","JSON","stringify","Error","e","removeAttribute","toString","undefined","devWarning","associatedElement","Array","isArray","rawValueItem","strValueItem","option","hooks","afterPatch","state","_name","validateSyncValueBySelector","input","querySelector","componentWillLoad","_syncValueBySelector"],"sources":["src/types/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchString, WatchStringOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { NamePropType, validateName } from '../../types/props/name';\nimport { StencilUnknown } from '../../types/unknown';\nimport { devHint, devWarning } from '../../utils/a11y.tipps';\nimport { getExperimentalMode } from '../../utils/dev.utils';\nimport { PropSyncValueBySelector, SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\n\nconst EXPERIMENTAL_MODE = getExperimentalMode();\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly name: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.name = name;\n\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'button':\n\t\t\t\t\tthis.formAssociated = document.createElement('button');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('aria-hidden', 'true');\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.`\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (EXPERIMENTAL_MODE && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n"],"mappings":";;;kJAeO,MAAMA,EAAe,CAACC,EAAsCC,EAAsBC,KACxFC,EAAYH,EAAW,QAASC,EAAOC,EAAQ,ECRhD,MAAME,EAAoBC,I,MASbC,EAQZ,WAAAC,CAAmBP,EAA8CQ,EAAcC,G,QAoF/DC,KAAAC,uBAA0BC,I,MACzC,MAAMJ,GAAOK,EAAAH,KAAKI,kBAAc,MAAAD,SAAA,SAAAA,EAAEE,aAAa,QAC/C,GAAIP,IAAS,MAAQA,IAAS,GAAI,CACjCQ,EAAQ,oBAAoBN,KAAKF,6F,CAElC,MAAMS,EAAWP,KAAK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,CACnD,MAAMsD,EAAQ7B,SAAS8B,cAAcvD,GACrC,GAAIsD,EAA6C,CAChD7C,KAAKU,eAAiBmC,C,GAKlB,iBAAAE,GACN/C,KAAKX,aAAaW,KAAKV,UAAUqD,OACjC3C,KAAK4C,4BAA4B5C,KAAKV,UAAU0D,qB"}
|
|
1
|
+
{"version":3,"names":["validateName","component","value","options","watchString","EXPERIMENTAL_MODE","getExperimentalMode","AssociatedInputController","constructor","name","host","this","setFormAssociatedValue","rawValue","_a","formAssociated","getAttribute","devHint","strValue","tryToStringifyValue","syncValue","syncToOwnInput","findHostWithShadowRoot","querySelectorAll","forEach","el","removeChild","document","createElement","setAttribute","_b","appendChild","shadowRoot","body","parentNode","qualifiedName","element","JSON","stringify","Error","e","removeAttribute","toString","undefined","devWarning","associatedElement","Array","isArray","rawValueItem","strValueItem","option","hooks","afterPatch","state","_name","validateSyncValueBySelector","input","querySelector","componentWillLoad","_syncValueBySelector"],"sources":["src/types/props/name.ts","src/components/input-adapter-leanup/associated.controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchString, WatchStringOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type NamePropType = string;\n\n/**\n * Defines the technical name of an input field.\n */\nexport type PropName = {\n\tname: NamePropType;\n};\n\n/* validator */\nexport const validateName = (component: Generic.Element.Component, value?: NamePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_name', value, options);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { NamePropType, validateName } from '../../types/props/name';\nimport { PropSyncValueBySelector, SyncValueBySelectorPropType } from '../../types/props/sync-value-by-selector';\nimport { StencilUnknown } from '../../types/unknown';\nimport { devHint, devWarning } from '../../utils/a11y.tipps';\nimport { getExperimentalMode } from '../../utils/dev.utils';\n\nconst EXPERIMENTAL_MODE = getExperimentalMode();\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tname: string;\n} & PropSyncValueBySelector;\ntype Props = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype Watches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprotected readonly name: string;\n\tprotected readonly host?: HTMLElement;\n\n\tpublic readonly formAssociated?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\tpublic syncToOwnInput?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tthis.component = component;\n\t\tthis.host = this.findHostWithShadowRoot(host);\n\t\tthis.name = name;\n\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\tthis.host?.querySelectorAll('input,select,textarea').forEach((el) => {\n\t\t\t\tthis.host?.removeChild(el);\n\t\t\t});\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'button':\n\t\t\t\t\tthis.formAssociated = document.createElement('button');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'select':\n\t\t\t\t\tthis.formAssociated = document.createElement('select');\n\t\t\t\t\tthis.formAssociated.setAttribute('multiple', '');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\tthis.formAssociated = document.createElement('textarea');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.formAssociated = document.createElement('input');\n\t\t\t\t\tthis.formAssociated.setAttribute('type', 'hidden');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.formAssociated.setAttribute('aria-hidden', 'true');\n\t\t\tthis.formAssociated.setAttribute('data-form-associated', '');\n\t\t\tthis.formAssociated.setAttribute('hidden', '');\n\t\t\tthis.host?.appendChild(this.formAssociated);\n\t\t}\n\t}\n\n\t/**\n\t * The associated elements must not reside within the ShadowRoot and must\n\t * reside as children in the host to be recognized by native forms.\n\t */\n\tprivate findHostWithShadowRoot(host?: HTMLElement): HTMLElement | undefined {\n\t\twhile (host?.shadowRoot === null && host !== document.body) {\n\t\t\thost = host?.parentNode as HTMLElement;\n\t\t\tif ((host as unknown as ShadowRoot).host) {\n\t\t\t\thost = (host as unknown as ShadowRoot).host as HTMLElement;\n\t\t\t}\n\t\t}\n\t\treturn host;\n\t}\n\n\tprotected setAttribute(qualifiedName: string, element?: HTMLElement, value?: string | number | boolean) {\n\t\tif (EXPERIMENTAL_MODE) {\n\t\t\ttry {\n\t\t\t\tvalue = typeof value === 'object' && value !== null ? JSON.stringify(value) : value;\n\t\t\t\tif (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string') {\n\t\t\t\t\telement?.setAttribute(qualifiedName, `${value as string}`);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`Invalid value type: ${typeof value}`);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\telement?.removeAttribute(qualifiedName);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * We need to stringify the value, for the setAttribute method.\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes\n\t * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes#value\n\t *\n\t * TODO: It is possible that the value are a cyclic object value. So we need a custom\n\t * JSON.stringify method from outside to convert it to string.\n\t */\n\tprivate tryToStringifyValue(value: StencilUnknown): string | null {\n\t\ttry {\n\t\t\treturn typeof value === 'object' && value !== null ? JSON.stringify(value).toString() : value === null || value === undefined ? null : value.toString();\n\t\t} catch (e) {\n\t\t\tdevWarning(`The form field raw value is not able to stringify! ${e as string}`);\n\t\t\treturn '';\n\t\t}\n\t}\n\n\t/**\n\t * We try to support native form-associated custom elements.\n\t *\n\t * @see https://github.com/public-ui/kolibri/discussions/2821\n\t */\n\tpublic readonly setFormAssociatedValue = (rawValue: StencilUnknown) => {\n\t\tconst name = this.formAssociated?.getAttribute('name');\n\t\tif (name === null || name === '') {\n\t\t\tdevHint(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);\n\t\t}\n\t\tconst strValue = this.tryToStringifyValue(rawValue);\n\t\tthis.syncValue(rawValue, strValue, this.formAssociated);\n\t\tthis.syncValue(rawValue, strValue, this.syncToOwnInput);\n\t};\n\n\tprivate syncValue(\n\t\trawValue: StencilUnknown,\n\t\tstrValue: string | null,\n\t\tassociatedElement?: HTMLButtonElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n\t) {\n\t\tif (associatedElement) {\n\t\t\tswitch (this.name) {\n\t\t\t\tcase 'select':\n\t\t\t\t\t(associatedElement as HTMLSelectElement).querySelectorAll('option').forEach((el) => {\n\t\t\t\t\t\t(associatedElement as HTMLSelectElement).removeChild(el);\n\t\t\t\t\t});\n\t\t\t\t\tif (Array.isArray(rawValue)) {\n\t\t\t\t\t\trawValue.forEach((rawValueItem) => {\n\t\t\t\t\t\t\tconst strValueItem = this.tryToStringifyValue(rawValueItem as string);\n\t\t\t\t\t\t\tif (typeof strValueItem === 'string') {\n\t\t\t\t\t\t\t\tconst option = document.createElement('option');\n\t\t\t\t\t\t\t\toption.setAttribute('value', strValueItem);\n\t\t\t\t\t\t\t\toption.setAttribute('selected', '');\n\t\t\t\t\t\t\t\t(associatedElement as HTMLSelectElement).appendChild(option);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (typeof strValue === 'string') {\n\t\t\t\t\t\tassociatedElement.setAttribute('value', strValue);\n\t\t\t\t\t\tassociatedElement.value = strValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassociatedElement.removeAttribute('value');\n\t\t\t\t\t\tassociatedElement.value = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic validateName(value?: NamePropType): void {\n\t\tvalidateName(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('name', this.formAssociated, this.component.state._name as string);\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\tif (typeof value === 'undefined') {\n\t\t\tdevHint(\n\t\t\t\t`Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.`\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tif (EXPERIMENTAL_MODE && typeof value === 'string') {\n\t\t\tconst input = document.querySelector(value) as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;\n\t\t\tif (input /* SSR instanceof HTMLInputElement */) {\n\t\t\t\tthis.syncToOwnInput = input;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateName(this.component._name);\n\t\tthis.validateSyncValueBySelector(this.component._syncValueBySelector);\n\t}\n}\n"],"mappings":";;;kJAeO,MAAMA,EAAe,CAACC,EAAsCC,EAAsBC,KACxFC,EAAYH,EAAW,QAASC,EAAOC,EAAQ,ECRhD,MAAME,EAAoBC,I,MASbC,EAQZ,WAAAC,CAAmBP,EAA8CQ,EAAcC,G,QAoF/DC,KAAAC,uBAA0BC,I,MACzC,MAAMJ,GAAOK,EAAAH,KAAKI,kBAAc,MAAAD,SAAA,SAAAA,EAAEE,aAAa,QAC/C,GAAIP,IAAS,MAAQA,IAAS,GAAI,CACjCQ,EAAQ,oBAAoBN,KAAKF,6F,CAElC,MAAMS,EAAWP,KAAKQ,oBAAoBN,GAC1CF,KAAKS,UAAUP,EAAUK,EAAUP,KAAKI,gBACxCJ,KAAKS,UAAUP,EAAUK,EAAUP,KAAKU,eAAe,EA1FvDV,KAAKV,UAAYA,EACjBU,KAAKD,KAAOC,KAAKW,uBAAuBZ,GACxCC,KAAKF,KAAOA,EAEZ,GAAIJ,EAAmB,EACtBS,EAAAH,KAAKD,QAAI,MAAAI,SAAA,SAAAA,EAAES,iBAAiB,yBAAyBC,SAASC,I,OAC7DX,E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as r,w as a}from"./prop.validators-
|
|
4
|
+
import{r as e,b as r,w as a}from"./prop.validators-86c144b1.js";import{a as t}from"./a11y.tipps-d5e71271.js";var n={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l=i,o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function i(e){var r,a,t=[],l=1;if("string"==typeof e)if(e=e.toLowerCase(),n[e])t=n[e].slice(),a="rgb";else if("transparent"===e)l=0,a="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1);l=1,(g=i.length)<=4?(t=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],4===g&&(l=parseInt(i[3]+i[3],16)/255)):(t=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],8===g&&(l=parseInt(i[6]+i[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),a="rgb"}else if(r=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var s=r[1],u="rgb"===s;a=i=s.replace(/a$/,"");var g="cmyk"===i?4:"gray"===i?1:3;t=r[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,r){if(/%$/.test(e))return r===g?parseFloat(e)/100:"rgb"===i?255*parseFloat(e)/100:parseFloat(e);if("h"===i[r]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==o[e])return o[e]}return parseFloat(e)})),s===i&&t.push(1),l=u||void 0===t[g]?1:t[g],t=t.slice(0,g)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(t=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),a=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(t=[e[0],e[1],e[2]],a="rgb",l=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(a="rgb",t=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",t=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),l=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(l/=100)):(a="rgb",t=[e>>>16,(65280&e)>>>8,255&e]);return{space:a,values:t,alpha:l}}var s=function(e){var r;Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var a=l(e);if(!a.space)return[];var o=[0,0,0],t="h"===a.space[0]?[360,100,100]:[255,255,255];return(r=Array(3))[0]=Math.min(Math.max(a.values[0],o[0]),t[0]),r[1]=Math.min(Math.max(a.values[1],o[1]),t[1]),r[2]=Math.min(Math.max(a.values[2],o[2]),t[2]),"h"===a.space[0]&&(r=u(r)),r.push(Math.min(Math.max(a.alpha,0),1)),r};function u(e){var r,a,o,t,n,l=e[0]/360,i=e[1]/100,s=e[2]/100,u=0;if(0===i)return[n=255*s,n,n];for(r=2*s-(a=s<.5?s*(1+i):s+i-s*i),t=[0,0,0];u<3;)(o=l+1/3*-(u-1))<0?o++:o>1&&o--,n=6*o<1?r+6*(a-r)*o:2*o<1?a:3*o<2?r+(a-r)*(2/3-o)*6:r,t[u++]=255*n;return t}const g=(e,r,a)=>(299*e+587*r+114*a)/1e3>=128?-1:1,f=(a,o,t,n=1)=>{const l=[Math.max(Math.min(Math.round(o[0]+n*Math.max(1,o[0]/100)),255),0),Math.max(Math.min(Math.round(o[1]+n*Math.max(1,o[1]/100)),255),0),Math.max(Math.min(Math.round(o[2]+n*Math.max(1,o[2]/100)),255),0)],i=r(e.hex(`rgba(${a.join(",")},1)`),e.hex(`rgba(${l.join(",")},1)`)),s=l[0]+l[1]+l[2];return 0===s||765===s||i>t?{background:a,foreground:l,contrast:i}:f(a,l,t,n)},d=new Map,c=(e,r,a,o=1)=>{if(d.has(e))return d.get(e);const t=f(e,r,a,o);return d.set(e,t),t},p=(r,a=7)=>{let o=[0,0,0,1],t=[255,255,255,1];"string"==typeof r?(o=s(r),t=o):"object"==typeof r&&null!==r&&"string"==typeof r.background&&"string"==typeof r.foreground&&(o=s(r.background),t="string"==typeof r.foreground?s(r.foreground):o);const n=g(o[0],o[1],o[2]),l=c([o[0],o[1],o[2]],[t[0],t[1],t[2]],a,n);return t=[...l.foreground,1],{background:e.hex(`rgba(${o.join(",")})`),foreground:e.hex(`rgba(${t.join(",")})`),contrast:l.contrast}},h=/^#((\d|[a-f]){8}|(\d|[a-f]){6}|(\d|[a-f]){3,4})$/i;function y(e){return h.test(e)}function b(e){if(e.startsWith("{"))try{const r=JSON.parse(e);if(m(r))return{type:"ColorPair",value:r};if(k(r))return{type:"DeprecatedColorPair",value:r}}catch(e){return{type:null,value:null}}return{type:null,value:null}}function v(e){if(e)if("string"==typeof e){if(y(e))return{type:"string",valid:!0,value:e};{const r=b(e);if(r.value)return{type:r.type,valid:!0,value:r.value}}}else{const r=e;if(m(r))return{type:"ColorPair",valid:!0,value:r};const a=e;if(k(a))return{type:"DeprecatedColorPair",valid:!0,value:a}}return{type:null,valid:!1,value:""}}function m(e){return!("object"!=typeof e||!e||"string"!=typeof e.backgroundColor||!("string"==typeof e.foregroundColor||e.foregroundColor&&"string"==typeof e.foregroundColor.primary&&"string"==typeof e.foregroundColor.secondary&&"string"==typeof e.foregroundColor.neutral))}function k(e){return"object"==typeof e&&e&&"string"==typeof e.backgroundColor&&"string"==typeof e.color}function w(e){const r=v(e);switch(r.type){case null:return!1;case"string":case"ColorPair":case"DeprecatedColorPair":return r.valid}}const M=(e,r,o)=>{a(e,"_color",w,new Set(["rgb in hex","ColorPair"]),r,o)},$=e=>{var r;let a;const o=v(e);switch(o.type){case"string":a=p(o.value);break;case"ColorPair":case"DeprecatedColorPair":{const e=o.value,t=o.value;let n="";t.color?n=t.color:"string"==typeof e.foregroundColor?n=e.foregroundColor:(null===(r=e.foregroundColor)||void 0===r?void 0:r.primary)&&(n=e.foregroundColor.primary),n&&"string"==typeof n||(n="#fff"),a=p({background:e.backgroundColor,foreground:n});break}case null:console.warn(`_color was empty or invalid (${JSON.stringify(e)})`),a=p({background:"#000",foreground:"#000"})}return a.contrast<7&&t(`[KolBadge] The contrast of ${a.contrast} (≥7, AAA) is to low, between the color pair ${a.background} and ${a.foreground}.`),{backgroundColor:a.background,foregroundColor:a.foreground}};export{s as c,$ as h,M as v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{d as e}from"./a11y.tipps-
|
|
4
|
+
import{d as e}from"./a11y.tipps-d5e71271.js";import{b as o}from"./dev.utils-ee97296f.js";import{f as t,K as n}from"./prop.validators-86c144b1.js";const i=t=>{for(o()&&(e("↓ Search form element start."),console.log(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&"KOL-FORM"!==t.tagName;)t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null,o()&&console.log(t);return o()&&e("↑ Search form element finished."),t},s=(e={})=>{var o,a;const s=i(e.form);if(s instanceof HTMLElement){const e=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===s.tagName)t(e,s),s.dispatchEvent(e);else if("KOL-FORM"===s.tagName){t(e,n.querySelector("form",s));const i=s;"function"==typeof(null===(o=i._on)||void 0===o?void 0:o.onReset)&&(null===(a=i._on)||void 0===a||a.onReset(e))}}},f=(e={})=>{var o,a;const s=i(e.form);if(s instanceof HTMLElement){const e=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:s});if("FORM"===s.tagName)t(e,s),s.dispatchEvent(e);else if("KOL-FORM"===s.tagName){t(e,n.querySelector("form",s));const i=s;"function"==typeof(null===(o=i._on)||void 0===o?void 0:o.onSubmit)&&(null===(a=i._on)||void 0===a||a.onSubmit(e))}}};export{s as a,f as p};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{v as
|
|
4
|
+
import{v as t,I as s}from"./controller-b7f0906a.js";import{v as e}from"./controller-b5d2a6f6.js";import{v as r}from"./suggestions-94063690.js";import{a as i}from"./a11y.tipps-d5e71271.js";import{w as o}from"./prop.validators-86c144b1.js";class a extends s{constructor(t,o,e){super(t,o,e),this.component=t}validateHideError(t){e(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&i("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateList(){}validateSuggestions(t){r(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions||this.component._list)}}class h extends a{constructor(t,o,e){super(t,o,e),this.hasError=!1,this.component=t}validateType(t){o(this.component,"_type",(t=>"string"==typeof t&&("text"===t||"search"===t||"url"===t||"tel"===t)),new Set(["String {text, search, url, tel}"]),t)}validateHasCounter(o){t(this.component,o)}componentWillLoad(){super.componentWillLoad(),this.validateHideError(this.component._hideError),this.validateType(this.component._type),this.validateHasCounter(this.component._hasCounter)}}export{a as I,h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["InputTextEmailController","InputPasswordController","constructor","component","name","host","super","this","validateHideError","value","hooks","afterPatch","state","_hideError","a11yHint","validateList","validateSuggestions","componentWillLoad","_suggestions","_list","InputTextController","hasError","validateType","watchValidator","Set","validateHasCounter","_type","_hasCounter"],"sources":["src/components/input-text/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { Stringified } from '../../types/common';\nimport { InputTextType } from '../../types/input/control/text';\nimport { validateHasCounter } from '../../types/props/has-counter';\nimport { PropLabelWithExpertSlot } from '../../types/props/label';\nimport { PropSuggestions, SuggestionsPropType, validateSuggestions } from '../../types/props/suggestions';\nimport { watchValidator } from '../../utils/prop.validators';\nimport { InputPasswordController } from '../input-password/controller';\nimport { Props as InputTextProps, Watches as InputTextWatches } from './types';\
|
|
1
|
+
{"version":3,"names":["InputTextEmailController","InputPasswordController","constructor","component","name","host","super","this","validateHideError","value","hooks","afterPatch","state","_hideError","a11yHint","validateList","validateSuggestions","componentWillLoad","_suggestions","_list","InputTextController","hasError","validateType","watchValidator","Set","validateHasCounter","_type","_hasCounter"],"sources":["src/components/input-text/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { Stringified } from '../../types/common';\nimport { InputTextType } from '../../types/input/control/text';\nimport { validateHasCounter } from '../../types/props/has-counter';\nimport { HideErrorPropType, validateHideError } from '../../types/props/hide-error';\nimport { PropLabelWithExpertSlot } from '../../types/props/label';\nimport { PropSuggestions, SuggestionsPropType, validateSuggestions } from '../../types/props/suggestions';\nimport { a11yHint } from '../../utils/a11y.tipps';\nimport { watchValidator } from '../../utils/prop.validators';\nimport { InputPasswordController } from '../input-password/controller';\nimport { Props as InputTextProps, Watches as InputTextWatches } from './types';\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\tid: string;\n\tlist: Stringified<string[]>;\n} & PropLabelWithExpertSlot &\n\tPropSuggestions;\ntype InputTextEmailProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputTextEmailWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputTextEmailController extends InputPasswordController implements InputTextEmailWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextEmailProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextEmailProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated remains to satisfy `Watches` interface\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tpublic validateList(): void {}\n\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSuggestions(this.component._suggestions || this.component._list);\n\t}\n}\n\nexport class InputTextController extends InputTextEmailController implements InputTextWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextProps;\n\n\tpublic hasError = false;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateType(value?: InputTextType): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_type',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'text' || value === 'search' || value === 'url' || value === 'tel'),\n\t\t\tnew Set(['String {text, search, url, tel}']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateHasCounter(value?: boolean): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateType(this.component._type);\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t}\n}\n"],"mappings":";;;oPAsBaA,UAAiCC,EAG7C,WAAAC,CAAmBC,EAA4DC,EAAcC,GAC5FC,MAAMH,EAAWC,EAAMC,GACvBE,KAAKJ,UAAYA,C,CAGX,iBAAAK,CAAkBC,GACxBD,EAAkBD,KAAKJ,UAAWM,EAAO,CACxCC,MAAO,CACNC,WAAY,KACX,GAAIJ,KAAKJ,UAAUS,MAAMC,WAAY,CACpCC,EAAS,2G,MAWP,YAAAC,GAAY,CAEZ,mBAAAC,CAAoBP,GAC1BO,EAAoBT,KAAKJ,UAAWM,E,CAG9B,iBAAAQ,GACNX,MAAMW,oBACNV,KAAKS,oBAAoBT,KAAKJ,UAAUe,cAAgBX,KAAKJ,UAAUgB,M,QAI5DC,UAA4BpB,EAKxC,WAAAE,CAAmBC,EAAuDC,EAAcC,GACvFC,MAAMH,EAAWC,EAAMC,GAHjBE,KAAAc,SAAW,MAIjBd,KAAKJ,UAAYA,C,CAGX,YAAAmB,CAAab,GACnBc,EACChB,KAAKJ,UACL,SACCM,UAA0BA,IAAU,WAAaA,IAAU,QAAUA,IAAU,UAAYA,IAAU,OAASA,IAAU,QACzH,IAAIe,IAAI,CAAC,oCACTf,E,CAIK,kBAAAgB,CAAmBhB,GACzBgB,EAAmBlB,KAAKJ,UAAWM,E,CAG7B,iBAAAQ,GACNX,MAAMW,oBACNV,KAAKC,kBAAkBD,KAAKJ,UAAUU,YACtCN,KAAKe,aAAaf,KAAKJ,UAAUuB,OACjCnB,KAAKkB,mBAAmBlB,KAAKJ,UAAUwB,Y"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{a as t,d as i,s,o as e,p as a}from"./prop.validators-86c144b1.js";import{v as h}from"./hide-label-69fa12aa.js";import{a as o}from"./label-8045c28a.js";import{g as r,a as n,d}from"./a11y.tipps-d5e71271.js";import{s as l,t as c}from"./events-2bb1065b.js";import{v as f}from"./tab-index-e9b61515.js";import{A as u}from"./associated.controller-bcd8b030.js";const v=t=>{const o="string"==typeof t._error&&t._error.length>0&&!0===t._touched,e="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===o&&n.push(`${t._id}-error`),!0===e&&n.push(`${t._id}-hint`),{hasError:o,hasHint:e,ariaDescribedBy:n}},p=(o,e,n)=>{t(o,"_hideError",e,n)},b=(o,e)=>{t(o,"_adjustHeight",e)},m=(o,e)=>{t(o,"_touched",e)};class y extends u{constructor(t,o,e){super(t,o,e),this.component=t}validateAlert(o){t(this.component,"_alert",o)}validateTouched(t){m(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class g extends y{constructor(t,o,e){super(t,o,e),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){i(this.component,"_accessKey",t)}validateAdjustHeight(t){b(this.component,t)}validateDisabled(o){t(this.component,"_disabled",o),!0===o&&r()}validateError(t){i(this.component,"_error",t)}validateHideLabel(t){h(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&n("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){i(this.component,"_hint",t)}validateId(t){i(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||d("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){o(this.component,t)}validateOn(t){"object"==typeof t&&s(this.component,"_on",t)}validateSmartButton(t){e(t,(()=>{try{t=a(t)}catch(t){}s(this.component,"_smartButton",t)}))}validateTabIndex(t){f(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var o;this.component._alert=!0,this.component._touched=!0,l(t),c("blur",this.host),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onBlur)&&this.component._on.onBlur(t)}onChange(t){var o;const e=t.target.value;l(t),c("change",this.host,e),this.setFormAssociatedValue(e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e),this.valueChangeListeners.forEach((t=>t(e)))}onClick(t){var o;l(t),c("click",this.host),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onClick)&&this.component._on.onClick(t)}onFocus(t){var o;this.component._alert=!0,l(t),c("focus",this.host),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onFocus)&&this.component._on.onFocus(t)}setValue(t,o){var e;this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}export{g as I,v as g,p as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getRenderStates","state","hasError","_error","length","_touched","hasHint","_hint","ariaDescribedBy","push","_id","validateAdjustHeight","component","value","watchBoolean","validateTouched","ControlledInputController","AssociatedInputController","constructor","name","host","super","this","validateAlert","componentWillLoad","_alert","InputController","valueChangeListeners","onFacade","onBlur","bind","onChange","onClick","onFocus","validateAccessKey","watchString","validateDisabled","a11yHintDisabled","validateError","validateHideLabel","hooks","afterPatch","_hideLabel","a11yHint","validateHint","validateId","setAttribute","formAssociated","minLength","devHint","validateLabel","validateLabelWithExpertSlot","validateOn","setState","validateSmartButton","objectObjectHandler","parseJson","e","validateTabIndex","_accessKey","_adjustHeight","_disabled","_label","_smartButton","_on","_tabIndex","event","stopPropagation","tryToDispatchKoliBriEvent","_a","target","setFormAssociatedValue","forEach","listener","setValue","addValueChangeListener","validateHideError","options"],"sources":["src/components/input/controller.ts","src/types/props/adjust-height.ts","src/types/props/touched.ts","src/components/input-adapter-leanup/controller.ts","src/components/@deprecated/input/controller.ts","src/types/props/hide-error.ts"],"sourcesContent":["import { TouchedPropType } from '../../types/props/touched';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_error?: string;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasError: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst hasError = typeof state._error === 'string' && state._error.length > 0 && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasError === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type AdjustHeightPropType = boolean;\n\n/**\n * Adjusts the height of the element to its content.\n */\nexport type PropAdjustHeight = {\n\tadjustHeight: AdjustHeightPropType;\n};\n\n/* validator */\nexport const validateAdjustHeight = (component: Generic.Element.Component, value?: AdjustHeightPropType): void => {\n\twatchBoolean(component, '_adjustHeight', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type TouchedPropType = boolean;\n\n/**\n * Shows if the input was touched by a user.\n */\nexport type PropTouched = {\n\ttouched: TouchedPropType;\n};\n\n/* validator */\nexport const validateTouched = (component: Generic.Element.Component, value?: TouchedPropType): void => {\n\twatchBoolean(component, '_touched', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { validateTouched } from '../../types/props/touched';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { AssociatedInputController } from './associated.controller';\nimport { Props, Watches } from './types';\n\nexport class ControlledInputController extends AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this.component, '_alert', value);\n\t}\n\n\tpublic validateTouched(value?: boolean): void {\n\t\tvalidateTouched(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAlert(this.component._alert);\n\t\tthis.validateTouched(this.component._touched);\n\t}\n}\n","import { Generic } from '@a11y-ui/core';\n\nimport { InputTypeOnDefault } from '../../../types/input/types';\nimport { AdjustHeightPropType, validateAdjustHeight } from '../../../types/props/adjust-height';\nimport { LabelWithExpertSlotPropType, validateLabelWithExpertSlot } from '../../../types/props/label';\nimport { a11yHint, a11yHintDisabled, devHint } from '../../../utils/a11y.tipps';\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../../utils/events';\nimport { objectObjectHandler, parseJson, setState, watchBoolean, watchString } from '../../../utils/prop.validators';\nimport { validateTabIndex } from '../../../utils/validators/tab-index';\nimport { ControlledInputController } from '../../input-adapter-leanup/controller';\nimport { Props as ButtonProps } from '../../button/types';\nimport { Props as AdapterProps } from '../../input-adapter-leanup/types';\nimport { Props, Watches } from './types';\nimport { validateHideLabel } from '../../../types/props/hide-label';\n\ntype ValueChangeListener = (value: string) => void;\n\nexport class InputController extends ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props & AdapterProps;\n\n\tprivate readonly valueChangeListeners: ValueChangeListener[] = [];\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this.component, '_accessKey', value);\n\t}\n\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tvalidateAdjustHeight(this.component, value);\n\t}\n\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this.component, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\tpublic validateError(value?: string): void {\n\t\twatchString(this.component, '_error', value);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideLabel) {\n\t\t\t\t\t\ta11yHint('Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHint(value?: string): void {\n\t\twatchString(this.component, '_hint', value);\n\t}\n\n\tpublic validateId(value?: string): void {\n\t\twatchString(this.component, '_id', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('id', this.formAssociated, this.component.state._id as string);\n\t\t\t\t},\n\t\t\t},\n\t\t\tminLength: 1,\n\t\t});\n\t\tif (value === '' || typeof value === 'undefined') {\n\t\t\tdevHint(`Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.`);\n\t\t}\n\t}\n\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tvalidateLabelWithExpertSlot(this.component, value);\n\t}\n\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tif (typeof value === 'object') {\n\t\t\tsetState(this.component, '_on', value);\n\t\t}\n\t}\n\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this.component, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAccessKey(this.component._accessKey);\n\t\tthis.validateAdjustHeight(this.component._adjustHeight);\n\t\tthis.validateError(this.component._error);\n\t\tthis.validateDisabled(this.component._disabled);\n\t\tthis.validateHideLabel(this.component._hideLabel);\n\t\tthis.validateHint(this.component._hint);\n\t\tthis.validateId(this.component._id);\n\t\tthis.validateLabel(this.component._label);\n\t\tthis.validateSmartButton(this.component._smartButton);\n\t\tthis.validateOn(this.component._on);\n\t\tthis.validateTabIndex(this.component._tabIndex);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tthis.component._touched = true;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('blur', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onBlur === 'function') {\n\t\t\tthis.component._on.onBlur(event);\n\t\t}\n\t}\n\n\tprotected onChange(event: Event): void {\n\t\tconst value = (event.target as HTMLInputElement).value;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('change', this.host, value);\n\n\t\t// Static form handling\n\t\tthis.setFormAssociatedValue(value);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\t/**\n\t\t\t * TODO\n\t\t\t * Value-Handling muss für InputDate und InputNumber optimiert werden\n\t\t\t * - value\n\t\t\t * - valueAsNumber\n\t\t\t * - valueAsDate\n\t\t\t */\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\n\t\t/**\n\t\t * TODO: Was ist das?\n\t\t */\n\t\tthis.valueChangeListeners.forEach((listener) => listener(value));\n\t}\n\n\tprotected onClick(event: Event): void {\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('click', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onClick === 'function') {\n\t\t\tthis.component._on.onClick(event);\n\t\t}\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.component._alert = true;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('focus', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onFocus === 'function') {\n\t\t\tthis.component._on.onFocus(event);\n\t\t}\n\t}\n\n\tpublic setValue(event: Event, value: string | number | boolean): void {\n\t\tthis.setFormAssociatedValue(value as string);\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tpublic addValueChangeListener(listener: ValueChangeListener) {\n\t\tthis.valueChangeListeners.push(listener);\n\t}\n\n\t/**\n\t * Hinweis: In der Subklasse 'InputPasswordController'\n\t * werden die Methoden onBlur und onFocus\n\t * überschrieben.\n\t * Es werden somit zunächst die Methoden der\n\t * Subklasse ausgeführt und danach die der\n\t * Oberklassen.\n\t */\n\tpublic readonly onFacade = {\n\t\tonBlur: this.onBlur.bind(this),\n\t\tonChange: this.onChange.bind(this),\n\t\tonClick: this.onClick.bind(this),\n\t\tonFocus: this.onFocus.bind(this),\n\t};\n}\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean, WatchBooleanOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type HideErrorPropType = boolean;\n\n/**\n * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n */\nexport type PropHideError = {\n\thideError: HideErrorPropType;\n};\n\n/* validator */\nexport const validateHideError = (component: Generic.Element.Component, value?: HideErrorPropType, options?: WatchBooleanOptions): void => {\n\twatchBoolean(component, '_hideError', value, options);\n};\n"],"mappings":";;;8WASaA,EAAmBC,IAU/B,MAAMC,SAAkBD,EAAME,SAAW,UAAYF,EAAME,OAAOC,OAAS,GAAKH,EAAMI,WAAa,KACnG,MAAMC,SAAiBL,EAAMM,QAAU,UAAYN,EAAMM,MAAMH,OAAS,EAExE,MAAMI,EAA4B,GAClC,GAAIN,IAAa,KAAM,CACtBM,EAAgBC,KAAK,GAAGR,EAAMS,Y,CAE/B,GAAIJ,IAAY,KAAM,CACrBE,EAAgBC,KAAK,GAAGR,EAAMS,W,CAE/B,MAAO,CAAER,WAAUI,UAASE,kBAAiB,ECdvC,MAAMG,EAAuB,CAACC,EAAsCC,KAC1EC,EAAaF,EAAW,gBAAiBC,EAAM,ECDzC,MAAME,EAAkB,CAACH,EAAsCC,KACrEC,EAAaF,EAAW,WAAYC,EAAM,E,MCT9BG,UAAkCC,EAG9C,WAAAC,CAAmBN,EAA8CO,EAAcC,GAC9EC,MAAMT,EAAWO,EAAMC,GACvBE,KAAKV,UAAYA,C,CAGX,aAAAW,CAAcV,GACpBC,EAAaQ,KAAKV,UAAW,SAAUC,E,CAGjC,eAAAE,CAAgBF,GACtBE,EAAgBO,KAAKV,UAAWC,E,CAG1B,iBAAAW,GACNH,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KV,UAAUoD,IAAIjC,SAASmC,EAAOrD,E,CAMpCS,KAAKK,qBAAqB6C,SAASC,GAAaA,EAAS5D,I,CAGhD,OAAAmB,CAAQkC,G,MAEjBC,EAAgBD,GAChBE,EAA0B,QAAS9C,KAAKF,MAGxC,WAAWiD,EAAA/C,KAAKV,UAAUoD,OAAG,MAAAK,SAAA,SAAAA,EAAErC,WAAY,WAAY,CACtDV,KAAKV,UAAUoD,IAAIhC,QAAQkC,E,EAInB,OAAAjC,CAAQiC,G,MACjB5C,KAAKV,UAAUa,OAAS,KAGxB0C,EAAgBD,GAChBE,EAA0B,QAAS9C,KAAKF,MAGxC,WAAWiD,EAAA/C,KAAKV,UAAUoD,OAAG,MAAAK,SAAA,SAAAA,EAAEpC,WAAY,WAAY,CACtDX,KAAKV,UAAUoD,IAAI/B,QAAQiC,E,EAItB,QAAAQ,CAASR,EAAcrD,G,MAC7BS,KAAKiD,uBAAuB1D,GAC5B,WAAWwD,EAAA/C,KAAKV,UAAUoD,OAAG,MAAAK,SAAA,SAAAA,EAAEtC,YAAa,WAAY,CACvDT,KAAKV,UAAUoD,IAAIjC,SAASmC,EAAOrD,E,EAI9B,sBAAA8D,CAAuBF,GAC7BnD,KAAKK,qBAAqBlB,KAAKgE,E,QChLpBG,EAAoB,CAAChE,EAAsCC,EAA2BgE,KAClG/D,EAAaF,EAAW,aAAcC,EAAOgE,EAAQ,S"}
|
|
1
|
+
{"version":3,"names":["getRenderStates","state","hasError","_error","length","_touched","hasHint","_hint","ariaDescribedBy","push","_id","validateHideError","component","value","options","watchBoolean","validateAdjustHeight","validateTouched","ControlledInputController","AssociatedInputController","constructor","name","host","super","this","validateAlert","componentWillLoad","_alert","InputController","valueChangeListeners","onFacade","onBlur","bind","onChange","onClick","onFocus","validateAccessKey","watchString","validateDisabled","a11yHintDisabled","validateError","validateHideLabel","hooks","afterPatch","_hideLabel","a11yHint","validateHint","validateId","setAttribute","formAssociated","minLength","devHint","validateLabel","validateLabelWithExpertSlot","validateOn","setState","validateSmartButton","objectObjectHandler","parseJson","e","validateTabIndex","_accessKey","_adjustHeight","_disabled","_label","_smartButton","_on","_tabIndex","event","stopPropagation","tryToDispatchKoliBriEvent","_a","target","setFormAssociatedValue","forEach","listener","setValue","addValueChangeListener"],"sources":["src/components/input/controller.ts","src/types/props/hide-error.ts","src/types/props/adjust-height.ts","src/types/props/touched.ts","src/components/input-adapter-leanup/controller.ts","src/components/@deprecated/input/controller.ts"],"sourcesContent":["import { TouchedPropType } from '../../types/props/touched';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_error?: string;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasError: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst hasError = typeof state._error === 'string' && state._error.length > 0 && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasError === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean, WatchBooleanOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type HideErrorPropType = boolean;\n\n/**\n * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n */\nexport type PropHideError = {\n\thideError: HideErrorPropType;\n};\n\n/* validator */\nexport const validateHideError = (component: Generic.Element.Component, value?: HideErrorPropType, options?: WatchBooleanOptions): void => {\n\twatchBoolean(component, '_hideError', value, options);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type AdjustHeightPropType = boolean;\n\n/**\n * Adjusts the height of the element to its content.\n */\nexport type PropAdjustHeight = {\n\tadjustHeight: AdjustHeightPropType;\n};\n\n/* validator */\nexport const validateAdjustHeight = (component: Generic.Element.Component, value?: AdjustHeightPropType): void => {\n\twatchBoolean(component, '_adjustHeight', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type TouchedPropType = boolean;\n\n/**\n * Shows if the input was touched by a user.\n */\nexport type PropTouched = {\n\ttouched: TouchedPropType;\n};\n\n/* validator */\nexport const validateTouched = (component: Generic.Element.Component, value?: TouchedPropType): void => {\n\twatchBoolean(component, '_touched', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { validateTouched } from '../../types/props/touched';\nimport { watchBoolean } from '../../utils/prop.validators';\nimport { AssociatedInputController } from './associated.controller';\nimport { Props, Watches } from './types';\n\nexport class ControlledInputController extends AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this.component, '_alert', value);\n\t}\n\n\tpublic validateTouched(value?: boolean): void {\n\t\tvalidateTouched(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAlert(this.component._alert);\n\t\tthis.validateTouched(this.component._touched);\n\t}\n}\n","import { Generic } from '@a11y-ui/core';\n\nimport { InputTypeOnDefault } from '../../../types/input/types';\nimport { AdjustHeightPropType, validateAdjustHeight } from '../../../types/props/adjust-height';\nimport { validateHideLabel } from '../../../types/props/hide-label';\nimport { LabelWithExpertSlotPropType, validateLabelWithExpertSlot } from '../../../types/props/label';\nimport { a11yHint, a11yHintDisabled, devHint } from '../../../utils/a11y.tipps';\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../../utils/events';\nimport { objectObjectHandler, parseJson, setState, watchBoolean, watchString } from '../../../utils/prop.validators';\nimport { validateTabIndex } from '../../../utils/validators/tab-index';\nimport { Props as ButtonProps } from '../../button/types';\nimport { ControlledInputController } from '../../input-adapter-leanup/controller';\nimport { Props as AdapterProps } from '../../input-adapter-leanup/types';\nimport { Props, Watches } from './types';\n\ntype ValueChangeListener = (value: string) => void;\n\nexport class InputController extends ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props & AdapterProps;\n\n\tprivate readonly valueChangeListeners: ValueChangeListener[] = [];\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAccessKey(value?: string): void {\n\t\twatchString(this.component, '_accessKey', value);\n\t}\n\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tvalidateAdjustHeight(this.component, value);\n\t}\n\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this.component, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\n\tpublic validateError(value?: string): void {\n\t\twatchString(this.component, '_error', value);\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideLabel) {\n\t\t\t\t\t\ta11yHint('Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHint(value?: string): void {\n\t\twatchString(this.component, '_hint', value);\n\t}\n\n\tpublic validateId(value?: string): void {\n\t\twatchString(this.component, '_id', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tthis.setAttribute('id', this.formAssociated, this.component.state._id as string);\n\t\t\t\t},\n\t\t\t},\n\t\t\tminLength: 1,\n\t\t});\n\t\tif (value === '' || typeof value === 'undefined') {\n\t\t\tdevHint(`Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.`);\n\t\t}\n\t}\n\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tvalidateLabelWithExpertSlot(this.component, value);\n\t}\n\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tif (typeof value === 'object') {\n\t\t\tsetState(this.component, '_on', value);\n\t\t}\n\t}\n\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this.component, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAccessKey(this.component._accessKey);\n\t\tthis.validateAdjustHeight(this.component._adjustHeight);\n\t\tthis.validateError(this.component._error);\n\t\tthis.validateDisabled(this.component._disabled);\n\t\tthis.validateHideLabel(this.component._hideLabel);\n\t\tthis.validateHint(this.component._hint);\n\t\tthis.validateId(this.component._id);\n\t\tthis.validateLabel(this.component._label);\n\t\tthis.validateSmartButton(this.component._smartButton);\n\t\tthis.validateOn(this.component._on);\n\t\tthis.validateTabIndex(this.component._tabIndex);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\tthis.component._alert = true;\n\t\tthis.component._touched = true;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('blur', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onBlur === 'function') {\n\t\t\tthis.component._on.onBlur(event);\n\t\t}\n\t}\n\n\tprotected onChange(event: Event): void {\n\t\tconst value = (event.target as HTMLInputElement).value;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('change', this.host, value);\n\n\t\t// Static form handling\n\t\tthis.setFormAssociatedValue(value);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\t/**\n\t\t\t * TODO\n\t\t\t * Value-Handling muss für InputDate und InputNumber optimiert werden\n\t\t\t * - value\n\t\t\t * - valueAsNumber\n\t\t\t * - valueAsDate\n\t\t\t */\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\n\t\t/**\n\t\t * TODO: Was ist das?\n\t\t */\n\t\tthis.valueChangeListeners.forEach((listener) => listener(value));\n\t}\n\n\tprotected onClick(event: Event): void {\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('click', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onClick === 'function') {\n\t\t\tthis.component._on.onClick(event);\n\t\t}\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.component._alert = true;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('focus', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onFocus === 'function') {\n\t\t\tthis.component._on.onFocus(event);\n\t\t}\n\t}\n\n\tpublic setValue(event: Event, value: string | number | boolean): void {\n\t\tthis.setFormAssociatedValue(value as string);\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\t}\n\n\tpublic addValueChangeListener(listener: ValueChangeListener) {\n\t\tthis.valueChangeListeners.push(listener);\n\t}\n\n\t/**\n\t * Hinweis: In der Subklasse 'InputPasswordController'\n\t * werden die Methoden onBlur und onFocus\n\t * überschrieben.\n\t * Es werden somit zunächst die Methoden der\n\t * Subklasse ausgeführt und danach die der\n\t * Oberklassen.\n\t */\n\tpublic readonly onFacade = {\n\t\tonBlur: this.onBlur.bind(this),\n\t\tonChange: this.onChange.bind(this),\n\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AAQkC,E,EAInB,OAAAjC,CAAQiC,G,MACjB5C,KAAKZ,UAAUe,OAAS,KAGxB0C,EAAgBD,GAChBE,EAA0B,QAAS9C,KAAKF,MAGxC,WAAWiD,EAAA/C,KAAKZ,UAAUsD,OAAG,MAAAK,SAAA,SAAAA,EAAEpC,WAAY,WAAY,CACtDX,KAAKZ,UAAUsD,IAAI/B,QAAQiC,E,EAItB,QAAAQ,CAASR,EAAcvD,G,MAC7BW,KAAKiD,uBAAuB5D,GAC5B,WAAW0D,EAAA/C,KAAKZ,UAAUsD,OAAG,MAAAK,SAAA,SAAAA,EAAEtC,YAAa,WAAY,CACvDT,KAAKZ,UAAUsD,IAAIjC,SAASmC,EAAOvD,E,EAI9B,sBAAAgE,CAAuBF,GAC7BnD,KAAKK,qBAAqBpB,KAAKkE,E"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{a as t,w as s,e,d as i}from"./prop.validators-86c144b1.js";import{v as h}from"./controller-b5d2a6f6.js";import{a}from"./a11y.tipps-d5e71271.js";import{I as o}from"./controller-icon-290445e9.js";const r=(e,o)=>{t(e,"_hasCounter",o)};class n extends o{constructor(t,e,o){super(t,e,o),this.component=t}validateAutoComplete(t){s(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHasCounter(t){r(this.component,t)}validateHideError(t){h(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateMaxLength(t){e(this.component,"_maxLength",t,{min:0})}validatePattern(t){i(this.component,"_pattern",t)}validatePlaceholder(t){i(this.component,"_placeholder",t)}validateReadOnly(e){t(this.component,"_readOnly",e)}validateRequired(e){t(this.component,"_required",e)}validateSize(t){e(this.component,"_size",t,{min:1})}validateValue(t){i(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateHideError(this.component._hideError),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateSize(this.component._size),this.validateValue(this.component._value)}onBlur(t){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(t)}onFocus(t){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(t)}}export{n as I,r as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["validateHasCounter","component","value","watchBoolean","InputPasswordController","InputIconController","constructor","name","host","super","this","validateAutoComplete","watchValidator","Set","validateHideError","hooks","afterPatch","state","_hideError","a11yHint","validateMaxLength","watchNumber","min","validatePattern","watchString","validatePlaceholder","validateReadOnly","validateRequired","validateSize","validateValue","setFormAssociatedValue","_value","componentWillLoad","_autoComplete","_hasCounter","_maxLength","_pattern","_placeholder","_readOnly","_required","_size","onBlur","event","Object","assign","placeholderCache","undefined","onFocus"],"sources":["src/types/props/has-counter.ts","src/components/input-password/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type HasCounterPropType = boolean;\n\n/**\n * Shows the character count on the lower border of the input.\n */\nexport type PropHasCounter = {\n\thasCounter: HasCounterPropType;\n};\n\n/* validator */\nexport const validateHasCounter = (component: Generic.Element.Component, value?: HasCounterPropType): void => {\n\twatchBoolean(component, '_hasCounter', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { InputTypeOnOff } from '../../types/input/types';\nimport { validateHasCounter } from '../../types/props/has-counter';\nimport {
|
|
1
|
+
{"version":3,"names":["validateHasCounter","component","value","watchBoolean","InputPasswordController","InputIconController","constructor","name","host","super","this","validateAutoComplete","watchValidator","Set","validateHideError","hooks","afterPatch","state","_hideError","a11yHint","validateMaxLength","watchNumber","min","validatePattern","watchString","validatePlaceholder","validateReadOnly","validateRequired","validateSize","validateValue","setFormAssociatedValue","_value","componentWillLoad","_autoComplete","_hasCounter","_maxLength","_pattern","_placeholder","_readOnly","_required","_size","onBlur","event","Object","assign","placeholderCache","undefined","onFocus"],"sources":["src/types/props/has-counter.ts","src/components/input-password/controller.ts"],"sourcesContent":["import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type HasCounterPropType = boolean;\n\n/**\n * Shows the character count on the lower border of the input.\n */\nexport type PropHasCounter = {\n\thasCounter: HasCounterPropType;\n};\n\n/* validator */\nexport const validateHasCounter = (component: Generic.Element.Component, value?: HasCounterPropType): void => {\n\twatchBoolean(component, '_hasCounter', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { InputTypeOnOff } from '../../types/input/types';\nimport { validateHasCounter } from '../../types/props/has-counter';\nimport { HideErrorPropType, validateHideError } from '../../types/props/hide-error';\nimport { a11yHint } from '../../utils/a11y.tipps';\nimport { watchBoolean, watchNumber, watchString, watchValidator } from '../../utils/prop.validators';\nimport { InputIconController } from '../@deprecated/input/controller-icon';\nimport { Props, Watches } from './types';\n\nexport class InputPasswordController extends InputIconController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate placeholderCache?: string;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_autoComplete',\n\t\t\t(value): boolean => typeof value === 'string' && (value === 'on' || value === 'off'),\n\t\t\tnew Set(['on | off']),\n\t\t\tvalue\n\t\t);\n\t}\n\n\tpublic validateHasCounter(value?: boolean): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\twatchNumber(this.component, '_maxLength', value, {\n\t\t\tmin: 0,\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\twatchString(this.component, '_pattern', value);\n\t}\n\n\tpublic validatePlaceholder(value?: string): void {\n\t\twatchString(this.component, '_placeholder', value);\n\t}\n\n\tpublic validateReadOnly(value?: boolean): void {\n\t\twatchBoolean(this.component, '_readOnly', value);\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\twatchBoolean(this.component, '_required', value);\n\t}\n\n\tpublic validateSize(value?: number): void {\n\t\twatchNumber(this.component, '_size', value, {\n\t\t\tmin: 1,\n\t\t});\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateSize(this.component._size);\n\t\tthis.validateValue(this.component._value);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\t/**\n\t\t * Beim Screenreader NVDA wird der Placeholder mit\n\t\t * vorgelesen. Somit kann es vorkommen, dass das\n\t\t * Label und der Placeholder vorgelesen werden.\n\t\t *\n\t\t * Aufgrund dessen, dass das Label immer vorgelesen\n\t\t * werden muss, kann das zusätzliche Vorlesen des\n\t\t * Placeholders störend sein.\n\t\t *\n\t\t * Damit beim Fokussieren das \"doppelte\" vorlesen\n\t\t * vermieden werden kann, wird der Placeholder für\n\t\t * den fokussierten Feldstatus entfernt.\n\t\t *\n\t\t * Hinweis: Für alle Nutzenden müssen die all dar-\n\t\t * gestellten Inhalte, also auch der Place-\n\t\t * holder, gleichermaßen zugänglich sein.\n\t\t * Das oben beschriebene Handling erfüllt\n\t\t * diese Anforderung nicht.\n\t\t */\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: this.placeholderCache,\n\t\t};\n\t\tthis.placeholderCache = undefined;\n\t\tsuper.onBlur(event);\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\tthis.placeholderCache = this.component.state._placeholder as string;\n\t\tthis.component.state = {\n\t\t\t...this.component.state,\n\t\t\t_placeholder: undefined,\n\t\t};\n\t\tsuper.onFocus(event);\n\t}\n}\n"],"mappings":";;;+MAeaA,EAAqB,CAACC,EAAsCC,KACxEC,EAAaF,EAAW,cAAeC,EAAM,E,MCNjCE,UAAgCC,EAI5C,WAAAC,CAAmBL,EAA8CM,EAAcC,GAC9EC,MAAMR,EAAWM,EAAMC,GACvBE,KAAKT,UAAYA,C,CAGX,oBAAAU,CAAqBT,GAC3BU,EACCF,KAAKT,UACL,iBACCC,UAA0BA,IAAU,WAAaA,IAAU,MAAQA,IAAU,QAC9E,IAAIW,IAAI,CAAC,aACTX,E,CAIK,kBAAAF,CAAmBE,GACzBF,EAAmBU,KAAKT,UAAWC,E,CAG7B,iBAAAY,CAAkBZ,GACxBY,EAAkBJ,KAAKT,UAAWC,EAAO,CACxCa,MAAO,CACNC,WAAY,KACX,GAAIN,KAAKT,UAAUgB,MAAMC,WAAY,CACpCC,EAAS,2G,MAOP,iBAAAC,CAAkBlB,GACxBmB,EAAYX,KAAKT,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B,OAAAC,OAAAD,OAAAC,OAAA,GAChBlC,KAAKT,UAAUgB,OAAK,CACvBoB,aAAcS,YAEfrC,MAAMsC,QAAQL,E"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{I as t,v as e}from"./controller-b5d2a6f6.js";import{c as s,a as i,w as o,m as r,s as a}from"./prop.validators-86c144b1.js";import{h as n,c as h}from"./label-8045c28a.js";import{a as l}from"./a11y.tipps-d5e71271.js";import{S as f}from"./reuse-b3566e4c.js";const c=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===n(t.label,3)&&!1===h(t.label)&&l(`Ein abweichendes Aria-Label (${t.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`),!Array.isArray(t.options)||void 0===t.options.find((t=>!1===c(t)));if("number"==typeof t.label)return!0}return!1},u=(t,e,o={})=>{s(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,o)},p=(t,e,o={})=>{s(t,"_options",c,e,void 0,o)},d=(t,e)=>{i(t,"_required",e)},m=(t,e,o="")=>{e.forEach(((e,i)=>{const s=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?m(t,e.options,s):t.set(s,e))}))};class b extends t{constructor(t,e,o){super(t,e,o),this.component=t}validateHideError(t){e(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&l("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateRequired(t){d(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class v extends b{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(o)&&o.length>0){this.keyOptionMap.clear(),m(this.keyOptionMap,o);const t=e.has("_value")?e.get("_value"):this.component.state._value;if(!1===this.isValueInOptions(t,o)){const t=o[0].value;e.set("_value",t),this.onStateChange()}}},this.component=t}validateOrientation(t){o(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateOptions(t){u(this.component,t,{hooks:{beforePatch:this.beforePatchOptions}})}validateValue(t){t=r(t),t=Array.isArray(t)?t[0]:t,a(this.component,"_value",t,{beforePatch:this.beforePatchOptions}),this.setFormAssociatedValue(this.component._value)}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(f)}))}},this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options||this.component._list),this.validateHideError(this.component._hideError),this.validateValue(this.component._value)}}export{b as I,v as a,m as f,p as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["validateInputSelectOptions","option","label","length","disabled","trim","hasEnoughReadableChars","containsOnlyNumbers","a11yHint","Array","isArray","options","find","item","undefined","validateOptions","component","value","watchJsonArrayString","validateOptionsWithOptgroup","validateRequired","watchBoolean","fillKeyOptionMap","keyOptionMap","preKey","forEach","index","key","set","InputCheckboxRadioController","InputController","constructor","name","host","super","this","validateHideError","hooks","afterPatch","state","_hideError","componentWillLoad","_required","InputRadioController","Map","getOptionByKey","get","isValueInOptions","beforePatchOptions","_value","nextState","has","_options","clear","newValue","onStateChange","validateOrientation","watchValidator","Set","defaultValue","beforePatch","validateValue","mapString2Unknown","setState","setFormAssociatedValue","onChange","timeout","setTimeout","clearTimeout","STATE_CHANGE_EVENT","_orientation","_list"],"sources":["src/utils/validators/options.ts","src/types/props/options.ts","src/types/props/required.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { Optgroup, SelectOption } from '../../types/input/types';\nimport { containsOnlyNumbers, hasEnoughReadableChars } from '../../types/props/label';\nimport { a11yHint } from '../a11y.tipps';\n\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(\n\t\t\t\t\t`Ein abweichendes Aria-Label (${option.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchJsonArrayString, WatchOptions } from '../../utils/prop.validators';\nimport { validateInputSelectOptions } from '../../utils/validators/options';\nimport { Stringified } from '../common';\nimport { Optgroup, Option } from '../input/types';\nimport { W3CInputValue } from '../w3c';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<W3CInputValue>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<W3CInputValue> | Optgroup<W3CInputValue>)[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\n/**\n * Options the user can choose from, also supporting Optgroup.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<W3CInputValue>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {}\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\ntype RequiredPropType = boolean;\n\n/**\n * Makes the input element required.\n */\nexport type PropRequired = {\n\trequired: RequiredPropType;\n};\n\n/* validator */\nexport const validateRequired = (component: Generic.Element.Component, value?: RequiredPropType): void => {\n\twatchBoolean(component, '_required', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { Stringified } from '../../types/common';\nimport { Optgroup, Option, SelectOption } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\nimport { PropLabelWithExpertSlot } from '../../types/props/label';\nimport { OptionsPropType, validateOptions } from '../../types/props/options';\nimport { validateRequired } from '../../types/props/required';\nimport { StencilUnknown } from '../../types/unknown';\nimport { W3CInputValue } from '../../types/w3c';\nimport { mapString2Unknown, setState, watchValidator } from '../../utils/prop.validators';\nimport { STATE_CHANGE_EVENT } from '../../utils/validator';\nimport { InputController } from '../@deprecated/input/controller';\nimport { Props, Watches } from './types';\nimport { HideErrorPropType, validateHideError } from '../../types/props/hide-error';\nimport { a11yHint } from '../../utils/a11y.tipps';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, Option<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as Option<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\trequired: boolean;\n} & PropLabelWithExpertSlot;\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate onStateChange!: () => void;\n\tprivate readonly keyOptionMap = new Map<string, Option<W3CInputValue>>();\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): Option<W3CInputValue> | undefined => this.keyOptionMap.get(key);\n\n\tprivate readonly isValueInOptions = (value: unknown, options: Option<W3CInputValue>[]): boolean => {\n\t\treturn options.find((option) => option.value === value) !== undefined;\n\t};\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, options as SelectOption<W3CInputValue>[]);\n\t\t\tconst value = nextState.has('_value') ? nextState.get('_value') : this.component.state._value;\n\t\t\tif (this.isValueInOptions(value, options as Option<W3CInputValue>[]) === false) {\n\t\t\t\tconst newValue = (\n\t\t\t\t\toptions[0] as {\n\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t}\n\t\t\t\t).value;\n\t\t\t\tnextState.set('_value', newValue);\n\t\t\t\tthis.onStateChange();\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tvalue = mapString2Unknown(value);\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(onChange?: (event: Event) => void): void {\n\t\tsuper.componentWillLoad();\n\n\t\tthis.onStateChange = () => {\n\t\t\tif (typeof onChange === 'function') {\n\t\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tonChange(STATE_CHANGE_EVENT);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options || this.component._list);\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"mappings":";;;sQAIO,MAAMA,EAAiCC,IAC7C,UAAWA,IAAW,UAAYA,IAAW,KAAM,CAClD,UAAWA,EAAOC,QAAU,UAAYD,EAAOC,MAAMC,OAAS,EAAG,CAChEF,EAAOG,SAAWH,EAAOG,WAAa,KACtCH,EAAOC,MAAQ,GAAGD,EAAOC,QAAQG,OACjC,GAAIC,EAAuBL,EAAOC,MAAO,KAAO,OAASK,EAAoBN,EAAOC,SAAW,MAAO,CACrGM,EACC,gCAAgCP,EAAOC,mH,CAGzC,GAAIO,MAAMC,QAAST,EAAuBU,SAAU,CACnD,OACEV,EAAuBU,QAAQC,MAAMC,GAC9Bb,EAA2Ba,KAAU,UACtCC,S,CAGT,OAAO,I,MACD,UAAWb,EAAOC,QAAU,SAAU,CAC5C,OAAO,I,EAGT,OAAO,KAAK,ECGN,MAAMa,EAAkB,CAACC,EAAsCC,EAAoCN,EAAwB,MACjIO,EACCF,EACA,YACCH,UAAuCA,IAAS,UAAYA,IAAS,aAAeA,EAAKX,QAAU,UAAYW,EAAKX,MAAMC,OAAS,GACpIc,EACAH,UACAH,EACA,E,MAGWQ,EAA8B,CAC1CH,EACAC,EACAN,EAAwB,MAExBO,EAAqBF,EAAW,WAAYhB,EAA4BiB,EAAOH,UAAWH,EAAQ,EC9B5F,MAAMS,EAAmB,CAACJ,EAAsCC,KACtEI,EAAaL,EAAW,YAAaC,EAAM,E,MCC/BK,EAAmB,CAAIC,EAAsCZ,EAA4Ba,EAAS,MAC9Gb,EAAQc,SAAQ,CAACxB,EAAQyB,KACxB,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uB,MAAMU,OACvF,GAAId,KAAKY,iBAAiB9B,EAAON,KAAwC,MAAO,CAC/E,MAAM2C,EACL3C,EAAQ,GAGPM,MACFiC,EAAUtB,IAAI,SAAU0B,GACxBnB,KAAKoB,e,IAtBPpB,KAAKnB,UAAYA,C,CA2BX,mBAAAwC,CAAoBvC,GAC1BwC,EACCtB,KAAKnB,UACL,gBACCC,GAAmBA,IAAU,cAAgBA,IAAU,YACxD,IAAIyC,IAAI,CAAC,uCACTzC,EACA,CACC0C,aAAc,Y,CAKV,eAAA5C,CAAgBE,GACtBF,EAAgBoB,KAAKnB,UAAWC,EAAO,CACtCoB,MAAO,CACNuB,YAAazB,KAAKa,qB,CAKd,aAAAa,CAAc5C,GACpBA,EAAQ6C,EAAkB7C,GAC1BA,EAAQR,MAAMC,QAAQO,GAAUA,EAAM,GAAwBA,EAC9D8C,EAAS5B,KAAKnB,UAAW,SAAUC,EAAO,CACzC2C,YAAazB,KAAKa,qBAEnBb,KAAK6B,uBAAuB7B,KAAKnB,UAAUiC,O,CAGrC,iBAAAR,CAAkBwB,GACxB/B,MAAMO,oBAENN,KAAKoB,cAAgB,KACpB,UAAWU,IAAa,WAAY,CACnC,MAAMC,EAAUC,YAAW,KAC1BC,aAAaF,GACbD,EAASI,EAAmB,G,GAK/BlC,KAAKqB,oBAAoBrB,KAAKnB,UAAUsD,cACxCnC,KAAKpB,gBAAgBoB,KAAKnB,UAAUoC,UAAYjB,KAAKnB,UAAUuD,OAC/DpC,KAAKC,kBAAkBD,KAAKnB,UAAUwB,YACtCL,KAAK0B,cAAc1B,KAAKnB,UAAUiC,O"}
|
|
1
|
+
{"version":3,"names":["validateInputSelectOptions","option","label","length","disabled","trim","hasEnoughReadableChars","containsOnlyNumbers","a11yHint","Array","isArray","options","find","item","undefined","validateOptions","component","value","watchJsonArrayString","validateOptionsWithOptgroup","validateRequired","watchBoolean","fillKeyOptionMap","keyOptionMap","preKey","forEach","index","key","set","InputCheckboxRadioController","InputController","constructor","name","host","super","this","validateHideError","hooks","afterPatch","state","_hideError","componentWillLoad","_required","InputRadioController","Map","getOptionByKey","get","isValueInOptions","beforePatchOptions","_value","nextState","has","_options","clear","newValue","onStateChange","validateOrientation","watchValidator","Set","defaultValue","beforePatch","validateValue","mapString2Unknown","setState","setFormAssociatedValue","onChange","timeout","setTimeout","clearTimeout","STATE_CHANGE_EVENT","_orientation","_list"],"sources":["src/utils/validators/options.ts","src/types/props/options.ts","src/types/props/required.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { Optgroup, SelectOption } from '../../types/input/types';\nimport { containsOnlyNumbers, hasEnoughReadableChars } from '../../types/props/label';\nimport { a11yHint } from '../a11y.tipps';\n\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(\n\t\t\t\t\t`Ein abweichendes Aria-Label (${option.label}) ist nicht barrierefrei. Ein abweichendes Aria-Label sollte aus mindestens drei lesbaren Zeichen bestehen.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchJsonArrayString, WatchOptions } from '../../utils/prop.validators';\nimport { validateInputSelectOptions } from '../../utils/validators/options';\nimport { Stringified } from '../common';\nimport { Optgroup, Option } from '../input/types';\nimport { W3CInputValue } from '../w3c';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<W3CInputValue>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<W3CInputValue> | Optgroup<W3CInputValue>)[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\n/**\n * Options the user can choose from, also supporting Optgroup.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<W3CInputValue>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {}\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\ntype RequiredPropType = boolean;\n\n/**\n * Makes the input element required.\n */\nexport type PropRequired = {\n\trequired: RequiredPropType;\n};\n\n/* validator */\nexport const validateRequired = (component: Generic.Element.Component, value?: RequiredPropType): void => {\n\twatchBoolean(component, '_required', value);\n};\n","import { Generic } from '@a11y-ui/core';\n\nimport { Stringified } from '../../types/common';\nimport { Optgroup, Option, SelectOption } from '../../types/input/types';\nimport { Orientation } from '../../types/orientation';\nimport { HideErrorPropType, validateHideError } from '../../types/props/hide-error';\nimport { PropLabelWithExpertSlot } from '../../types/props/label';\nimport { OptionsPropType, validateOptions } from '../../types/props/options';\nimport { validateRequired } from '../../types/props/required';\nimport { StencilUnknown } from '../../types/unknown';\nimport { W3CInputValue } from '../../types/w3c';\nimport { a11yHint } from '../../utils/a11y.tipps';\nimport { mapString2Unknown, setState, watchValidator } from '../../utils/prop.validators';\nimport { STATE_CHANGE_EVENT } from '../../utils/validator';\nimport { InputController } from '../@deprecated/input/controller';\nimport { Props, Watches } from './types';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, Option<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as Option<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = NonNullable<unknown>;\ntype OptionalProps = {\n\trequired: boolean;\n} & PropLabelWithExpertSlot;\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateRequired(value?: boolean): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate onStateChange!: () => void;\n\tprivate readonly keyOptionMap = new Map<string, Option<W3CInputValue>>();\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): Option<W3CInputValue> | undefined => this.keyOptionMap.get(key);\n\n\tprivate readonly isValueInOptions = (value: unknown, options: Option<W3CInputValue>[]): boolean => {\n\t\treturn options.find((option) => option.value === value) !== undefined;\n\t};\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, options as SelectOption<W3CInputValue>[]);\n\t\t\tconst value = nextState.has('_value') ? nextState.get('_value') : this.component.state._value;\n\t\t\tif (this.isValueInOptions(value, options as Option<W3CInputValue>[]) === false) {\n\t\t\t\tconst newValue = (\n\t\t\t\t\toptions[0] as {\n\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t}\n\t\t\t\t).value;\n\t\t\t\tnextState.set('_value', newValue);\n\t\t\t\tthis.onStateChange();\n\t\t\t}\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: Orientation): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_orientation',\n\t\t\t(value): boolean => value === 'horizontal' || value === 'vertical',\n\t\t\tnew Set(['Orientation {horizontal, vertical}']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\tdefaultValue: 'vertical',\n\t\t\t}\n\t\t);\n\t}\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tvalue = mapString2Unknown(value);\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t\tthis.setFormAssociatedValue(this.component._value as string);\n\t}\n\n\tpublic componentWillLoad(onChange?: (event: Event) => void): void {\n\t\tsuper.componentWillLoad();\n\n\t\tthis.onStateChange = () => {\n\t\t\tif (typeof onChange === 'function') {\n\t\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tonChange(STATE_CHANGE_EVENT);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options || this.component._list);\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"mappings":";;;sQAIO,MAAMA,EAAiCC,IAC7C,UAAWA,IAAW,UAAYA,IAAW,KAAM,CAClD,UAAWA,EAAOC,QAAU,UAAYD,EAAOC,MAAMC,OAAS,EAAG,CAChEF,EAAOG,SAAWH,EAAOG,WAAa,KACtCH,EAAOC,MAAQ,GAAGD,EAAOC,QAAQG,OACjC,GAAIC,EAAuBL,EAAOC,MAAO,KAAO,OAASK,EAAoBN,EAAOC,SAAW,MAAO,CACrGM,EACC,gCAAgCP,EAAOC,mH,CAGzC,GAAIO,MAAMC,QAAST,EAAuBU,SAAU,CACnD,OACEV,EAAuBU,QAAQC,MAAMC,GAC9Bb,EAA2Ba,KAAU,UACtCC,S,CAGT,OAAO,I,MACD,UAAWb,EAAOC,QAAU,SAAU,CAC5C,OAAO,I,EAGT,OAAO,KAAK,ECGN,MAAMa,EAAkB,CAACC,EAAsCC,EAAoCN,EAAwB,MACjIO,EACCF,EACA,YACCH,UAAuCA,IAAS,UAAYA,IAAS,aAAeA,EAAKX,QAAU,UAAYW,EAAKX,MA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AKC,kBAAkBD,KAAKnB,UAAUwB,YACtCL,KAAK0B,cAAc1B,KAAKnB,UAAUiC,O"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
|
3
|
+
*/
|
|
4
|
+
import{i as o}from"./icon-5329489f.js";import{o as t,p as s,w as i}from"./prop.validators-86c144b1.js";import{i as r}from"./reuse-b3566e4c.js";import{I as e}from"./controller-b5d2a6f6.js";const c=(o,t)=>{const e=o;"object"==typeof e&&null!==e&&(r(e.right,1)&&(e.right={icon:e.right}),r(e.left,1)&&(e.left={icon:e.left}),t.set("_icon",e))};class n extends e{constructor(o,t,e){super(o,t,e),this.component=o}validateIcon(e){t(e,(()=>{try{e=s(e)}catch(o){}i(this.component,"_icon",(t=>"object"==typeof t&&null!==t&&(r(t.left,1)||o(t.left)||r(t.right,1)||o(t.right))),new Set(["KoliBriHorizontalIcon"]),e,{hooks:{beforePatch:c},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcon(this.component._icon)}}export{n as I};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{w as a,d as o}from"./prop.validators-
|
|
4
|
+
import{w as a,d as o}from"./prop.validators-86c144b1.js";const r=(o,r)=>{a(o,"_variant",(a=>"primary"===a||"secondary"===a||"normal"===a||"danger"===a||"ghost"===a||"custom"===a),new Set(["KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}"]),r,{defaultValue:"normal"})},s=(a,r)=>{o(a,"_customClass",r,{defaultValue:void 0})};export{r as a,s as v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{p as e}from"./reuse-
|
|
4
|
+
import{p as e}from"./reuse-b3566e4c.js";class t{constructor(){this.lockedElements=new Map,this.modalStack=new Map}lockElement(e){const t=e.getAttribute("tabindex");(e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||"string"==typeof t||void 0!==e.dataset.kolModal)&&("string"==typeof t?this.lockedElements.set(e,{tabIndex:t}):this.lockedElements.set(e,{}),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),e.style.userSelect="none")}unlockElement(e,t){"string"==typeof e.tabIndex?t.setAttribute("tabindex",e.tabIndex):t.removeAttribute("tabindex"),t.removeAttribute("aria-hidden"),t.style.userSelect="unset",this.lockedElements.delete(t)}unlockLockedElements(e){e.forEach(this.unlockElement.bind(this))}lockFocus(e,t){if(e!==t&&(e instanceof HTMLElement||e instanceof ShadowRoot)){e instanceof HTMLElement&&(this.lockElement(e),this.lockFocus(e.shadowRoot,t));for(let n=0;n<e.children.length;n++)this.lockFocus(e.children[n],t)}}renderModalIfExists(e){if(e instanceof HTMLElement){this.lockedElements.has(e)&&this.unlockElement(this.lockedElements.get(e),e);const t=setTimeout((()=>{clearTimeout(t),e.focus()}),500)}if(this.unlockLockedElements(this.lockedElements),this.modalStack.size>0){const e=Array.from(this.modalStack.keys()),t=e[e.length-1];this.modalStack.forEach(((e,n)=>{n.style.display=t===n?"inline":"none"})),l().body.style.maxHeight="100vh",l().body.style.overflow="hidden",this.lockFocus(l().body,t)}else l().body.style.maxHeight="unset",l().body.style.overflow="unset"}openModal(e,t){e instanceof HTMLElement==!1?m.warn("[KolModalService] Die DOM-Referenz des Modals ist nicht valide."):(this.modalStack.set(e,{activeElement:t}),this.renderModalIfExists())}closeModal(e){var t;if(e instanceof HTMLElement==!1)m.warn("[KolModalService] Die DOM-Referenz des Modals ist nicht valide.");else{const n=null===(t=this.modalStack.get(e))||void 0===t?void 0:t.activeElement;this.modalStack.delete(e),this.renderModalIfExists(n)}}}let n=null,i=null;const o=e=>{e instanceof Window?(n=e,n.document instanceof Document?i=e.document:console.warn("The given Window has no valid Document.")):console.warn("The given Window is not valid.")},s=()=>n||"undefined"==typeof window?null:window,l=()=>i||void 0===s().document?null:s().document;let a=null,c=null,r=null,u=null;const d=()=>!0===c,f=()=>!0===r,h=()=>!0===u;class m{static mapToArray(e){return Array.isArray(e)?e:[e]}static handleClassifier(e){return"string"==typeof e&&e.length>0?`${m.shield.label} | ${e}`:m.shield.label}static getShield(e){return[m.handleClassifier(null==e?void 0:e.classifier),`${m.shield.style};${(null==e?void 0:e.overwriteStyle)||""}`]}static debug(e,t){(c||!0===(null==t?void 0:t.forceLog))&&console.debug(...m.getShield(t),...m.mapToArray(e))}static info(e,t){(c||!0===(null==t?void 0:t.forceLog))&&console.info(...m.getShield(t),...m.mapToArray(e))}static trace(e,t){(c||!0===(null==t?void 0:t.forceLog))&&console.trace(...m.getShield(t),...m.mapToArray(e))}static warn(e,t){(c||!0===(null==t?void 0:t.forceLog))&&console.warn(...m.getShield(t),...m.mapToArray(e))}static error(e,t){(c||!0===(null==t?void 0:t.forceLog))&&console.error(...m.getShield(t),...m.mapToArray(e))}static throw(e,t){if(c||!0===(null==t?void 0:t.forceLog))throw new Error(...m.getShield(t),...m.mapToArray(e))}}m.shield={label:"%cKoliBri",style:"color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000"};const v=()=>{if(null===c&&null===r&&null===u){const e=l().querySelector('meta[name="kolibri"]');e&&e.hasAttribute("content")&&(a=e.getAttribute("content"),"string"==typeof a&&(c=a.includes("dev-mode=true"),r=a.includes("experimental-mode=true"),u=a.includes("color-contrast-analysis=true")))}else console.warn("You can only initialize DEV_MODE and COLOR_CONTRAST_ANALYSIS once.")};let p=null;const b=()=>p||{},M=()=>{if(null===p){p=s().KoliBri||{};const e=new t;Object.defineProperty(p,"Modal",{get:function(){return e}}),v(),m.debug("\n\t,--. ,--. ,--. ,--. ,-----. ,--.\n\t| .' / ,---. | | `--' | |) /_ ,--.--. `--'\n\t| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n\t| |\\ \\ | '-' | | | | | | '--' / | | | |\n\t`--' `--´ `---´ `--' `--' `------´ `--' `--'\n\t🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 1.7.0-rc.14\n\t\t",{forceLog:!0})}else console.warn("You can only initialize KoliBri once.")},g=()=>{void 0===s().KoliBri&&Object.defineProperty(window,"KoliBri",{get:function(){return p}}),!0!==b().adviceShown&&(Object.defineProperty(p,"adviceShown",{get:function(){return!0}}),m.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let w=()=>Math.floor(16777215*Math.random()).toString(16);"test"===e&&(w=()=>"nonce");export{p as K,m as L,s as a,f as b,o as c,b as d,d as e,h as f,l as g,M as i,w as n,g as r};
|