@public-ui/components 3.0.0-alpha.0 → 3.0.0-alpha.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 +28 -16
- package/dist/cjs/Alert-f6b0d38e.js +4 -0
- package/dist/cjs/Alert-f6b0d38e.js.map +1 -0
- package/dist/cjs/{Collapsible-4a383ac2.js → Collapsible-4e60c250.js} +1 -1
- package/dist/cjs/{Collapsible-4a383ac2.js.map → Collapsible-4e60c250.js.map} +1 -1
- package/dist/cjs/{FormFieldMsg-912c2346.js → FormFieldMsg-f9c66f2b.js} +1 -1
- package/dist/cjs/{FormFieldMsg-912c2346.js.map → FormFieldMsg-f9c66f2b.js.map} +1 -1
- package/dist/cjs/{Heading-7a5bdb54.js → Heading-862fa562.js} +1 -1
- package/dist/cjs/{Heading-7a5bdb54.js.map → Heading-862fa562.js.map} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-e0fa44aa.js → InternalUnderlinedBadgeText-1c6598a7.js} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-e0fa44aa.js.map → InternalUnderlinedBadgeText-1c6598a7.js.map} +1 -1
- package/dist/cjs/{Span-e07e098e.js → Span-95000179.js} +1 -1
- package/dist/cjs/Span-95000179.js.map +1 -0
- package/dist/cjs/{app-globals-9acf2253.js → app-globals-cbed5be9.js} +1 -1
- package/dist/cjs/{app-globals-9acf2253.js.map → app-globals-cbed5be9.js.map} +1 -1
- package/dist/cjs/{controller-ed762c3d.js → controller-2cf5be5c.js} +1 -1
- package/dist/cjs/{controller-ed762c3d.js.map → controller-2cf5be5c.js.map} +1 -1
- package/dist/cjs/controller-3ba0a95f.js +4 -0
- package/dist/cjs/controller-3ba0a95f.js.map +1 -0
- package/dist/cjs/{controller-fab45b3b.js → controller-4ad095de.js} +1 -1
- package/dist/cjs/{controller-fab45b3b.js.map → controller-4ad095de.js.map} +1 -1
- package/dist/cjs/controller-c08f0c47.js +4 -0
- package/dist/cjs/controller-c08f0c47.js.map +1 -0
- package/dist/cjs/{controller-icon-5cbf5833.js → controller-icon-0a07b9d4.js} +1 -1
- package/dist/cjs/{controller-icon-5cbf5833.js.map → controller-icon-0a07b9d4.js.map} +1 -1
- package/dist/cjs/{dev.utils-cad0c4bb.js → dev.utils-91b818ef.js} +1 -1
- package/dist/cjs/{dev.utils-cad0c4bb.js.map → dev.utils-91b818ef.js.map} +1 -1
- package/dist/cjs/{devtools-1224292d.js → devtools-189e17b0.js} +1 -1
- package/dist/cjs/{devtools-1224292d.js.map → devtools-189e17b0.js.map} +1 -1
- package/dist/cjs/{index-4e35d174.js → index-80062b8e.js} +1 -1
- package/dist/cjs/{index-4e35d174.js.map → index-80062b8e.js.map} +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-avatar-wc.cjs.entry.js.map +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-link.cjs.entry.js +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-card.cjs.entry.js +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-drawer.cjs.entry.js +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.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-indented-text-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-indented-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input.cjs.entry.js +1 -1
- package/dist/cjs/kol-input.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-group.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-logo.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-progress.cjs.entry.js +1 -1
- package/dist/cjs/kol-quote.cjs.entry.js +1 -1
- package/dist/cjs/kol-select.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-spin.cjs.entry.js +1 -1
- package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-symbol.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-table.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-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.cjs.entry.js +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-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/spell-check-2c944775.js +4 -0
- package/dist/cjs/spell-check-2c944775.js.map +1 -0
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/Alert.js +1 -1
- package/dist/components/Alert.js.map +1 -1
- package/dist/components/Span.js +1 -1
- package/dist/components/Span.js.map +1 -1
- package/dist/components/controller2.js +1 -1
- package/dist/components/controller2.js.map +1 -1
- package/dist/components/controller4.js +1 -1
- package/dist/components/controller4.js.map +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-wc.js +1 -1
- package/dist/components/kol-alert-wc.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-wc.js +1 -1
- package/dist/components/kol-avatar-wc.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-wc.js +1 -1
- package/dist/components/kol-button-group.js +1 -1
- package/dist/components/kol-button-link.js +1 -1
- package/dist/components/kol-button-wc.js +1 -1
- package/dist/components/kol-button.js +1 -1
- package/dist/components/kol-card.js +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-drawer.js +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-icon.js +1 -1
- package/dist/components/kol-image.js +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-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-input.js +1 -1
- package/dist/components/kol-input.js.map +1 -1
- package/dist/components/kol-kolibri.js +1 -1
- package/dist/components/kol-link-button.js +1 -1
- package/dist/components/kol-link-group.js +1 -1
- package/dist/components/kol-link-wc.js +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-logo.js +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-popover-wc.js +1 -1
- package/dist/components/kol-progress.js +1 -1
- package/dist/components/kol-quote.js +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-spin.js +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-symbol.js +1 -1
- package/dist/components/kol-table-stateful.js +1 -1
- package/dist/components/kol-table-stateless-wc.js +1 -1
- package/dist/components/kol-table-stateless-wc.js.map +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-table.js +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-textarea.js +1 -1
- package/dist/components/kol-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-tooltip-wc.js +1 -1
- package/dist/components/kol-tree-item-wc.js +1 -1
- package/dist/components/kol-tree-item.js +1 -1
- package/dist/components/kol-tree-wc.js +1 -1
- package/dist/components/kol-tree.js +1 -1
- package/dist/components/kol-version.js +1 -1
- package/dist/components/spell-check.js +4 -0
- package/dist/components/spell-check.js.map +1 -0
- package/dist/esm/Alert-1b318619.js +4 -0
- package/dist/esm/Alert-1b318619.js.map +1 -0
- package/dist/esm/{Collapsible-0f95c96e.js → Collapsible-53867075.js} +1 -1
- package/dist/esm/{Collapsible-0f95c96e.js.map → Collapsible-53867075.js.map} +1 -1
- package/dist/esm/{FormFieldMsg-de303cbe.js → FormFieldMsg-6843c725.js} +1 -1
- package/dist/esm/{FormFieldMsg-de303cbe.js.map → FormFieldMsg-6843c725.js.map} +1 -1
- package/dist/esm/{Heading-781aa65b.js → Heading-1fe830dd.js} +1 -1
- package/dist/esm/{Heading-781aa65b.js.map → Heading-1fe830dd.js.map} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-3e2de35c.js → InternalUnderlinedBadgeText-8f2a64b6.js} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-3e2de35c.js.map → InternalUnderlinedBadgeText-8f2a64b6.js.map} +1 -1
- package/dist/esm/{Span-bb5a31a5.js → Span-7f84ad00.js} +1 -1
- package/dist/esm/Span-7f84ad00.js.map +1 -0
- package/dist/esm/{app-globals-38c128f4.js → app-globals-ebbcf310.js} +1 -1
- package/dist/esm/{app-globals-38c128f4.js.map → app-globals-ebbcf310.js.map} +1 -1
- package/dist/esm/controller-1739038d.js +4 -0
- package/dist/esm/controller-1739038d.js.map +1 -0
- package/dist/esm/{controller-b379ae04.js → controller-506a6c81.js} +1 -1
- package/dist/esm/{controller-b379ae04.js.map → controller-506a6c81.js.map} +1 -1
- package/dist/esm/controller-64301c42.js +4 -0
- package/dist/esm/controller-64301c42.js.map +1 -0
- package/dist/esm/{controller-d2533e17.js → controller-68fd9cd8.js} +1 -1
- package/dist/esm/{controller-d2533e17.js.map → controller-68fd9cd8.js.map} +1 -1
- package/dist/esm/{controller-icon-30817124.js → controller-icon-e20e2d63.js} +1 -1
- package/dist/esm/{controller-icon-30817124.js.map → controller-icon-e20e2d63.js.map} +1 -1
- package/dist/esm/{dev.utils-5d039f3c.js → dev.utils-8fad8415.js} +1 -1
- package/dist/esm/{dev.utils-5d039f3c.js.map → dev.utils-8fad8415.js.map} +1 -1
- package/dist/esm/{devtools-26a65dd7.js → devtools-a0824082.js} +1 -1
- package/dist/esm/{devtools-26a65dd7.js.map → devtools-a0824082.js.map} +1 -1
- package/dist/esm/{index-a0b4dca2.js → index-a49af574.js} +1 -1
- package/dist/esm/{index-a0b4dca2.js.map → index-a49af574.js.map} +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-abbr.entry.js.map +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js.map +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js.map +1 -1
- package/dist/esm/kol-alert.entry.js +1 -1
- package/dist/esm/kol-alert.entry.js.map +1 -1
- package/dist/esm/kol-avatar-wc.entry.js +1 -1
- package/dist/esm/kol-avatar-wc.entry.js.map +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-link.entry.js +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-card.entry.js +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-drawer.entry.js +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.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-indented-text-wc.entry.js +1 -1
- package/dist/esm/kol-indented-text.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-checkbox.entry.js.map +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js.map +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js.map +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js.map +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js.map +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js.map +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js.map +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js.map +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js.map +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js.map +1 -1
- package/dist/esm/kol-input.entry.js +1 -1
- package/dist/esm/kol-input.entry.js.map +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-group.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-logo.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-popover-wc.entry.js +1 -1
- package/dist/esm/kol-progress.entry.js +1 -1
- package/dist/esm/kol-quote.entry.js +1 -1
- package/dist/esm/kol-select.entry.js +1 -1
- package/dist/esm/kol-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-spin.entry.js +1 -1
- package/dist/esm/kol-split-button.entry.js +1 -1
- package/dist/esm/kol-symbol.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-table.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-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-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item.entry.js +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-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/spell-check-5ac5a135.js +4 -0
- package/dist/esm/spell-check-5ac5a135.js.map +1 -0
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/Alert-1b318619.js +4 -0
- package/dist/kolibri/Alert-1b318619.js.map +1 -0
- package/dist/kolibri/Collapsible-53867075.js +4 -0
- package/dist/kolibri/{Collapsible-0f95c96e.js.map → Collapsible-53867075.js.map} +1 -1
- package/dist/kolibri/FormFieldMsg-6843c725.js +4 -0
- package/dist/kolibri/Heading-1fe830dd.js +4 -0
- package/dist/kolibri/{Heading-781aa65b.js.map → Heading-1fe830dd.js.map} +1 -1
- package/dist/kolibri/{InternalUnderlinedBadgeText-3e2de35c.js → InternalUnderlinedBadgeText-8f2a64b6.js} +1 -1
- package/dist/kolibri/{Span-bb5a31a5.js → Span-7f84ad00.js} +1 -1
- package/dist/kolibri/{Span-bb5a31a5.js.map → Span-7f84ad00.js.map} +1 -1
- package/dist/kolibri/{app-globals-38c128f4.js → app-globals-ebbcf310.js} +1 -1
- package/dist/kolibri/controller-1739038d.js +4 -0
- package/dist/kolibri/controller-1739038d.js.map +1 -0
- package/dist/kolibri/{controller-b379ae04.js → controller-506a6c81.js} +1 -1
- package/dist/kolibri/controller-64301c42.js +4 -0
- package/dist/kolibri/controller-64301c42.js.map +1 -0
- package/dist/kolibri/{controller-d2533e17.js → controller-68fd9cd8.js} +1 -1
- package/dist/kolibri/controller-icon-e20e2d63.js +4 -0
- package/dist/kolibri/{dev.utils-5d039f3c.js → dev.utils-8fad8415.js} +1 -1
- package/dist/kolibri/{devtools-26a65dd7.js → devtools-a0824082.js} +1 -1
- package/dist/kolibri/{index-a0b4dca2.js → index-a49af574.js} +1 -1
- package/dist/kolibri/{index-a0b4dca2.js.map → index-a49af574.js.map} +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js.map +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js.map +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-alert.entry.js +1 -1
- package/dist/kolibri/kol-alert.entry.js.map +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
- package/dist/kolibri/kol-avatar-wc.entry.js.map +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-link.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +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-drawer.entry.js +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.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-indented-text-wc.entry.js +1 -1
- package/dist/kolibri/kol-indented-text.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js.map +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js.map +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js.map +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js.map +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js.map +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js.map +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js.map +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js.map +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js.map +1 -1
- package/dist/kolibri/kol-input.entry.js +1 -1
- package/dist/kolibri/kol-input.entry.js.map +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-group.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-logo.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js.map +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-wc.entry.js +1 -1
- package/dist/kolibri/kol-progress.entry.js +1 -1
- package/dist/kolibri/kol-quote.entry.js +1 -1
- package/dist/kolibri/kol-select.entry.js +1 -1
- package/dist/kolibri/kol-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-spin.entry.js +1 -1
- package/dist/kolibri/kol-split-button.entry.js +1 -1
- package/dist/kolibri/kol-symbol.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +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.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-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-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +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-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/kolibri.esm.js.map +1 -1
- package/dist/kolibri/spell-check-5ac5a135.js +4 -0
- package/dist/kolibri/spell-check-5ac5a135.js.map +1 -0
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components/input-text/controller.d.ts +2 -1
- package/dist/types/components/input-text/shadow.d.ts +3 -1
- package/dist/types/components/table-stateless/component.d.ts +3 -2
- package/dist/types/components/textarea/controller.d.ts +2 -1
- package/dist/types/components/textarea/shadow.d.ts +3 -1
- package/dist/types/components.d.ts +18 -2
- package/dist/types/schema/components/input-text.d.ts +5 -5
- package/dist/types/schema/components/textarea.d.ts +5 -5
- package/dist/types/schema/index.d.ts +1 -1
- package/dist/types/schema/props/index.d.ts +1 -1
- package/dist/types/schema/props/spell-check.d.ts +6 -0
- package/doc/combobox.md +1 -1
- package/doc/input-checkbox.md +1 -1
- package/doc/input-color.md +1 -1
- package/doc/input-date.md +1 -1
- package/doc/input-email.md +1 -1
- package/doc/input-file.md +1 -1
- package/doc/input-number.md +1 -1
- package/doc/input-password.md +1 -1
- package/doc/input-radio.md +1 -1
- package/doc/input-range.md +1 -1
- package/doc/input-text.md +2 -1
- package/doc/select.md +1 -1
- package/doc/single-select.md +1 -1
- package/doc/textarea.md +3 -2
- package/doc/toaster.md +1 -1
- package/package.json +1 -1
- package/vscode-custom-data.json +50 -48
- package/dist/cjs/Alert-574bed11.js +0 -4
- package/dist/cjs/Alert-574bed11.js.map +0 -1
- package/dist/cjs/Span-e07e098e.js.map +0 -1
- package/dist/cjs/controller-dce66822.js +0 -4
- package/dist/cjs/controller-dce66822.js.map +0 -1
- package/dist/cjs/controller-ef1a645a.js +0 -4
- package/dist/cjs/controller-ef1a645a.js.map +0 -1
- package/dist/esm/Alert-a0cdc528.js +0 -4
- package/dist/esm/Alert-a0cdc528.js.map +0 -1
- package/dist/esm/Span-bb5a31a5.js.map +0 -1
- package/dist/esm/controller-82199ba0.js +0 -4
- package/dist/esm/controller-82199ba0.js.map +0 -1
- package/dist/esm/controller-ae3a41a0.js +0 -4
- package/dist/esm/controller-ae3a41a0.js.map +0 -1
- package/dist/kolibri/Alert-a0cdc528.js +0 -4
- package/dist/kolibri/Alert-a0cdc528.js.map +0 -1
- package/dist/kolibri/Collapsible-0f95c96e.js +0 -4
- package/dist/kolibri/FormFieldMsg-de303cbe.js +0 -4
- package/dist/kolibri/Heading-781aa65b.js +0 -4
- package/dist/kolibri/controller-82199ba0.js +0 -4
- package/dist/kolibri/controller-82199ba0.js.map +0 -1
- package/dist/kolibri/controller-ae3a41a0.js +0 -4
- package/dist/kolibri/controller-ae3a41a0.js.map +0 -1
- package/dist/kolibri/controller-icon-30817124.js +0 -4
- /package/dist/kolibri/{FormFieldMsg-de303cbe.js.map → FormFieldMsg-6843c725.js.map} +0 -0
- /package/dist/kolibri/{InternalUnderlinedBadgeText-3e2de35c.js.map → InternalUnderlinedBadgeText-8f2a64b6.js.map} +0 -0
- /package/dist/kolibri/{app-globals-38c128f4.js.map → app-globals-ebbcf310.js.map} +0 -0
- /package/dist/kolibri/{controller-b379ae04.js.map → controller-506a6c81.js.map} +0 -0
- /package/dist/kolibri/{controller-d2533e17.js.map → controller-68fd9cd8.js.map} +0 -0
- /package/dist/kolibri/{controller-icon-30817124.js.map → controller-icon-e20e2d63.js.map} +0 -0
- /package/dist/kolibri/{dev.utils-5d039f3c.js.map → dev.utils-8fad8415.js.map} +0 -0
- /package/dist/kolibri/{devtools-26a65dd7.js.map → devtools-a0824082.js.map} +0 -0
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{A as AssociatedInputController}from"./associated.controller.js";import{c as watchBoolean,o as objectObjectHandler,p as parseJson,w as watchValidator,d as a11yHintDisabled,b as a11yHint,e as watchString,q as devHint,s as setState}from"./prop.validators.js";import{v as validateAccessKey,a as validateAccessAndShortKey,b as validateShortKey,c as validateTabIndex}from"./access-and-short-key.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{v as validateHideLabel}from"./hide-label.js";import{a as validateLabelWithExpertSlot}from"./label.js";const validateAdjustHeight=(t,e)=>{watchBoolean(t,"_adjustHeight",e)},validateHideError=(t,e,o)=>{watchBoolean(t,"_hideError",e,o)},validateMsg=(t,e)=>{objectObjectHandler(e,(()=>{try{e=parseJson(e)}catch(t){}watchValidator(t,"_msg",(t=>"
|
4
|
+
import{s as stopPropagation,t as tryToDispatchKoliBriEvent}from"./events.js";import{A as AssociatedInputController}from"./associated.controller.js";import{c as watchBoolean,o as objectObjectHandler,p as parseJson,w as watchValidator,d as a11yHintDisabled,b as a11yHint,e as watchString,q as devHint,s as setState}from"./prop.validators.js";import{v as validateAccessKey,a as validateAccessAndShortKey,b as validateShortKey,c as validateTabIndex}from"./access-and-short-key.js";import{b as isObject}from"./common.js";import{v as validateTooltipAlign}from"./tooltip-align.js";import{v as validateHideLabel}from"./hide-label.js";import{a as validateLabelWithExpertSlot}from"./label.js";const validateAdjustHeight=(t,e)=>{watchBoolean(t,"_adjustHeight",e)},validateHideError=(t,e,o)=>{watchBoolean(t,"_hideError",e,o)},validateMsg=(t,e)=>{objectObjectHandler(e,(()=>{try{e=parseJson(e)}catch(t){}watchValidator(t,"_msg",(t=>isObject(t)&&"string"==typeof(null==t?void 0:t._description)),new Set(["MsgPropType"]),e,{defaultValue:{_description:"",_type:"error"}})}))},validateTouched=(t,e)=>{watchBoolean(t,"_touched",e)};class ControlledInputController extends AssociatedInputController{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){watchBoolean(this.component,"_alert",t)}validateTouched(t){validateTouched(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class InputController extends ControlledInputController{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this)},this.component=t}validateAccessKey(t){validateAccessKey(this.component,t),validateAccessAndShortKey(t,this.component._shortKey)}validateAdjustHeight(t){validateAdjustHeight(this.component,t)}validateDisabled(t){watchBoolean(this.component,"_disabled",t),!0===t&&a11yHintDisabled()}validateTooltipAlign(t){validateTooltipAlign(this.component,t)}validateError(t){"string"==typeof t&&t.length>0?this.validateMsg({_description:t,_type:"error"}):this.validateMsg(void 0)}validateHideError(t){validateHideError(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&a11yHint("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){validateHideLabel(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&a11yHint("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){watchString(this.component,"_hint",t)}validateId(t){watchString(this.component,"_id",t,{minLength:1}),""!==t&&void 0!==t||devHint("A unique ID on the input fields is not strictly required, but it might be relevant for E2E tests.")}validateLabel(t){validateLabelWithExpertSlot(this.component,t,{required:!0})}validateMsg(t){validateMsg(this.component,t)}validateOn(t){"object"==typeof t&&setState(this.component,"_on",t)}validateShortKey(t){validateShortKey(this.component,t),validateAccessAndShortKey(this.component._accessKey,t)}validateSmartButton(t){objectObjectHandler(t,(()=>{try{t=parseJson(t)}catch(t){}setState(this.component,"_smartButton",t)}))}validateTabIndex(t){validateTabIndex(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.component._msg&&this.validateMsg(this.component._msg),this.validateDisabled(this.component._disabled),this.validateHideError(this.component._hideError),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateShortKey(this.component._shortKey),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex),validateAccessAndShortKey(this.component._accessKey,this.component._shortKey)}onBlur(t){var e;this.component._touched=!0,stopPropagation(t),tryToDispatchKoliBriEvent("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t,e){var o;e=null!=e?e:t.target.value,tryToDispatchKoliBriEvent("change",this.host,e),"function"==typeof(null===(o=this.component._on)||void 0===o?void 0:o.onChange)&&this.component._on.onChange(t,e),this.valueChangeListeners.forEach((t=>t(e)))}onInput(t,e=!0,o){var i;o=null!=o?o:t.target.value,stopPropagation(t),tryToDispatchKoliBriEvent("input",this.host,o),e&&this.setFormAssociatedValue(o),"function"==typeof(null===(i=this.component._on)||void 0===i?void 0:i.onInput)&&this.component._on.onInput(t,o)}onClick(t){var e;stopPropagation(t),tryToDispatchKoliBriEvent("click",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;stopPropagation(t),tryToDispatchKoliBriEvent("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}const getRenderStates=t=>{var e,o;const i=Boolean("error"===(null===(e=t._msg)||void 0===e?void 0:e._type)&&t._msg._description&&(null===(o=t._msg._description)||void 0===o?void 0:o.length)>0)&&!0===t._touched,n="string"==typeof t._hint&&t._hint.length>0,a=[];return!0===i&&a.push(`${t._id}-error`),!0===n&&a.push(`${t._id}-hint`),{hasError:i,hasHint:n,ariaDescribedBy:a}};export{InputController as I,getRenderStates as g};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"controller2.js","mappings":";;;;;;;;;;;AAeO,MAAM,oBAAoB,GAAG,CAAC,SAAoC,EAAE,KAA4B;IACtG,YAAY,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC;;ACDM,MAAM,iBAAiB,GAAG,CAAC,SAAoC,EAAE,KAAyB,EAAE,OAA6B;IAC/H,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACvD,CAAC;;ACAM,MAAM,WAAW,GAAG,CAAC,SAAoC,EAAE,KAAgC;IACjG,mBAAmB,CAAC,KAAK,EAAE;QAC1B,IAAI;YACH,KAAK,GAAG,SAAS,CAAc,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OAAO,CAAC,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,MAAK,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,IAAI,CAAA,MAAA,KAAK,CAAC,IAAI,CAAC,YAAY,0CAAE,MAAM,IAAG,CAAC,CAAC,CAAC;IACrI,MAAM,QAAQ,GAAG,mBAAmB,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;IAChE,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1E,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,IAAI,QAAQ,KAAK,IAAI,EAAE;QACtB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC;KAC3C;IACD,IAAI,OAAO,KAAK,IAAI,EAAE;QACrB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;KAC1C;IACD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AAC/C;;;;","names":[],"sources":["src/schema/props/adjust-height.ts","src/schema/props/hide-error.ts","src/schema/props/msg.ts","src/schema/props/touched.ts","src/components/input-adapter-leanup/controller.ts","src/components/@deprecated/input/controller.ts","src/components/input/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type AdjustHeightPropType = boolean;\n\n/**\n * Adjusts the height of the element to its content.\n */\nexport type PropAdjustHeight = {\n\tadjustHeight: AdjustHeightPropType;\n};\n\n/* validator */\nexport const validateAdjustHeight = (component: Generic.Element.Component, value?: AdjustHeightPropType): void => {\n\twatchBoolean(component, '_adjustHeight', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchBooleanOptions } from '../utils';\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type HideErrorPropType = boolean;\n\n/**\n * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n */\nexport type PropHideError = {\n\thideError: HideErrorPropType;\n};\n\n/* validator */\nexport const validateHideError = (component: Generic.Element.Component, value?: HideErrorPropType, options?: WatchBooleanOptions): void => {\n\twatchBoolean(component, '_hideError', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\nimport type { AlertProps } from '../components';\nimport { objectObjectHandler, parseJson, watchValidator } from '../utils';\nimport type { Stringified } from '../types';\n\n/* types */\nexport type MsgPropType = AlertProps & {\n\t_description: string;\n};\n\n/**\n * Defines the properties for a message rendered as Alert component.\n */\nexport type PropMsg = {\n\tmsg: MsgPropType;\n};\n\n/* validator */\nexport const validateMsg = (component: Generic.Element.Component, value?: Stringified<MsgPropType>): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<MsgPropType>(value as string);\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch (e) {\n\t\t\t// value keeps original value\n\t\t}\n\n\t\twatchValidator(component, `_msg`, (value) => typeof value === 'object', new Set(['Object']), value);\n\t});\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type TouchedPropType = boolean;\n\n/**\n * Shows if the input was touched by a user.\n */\nexport type PropTouched = {\n\ttouched: TouchedPropType;\n};\n\n/* validator */\nexport const validateTouched = (component: Generic.Element.Component, value?: TouchedPropType): void => {\n\twatchBoolean(component, '_touched', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { validateTouched, watchBoolean } from '../../schema';\n\nimport { AssociatedInputController } from './associated.controller';\n\nimport type { Props, Watches } from './types';\nexport class ControlledInputController extends AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this.component, '_alert', value);\n\t}\n\n\tpublic validateTouched(value?: boolean): void {\n\t\tvalidateTouched(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAlert(this.component._alert);\n\t\tthis.validateTouched(this.component._touched);\n\t}\n}\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tAccessKeyPropType,\n\tAdjustHeightPropType,\n\tButtonProps,\n\tHideErrorPropType,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tTooltipAlignPropType,\n} from '../../../schema';\nimport {\n\ta11yHint,\n\ta11yHintDisabled,\n\tdevHint,\n\tobjectObjectHandler,\n\tparseJson,\n\tsetState,\n\tvalidateAccessKey,\n\tvalidateAdjustHeight,\n\tvalidateHideError,\n\tvalidateHideLabel,\n\tvalidateLabelWithExpertSlot,\n\tvalidateMsg,\n\tvalidateTabIndex,\n\tvalidateTooltipAlign,\n\twatchBoolean,\n\twatchString,\n\tvalidateShortKey,\n} from '../../../schema';\n\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../../utils/events';\nimport { ControlledInputController } from '../../input-adapter-leanup/controller';\n\nimport type { Props as AdapterProps } from '../../input-adapter-leanup/types';\nimport type { Props, Watches } from './types';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\n\ntype ValueChangeListener = (value: StencilUnknown) => void;\n\nexport class InputController extends ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props & AdapterProps;\n\n\tprivate readonly valueChangeListeners: ValueChangeListener[] = [];\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAccessKey(value?: AccessKeyPropType): void {\n\t\tvalidateAccessKey(this.component, value);\n\t\tvalidateAccessAndShortKey(value, this.component._shortKey);\n\t}\n\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tvalidateAdjustHeight(this.component, value);\n\t}\n\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this.component, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\tpublic validateTooltipAlign(value?: TooltipAlignPropType): void {\n\t\tvalidateTooltipAlign(this.component, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\tpublic validateError(value?: string): void {\n\t\tconst message: MsgPropType = {\n\t\t\t_description: value || '',\n\t\t\t_type: 'error',\n\t\t};\n\t\tthis.validateMsg(message);\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideLabel) {\n\t\t\t\t\t\ta11yHint('Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHint(value?: string): void {\n\t\twatchString(this.component, '_hint', value);\n\t}\n\n\tpublic validateId(value?: string): void {\n\t\twatchString(this.component, '_id', value, { minLength: 1 });\n\t\tif (value === '' || typeof value === 'undefined') {\n\t\t\tdevHint(`A unique ID on the input fields is not strictly required, but it might be relevant for E2E tests.`);\n\t\t}\n\t}\n\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tvalidateLabelWithExpertSlot(this.component, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tvalidateMsg(this.component, value);\n\t}\n\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tif (typeof value === 'object') {\n\t\t\tsetState(this.component, '_on', value);\n\t\t}\n\t}\n\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tvalidateShortKey(this.component, value);\n\t\tvalidateAccessAndShortKey(this.component._accessKey, value);\n\t}\n\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this.component, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAccessKey(this.component._accessKey);\n\t\tthis.validateAdjustHeight(this.component._adjustHeight);\n\t\tthis.validateError(this.component._error);\n\t\tthis.validateMsg(this.component._msg);\n\t\tthis.validateDisabled(this.component._disabled);\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateHideLabel(this.component._hideLabel);\n\t\tthis.validateHint(this.component._hint);\n\t\tthis.validateId(this.component._id);\n\t\tthis.validateLabel(this.component._label);\n\t\tthis.validateShortKey(this.component._shortKey);\n\t\tthis.validateSmartButton(this.component._smartButton);\n\t\tthis.validateOn(this.component._on);\n\t\tthis.validateTabIndex(this.component._tabIndex);\n\t\tvalidateAccessAndShortKey(this.component._accessKey, this.component._shortKey);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\tthis.component._touched = true;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('blur', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onBlur === 'function') {\n\t\t\tthis.component._on.onBlur(event);\n\t\t}\n\t}\n\n\t/**\n\t * @param event - The original event object\n\t * @param value - Optional value. Taken from event if not defined.\n\t */\n\tprotected onChange(event: Event, value?: StencilUnknown): void {\n\t\tvalue = value ?? (event.target as HTMLInputElement).value;\n\n\t\t// Event handling\n\t\ttryToDispatchKoliBriEvent('change', this.host, value);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\t/**\n\t\t\t * TODO\n\t\t\t * Value-Handling muss für InputDate und InputNumber optimiert werden\n\t\t\t * - value\n\t\t\t * - valueAsNumber\n\t\t\t * - valueAsDate\n\t\t\t */\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\n\t\t/**\n\t\t * TODO: Was ist das?\n\t\t */\n\t\tthis.valueChangeListeners.forEach((listener) => listener(value));\n\t}\n\n\t/**\n\t * @param event - The original event object\n\t * @param shouldSetFormAssociatedValue - Set to false when setting form associated value is not desired.\n\t * @param value - Optional value. Taken from event if not defined.\n\t */\n\tprotected onInput(event: Event, shouldSetFormAssociatedValue = true, value?: StencilUnknown): void {\n\t\tvalue = value ?? (event.target as HTMLInputElement).value;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('input', this.host, value);\n\n\t\t// Static form handling\n\t\tif (shouldSetFormAssociatedValue) {\n\t\t\tthis.setFormAssociatedValue(value);\n\t\t}\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onInput === 'function') {\n\t\t\tthis.component._on.onInput(event, value);\n\t\t}\n\t}\n\n\tprotected onClick(event: Event): void {\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('click', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onClick === 'function') {\n\t\t\tthis.component._on.onClick(event);\n\t\t}\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('focus', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onFocus === 'function') {\n\t\t\tthis.component._on.onFocus(event);\n\t\t}\n\t}\n\n\tpublic addValueChangeListener(listener: ValueChangeListener) {\n\t\tthis.valueChangeListeners.push(listener);\n\t}\n\n\t/**\n\t * Hinweis: In der Subklasse 'InputPasswordController'\n\t * werden die Methoden onBlur und onFocus\n\t * überschrieben.\n\t * Es werden somit zunächst die Methoden der\n\t * Subklasse ausgeführt und danach die der\n\t * Oberklassen.\n\t */\n\tpublic readonly onFacade = {\n\t\tonBlur: this.onBlur.bind(this),\n\t\tonChange: this.onChange.bind(this),\n\t\tonClick: this.onClick.bind(this),\n\t\tonFocus: this.onFocus.bind(this),\n\t\tonInput: this.onInput.bind(this),\n\t};\n}\n","import type { MsgPropType, TouchedPropType } from '../../schema';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_msg?: MsgPropType;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasError: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst isMessageValidError = Boolean(state._msg?._type === 'error' && state._msg._description && state._msg._description?.length > 0);\n\tconst hasError = isMessageValidError && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasError === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n"],"version":3}
|
1
|
+
{"file":"controller2.js","mappings":";;;;;;;;;;;;AAeO,MAAM,oBAAoB,GAAG,CAAC,SAAoC,EAAE,KAA4B;IACtG,YAAY,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC;;ACDM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AO,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AAC/C;;;;","names":[],"sources":["src/schema/props/adjust-height.ts","src/schema/props/hide-error.ts","src/schema/props/msg.ts","src/schema/props/touched.ts","src/components/input-adapter-leanup/controller.ts","src/components/@deprecated/input/controller.ts","src/components/input/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type AdjustHeightPropType = boolean;\n\n/**\n * Adjusts the height of the element to its content.\n */\nexport type PropAdjustHeight = {\n\tadjustHeight: AdjustHeightPropType;\n};\n\n/* validator */\nexport const validateAdjustHeight = (component: Generic.Element.Component, value?: AdjustHeightPropType): void => {\n\twatchBoolean(component, '_adjustHeight', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { WatchBooleanOptions } from '../utils';\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type HideErrorPropType = boolean;\n\n/**\n * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n */\nexport type PropHideError = {\n\thideError: HideErrorPropType;\n};\n\n/* validator */\nexport const validateHideError = (component: Generic.Element.Component, value?: HideErrorPropType, options?: WatchBooleanOptions): void => {\n\twatchBoolean(component, '_hideError', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\nimport type { AlertProps } from '../components';\nimport type { Stringified } from '../types';\nimport { objectObjectHandler, parseJson, watchValidator } from '../utils';\nimport { isObject } from '../validators';\n\n/* types */\nexport type MsgPropType = AlertProps & {\n\t_description: string;\n};\n\n/**\n * Defines the properties for a message rendered as Alert component.\n */\nexport type PropMsg = {\n\tmsg: MsgPropType;\n};\n\n/* validator */\nexport const validateMsg = (component: Generic.Element.Component, value?: Stringified<MsgPropType>): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<MsgPropType>(value);\n\t\t\t// eslint-disable-next-line no-empty\n\t\t} catch (e) {\n\t\t\t// value keeps original value\n\t\t}\n\t\twatchValidator<MsgPropType>(\n\t\t\tcomponent,\n\t\t\t`_msg`,\n\t\t\t(value) => isObject(value) && typeof value?._description === 'string',\n\t\t\tnew Set(['MsgPropType']),\n\t\t\tvalue as MsgPropType,\n\t\t\t{\n\t\t\t\tdefaultValue: {\n\t\t\t\t\t_description: '',\n\t\t\t\t\t_type: 'error',\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t});\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type TouchedPropType = boolean;\n\n/**\n * Shows if the input was touched by a user.\n */\nexport type PropTouched = {\n\ttouched: TouchedPropType;\n};\n\n/* validator */\nexport const validateTouched = (component: Generic.Element.Component, value?: TouchedPropType): void => {\n\twatchBoolean(component, '_touched', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { validateTouched, watchBoolean } from '../../schema';\n\nimport { AssociatedInputController } from './associated.controller';\n\nimport type { Props, Watches } from './types';\nexport class ControlledInputController extends AssociatedInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this.component, '_alert', value);\n\t}\n\n\tpublic validateTouched(value?: boolean): void {\n\t\tvalidateTouched(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAlert(this.component._alert);\n\t\tthis.validateTouched(this.component._touched);\n\t}\n}\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tAccessKeyPropType,\n\tAdjustHeightPropType,\n\tButtonProps,\n\tHideErrorPropType,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tTooltipAlignPropType,\n} from '../../../schema';\nimport {\n\ta11yHint,\n\ta11yHintDisabled,\n\tdevHint,\n\tobjectObjectHandler,\n\tparseJson,\n\tsetState,\n\tvalidateAccessKey,\n\tvalidateAdjustHeight,\n\tvalidateHideError,\n\tvalidateHideLabel,\n\tvalidateLabelWithExpertSlot,\n\tvalidateMsg,\n\tvalidateTabIndex,\n\tvalidateTooltipAlign,\n\twatchBoolean,\n\twatchString,\n\tvalidateShortKey,\n} from '../../../schema';\n\nimport { stopPropagation, tryToDispatchKoliBriEvent } from '../../../utils/events';\nimport { ControlledInputController } from '../../input-adapter-leanup/controller';\n\nimport type { Props as AdapterProps } from '../../input-adapter-leanup/types';\nimport type { Props, Watches } from './types';\nimport { validateAccessAndShortKey } from '../../../schema/validators/access-and-short-key';\n\ntype ValueChangeListener = (value: StencilUnknown) => void;\n\nexport class InputController extends ControlledInputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props & AdapterProps;\n\n\tprivate readonly valueChangeListeners: ValueChangeListener[] = [];\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAccessKey(value?: AccessKeyPropType): void {\n\t\tvalidateAccessKey(this.component, value);\n\t\tvalidateAccessAndShortKey(value, this.component._shortKey);\n\t}\n\n\tpublic validateAdjustHeight(value?: AdjustHeightPropType): void {\n\t\tvalidateAdjustHeight(this.component, value);\n\t}\n\n\tpublic validateDisabled(value?: boolean): void {\n\t\twatchBoolean(this.component, '_disabled', value);\n\t\tif (value === true) {\n\t\t\ta11yHintDisabled();\n\t\t}\n\t}\n\tpublic validateTooltipAlign(value?: TooltipAlignPropType): void {\n\t\tvalidateTooltipAlign(this.component, value);\n\t}\n\n\t/**\n\t * @deprecated\n\t */\n\tpublic validateError(value?: string): void {\n\t\tif (typeof value === 'string' && value.length > 0) {\n\t\t\tthis.validateMsg({\n\t\t\t\t_description: value,\n\t\t\t\t_type: 'error',\n\t\t\t});\n\t\t} else {\n\t\t\tthis.validateMsg(undefined);\n\t\t}\n\t}\n\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tvalidateHideError(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideError) {\n\t\t\t\t\t\ta11yHint('Property hide-error for inputs: Only use when the error message is shown outside of the input component.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tvalidateHideLabel(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: () => {\n\t\t\t\t\tif (this.component.state._hideLabel) {\n\t\t\t\t\t\ta11yHint('Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateHint(value?: string): void {\n\t\twatchString(this.component, '_hint', value);\n\t}\n\n\tpublic validateId(value?: string): void {\n\t\twatchString(this.component, '_id', value, { minLength: 1 });\n\t\tif (value === '' || typeof value === 'undefined') {\n\t\t\tdevHint(`A unique ID on the input fields is not strictly required, but it might be relevant for E2E tests.`);\n\t\t}\n\t}\n\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tvalidateLabelWithExpertSlot(this.component, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tvalidateMsg(this.component, value);\n\t}\n\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tif (typeof value === 'object') {\n\t\t\tsetState(this.component, '_on', value);\n\t\t}\n\t}\n\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tvalidateShortKey(this.component, value);\n\t\tvalidateAccessAndShortKey(this.component._accessKey, value);\n\t}\n\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<ButtonProps>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\tsetState(this.component, '_smartButton', value);\n\t\t});\n\t}\n\n\tpublic validateTabIndex(value?: number): void {\n\t\tvalidateTabIndex(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAccessKey(this.component._accessKey);\n\t\tthis.validateAdjustHeight(this.component._adjustHeight);\n\t\tthis.validateError(this.component._error);\n\t\t// _msg should only override _error if it is also defined.\n\t\tif (this.component._msg) {\n\t\t\tthis.validateMsg(this.component._msg);\n\t\t}\n\t\tthis.validateDisabled(this.component._disabled);\n\t\tthis.validateHideError(this.component._hideError);\n\t\tthis.validateHideLabel(this.component._hideLabel);\n\t\tthis.validateHint(this.component._hint);\n\t\tthis.validateId(this.component._id);\n\t\tthis.validateLabel(this.component._label);\n\t\tthis.validateShortKey(this.component._shortKey);\n\t\tthis.validateSmartButton(this.component._smartButton);\n\t\tthis.validateOn(this.component._on);\n\t\tthis.validateTabIndex(this.component._tabIndex);\n\t\tvalidateAccessAndShortKey(this.component._accessKey, this.component._shortKey);\n\t}\n\n\tprotected onBlur(event: Event): void {\n\t\tthis.component._touched = true;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('blur', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onBlur === 'function') {\n\t\t\tthis.component._on.onBlur(event);\n\t\t}\n\t}\n\n\t/**\n\t * @param event - The original event object\n\t * @param value - Optional value. Taken from event if not defined.\n\t */\n\tprotected onChange(event: Event, value?: StencilUnknown): void {\n\t\tvalue = value ?? (event.target as HTMLInputElement).value;\n\n\t\t// Event handling\n\t\ttryToDispatchKoliBriEvent('change', this.host, value);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onChange === 'function') {\n\t\t\t/**\n\t\t\t * TODO\n\t\t\t * Value-Handling muss für InputDate und InputNumber optimiert werden\n\t\t\t * - value\n\t\t\t * - valueAsNumber\n\t\t\t * - valueAsDate\n\t\t\t */\n\t\t\tthis.component._on.onChange(event, value);\n\t\t}\n\n\t\t/**\n\t\t * TODO: Was ist das?\n\t\t */\n\t\tthis.valueChangeListeners.forEach((listener) => listener(value));\n\t}\n\n\t/**\n\t * @param event - The original event object\n\t * @param shouldSetFormAssociatedValue - Set to false when setting form associated value is not desired.\n\t * @param value - Optional value. Taken from event if not defined.\n\t */\n\tprotected onInput(event: Event, shouldSetFormAssociatedValue = true, value?: StencilUnknown): void {\n\t\tvalue = value ?? (event.target as HTMLInputElement).value;\n\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('input', this.host, value);\n\n\t\t// Static form handling\n\t\tif (shouldSetFormAssociatedValue) {\n\t\t\tthis.setFormAssociatedValue(value);\n\t\t}\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onInput === 'function') {\n\t\t\tthis.component._on.onInput(event, value);\n\t\t}\n\t}\n\n\tprotected onClick(event: Event): void {\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('click', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onClick === 'function') {\n\t\t\tthis.component._on.onClick(event);\n\t\t}\n\t}\n\n\tprotected onFocus(event: Event): void {\n\t\t// Event handling\n\t\tstopPropagation(event);\n\t\ttryToDispatchKoliBriEvent('focus', this.host);\n\n\t\t// Callback\n\t\tif (typeof this.component._on?.onFocus === 'function') {\n\t\t\tthis.component._on.onFocus(event);\n\t\t}\n\t}\n\n\tpublic addValueChangeListener(listener: ValueChangeListener) {\n\t\tthis.valueChangeListeners.push(listener);\n\t}\n\n\t/**\n\t * Hinweis: In der Subklasse 'InputPasswordController'\n\t * werden die Methoden onBlur und onFocus\n\t * überschrieben.\n\t * Es werden somit zunächst die Methoden der\n\t * Subklasse ausgeführt und danach die der\n\t * Oberklassen.\n\t */\n\tpublic readonly onFacade = {\n\t\tonBlur: this.onBlur.bind(this),\n\t\tonChange: this.onChange.bind(this),\n\t\tonClick: this.onClick.bind(this),\n\t\tonFocus: this.onFocus.bind(this),\n\t\tonInput: this.onInput.bind(this),\n\t};\n}\n","import type { MsgPropType, TouchedPropType } from '../../schema';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_msg?: MsgPropType;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasError: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst isMessageValidError = Boolean(state._msg?._type === 'error' && state._msg._description && state._msg._description?.length > 0);\n\tconst hasError = isMessageValidError && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasError === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasError, hasHint, ariaDescribedBy };\n};\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{I as InputPasswordController}from"./controller5.js";import{w as watchValidator}from"./prop.validators.js";import{v as validateSuggestions}from"./suggestions.js";const inputTextTypeOptions=["text","search","url","tel"];class InputTextEmailController extends InputPasswordController{constructor(t,o
|
4
|
+
import{I as InputPasswordController}from"./controller5.js";import{v as validateSpellCheck}from"./spell-check.js";import{w as watchValidator}from"./prop.validators.js";import{v as validateSuggestions}from"./suggestions.js";const inputTextTypeOptions=["text","search","url","tel"];class InputTextEmailController extends InputPasswordController{constructor(t,e,o){super(t,e,o),this.component=t}validateSuggestions(t){validateSuggestions(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class InputTextController extends InputTextEmailController{constructor(t,e,o){super(t,e,o),this.hasError=!1,this.component=t}validateSpellCheck(t){validateSpellCheck(this.component,t)}validateType(t){watchValidator(this.component,"_type",(t=>"string"==typeof t&&inputTextTypeOptions.includes(t)),new Set([`String {${inputTextTypeOptions.join(", ")}`]),t)}componentWillLoad(){super.componentWillLoad(),this.validateSpellCheck(this.component._spellCheck),this.validateType(this.component._type)}}export{InputTextEmailController as I,InputTextController as a};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"controller4.js","mappings":"
|
1
|
+
{"file":"controller4.js","mappings":";;;;;;;;AAAO,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAU;;MCsBhE,wBAAyB,SAAQ,uBAAuB;IAGpE,YAAmB,SAA0D,EAAE,IAAY,EAAE,IAAkB;QAC9G,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC3B;IAEM,mBAAmB,CAAC,KAA2B;QACrD,mBAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KAC3C;IAEM,iBAAiB;QACvB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;KACtD;CACD;MAEY,mBAAoB,SAAQ,wBAAwB;IAKhE,YAAmB,SAAqD,EAAE,IAAY,EAAE,IAAkB;QACzG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAHvB,aAAQ,GAAG,KAAK,CAAC;QAIvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC3B;IAEM,kBAAkB,CAAC,KAA0B;QACnD,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KAC1C;IAEM,YAAY,CAAC,KAAqB;QACxC,cAAc,CACb,IAAI,CAAC,SAAS,EACd,OAAO,EACP,CAAC,KAAK,KAAc,OAAO,KAAK,KAAK,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,EACrF,IAAI,GAAG,CAAC,CAAC,WAAW,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EACvD,KAAK,CACL,CAAC;KACF;IAEM,iBAAiB;QACvB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KACxC;;;;;","names":[],"sources":["src/schema/types/input/control/text.ts","src/components/input-text/controller.ts"],"sourcesContent":["export const inputTextTypeOptions = ['text', 'search', 'url', 'tel'] as const;\nexport type InputTextType = (typeof inputTextTypeOptions)[number];\n","import type {\n\tInputTextProps,\n\tInputTextType,\n\tInputTextWatches,\n\tPropLabelWithExpertSlot,\n\tPropSuggestions,\n\tSpellCheckPropType,\n\tSuggestionsPropType,\n} from '../../schema';\nimport { inputTextTypeOptions, validateSpellCheck, validateSuggestions, watchValidator } from '../../schema';\n\nimport { InputPasswordController } from '../input-password/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\tid: string;\n} & PropSuggestions;\ntype InputTextEmailProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputTextEmailWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputTextEmailController extends InputPasswordController implements InputTextEmailWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextEmailProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextEmailProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSuggestions(this.component._suggestions);\n\t}\n}\n\nexport class InputTextController extends InputTextEmailController implements InputTextWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextProps;\n\n\tpublic hasError = false;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateType(value?: InputTextType): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_type',\n\t\t\t(value): boolean => typeof value === 'string' && inputTextTypeOptions.includes(value),\n\t\t\tnew Set([`String {${inputTextTypeOptions.join(', ')}`]),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateType(this.component._type);\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{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 /*\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 :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n
|
4
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";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 /*\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 :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-abbr {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",KolAbbrDefaultStyle0=defaultStyleCss,KolAbbr$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._label=void 0,this.state={_label:""}}render(){return h(Host,{key:"8267aa3e74d7eaa360974c5d574061ef207f2b79",class:"kol-abbr"},h("abbr",{key:"cc15d83f035241891e2c44fe7401501dae83c15e"},h("slot",{key:"2a655a6e8c1dbae8377bd8175cd83189b0b00483"})),this.state._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:KolAbbrDefaultStyle0}}},[33,"kol-abbr",{_label:[1],state:[32]},void 0,{_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-abbr"].forEach((n=>{if("kol-abbr"===n)customElements.get(n)||customElements.define(n,KolAbbr$1)}))}const KolAbbr=KolAbbr$1,defineCustomElement=defineCustomElement$1;export{KolAbbr,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-abbr.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,
|
1
|
+
{"file":"kol-abbr.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,g+KAAg+K,CAAC;AACz/K,6BAAe,eAAe;;MCcjBA,SAAO;;;;;;qBAiBiB;YACnC,MAAM,EAAE,EAAE;SACV;;IAlBM,MAAM;QACZ,QACC,EAAC,IAAI,qDAAC,KAAK,EAAC,UAAU,IACrB,+DACC,8DAAQ,CACF,EACN,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,EAAE,CAC7C,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":["KolAbbr"],"sources":["src/components/abbr/style.scss?tag=kol-abbr&mode=default&encapsulation=shadow","src/components/abbr/shadow.tsx"],"sourcesContent":["@import '../@shared/mixins';\n@import '../style';\n@import '../tooltip/style.scss';\n\n@layer kol-component {\n\t.kol-abbr {\n\t\tfont-size: rem(16);\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Host, Prop, State, Watch } from '@stencil/core';\nimport type { AbbrAPI, AbbrStates, LabelPropType } from '../../schema';\nimport { validateLabel } from '../../schema';\n\n/**\n * @slot - The abbreviation (short form).\n */\n@Component({\n\ttag: 'kol-abbr',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolAbbr implements AbbrAPI {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<Host class=\"kol-abbr\">\n\t\t\t\t<abbr>\n\t\t\t\t\t<slot />\n\t\t\t\t</abbr>\n\t\t\t\t{this.state._label ? ` (${this.state._label})` : ''}\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: AbbrStates = {\n\t\t_label: '', // ⚠ required\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{proxyCustomElement,HTMLElement,h
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{n as nonce}from"./dev.utils2.js";import{w as watchHeadingLevel}from"./validation.js";import{w as watchValidator,f as featureHint}from"./prop.validators.js";import{K as KolCollapsibleFc}from"./Collapsible.js";import{v as validateDisabled}from"./disabled.js";import{v as validateOpen}from"./open.js";import{v as validateLabel}from"./label.js";const validateAccordionCallbacks=(n,e)=>{watchValidator(n,"_on",(n=>"object"==typeof n&&null!==n),new Set(["AccordionCallbacksPropType {Events.onClick}"]),e)},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 /*\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 :host {\n display: block;\n }\n}\n/* For animation technique see https://css-tricks.com/css-grid-can-do-auto-height-transitions/ */\n@layer kol-component {\n .collapsible {\n /* @see https://github.com/public-ui/kolibri/issues/5952 */\n /*\n * Inside a button, the caption text is always centered.\n * So we have to align the text to the left.\n */\n }\n .collapsible__wrapper {\n display: grid;\n grid-template-rows: 0fr;\n overflow: hidden;\n transition: grid-template-rows 0.3s;\n }\n .collapsible__wrapper-animation {\n min-height: 0;\n transition: visibility 0.3s;\n /* This property is important to keep in sync with the visual transition (template-rows). Without it interactive elements within the accordion would stay focusable. */\n visibility: hidden;\n }\n .open .collapsible__wrapper {\n grid-template-rows: 1fr;\n }\n .open .collapsible__wrapper-animation {\n visibility: visible;\n }\n @media (prefers-reduced-motion) {\n .collapsible__wrapper-animation, .collapsible__wrapper {\n transition-duration: 0s;\n }\n }\n @media print {\n :not(.open) .collapsible__wrapper-animation {\n display: none;\n }\n }\n .collapsible__heading-button button .kol-span-wc {\n justify-items: start;\n }\n}\n@layer kol-component {\n .kol-accordion {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}",KolAccordionDefaultStyle0=defaultStyleCss;featureHint("[KolAccordion] Anfrage nach einer KolAccordionGroup bei dem immer nur ein Accordion geöffnet ist.\n\n- onClick auf der KolAccordion anwenden\n- Click-Event prüft den _open-Status der Accordions\n- Logik Öffnet und Schließt entsprechend"),featureHint("[KolAccordion] Tab-Sperre des Inhalts im geschlossenen Zustand.");const KolAccordion$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.nonce=nonce(),this.catchRef=n=>{this.buttonWcRef=n},this.handleOnClick=n=>{this._open=!this._open,setTimeout((()=>{var e,t;null===(t=null===(e=this.state._on)||void 0===e?void 0:e.onClick)||void 0===t||t.call(e,n,!0===this._open)}))},this._disabled=!1,this._label=void 0,this._level=1,this._on=void 0,this._open=!1,this.state={_label:"",_level:1,_on:{}}}async focus(){await this.kolFocus()}async kolFocus(){var n;await(null===(n=this.buttonWcRef)||void 0===n?void 0:n.kolFocus())}render(){const{_open:n,_label:e,_disabled:t,_level:i}=this.state,o="kol-accordion",a={id:this.nonce,label:e,open:n,disabled:t,level:i,onClick:this.handleOnClick,class:o,HeadingProps:{class:`${o}__heading`},HeadingButtonProps:{ref:this.catchRef,class:`${o}__heading-button`},ContentProps:{class:`${o}__content`,wrapperClass:`${o}__wrapper`,animationClass:`${o}__wrapper-animation`}};return h(KolCollapsibleFc,Object.assign({key:"0d338813cf8d96de3d979be8c701ec2cbb623317"},a),h("slot",{key:"16ef50a83d37f7adbe4881202c48909078ddc135"}))}validateDisabled(n){validateDisabled(this,n)}validateLabel(n){validateLabel(this,n,{required:!0})}validateLevel(n){watchHeadingLevel(this,n)}validateOn(n){validateAccordionCallbacks(this,n)}validateOpen(n){validateOpen(this,n)}componentWillLoad(){this.validateDisabled(this._disabled),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateOpen(this._open)}static get watchers(){return{_disabled:["validateDisabled"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_open:["validateOpen"]}}static get style(){return{default:KolAccordionDefaultStyle0}}},[33,"kol-accordion",{_disabled:[4],_label:[1],_level:[2],_on:[16],_open:[1540],state:[32],focus:[64],kolFocus:[64]},void 0,{_disabled:["validateDisabled"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_open:["validateOpen"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-accordion"].forEach((n=>{if("kol-accordion"===n)customElements.get(n)||customElements.define(n,KolAccordion$1)}))}const KolAccordion=KolAccordion$1,defineCustomElement=defineCustomElement$1;export{KolAccordion,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-accordion.js","mappings":";;;;;;;;;;;;AAkBO,MAAM,0BAA0B,GAAG,CAAC,SAAoC,EAAE,KAA2C;IAC3H,cAAc,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,IAAI,GAAG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CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAccordion"],"sources":["src/schema/props/accordion-callbacks.ts","src/components/accordion/style.scss?tag=kol-accordion&mode=default&encapsulation=shadow","src/components/accordion/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { Events } from '../enums';\nimport type { EventValueOrEventCallback } from '../types/callbacks';\nimport { watchValidator } from '../utils';\n\n/* types */\nexport type AccordionCallbacksPropType<T> = {\n\t[Events.onClick]?: EventValueOrEventCallback<MouseEvent, T>;\n};\n\n/**\n * Defines the callback functions for accordion events.\n */\nexport type PropAccordionCallbacks<T> = {\n\ton: AccordionCallbacksPropType<T>;\n};\n\n/* validator */\nexport const validateAccordionCallbacks = (component: Generic.Element.Component, value?: AccordionCallbacksPropType<boolean>): void => {\n\twatchValidator(component, `_on`, (value) => typeof value === 'object' && value !== null, new Set(['AccordionCallbacksPropType {Events.onClick}']), value);\n};\n","@import '../@shared/mixins';\n@import '../style';\n@import '../host-display-block';\n@import '../../functional-components/Collapsible/collapsible';\n\n@layer kol-component {\n\t.kol-accordion {\n\t\tfont-size: rem(16);\n\t}\n}\n","// https://codepen.io/mbxtr/pen/OJPOYg?html-preprocessor=haml\nimport { Component, h, Method, Prop, State, Watch } from '@stencil/core';\nimport type { JSX } from '@stencil/core';\nimport type {\n\tAccordionAPI,\n\tAccordionStates,\n\tAccordionCallbacksPropType,\n\tDisabledPropType,\n\tFocusableElement,\n\tHeadingLevel,\n\tLabelPropType,\n\tOpenPropType,\n} from '../../schema';\nimport { featureHint, validateAccordionCallbacks, validateDisabled, validateLabel, validateOpen } from '../../schema';\nimport { nonce } from '../../utils/dev.utils';\nimport { watchHeadingLevel } from '../heading/validation';\nimport KolCollapsibleFc, { type CollapsibleProps } from '../../functional-components/Collapsible';\n\nfeatureHint(`[KolAccordion] Anfrage nach einer KolAccordionGroup bei dem immer nur ein Accordion geöffnet ist.\n\n- onClick auf der KolAccordion anwenden\n- Click-Event prüft den _open-Status der Accordions\n- Logik Öffnet und Schließt entsprechend`);\nfeatureHint(`[KolAccordion] Tab-Sperre des Inhalts im geschlossenen Zustand.`);\n\n/**\n *\n * @slot - Ermöglicht das Einfügen beliebigen HTML's in den Inhaltsbereich des Accordions.\n */\n@Component({\n\ttag: 'kol-accordion',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolAccordion implements AccordionAPI, FocusableElement {\n\tprivate readonly nonce = nonce();\n\tprivate buttonWcRef?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.buttonWcRef = ref;\n\t};\n\n\t/**\n\t * @deprecated Use kolFocus instead.\n\t */\n\t@Method()\n\tpublic async focus() {\n\t\tawait this.kolFocus();\n\t}\n\n\t@Method()\n\tpublic async kolFocus() {\n\t\tawait this.buttonWcRef?.kolFocus();\n\t}\n\n\tprivate handleOnClick = (event: MouseEvent) => {\n\t\tthis._open = !this._open;\n\n\t\t/**\n\t\t * Der Timeout wird benötigt, damit das Event\n\t\t * vom Button- auf das Accordion-Event wechselt.\n\t\t * So ist es dem Anwendenden möglich das _open-\n\t\t * Attribute abzufragen.\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\tthis.state._on?.onClick?.(event, this._open === true);\n\t\t});\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { _open, _label, _disabled, _level } = this.state;\n\t\tconst rootClass = 'kol-accordion';\n\n\t\tconst props: CollapsibleProps = {\n\t\t\tid: this.nonce,\n\t\t\tlabel: _label,\n\t\t\topen: _open,\n\t\t\tdisabled: _disabled,\n\t\t\tlevel: _level,\n\t\t\tonClick: this.handleOnClick,\n\t\t\tclass: rootClass,\n\t\t\tHeadingProps: { class: `${rootClass}__heading` },\n\t\t\tHeadingButtonProps: {\n\t\t\t\tref: this.catchRef,\n\t\t\t\tclass: `${rootClass}__heading-button`,\n\t\t\t},\n\t\t\tContentProps: {\n\t\t\t\tclass: `${rootClass}__content`,\n\t\t\t\twrapperClass: `${rootClass}__wrapper`,\n\t\t\t\tanimationClass: `${rootClass}__wrapper-animation`,\n\t\t\t},\n\t\t};\n\n\t\treturn (\n\t\t\t<KolCollapsibleFc {...props}>\n\t\t\t\t<slot />\n\t\t\t</KolCollapsibleFc>\n\t\t);\n\t}\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\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 which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen an.\n\t */\n\t@Prop() public _on?: AccordionCallbacksPropType<boolean>;\n\n\t/**\n\t * If set (to true) opens/expands the element, closes if not set (or set to false).\n\t * @TODO: Change type back to `OpenPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _open?: boolean = false;\n\n\t@State() public state: AccordionStates = {\n\t\t_label: '', // ⚠ required\n\t\t_level: 1,\n\t\t_on: {},\n\t};\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: DisabledPropType): void {\n\t\tvalidateDisabled(this, value);\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\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(on?: AccordionCallbacksPropType<boolean>): void {\n\t\tvalidateAccordionCallbacks(this, on);\n\t}\n\n\t@Watch('_open')\n\tpublic validateOpen(value?: OpenPropType): void {\n\t\tvalidateOpen(this, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateDisabled(this._disabled);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateOpen(this._open);\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
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{w as watchHeadingLevel}from"./validation.js";import{K as KolAlertFc}from"./Alert.js";import{v as validateHasCloser}from"./has-closer.js";import{c as watchBoolean,s as setState,w as watchValidator}from"./prop.validators.js";import{v as validateLabel}from"./label.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],KolAlertWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e,t;null===(t=null===(e=this._on)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e,new Event("Close"))},this.handleAlertTimeout=()=>{this.validateAlert(!1)},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){const{_alert:e,_hasCloser:t,_label:a,_level:l,_type:i,_variant:s}=this.state,o={alert:e,hasCloser:t,label:a,level:l,type:i,variant:s,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return h(KolAlertFc,Object.assign({key:"ba6363b8cd8734edafa4fbd9f13f2cc9fd843daf"},o),h("slot",{key:"809bee8da04a4a666137fdbb101745d5797af17d"}))}validateAlert(e){watchBoolean(this,"_alert",e)}validateHasCloser(e){validateHasCloser(this,e)}validateLabel(e){validateLabel(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateOn(e){this.validateOnValue(e)&&setState(this,"_on",{onClose:e.onClose})}validateType(e){watchValidator(this,"_type",(e=>"string"==typeof e&&alertTypeOptions.includes(e)),new Set(`String {${alertTypeOptions.join(", ")}`),e)}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&alertVariantOptions.includes(e)),new Set(`AlertVariant {${alertVariantOptions.join(", ")}`),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},[4,"kol-alert-wc",{_alert:[4],_hasCloser:[4,"_has-closer"],_label:[1],_level:[2],_on:[16],_type:[1],_variant:[1],state:[32]},void 0,{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-alert-wc"].forEach((e=>{if("kol-alert-wc"===e)customElements.get(e)||customElements.define(e,KolAlertWc$1)}))}const KolAlertWc=KolAlertWc$1,defineCustomElement=defineCustomElement$1;export{KolAlertWc,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-alert-wc.js","mappings":";;;;;;;;;;AAKO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAGrF,MAAM,mBAAmB,GAAG,C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iB;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAlertWc"],"sources":["src/schema/components/alert.ts","src/components/alert/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { HeadingLevel, PropAlert, PropHasCloser, PropLabel } from '../props';\nimport type { EventCallback } from '../types';\n\nexport const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'] as const;\nexport type AlertType = (typeof alertTypeOptions)[number];\n\nexport const alertVariantOptions = ['card', 'msg'] as const;\nexport type AlertVariant = (typeof alertVariantOptions)[number];\n\nexport type KoliBriAlertEventCallbacks = {\n\tonClose?: EventCallback<Event>;\n};\n\ntype RequiredAlertProps = NonNullable<unknown>;\ntype OptionalAlertProps = {\n\tlevel: HeadingLevel;\n\ton: KoliBriAlertEventCallbacks;\n\ttype: AlertType;\n\tvariant: AlertVariant;\n} & PropLabel &\n\tPropAlert &\n\tPropHasCloser;\n\ntype RequiredAlertStates = RequiredAlertProps;\ntype OptionalAlertStates = OptionalAlertProps;\n\nexport type InternalAlertProps = RequiredAlertProps & OptionalAlertProps;\n\nexport type AlertProps = Generic.Element.Members<RequiredAlertProps, OptionalAlertProps>;\nexport type AlertStates = Generic.Element.Members<RequiredAlertStates, OptionalAlertStates>;\nexport type AlertAPI = Generic.Element.ComponentApi<RequiredAlertProps, OptionalAlertProps, RequiredAlertStates, OptionalAlertStates>;\n","import type { JSX } from '@stencil/core';\nimport { alertTypeOptions, alertVariantOptions, setState, validateHasCloser, validateLabel, watchBoolean, watchValidator } from '../../schema';\nimport { Component, h, Prop, State, Watch } from '@stencil/core';\nimport { watchHeadingLevel } from '../heading/validation';\nimport type { AlertAPI, AlertStates, AlertType, AlertVariant, HasCloserPropType, HeadingLevel, KoliBriAlertEventCallbacks, LabelPropType } from '../../schema';\nimport KolAlertFc, { type KolAlertFcProps } from '../../functional-components/Alert';\n\n/**\n * @internal\n * @slot - Der Inhalt der Meldung.\n */\n@Component({\n\ttag: 'kol-alert-wc',\n\tshadow: false,\n})\nexport class KolAlertWc implements AlertAPI {\n\tprivate readonly close = () => {\n\t\tthis._on?.onClose?.(new Event('Close'));\n\t};\n\n\tprivate readonly handleAlertTimeout = () => {\n\t\tthis.validateAlert(false);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { _alert, _hasCloser, _label, _level, _type, _variant } = this.state;\n\n\t\tconst props: KolAlertFcProps = {\n\t\t\talert: _alert,\n\t\t\thasCloser: _hasCloser,\n\t\t\tlabel: _label,\n\t\t\tlevel: _level,\n\t\t\ttype: _type,\n\t\t\tvariant: _variant,\n\t\t\tonCloserClick: this.close,\n\t\t\tonAlertTimeout: this.handleAlertTimeout,\n\t\t};\n\n\t\treturn (\n\t\t\t<KolAlertFc {...props}>\n\t\t\t\t<slot />\n\t\t\t</KolAlertFc>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop() public _alert?: boolean = false;\n\n\t/**\n\t * Defines whether the element can be closed.\n\t * @TODO: Change type back to `HasCloserPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCloser?: boolean = false;\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/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Alerts an.\n\t */\n\t@Prop() public _on?: KoliBriAlertEventCallbacks;\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: AlertType = 'default';\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: AlertVariant = 'msg';\n\n\t@State() public state: AlertStates = {\n\t\t_level: 1,\n\t};\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this, '_alert', value);\n\t}\n\n\t@Watch('_hasCloser')\n\tpublic validateHasCloser(value?: HasCloserPropType): void {\n\t\tvalidateHasCloser(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\tprivate validateOnValue = (value: unknown): boolean =>\n\t\ttypeof value === 'object' && value !== null && typeof (value as KoliBriAlertEventCallbacks).onClose === 'function';\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriAlertEventCallbacks): void {\n\t\tif (this.validateOnValue(value)) {\n\t\t\tsetState<KoliBriAlertEventCallbacks>(\n\t\t\t\tthis,\n\t\t\t\t'_on',\n\t\t\t\t{\n\t\t\t\t\tonClose: (value as KoliBriAlertEventCallbacks).onClose,\n\t\t\t\t},\n\t\t\t\t// {\n\t\t\t\t// \tafterPatch: (value: unknown) => {\n\t\t\t\t// \t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t\t// \t},\n\t\t\t\t// }\n\t\t\t);\n\t\t\t// } else {\n\t\t\t// \tsetState<KoliBriAlertEventCallbacks>(this, '_on', null, {\n\t\t\t// \t\tafterPatch: (value: unknown) => {\n\t\t\t// \t\t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t// \t\t},\n\t\t\t// \t});\n\t\t}\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: AlertType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_type',\n\t\t\t(value?) => typeof value === 'string' && alertTypeOptions.includes(value),\n\t\t\tnew Set(`String {${alertTypeOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: AlertVariant): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_variant',\n\t\t\t(value?) => typeof value === 'string' && alertVariantOptions.includes(value),\n\t\t\tnew Set(`AlertVariant {${alertVariantOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this._alert);\n\t\tthis.validateHasCloser(this._hasCloser);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateType(this._type);\n\t\tthis.validateVariant(this._variant);\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
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{b as KolAlertWcTag}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 /*\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 :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip-wc {\n display: contents;\n }\n .kol-tooltip-wc .tooltip-floating {\n animation-duration: 0.5s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n /* Shared between content and arrow */\n .kol-tooltip-wc .tooltip-area {\n background-color: #fff;\n color: #000;\n }\n .kol-tooltip-wc .tooltip-arrow {\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip-wc .tooltip-content {\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__close-button {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}",KolAlertDefaultStyle0=defaultStyleCss,KolAlert$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){return h(KolAlertWcTag,{key:"bf0dcf3d99c23b32dce354988410b4e0534cce82",_alert:this._alert,_hasCloser:this._hasCloser,_label:this._label,_level:this._level,_on:this._on,_type:this._type,_variant:this._variant},h("slot",{key:"1248b1be19f50c8c2e33e234fd3c5aba760f866a"}))}static get style(){return{default:KolAlertDefaultStyle0}}},[33,"kol-alert",{_alert:[4],_hasCloser:[4,"_has-closer"],_label:[1],_level:[2],_on:[16],_type:[1],_variant:[1],state:[32]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-alert"].forEach((n=>{if("kol-alert"===n)customElements.get(n)||customElements.define(n,KolAlert$1)}))}const KolAlert=KolAlert$1,defineCustomElement=defineCustomElement$1;export{KolAlert,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-alert.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,
|
1
|
+
{"file":"kol-alert.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,u4LAAu4L,CAAC;AACh6L,8BAAe,eAAe;;MCcjBA,UAAQ;;;;;sBAoBc,KAAK;0BAMD,KAAK;;sBAUJ,CAAC;;qBAUL,SAAS;wBAKH,KAAK;qBAET;YACpC,MAAM,EAAE,CAAC;SACT;;IAtDM,MAAM;QACZ,QACC,EAAC,aAAa,qDACb,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAEvB,8DAAQ,CACO,EACf;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAlert"],"sources":["src/components/alert/style.scss?tag=kol-alert&mode=default&encapsulation=shadow","src/components/alert/shadow.tsx"],"sourcesContent":["@import '../@shared/mixins';\n@import '../style';\n@import '../@shared/kol-alert-mixin';\n\n@layer kol-component {\n\t.kol-alert {\n\t\tfont-size: rem(16);\n\t}\n}\n\n@include kol-alert-styles;\n","import type { AlertProps, AlertStates, AlertType, AlertVariant, HeadingLevel, KoliBriAlertEventCallbacks, LabelPropType } from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, h, Prop, State } from '@stencil/core';\nimport { KolAlertWcTag } from '../../core/component-names';\n\n/**\n * @slot - Der Inhalt der Meldung.\n */\n@Component({\n\ttag: 'kol-alert',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolAlert implements AlertProps {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolAlertWcTag\n\t\t\t\t_alert={this._alert}\n\t\t\t\t_hasCloser={this._hasCloser}\n\t\t\t\t_label={this._label}\n\t\t\t\t_level={this._level}\n\t\t\t\t_on={this._on}\n\t\t\t\t_type={this._type}\n\t\t\t\t_variant={this._variant}\n\t\t\t>\n\t\t\t\t<slot />\n\t\t\t</KolAlertWcTag>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop() public _alert?: boolean = false;\n\n\t/**\n\t * Defines whether the element can be closed.\n\t * @TODO: Change type back to `HasCloserPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCloser?: boolean = false;\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/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 1;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Alerts an.\n\t */\n\t@Prop() public _on?: KoliBriAlertEventCallbacks;\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: AlertType = 'default';\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: AlertVariant = 'msg';\n\n\t@State() public state: AlertStates = {\n\t\t_level: 1,\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
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{v as validateImageSource}from"./image-source.js";import{v as validateLabel}from"./label.js";const formatNameAsInitial=a=>0===a.length?"":a[0].toUpperCase(),formatLabelAsInitials=a=>{const t=a.split(/\s+/),e=t.at(0),l=t.at(-1);return t.length>=2&&e&&l?`${formatNameAsInitial(e)}${formatNameAsInitial(l)}`:formatNameAsInitial(a)},KolAvatarWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this._src=void 0,this._label=void 0,this.state={_src:"",_label:""}}render(){return h("div",{key:"3343b9da0025b1db79bc3353197ed57e1ea15624","aria-label":translate("kol-avatar-alt",{placeholders:{name:this.state._label}}),class:"kol-avatar",role:"img"},this.state._src?h("img",{alt:"","aria-hidden":"true",class:"kol-avatar__image",src:this.state._src}):h("span",{"aria-hidden":"true",class:"kol-avatar__initials"},formatLabelAsInitials(this.state._label.trim())))}validateSrc(a){validateImageSource(this,a)}validateLabel(a){validateLabel(this,a,{required:!0})}componentWillLoad(){this.validateSrc(this._src),this.validateLabel(this._label)}static get watchers(){return{_src:["validateSrc"],_label:["validateLabel"]}}},[0,"kol-avatar-wc",{_src:[1],_label:[1],state:[32]},void 0,{_src:["validateSrc"],_label:["validateLabel"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-avatar-wc"].forEach((a=>{if("kol-avatar-wc"===a)customElements.get(a)||customElements.define(a,KolAvatarWc$1)}))}const KolAvatarWc=KolAvatarWc$1,defineCustomElement=defineCustomElement$1;export{KolAvatarWc,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-avatar-wc.js","mappings":";;;;;;;;AAAA,MAAM,mBAAmB,GAAG,CAAC,IAAY;IACxC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,EAAE,CAAC;KACV;IAED,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAAa;IAClD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAG1B,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,EAAE;QACvC,OAAO,GAAG,mBAAmB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;KACnE;IAED,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;;MCHYA,aAAW;;;;;;
|
1
|
+
{"file":"kol-avatar-wc.js","mappings":";;;;;;;;AAAA,MAAM,mBAAmB,GAAG,CAAC,IAAY;IACxC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,OAAO,EAAE,CAAC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AC,KAAqB;QACzC,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;YAC1B,QAAQ,EAAE,IAAI;SACd,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAvatarWc"],"sources":["src/components/avatar/controller.ts","src/components/avatar/component.tsx"],"sourcesContent":["const formatNameAsInitial = (name: string): string => {\n\tif (name.length === 0) {\n\t\treturn '';\n\t}\n\n\treturn name[0].toUpperCase();\n};\n\nexport const formatLabelAsInitials = (label: string): string => {\n\tconst names = label.split(/\\s+/); // split by any whitespace characters\n\tconst first = names.at(0);\n\tconst last = names.at(-1);\n\n\t// names might consist of only one word\n\tif (names.length >= 2 && first && last) {\n\t\treturn `${formatNameAsInitial(first)}${formatNameAsInitial(last)}`;\n\t}\n\n\treturn formatNameAsInitial(label);\n};\n","import type { JSX } from '@stencil/core';\nimport { validateImageSource, validateLabel } from '../../schema';\nimport { Component, h, Prop, State, Watch } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { formatLabelAsInitials } from './controller';\n\nimport type { AvatarAPI, AvatarStates, ImageSourcePropType, LabelPropType } from '../../schema';\n\n/**\n * @internal\n */\n@Component({\n\ttag: 'kol-avatar-wc',\n\tshadow: false,\n})\nexport class KolAvatarWc implements AvatarAPI {\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<div aria-label={translate('kol-avatar-alt', { placeholders: { name: this.state._label } })} class=\"kol-avatar\" role=\"img\">\n\t\t\t\t{this.state._src ? (\n\t\t\t\t\t<img alt=\"\" aria-hidden=\"true\" class=\"kol-avatar__image\" src={this.state._src} />\n\t\t\t\t) : (\n\t\t\t\t\t<span aria-hidden=\"true\" class=\"kol-avatar__initials\">\n\t\t\t\t\t\t{formatLabelAsInitials(this.state._label.trim())}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n\n\t/**\n\t * Sets the image `src` attribute to the given string.\n\t */\n\t@Prop() public _src?: ImageSourcePropType;\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: AvatarStates = {\n\t\t_src: '',\n\t\t_label: '', // ⚠ required\n\t};\n\n\t@Watch('_src')\n\tpublic validateSrc(value?: ImageSourcePropType): void {\n\t\tvalidateImageSource(this, value);\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.validateSrc(this._src);\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{proxyCustomElement,HTMLElement,h
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{d as KolAvatarWcTag}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 /*\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 :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-avatar {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n border-radius: 50%;\n overflow: hidden;\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n /*theme?*/\n width: calc(100rem / var(--kolibri-root-font-size, 16));\n height: calc(100rem / var(--kolibri-root-font-size, 16));\n }\n .kol-avatar__image {\n width: 100%;\n height: 100%;\n }\n .kol-avatar__initials {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n /*theme?*/\n background-color: #d3d3d3;\n font-size: calc(40rem / var(--kolibri-root-font-size, 16));\n }\n}",KolAvatarDefaultStyle0=defaultStyleCss,KolAvatar$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._src=void 0,this._label=void 0}render(){return h(KolAvatarWcTag,{key:"f4a53843b92e2d4a0fb20cec4b5b9f23f962a483",_src:this._src,_label:this._label})}static get style(){return{default:KolAvatarDefaultStyle0}}},[33,"kol-avatar",{_src:[1],_label:[1]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-avatar"].forEach((n=>{if("kol-avatar"===n)customElements.get(n)||customElements.define(n,KolAvatar$1)}))}const KolAvatar=KolAvatar$1,defineCustomElement=defineCustomElement$1;export{KolAvatar,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-avatar.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,
|
1
|
+
{"file":"kol-avatar.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,64JAA64J,CAAC;AACt6J,+BAAe,eAAe;;MCYjBA,WAAS;;;;;;;;IACd,MAAM;QACZ,OAAO,EAAC,cAAc,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAmB,CAAC;KAC/E;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAvatar"],"sources":["src/components/avatar/style.scss?tag=kol-avatar&mode=default&encapsulation=shadow","src/components/avatar/shadow.tsx"],"sourcesContent":["@import '../@shared/mixins';\n@import '../style';\n@import '../host-display-block';\n\n@layer kol-component {\n\t.kol-avatar {\n\t\tfont-size: rem(16);\n\t\tborder-radius: 50%;\n\t\toverflow: hidden;\n\t\t/* Visible with forced colors */\n\t\toutline: transparent solid rem(1);\n\t\t/*theme?*/\n\t\twidth: rem(100);\n\t\theight: rem(100);\n\n\t\t&__image {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\n\t\t&__initials {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\t/*theme?*/\n\t\t\tbackground-color: #d3d3d3;\n\t\t\tfont-size: rem(40);\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, h, Prop } from '@stencil/core';\n\nimport type { AvatarProps } from '../../schema';\nimport { KolAvatarWcTag } from '../../core/component-names';\n\n@Component({\n\ttag: 'kol-avatar',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolAvatar implements AvatarProps {\n\tpublic render(): JSX.Element {\n\t\treturn <KolAvatarWcTag _src={this._src} _label={this._label}></KolAvatarWcTag>;\n\t}\n\n\t/**\n\t * Sets the image `src` attribute to the given string.\n\t */\n\t@Prop() public _src?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: string;\n}\n"],"version":3}
|