@public-ui/components 1.7.21 → 1.7.23
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 +1 -1
- package/dist/cjs/{a11y.tipps-de60af32.js → a11y.tipps-8159ffff.js} +1 -1
- package/dist/cjs/{a11y.tipps-de60af32.js.map → a11y.tipps-8159ffff.js.map} +1 -1
- package/dist/cjs/align-946961b6.js +4 -0
- package/dist/cjs/{align-66d1c455.js.map → align-946961b6.js.map} +1 -1
- package/dist/cjs/{alignment-b17857ef.js → alignment-847ca471.js} +1 -1
- package/dist/cjs/{alignment-b17857ef.js.map → alignment-847ca471.js.map} +1 -1
- package/dist/cjs/{app-globals-89a36103.js → app-globals-a5766dbe.js} +1 -1
- package/dist/cjs/{app-globals-89a36103.js.map → app-globals-a5766dbe.js.map} +1 -1
- package/dist/cjs/aria-current-1c7cd56e.js +4 -0
- package/dist/cjs/{aria-current-065e4fcb.js.map → aria-current-1c7cd56e.js.map} +1 -1
- package/dist/cjs/{associated.controller-46b5c82e.js → associated.controller-fc065c4b.js} +1 -1
- package/dist/cjs/{associated.controller-46b5c82e.js.map → associated.controller-fc065c4b.js.map} +1 -1
- package/dist/cjs/{color-60198a73.js → color-597089fb.js} +1 -1
- package/dist/cjs/{color-60198a73.js.map → color-597089fb.js.map} +1 -1
- package/dist/cjs/{controller-5e2d2585.js → controller-54a71dab.js} +1 -1
- package/dist/cjs/{controller-5e2d2585.js.map → controller-54a71dab.js.map} +1 -1
- package/dist/cjs/{controller-52b374b1.js → controller-54e4d085.js} +1 -1
- package/dist/cjs/{controller-52b374b1.js.map → controller-54e4d085.js.map} +1 -1
- package/dist/cjs/{controller-02dd3be1.js → controller-89cb2700.js} +1 -1
- package/dist/cjs/controller-89cb2700.js.map +1 -0
- package/dist/cjs/{controller-dea3127d.js → controller-953d511c.js} +1 -1
- package/dist/cjs/controller-953d511c.js.map +1 -0
- package/dist/cjs/{controller-592fd301.js → controller-9db0bd8f.js} +1 -1
- package/dist/cjs/{controller-592fd301.js.map → controller-9db0bd8f.js.map} +1 -1
- package/dist/cjs/{controller-icon-c5c4bc3a.js → controller-icon-55545112.js} +1 -1
- package/dist/cjs/{controller-icon-c5c4bc3a.js.map → controller-icon-55545112.js.map} +1 -1
- package/dist/cjs/{custom-class-e4bd4874.js → custom-class-2c1d0656.js} +1 -1
- package/dist/cjs/{custom-class-e4bd4874.js.map → custom-class-2c1d0656.js.map} +1 -1
- package/dist/cjs/{dev.utils-d5ef4f2b.js → dev.utils-903a853d.js} +1 -1
- package/dist/cjs/{dev.utils-d5ef4f2b.js.map → dev.utils-903a853d.js.map} +1 -1
- package/dist/cjs/{devtools-19dffa6e.js → devtools-44386c43.js} +1 -1
- package/dist/cjs/{devtools-19dffa6e.js.map → devtools-44386c43.js.map} +1 -1
- package/dist/cjs/has-closer-a54ef204.js +4 -0
- package/dist/cjs/{has-closer-b8fe05cc.js.map → has-closer-a54ef204.js.map} +1 -1
- package/dist/cjs/hide-label-18c390e4.js +4 -0
- package/dist/cjs/{hide-label-50b53069.js.map → hide-label-18c390e4.js.map} +1 -1
- package/dist/cjs/{icons-532e8e6f.js → icons-89e178bb.js} +1 -1
- package/dist/cjs/{icons-532e8e6f.js.map → icons-89e178bb.js.map} +1 -1
- package/dist/cjs/image-source-ef1caa3e.js +4 -0
- package/dist/cjs/{image-source-83b8975d.js.map → image-source-ef1caa3e.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js +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-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-adapter-leanup.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
- package/dist/cjs/kol-table.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/{label-6c2fcc6c.js → label-b798c74c.js} +1 -1
- package/dist/cjs/{label-6c2fcc6c.js.map → label-b798c74c.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/open-5d5f06de.js +4 -0
- package/dist/cjs/{open-5d8dce09.js.map → open-5d5f06de.js.map} +1 -1
- package/dist/cjs/{prop.validators-e398c40b.js → prop.validators-f7d7513a.js} +1 -1
- package/dist/cjs/{prop.validators-e398c40b.js.map → prop.validators-f7d7513a.js.map} +1 -1
- package/dist/cjs/rows-4a23aeb7.js +4 -0
- package/dist/cjs/{rows-3d1fb229.js.map → rows-4a23aeb7.js.map} +1 -1
- package/dist/cjs/show-12e7ab82.js +4 -0
- package/dist/cjs/{show-5e4b5c4e.js.map → show-12e7ab82.js.map} +1 -1
- package/dist/cjs/{suggestions-32b90e73.js → suggestions-7bdc016b.js} +1 -1
- package/dist/cjs/{suggestions-32b90e73.js.map → suggestions-7bdc016b.js.map} +1 -1
- package/dist/cjs/{tab-index-47dbd67b.js → tab-index-bdffda9f.js} +1 -1
- package/dist/cjs/{tab-index-47dbd67b.js.map → tab-index-bdffda9f.js.map} +1 -1
- package/dist/cjs/{tooltip-align-94c9bf86.js → tooltip-align-06b58bc0.js} +1 -1
- package/dist/cjs/{tooltip-align-94c9bf86.js.map → tooltip-align-06b58bc0.js.map} +1 -1
- package/dist/cjs/{validation-6499817f.js → validation-38c9663e.js} +1 -1
- package/dist/cjs/{validation-6499817f.js.map → validation-38c9663e.js.map} +1 -1
- package/dist/cjs/{validation-89ceed98.js → validation-c4c354b5.js} +1 -1
- package/dist/cjs/{validation-89ceed98.js.map → validation-c4c354b5.js.map} +1 -1
- package/dist/components/controller2.js +1 -1
- package/dist/components/controller2.js.map +1 -1
- package/dist/components/controller5.js +1 -1
- package/dist/components/controller5.js.map +1 -1
- package/dist/components/dev.utils.js +1 -1
- package/dist/components/dev.utils.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/esm/{a11y.tipps-477c41d6.js → a11y.tipps-f2507b68.js} +1 -1
- package/dist/esm/{a11y.tipps-477c41d6.js.map → a11y.tipps-f2507b68.js.map} +1 -1
- package/dist/esm/{align-4bf3b7ec.js → align-9ee9f2d6.js} +1 -1
- package/dist/esm/{align-4bf3b7ec.js.map → align-9ee9f2d6.js.map} +1 -1
- package/dist/esm/{alignment-7c2e01fd.js → alignment-30d47781.js} +1 -1
- package/dist/esm/{alignment-7c2e01fd.js.map → alignment-30d47781.js.map} +1 -1
- package/dist/esm/{app-globals-70731b63.js → app-globals-7f013aa5.js} +1 -1
- package/dist/esm/{app-globals-70731b63.js.map → app-globals-7f013aa5.js.map} +1 -1
- package/dist/esm/{aria-current-2d66f536.js → aria-current-a06fc154.js} +1 -1
- package/dist/esm/{aria-current-2d66f536.js.map → aria-current-a06fc154.js.map} +1 -1
- package/dist/esm/{associated.controller-8a07ed2c.js → associated.controller-675ace12.js} +1 -1
- package/dist/esm/{associated.controller-8a07ed2c.js.map → associated.controller-675ace12.js.map} +1 -1
- package/dist/esm/{color-2ac447e3.js → color-1af0f468.js} +1 -1
- package/dist/esm/{color-2ac447e3.js.map → color-1af0f468.js.map} +1 -1
- package/dist/esm/{controller-07d7750b.js → controller-4a95dc7f.js} +1 -1
- package/dist/esm/{controller-07d7750b.js.map → controller-4a95dc7f.js.map} +1 -1
- package/dist/esm/{controller-144e628b.js → controller-6af9261e.js} +1 -1
- package/dist/esm/controller-6af9261e.js.map +1 -0
- package/dist/esm/{controller-2680504a.js → controller-bccea7fa.js} +1 -1
- package/dist/esm/controller-bccea7fa.js.map +1 -0
- package/dist/esm/{controller-aed932e0.js → controller-f376a721.js} +1 -1
- package/dist/esm/{controller-aed932e0.js.map → controller-f376a721.js.map} +1 -1
- package/dist/esm/{controller-01043b6c.js → controller-fddda7a7.js} +1 -1
- package/dist/esm/{controller-01043b6c.js.map → controller-fddda7a7.js.map} +1 -1
- package/dist/esm/{controller-icon-d8edaf27.js → controller-icon-ee51494e.js} +1 -1
- package/dist/esm/{controller-icon-d8edaf27.js.map → controller-icon-ee51494e.js.map} +1 -1
- package/dist/esm/{custom-class-b9bd1dfe.js → custom-class-eca37f47.js} +1 -1
- package/dist/esm/{custom-class-b9bd1dfe.js.map → custom-class-eca37f47.js.map} +1 -1
- package/dist/esm/{dev.utils-1e8dd4a9.js → dev.utils-d4a31161.js} +1 -1
- package/dist/esm/{dev.utils-1e8dd4a9.js.map → dev.utils-d4a31161.js.map} +1 -1
- package/dist/esm/{devtools-49a4a7c8.js → devtools-95c29dab.js} +1 -1
- package/dist/esm/{devtools-49a4a7c8.js.map → devtools-95c29dab.js.map} +1 -1
- package/dist/esm/{has-closer-e00fca00.js → has-closer-2c2d8b99.js} +1 -1
- package/dist/esm/{has-closer-e00fca00.js.map → has-closer-2c2d8b99.js.map} +1 -1
- package/dist/esm/{hide-label-16c3f288.js → hide-label-8bad6099.js} +1 -1
- package/dist/esm/{hide-label-16c3f288.js.map → hide-label-8bad6099.js.map} +1 -1
- package/dist/esm/{icons-c8b28f01.js → icons-66b37e60.js} +1 -1
- package/dist/esm/{icons-c8b28f01.js.map → icons-66b37e60.js.map} +1 -1
- package/dist/esm/{image-source-b82c30ce.js → image-source-2fe04afc.js} +1 -1
- package/dist/esm/{image-source-b82c30ce.js.map → image-source-2fe04afc.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-button-wc.entry.js +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-heading-wc.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-input-adapter-leanup.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js.map +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-radio-group.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-group.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-popover-wc.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-span-wc.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-symbol.entry.js +1 -1
- package/dist/esm/kol-table.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toast.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/{label-48b51f80.js → label-7db04673.js} +1 -1
- package/dist/esm/{label-48b51f80.js.map → label-7db04673.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{open-21fd43f3.js → open-39adb417.js} +1 -1
- package/dist/esm/{open-21fd43f3.js.map → open-39adb417.js.map} +1 -1
- package/dist/esm/{prop.validators-a62aac63.js → prop.validators-13f7a3fd.js} +1 -1
- package/dist/esm/{prop.validators-a62aac63.js.map → prop.validators-13f7a3fd.js.map} +1 -1
- package/dist/esm/{rows-4f0d764d.js → rows-85d94242.js} +1 -1
- package/dist/esm/{rows-4f0d764d.js.map → rows-85d94242.js.map} +1 -1
- package/dist/esm/{show-fbf4d497.js → show-17be1bc7.js} +1 -1
- package/dist/esm/{show-fbf4d497.js.map → show-17be1bc7.js.map} +1 -1
- package/dist/esm/{suggestions-d4f1737f.js → suggestions-6414a7cb.js} +1 -1
- package/dist/esm/{suggestions-d4f1737f.js.map → suggestions-6414a7cb.js.map} +1 -1
- package/dist/esm/{tab-index-6065fa94.js → tab-index-48369c01.js} +1 -1
- package/dist/esm/{tab-index-6065fa94.js.map → tab-index-48369c01.js.map} +1 -1
- package/dist/esm/{tooltip-align-960e84c4.js → tooltip-align-18560b32.js} +1 -1
- package/dist/esm/{tooltip-align-960e84c4.js.map → tooltip-align-18560b32.js.map} +1 -1
- package/dist/esm/validation-7c648181.js +4 -0
- package/dist/esm/{validation-a87d2ca3.js.map → validation-7c648181.js.map} +1 -1
- package/dist/esm/validation-a994c5e0.js +4 -0
- package/dist/esm/{validation-13009299.js.map → validation-a994c5e0.js.map} +1 -1
- package/dist/kolibri/{a11y.tipps-477c41d6.js → a11y.tipps-f2507b68.js} +1 -1
- package/dist/kolibri/align-9ee9f2d6.js +4 -0
- package/dist/kolibri/alignment-30d47781.js +4 -0
- package/dist/kolibri/{app-globals-70731b63.js → app-globals-7f013aa5.js} +1 -1
- package/dist/kolibri/{aria-current-2d66f536.js → aria-current-a06fc154.js} +1 -1
- package/dist/kolibri/{associated.controller-8a07ed2c.js → associated.controller-675ace12.js} +1 -1
- package/dist/kolibri/{color-2ac447e3.js → color-1af0f468.js} +1 -1
- package/dist/kolibri/{controller-07d7750b.js → controller-4a95dc7f.js} +1 -1
- package/dist/kolibri/{controller-144e628b.js → controller-6af9261e.js} +1 -1
- package/dist/kolibri/controller-6af9261e.js.map +1 -0
- package/dist/kolibri/{controller-2680504a.js → controller-bccea7fa.js} +1 -1
- package/dist/kolibri/controller-bccea7fa.js.map +1 -0
- package/dist/kolibri/{controller-aed932e0.js → controller-f376a721.js} +1 -1
- package/dist/kolibri/{controller-01043b6c.js → controller-fddda7a7.js} +1 -1
- package/dist/kolibri/controller-icon-ee51494e.js +4 -0
- package/dist/kolibri/{custom-class-b9bd1dfe.js → custom-class-eca37f47.js} +1 -1
- package/dist/kolibri/{dev.utils-1e8dd4a9.js → dev.utils-d4a31161.js} +1 -1
- package/dist/kolibri/{dev.utils-1e8dd4a9.js.map → dev.utils-d4a31161.js.map} +1 -1
- package/dist/kolibri/{devtools-49a4a7c8.js → devtools-95c29dab.js} +1 -1
- package/dist/kolibri/has-closer-2c2d8b99.js +4 -0
- package/dist/kolibri/hide-label-8bad6099.js +4 -0
- package/dist/kolibri/icons-66b37e60.js +4 -0
- package/dist/kolibri/image-source-2fe04afc.js +4 -0
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading-wc.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-input-adapter-leanup.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio-group.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-group.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-wc.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-span-wc.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-symbol.entry.js +1 -1
- package/dist/kolibri/kol-table.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js.map +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toast.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/label-7db04673.js +4 -0
- package/dist/kolibri/open-39adb417.js +4 -0
- package/dist/kolibri/{open-21fd43f3.js.map → open-39adb417.js.map} +1 -1
- package/dist/kolibri/{prop.validators-a62aac63.js → prop.validators-13f7a3fd.js} +1 -1
- package/dist/kolibri/rows-85d94242.js +4 -0
- package/dist/kolibri/show-17be1bc7.js +4 -0
- package/dist/kolibri/{show-fbf4d497.js.map → show-17be1bc7.js.map} +1 -1
- package/dist/kolibri/{suggestions-d4f1737f.js → suggestions-6414a7cb.js} +1 -1
- package/dist/kolibri/tab-index-48369c01.js +4 -0
- package/dist/kolibri/{tab-index-6065fa94.js.map → tab-index-48369c01.js.map} +1 -1
- package/dist/kolibri/tooltip-align-18560b32.js +4 -0
- package/dist/kolibri/{validation-a87d2ca3.js → validation-7c648181.js} +1 -1
- package/dist/kolibri/validation-a994c5e0.js +4 -0
- package/dist/types/components/@deprecated/input/controller.d.ts +6 -5
- package/dist/types/components/input-password/controller.d.ts +0 -3
- package/package.json +1 -1
- package/dist/cjs/align-66d1c455.js +0 -4
- package/dist/cjs/aria-current-065e4fcb.js +0 -4
- package/dist/cjs/controller-02dd3be1.js.map +0 -1
- package/dist/cjs/controller-dea3127d.js.map +0 -1
- package/dist/cjs/has-closer-b8fe05cc.js +0 -4
- package/dist/cjs/hide-label-50b53069.js +0 -4
- package/dist/cjs/image-source-83b8975d.js +0 -4
- package/dist/cjs/open-5d8dce09.js +0 -4
- package/dist/cjs/rows-3d1fb229.js +0 -4
- package/dist/cjs/show-5e4b5c4e.js +0 -4
- package/dist/esm/controller-144e628b.js.map +0 -1
- package/dist/esm/controller-2680504a.js.map +0 -1
- package/dist/esm/validation-13009299.js +0 -4
- package/dist/esm/validation-a87d2ca3.js +0 -4
- package/dist/kolibri/align-4bf3b7ec.js +0 -4
- package/dist/kolibri/alignment-7c2e01fd.js +0 -4
- package/dist/kolibri/controller-144e628b.js.map +0 -1
- package/dist/kolibri/controller-2680504a.js.map +0 -1
- package/dist/kolibri/controller-icon-d8edaf27.js +0 -4
- package/dist/kolibri/has-closer-e00fca00.js +0 -4
- package/dist/kolibri/hide-label-16c3f288.js +0 -4
- package/dist/kolibri/icons-c8b28f01.js +0 -4
- package/dist/kolibri/image-source-b82c30ce.js +0 -4
- package/dist/kolibri/label-48b51f80.js +0 -4
- package/dist/kolibri/open-21fd43f3.js +0 -4
- package/dist/kolibri/rows-4f0d764d.js +0 -4
- package/dist/kolibri/show-fbf4d497.js +0 -4
- package/dist/kolibri/tab-index-6065fa94.js +0 -4
- package/dist/kolibri/tooltip-align-960e84c4.js +0 -4
- package/dist/kolibri/validation-13009299.js +0 -4
- /package/dist/kolibri/{a11y.tipps-477c41d6.js.map → a11y.tipps-f2507b68.js.map} +0 -0
- /package/dist/kolibri/{align-4bf3b7ec.js.map → align-9ee9f2d6.js.map} +0 -0
- /package/dist/kolibri/{alignment-7c2e01fd.js.map → alignment-30d47781.js.map} +0 -0
- /package/dist/kolibri/{app-globals-70731b63.js.map → app-globals-7f013aa5.js.map} +0 -0
- /package/dist/kolibri/{aria-current-2d66f536.js.map → aria-current-a06fc154.js.map} +0 -0
- /package/dist/kolibri/{associated.controller-8a07ed2c.js.map → associated.controller-675ace12.js.map} +0 -0
- /package/dist/kolibri/{color-2ac447e3.js.map → color-1af0f468.js.map} +0 -0
- /package/dist/kolibri/{controller-07d7750b.js.map → controller-4a95dc7f.js.map} +0 -0
- /package/dist/kolibri/{controller-aed932e0.js.map → controller-f376a721.js.map} +0 -0
- /package/dist/kolibri/{controller-01043b6c.js.map → controller-fddda7a7.js.map} +0 -0
- /package/dist/kolibri/{controller-icon-d8edaf27.js.map → controller-icon-ee51494e.js.map} +0 -0
- /package/dist/kolibri/{custom-class-b9bd1dfe.js.map → custom-class-eca37f47.js.map} +0 -0
- /package/dist/kolibri/{devtools-49a4a7c8.js.map → devtools-95c29dab.js.map} +0 -0
- /package/dist/kolibri/{has-closer-e00fca00.js.map → has-closer-2c2d8b99.js.map} +0 -0
- /package/dist/kolibri/{hide-label-16c3f288.js.map → hide-label-8bad6099.js.map} +0 -0
- /package/dist/kolibri/{icons-c8b28f01.js.map → icons-66b37e60.js.map} +0 -0
- /package/dist/kolibri/{image-source-b82c30ce.js.map → image-source-2fe04afc.js.map} +0 -0
- /package/dist/kolibri/{label-48b51f80.js.map → label-7db04673.js.map} +0 -0
- /package/dist/kolibri/{prop.validators-a62aac63.js.map → prop.validators-13f7a3fd.js.map} +0 -0
- /package/dist/kolibri/{rows-4f0d764d.js.map → rows-85d94242.js.map} +0 -0
- /package/dist/kolibri/{suggestions-d4f1737f.js.map → suggestions-6414a7cb.js.map} +0 -0
- /package/dist/kolibri/{tooltip-align-960e84c4.js.map → tooltip-align-18560b32.js.map} +0 -0
- /package/dist/kolibri/{validation-a87d2ca3.js.map → validation-7c648181.js.map} +0 -0
- /package/dist/kolibri/{validation-13009299.js.map → validation-a994c5e0.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"controller-
|
|
1
|
+
{"file":"controller-f376a721.js","mappings":";;;;;;;AAKA,MAAM,iBAAiB,GAAG,CAAC,EAAoC;IAC9D,IAAI,mBAAmB,EAAE,EAAE;QAC1B,OAAO,CAAC,8BAA8B,CAAC,CAAC;QACxC,OAAO,CA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C,KAAK,CAAC,CAAC;iBAC7B;aACD,CAAC,CAAC;SACH;KACD;AACF;;;;","names":[],"sources":["src/components/form/controller.ts"],"sourcesContent":["import { devHint } from '../../utils/a11y.tipps';\nimport { getExperimentalMode } from '../../utils/dev.utils';\nimport { KoliBriDevHelper, setEventTarget } from '../../utils/prop.validators';\nimport { Props } from './types';\n\nconst searchFormElement = (el?: HTMLElement | ParentNode | null): HTMLElement | ParentNode | null | undefined => {\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↓ Search form element start.`);\n\t\tconsole.log(el);\n\t}\n\twhile (el instanceof HTMLElement && el.tagName !== 'FORM' && el.tagName !== 'KOL-FORM') {\n\t\tif (el.parentElement instanceof HTMLElement) {\n\t\t\tel = el.parentElement;\n\t\t} else if (el.parentNode instanceof ShadowRoot) {\n\t\t\tel = el.parentNode.host;\n\t\t} else {\n\t\t\tel = null;\n\t\t}\n\t\tif (getExperimentalMode()) {\n\t\t\tconsole.log(el);\n\t\t}\n\t}\n\tif (getExperimentalMode()) {\n\t\tdevHint(`↑ Search form element finished.`);\n\t}\n\treturn el;\n};\n\nexport const propagateResetEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {},\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new Event('reset', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t});\n\t\tif (form.tagName === 'FORM') {\n\t\t\tsetEventTarget(event, form);\n\t\t\tform.dispatchEvent(event);\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as Props;\n\t\t\tif (typeof kolForm._on?.onReset === 'function') {\n\t\t\t\ttypeof kolForm._on?.onReset(event);\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport const propagateSubmitEventToForm = (\n\toptions: {\n\t\tform?: HTMLElement | ParentNode | null;\n\t\tref?: HTMLElement;\n\t} = {},\n): void => {\n\tconst form = searchFormElement(options.form);\n\tif (form instanceof HTMLElement) {\n\t\tconst event = new SubmitEvent('submit', {\n\t\t\tbubbles: true,\n\t\t\tcancelable: true,\n\t\t\tsubmitter: form,\n\t\t});\n\t\t/**\n\t\t * TODO: Wenn Formular-Action (nicht Ajax oder JS) verwendet wird,\n\t\t * dann müssen wir das Event an das HTMLFormElement innerhalb\n\t\t * der HTMLKolFormElements propagieren, wenn kein onSubmit\n\t\t * gesetzt wurde.\n\t\t *\n\t\t * TODO: Form-associated custom elements:\n\t\t * - https://web.dev/more-capable-form-controls/\n\t\t * - https://github.com/public-ui/kolibri/issues/946\n\t\t */\n\t\tif (form.tagName === 'FORM') {\n\t\t\tif (getExperimentalMode() && (form as HTMLFormElement).noValidate === false) {\n\t\t\t\tdevHint(`If you have not focusable or hidden form fields in your form, you should enable noValidate for your form.`, {\n\t\t\t\t\tforce: true,\n\t\t\t\t});\n\t\t\t\t// (form as HTMLFormElement).noValidate = true; do not make this implicit\n\t\t\t}\n\t\t\t// Use setTimeout to ensure onChange has been called first\n\t\t\tsetTimeout(() => {\n\t\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/requestSubmit\n\t\t\t\tif (typeof (form as HTMLFormElement).requestSubmit === 'function') {\n\t\t\t\t\t(form as HTMLFormElement).requestSubmit();\n\t\t\t\t} else {\n\t\t\t\t\tsetEventTarget(event, form);\n\t\t\t\t\tform.dispatchEvent(event);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (form.tagName === 'KOL-FORM') {\n\t\t\tsetEventTarget(event, KoliBriDevHelper.querySelector('form', form) as HTMLFormElement);\n\t\t\tconst kolForm = form as Props;\n\t\t\t// Use setTimeout to ensure onChange has been called first\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (typeof kolForm._on?.onSubmit === 'function') {\n\t\t\t\t\tkolForm._on?.onSubmit(event);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n};\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{c as watchJsonArrayString,a as watchBoolean,w as watchValidator,m as mapString2Unknown,s as setState}from"./prop.validators-
|
|
4
|
+
import{c as watchJsonArrayString,a as watchBoolean,w as watchValidator,m as mapString2Unknown,s as setState}from"./prop.validators-13f7a3fd.js";import{h as hasEnoughReadableChars,c as containsOnlyNumbers}from"./label-7db04673.js";import{a as a11yHint}from"./a11y.tipps-f2507b68.js";import{S as STATE_CHANGE_EVENT}from"./reuse-d79ab469.js";import{I as InputController}from"./controller-6af9261e.js";const validateInputSelectOptions=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===hasEnoughReadableChars(t.label,3)&&!1===containsOnlyNumbers(t.label)&&a11yHint(`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===validateInputSelectOptions(t)));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,a={})=>{watchJsonArrayString(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,a)},validateOptionsWithOptgroup=(t,e,a={})=>{watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,a)},validateRequired=(t,e)=>{watchBoolean(t,"_required",e)},fillKeyOptionMap=(t,e,a="")=>{e.forEach(((e,o)=>{const i=`${a}-${o}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,i):t.set(i,e))}))};class InputCheckboxRadioController extends InputController{constructor(t,e,a){super(t,e,a),this.component=t}validateRequired(t){validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,a){super(t,e,a),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.isValueInOptions=(t,e)=>void 0!==e.find((e=>e.value===t)),this.afterPatchOptions=(t,e,a,o)=>{"_value"===o&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const a=e.has("_options")?e.get("_options"):this.component.state._options;if(Array.isArray(a)&&a.length>0){this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,a);const t=e.has("_value")?e.get("_value"):this.component.state._value;!1===this.isValueInOptions(t,a)&&(e.set("_value",a[0].value),this.onStateChange())}},this.component=t}validateOrientation(t){watchValidator(this.component,"_orientation",(t=>"horizontal"===t||"vertical"===t),new Set(["Orientation {horizontal, vertical}"]),t,{defaultValue:"vertical"})}validateOptions(t){validateOptions(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(t){t=mapString2Unknown(t),t=Array.isArray(t)?t[0]:t,setState(this.component,"_value",t,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(t){super.componentWillLoad(),this.onStateChange=()=>{if("function"==typeof t){const e=setTimeout((()=>{clearTimeout(e),t(STATE_CHANGE_EVENT)}))}},this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options||this.component._list),this.validateValue(this.component._value)}}export{InputCheckboxRadioController as I,InputRadioController as a,fillKeyOptionMap as f,validateOptionsWithOptgroup as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"controller-01043b6c.js","mappings":";;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB;IACpE,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;QAClD,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE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kB,CAAC,CAAC;iBAC7B,CAAC,CAAC;aACH;SACD,CAAC;QAEF,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACtD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACtE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;KAC1C;;;;;","names":[],"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 type { Generic } from 'adopted-style-sheets';\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 type { Generic } from 'adopted-style-sheets';\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 type { Generic } from 'adopted-style-sheets';\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';\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 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 afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\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\tnextState.set(\n\t\t\t\t\t'_value',\n\t\t\t\t\t(\n\t\t\t\t\t\toptions[0] as {\n\t\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t\t}\n\t\t\t\t\t).value,\n\t\t\t\t);\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\tafterPatch: this.afterPatchOptions,\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\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\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.validateValue(this.component._value);\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"controller-fddda7a7.js","mappings":";;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB;IACpE,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;QAClD,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC;YAC3C,MAAM,CAAC,KAAK,GAAG,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC;YACxC,IAAI,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,mBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;gBACrG,QAAQ,CACP,gCAAgC,MAAM,CAAC,KAAK,6GAA6G,CACzJ,CAAC;aACF;YACD,IAAI,KAAK,CAAC,OAAO,CAAE,MAAsB,CAAC,OAAO,CAAC,EAAE;gBAC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AAC;KACF;IAEM,eAAe,CAAC,KAAuB;QAC7C,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;YACtC,KAAK,EAAE;gBACN,UAAU,EAAE,IAAI,CAAC,iBAAiB;gBAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;aACpC;SACD,CAAC,CAAC;KACH;IAEM,aAAa,CAAC,KAAmC;QACvD,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACjC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,CAAC,CAAoB,GAAG,KAAK,CAAC;QACpE,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,UAAU,EAAE,IAAI,CAAC,iBAAiB;YAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;SACpC,CAAC,CAAC;KACH;IAEM,iBAAiB,CAAC,QAAiC;QACzD,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,CAAC,aAAa,GAAG;YACpB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;gBACnC,MAAM,OAAO,GAAG,UAAU,CAAC;oBAC1B,YAAY,CAAC,OAAO,CAAC,CAAC;oBACtB,QAAQ,CAAC,kBAAkB,CAAC,CAAC;iBAC7B,CAAC,CAAC;aACH;SACD,CAAC;QAEF,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACtD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACtE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;KAC1C;;;;;","names":[],"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 type { Generic } from 'adopted-style-sheets';\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 type { Generic } from 'adopted-style-sheets';\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 type { Generic } from 'adopted-style-sheets';\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';\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 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 afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\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\tnextState.set(\n\t\t\t\t\t'_value',\n\t\t\t\t\t(\n\t\t\t\t\t\toptions[0] as {\n\t\t\t\t\t\t\tvalue: string;\n\t\t\t\t\t\t}\n\t\t\t\t\t).value,\n\t\t\t\t);\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\tafterPatch: this.afterPatchOptions,\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\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\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.validateValue(this.component._value);\n\t}\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{i as isIcon}from"./icons-
|
|
4
|
+
import{i as isIcon}from"./icons-66b37e60.js";import{o as objectObjectHandler,p as parseJson,w as watchValidator}from"./prop.validators-13f7a3fd.js";import{i as isString}from"./reuse-d79ab469.js";import{I as InputController}from"./controller-6af9261e.js";const beforePatchIcons=(o,t)=>{const n=o;"object"==typeof n&&null!==n&&(isString(n.right,1)&&(n.right={icon:n.right}),isString(n.left,1)&&(n.left={icon:n.left}),t.set("_icons",n))};class InputIconController extends InputController{constructor(o,t,n){super(o,t,n),this.component=o}validateIcon(o){this.validateIcons(o)}validateIcons(o){objectObjectHandler(o,(()=>{try{o=parseJson(o)}catch(o){}watchValidator(this.component,"_icons",(o=>"object"==typeof o&&null!==o&&(isString(o.left,1)||isIcon(o.left)||isString(o.right,1)||isIcon(o.right))),new Set(["KoliBriHorizontalIcon"]),o,{hooks:{beforePatch:beforePatchIcons},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}export{InputIconController as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"controller-icon-
|
|
1
|
+
{"file":"controller-icon-ee51494e.js","mappings":";;;;;;;;AAUA,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAE,SAA+B;IACxE,MAAM,KAAK,GAAG,KAA+B,CAAC;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE;QAChD,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE;YAC7B,KAAK,CAAC,KAAK,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,KAAe,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iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KAClE;;;;;","names":[],"sources":["src/components/@deprecated/input/controller-icon.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { Stringified } from '../../../types/common';\nimport { KoliBriHorizontalIcons } from '../../../types/icons';\nimport { isIcon } from '../../../types/props/icons';\nimport { objectObjectHandler, parseJson, watchValidator } from '../../../utils/prop.validators';\nimport { isString } from '../../../utils/validator';\nimport { InputController } from './controller';\nimport { Props, Watches } from './types-icon';\n\nconst beforePatchIcons = (value: unknown, nextState: Map<string, unknown>): void => {\n\tconst icons = value as KoliBriHorizontalIcons;\n\tif (typeof icons === 'object' && icons !== null) {\n\t\tif (isString(icons.right, 1)) {\n\t\t\ticons.right = { icon: icons.right as string };\n\t\t}\n\t\tif (isString(icons.left, 1)) {\n\t\t\ticons.left = { icon: icons.left as string };\n\t\t}\n\t\tnextState.set('_icons', icons);\n\t}\n};\n\nexport class InputIconController extends InputController 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 validateIcon(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tthis.validateIcons(value);\n\t}\n\n\tpublic validateIcons(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<KoliBriHorizontalIcons>(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\twatchValidator(\n\t\t\t\tthis.component,\n\t\t\t\t'_icons',\n\t\t\t\t(value): boolean => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttypeof value === 'object' && value !== null && (isString(value.left, 1) || isIcon(value.left) || isString(value.right, 1) || isIcon(value.right))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tnew Set(['KoliBriHorizontalIcon']),\n\t\t\t\tvalue,\n\t\t\t\t{\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: beforePatchIcons,\n\t\t\t\t\t},\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t);\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateIcons(this.component._icons || this.component._icon);\n\t}\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{w as watchValidator,d as watchString}from"./prop.validators-
|
|
4
|
+
import{w as watchValidator,d as watchString}from"./prop.validators-13f7a3fd.js";const validateButtonVariant=(a,t)=>{watchValidator(a,"_variant",(a=>"primary"===a||"secondary"===a||"normal"===a||"danger"===a||"ghost"===a||"custom"===a),new Set(["KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}"]),t,{defaultValue:"normal"})},validateCustomClass=(a,t)=>{watchString(a,"_customClass",t,{defaultValue:void 0})};export{validateButtonVariant as a,validateCustomClass as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"custom-class-
|
|
1
|
+
{"file":"custom-class-eca37f47.js","mappings":";;;;;MAca,qBAAqB,GAAG,CAAC,SAAoC,EAAE,KAA6B;IACxG,cAAc,CACb,SAAS,EACT,UAAU,EACV,CAAC,KAAK,KAAK,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,EAC9I,IAAI,GAAG,CAAC,CAAC,0EAA0E,CAAC,CAAC,EACrF,KAAK,EACL;QACC,YAAY,EAAE,QAAQ;KACtB,CACD,CAAC;AACH;;MCVa,mBAAmB,GAAG,CAAC,SAAoC,EAAE,KAA2B;IACpG,WAAW,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE;QAC7C,YAAY,EAAE,SAAS;KACvB,CAAC,CAAC;AACJ;;;;","names":[],"sources":["src/types/props/button-variant.ts","src/types/props/custom-class.ts"],"sourcesContent":["/* types */\nimport type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../../utils/prop.validators';\n\nexport type ButtonVariantPropType = 'primary' | 'secondary' | 'normal' | 'tertiary' | 'danger' | 'ghost' | 'custom';\n\n/**\n * Defines which variant should be used for presentation.\n */\nexport type PropButtonVariant = {\n\tvariant: ButtonVariantPropType;\n};\n\n/* validator */\nexport const validateButtonVariant = (component: Generic.Element.Component, value?: ButtonVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_variant`,\n\t\t(value) => value === 'primary' || value === 'secondary' || value === 'normal' || value === 'danger' || value === 'ghost' || value === 'custom',\n\t\tnew Set(['KoliBriButtonVariant {primary, secondary, normal, danger, ghost, custom}']),\n\t\tvalue,\n\t\t{\n\t\t\tdefaultValue: 'normal',\n\t\t},\n\t);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString } from '../../utils/prop.validators';\n\n/* types */\nexport type CustomClassPropType = string;\n\n/**\n * Defines the custom class attribute.\n */\nexport type PropCustomClass = {\n\tcustomClass: CustomClassPropType;\n};\n\n/* validator */\nexport const validateCustomClass = (component: Generic.Element.Component, value?: CustomClassPropType): void => {\n\twatchString(component, '_customClass', value, {\n\t\tdefaultValue: undefined,\n\t});\n};\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{p as processEnv}from"./reuse-d79ab469.js";const getWindow=()=>"undefined"==typeof window?null:window,getDocument=()=>void 0===getWindow().document?null:getWindow().document;let DEV_MODE=null,EXPERIMENTAL_MODE=null,COLOR_CONTRAST_ANALYSIS=null;const getDevMode=()=>!0===DEV_MODE,setDevMode=e=>{DEV_MODE=e},getExperimentalMode=()=>!0===EXPERIMENTAL_MODE,setExperimentalMode=e=>{EXPERIMENTAL_MODE=e},getColorContrastAnalysis=()=>!0===COLOR_CONTRAST_ANALYSIS,setColorContrastAnalysis=e=>{COLOR_CONTRAST_ANALYSIS=e};class Log{static mapToArray(e){return Array.isArray(e)?e:[e]}static handleClassifier(e){return"string"==typeof e&&e.length>0?`${Log.shield.label} | ${e}`:Log.shield.label}static getShield(e){return[Log.handleClassifier(null==e?void 0:e.classifier),`${Log.shield.style};${(null==e?void 0:e.overwriteStyle)||""}`]}static debug(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.debug(...Log.getShield(o),...Log.mapToArray(e))}static info(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.info(...Log.getShield(o),...Log.mapToArray(e))}static trace(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.trace(...Log.getShield(o),...Log.mapToArray(e))}static warn(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.warn(...Log.getShield(o),...Log.mapToArray(e))}static error(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.error(...Log.getShield(o),...Log.mapToArray(e))}static throw(e,o){if(DEV_MODE||!0===(null==o?void 0:o.forceLog))throw new Error(...Log.getShield(o),...Log.mapToArray(e))}}Log.shield={label:"%cKoliBri",style:"color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000"};const initMeta=()=>{const e=getDocument().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const o=e.getAttribute("content");"string"==typeof o&&(setDevMode(o.includes("dev-mode=true")),setExperimentalMode(o.includes("experimental-mode=true")),setColorContrastAnalysis(o.includes("color-contrast-analysis=true")))}},getKoliBri=()=>{let e=getWindow().KoliBri;return void 0===e&&(e={},Object.defineProperty(getWindow(),"KoliBri",{value:e,writable:!1})),e},initKoliBri=()=>{initMeta(),Log.debug("\n\t,--. ,--. ,--. ,--. ,-----. ,--.\n\t| .' / ,---. | | `--' | |) /_ ,--.--. `--'\n\t| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n\t| |\\ \\ | '-' | | | | | | '--' / | | | |\n\t`--' `--´ `---´ `--' `--' `------´ `--' `--'\n\t🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 1.7.
|
|
4
|
+
import{p as processEnv}from"./reuse-d79ab469.js";const getWindow=()=>"undefined"==typeof window?null:window,getDocument=()=>void 0===getWindow().document?null:getWindow().document;let DEV_MODE=null,EXPERIMENTAL_MODE=null,COLOR_CONTRAST_ANALYSIS=null;const getDevMode=()=>!0===DEV_MODE,setDevMode=e=>{DEV_MODE=e},getExperimentalMode=()=>!0===EXPERIMENTAL_MODE,setExperimentalMode=e=>{EXPERIMENTAL_MODE=e},getColorContrastAnalysis=()=>!0===COLOR_CONTRAST_ANALYSIS,setColorContrastAnalysis=e=>{COLOR_CONTRAST_ANALYSIS=e};class Log{static mapToArray(e){return Array.isArray(e)?e:[e]}static handleClassifier(e){return"string"==typeof e&&e.length>0?`${Log.shield.label} | ${e}`:Log.shield.label}static getShield(e){return[Log.handleClassifier(null==e?void 0:e.classifier),`${Log.shield.style};${(null==e?void 0:e.overwriteStyle)||""}`]}static debug(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.debug(...Log.getShield(o),...Log.mapToArray(e))}static info(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.info(...Log.getShield(o),...Log.mapToArray(e))}static trace(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.trace(...Log.getShield(o),...Log.mapToArray(e))}static warn(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.warn(...Log.getShield(o),...Log.mapToArray(e))}static error(e,o){(DEV_MODE||!0===(null==o?void 0:o.forceLog))&&console.error(...Log.getShield(o),...Log.mapToArray(e))}static throw(e,o){if(DEV_MODE||!0===(null==o?void 0:o.forceLog))throw new Error(...Log.getShield(o),...Log.mapToArray(e))}}Log.shield={label:"%cKoliBri",style:"color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000"};const initMeta=()=>{const e=getDocument().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const o=e.getAttribute("content");"string"==typeof o&&(setDevMode(o.includes("dev-mode=true")),setExperimentalMode(o.includes("experimental-mode=true")),setColorContrastAnalysis(o.includes("color-contrast-analysis=true")))}},getKoliBri=()=>{let e=getWindow().KoliBri;return void 0===e&&(e={},Object.defineProperty(getWindow(),"KoliBri",{value:e,writable:!1})),e},initKoliBri=()=>{initMeta(),Log.debug("\n\t,--. ,--. ,--. ,--. ,-----. ,--.\n\t| .' / ,---. | | `--' | |) /_ ,--.--. `--'\n\t| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n\t| |\\ \\ | '-' | | | | | | '--' / | | | |\n\t`--' `--´ `---´ `--' `--' `------´ `--' `--'\n\t🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 1.7.23\n\t\t",{forceLog:!0})},renderDevAdvice=()=>{!0!==getKoliBri().adviceShown&&(Object.defineProperty(getKoliBri(),"adviceShown",{get:function(){return!0}}),Log.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 nonce=()=>Math.floor(16777215*Math.random()).toString(16);"test"===processEnv&&(nonce=()=>"nonce");export{Log as L,getExperimentalMode as a,getWindow as b,getDevMode as c,getColorContrastAnalysis as d,getDocument as g,initKoliBri as i,nonce as n,renderDevAdvice as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dev.utils-
|
|
1
|
+
{"file":"dev.utils-d4a31161.js","mappings":";;;;;MAKa,SA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;IAClB,IAAI,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC;IAClC,IAAI,OAAO,KAAK,SAAS,EAAE;QAC1B,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE;YAC7C,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,KAAK;SACf,CAAC,CAAC;KACH;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;MAIW,WAAW,GAAG;IAC1B,QAAQ,EAAE,CAAC;IACX,GAAG,CAAC,KAAK,CACR;;;;;;;GAOC,EACD;QACC,QAAQ,EAAE,IAAI;KACd,CACD,CAAC;AACH,EAAE;MAEW,eAAe,GAAG;IAC9B,IAAI,UAAU,EAAE,CAAC,WAAW,KAAK,IAAI,EAAE;QACtC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE;YAClD,GAAG,EAAE;gBACJ,OAAO,IAAI,CAAC;aACZ;SACD,CAAC,CAAC;QACH,GAAG,CAAC,KAAK,CACR;;;;;CAKF,CACE,CAAC;KACF;AACF,EAAE;IAEE,KAAK,GAAG,MAAc,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE,EAAE;AAE5E,IAAI,UAAU,KAAK,MAAM,EAAE;IAC1B,KAAK,GAAG,MAAc,OAAO,CAAC;AAC/B;;;;","names":[],"sources":["src/utils/dev.utils.ts"],"sourcesContent":["import { processEnv } from './reuse';\n\nlet WINDOW: Window | null = null;\nlet DOCUMENT: Document | null = null;\n\nexport const getWindow = (): Window => (WINDOW || typeof window === 'undefined' ? (null as unknown as Window) : window);\nexport const setWindow = (value: Window): void => {\n\tWINDOW = value;\n};\n\nexport const getDocument = (): Document => (DOCUMENT || typeof getWindow().document === 'undefined' ? (null as unknown as Document) : getWindow().document);\nexport const setDocument = (value: Document): void => {\n\tDOCUMENT = value;\n};\n\nlet DEV_MODE: boolean | null = null;\nlet EXPERIMENTAL_MODE: boolean | null = null;\nlet COLOR_CONTRAST_ANALYSIS: boolean | null = null;\n\nexport const getDevMode = (): boolean => DEV_MODE === true;\nexport const setDevMode = (value: boolean): void => {\n\tDEV_MODE = value;\n};\n\nexport const getExperimentalMode = (): boolean => EXPERIMENTAL_MODE === true;\nexport const setExperimentalMode = (value: boolean): void => {\n\tEXPERIMENTAL_MODE = value;\n};\n\nexport const getColorContrastAnalysis = (): boolean => COLOR_CONTRAST_ANALYSIS === true;\nexport const setColorContrastAnalysis = (value: boolean): void => {\n\tCOLOR_CONTRAST_ANALYSIS = value;\n};\n\ntype LogShield = {\n\tlabel: string;\n\tstyle: string;\n};\n\ntype LogShieldOptions = {\n\tclassifier?: string;\n\tforceLog?: boolean;\n\toverwriteStyle?: string;\n};\n\nexport class Log {\n\tprivate static shield: LogShield = {\n\t\tlabel: '%cKoliBri',\n\t\tstyle: 'color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000',\n\t};\n\n\tprivate static mapToArray(msg: unknown | unknown[]): unknown[] {\n\t\treturn Array.isArray(msg) ? msg : [msg];\n\t}\n\n\tprivate static handleClassifier(classifier?: string): string {\n\t\tif (typeof classifier === 'string' && classifier.length > 0) {\n\t\t\treturn `${Log.shield.label} | ${classifier}`;\n\t\t} else {\n\t\t\treturn Log.shield.label;\n\t\t}\n\t}\n\n\tprivate static getShield(options?: LogShieldOptions): string[] {\n\t\treturn [Log.handleClassifier(options?.classifier), `${Log.shield.style};${options?.overwriteStyle || ''}`];\n\t}\n\n\tpublic static debug(msg: unknown | unknown[], options?: LogShieldOptions): void {\n\t\tif (DEV_MODE || options?.forceLog === true) {\n\t\t\tconsole.debug(...Log.getShield(options), ...Log.mapToArray(msg));\n\t\t}\n\t}\n\n\tpublic static info(msg: unknown | unknown[], options?: LogShieldOptions): void {\n\t\tif (DEV_MODE || options?.forceLog === true) {\n\t\t\tconsole.info(...Log.getShield(options), ...Log.mapToArray(msg));\n\t\t}\n\t}\n\n\tpublic static trace(msg: unknown | unknown[], options?: LogShieldOptions): void {\n\t\tif (DEV_MODE || options?.forceLog === true) {\n\t\t\tconsole.trace(...Log.getShield(options), ...Log.mapToArray(msg));\n\t\t}\n\t}\n\n\tpublic static warn(msg: unknown | unknown[], options?: LogShieldOptions): void {\n\t\tif (DEV_MODE || options?.forceLog === true) {\n\t\t\tconsole.warn(...Log.getShield(options), ...Log.mapToArray(msg));\n\t\t}\n\t}\n\n\tpublic static error(msg: unknown | unknown[], options?: LogShieldOptions): void {\n\t\tif (DEV_MODE || options?.forceLog === true) {\n\t\t\tconsole.error(...Log.getShield(options), ...Log.mapToArray(msg));\n\t\t}\n\t}\n\n\tpublic static throw(msg: unknown | unknown[], options?: LogShieldOptions): void {\n\t\tif (DEV_MODE || options?.forceLog === true) {\n\t\t\tthrow new Error(...Log.getShield(options), ...Log.mapToArray(msg));\n\t\t}\n\t}\n}\n\nconst initMeta = (): void => {\n\tconst meta = getDocument().querySelector('meta[name=\"kolibri\"]');\n\tif (meta && meta.hasAttribute('content')) {\n\t\tconst content = meta.getAttribute('content');\n\t\tif (typeof content === 'string') {\n\t\t\tsetDevMode(content.includes('dev-mode=true'));\n\t\t\tsetExperimentalMode(content.includes('experimental-mode=true'));\n\t\t\tsetColorContrastAnalysis(content.includes('color-contrast-analysis=true'));\n\t\t}\n\t}\n};\n\nconst getKoliBri = (): Record<string, unknown> => {\n\tlet kolibri = getWindow().KoliBri;\n\tif (kolibri === undefined) {\n\t\tkolibri = {};\n\t\tObject.defineProperty(getWindow(), 'KoliBri', {\n\t\t\tvalue: kolibri,\n\t\t\twritable: false,\n\t\t});\n\t}\n\treturn kolibri;\n};\n\nexport { getKoliBri };\n\nexport const initKoliBri = (): void => {\n\tinitMeta();\n\tLog.debug(\n\t\t`\n\t,--. ,--. ,--. ,--. ,-----. ,--.\n\t| .' / ,---. | | \\`--' | |) /_ ,--.--. \\`--'\n\t| . ' | .-. | | | ,--. | .-. \\\\ | .--' ,--.\n\t| |\\\\ \\\\ | '-' | | | | | | '--' / | | | |\n\t\\`--' \\`--´ \\`---´ \\`--' \\`--' \\`------´ \\`--' \\`--'\n\t🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | 1.7.23\n\t\t`,\n\t\t{\n\t\t\tforceLog: true,\n\t\t},\n\t);\n};\n\nexport const renderDevAdvice = (): void => {\n\tif (getKoliBri().adviceShown !== true) {\n\t\tObject.defineProperty(getKoliBri(), 'adviceShown', {\n\t\t\tget: function () {\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t\tLog.debug(\n\t\t\t`\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`,\n\t\t);\n\t}\n};\n\nlet nonce = (): string => Math.floor(Math.random() * 16777215).toString(16);\n\nif (processEnv === 'test') {\n\tnonce = (): string => 'nonce';\n}\n\nexport { nonce };\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{i as initKoliBri,c as getDevMode,r as renderDevAdvice,g as getDocument,L as Log,a as getExperimentalMode,d as getColorContrastAnalysis,b as getWindow}from"./dev.utils-
|
|
4
|
+
import{i as initKoliBri,c as getDevMode,r as renderDevAdvice,g as getDocument,L as Log,a as getExperimentalMode,d as getColorContrastAnalysis,b as getWindow}from"./dev.utils-d4a31161.js";import{n as KoliBriUtils,q as koliBriA11yColorContrast,k as koliBriQuerySelector,t as koliBriQuerySelectorAll,u as koliBriQuerySelectorColors,p as parseJson,v as stringifyJson}from"./prop.validators-13f7a3fd.js";import"./reuse-d79ab469.js";import"./index-117bd1aa.js";import"./a11y.tipps-f2507b68.js";const getKoliBri=()=>{let t=getWindow().KoliBri;return void 0===t&&(t={},Object.defineProperty(getWindow(),"KoliBri",{value:t,writable:!1})),t};function prototypeKoliBri(t,e){try{Object.defineProperty(getKoliBri(),t,{get:function(){return e}})}catch(e){Log.debug(`KoliBri property ${t} is already bind.`)}}const metaModeLog=(t,e)=>Log.debug(`${t} ${e?"":"not "}activated`),initialize=()=>{if(initKoliBri(),getDevMode()){renderDevAdvice(),prototypeKoliBri("a11yColorContrast",koliBriA11yColorContrast),prototypeKoliBri("querySelector",koliBriQuerySelector),prototypeKoliBri("querySelectorAll",koliBriQuerySelectorAll),prototypeKoliBri("querySelectorColors",koliBriQuerySelectorColors),prototypeKoliBri("utils",(function(){return KoliBriUtils})),prototypeKoliBri("parseJson",parseJson),prototypeKoliBri("stringifyJson",stringifyJson);const t=getDocument().body,e=getDocument().createElement("svg");if(e.setAttribute("aria-label","KoliBri-DevTools"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("role","toolbar"),e.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),e.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',getDocument().body.appendChild(e),metaModeLog("Development mode",getDevMode()),metaModeLog("Experimental mode",getExperimentalMode()),metaModeLog("Color contrast analysis",getColorContrastAnalysis()),getColorContrastAnalysis()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{KoliBriUtils.queryHtmlElementColors(getDocument().createElement("div"),koliBriA11yColorContrast(t),!1,!1)}),1e4)}),2500)}}};export{initialize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"devtools-
|
|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AC;QACzC,gBAAgB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;QAEjD,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC,IAAI,CAAC;QAEhC,MAAM,GAAG,GAAG,WAAW,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/C,GAAG,CAAC,YAAY,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC;QACnD,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,4BAA4B,CAAC,CAAC;QACxD,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACpC,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE,8EAA8E,CAAC,CAAC;QAC1G,GAAG,CAAC,SAAS,GAAG;;;;;;;;;;;;OAYX,CAAC;QAEN,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAEpC,WAAW,CAAC,kBAAkB,EAAE,UAAU,EAAE,CAAC,CAAC;QAC9C,WAAW,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACxD,WAAW,CAAC,yBAAyB,EAAE,wBAAwB,EAAE,CAAC,CAAC;QAEnE,IAAI,wBAAwB,EAAE,EAAE;YAC/B,MAAM,OAAO,GAAG,UAAU,CAAC;gBAC1B,YAAY,CAAC,OAAO,CAAC,CAAC;gBACtB,WAAW,CAAC;oBACX,YAAY,CAAC,sBAAsB,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,wBAAwB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;iBACtH,EAAE,KAAK,CAAC,CAAC;aACV,EAAE,IAAI,CAAC,CAAC;SACT;KAmBD;AACF;;;;","names":[],"sources":["src/global/devtools.ts"],"sourcesContent":["import { Log, getColorContrastAnalysis, getDevMode, getDocument, getExperimentalMode, getWindow, initKoliBri, renderDevAdvice } from '../utils/dev.utils';\nimport {\n\tKoliBriUtils,\n\tkoliBriA11yColorContrast,\n\tkoliBriQuerySelector,\n\tkoliBriQuerySelectorAll,\n\tkoliBriQuerySelectorColors,\n\tparseJson,\n\tstringifyJson,\n} from '../utils/prop.validators';\n\nconst getKoliBri = (): Record<string, unknown> => {\n\tlet kolibri = getWindow().KoliBri;\n\tif (kolibri === undefined) {\n\t\tkolibri = {};\n\t\tObject.defineProperty(getWindow(), 'KoliBri', {\n\t\t\tvalue: kolibri,\n\t\t\twritable: false,\n\t\t});\n\t}\n\treturn kolibri;\n};\n\nfunction prototypeKoliBri<T>(name: string, cb: T) {\n\ttry {\n\t\tObject.defineProperty(getKoliBri(), name, {\n\t\t\tget: function () {\n\t\t\t\treturn cb;\n\t\t\t},\n\t\t});\n\t} catch (e) {\n\t\tLog.debug(`KoliBri property ${name} is already bind.`);\n\t}\n}\n\nconst metaModeLog = (name: string, active: boolean) => Log.debug(`${name} ${active ? '' : 'not '}activated`);\n\nexport const initialize = (): void => {\n\tinitKoliBri();\n\tif (getDevMode()) {\n\t\trenderDevAdvice();\n\n\t\tprototypeKoliBri('a11yColorContrast', koliBriA11yColorContrast);\n\t\tprototypeKoliBri('querySelector', koliBriQuerySelector);\n\t\tprototypeKoliBri('querySelectorAll', koliBriQuerySelectorAll);\n\t\tprototypeKoliBri('querySelectorColors', koliBriQuerySelectorColors);\n\t\tprototypeKoliBri('utils', function () {\n\t\t\treturn KoliBriUtils;\n\t\t});\n\t\tprototypeKoliBri('parseJson', parseJson);\n\t\tprototypeKoliBri('stringifyJson', stringifyJson);\n\n\t\tconst body = getDocument().body;\n\n\t\tconst div = getDocument().createElement('svg');\n\t\tdiv.setAttribute('aria-label', 'KoliBri-DevTools');\n\t\tdiv.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\t\tdiv.setAttribute('role', 'toolbar');\n\t\tdiv.setAttribute('style', 'position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;');\n\t\tdiv.innerHTML = `<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"50\"\n height=\"50\"\n viewBox=\"0 0 600 600\"\n>\n <path d=\"M353 322L213 304V434L353 322Z\" fill=\"#047\" />\n <path d=\"M209 564V304L149 434L209 564Z\" fill=\"#047\" />\n <path d=\"M357 316L417 250L361 210L275 244L357 316Z\" fill=\"#047\" />\n <path d=\"M353 318L35 36L213 300L353 318Z\" fill=\"#047\" />\n <path d=\"M329 218L237 92L250 222L272 241L329 218Z\" fill=\"#047\" />\n <path d=\"M391 286L565 272L421 252L391 286Z\" fill=\"#047\" />\n</svg>`;\n\n\t\tgetDocument().body.appendChild(div);\n\n\t\tmetaModeLog('Development mode', getDevMode());\n\t\tmetaModeLog('Experimental mode', getExperimentalMode());\n\t\tmetaModeLog('Color contrast analysis', getColorContrastAnalysis());\n\n\t\tif (getColorContrastAnalysis()) {\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tsetInterval(() => {\n\t\t\t\t\tKoliBriUtils.queryHtmlElementColors(getDocument().createElement('div'), koliBriA11yColorContrast(body), false, false);\n\t\t\t\t}, 10000);\n\t\t\t}, 2500);\n\t\t}\n\n\t\t// setTimeout(() => {\n\t\t// const kolButton = koliBriQuerySelector<HTMLButtonElement>(document, '[_label=\"Aktion ausführen\"]');\n\t\t// if (kolButton) {\n\t\t// const button = koliBriQuerySelector<HTMLButtonElement>(kolButton?.shadowRoot as ShadowRoot, 'button');\n\t\t// if (button) {\n\t\t// kolButton.style.backgroundColor = '#988';\n\t\t// button.style.backgroundColor = 'inherit';\n\t\t// button.style.color = '#988';\n\t\t// const kolButtonColors = koliBriQuerySelectorColors('[_label=\"Aktion ausführen\"]');\n\t\t// console.log(\n\t\t// koliBriQuerySelectorColors('button', {\n\t\t// ...kolButtonColors,\n\t\t// })\n\t\t// );\n\t\t// }\n\t\t// }\n\t\t// }, 2500);\n\t}\n};\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{a as watchBoolean}from"./prop.validators-
|
|
4
|
+
import{a as watchBoolean}from"./prop.validators-13f7a3fd.js";const validateHasCloser=(a,o)=>{watchBoolean(a,"_hasCloser",o)};export{validateHasCloser as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"has-closer-
|
|
1
|
+
{"file":"has-closer-2c2d8b99.js","mappings":";;;;;MAea,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAyB;IAChG,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AAC9C;;;;","names":[],"sources":["src/types/props/has-closer.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../../utils/prop.validators';\n\n/* types */\nexport type HasCloserPropType = boolean;\n\n/**\n * Defines whether the element can be closed.\n */\nexport type PropHasCloser = {\n\thasCloser: HasCloserPropType;\n};\n\n/* validator */\nexport const validateHasCloser = (component: Generic.Element.Component, value?: HasCloserPropType): void => {\n\twatchBoolean(component, '_hasCloser', value);\n};\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{a as watchBoolean}from"./prop.validators-
|
|
4
|
+
import{a as watchBoolean}from"./prop.validators-13f7a3fd.js";const validateHideLabel=(a,e,o={})=>{watchBoolean(a,"_hideLabel",e,o)};export{validateHideLabel as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"hide-label-
|
|
1
|
+
{"file":"hide-label-8bad6099.js","mappings":";;;;;MAea,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAyB,EAAE,UAA+B,EAAE;IACnI,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACvD;;;;","names":[],"sources":["src/types/props/hide-label.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean, WatchBooleanOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type HideLabelPropType = boolean;\n\n/**\n * Tells the element to hide the label.\n */\nexport type PropHideLabel = {\n\thideLabel: HideLabelPropType;\n};\n\n/* validator */\nexport const validateHideLabel = (component: Generic.Element.Component, value?: HideLabelPropType, options: WatchBooleanOptions = {}): void => {\n\twatchBoolean(component, '_hideLabel', value, options);\n};\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{o as objectObjectHandler,p as parseJson,w as watchValidator}from"./prop.validators-
|
|
4
|
+
import{o as objectObjectHandler,p as parseJson,w as watchValidator}from"./prop.validators-13f7a3fd.js";import{i as isString,b as isStyle,c as isObject}from"./reuse-d79ab469.js";const mapCustomIcon=(t,o,i)=>{isObject(i)?t[o]=i:isString(i,1)&&(t[o]={icon:i})},mapIconProp2State=t=>{let o={};return isString(t,1)?o={left:{icon:t}}:"object"==typeof t&&null!==t&&(mapCustomIcon(o,"top",t.top),mapCustomIcon(o,"right",t.right),mapCustomIcon(o,"bottom",t.bottom),mapCustomIcon(o,"left",t.left)),o},beforePatchIcon=t=>{var o,i,e;if(null===(o=t.nextState)||void 0===o?void 0:o.has("_icons")){const o=null===(i=t.nextState)||void 0===i?void 0:i.get("_icons");null===(e=t.nextState)||void 0===e||e.set("_icons",mapIconProp2State(o))}},isIcon=t=>"object"==typeof t&&null!==t&&(void 0===t.style||isStyle(t.style))&&isString(t.icon,1),validateIcons=(t,o,i={})=>{objectObjectHandler(o,(()=>{var e;try{o=parseJson(o)}catch(t){}watchValidator(t,"_icons",(t=>null===t||isString(t,1)||"object"==typeof t&&null!==t&&(isString(t.left,1)||isIcon(t.left)||isString(t.right,1)||isIcon(t.right)||isString(t.top,1)||isIcon(t.top)||isString(t.bottom,1)||isIcon(t.bottom))),new Set(["KoliBriIcon"]),o,Object.assign(Object.assign({},i),{defaultValue:{},hooks:{afterPatch:null===(e=i.hooks)||void 0===e?void 0:e.afterPatch,beforePatch:(t,o,e,n)=>{var a,s;"function"==typeof(null===(a=i.hooks)||void 0===a?void 0:a.beforePatch)&&(null===(s=i.hooks)||void 0===s||s.beforePatch(t,o,e,n)),beforePatchIcon(e)}}}))}))},watchIconAlign=(t,o)=>{watchValidator(t,"_iconAlign",(t=>"left"===t||"right"===t),new Set(["Alignment {left, right, top, bottom}"]),o,{hooks:{beforePatch:()=>{beforePatchIcon(t)}}})};export{isIcon as i,validateIcons as v,watchIconAlign as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"icons-
|
|
1
|
+
{"file":"icons-66b37e60.js","mappings":";;;;;;AAgBA,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAE,SAAwB,EAAE,IAA2C;IACrH,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QACnB,KAAK,CAAC,SAAS,CAAC,GAAG,IAAyB,CAAC;KAC7C;SAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;QAC7B,KAAK,CAAC,SAAS,CAAC,GAAG;YAClB,IAAI,EAAE,IAAwB;SAC9B,CAAC;KACF;AACF,CAAC,CAAC;AACK,MAAM,iBAAiB,GAAG,CAAC,IAAsB;IACvD,IAAI,KAAK,GAAsB,EAAE,CAAC;IAClC,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;QACtB,KAAK,GAAG;YACP,IAAI,EAAE;gBACL,IAAI,EAAE,IAAwB;aAC9B;SACD,CAAC;KACF;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QACrD,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,aAAa,CAAC,KAAK,EAA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KAAK,EAAE,CAAC,CAAC;wBACxB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;wBACnB,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;wBACtB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;wBACjB,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;wBACzB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EACvB;SACF,EACD,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,EACxB,KAAK,kCAED,OAAO,KACV,YAAY,EAAE,EAAE,EAChB,KAAK,EAAE;gBACN,UAAU,EAAE,MAAA,OAAO,CAAC,KAAK,0CAAE,UAAU;gBACrC,WAAW,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG;;oBACjD,IAAI,QAAO,MAAA,OAAO,CAAC,KAAK,0CAAE,WAAW,CAAA,KAAK,UAAU,EAAE;wBACrD,MAAA,OAAO,CAAC,KAAK,0CAAE,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;qBACjE;oBACD,eAAe,CAAC,SAAS,CAAC,CAAC;iBAC3B;aACD,IAEF,CAAC;KACF,CAAC,CAAC;AACJ,EAAE;MAEW,cAAc,GAAG,CAAC,SAAoC,EAAE,KAAqB;IACzF,cAAc,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC,KAAK,KAAK,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,sCAAsC,CAAC,CAAC,EAAE,KAAK,EAAE;QACnJ,KAAK,EAAE;YACN,WAAW,EAAE;gBACZ,eAAe,CAAC,SAAS,CAAC,CAAC;aAC3B;SACD;KACD,CAAC,CAAC;AACJ;;;;","names":[],"sources":["src/types/props/icons.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { WatchOptions, objectObjectHandler, parseJson, watchValidator } from '../../utils/prop.validators';\nimport { isObject, isString, isStyle } from '../../utils/validator';\nimport { Stringified } from '../common';\nimport { AnyIconFontClass, KoliBriCustomIcon, KoliBriIconsProp, KoliBriIconsState } from '../icons';\nimport { AlignPropType } from './align';\n/* types */\nexport type IconsPropType = Stringified<KoliBriIconsProp>;\n/**\n * Defines the icon classnames.\n */\nexport type PropIcons = {\n\ticons: IconsPropType;\n};\n/* validator */\nconst mapCustomIcon = (state: KoliBriIconsState, alignment: AlignPropType, icon?: AnyIconFontClass | KoliBriCustomIcon) => {\n\tif (isObject(icon)) {\n\t\tstate[alignment] = icon as KoliBriCustomIcon;\n\t} else if (isString(icon, 1)) {\n\t\tstate[alignment] = {\n\t\t\ticon: icon as AnyIconFontClass,\n\t\t};\n\t}\n};\nexport const mapIconProp2State = (icon: KoliBriIconsProp): KoliBriIconsState => {\n\tlet state: KoliBriIconsState = {};\n\tif (isString(icon, 1)) {\n\t\tstate = {\n\t\t\tleft: {\n\t\t\t\ticon: icon as AnyIconFontClass,\n\t\t\t},\n\t\t};\n\t} else if (typeof icon === 'object' && icon !== null) {\n\t\tmapCustomIcon(state, 'top', icon.top);\n\t\tmapCustomIcon(state, 'right', icon.right);\n\t\tmapCustomIcon(state, 'bottom', icon.bottom);\n\t\tmapCustomIcon(state, 'left', icon.left);\n\t}\n\treturn state;\n};\nconst beforePatchIcon = (component: Generic.Element.Component): void => {\n\tif (component.nextState?.has('_icons')) {\n\t\tconst icons = component.nextState?.get('_icons') as KoliBriIconsProp;\n\t\tcomponent.nextState?.set('_icons', mapIconProp2State(icons));\n\t}\n};\nexport const isIcon = (value?: unknown): boolean =>\n\ttypeof value === 'object' &&\n\tvalue !== null &&\n\t(typeof (value as KoliBriCustomIcon).style === 'undefined' || isStyle((value as KoliBriCustomIcon).style)) &&\n\tisString((value as KoliBriCustomIcon).icon, 1);\n\nexport const validateIcons = (component: Generic.Element.Component, value?: IconsPropType, options: WatchOptions = {}): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<KoliBriIconsProp>(value as string);\n\t\t} catch (e) {\n\t\t\t// value behält den ursprünglichen Wert\n\t\t}\n\t\twatchValidator(\n\t\t\tcomponent,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\treturn (\n\t\t\t\t\tvalue === null ||\n\t\t\t\t\tisString(value, 1) ||\n\t\t\t\t\t(typeof value === 'object' &&\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(isString(value.left, 1) ||\n\t\t\t\t\t\t\tisIcon(value.left) ||\n\t\t\t\t\t\t\tisString(value.right, 1) ||\n\t\t\t\t\t\t\tisIcon(value.right) ||\n\t\t\t\t\t\t\tisString(value.top, 1) ||\n\t\t\t\t\t\t\tisIcon(value.top) ||\n\t\t\t\t\t\t\tisString(value.bottom, 1) ||\n\t\t\t\t\t\t\tisIcon(value.bottom)))\n\t\t\t\t);\n\t\t\t},\n\t\t\tnew Set(['KoliBriIcon']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\t...options,\n\t\t\t\tdefaultValue: {},\n\t\t\t\thooks: {\n\t\t\t\t\tafterPatch: options.hooks?.afterPatch,\n\t\t\t\t\tbeforePatch: (nextValue, nextState, component, key) => {\n\t\t\t\t\t\tif (typeof options.hooks?.beforePatch === 'function') {\n\t\t\t\t\t\t\toptions.hooks?.beforePatch(nextValue, nextState, component, key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbeforePatchIcon(component);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t});\n};\n\nexport const watchIconAlign = (component: Generic.Element.Component, value?: AlignPropType): void => {\n\twatchValidator(component, '_iconAlign', (value) => value === 'left' || value === 'right', new Set(['Alignment {left, right, top, bottom}']), value, {\n\t\thooks: {\n\t\t\tbeforePatch: () => {\n\t\t\t\tbeforePatchIcon(component);\n\t\t\t},\n\t\t},\n\t});\n};\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{d as watchString}from"./prop.validators-
|
|
4
|
+
import{d as watchString}from"./prop.validators-13f7a3fd.js";const validateImageSource=(a,r,t)=>{watchString(a,"_src",r,t)};export{validateImageSource as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"image-source-
|
|
1
|
+
{"file":"image-source-2fe04afc.js","mappings":";;;;;MAea,mBAAmB,GAAG,CAAC,SAAoC,EAAE,KAA2B,EAAE,OAA4B;IAClI,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAChD;;;;","names":[],"sources":["src/types/props/image-source.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchString, WatchStringOptions } from '../../utils/prop.validators';\n\n/* types */\nexport type ImageSourcePropType = string;\n\n/**\n * Sets the image `src` attribute to the given string.\n */\nexport type PropImageSource = {\n\tsrc: ImageSourcePropType;\n};\n\n/* validator */\nexport const validateImageSource = (component: Generic.Element.Component, value?: ImageSourcePropType, options?: WatchStringOptions): void => {\n\twatchString(component, '_src', value, options);\n};\n"],"version":3}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
export{T as ToasterServiceLegacy}from"./toaster-59df19c4.js";import{s as setCustomTagNames,K as KolToastContainerTag}from"./component-names-fed305c7.js";import{_}from"./index-117bd1aa.js";import{i as initI18n,c as configI18n}from"./i18n-a2f79a81.js";export{c as BUNDESAEMTER,e as BUNDESANSTALTEN,a as BUNDESMINISTERIEN,f as BUND_LOGO_TEXT_MAP,b as Bundesamt,d as Bundesanstalt,B as Bundesministerium}from"./bund-ad41b762.js";export{K as KoliBriDevHelper}from"./prop.validators-
|
|
4
|
+
export{T as ToasterServiceLegacy}from"./toaster-59df19c4.js";import{s as setCustomTagNames,K as KolToastContainerTag}from"./component-names-fed305c7.js";import{_}from"./index-117bd1aa.js";import{i as initI18n,c as configI18n}from"./i18n-a2f79a81.js";export{c as BUNDESAEMTER,e as BUNDESANSTALTEN,a as BUNDESMINISTERIEN,f as BUND_LOGO_TEXT_MAP,b as Bundesamt,d as Bundesanstalt,B as Bundesministerium}from"./bund-ad41b762.js";export{K as KoliBriDevHelper}from"./prop.validators-13f7a3fd.js";import"./a11y.tipps-f2507b68.js";import"./dev.utils-d4a31161.js";import"./reuse-d79ab469.js";let initialized=!1;const bootstrap=async(t,e,s)=>{var a,i,n;await initI18n(null===(a=null==s?void 0:s.translation)||void 0===a?void 0:a.name),await configI18n(null!==(n=null===(i=null==s?void 0:s.translation)||void 0===i?void 0:i.name)&&void 0!==n?n:"de",null==s?void 0:s.translations),(null==s?void 0:s.transformTagName)&&setCustomTagNames(null==s?void 0:s.transformTagName);const o=await _(t,e,s);return initialized=!0,o},register=bootstrap,isInitialized=()=>initialized;class ToasterService{constructor(t){this.document=t,this.toastContainerElement=this.document.createElement(KolToastContainerTag),this.document.body.prepend(this.toastContainerElement)}static getInstance(t){if(!isInitialized())throw new Error("Toaster: Call KoliBri bootstrap/register method first.");let e=this.instances.get(t);return e||(e=new ToasterService(t),this.instances.set(t,e)),e}dispose(){const t=this.toastContainerElement;t?(this.toastContainerElement=void 0,t.remove()):console.warn("Toaster service is already disposed.")}enqueue(t){if(this.toastContainerElement&&"function"==typeof this.toastContainerElement.enqueue)return this.toastContainerElement.enqueue(t)}closeAll(){this.toastContainerElement&&"function"==typeof this.toastContainerElement.closeAll&&this.toastContainerElement.closeAll()}}ToasterService.instances=new Map;export{ToasterService,bootstrap,register};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{v as validateLabel}from"./label-
|
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{v as validateLabel}from"./label-7db04673.js";import{v as validateTooltipAlign}from"./tooltip-align-18560b32.js";import{n as nonce}from"./dev.utils-d4a31161.js";import{b as KolTooltipWcTag}from"./component-names-fed305c7.js";import"./a11y.tipps-f2507b68.js";import"./prop.validators-13f7a3fd.js";import"./index-117bd1aa.js";import"./alignment-30d47781.js";import"./reuse-d79ab469.js";const defaultStyleCss=":host{--a11y-min-size:44px;background-color:white;color:black;font-family:Verdana}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role=button],button:not([role=link]),.kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}[hidden]{display:none !important}:host{max-width:100%}*{box-sizing:border-box}.kol-span-wc{display:grid;place-items:center}.kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}.icon-only>.kol-span-wc>span>span{display:none}.hidden{display:none;visibility:hidden}:host>abbr{cursor:help}",KolAbbrDefaultStyle0=defaultStyleCss,KolAbbr=class{constructor(t){registerInstance(this,t),this.nonce=nonce(),this._label=void 0,this._tooltipAlign="top",this._title=void 0,this.state={_label:"…",_tooltipAlign:"top"}}render(){return h(Host,{key:"471dbfc7885b5279fe7ceae64390d829644615c0",class:"kol-abbr"},h("abbr",{key:"00fa0074095c055693f89a2cd47181c93a85308c","aria-labelledby":this.nonce,role:"definition",tabindex:"0",title:this.state._label},h("span",{key:"490fe2c7b020dc964b1910e0331018af9281d0f4",title:""},h("slot",{key:"6109cb7018e37b9aec6e95642dfa74b7382c24dd"}))),h(KolTooltipWcTag,{key:"64e8eb37981ce31ecbc7dcdf8681cb880f835044",_align:this.state._tooltipAlign,_id:this.nonce,_label:this.state._label}))}validateLabel(t){validateLabel(this,t,{required:!0})}validateTitle(t){this.validateLabel(t)}validateTooltipAlign(t){validateTooltipAlign(this,t)}componentWillLoad(){this.validateLabel(this._label||this._title),this.validateTooltipAlign(this._tooltipAlign)}static get watchers(){return{_label:["validateLabel"],_title:["validateTitle"],_tooltipAlign:["validateTooltipAlign"]}}};KolAbbr.style={default:KolAbbrDefaultStyle0};export{KolAbbr as kol_abbr};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host,g as getElement}from"./index-dfb131c4.js";import{v as validateLabel}from"./label-
|
|
4
|
+
import{r as registerInstance,h,H as Host,g as getElement}from"./index-dfb131c4.js";import{v as validateLabel}from"./label-7db04673.js";import{v as validateOpen}from"./open-39adb417.js";import{f as featureHint}from"./a11y.tipps-f2507b68.js";import{n as nonce}from"./dev.utils-d4a31161.js";import{s as setState}from"./prop.validators-13f7a3fd.js";import{a as propagateFocus}from"./reuse-d79ab469.js";import{w as watchHeadingLevel}from"./validation-7c648181.js";import{c as KolHeadingWcTag,d as KolButtonWcTag}from"./component-names-fed305c7.js";import"./index-117bd1aa.js";const defaultStyleCss=":host{--a11y-min-size:44px;background-color:white;color:black;font-family:Verdana}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role=button],button:not([role=link]),.kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}[hidden]{display:none !important}:host{max-width:100%}*{box-sizing:border-box}.kol-span-wc{display:grid;place-items:center}.kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}.icon-only>.kol-span-wc>span>span{display:none}.hidden{display:none;visibility:hidden}:host{display:block}.wrapper{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows 0.3s}.accordion.open .wrapper{grid-template-rows:1fr}.animation-wrapper{min-height:0;transition:visibility 0.3s;visibility:hidden}.accordion.open .animation-wrapper{visibility:visible}@media (prefers-reduced-motion){.animation-wrapper,.wrapper{transition-duration:0s}}@media print{.accordion:not(.open) .animation-wrapper{display:none}}.accordion .kol-heading-wc .kol-button-wc button .kol-span-wc{justify-items:start}",KolAccordionDefaultStyle0=defaultStyleCss;featureHint("[KolAccordion] Anfrage nach einer KolAccordionGroup bei dem immer nur ein Accordion geöffnet ist.\n\n- onClick auf der KolAccordion anwenden\n- Click-Event prüft den _open-Status der Accordions\n- Logik Öffnet und Schließt entsprechend"),featureHint("[KolAccordion] Tab-Sperre des Inhalts im geschlossenen Zustand.");const KolAccordion=class{constructor(e){registerInstance(this,e),this.nonce=nonce(),this.catchRef=e=>{propagateFocus(this.host,e)},this.onClick=e=>{this._open=!this._open,setTimeout((()=>{var i;"function"==typeof(null===(i=this.state._on)||void 0===i?void 0:i.onClick)&&this.state._on.onClick(e,!0===this._open)}))},this._heading=void 0,this._label=void 0,this._level=1,this._on=void 0,this._open=!1,this.state={_label:"…",_level:1}}render(){return h(Host,{key:"2210fb25c93cc811783f763e956d04c9156e84a4",class:"kol-accordion"},h("div",{key:"43f6add95e19695da0263baac094f4de2e77133e",class:{accordion:!0,open:!0===this.state._open}},h(KolHeadingWcTag,{key:"1236a155eee820f52c146a018f5d14be6eb4f39b",_label:"",_level:this.state._level},h(KolButtonWcTag,{key:"41675f03cb4d062348f68bdf67b938b285c22f65",ref:this.catchRef,_ariaControls:this.nonce,_ariaExpanded:this.state._open,_icons:this.state._open?"codicon codicon-remove":"codicon codicon-add",_label:this.state._label,_on:{onClick:this.onClick}})),h("div",{key:"b11a1fe12ab8892959b637101a22a965e9803492",class:"header"},h("slot",{key:"b38992dabe9c3332d92b1d341017499f422a46e9",name:"header"})),h("div",{key:"d85a96772ab32376fb402d657c4cd9407395efa6",class:"wrapper"},h("div",{key:"3b580afec226b4cbe56255c3a50a6b6bb28fb16c",class:"animation-wrapper"},h("div",{key:"9a76ec130c4536c74bd0bc53384311c5ddb5eff2","aria-hidden":!1===this.state._open?"true":void 0,class:"content",id:this.nonce},h("slot",{key:"5c6c3448fa9e237c082859fa37b191e3d59b5b9b",name:"content"})," ",h("slot",{key:"f488707b6f86a9dfbfea753df7062d7a6cd8a521"}))))))}validateHeading(e){this.validateLabel(e)}validateLabel(e){validateLabel(this,e,{required:!0})}validateLevel(e){watchHeadingLevel(this,e)}validateOn(e){"object"==typeof e&&null!==e&&"function"==typeof e.onClick&&setState(this,"_on",e)}validateOpen(e){validateOpen(this,e)}componentWillLoad(){this.validateLabel(this._label||this._heading),this.validateLevel(this._level),this.validateOn(this._on),this.validateOpen(this._open)}get host(){return getElement(this)}static get watchers(){return{_heading:["validateHeading"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_open:["validateOpen"]}}};KolAccordion.style={default:KolAccordionDefaultStyle0};export{KolAccordion as kol_accordion};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{t as translate}from"./i18n-8ac68853.js";import{v as validateHasCloser}from"./has-closer-
|
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{t as translate}from"./i18n-8ac68853.js";import{v as validateHasCloser}from"./has-closer-2c2d8b99.js";import{v as validateLabel}from"./label-7db04673.js";import{L as Log}from"./dev.utils-d4a31161.js";import{a as watchBoolean,s as setState,w as watchValidator}from"./prop.validators-13f7a3fd.js";import{w as watchHeadingLevel}from"./validation-7c648181.js";import{c as KolHeadingWcTag,d as KolButtonWcTag,h as KolIconTag}from"./component-names-fed305c7.js";import"./i18n-a2f79a81.js";import"./reuse-d79ab469.js";import"./a11y.tipps-f2507b68.js";import"./index-117bd1aa.js";const Icon=a=>h(KolIconTag,{class:"heading-icon",_ariaLabel:"string"==typeof a.label&&a.label.length>0?"":a.ariaLabel,_icons:a.icon}),AlertIcon=a=>{switch(a.type){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:a.label});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:a.label});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:a.label});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:a.label});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:a.label})}},KolAlertWc=class{constructor(a){registerInstance(this,a),this.close=()=>{var a;void 0!==(null===(a=this._on)||void 0===a?void 0:a.onClose)&&this._on.onClose(new Event("Close"))},this.on={onClick:this.close},this.validateOnValue=a=>"object"==typeof a&&null!==a&&"function"==typeof a.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){var a;if(this.state._alert){try{Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(a){Log.debug("Navigator does not support vibration.")}setTimeout((()=>{this.validateAlert(!1)}),1e4)}return h(Host,{key:"5623c860359559b0888b7e01bd43bd0944b3f621",class:{"kol-alert-wc":!0,[this.state._type]:!0,[this.state._variant]:!0,hasCloser:!!this.state._hasCloser},role:this.state._alert?"alert":void 0},h("div",{key:"11a550e34680bae64f86fba0635ad1365ee4df7e",class:"heading"},h(AlertIcon,{key:"63a3d7902e23f07c14ab7212c4bd4905eedec39f",label:this.state._label,type:this.state._type}),h("div",{key:"f3d110da2a70bb609c306dab61e5549bb2fc93ea"},"string"==typeof this.state._label&&(null===(a=this.state._label)||void 0===a?void 0:a.length)>0&&h(KolHeadingWcTag,{key:"a361b01b6ae62e81062f1b02d6e233f25bf884b0",_label:this.state._label,_level:this.state._level}),"msg"===this.state._variant&&h("div",{key:"1d7f25fd69fde4e24b7276d07c84421937d55ade",class:"content"},h("slot",{key:"d34b1c369f545522a9663248ce8aa1e73952f469"}))),this.state._hasCloser&&h(KolButtonWcTag,{key:"31741ec67c586e60ca092feb6f07e05bd2dc127d",class:"close",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close"),_on:this.on,_tooltipAlign:"left"})),"card"===this.state._variant&&h("div",{key:"07b9d36d6c0b62a3a19172eae0f24b90bbb1b793",class:"content"},h("slot",{key:"3fb53c9f8381578b9a0ea72e07774baf64c8d52e"})))}validateAlert(a){watchBoolean(this,"_alert",a)}validateHasCloser(a){validateHasCloser(this,a)}validateLabel(a){validateLabel(this,a)}validateLevel(a){watchHeadingLevel(this,a)}validateOn(a){this.validateOnValue(a)&&setState(this,"_on",{onClose:a.onClose})}validateType(a){watchValidator(this,"_type",(a=>"string"==typeof a&&("default"===a||"error"===a||"info"===a||"success"===a||"warning"===a)),new Set("String {success, info, warning, error}"),a)}validateVariant(a){watchValidator(this,"_variant",(a=>"card"===a||"msg"===a),new Set("AlertVariant {card, msg}"),a)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}};export{KolAlertWc as kol_alert_wc};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{t as translate}from"./i18n-8ac68853.js";import{v as validateImageSource}from"./image-source-
|
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{t as translate}from"./i18n-8ac68853.js";import{v as validateImageSource}from"./image-source-2fe04afc.js";import{v as validateLabel}from"./label-7db04673.js";import"./i18n-a2f79a81.js";import"./reuse-d79ab469.js";import"./prop.validators-13f7a3fd.js";import"./index-117bd1aa.js";import"./a11y.tipps-f2507b68.js";import"./dev.utils-d4a31161.js";const formatNameAsInitial=a=>0===a.length?"":a[0].toUpperCase(),formatLabelAsInitials=a=>{const t=a.split(/\s+/),e=t.at(0),s=t.at(-1);return t.length>=2&&e&&s?`${formatNameAsInitial(e)}${formatNameAsInitial(s)}`:formatNameAsInitial(a)},KolAvatarWc=class{constructor(a){registerInstance(this,a),this._src=void 0,this._label=void 0,this.state={_src:"",_label:"…"}}render(){return h(Host,{key:"41951a5655fb3122a3106b3d2b4d4228ebe5b2f4",class:"kol-avatar-wc"},h("div",{key:"f768dc508b07c443b9d180ca9b626a22b02a26de","aria-label":translate("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"container",role:"img"},this.state._src?h("img",{alt:"","aria-hidden":"true",class:"image",src:this.state._src}):h("span",{"aria-hidden":"true",class:"initials"},formatLabelAsInitials(this.state._label.trim()))))}validateSrc(a){validateImageSource(this,a)}validateLabel(a){validateLabel(this,a,{required:!0})}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}};export{KolAvatarWc as kol_avatar_wc};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{h as handleColorChange,v as validateColor}from"./color-
|
|
4
|
+
import{r as registerInstance,h,H as Host}from"./index-dfb131c4.js";import{h as handleColorChange,v as validateColor}from"./color-1af0f468.js";import{f as featureHint}from"./a11y.tipps-f2507b68.js";import{n as nonce}from"./dev.utils-d4a31161.js";import{o as objectObjectHandler,p as parseJson,s as setState}from"./prop.validators-13f7a3fd.js";import{d as KolButtonWcTag,g as KolSpanWcTag}from"./component-names-fed305c7.js";import"./reuse-d79ab469.js";import"./index-117bd1aa.js";const defaultStyleCss=":host{--a11y-min-size:44px;background-color:white;color:black;font-family:Verdana}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role=button],button:not([role=link]),.kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}[hidden]{display:none !important}:host{max-width:100%}*{box-sizing:border-box}.kol-span-wc{display:grid;place-items:center}.kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}.icon-only>.kol-span-wc>span>span{display:none}.hidden{display:none;visibility:hidden}:host>span{display:inline-flex;place-items:center}:host>span>.kol-button-wc button{color:inherit}",KolBadgeDefaultStyle0=defaultStyleCss;featureHint("[KolBadge] Optimierung des _color-Properties (rgba, rgb, hex usw.).");const KolBadge=class{constructor(t){registerInstance(this,t),this.bgColorStr="#000",this.colorStr="#fff",this.id=nonce(),this.handleColorChange=t=>{const o=handleColorChange(t);this.bgColorStr=o.backgroundColor,this.colorStr=o.foregroundColor},this._color="#000",this._hideLabel=!1,this._icon=void 0,this._icons=void 0,this._iconOnly=void 0,this._label=void 0,this._smartButton=void 0,this.state={_color:{backgroundColor:"#000",foregroundColor:"#fff"}}}renderSmartButton(t){return h(KolButtonWcTag,{_ariaControls:this.id,_customClass:t._customClass,_disabled:t._disabled,_hideLabel:!0,_icons:t._icons||t._icon,_id:t._id,_label:t._label,_on:t._on,_tooltipAlign:t._tooltipAlign,_variant:t._variant})}render(){const t="object"==typeof this.state._smartButton&&null!==this.state._smartButton;return h(Host,{key:"928a4a12998193fd35e8113e30483f0889cb113a",class:"kol-badge"},h("span",{key:"9334506c7d5601388c2731c827c1cd54d1c0ba9a",class:{"smart-button":"object"==typeof this.state._smartButton&&null!==this.state._smartButton},style:{backgroundColor:this.bgColorStr,color:this.colorStr}},h(KolSpanWcTag,{key:"e54f0c27feff596569925eb88d24f346cebf56fd",id:t?this.id:void 0,_allowMarkdown:!0,_hideLabel:this._hideLabel||this._iconOnly,_icons:this._icons||this._icon,_label:this._label}),t&&this.renderSmartButton(this.state._smartButton)))}validateColor(t){validateColor(this,t,{defaultValue:"#000",hooks:{beforePatch:this.handleColorChange}})}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this,"_smartButton",t)}))}componentWillLoad(){this.validateColor(this._color),this.validateSmartButton(this._smartButton)}static get watchers(){return{_color:["validateColor"],_smartButton:["validateSmartButton"]}}};KolBadge.style={default:KolBadgeDefaultStyle0};export{KolBadge as kol_badge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,h,F as Fragment,H as Host}from"./index-dfb131c4.js";import{v as validateLabel}from"./label-
|
|
4
|
+
import{r as registerInstance,h,F as Fragment,H as Host}from"./index-dfb131c4.js";import{v as validateLabel}from"./label-7db04673.js";import{b as a11yHintLabelingLandmarks}from"./a11y.tipps-f2507b68.js";import{r as removeNavLabel,a as addNavLabel}from"./unique-nav-labels-62d9802d.js";import{w as watchNavLinks}from"./validation-a994c5e0.js";import{h as KolIconTag,i as KolLinkTag}from"./component-names-fed305c7.js";import"./prop.validators-13f7a3fd.js";import"./index-117bd1aa.js";import"./dev.utils-d4a31161.js";import"./reuse-d79ab469.js";const defaultStyleCss=':host{--a11y-min-size:44px;background-color:white;color:black;font-family:Verdana}*{hyphens:auto;letter-spacing:inherit;word-break:break-word;word-spacing:inherit}[role=button],button:not([role=link]),.kol-input .input{min-height:var(--a11y-min-size);min-width:var(--a11y-min-size)}a,button,h1,h2,h3,h4,h5,h6,input,option,select,textarea{font-family:inherit;font-size:inherit}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:is(a,button){background-color:transparent;border:none;margin:0;padding:0;width:100%;}[hidden]{display:none !important}:host{max-width:100%}*{box-sizing:border-box}.kol-span-wc{display:grid;place-items:center}.kol-span-wc>span{display:flex;place-items:center}a,button{cursor:pointer}.icon-only>.kol-span-wc>span>span{display:none}.hidden{display:none;visibility:hidden}li,ul{margin:0;padding:0;list-style:none;display:flex;gap:0.5em;flex-wrap:wrap;place-items:center}.kol-icon::part(separator){font-weight:900;font-size:0.7em}.kol-icon::part(separator):before{content:"\\f054";font-family:"Font Awesome 6 Free"}',KolBreadcrumbDefaultStyle0=defaultStyleCss,KolBreadcrumb=class{constructor(a){registerInstance(this,a),this.renderLink=(a,e)=>{const i=this.state._links.length-1,t=a._iconOnly||a._hideLabel;return h("li",{key:e},0!==e&&h(KolIconTag,{_label:"",_icons:"codicon codicon-chevron-right"}),e===i?h("span",null,t?h(KolIconTag,{_label:a._label,_icons:"string"==typeof a._icon?a._icon:"codicon codicon-symbol-event"}):h(Fragment,null,a._label)):h(KolLinkTag,Object.assign({},a)))},this._ariaLabel=void 0,this._label=void 0,this._links=void 0,this.state={_label:"…",_links:[]}}render(){var a;return h(Host,{key:"03ff5ece936c843d1675c64ff7b7b5afbd134b40",class:"kol-breadcrumb"},h("nav",{key:"94e1e2d4d4329e61e5477eb57cde76ecbce514f7","aria-label":null!==(a=this.state._label)&&void 0!==a?a:""},h("ul",{key:"dbfccf5de6121a8b9c20c2b6d93f30289a774bd5"},0===this.state._links.length&&h("li",{key:"dc595bdfb03d42ad8c909f2fe26734ad89a3ce3d"},h(KolIconTag,{key:"86f007ea0d61645e32e7b4b0c8578d025046b289",_label:"",_icons:"codicon codicon-home"}),"…"),this.state._links.map(this.renderLink))))}validateAriaLabel(a){this.validateLabel(a)}validateLabel(a,e,i=!1){i||removeNavLabel(this.state._label),validateLabel(this,a,{defaultValue:"…"}),a11yHintLabelingLandmarks(a),addNavLabel(this.state._label)}validateLinks(a){watchNavLinks("KolBreadcrumb",this,a)}componentWillLoad(){this.validateLabel(this._label||this._ariaLabel,void 0,!0),this.validateLinks(this._links)}disconnectedCallback(){removeNavLabel(this.state._label)}static get watchers(){return{_ariaLabel:["validateAriaLabel"],_label:["validateLabel"],_links:["validateLinks"]}}};KolBreadcrumb.style={default:KolBreadcrumbDefaultStyle0};export{KolBreadcrumb as kol_breadcrumb};
|