@public-ui/components 2.2.9 → 2.2.10-rc.1
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/{Alert-1c997fb2.js → Alert-ec473eb7.js} +1 -1
- package/dist/cjs/{Alert-1c997fb2.js.map → Alert-ec473eb7.js.map} +1 -1
- package/dist/cjs/{Collapsible-62b614e1.js → Collapsible-9fc1544e.js} +1 -1
- package/dist/cjs/{Collapsible-62b614e1.js.map → Collapsible-9fc1544e.js.map} +1 -1
- package/dist/cjs/FormFieldMsg-48b4bd3c.js +4 -0
- package/dist/cjs/{FormFieldMsg-d4e0db6a.js.map → FormFieldMsg-48b4bd3c.js.map} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-85d272e1.js → InternalUnderlinedBadgeText-1319bdd6.js} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-85d272e1.js.map → InternalUnderlinedBadgeText-1319bdd6.js.map} +1 -1
- package/dist/cjs/{app-globals-814ade9f.js → app-globals-1ffc73ea.js} +1 -1
- package/dist/cjs/{app-globals-814ade9f.js.map → app-globals-1ffc73ea.js.map} +1 -1
- package/dist/cjs/{dev.utils-a209cf65.js → dev.utils-0772ced2.js} +1 -1
- package/dist/cjs/{dev.utils-a209cf65.js.map → dev.utils-0772ced2.js.map} +1 -1
- package/dist/cjs/{devtools-91d47360.js → devtools-89b6be7c.js} +1 -1
- package/dist/cjs/{devtools-91d47360.js.map → devtools-89b6be7c.js.map} +1 -1
- package/dist/cjs/index-81b8c1ed.js +4 -0
- package/dist/cjs/index-81b8c1ed.js.map +1 -0
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js +1 -1
- package/dist/cjs/kol-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/kol-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button-group-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-form.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-heading-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-indented-text.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button.cjs.entry.js.map +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-progress.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-single-select.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-skip-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-span-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-spin.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-table.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/kol-toolbar.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js.map +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/kol-abbr.js +1 -1
- package/dist/components/kol-abbr.js.map +1 -1
- package/dist/components/kol-accordion.js +1 -1
- package/dist/components/kol-accordion.js.map +1 -1
- package/dist/components/kol-alert.js +1 -1
- package/dist/components/kol-alert.js.map +1 -1
- package/dist/components/kol-avatar.js +1 -1
- package/dist/components/kol-avatar.js.map +1 -1
- package/dist/components/kol-badge.js +1 -1
- package/dist/components/kol-badge.js.map +1 -1
- package/dist/components/kol-breadcrumb.js +1 -1
- package/dist/components/kol-breadcrumb.js.map +1 -1
- package/dist/components/kol-button-group.js +1 -1
- package/dist/components/kol-button-group.js.map +1 -1
- package/dist/components/kol-button-link.js +1 -1
- package/dist/components/kol-button-link.js.map +1 -1
- package/dist/components/kol-button.js +1 -1
- package/dist/components/kol-button.js.map +1 -1
- package/dist/components/kol-card.js +1 -1
- package/dist/components/kol-card.js.map +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-combobox.js.map +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-details.js.map +1 -1
- package/dist/components/kol-drawer.js +1 -1
- package/dist/components/kol-drawer.js.map +1 -1
- package/dist/components/kol-form.js +1 -1
- package/dist/components/kol-form.js.map +1 -1
- package/dist/components/kol-heading.js +1 -1
- package/dist/components/kol-heading.js.map +1 -1
- package/dist/components/kol-image.js +1 -1
- package/dist/components/kol-image.js.map +1 -1
- package/dist/components/kol-indented-text-wc.js +1 -1
- package/dist/components/kol-indented-text.js +1 -1
- package/dist/components/kol-indented-text.js.map +1 -1
- package/dist/components/kol-input-checkbox.js +1 -1
- package/dist/components/kol-input-checkbox.js.map +1 -1
- package/dist/components/kol-input-color.js +1 -1
- package/dist/components/kol-input-color.js.map +1 -1
- package/dist/components/kol-input-date.js +1 -1
- package/dist/components/kol-input-date.js.map +1 -1
- package/dist/components/kol-input-email.js +1 -1
- package/dist/components/kol-input-email.js.map +1 -1
- package/dist/components/kol-input-file.js +1 -1
- package/dist/components/kol-input-file.js.map +1 -1
- package/dist/components/kol-input-number.js +1 -1
- package/dist/components/kol-input-number.js.map +1 -1
- package/dist/components/kol-input-password.js +1 -1
- package/dist/components/kol-input-password.js.map +1 -1
- package/dist/components/kol-input-radio.js +1 -1
- package/dist/components/kol-input-radio.js.map +1 -1
- package/dist/components/kol-input-range.js +1 -1
- package/dist/components/kol-input-range.js.map +1 -1
- package/dist/components/kol-input-text.js +1 -1
- package/dist/components/kol-input-text.js.map +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-kolibri.js.map +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link-button.js.map +1 -1
- package/dist/components/kol-link-group.js +1 -1
- package/dist/components/kol-link-group.js.map +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-link.js.map +1 -1
- package/dist/components/kol-logo.js +1 -1
- package/dist/components/kol-logo.js.map +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-modal.js.map +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-nav.js.map +1 -1
- package/dist/components/kol-pagination.js +1 -1
- package/dist/components/kol-pagination.js.map +1 -1
- package/dist/components/kol-popover-button.js +1 -1
- package/dist/components/kol-popover-button.js.map +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-progress.js.map +1 -1
- package/dist/components/kol-quote.js +1 -1
- package/dist/components/kol-quote.js.map +1 -1
- package/dist/components/kol-select.js +1 -1
- package/dist/components/kol-select.js.map +1 -1
- package/dist/components/kol-single-select.js +1 -1
- package/dist/components/kol-single-select.js.map +1 -1
- package/dist/components/kol-skip-nav.js +1 -1
- package/dist/components/kol-skip-nav.js.map +1 -1
- package/dist/components/kol-spin.js +1 -1
- package/dist/components/kol-spin.js.map +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-split-button.js.map +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateful.js.map +1 -1
- package/dist/components/kol-table-stateless-wc.js +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-table-stateless.js.map +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-tabs.js.map +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-textarea.js.map +1 -1
- package/dist/components/kol-toast-container.js +1 -1
- package/dist/components/kol-toast-container.js.map +1 -1
- package/dist/components/kol-toolbar.js +1 -1
- package/dist/components/kol-toolbar.js.map +1 -1
- package/dist/components/kol-tree-item-wc.js +1 -1
- package/dist/components/kol-tree-item-wc.js.map +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/components/kol-tree-item.js.map +1 -1
- package/dist/components/kol-tree-wc.js +1 -1
- package/dist/components/kol-tree.js +1 -1
- package/dist/components/kol-tree.js.map +1 -1
- package/dist/components/kol-version.js +1 -1
- package/dist/components/kol-version.js.map +1 -1
- package/dist/esm/{Alert-6f0843f6.js → Alert-1faeccd5.js} +1 -1
- package/dist/esm/{Alert-6f0843f6.js.map → Alert-1faeccd5.js.map} +1 -1
- package/dist/esm/{Collapsible-368a515a.js → Collapsible-837940ad.js} +1 -1
- package/dist/esm/{Collapsible-368a515a.js.map → Collapsible-837940ad.js.map} +1 -1
- package/dist/esm/{FormFieldMsg-e0f8588a.js → FormFieldMsg-c2779dd5.js} +1 -1
- package/dist/esm/{FormFieldMsg-e0f8588a.js.map → FormFieldMsg-c2779dd5.js.map} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-7a939421.js → InternalUnderlinedBadgeText-dcdf17c3.js} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-7a939421.js.map → InternalUnderlinedBadgeText-dcdf17c3.js.map} +1 -1
- package/dist/esm/{app-globals-3ad7ab51.js → app-globals-25bd823d.js} +1 -1
- package/dist/esm/{app-globals-3ad7ab51.js.map → app-globals-25bd823d.js.map} +1 -1
- package/dist/esm/{dev.utils-63121437.js → dev.utils-647fdf10.js} +1 -1
- package/dist/esm/{dev.utils-63121437.js.map → dev.utils-647fdf10.js.map} +1 -1
- package/dist/esm/{devtools-d1ae9e6b.js → devtools-e98c12d4.js} +1 -1
- package/dist/esm/{devtools-d1ae9e6b.js.map → devtools-e98c12d4.js.map} +1 -1
- package/dist/esm/index-81670636.js +4 -0
- package/dist/esm/index-81670636.js.map +1 -0
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-abbr.entry.js.map +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js.map +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js.map +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js +1 -1
- package/dist/esm/kol-avatar.entry.js.map +1 -1
- package/dist/esm/kol-badge.entry.js +1 -1
- package/dist/esm/kol-badge.entry.js.map +1 -1
- package/dist/esm/kol-breadcrumb.entry.js +1 -1
- package/dist/esm/kol-breadcrumb.entry.js.map +1 -1
- package/dist/esm/kol-button-group-wc.entry.js +1 -1
- package/dist/esm/kol-button-group.entry.js +1 -1
- package/dist/esm/kol-button-group.entry.js.map +1 -1
- package/dist/esm/kol-button-link.entry.js +1 -1
- package/dist/esm/kol-button-link.entry.js.map +1 -1
- package/dist/esm/kol-button-wc.entry.js +1 -1
- package/dist/esm/kol-button.entry.js +1 -1
- package/dist/esm/kol-button.entry.js.map +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-card.entry.js.map +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js.map +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-details.entry.js.map +1 -1
- package/dist/esm/kol-drawer.entry.js +1 -1
- package/dist/esm/kol-drawer.entry.js.map +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-form.entry.js.map +1 -1
- package/dist/esm/kol-heading-wc.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js.map +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-image.entry.js.map +1 -1
- package/dist/esm/kol-indented-text-wc.entry.js +1 -1
- package/dist/esm/kol-indented-text.entry.js +1 -1
- package/dist/esm/kol-indented-text.entry.js.map +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js.map +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js.map +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js.map +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js.map +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js.map +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js.map +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js.map +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js.map +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js.map +1 -1
- package/dist/esm/kol-input.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js.map +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js.map +1 -1
- package/dist/esm/kol-link-group.entry.js +1 -1
- package/dist/esm/kol-link-group.entry.js.map +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-link.entry.js.map +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-logo.entry.js.map +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js.map +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js.map +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js.map +1 -1
- package/dist/esm/kol-popover-button.entry.js +1 -1
- package/dist/esm/kol-popover-button.entry.js.map +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-progress.entry.js.map +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js.map +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-select.entry.js.map +1 -1
- package/dist/esm/kol-single-select.entry.js +1 -1
- package/dist/esm/kol-single-select.entry.js.map +1 -1
- package/dist/esm/kol-skip-nav.entry.js +1 -1
- package/dist/esm/kol-skip-nav.entry.js.map +1 -1
- package/dist/esm/kol-span-wc.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js +1 -1
- package/dist/esm/kol-spin.entry.js.map +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js.map +1 -1
- package/dist/esm/kol-symbol.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js.map +1 -1
- package/dist/esm/kol-table.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js.map +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js.map +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js.map +1 -1
- package/dist/esm/kol-toolbar.entry.js +1 -1
- package/dist/esm/kol-toolbar.entry.js.map +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item-wc.entry.js.map +1 -1
- package/dist/esm/kol-tree-item.entry.js +1 -1
- package/dist/esm/kol-tree-item.entry.js.map +1 -1
- package/dist/esm/kol-tree-wc.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js.map +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kol-version.entry.js.map +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/{Alert-6f0843f6.js → Alert-1faeccd5.js} +1 -1
- package/dist/kolibri/{Collapsible-368a515a.js → Collapsible-837940ad.js} +1 -1
- package/dist/kolibri/FormFieldMsg-c2779dd5.js +4 -0
- package/dist/kolibri/InternalUnderlinedBadgeText-dcdf17c3.js +4 -0
- package/dist/kolibri/app-globals-25bd823d.js +4 -0
- package/dist/kolibri/{dev.utils-63121437.js → dev.utils-647fdf10.js} +1 -1
- package/dist/kolibri/{devtools-d1ae9e6b.js → devtools-e98c12d4.js} +1 -1
- package/dist/kolibri/{index-b2074e97.js → index-81670636.js} +2 -2
- package/dist/kolibri/index-81670636.js.map +1 -0
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js.map +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js.map +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js.map +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js +1 -1
- package/dist/kolibri/kol-avatar.entry.js.map +1 -1
- package/dist/kolibri/kol-badge.entry.js +1 -1
- package/dist/kolibri/kol-badge.entry.js.map +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
- package/dist/kolibri/kol-breadcrumb.entry.js.map +1 -1
- package/dist/kolibri/kol-button-group-wc.entry.js +1 -1
- package/dist/kolibri/kol-button-group.entry.js +1 -1
- package/dist/kolibri/kol-button-group.entry.js.map +1 -1
- package/dist/kolibri/kol-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-link.entry.js.map +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js.map +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js.map +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js.map +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js.map +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js.map +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js.map +1 -1
- package/dist/kolibri/kol-heading-wc.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js.map +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js.map +1 -1
- package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
- package/dist/kolibri/kol-indented-text.entry.js +1 -1
- package/dist/kolibri/kol-indented-text.entry.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js.map +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js.map +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js.map +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js.map +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js.map +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js.map +1 -1
- package/dist/kolibri/kol-input.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js.map +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js.map +1 -1
- package/dist/kolibri/kol-link-group.entry.js +1 -1
- package/dist/kolibri/kol-link-group.entry.js.map +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js.map +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-logo.entry.js.map +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js.map +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js.map +1 -1
- package/dist/kolibri/kol-popover-button.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.entry.js.map +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-progress.entry.js.map +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js.map +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js.map +1 -1
- package/dist/kolibri/kol-single-select.entry.js +1 -1
- package/dist/kolibri/kol-single-select.entry.js.map +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js +1 -1
- package/dist/kolibri/kol-skip-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-span-wc.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js +1 -1
- package/dist/kolibri/kol-spin.entry.js.map +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js.map +1 -1
- package/dist/kolibri/kol-symbol.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
- package/dist/kolibri/kol-table.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js.map +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js.map +1 -1
- package/dist/kolibri/kol-toast-container.entry.js +1 -1
- package/dist/kolibri/kol-toast-container.entry.js.map +1 -1
- package/dist/kolibri/kol-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-toolbar.entry.js.map +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js.map +1 -1
- package/dist/kolibri/kol-tree-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js.map +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js.map +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/kolibri.esm.js.map +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components/combobox/shadow.d.ts +1 -0
- package/dist/types/components/single-select/shadow.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/FormFieldMsg-d4e0db6a.js +0 -4
- package/dist/cjs/index-0291119a.js +0 -4
- package/dist/cjs/index-0291119a.js.map +0 -1
- package/dist/esm/index-b2074e97.js +0 -4
- package/dist/esm/index-b2074e97.js.map +0 -1
- package/dist/kolibri/FormFieldMsg-e0f8588a.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-7a939421.js +0 -4
- package/dist/kolibri/app-globals-3ad7ab51.js +0 -4
- package/dist/kolibri/index-b2074e97.js.map +0 -1
- /package/dist/kolibri/{Alert-6f0843f6.js.map → Alert-1faeccd5.js.map} +0 -0
- /package/dist/kolibri/{Collapsible-368a515a.js.map → Collapsible-837940ad.js.map} +0 -0
- /package/dist/kolibri/{FormFieldMsg-e0f8588a.js.map → FormFieldMsg-c2779dd5.js.map} +0 -0
- /package/dist/kolibri/{InternalUnderlinedBadgeText-7a939421.js.map → InternalUnderlinedBadgeText-dcdf17c3.js.map} +0 -0
- /package/dist/kolibri/{app-globals-3ad7ab51.js.map → app-globals-25bd823d.js.map} +0 -0
- /package/dist/kolibri/{dev.utils-63121437.js.map → dev.utils-647fdf10.js.map} +0 -0
- /package/dist/kolibri/{devtools-d1ae9e6b.js.map → devtools-e98c12d4.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-toolbar.js","mappings":";;;;;;;;AAiBO,MAAM,oBAAoB,GAAG,CAAC,SAAoC,EAAE,KAA4B;IACtG,yBAAyB,CAAC,KAAK,EAAE;QAChC,mBAAmB,CAAC,KAAK,EAAE;YAC1B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;gBACjC,KAAK,GAAG,EAAE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AAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,wBAAwB,EAAE,CAAC;KAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolToolbar"],"sources":["src/schema/props/toolbar-items.ts","src/components/toolbar/style.scss?tag=kol-toolbar&mode=default&encapsulation=shadow","src/components/toolbar/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { emptyStringByArrayHandler, objectObjectHandler, parseJson, setState } from '../utils';\nimport type { ButtonProps, LinkProps } from '../../schema';\n\n/* types */\nexport type ToolbarItemPropType = ButtonProps | LinkProps;\nexport type ToolbarItemsPropType = ToolbarItemPropType[];\n\n/**\n * Defines the primary toolbar items.\n */\nexport type PropToolbarItems = {\n\titems: ToolbarItemsPropType;\n};\n\n/* validator */\nexport const validateToolbarItems = (component: Generic.Element.Component, value?: ToolbarItemsPropType): void => {\n\temptyStringByArrayHandler(value, () => {\n\t\tobjectObjectHandler(value, () => {\n\t\t\tif (typeof value === 'undefined') {\n\t\t\t\tvalue = [];\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ToolbarItemPropType[]>(value);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value keeps the original items\n\t\t\t}\n\t\t\tif (Array.isArray(value) && value.every((items: ToolbarItemPropType) => typeof items === 'object' && items !== null)) {\n\t\t\t\tsetState(component, '_items', value);\n\t\t\t}\n\t\t});\n\t});\n};\n","@use '../@shared/mixins' as *;\n@use '../style' as *;\n@use '../tooltip/style.scss' as *;\n\n@layer kol-component {\n\t.toolbar {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: rem(16);\n\t\tflex-wrap: wrap;\n\n\t\t&:focus-within {\n\t\t\toutline: 1px solid;\n\t\t\toutline-offset: 2px;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, Element, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\n\nimport type { LabelPropType, ToolbarAPI, ToolbarStates, ToolbarItemsPropType, ToolbarItemPropType } from '../../schema';\nimport { validateLabel, validateToolbarItems } from '../../schema';\nimport { KolButtonWcTag, KolLinkWcTag } from '../../core/component-names';\n\nconst TOOLBAR_ITEM_TAG_NAME = 'kol-toolbar-item';\n\n@Component({\n\ttag: 'kol-toolbar',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolToolbar implements ToolbarAPI {\n\t@Element() host!: HTMLElement;\n\n\t@State() public state: ToolbarStates = {\n\t\t_label: '',\n\t\t_items: [],\n\t};\n\n\t@State() private currentIndex: number = 0;\n\n\tprivate indexToElement = new Map<number, HTMLKolLinkWcElement | HTMLKolButtonWcElement>();\n\n\tprivate renderItem = (element: ToolbarItemPropType, index: number): JSX.Element => {\n\t\tconst tabIndex = index === this.currentIndex && !element?._disabled ? 0 : -1;\n\t\tconst props = {\n\t\t\tkey: index,\n\t\t\t_tabIndex: tabIndex,\n\t\t\tclass: `button normal ${TOOLBAR_ITEM_TAG_NAME} `,\n\t\t};\n\t\tconst catchRef = (element?: HTMLKolLinkWcElement | HTMLKolButtonWcElement) => {\n\t\t\telement && this.indexToElement.set(index, element);\n\t\t};\n\n\t\treturn '_href' in element ? (\n\t\t\t<KolLinkWcTag {...element} {...props} ref={catchRef}></KolLinkWcTag>\n\t\t) : (\n\t\t\t<KolButtonWcTag {...element} {...props} ref={catchRef}></KolButtonWcTag>\n\t\t);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-toolbar\">\n\t\t\t\t<div class=\"toolbar\" role=\"toolbar\" aria-label={this.state._label}>\n\t\t\t\t\t{this.state._items.map(this.renderItem)}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n\n\t/**\n\t * Defines the functional elements of toolbar to render (e.g. kol-link, kol-button).\n\t */\n\t@Prop() public _items!: ToolbarItemsPropType;\n\n\t@Watch('_label') validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_items')\n\tpublic validateItems(value?: ToolbarItemsPropType): void {\n\t\tvalidateToolbarItems(this, value);\n\t}\n\n\t/**\n\t * Retrieves the toolbar item by index if defined.\n\t * If not it use the current index of state.\n\t *\n\t * @returns An array of HTMLElements representing the toolbar items.\n\t */\n\tprivate getCurrentToolbarItem(index?: number): ChildNode | undefined {\n\t\treturn typeof index === 'number' ? this.indexToElement.get(index) : undefined;\n\t}\n\n\t/**\n\t * Sets the index of the first enabled toolbar item.\n\t */\n\tprivate setFirstEnabledItemIndex() {\n\t\tthis.currentIndex = this.state._items?.findIndex((item) => !item._disabled);\n\t}\n\n\t@Listen('keydown')\n\tpublic handleKeyDown(event: KeyboardEvent) {\n\t\tconst isArrowKey = event.code === 'ArrowRight' || event.code === 'ArrowLeft';\n\t\tif (!isArrowKey) return;\n\t\tevent.preventDefault();\n\n\t\tconst lastItemIndex = this._items?.length - 1;\n\t\tconst currentIndex = this.currentIndex;\n\t\tlet nextIndex = 0;\n\n\t\tswitch (event.code) {\n\t\t\tcase 'ArrowLeft':\n\t\t\t\tnextIndex = currentIndex !== nextIndex ? currentIndex - 1 : lastItemIndex;\n\t\t\t\tbreak;\n\t\t\tcase 'ArrowRight':\n\t\t\t\tif (lastItemIndex !== currentIndex) nextIndex = currentIndex + 1;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (currentIndex === nextIndex) return;\n\n\t\tthis.currentIndex = nextIndex;\n\t\tvoid (this.getCurrentToolbarItem(nextIndex) as HTMLKolLinkElement | HTMLKolButtonElement | undefined)?.kolFocus();\n\t}\n\n\t/**\n\t * Resets the tabIndexes of the toolbar to default.\n\t */\n\t@Listen('blur', { capture: true })\n\tpublic handleBlur(event: FocusEvent) {\n\t\tif (event.target === this.host) this.setFirstEnabledItemIndex();\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateItems(this._items);\n\t\tthis.setFirstEnabledItemIndex();\n\t}\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{l as KolLinkWcTag,e as KolIconTag,w as KolTreeTag}from"./component-names.js";import{n as nonce}from"./dev.utils2.js";import{b as watchBoolean}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{v as validateOpen}from"./open.js";import{v as validateHref}from"./href.js";const validateActive=(e,t,a)=>{watchBoolean(e,"_active",t,a)},KolTreeItemWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.groupId=`tree-group-${nonce()}`,this.level=void 0,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1},this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}render(){const{_href:e,_active:t,_hasChildren:a,_open:i,_label:l}=this.state;return h(Host,{key:"ceb601f2530ae6d55fe0a136905b084acb3a58c4",onSlotchange:this.handleSlotchange.bind(this),class:"kol-tree-item-wc"},h("li",{key:"cf961136786ddbf84b69485240b2ad564fdd3344",class:"tree-item",style:{"--level":`${this.level}`}},h(KolLinkWcTag,{key:"6b2fef9321edbacad56337a59ff24e7f00faa02c",class:{"tree-link":!0,"first-level":0===this.level,active:Boolean(t)},_href:e,_label:"",_role:"treeitem",_tabIndex:t?0:-1,_ariaExpanded:a?i:void 0,_ariaOwns:a?this.groupId:void 0,ref:e=>this.linkElement=e},h("span",{key:"3d1e9682b93daf10ce9f39708af6ab3651e61fa5",class:"tree-link-inner",slot:"expert"},a?h("span",{class:"toggle-button",onClick:e=>i?void this.handleCollapseClick(e):void this.handleExpandClick(e)},h(KolIconTag,{class:"toggle-button-icon",_icons:"codicon codicon-"+(i?"chevron-down":"chevron-right"),_label:""})):h("span",{class:"toggle-button-placeholder"}),l)),h("ul",{key:"
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{l as KolLinkWcTag,e as KolIconTag,w as KolTreeTag}from"./component-names.js";import{n as nonce}from"./dev.utils2.js";import{b as watchBoolean}from"./prop.validators.js";import{v as validateLabel}from"./label.js";import{v as validateOpen}from"./open.js";import{v as validateHref}from"./href.js";const validateActive=(e,t,a)=>{watchBoolean(e,"_active",t,a)},KolTreeItemWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.groupId=`tree-group-${nonce()}`,this.level=void 0,this.state={_active:!1,_hasChildren:!1,_href:"",_label:"",_open:!1},this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}render(){const{_href:e,_active:t,_hasChildren:a,_open:i,_label:l}=this.state;return h(Host,{key:"ceb601f2530ae6d55fe0a136905b084acb3a58c4",onSlotchange:this.handleSlotchange.bind(this),class:"kol-tree-item-wc"},h("li",{key:"cf961136786ddbf84b69485240b2ad564fdd3344",class:"tree-item",style:{"--level":`${this.level}`}},h(KolLinkWcTag,{key:"6b2fef9321edbacad56337a59ff24e7f00faa02c",class:{"tree-link":!0,"first-level":0===this.level,active:Boolean(t)},_href:e,_label:"",_role:"treeitem",_tabIndex:t?0:-1,_ariaExpanded:a?i:void 0,_ariaOwns:a?this.groupId:void 0,ref:e=>this.linkElement=e},h("span",{key:"3d1e9682b93daf10ce9f39708af6ab3651e61fa5",class:"tree-link-inner",slot:"expert"},a?h("span",{class:"toggle-button",onClick:e=>i?void this.handleCollapseClick(e):void this.handleExpandClick(e)},h(KolIconTag,{class:"toggle-button-icon",_icons:"codicon codicon-"+(i?"chevron-down":"chevron-right"),_label:""})):h("span",{class:"toggle-button-placeholder"}),h("span",{key:"3372295b8f1da04ce7d985d1c9d40188450d808f",class:"text"},l))),h("ul",{key:"c1d6ff3d02c3414cb2d9500c83c17b9869f9d637",hidden:!a||!i,role:"group",id:this.groupId},h("slot",{key:"254166f7813cd1cb26c15e5334e6688e02b85b87"}))))}validateActive(e){validateActive(this,e||!1)}validateLabel(e){validateLabel(this,e)}validateOpen(e){validateOpen(this,e)}validateHref(e){validateHref(this,e)}componentWillLoad(){this.validateActive(this._active),this.validateLabel(this._label),this.validateOpen(this._open),this.validateHref(this._href),this.checkForChildren(),this.determineTreeItemDepth()}determineTreeItemDepth(){let e=0,t=this.host.parentNode.host.parentNode;for(;null!==t&&t.tagName.toLowerCase()!==KolTreeTag&&t!==document.body;)t=t.parentElement,e+=1;this.level=e}handleSlotchange(){this.checkForChildren()}checkForChildren(){var e,t;this.state=Object.assign(Object.assign({},this.state),{_hasChildren:Boolean(null===(t=null===(e=this.host.querySelector("slot"))||void 0===e?void 0:e.assignedElements)||void 0===t?void 0:t.call(e).length)})}async focusLink(){await this.linkElement.kolFocus()}async handleExpandClick(e){e.preventDefault(),await this.linkElement.kolFocus(),await this.expand()}async expand(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!0}))}async handleCollapseClick(e){e.preventDefault(),this.linkElement.focus(),await this.collapse()}async collapse(){this.state._hasChildren&&(this.state=Object.assign(Object.assign({},this.state),{_open:!1}))}async isOpen(){var e;return null!==(e=this.state._open)&&void 0!==e&&e}get host(){return this}static get watchers(){return{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}}},[4,"kol-tree-item-wc",{_active:[4],_label:[1],_open:[4],_href:[1],level:[32],state:[32],focusLink:[64],expand:[64],collapse:[64],isOpen:[64]},void 0,{_active:["validateActive"],_label:["validateLabel"],_open:["validateOpen"],_href:["validateHref"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item-wc"].forEach((e=>{if("kol-tree-item-wc"===e)customElements.get(e)||customElements.define(e,KolTreeItemWc$1)}))}const KolTreeItemWc=KolTreeItemWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeItemWc,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
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C;KAClC;IAEO,MAAM,iBAAiB,CAAC,KAAiB;QAChD,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;QAClC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;KACpB;IAIM,MAAM,MAAM;QAClB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;YAC5B,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,KAAK,EAAE,IAAI,GACX,CAAC;SACF;KACD;IAEO,MAAM,mBAAmB,CAAC,KAAiB;QAClD,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;KACtB;IAIM,MAAM,QAAQ;QACpB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;YAC5B,IAAI,CAAC,KAAK,mCACN,IAAI,CAAC,KAAK,KACb,KAAK,EAAE,KAAK,GACZ,CAAC;SACF;KACD;IAIM,MAAM,MAAM;;QAClB,OAAO,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,mCAAI,KAAK,CAAC;KACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTreeItemWc"],"sources":["src/schema/props/active.ts","src/components/tree-item/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchBooleanOptions } from '../utils';\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type ActivePropType = boolean;\n\n/**\n * Defines whether something is active.\n */\nexport type PropActive = {\n\tactive: ActivePropType;\n};\n\n/* validator */\nexport const validateActive = (component: Generic.Element.Component, value: ActivePropType, options?: WatchBooleanOptions): void => {\n\twatchBoolean(component, '_active', value, options);\n};\n","import { Component, Element, h, Host, type JSX, Method, Prop, State, Watch } from '@stencil/core';\n\nimport type { ActivePropType, HrefPropType, LabelPropType, OpenPropType, TreeItemAPI, TreeItemStates } from '../../schema';\nimport { validateActive, validateHref, validateLabel, validateOpen } from '../../schema';\nimport { KolLinkWcTag, KolIconTag, KolTreeTag } from '../../core/component-names';\nimport { nonce } from '../../utils/dev.utils';\n\n@Component({\n\ttag: `kol-tree-item-wc`,\n\tshadow: false,\n})\nexport class KolTreeItemWc implements TreeItemAPI {\n\tprivate linkElement!: HTMLKolLinkWcElement;\n\tprivate groupId = `tree-group-${nonce()}`;\n\n\t@State() private level?: number;\n\t@Element() host!: HTMLElement;\n\n\tpublic render(): JSX.Element {\n\t\tconst { _href, _active, _hasChildren, _open, _label } = this.state;\n\t\treturn (\n\t\t\t<Host onSlotchange={this.handleSlotchange.bind(this)} class=\"kol-tree-item-wc\">\n\t\t\t\t<li\n\t\t\t\t\tclass=\"tree-item\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t'--level': `${this.level}`,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<KolLinkWcTag\n\t\t\t\t\t\tclass={{\n\t\t\t\t\t\t\t'tree-link': true,\n\t\t\t\t\t\t\t'first-level': this.level === 0,\n\t\t\t\t\t\t\tactive: Boolean(_active),\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_href={_href}\n\t\t\t\t\t\t_label=\"\"\n\t\t\t\t\t\t_role=\"treeitem\"\n\t\t\t\t\t\t_tabIndex={_active ? 0 : -1}\n\t\t\t\t\t\t_ariaExpanded={_hasChildren ? _open : undefined}\n\t\t\t\t\t\t_ariaOwns={_hasChildren ? this.groupId : undefined}\n\t\t\t\t\t\tref={(element?: HTMLKolLinkWcElement) => (this.linkElement = element!)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"tree-link-inner\" slot=\"expert\">\n\t\t\t\t\t\t\t{_hasChildren ? (\n\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events\n\t\t\t\t\t\t\t\t<span class=\"toggle-button\" onClick={(event) => (_open ? void this.handleCollapseClick(event) : void this.handleExpandClick(event))}>\n\t\t\t\t\t\t\t\t\t<KolIconTag\n\t\t\t\t\t\t\t\t\t\tclass=\"toggle-button-icon\"\n\t\t\t\t\t\t\t\t\t\t_icons={`codicon codicon-${_open ? 'chevron-down' : 'chevron-right'}`}\n\t\t\t\t\t\t\t\t\t\t_label={'' /* Label deliberately left empty */}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span class=\"toggle-button-placeholder\"></span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t<span class=\"text\">{_label}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</KolLinkWcTag>\n\t\t\t\t\t<ul hidden={!_hasChildren || !_open} role=\"group\" id={this.groupId}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</ul>\n\t\t\t\t</li>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@State() public state: TreeItemStates = {\n\t\t_active: false,\n\t\t_hasChildren: false,\n\t\t_href: '',\n\t\t_label: '',\n\t\t_open: false,\n\t};\n\n\t/**\n\t * If set (to true) the tree item is the active one.\n\t */\n\t@Prop() _active?: OpenPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() _label!: LabelPropType;\n\n\t/**\n\t * Opens/expands the element when truthy, closes/collapses when falsy.\n\t */\n\t@Prop() _open?: OpenPropType;\n\n\t/**\n\t * Defines the target URI of the link.\n\t */\n\t@Prop() _href!: HrefPropType;\n\n\t@Watch('_active') validateActive(value?: ActivePropType): void {\n\t\tvalidateActive(this, value || false);\n\t}\n\n\t@Watch('_label') validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_open') validateOpen(value?: OpenPropType): void {\n\t\tvalidateOpen(this, value);\n\t}\n\n\t@Watch('_href') validateHref(value?: HrefPropType): void {\n\t\tvalidateHref(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateActive(this._active);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateOpen(this._open);\n\t\tthis.validateHref(this._href);\n\n\t\tthis.checkForChildren();\n\t\tthis.determineTreeItemDepth();\n\t}\n\n\tprivate determineTreeItemDepth() {\n\t\tlet level = 0;\n\t\tlet traverseItem: HTMLElement | null = (this.host.parentNode as unknown as ShadowRoot).host.parentNode as HTMLElement;\n\t\twhile (traverseItem !== null && traverseItem.tagName.toLowerCase() !== KolTreeTag && traverseItem !== document.body) {\n\t\t\ttraverseItem = traverseItem.parentElement;\n\t\t\tlevel += 1;\n\t\t}\n\t\tthis.level = level;\n\t}\n\n\tprivate handleSlotchange() {\n\t\tthis.checkForChildren();\n\t}\n\n\tprivate checkForChildren() {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\t_hasChildren: Boolean(this.host.querySelector('slot')?.assignedElements?.().length),\n\t\t};\n\t}\n\n\t@Method() async focusLink() {\n\t\tawait this.linkElement.kolFocus();\n\t}\n\n\tprivate async handleExpandClick(event: MouseEvent) {\n\t\tevent.preventDefault();\n\t\tawait this.linkElement.kolFocus();\n\t\tawait this.expand();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async expand() {\n\t\tif (this.state._hasChildren) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_open: true,\n\t\t\t};\n\t\t}\n\t}\n\n\tprivate async handleCollapseClick(event: MouseEvent) {\n\t\tevent.preventDefault();\n\t\tthis.linkElement.focus();\n\t\tawait this.collapse();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async collapse() {\n\t\tif (this.state._hasChildren) {\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\t_open: false,\n\t\t\t};\n\t\t}\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async isOpen() {\n\t\treturn this.state._open ?? false;\n\t}\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{v as KolTreeItemWcTag}from"./component-names.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .tree-item {\n --indentation: var(--tree-item-indentation, calc(10rem / var(--kolibri-root-font-size, 16)));\n }\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .tree-link.first-level > a {\n padding-left: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .tree-link > a {\n align-items: center;\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-left: max(var(--indentation) * var(--level) + (8rem / var(--kolibri-root-font-size, 16)), 8rem / var(--kolibri-root-font-size, 16));\n padding-right: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .tree-link-inner {\n display: flex;\n align-items: center;\n }\n a .kol-span-wc {\n place-items: unset;\n }\n .toggle-button,\n .toggle-button-placeholder {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n}",KolTreeItemDefaultStyle0=defaultStyleCss,KolTreeItem$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}async focusLink(){this.element&&await this.element.focusLink()}async expand(){this.element&&await this.element.expand()}async collapse(){this.element&&await this.element.collapse()}async isOpen(){var e
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{v as KolTreeItemWcTag}from"./component-names.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-component {\n .tree-item {\n --indentation: var(--tree-item-indentation, calc(10rem / var(--kolibri-root-font-size, 16)));\n }\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .tree-link.first-level > a {\n padding-left: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .tree-link > a {\n align-items: center;\n display: inline-flex;\n min-height: var(--a11y-min-size);\n padding-left: max(var(--indentation) * var(--level) + (8rem / var(--kolibri-root-font-size, 16)), 8rem / var(--kolibri-root-font-size, 16));\n padding-right: calc(6rem / var(--kolibri-root-font-size, 16));\n }\n .tree-link-inner {\n display: flex;\n align-items: center;\n }\n a {\n text-decoration: none;\n }\n a .kol-span-wc {\n place-items: unset;\n }\n .toggle-button,\n .toggle-button-placeholder {\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n }\n .text {\n text-decoration: underline;\n }\n}",KolTreeItemDefaultStyle0=defaultStyleCss,KolTreeItem$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._active=void 0,this._label=void 0,this._open=void 0,this._href=void 0}async focusLink(){this.element&&await this.element.focusLink()}async expand(){this.element&&await this.element.expand()}async collapse(){this.element&&await this.element.collapse()}async isOpen(){var n,e;return null!==(e=await(null===(n=this.element)||void 0===n?void 0:n.isOpen()))&&void 0!==e&&e}render(){return h(KolTreeItemWcTag,{key:"6d8b7de1a3d8ecf617fb066631fd87c37c042a91",class:"kol-tree-item",_active:this._active,_label:this._label,_open:this._open,_href:this._href,ref:n=>this.element=n},h("slot",{key:"3bf19da6a7cd918c5159f7adb363d77237bb8bad"}))}static get style(){return{default:KolTreeItemDefaultStyle0}}},[33,"kol-tree-item",{_active:[4],_label:[1],_open:[4],_href:[1],focusLink:[64],expand:[64],collapse:[64],isOpen:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-item"].forEach((n=>{if("kol-tree-item"===n)customElements.get(n)||customElements.define(n,KolTreeItem$1)}))}const KolTreeItem=KolTreeItem$1,defineCustomElement=defineCustomElement$1;export{KolTreeItem,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-tree-item.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,
|
1
|
+
{"file":"kol-tree-item.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,myKAAmyK,CAAC;AAC5zK,iCAAe,eAAe;;MCWjBA,aAAW;;;;;;;;;;IAuBb,MAAM,SAAS;QACxB,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;SAC/B;KACD;IAES,MAAM,MAAM;QACrB,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;SAC5B;KACD;IAES,MAAM,QAAQ;QACvB,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;SAC9B;KACD;IAES,MAAM,MAAM;;QACrB,OAAO,OAAC,OAAM,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,EAAE,CAAA,CAAC,mCAAI,KAAK,CAAC;KAC/C;IAEM,MAAM;QACZ,QACC,EAAC,gBAAgB,qDAChB,KAAK,EAAC,eAAe,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,CAAC,OAAkC,MAAM,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,IAErE,8DAAQ,CACU,EAClB;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTreeItem"],"sources":["src/components/tree-item/style.scss?tag=kol-tree-item&mode=default&encapsulation=shadow","src/components/tree-item/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../style' as *;\n\n@layer kol-component {\n\t$base-horizontal-padding: rem(8);\n\n\t.tree-item {\n\t\t--indentation: var(--tree-item-indentation, #{rem(10)}); // Set `--tree-item-indentation` in themes to control padding\n\t}\n\n\tul {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tlist-style: none;\n\t}\n\n\t.tree-link {\n\t\t&.first-level > a {\n\t\t\tpadding-left: rem(6);\n\t\t}\n\n\t\t& > a {\n\t\t\talign-items: center;\n\t\t\tdisplay: inline-flex;\n\t\t\tmin-height: var(--a11y-min-size);\n\t\t\tpadding-left: max(calc((var(--indentation) * var(--level)) + $base-horizontal-padding), $base-horizontal-padding);\n\t\t\tpadding-right: rem(6);\n\t\t}\n\t}\n\n\t.tree-link-inner {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\ta {\n\t\ttext-decoration: none;\n\t}\n\n\ta .kol-span-wc {\n\t\tplace-items: unset; // unset 'center' style from global layer\n\t}\n\n\t.toggle-button,\n\t.toggle-button-placeholder {\n\t\twidth: var(--a11y-min-size);\n\t\theight: var(--a11y-min-size);\n\t\tdisplay: inline-flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t}\n\n\t.text {\n\t\ttext-decoration: underline;\n\t}\n}\n","import { Component, h, type JSX, Method, Prop } from '@stencil/core';\n\nimport type { HrefPropType, LabelPropType, OpenPropType, TreeItemProps } from '../../schema';\nimport { KolTreeItemWcTag } from '../../core/component-names';\n\n@Component({\n\ttag: 'kol-tree-item', // keep in sync with `const TREE_ITEM_TAG_NAME`\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTreeItem implements TreeItemProps {\n\tprivate element?: HTMLKolTreeItemWcElement;\n\n\t/**\n\t * If set (to true) the tree item is the active one.\n\t */\n\t@Prop() _active?: OpenPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() _label!: LabelPropType;\n\n\t/**\n\t * Opens/expands the element when truthy, closes/collapses when falsy.\n\t */\n\t@Prop() _open?: OpenPropType;\n\n\t/**\n\t * Defines the target URI of the link.\n\t */\n\t@Prop() _href!: HrefPropType;\n\n\t@Method() async focusLink() {\n\t\tif (this.element) {\n\t\t\tawait this.element.focusLink();\n\t\t}\n\t}\n\n\t@Method() async expand() {\n\t\tif (this.element) {\n\t\t\tawait this.element.expand();\n\t\t}\n\t}\n\n\t@Method() async collapse() {\n\t\tif (this.element) {\n\t\t\tawait this.element.collapse();\n\t\t}\n\t}\n\n\t@Method() async isOpen() {\n\t\treturn (await this.element?.isOpen()) ?? false;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolTreeItemWcTag\n\t\t\t\tclass=\"kol-tree-item\"\n\t\t\t\t_active={this._active}\n\t\t\t\t_label={this._label}\n\t\t\t\t_open={this._open}\n\t\t\t\t_href={this._href}\n\t\t\t\tref={(element?: HTMLKolTreeItemWcElement) => (this.element = element)}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</KolTreeItemWcTag>\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{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{x as KolTreeItemTag,w as KolTreeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";const KolTreeWc$1=proxyCustomElement(class e extends HTMLElement{constructor(){super(),this.__registerHost(),this.state={_label:""},this._label=void 0}validateLabel(e){validateLabel(this,e)}render(){return h(Host,{key:"
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{x as KolTreeItemTag,w as KolTreeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";const KolTreeWc$1=proxyCustomElement(class e extends HTMLElement{constructor(){super(),this.__registerHost(),this.state={_label:""},this._label=void 0}validateLabel(e){validateLabel(this,e)}render(){return h(Host,{key:"87bb07435a32099310d375c4b31e2ad6a18b14d7",onSlotchange:this.handleSlotchange.bind(this),class:"kol-tree-wc"},h("nav",{key:"67bdfb5d267557d9755747638d2a975d113123fc",class:"tree","aria-label":this.state._label},h("ul",{key:"0ea5d150fc9dc6a81518b89735bd617d20f5f930",class:"treeview-navigation",role:"tree","aria-label":this.state._label},h("slot",{key:"2540559f4e0afafb361e7e643f4b0b43721ebbb7"}))))}static isTreeItem(e){return(null==e?void 0:e.tagName)===KolTreeItemTag.toUpperCase()}componentWillLoad(){this.validateLabel(this._label),this.handleTreeChange(),this.observeChildListMutations()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect()}observeChildListMutations(){this.observer=new MutationObserver(this.handleTreeChange.bind(this)),this.observeTopLevelItems()}handleSlotchange(){this.observeTopLevelItems(),this.handleTreeChange()}observeTopLevelItems(){var e;null===(e=this.getTopLevelTreeItems())||void 0===e||e.forEach((e=>{var t;null===(t=this.observer)||void 0===t||t.observe(e,{childList:!0,subtree:!0})}))}getTopLevelTreeItems(){var t,l,a;return null===(a=null===(l=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===l?void 0:l.call(t))||void 0===a?void 0:a.filter(e.isTreeItem)}handleTreeChange(){this.treeItemElements=this.getTreeItemElements(),this.ensureActiveItemVisibility()}getTreeItemElements(){var e;return null===(e=this.getTopLevelTreeItems())||void 0===e?void 0:e.reduce(((e,t)=>{const l=t.querySelectorAll(KolTreeItemTag);return[...e,t,...l]}),[])}async getOpenTreeItemElements(){if(!this.treeItemElements)return;const t=async l=>!e.isTreeItem(l.parentElement)||await l.parentElement.isOpen()&&await t(l.parentElement);return(await Promise.all(this.treeItemElements.map((async e=>({value:e,include:await t(e)}))))).filter((e=>e.include)).map((e=>e.value))}async handleKeyDown(e){var t,l,a,i,n,s,o,r,c;const d=await this.getOpenTreeItemElements(),u=null===(t=document.activeElement)||void 0===t?void 0:t.closest(KolTreeItemTag),v=e.metaKey||e.altKey||e.ctrlKey||e.shiftKey;if(!d||!u)return;const m=null==d?void 0:d.findIndex((e=>e===u));switch(e.key){case"ArrowDown":await(null===(l=d[m+1])||void 0===l?void 0:l.focusLink()),e.preventDefault();break;case"ArrowUp":await(null===(a=d[m-1])||void 0===a?void 0:a.focusLink()),e.preventDefault();break;case"Right":case"ArrowRight":e.preventDefault(),await u.isOpen()?await(null===(i=d[m+1])||void 0===i?void 0:i.focusLink()):await u.expand();break;case"Left":case"ArrowLeft":if(e.preventDefault(),await u.isOpen())await u.collapse();else{const e=d.findIndex((e=>e===u.parentElement));-1!==e&&await(null===(n=d[e])||void 0===n?void 0:n.focusLink())}break;case"Home":await(null===(s=d[0])||void 0===s?void 0:s.focusLink()),e.preventDefault();break;case"End":await(null===(o=d[d.length-1])||void 0===o?void 0:o.focusLink()),e.preventDefault();break;case null===(r=e.key.match(/^[a-zA-Z0-9]$/))||void 0===r?void 0:r.input:if(!v){const t=e.key.toLowerCase(),l=d.indexOf(u)+1,a=d.concat(d),i=a.slice(l,l+d.length).findIndex((e=>{var l;return null===(l=e.getAttribute("_label"))||void 0===l?void 0:l.trim().toLowerCase().startsWith(t)}));-1!==i&&(await a[l+i].focusLink(),e.preventDefault())}break;case"*":{const e=null===(c=u.parentElement)||void 0===c?void 0:c.querySelectorAll(KolTreeItemTag);null==e||e.forEach((e=>{e.expand()}));break}}}async handleFocusOut(e){e.relatedTarget&&!e.relatedTarget.closest(KolTreeTag)&&await this.ensureActiveItemVisibility()}async ensureActiveItemVisibility(){const t=l=>{e.isTreeItem(l.parentElement)&&(l.parentElement.expand(),t(l.parentElement))},l=(()=>{var t,l,a,i;const n=null!==(i=null===(a=null===(l=null===(t=this.host.querySelector("slot"))||void 0===t?void 0:t.assignedNodes)||void 0===l?void 0:l.call(t))||void 0===a?void 0:a.filter(e.isTreeItem))&&void 0!==i?i:[];for(const e of n){if(e._active)return e;const t=e.querySelector(`${KolTreeItemTag}[_active="true"]`);if(t&&t._active)return t}})();l&&t(l)}get host(){return this}static get watchers(){return{_label:["validateLabel"]}}},[4,"kol-tree-wc",{_label:[1],state:[32]},[[0,"keydown","handleKeyDown"],[0,"focusout","handleFocusOut"]],{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree-wc"].forEach((e=>{if("kol-tree-wc"===e)customElements.get(e)||customElements.define(e,KolTreeWc$1)}))}const KolTreeWc=KolTreeWc$1,defineCustomElement=defineCustomElement$1;export{KolTreeWc,defineCustomElement};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{u as KolTreeWcTag}from"./component-names.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}\n@layer kol-component {\n .tree ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .tree:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolTreeDefaultStyle0=defaultStyleCss,KolTree$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0}render(){return h(Host,{key:"6430c90de00f6f06970d9abfcb0040bb765a2a12",class:"kol-tree"},h(KolTreeWcTag,{key:"fcb3d3174feec3a8ae2127fecaf3d5d373d1ee11",_label:this._label},h("slot",{key:"25dd947e8b94534ac4bb63e53e7f66dec9c517bf"})))}static get style(){return{default:KolTreeDefaultStyle0}}},[33,"kol-tree",{_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree"].forEach((n=>{if("kol-tree"===n)customElements.get(n)||customElements.define(n,KolTree$1)}))}const KolTree=KolTree$1,defineCustomElement=defineCustomElement$1;export{KolTree,defineCustomElement};
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{u as KolTreeWcTag}from"./component-names.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-component {\n .tree ul {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .tree:focus-within {\n outline: 1px solid;\n outline-offset: 2px;\n }\n}",KolTreeDefaultStyle0=defaultStyleCss,KolTree$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0}render(){return h(Host,{key:"6430c90de00f6f06970d9abfcb0040bb765a2a12",class:"kol-tree"},h(KolTreeWcTag,{key:"fcb3d3174feec3a8ae2127fecaf3d5d373d1ee11",_label:this._label},h("slot",{key:"25dd947e8b94534ac4bb63e53e7f66dec9c517bf"})))}static get style(){return{default:KolTreeDefaultStyle0}}},[33,"kol-tree",{_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-tree"].forEach((n=>{if("kol-tree"===n)customElements.get(n)||customElements.define(n,KolTree$1)}))}const KolTree=KolTree$1,defineCustomElement=defineCustomElement$1;export{KolTree,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-tree.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,
|
1
|
+
{"file":"kol-tree.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,06IAA06I,CAAC;AACn8I,6BAAe,eAAe;;MCYjBA,SAAO;;;;;;;IAMZ,MAAM;QACZ,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,UAAU,IACrB,EAAC,YAAY,qDAAC,MAAM,EAAE,IAAI,CAAC,MAAM,IAChC,8DAAQ,CACM,CACT,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolTree"],"sources":["src/components/tree/style.scss?tag=kol-tree&mode=default&encapsulation=shadow","src/components/tree/shadow.tsx"],"sourcesContent":["@use '../style' as *;\n\n@layer kol-component {\n\t.tree {\n\t\tul {\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tlist-style: none;\n\t\t}\n\n\t\t&:focus-within {\n\t\t\toutline: 1px solid;\n\t\t\toutline-offset: 2px;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\nimport type { LabelPropType, TreeProps } from '../../schema';\nimport { KolTreeWcTag } from '../../core/component-names';\n\n@Component({\n\ttag: 'kol-tree',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolTree implements TreeProps {\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() _label!: LabelPropType;\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-tree\">\n\t\t\t\t<KolTreeWcTag _label={this._label}>\n\t\t\t\t\t<slot />\n\t\t\t\t</KolTreeWcTag>\n\t\t\t</Host>\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{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{y as KolBadgeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n}",KolVersionDefaultStyle0=defaultStyleCss,KolVersion$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this.state={_label:"0.0.0-alpha.0"}}render(){return h(Host,{key:"
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{y as KolBadgeTag}from"./component-names.js";import{v as validateLabel}from"./label.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%; /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n}\n@layer kol-global {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n .kol-span-wc {\n display: grid;\n place-items: center;\n }\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n .kol-span-wc > span {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n /* This is the text label. */\n .hide-label > .kol-span-wc > span > span {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span-wc,\n [disabled]:focus .kol-span-wc {\n outline: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}",KolVersionDefaultStyle0=defaultStyleCss,KolVersion$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this.state={_label:"0.0.0-alpha.0"}}render(){return h(Host,{key:"52c047c6155afc6cfcf189fd6689057a9ec1c6df",class:"kol-version"},h(KolBadgeTag,{key:"eddaf7d1ba9a2f8caa5c904a06fe3a6947df0624",_color:"#bec5c9",_icons:{left:{icon:"codicon codicon-versions",label:translate("kol-version")}},_label:this.state._label}))}validateLabel(n){validateLabel(this,n,{required:!0})}componentWillLoad(){this.validateLabel(this._label)}static get watchers(){return{_label:["validateLabel"]}}static get style(){return{default:KolVersionDefaultStyle0}}},[33,"kol-version",{_label:[1],state:[32]},void 0,{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-version"].forEach((n=>{if("kol-version"===n)customElements.get(n)||customElements.define(n,KolVersion$1)}))}const KolVersion=KolVersion$1,defineCustomElement=defineCustomElement$1;export{KolVersion,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-version.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,
|
1
|
+
{"file":"kol-version.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,ovIAAovI,CAAC;AAC7wI,gCAAe,eAAe;;MCejBA,YAAU;;;;;;qBAoBiB;YACtC,MAAM,EAAE,eAAe;SACvB;;IArBM,MAAM;QACZ,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,aAAa,IACxB,EAAC,WAAW,qDACX,MAAM,EAAC,SAAS,EAChB,MAAM,EAAE;gBACP,IAAI,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,EAAE;aAC3E,EACD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GACxB,CACI,EACN;KACF;IAYM,aAAa,CAAC,KAAqB;QACzC,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;YAC1B,QAAQ,EAAE,IAAI;SACd,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolVersion"],"sources":["src/components/version/style.scss?tag=kol-version&mode=default&encapsulation=shadow","src/components/version/shadow.tsx"],"sourcesContent":["@use '../style' as *;\n","import type { LabelPropType, VersionAPI, VersionStates } from '../../schema';\nimport { validateLabel } from '../../schema';\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\n\nimport type { JSX } from '@stencil/core';\nimport { KolBadgeTag } from '../../core/component-names';\n\n@Component({\n\ttag: 'kol-version',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolVersion implements VersionAPI {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-version\">\n\t\t\t\t<KolBadgeTag\n\t\t\t\t\t_color=\"#bec5c9\"\n\t\t\t\t\t_icons={{\n\t\t\t\t\t\tleft: { icon: 'codicon codicon-versions', label: translate('kol-version') },\n\t\t\t\t\t}}\n\t\t\t\t\t_label={this.state._label}\n\t\t\t\t/>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\n\n\t@State() public state: VersionStates = {\n\t\t_label: '0.0.0-alpha.0',\n\t};\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateLabel(this._label);\n\t}\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{_ as __rest}from"./tslib.es6-2e5096f8.js";import{h,F as Fragment}from"./index-
|
4
|
+
import{_ as __rest}from"./tslib.es6-2e5096f8.js";import{h,F as Fragment}from"./index-81670636.js";import{c as clsx}from"./clsx-09a06a12.js";import{t as translate}from"./i18n-5fe08f1c.js";import{g as KolIconTag,b as KolHeadingWcTag,c as KolButtonWcTag}from"./component-names-4cb1c62b.js";import{L as Log}from"./dev.utils-fab45cbc.js";const Icon=({ariaLabel:o,icon:a})=>h(Fragment,null,h("span",{class:"visually-hidden"},o),h(KolIconTag,{class:"heading-icon",_label:"",_icons:a})),AlertIcon=({type:o,label:a})=>{switch(o){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:a});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:a});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:a});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:a});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:a})}},AlertIcon$1=AlertIcon,KolAlertFc=(o,a)=>{const{class:l={},type:e="default",variant:c="msg",label:n,hasCloser:t,alert:s,onAlertTimeout:r,onCloserClick:i,level:d}=o,b=__rest(o,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);if(s){try{Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(o){Log.debug("Navigator does not support vibration.")}setTimeout((()=>{null==r||r()}),1e4)}const g=Object.assign({class:clsx("kol-alert-wc","alert",e,c,{hasCloser:!!t},l),role:s?"alert":void 0},b);return h("div",Object.assign({},g),h("div",{class:"heading"},h(AlertIcon$1,{label:n,type:e}),h("div",{class:"heading-content"},n?h(KolHeadingWcTag,{_label:n,_level:d}):null,"msg"===c&&h("div",{class:"content"},a)),t&&h(KolButtonWcTag,{class:"close",_ariaDescription:(null==n?void 0:n.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close-alert"),_on:{onClick:i},_tooltipAlign:"left"})),"card"===c&&h("div",{class:"content"},a))},KolAlertFc$1=KolAlertFc;export{KolAlertFc$1 as K};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"Alert-
|
1
|
+
{"file":"Alert-1faeccd5.js","mappings":";;;;;;;;;;AAUA,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IACzF,QACC;QACC,YAAM,KAAK,EAAC,iBAAiB,IAAE,SAAS,CAAQ;QAChD,EAAC,UAAU,IAAC,KAAK,EAAC,cAAc,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAI,CACzD,EACF;AACH,CAAC,CAAC;AAEF,MAAM,SAAS,GAA6C,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE;IAC3E,QAAQ,IAAI;QACX,KAAK,OAAO;YACX,OAAO,EAAC,IAAI,IAAC,SAAS,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,IAAI,EAAC,uBAAuB,EAAC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AAC;YACV,cAAc,aAAd,cAAc,uBAAd,cAAc,EAAI,CAAC;SACnB,EAAE,KAAK,CAAC,CAAC;KACV;IAED,MAAM,SAAS,mBACd,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,EAAE,UAAU,CAAC,EAC3F,IAAI,EAAE,KAAK,GAAG,OAAO,GAAG,SAAS,IAC9B,KAAK,CACR,CAAC;IAEF,QACC,2BAAS,SAAS;QACjB,WAAK,KAAK,EAAC,SAAS;YACnB,EAACA,WAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI;YACvC,WAAK,KAAK,EAAC,iBAAiB;gBAC1B,KAAK,GAAG,EAAC,eAAe,IAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,GAAG,IAAI;gBAChE,OAAO,KAAK,KAAK,IAAI,WAAK,KAAK,EAAC,SAAS,IAAE,QAAQ,CAAO,CACtD;YACL,SAAS,KACT,EAAC,cAAc,IACd,KAAK,EAAC,OAAO,EACb,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACH,CAClB,CACI;QACL,OAAO,KAAK,MAAM,IAAI,WAAK,KAAK,EAAC,SAAS,IAAE,QAAQ,CAAO,CACvD,EACL;AACH,CAAC,CAAC;AAEF,qBAAe,UAAU;;;;","names":["AlertIcon"],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class=\"heading-icon\" _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport type { InternalAlertProps } from '../../schema';\nimport { Log } from '../../schema';\nimport { translate } from '../../i18n';\nimport AlertIcon from '../AlertIcon';\nimport { KolButtonWcTag, KolHeadingWcTag } from '../../core/component-names';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst { class: classNames = {}, type = 'default', variant = 'msg', label, hasCloser, alert, onAlertTimeout, onCloserClick, level, ...other } = props;\n\n\tif (alert) {\n\t\t/**\n\t\t * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n\t\t * - https://googlechrome.github.io/samples/vibration/\n\t\t */\n\t\ttry {\n\t\t\tLog.debug(['Navigator should vibrate ...', navigator.vibrate([100, 75, 100, 75, 100])]);\n\t\t} catch (e) {\n\t\t\tLog.debug('Navigator does not support vibration.');\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx('kol-alert-wc', 'alert', type, variant, { hasCloser: !!hasCloser }, classNames),\n\t\trole: alert ? 'alert' : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"heading\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"heading-content\">\n\t\t\t\t\t{label ? <KolHeadingWcTag _label={label} _level={level} /> : null}\n\t\t\t\t\t{variant === 'msg' && <div class=\"content\">{children}</div>}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass=\"close\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && <div class=\"content\">{children}</div>}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{_ as __rest}from"./tslib.es6-2e5096f8.js";import{h}from"./index-
|
4
|
+
import{_ as __rest}from"./tslib.es6-2e5096f8.js";import{h}from"./index-81670636.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolHeadingWcTag,c as KolButtonWcTag}from"./component-names-4cb1c62b.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:e,level:i=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,b=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),_=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{disabled:!0===n,open:!0===c},a)},b),h(KolHeadingWcTag,{ref:null==r?void 0:r.ref,_label:"",_level:i,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${_}`,_label:e,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))},KolCollapsibleFc$1=KolCollapsibleFc;export{KolCollapsibleFc$1 as K};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"Collapsible-
|
1
|
+
{"file":"Collapsible-837940ad.js","mappings":";;;;;;;;AAsCA,MAAM,gBAAgB,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C,CACD;QAClB,WAAK,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAC;YACnE,WAAK,KAAK,EAAE,IAAI,CAAC,gCAAgC,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,cAAc,CAAC;gBAC/E,0BAAkB,IAAI,KAAK,KAAK,GAAG,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,IAClI,QAAQ,CACJ,CACD,CACD,CACD,EACL;AACH,CAAC,CAAC;AAEF,2BAAe,gBAAgB;;;;","names":[],"sources":["src/functional-components/Collapsible/Collapsible.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { KolButtonWcTag, KolHeadingWcTag } from '../../core/component-names';\nimport type { HeadingLevel, IconsPropType } from '../../schema';\n\ntype ClassType =\n\t| string\n\t| {\n\t\t\t[className: string]: boolean;\n\t };\n\nexport type CollapsibleProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\topen?: boolean;\n\tdisabled?: boolean;\n\tlevel?: HeadingLevel;\n\tlabel: string;\n\n\tHeadingProps?: {\n\t\tref?: ((elm?: HTMLKolHeadingWcElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t};\n\n\tHeadingButtonProps?: {\n\t\tref?: ((elm?: HTMLKolButtonWcElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t\t_icons?: IconsPropType;\n\t};\n\n\tContentProps?: {\n\t\tclass?: ClassType;\n\t\tanimationClass?: ClassType;\n\t\twrapperClass?: ClassType;\n\t};\n};\n\nconst KolCollapsibleFc: FC<CollapsibleProps> = (props, children) => {\n\tconst { id, class: classNames, label, level = 1, disabled, open, onClick, HeadingProps = {}, HeadingButtonProps = {}, ContentProps = {}, ...other } = props;\n\tconst icon = open ? 'remove' : 'add';\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclass={clsx(\n\t\t\t\t'collapsible',\n\t\t\t\t{\n\t\t\t\t\tdisabled: disabled === true,\n\t\t\t\t\topen: open === true,\n\t\t\t\t},\n\t\t\t\tclassNames,\n\t\t\t)}\n\t\t\t{...other}\n\t\t>\n\t\t\t<KolHeadingWcTag ref={HeadingProps?.ref} _label=\"\" _level={level} class={clsx('collapsible__heading', HeadingProps?.class)}>\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\tclass={clsx('collapsible__heading-button', HeadingButtonProps?.class)}\n\t\t\t\t\tref={HeadingButtonProps?.ref}\n\t\t\t\t\tslot=\"expert\"\n\t\t\t\t\t_ariaControls={`${id}-control`}\n\t\t\t\t\t_ariaExpanded={open}\n\t\t\t\t\t_disabled={disabled}\n\t\t\t\t\t_icons={HeadingButtonProps?._icons || `codicon codicon-${icon}`}\n\t\t\t\t\t_label={label}\n\t\t\t\t\t_on={{ onClick }}\n\t\t\t\t></KolButtonWcTag>\n\t\t\t</KolHeadingWcTag>\n\t\t\t<div class={clsx('collapsible__wrapper', ContentProps?.wrapperClass)}>\n\t\t\t\t<div class={clsx('collapsible__wrapper-animation', ContentProps?.animationClass)}>\n\t\t\t\t\t<div aria-hidden={open === false ? 'true' : undefined} class={clsx('collapsible__content', ContentProps?.class)} id={`${id}-control`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default KolCollapsibleFc;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{c as clsx}from"./clsx-09a06a12.js";import{h}from"./index-
|
4
|
+
import{c as clsx}from"./clsx-09a06a12.js";import{h}from"./index-81670636.js";import{K as KolAlertFc}from"./Alert-1faeccd5.js";function transformObjectProperties(r){return Object.entries(r).reduce(((r,[e,s])=>{const t=e.startsWith("_")?e.slice(1):e;return Object.assign(Object.assign({},r),{[t]:s})}),{})}const FormFieldMsgFc=({_alert:r,_msg:e,_hideError:s,_id:t})=>{const o=transformObjectProperties(e||{});return h(KolAlertFc,Object.assign({id:`${t}-error`,alert:r,type:"error",class:clsx({error:!0,"visually-hidden":!0===s})},o),(null==e?void 0:e._description)||void 0)},KolFormFieldMsgFc=FormFieldMsgFc;export{KolFormFieldMsgFc as K};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"FormFieldMsg-
|
1
|
+
{"file":"FormFieldMsg-c2779dd5.js","mappings":";;;;;;;SAuBgB,yBAAyB,CACxC,GAAM;IAIN,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAChC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC;QACjB,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;QACxD,uCACI,GAAG,KACN,CAAC,MAAM,GAAG,KAAK,IACd;KACF,EACD,EAEC,CACD,CAAC;AACH;;AC1BA,MAAM,cAAc,GAA2C,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE;IAChG,MAAM,GAAG,GAAG,yBAAyB,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAElD,QACC,EAAC,UAAU,kBACV,EAAE,EAAE,GAAG,GAAG,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,IAAI,CAAC;YACX,KAAK,EAAE,IAAI;YACX,iBAAiB,EAAE,UAAU,KAAK,IAAI;SACtC,CAAC,IACE,GAAG,GAEN,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,YAAY,KAAI,SAAS,CACpB,EACZ;AACH,CAAC,CAAC;AAEF,0BAAe,cAAc;;;;","names":[],"sources":["src/utils/transformObjectProperties.ts","src/functional-components/FormFieldMsg/FormFieldMsg.tsx"],"sourcesContent":["/**\n * Transforms keys with leading underscores, keeping non-underscore keys unchanged.\n *\n * @template K The original key type\n * @returns Transformed key type\n */\ntype TransformKeys<K> = K extends `_${infer Rest}` ? Rest : K;\n\n/**\n * Transforms object properties by removing leading underscores from key names.\n *\n * This method is useful for converting objects from a naming convention with leading underscores\n * (often used for private or internal properties) to a standard naming format.\n *\n * @param obj The input object with potential underscore prefixes\n * @returns A new object with underscores removed from key names\n *\n * @example\n * // Converts object with underscore-prefixed keys\n * const input = { _name: 'John', _age: 30 };\n * const result = transformObjectProperties(input);\n * // result is { name: 'John', age: 30 }\n */\nexport function transformObjectProperties<T extends Record<string, unknown>>(\n\tobj: T,\n): {\n\t[K in keyof T as TransformKeys<K>]: T[K];\n} {\n\treturn Object.entries(obj).reduce(\n\t\t(acc, [key, value]) => {\n\t\t\tconst newKey = key.startsWith('_') ? key.slice(1) : key;\n\t\t\treturn {\n\t\t\t\t...acc,\n\t\t\t\t[newKey]: value,\n\t\t\t};\n\t\t},\n\t\t{} as {\n\t\t\t[K in keyof T as TransformKeys<K>]: T[K];\n\t\t},\n\t);\n}\n","import clsx from 'clsx';\nimport type { AlertPropType, HideErrorPropType, IdPropType, MsgPropType } from '../../schema';\nimport type { FunctionalComponent } from '@stencil/core';\nimport { h } from '@stencil/core';\nimport KolAlertFc from '../Alert';\nimport { transformObjectProperties } from '../../utils/transformObjectProperties';\n\ntype FormFieldMsgProps = {\n\t_alert?: AlertPropType;\n\t_msg?: MsgPropType;\n\t_hideError?: HideErrorPropType;\n\t_id: IdPropType;\n};\n\nconst FormFieldMsgFc: FunctionalComponent<FormFieldMsgProps> = ({ _alert, _msg, _hideError, _id }) => {\n\tconst msg = transformObjectProperties(_msg || {});\n\n\treturn (\n\t\t<KolAlertFc\n\t\t\tid={`${_id}-error`}\n\t\t\talert={_alert}\n\t\t\ttype=\"error\"\n\t\t\tclass={clsx({\n\t\t\t\terror: true,\n\t\t\t\t'visually-hidden': _hideError === true,\n\t\t\t})}\n\t\t\t{...msg}\n\t\t>\n\t\t\t{_msg?._description || undefined}\n\t\t</KolAlertFc>\n\t);\n};\n\nexport default FormFieldMsgFc;\n"],"version":3}
|
package/dist/esm/{InternalUnderlinedBadgeText-7a939421.js → InternalUnderlinedBadgeText-dcdf17c3.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h,F as Fragment}from"./index-
|
4
|
+
import{h,F as Fragment}from"./index-81670636.js";const InternalUnderlinedBadgeText=({badgeText:e,label:n})=>{const t=e;let[l,...r]=n.split(t);return 0===r.length&&(e=t.toUpperCase(),[l,...r]=n.split(t)),0===r.length&&(e=t.toLowerCase(),[l,...r]=n.split(t)),h(Fragment,null,l,r.length?h(Fragment,null,h("u",null,e),r.join(t)):null)};export{InternalUnderlinedBadgeText as I};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"InternalUnderlinedBadgeText-
|
1
|
+
{"file":"InternalUnderlinedBadgeText-dcdf17c3.js","mappings":";;;;;MAOa,2BAA2B,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAS;IAEtE,MAAM,iBAAiB,GAAW,SAAS,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACtD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;KAClD;IACD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;KAClD;IACD,QACC;QACE,KAAK;QACL,IAAI,CAAC,MAAM,IACX;YACC,aAAI,SAAS,CAAK;YACjB,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC3B,IACA,IAAI,CACN,EACF;AACH;;;;","names":[],"sources":["src/components/span/InternalUnderlinedBadgeText.tsx"],"sourcesContent":["import { Fragment, h } from '@stencil/core';\nimport type { BadgeTextPropType } from '../../schema';\n\ntype Props = {\n\tbadgeText: BadgeTextPropType;\n\tlabel: string;\n};\nexport const InternalUnderlinedBadgeText = ({ badgeText, label }: Props) => {\n\t/* Prefer capitalization as defined in the badge Text, try uppercase/lowercase when there's no match. */\n\tconst badgeTextAsString: string = badgeText;\n\tlet [first, ...rest] = label.split(badgeTextAsString);\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toUpperCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toLowerCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\treturn (\n\t\t<>\n\t\t\t{first}\n\t\t\t{rest.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<u>{badgeText}</u>\n\t\t\t\t\t{rest.join(badgeTextAsString)}\n\t\t\t\t</>\n\t\t\t) : null}\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{o as oe,S}from"./index-6d801dad.js";import{a as setMode}from"./index-
|
4
|
+
import{o as oe,S}from"./index-6d801dad.js";import{a as setMode}from"./index-81670636.js";import{L as Log}from"./dev.utils-fab45cbc.js";setMode((o=>{try{o.shadowRoot instanceof ShadowRoot&&oe(o,S(o))}catch(o){}return"default"})),import("./devtools-e98c12d4.js").then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{Log.error(o)}));const globalFn=()=>{},appGlobalScript=globalFn,globalScripts=appGlobalScript;export{globalScripts as g};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"app-globals-
|
1
|
+
{"file":"app-globals-25bd823d.js","mappings":";;;;;;;AAKA,OAAO,CAAC,CAAC,GAAG;IACX,IAAI;QACH,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;YACzCA,EAAa,CAAC,GAAG,EAAEC,CAAe,CAAC,GAAG,CAAC,CAAC,CAAC;SACzC;KACD;IAAC,OAAO,KAAK,EAAE;KAMf;IACD,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,OAAO,wBAAY,CAAC;KAClB,IAAI,CAAC,CAAC,QAAQ;IACd,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;QACnG,QAAQ,CAAC,UAAU,EAAE,CAAC;KACtB;AACF,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAK;IACZ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;;;;AC3BQ,MAAC,aAAa,GAAG;;;;","names":["setThemeStyle","getThemeDetails"],"sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log } from '../schema';\nimport { setMode } from '@stencil/core';\n\nsetMode((elm) => {\n\ttry {\n\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t}\n\t} catch (error) {\n\t\t/**\n\t\t * Try is needed for SSR.\n\t\t * - no HTMLElement is available\n\t\t * - no ShadowRoot is available\n\t\t */\n\t}\n\treturn 'default';\n});\n\nimport('./devtools')\n\t.then((devTools) => {\n\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\tdevTools.initialize();\n\t\t}\n\t})\n\t.catch((error) => {\n\t\tLog.error(error);\n\t});\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{E as Env}from"./index-
|
4
|
+
import{E as Env}from"./index-81670636.js";import{p as processEnv}from"./reuse-32931294.js";import{L as Log,g as getDocument,s as setDevMode,b as setExperimentalMode,c as setColorContrastAnalysis,d as getWindow}from"./dev.utils-fab45cbc.js";const initMeta=()=>{const e=getDocument().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&(setDevMode(t.includes("dev-mode=true")),setExperimentalMode(t.includes("experimental-mode=true")),setColorContrastAnalysis(t.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,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${Env.kolibriVersion}\n\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{initKoliBri as i,nonce as n,renderDevAdvice as r};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"dev.utils-
|
1
|
+
{"file":"dev.utils-647fdf10.js","mappings":";;;;;;;AAKA,MAAM,QAAQ,GAAG;IAChB,MAAM,IAAI,GAAG,WAAW,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACjE,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAC7C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAChC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;YAC9C,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAC;YAChE,wBAAwB,CAAC,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC,CAAC;SAC3E;KACD;AACF,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG;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;;;;;;qEAMmE,GAAG,CAAC,cAAc;EACrF,EACA;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 { Log, getDocument, processEnv, setColorContrastAnalysis, setDevMode, setExperimentalMode } from '../schema';\n\nimport { getWindow } from '../schema';\nimport { Env } from '@stencil/core';\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,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \\`--' | |) /_ ,--.--. \\`--'\n| . ' | .-. | | | ,--. | .-. \\\\ | .--' ,--.\n| |\\\\ \\\\ | '-' | | | | | | '--' / | | | |\n\\`--' \\`--´ \\`---´ \\`--' \\`--' \\`------´ \\`--' \\`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${Env.kolibriVersion}\n\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,r as renderDevAdvice}from"./dev.utils-
|
4
|
+
import{i as initKoliBri,r as renderDevAdvice}from"./dev.utils-647fdf10.js";import{e as getDevMode,g as getDocument,L as Log,a as getExperimentalMode,f as getColorContrastAnalysis,d as getWindow}from"./dev.utils-fab45cbc.js";import{y as koliBriA11yColorContrast,t as koliBriQuerySelector,z as koliBriQuerySelectorAll,A as koliBriQuerySelectorColors,B as KoliBriUtils,p as parseJson,C as stringifyJson}from"./prop.validators-17aec743.js";import"./index-81670636.js";import"./reuse-32931294.js";import"./index-6d801dad.js";const getKoliBri=()=>{let e=getWindow().KoliBri;return void 0===e&&(e={},Object.defineProperty(getWindow(),"KoliBri",{value:e,writable:!1})),e};function prototypeKoliBri(e,t){try{Object.defineProperty(getKoliBri(),e,{get:function(){return t}})}catch(t){Log.debug(`KoliBri property ${e} is already bind.`)}}const metaModeLog=(e,t)=>Log.debug(`${e} ${t?"":"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 e=getDocument().body,t=getDocument().createElement("svg");if(t.setAttribute("aria-label","KoliBri-DevTools"),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("role","toolbar"),t.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),t.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(t),metaModeLog("Development mode",getDevMode()),metaModeLog("Experimental mode",getExperimentalMode()),metaModeLog("Color contrast analysis",getColorContrastAnalysis()),getColorContrastAnalysis()){const t=setTimeout((()=>{clearTimeout(t),setInterval((()=>{KoliBriUtils.queryHtmlElementColors(getDocument().createElement("div"),koliBriA11yColorContrast(e),!1,!1)}),1e4)}),2500)}}};export{initialize};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"devtools-
|
1
|
+
{"file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,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 {\n\tgetColorContrastAnalysis,\n\tgetDevMode,\n\tgetDocument,\n\tgetExperimentalMode,\n\tgetWindow,\n\tkoliBriA11yColorContrast,\n\tkoliBriQuerySelector,\n\tkoliBriQuerySelectorAll,\n\tkoliBriQuerySelectorColors,\n\tKoliBriUtils,\n\tLog,\n\tparseJson,\n\tstringifyJson,\n} from '../schema';\nimport { initKoliBri, renderDevAdvice } from '../utils/dev.utils';\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}
|