@public-ui/components 3.0.0-rc.3 → 3.0.0-rc.4
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 +78 -94
- package/dist/cjs/{Alert-c27de938.js → Alert-d3173bbc.js} +1 -1
- package/dist/cjs/{Alert-c27de938.js.map → Alert-d3173bbc.js.map} +1 -1
- package/dist/cjs/{Collapsible-55fa3efa.js → Collapsible-4b03ba6d.js} +1 -1
- package/dist/cjs/{Collapsible-55fa3efa.js.map → Collapsible-4b03ba6d.js.map} +1 -1
- package/dist/cjs/CustomSuggestionsOptionsGroup-63905604.js +4 -0
- package/dist/cjs/CustomSuggestionsOptionsGroup-63905604.js.map +1 -0
- package/dist/cjs/FieldControlStateWrapper-6bafd228.js +4 -0
- package/dist/cjs/FieldControlStateWrapper-6bafd228.js.map +1 -0
- package/dist/cjs/FormFieldMsg-370f014e.js +4 -0
- package/dist/cjs/FormFieldMsg-370f014e.js.map +1 -0
- package/dist/cjs/{Heading-3ca40a2f.js → Heading-f5dd89a7.js} +1 -1
- package/dist/cjs/{Heading-3ca40a2f.js.map → Heading-f5dd89a7.js.map} +1 -1
- package/dist/cjs/Icon-0eed071b.js +4 -0
- package/dist/cjs/{Icon-32d99aab.js.map → Icon-0eed071b.js.map} +1 -1
- package/dist/cjs/Input-766cb8ca.js +4 -0
- package/dist/cjs/Input-766cb8ca.js.map +1 -0
- package/dist/cjs/InputStateWrapper-9e99208c.js +4 -0
- package/dist/cjs/InputStateWrapper-9e99208c.js.map +1 -0
- package/dist/cjs/InternalUnderlinedBadgeText-58120685.js +4 -0
- package/dist/cjs/InternalUnderlinedBadgeText-58120685.js.map +1 -0
- package/dist/cjs/Span-722fdf09.js +4 -0
- package/dist/cjs/Span-722fdf09.js.map +1 -0
- package/dist/cjs/{app-globals-f0632f5b.js → app-globals-916df316.js} +1 -1
- package/dist/cjs/{app-globals-f0632f5b.js.map → app-globals-916df316.js.map} +1 -1
- package/dist/cjs/component-names-cf0c0d8a.js +4 -0
- package/dist/cjs/component-names-cf0c0d8a.js.map +1 -0
- package/dist/cjs/controller-111255ac.js +4 -0
- package/dist/cjs/{controller-38fc5879.js.map → controller-111255ac.js.map} +1 -1
- package/dist/cjs/{controller-c8cdb299.js → controller-14077cbb.js} +1 -1
- package/dist/cjs/{controller-c8cdb299.js.map → controller-14077cbb.js.map} +1 -1
- package/dist/cjs/{controller-7c927f9c.js → controller-a9e3b9a8.js} +1 -1
- package/dist/cjs/{controller-7c927f9c.js.map → controller-a9e3b9a8.js.map} +1 -1
- package/dist/cjs/{controller-b5cf9699.js → controller-c17a58e8.js} +1 -1
- package/dist/cjs/{controller-b5cf9699.js.map → controller-c17a58e8.js.map} +1 -1
- package/dist/cjs/controller-icon-4cb3d925.js +4 -0
- package/dist/cjs/controller-icon-4cb3d925.js.map +1 -0
- package/dist/cjs/{dev.utils-3a47cd09.js → dev.utils-c561d218.js} +1 -1
- package/dist/cjs/{dev.utils-3a47cd09.js.map → dev.utils-c561d218.js.map} +1 -1
- package/dist/cjs/{devtools-91a85d36.js → devtools-d8ea3563.js} +1 -1
- package/dist/cjs/{devtools-91a85d36.js.map → devtools-d8ea3563.js.map} +1 -1
- package/dist/cjs/getRenderStates-3c874ec5.js +4 -0
- package/dist/cjs/getRenderStates-3c874ec5.js.map +1 -0
- package/dist/cjs/index-07fcbac9.js +4 -0
- package/dist/cjs/{index-3b0357df.js.map → index-07fcbac9.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-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.cjs.entry.js +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-button-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-button-wc.cjs.entry.js.map +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-card.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-heading.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-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-table-stateful.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-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-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js.map +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/test-component.cjs.entry.js +1 -1
- package/dist/components/CustomSuggestionsOptionsGroup.js +4 -0
- package/dist/components/CustomSuggestionsOptionsGroup.js.map +1 -0
- package/dist/components/FieldControlStateWrapper.js +1 -1
- package/dist/components/FormFieldMsg.js +1 -1
- package/dist/components/FormFieldMsg.js.map +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/InputContainerStateWrapper.js +1 -1
- package/dist/components/InputContainerStateWrapper.js.map +1 -1
- package/dist/components/InputStateWrapper.js +1 -1
- package/dist/components/InputStateWrapper.js.map +1 -1
- package/dist/components/InternalUnderlinedBadgeText.js +1 -1
- package/dist/components/InternalUnderlinedBadgeText.js.map +1 -1
- package/dist/components/Span.js +1 -1
- package/dist/components/Span.js.map +1 -1
- package/dist/components/component-names.js +1 -1
- package/dist/components/component-names.js.map +1 -1
- package/dist/components/controller2.js +1 -1
- package/dist/components/controller2.js.map +1 -1
- package/dist/components/controller3.js +1 -1
- package/dist/components/controller3.js.map +1 -1
- package/dist/components/controller4.js +1 -1
- package/dist/components/controller4.js.map +1 -1
- package/dist/components/getRenderStates.js +1 -1
- package/dist/components/getRenderStates.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-card.js +1 -1
- package/dist/components/kol-card.js.map +1 -1
- package/dist/components/kol-combobox.js +1 -1
- package/dist/components/kol-combobox.js.map +1 -1
- package/dist/components/kol-details.js +1 -1
- package/dist/components/kol-details.js.map +1 -1
- package/dist/components/kol-form.js +1 -1
- package/dist/components/kol-form.js.map +1 -1
- package/dist/components/kol-heading.js +1 -1
- package/dist/components/kol-heading.js.map +1 -1
- package/dist/components/kol-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-link-button.js +1 -1
- package/dist/components/kol-link.js +1 -1
- package/dist/components/kol-modal.js +1 -1
- package/dist/components/kol-modal.js.map +1 -1
- package/dist/components/kol-nav.js +1 -1
- package/dist/components/kol-pagination.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-table-stateful.js +1 -1
- package/dist/components/kol-table-stateful.js.map +1 -1
- package/dist/components/kol-table-stateless-wc.js +1 -1
- package/dist/components/kol-table-stateless-wc.js.map +1 -1
- package/dist/components/kol-table-stateless.js +1 -1
- package/dist/components/kol-table-stateless.js.map +1 -1
- package/dist/components/kol-tabs.js +1 -1
- package/dist/components/kol-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-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/esm/{Alert-130db08c.js → Alert-080adf2e.js} +1 -1
- package/dist/esm/{Alert-130db08c.js.map → Alert-080adf2e.js.map} +1 -1
- package/dist/esm/{Collapsible-ec3d6bd1.js → Collapsible-cc9fb8f0.js} +1 -1
- package/dist/esm/{Collapsible-ec3d6bd1.js.map → Collapsible-cc9fb8f0.js.map} +1 -1
- package/dist/esm/CustomSuggestionsOptionsGroup-1505a9ba.js +4 -0
- package/dist/esm/CustomSuggestionsOptionsGroup-1505a9ba.js.map +1 -0
- package/dist/esm/FieldControlStateWrapper-5432d9b6.js +4 -0
- package/dist/esm/{FieldControlStateWrapper-5e88de58.js.map → FieldControlStateWrapper-5432d9b6.js.map} +1 -1
- package/dist/esm/FormFieldMsg-1ed3f51d.js +4 -0
- package/dist/esm/FormFieldMsg-1ed3f51d.js.map +1 -0
- package/dist/esm/{Heading-401912a9.js → Heading-0459992b.js} +1 -1
- package/dist/esm/{Heading-401912a9.js.map → Heading-0459992b.js.map} +1 -1
- package/dist/esm/Icon-936c5cfc.js +4 -0
- package/dist/esm/{Icon-0a8aaa01.js.map → Icon-936c5cfc.js.map} +1 -1
- package/dist/esm/Input-40160769.js +4 -0
- package/dist/esm/{Input-199b40e8.js.map → Input-40160769.js.map} +1 -1
- package/dist/esm/InputStateWrapper-e1a2298b.js +4 -0
- package/dist/esm/InputStateWrapper-e1a2298b.js.map +1 -0
- package/dist/esm/InternalUnderlinedBadgeText-22278de8.js +4 -0
- package/dist/esm/InternalUnderlinedBadgeText-22278de8.js.map +1 -0
- package/dist/esm/Span-97af2595.js +4 -0
- package/dist/esm/Span-97af2595.js.map +1 -0
- package/dist/esm/{app-globals-3f2c3965.js → app-globals-1242eb39.js} +1 -1
- package/dist/esm/{app-globals-3f2c3965.js.map → app-globals-1242eb39.js.map} +1 -1
- package/dist/esm/component-names-a18a51c8.js +4 -0
- package/dist/esm/component-names-a18a51c8.js.map +1 -0
- package/dist/esm/{controller-e3f702f2.js → controller-002a86ad.js} +1 -1
- package/dist/esm/{controller-e3f702f2.js.map → controller-002a86ad.js.map} +1 -1
- package/dist/esm/{controller-73c1e790.js → controller-502cff08.js} +1 -1
- package/dist/esm/{controller-73c1e790.js.map → controller-502cff08.js.map} +1 -1
- package/dist/esm/controller-e699ee47.js +4 -0
- package/dist/esm/{controller-fae9f200.js.map → controller-e699ee47.js.map} +1 -1
- package/dist/esm/{controller-4075dfc7.js → controller-eb6f1a77.js} +1 -1
- package/dist/esm/{controller-4075dfc7.js.map → controller-eb6f1a77.js.map} +1 -1
- package/dist/esm/controller-icon-4be72f9f.js +4 -0
- package/dist/esm/controller-icon-4be72f9f.js.map +1 -0
- package/dist/esm/{dev.utils-a3bfded4.js → dev.utils-b9e6a3e1.js} +1 -1
- package/dist/esm/{dev.utils-a3bfded4.js.map → dev.utils-b9e6a3e1.js.map} +1 -1
- package/dist/esm/{devtools-eb468601.js → devtools-5850e9b1.js} +1 -1
- package/dist/esm/{devtools-eb468601.js.map → devtools-5850e9b1.js.map} +1 -1
- package/dist/esm/getRenderStates-a7a33541.js +4 -0
- package/dist/esm/getRenderStates-a7a33541.js.map +1 -0
- package/dist/esm/index-91489a9f.js +4 -0
- package/dist/esm/{index-095473f8.js.map → index-91489a9f.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-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.entry.js +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-button-link.entry.js +1 -1
- package/dist/esm/kol-button-wc.entry.js +1 -1
- package/dist/esm/kol-button-wc.entry.js.map +1 -1
- package/dist/esm/kol-button.entry.js +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-card.entry.js.map +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js.map +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-details.entry.js.map +1 -1
- package/dist/esm/kol-drawer.entry.js +1 -1
- package/dist/esm/kol-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-heading.entry.js.map +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-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-wc.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js.map +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js.map +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-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-table-stateful.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js.map +1 -1
- package/dist/esm/kol-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-toolbar.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js.map +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/test-component.entry.js +1 -1
- package/dist/kolibri/{Alert-130db08c.js → Alert-080adf2e.js} +1 -1
- package/dist/kolibri/{Collapsible-ec3d6bd1.js → Collapsible-cc9fb8f0.js} +1 -1
- package/dist/kolibri/CustomSuggestionsOptionsGroup-1505a9ba.js +4 -0
- package/dist/kolibri/CustomSuggestionsOptionsGroup-1505a9ba.js.map +1 -0
- package/dist/kolibri/FieldControlStateWrapper-5432d9b6.js +4 -0
- package/dist/kolibri/{FieldControlStateWrapper-5e88de58.js.map → FieldControlStateWrapper-5432d9b6.js.map} +1 -1
- package/dist/kolibri/FormFieldMsg-1ed3f51d.js +4 -0
- package/dist/kolibri/FormFieldMsg-1ed3f51d.js.map +1 -0
- package/dist/kolibri/{Heading-401912a9.js → Heading-0459992b.js} +1 -1
- package/dist/kolibri/Icon-936c5cfc.js +4 -0
- package/dist/kolibri/Input-40160769.js +4 -0
- package/dist/kolibri/{Input-199b40e8.js.map → Input-40160769.js.map} +1 -1
- package/dist/kolibri/InputStateWrapper-e1a2298b.js +4 -0
- package/dist/kolibri/InputStateWrapper-e1a2298b.js.map +1 -0
- package/dist/kolibri/InternalUnderlinedBadgeText-22278de8.js +4 -0
- package/dist/kolibri/InternalUnderlinedBadgeText-22278de8.js.map +1 -0
- package/dist/kolibri/Span-97af2595.js +4 -0
- package/dist/kolibri/{Span-13852fea.js.map → Span-97af2595.js.map} +1 -1
- package/dist/kolibri/app-globals-1242eb39.js +4 -0
- package/dist/kolibri/component-names-a18a51c8.js +4 -0
- package/dist/kolibri/component-names-a18a51c8.js.map +1 -0
- package/dist/kolibri/{controller-e3f702f2.js → controller-002a86ad.js} +1 -1
- package/dist/kolibri/{controller-73c1e790.js → controller-502cff08.js} +1 -1
- package/dist/kolibri/controller-e699ee47.js +4 -0
- package/dist/kolibri/{controller-fae9f200.js.map → controller-e699ee47.js.map} +1 -1
- package/dist/kolibri/{controller-4075dfc7.js → controller-eb6f1a77.js} +1 -1
- package/dist/kolibri/controller-icon-4be72f9f.js +4 -0
- package/dist/kolibri/controller-icon-4be72f9f.js.map +1 -0
- package/dist/kolibri/{dev.utils-a3bfded4.js → dev.utils-b9e6a3e1.js} +1 -1
- package/dist/kolibri/devtools-5850e9b1.js +4 -0
- package/dist/kolibri/{devtools-eb468601.js.map → devtools-5850e9b1.js.map} +1 -1
- package/dist/kolibri/getRenderStates-a7a33541.js +4 -0
- package/dist/kolibri/getRenderStates-a7a33541.js.map +1 -0
- package/dist/kolibri/{index-095473f8.js → index-91489a9f.js} +1 -1
- package/dist/kolibri/{index-095473f8.js.map → index-91489a9f.js.map} +1 -1
- package/dist/kolibri/index.esm.js +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-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.entry.js +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-button-link.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-button-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-button.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-card.entry.js.map +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js.map +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js.map +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-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-heading.entry.js.map +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-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-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-modal.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js.map +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-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-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
- package/dist/kolibri/kol-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-toolbar.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
- package/dist/kolibri/kol-tooltip-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree-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/test-component.entry.js +1 -1
- package/dist/types/components/@deprecated/input/controller.d.ts +2 -2
- package/dist/types/components/@deprecated/input/types.d.ts +1 -1
- package/dist/types/components/combobox/shadow.d.ts +5 -3
- package/dist/types/components/form/shadow.d.ts +2 -0
- package/dist/types/components/input/component.d.ts +1 -1
- package/dist/types/components/input/types.d.ts +2 -2
- package/dist/types/components/input-checkbox/shadow.d.ts +3 -3
- package/dist/types/components/input-color/shadow.d.ts +3 -3
- package/dist/types/components/input-date/shadow.d.ts +3 -3
- package/dist/types/components/input-email/shadow.d.ts +3 -3
- package/dist/types/components/input-file/shadow.d.ts +3 -3
- package/dist/types/components/input-number/shadow.d.ts +9 -9
- package/dist/types/components/input-password/shadow.d.ts +3 -3
- package/dist/types/components/input-radio/shadow.d.ts +3 -3
- package/dist/types/components/input-range/shadow.d.ts +3 -3
- package/dist/types/components/input-text/shadow.d.ts +3 -3
- package/dist/types/components/modal/shadow.d.ts +4 -0
- package/dist/types/components/select/shadow.d.ts +3 -3
- package/dist/types/components/single-select/shadow.d.ts +5 -3
- package/dist/types/components/table-stateful/shadow.d.ts +3 -2
- package/dist/types/components/table-stateless/component.d.ts +3 -2
- package/dist/types/components/table-stateless/shadow.d.ts +3 -2
- package/dist/types/components/textarea/shadow.d.ts +3 -3
- package/dist/types/components.d.ts +180 -197
- package/dist/types/core/component-names.d.ts +0 -1
- package/dist/types/functional-component-wrappers/InputStateWrapper/InputStateWrapper.d.ts +1 -0
- package/dist/types/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.d.ts +11 -0
- package/dist/types/functional-components/CustomSuggestionsOption/index.d.ts +1 -0
- package/dist/types/functional-components/CustomSuggestionsOption/test/snapshot.test.d.ts +1 -0
- package/dist/types/functional-components/CustomSuggestionsOptionsGroup/CustomSuggestionsOptionsGroup.d.ts +7 -0
- package/dist/types/functional-components/CustomSuggestionsOptionsGroup/index.d.ts +1 -0
- package/dist/types/functional-components/CustomSuggestionsOptionsGroup/test/snapshot.test.d.ts +1 -0
- package/dist/types/functional-components/CustomSuggestionsToggle/CustomSuggestionsToggle.d.ts +7 -0
- package/dist/types/functional-components/CustomSuggestionsToggle/index.d.ts +1 -0
- package/dist/types/functional-components/CustomSuggestionsToggle/test/snapshot.test.d.ts +1 -0
- package/dist/types/functional-components/FormField/FormField.d.ts +1 -1
- package/dist/types/functional-components/FormFieldMsg/FormFieldMsg.d.ts +2 -2
- package/dist/types/schema/components/combobox.d.ts +3 -3
- package/dist/types/schema/components/index.d.ts +1 -1
- package/dist/types/schema/components/input-checkbox.d.ts +3 -3
- package/dist/types/schema/components/input-color.d.ts +3 -3
- package/dist/types/schema/components/input-date.d.ts +3 -3
- package/dist/types/schema/components/input-email.d.ts +3 -3
- package/dist/types/schema/components/input-file.d.ts +3 -3
- package/dist/types/schema/components/input-number.d.ts +4 -4
- package/dist/types/schema/components/input-password.d.ts +3 -3
- package/dist/types/schema/components/input-radio.d.ts +3 -3
- package/dist/types/schema/components/input-range.d.ts +3 -3
- package/dist/types/schema/components/input-text.d.ts +3 -3
- package/dist/types/schema/components/input.d.ts +2 -2
- package/dist/types/schema/components/modal.d.ts +3 -2
- package/dist/types/schema/components/select.d.ts +3 -3
- package/dist/types/schema/components/single-select.d.ts +3 -3
- package/dist/types/schema/components/table.d.ts +7 -7
- package/dist/types/schema/components/tableStateless.d.ts +5 -7
- package/dist/types/schema/components/textarea.d.ts +3 -3
- package/dist/types/schema/props/error-list.d.ts +1 -1
- package/dist/types/schema/props/hide-msg.d.ts +7 -0
- package/dist/types/schema/props/index.d.ts +1 -1
- package/dist/types/schema/props/min-width.d.ts +7 -0
- package/dist/types/schema/props/variant/modal.d.ts +8 -0
- package/dist/types/schema/types/table.d.ts +0 -1
- package/doc/accordion.md +1 -1
- package/doc/alert.md +1 -1
- package/doc/card.md +1 -1
- package/doc/combobox.md +1 -1
- package/doc/components.md +1 -1
- package/doc/details.md +1 -1
- package/doc/heading.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 +4 -4
- 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 +1 -1
- package/doc/modal.md +6 -5
- package/doc/select.md +1 -1
- package/doc/single-select.md +1 -1
- package/doc/table-stateful.md +12 -12
- package/doc/table-stateless.md +1 -1
- package/doc/textarea.md +1 -1
- package/package.json +1 -1
- package/vscode-custom-data.json +70 -75
- package/dist/cjs/FieldControlStateWrapper-9455d520.js +0 -4
- package/dist/cjs/FieldControlStateWrapper-9455d520.js.map +0 -1
- package/dist/cjs/FormFieldMsg-01eb416d.js +0 -4
- package/dist/cjs/FormFieldMsg-01eb416d.js.map +0 -1
- package/dist/cjs/Icon-32d99aab.js +0 -4
- package/dist/cjs/Input-a4e89629.js +0 -4
- package/dist/cjs/Input-a4e89629.js.map +0 -1
- package/dist/cjs/InputContainerStateWrapper-22ba3666.js +0 -4
- package/dist/cjs/InputContainerStateWrapper-22ba3666.js.map +0 -1
- package/dist/cjs/InputStateWrapper-d42c16fa.js +0 -4
- package/dist/cjs/InputStateWrapper-d42c16fa.js.map +0 -1
- package/dist/cjs/InternalUnderlinedBadgeText-ccc2e00b.js +0 -4
- package/dist/cjs/InternalUnderlinedBadgeText-ccc2e00b.js.map +0 -1
- package/dist/cjs/Span-c07bdc7d.js +0 -4
- package/dist/cjs/Span-c07bdc7d.js.map +0 -1
- package/dist/cjs/component-names-6f6ca767.js +0 -4
- package/dist/cjs/component-names-6f6ca767.js.map +0 -1
- package/dist/cjs/controller-38fc5879.js +0 -4
- package/dist/cjs/controller-8146a18f.js +0 -4
- package/dist/cjs/controller-8146a18f.js.map +0 -1
- package/dist/cjs/controller-c1c74e71.js +0 -4
- package/dist/cjs/controller-c1c74e71.js.map +0 -1
- package/dist/cjs/controller-icon-b7e1a51b.js +0 -4
- package/dist/cjs/controller-icon-b7e1a51b.js.map +0 -1
- package/dist/cjs/getRenderStates-5862fd91.js +0 -4
- package/dist/cjs/getRenderStates-5862fd91.js.map +0 -1
- package/dist/cjs/index-3b0357df.js +0 -4
- package/dist/cjs/isString-8ded65b8.js +0 -4
- package/dist/cjs/isString-8ded65b8.js.map +0 -1
- package/dist/cjs/kol-symbol.cjs.entry.js +0 -4
- package/dist/cjs/kol-symbol.cjs.entry.js.map +0 -1
- package/dist/cjs/msg-3d7a0f7b.js +0 -4
- package/dist/cjs/msg-3d7a0f7b.js.map +0 -1
- package/dist/components/controller-icon.js +0 -4
- package/dist/components/controller-icon.js.map +0 -1
- package/dist/components/controller5.js +0 -4
- package/dist/components/controller5.js.map +0 -1
- package/dist/components/controller6.js +0 -4
- package/dist/components/controller6.js.map +0 -1
- package/dist/components/isString.js +0 -4
- package/dist/components/isString.js.map +0 -1
- package/dist/components/kol-symbol.d.ts +0 -11
- package/dist/components/kol-symbol.js +0 -4
- package/dist/components/kol-symbol.js.map +0 -1
- package/dist/components/msg.js +0 -4
- package/dist/components/msg.js.map +0 -1
- package/dist/esm/FieldControlStateWrapper-5e88de58.js +0 -4
- package/dist/esm/FormFieldMsg-12e502c7.js +0 -4
- package/dist/esm/FormFieldMsg-12e502c7.js.map +0 -1
- package/dist/esm/Icon-0a8aaa01.js +0 -4
- package/dist/esm/Input-199b40e8.js +0 -4
- package/dist/esm/InputContainerStateWrapper-5cf1f1e5.js +0 -4
- package/dist/esm/InputContainerStateWrapper-5cf1f1e5.js.map +0 -1
- package/dist/esm/InputStateWrapper-14a4f1d3.js +0 -4
- package/dist/esm/InputStateWrapper-14a4f1d3.js.map +0 -1
- package/dist/esm/InternalUnderlinedBadgeText-8e356b64.js +0 -4
- package/dist/esm/InternalUnderlinedBadgeText-8e356b64.js.map +0 -1
- package/dist/esm/Span-13852fea.js +0 -4
- package/dist/esm/Span-13852fea.js.map +0 -1
- package/dist/esm/component-names-50e16b86.js +0 -4
- package/dist/esm/component-names-50e16b86.js.map +0 -1
- package/dist/esm/controller-0434e53f.js +0 -4
- package/dist/esm/controller-0434e53f.js.map +0 -1
- package/dist/esm/controller-654e5ee7.js +0 -4
- package/dist/esm/controller-654e5ee7.js.map +0 -1
- package/dist/esm/controller-fae9f200.js +0 -4
- package/dist/esm/controller-icon-d99920a4.js +0 -4
- package/dist/esm/controller-icon-d99920a4.js.map +0 -1
- package/dist/esm/getRenderStates-f8d64e58.js +0 -4
- package/dist/esm/getRenderStates-f8d64e58.js.map +0 -1
- package/dist/esm/index-095473f8.js +0 -4
- package/dist/esm/isString-5af96894.js +0 -4
- package/dist/esm/isString-5af96894.js.map +0 -1
- package/dist/esm/kol-symbol.entry.js +0 -4
- package/dist/esm/kol-symbol.entry.js.map +0 -1
- package/dist/esm/msg-0c13cf1c.js +0 -4
- package/dist/esm/msg-0c13cf1c.js.map +0 -1
- package/dist/kolibri/FieldControlStateWrapper-5e88de58.js +0 -4
- package/dist/kolibri/FormFieldMsg-12e502c7.js +0 -4
- package/dist/kolibri/FormFieldMsg-12e502c7.js.map +0 -1
- package/dist/kolibri/Icon-0a8aaa01.js +0 -4
- package/dist/kolibri/Input-199b40e8.js +0 -4
- package/dist/kolibri/InputContainerStateWrapper-5cf1f1e5.js +0 -4
- package/dist/kolibri/InputContainerStateWrapper-5cf1f1e5.js.map +0 -1
- package/dist/kolibri/InputStateWrapper-14a4f1d3.js +0 -4
- package/dist/kolibri/InputStateWrapper-14a4f1d3.js.map +0 -1
- package/dist/kolibri/InternalUnderlinedBadgeText-8e356b64.js +0 -4
- package/dist/kolibri/InternalUnderlinedBadgeText-8e356b64.js.map +0 -1
- package/dist/kolibri/Span-13852fea.js +0 -4
- package/dist/kolibri/app-globals-3f2c3965.js +0 -4
- package/dist/kolibri/component-names-50e16b86.js +0 -4
- package/dist/kolibri/component-names-50e16b86.js.map +0 -1
- package/dist/kolibri/controller-0434e53f.js +0 -4
- package/dist/kolibri/controller-0434e53f.js.map +0 -1
- package/dist/kolibri/controller-654e5ee7.js +0 -4
- package/dist/kolibri/controller-654e5ee7.js.map +0 -1
- package/dist/kolibri/controller-fae9f200.js +0 -4
- package/dist/kolibri/controller-icon-d99920a4.js +0 -4
- package/dist/kolibri/controller-icon-d99920a4.js.map +0 -1
- package/dist/kolibri/devtools-eb468601.js +0 -4
- package/dist/kolibri/getRenderStates-f8d64e58.js +0 -4
- package/dist/kolibri/getRenderStates-f8d64e58.js.map +0 -1
- package/dist/kolibri/isString-5af96894.js +0 -4
- package/dist/kolibri/isString-5af96894.js.map +0 -1
- package/dist/kolibri/kol-symbol.entry.js +0 -4
- package/dist/kolibri/kol-symbol.entry.js.map +0 -1
- package/dist/kolibri/msg-0c13cf1c.js +0 -4
- package/dist/kolibri/msg-0c13cf1c.js.map +0 -1
- package/dist/types/components/symbol/component.d.ts +0 -11
- package/dist/types/schema/components/symbol.d.ts +0 -12
- package/dist/types/schema/props/hide-error.d.ts +0 -7
- package/doc/symbol.md +0 -44
- /package/dist/kolibri/{Alert-130db08c.js.map → Alert-080adf2e.js.map} +0 -0
- /package/dist/kolibri/{Collapsible-ec3d6bd1.js.map → Collapsible-cc9fb8f0.js.map} +0 -0
- /package/dist/kolibri/{Heading-401912a9.js.map → Heading-0459992b.js.map} +0 -0
- /package/dist/kolibri/{Icon-0a8aaa01.js.map → Icon-936c5cfc.js.map} +0 -0
- /package/dist/kolibri/{app-globals-3f2c3965.js.map → app-globals-1242eb39.js.map} +0 -0
- /package/dist/kolibri/{controller-e3f702f2.js.map → controller-002a86ad.js.map} +0 -0
- /package/dist/kolibri/{controller-73c1e790.js.map → controller-502cff08.js.map} +0 -0
- /package/dist/kolibri/{controller-4075dfc7.js.map → controller-eb6f1a77.js.map} +0 -0
- /package/dist/kolibri/{dev.utils-a3bfded4.js.map → dev.utils-b9e6a3e1.js.map} +0 -0
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h as n,r as e,g as t}from"./index-095473f8.js";import{c as i}from"./clsx-09a06a12.js";import{n as o}from"./dev.utils-a3bfded4.js";import{I as a}from"./controller-fae9f200.js";import{b as l,w as r,s}from"./prop.validators-9feb1d92.js";import{i as c}from"./common-54bf85ba.js";import{K as d}from"./FieldControlStateWrapper-5e88de58.js";import{_ as h}from"./tslib.es6-1173d062.js";import{g as f,K as u}from"./getRenderStates-f8d64e58.js";import{K as b}from"./Icon-0a8aaa01.js";import{K as p}from"./Input-199b40e8.js";import{c as m,a as k}from"./msg-0c13cf1c.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./controller-0434e53f.js";import"./events-5adf6b62.js";import"./associated.controller-52d302aa.js";import"./access-and-short-key-9cca88b8.js";import"./tooltip-align-8e0fa436.js";import"./align-4719d626.js";import"./hide-label-429a15ea.js";import"./label-d0315384.js";import"./index-da3e0c00.js";import"./FormFieldMsg-12e502c7.js";import"./Alert-130db08c.js";import"./i18n-5fe08f1c.js";import"./i18n-7ea9f137.js";import"./component-names-50e16b86.js";import"./Heading-401912a9.js";import"./isString-5af96894.js";import"./InternalUnderlinedBadgeText-8e356b64.js";const v=["button","default","switch"],g=(e,n)=>{l(e,"_checked",n)},y=(e,n)=>{l(e,"_indeterminate",n)},_=["left","right"],x=(e,n)=>{r(e,"_labelAlign",(e=>"string"==typeof e&&_.includes(e)),new Set([`KoliBriLabelAlign {${_.join(", ")}`]),n)};class w extends a{constructor(e,n,t){super(e,n,t),this.setFormAssociatedCheckboxValue=e=>{this.component._checked?this.setFormAssociatedValue(e):this.setFormAssociatedValue(null)},this.component=e}validateChecked(e){g(this.component,e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(e){r(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&(c(e.checked,1)||c(e.indeterminate,1)||c(e.unchecked,1))),new Set(["InputCheckboxIcons"]),e,{hooks:{beforePatch:(e,n,t)=>{n.set("_icons",Object.assign(Object.assign({},t.state._icons),e))}}})}validateIndeterminate(e){y(this.component,e)}validateLabelAlign(e){x(this.component,e)}validateValue(e){s(this.component,"_value",e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(e){r(this.component,"_variant",(e=>"string"==typeof e&&v.includes(e)),new Set([`String {${v.join(", ")}`]),e)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant),this.validateLabelAlign(this.component._labelAlign)}}const j=e=>{var{class:t}=e,o=h(e,["class"]);return n(b,Object.assign({class:i("kol-checkbox__icon",t)},o))},z=e=>{var{class:t}=e,o=h(e,["class"]);return n(p,Object.assign({class:i("kol-checkbox__input",t)},o,{type:"checkbox"}))},S=e=>{var t,{class:o,variant:a="default",icon:l,inputProps:r}=e,s=h(e,["class","variant","icon","inputProps"]);const c=m(null==r?void 0:r.msg,null==r?void 0:r.touched),d={[`kol-checkbox--variant-${a}`]:!0,"kol-checkbox--checked":null==r?void 0:r.checked,"kol-checkbox--indeterminate":null==r?void 0:r.indeterminate,"kol-checkbox--disabled":Boolean(null==r?void 0:r.disabled),"kol-checkbox--required":Boolean(null==r?void 0:r.required),"kol-checkbox--touched":Boolean(null==r?void 0:r.touched),[`kol-checkbox--${(null===(t=null==r?void 0:r.msg)||void 0===t?void 0:t.type)||"error"}`]:Boolean(c)};return n("label",Object.assign({class:i("kol-checkbox",d,o)},s),n(j,{label:"",icons:l}),n(z,Object.assign({},r)))},I=S;function A(e,n={}){const{ariaDescribedBy:t}=f(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t};return"_required"in e&&(i.required=e._required),"_checked"in e&&(i.checked=e._checked),"_indeterminate"in e&&(i.indeterminate=e._indeterminate),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=k(e._msg)),Object.assign(Object.assign({},i),n)}const O=e=>{var{state:t,inputProps:i}=e,o=h(e,["state","inputProps"]);const a=(null==t?void 0:t._variant)||"default";return n(I,Object.assign({variant:a,inputProps:A(t,i)},o))},B=O,V='/*\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 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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\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,\n [disabled]:focus .kol-span {\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 {\n display: contents;\n }\n .kol-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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-field-control {\n min-height: var(--a11y-min-size);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label";\n grid-template-rows: auto;\n align-items: center;\n justify-content: left;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input";\n grid-template-rows: auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n grid-area: input;\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-field-control__label {\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-grow: 1;\n grid-area: label;\n min-height: var(--a11y-min-size);\n }\n .kol-field-control__label--visually-hidden {\n height: 0;\n margin: 0;\n padding: 0;\n visibility: hidden;\n }\n .kol-field-control__label-text::after {\n content: "";\n }\n .kol-field-control__tooltip .span-label::after {\n content: "";\n }\n .kol-field-control__hint {\n grid-area: hint;\n }\n .kol-field-control--disabled .kol-field-control__label {\n cursor: not-allowed;\n opacity: 0.5;\n }\n .kol-field-control--required .kol-field-control__label-text::after {\n content: "*";\n }\n .kol-field-control--required .kol-field-control__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n }\n .kol-checkbox {\n position: relative;\n display: flex;\n align-items: center;\n }\n .kol-checkbox .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n appearance: none;\n background-color: #fff;\n cursor: pointer;\n transition: 0.5s;\n margin: 0;\n border-style: solid;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .kol-checkbox .kol-input:before {\n content: "";\n cursor: pointer;\n }\n .kol-checkbox .kol-input:disabled:before {\n cursor: not-allowed;\n }\n /**\n * Variant: Checkbox\n */\n .kol-checkbox--variant-default {\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .kol-checkbox--variant-default .kol-icon {\n display: flex;\n inset: auto;\n position: absolute;\n z-index: 1;\n pointer-events: none;\n }\n .kol-checkbox--variant-default .kol-icon::part(icon) {\n display: none;\n }\n .kol-checkbox--variant-default .kol-input {\n width: calc(22rem / var(--kolibri-root-font-size, 16));\n height: calc(22rem / var(--kolibri-root-font-size, 16));\n }\n .kol-checkbox--variant-default.kol-checkbox--checked .kol-icon::part(icon), .kol-checkbox--variant-default.kol-checkbox--indeterminate .kol-icon::part(icon) {\n display: block;\n }\n /**\n * Variant: Switch\n */\n .kol-checkbox--variant-switch {\n position: relative;\n }\n .kol-checkbox--variant-switch .kol-input {\n display: inline-block;\n height: 1.7em;\n min-width: 3.2em;\n position: relative;\n width: 3.2em;\n }\n .kol-checkbox--variant-switch .kol-input::before {\n background-color: #000;\n height: 1.2em;\n left: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n top: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n position: absolute;\n transition: 0.5s;\n width: 1.2em;\n }\n .kol-checkbox--variant-switch .kol-input:checked::before {\n transform: translateX(1.5em);\n }\n .kol-checkbox--variant-switch .kol-input:indeterminate::before {\n transform: translateX(0.75em);\n }\n .kol-checkbox--variant-switch .kol-icon {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n z-index: 1;\n top: 50%;\n left: calc(4rem / var(--kolibri-root-font-size, 16));\n transform: translate(0, -50%);\n transition: 0.5s;\n color: #000;\n }\n .kol-checkbox--variant-switch.kol-checkbox--checked .kol-icon {\n transform: translate(1.5em, -50%);\n }\n .kol-checkbox--variant-switch.kol-checkbox--indeterminate .kol-icon {\n transform: translate(0.75em, -50%);\n }\n /**\n * Variant: Button\n */\n .kol-checkbox--variant-button {\n width: var(--a11y-min-size);\n }\n .kol-checkbox--variant-button .kol-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n }\n}',K=V,L=class{getModelValue(){return this._checked?this.state._value:null}async getValue(){return this.getModelValue()}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:i("kol-input-checkbox",{"kol-input-checkbox--checked":this.state._checked,"kol-input-checkbox--indeterminate":this.state._indeterminate,[`kol-input-checkbox--variant-${this.state._variant||"default"}`]:!0,[`kol-input-checkbox--label-align-${this.state._labelAlign||"right"}`]:!0}),tooltipAlign:this._tooltipAlign,"data-role":"button"===this.state._variant?"button":void 0,alert:this.showAsAlert(),renderNoTooltip:!0}}getFieldControlProps(){return{class:i("kol-input-checkbox__field-control",{"kol-input-checkbox__field-control--checked":this.state._checked,"kol-input-checkbox__field-control--indeterminate":this.state._indeterminate,[`kol-input-checkbox__field-control--variant-${this.state._variant||"default"}`]:!0}),state:this.state}}getInputProps(){return{state:this.state,icon:this.getIcon(),inputProps:Object.assign(Object.assign({class:i({"visually-hidden":"button"===this.state._variant}),ref:this.catchRef},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1},onClick:void 0})}}getIcon(){return this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked}render(){return n(u,Object.assign({key:"311e4f24c632de203d94e683ebd825965665a236"},this.getFormFieldProps(),{renderNoLabel:!0}),n(d,Object.assign({key:"feb0374872558e832ad215a67854b86363c065a4"},this.getFieldControlProps(),{renderNoHint:!0}),n(B,Object.assign({key:"45259357734650ebd6b87ffeba676a33966fd284"},this.getInputProps()))))}constructor(n){e(this,n),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{this._checked=!this._checked,this._indeterminate=!1;const n=this.getModelValue();this.controller.onFacade.onInput(e,!1,n),this.controller.setFormAssociatedCheckboxValue(n)},this.onChange=e=>{this.controller.onFacade.onChange(e,this.getModelValue())},this._accessKey=void 0,this._checked=!1,this._hideError=!1,this._disabled=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._labelAlign="right",this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideError:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-close"},_id:`id-${o()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default",_labelAlign:"right"},this.inputHasFocus=!1,this.controller=new w(this,"checkbox",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateChecked(e){this.controller.validateChecked(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideError(e){this.controller.validateHideError(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateIndeterminate(e){this.controller.validateIndeterminate(e)}validateLabel(e){this.controller.validateLabel(e)}validateLabelAlign(e){this.controller.validateLabelAlign(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateVariant(e){this.controller.validateVariant(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return t(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_checked:["validateChecked"],_disabled:["validateDisabled"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_labelAlign:["validateLabelAlign"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}};L.style={default:K};export{L as kol_input_checkbox};
|
4
|
+
import{h as n,r as e,g as t}from"./index-91489a9f.js";import{c as i}from"./clsx-09a06a12.js";import{n as o}from"./dev.utils-b9e6a3e1.js";import{I as a}from"./controller-e699ee47.js";import{b as l,w as s,s as r}from"./prop.validators-9feb1d92.js";import{i as c}from"./common-54bf85ba.js";import{K as d}from"./FieldControlStateWrapper-5432d9b6.js";import{_ as h}from"./tslib.es6-1173d062.js";import{g as f,K as u}from"./getRenderStates-a7a33541.js";import{K as b}from"./Icon-936c5cfc.js";import{K as p}from"./Input-40160769.js";import{c as m,a as k}from"./FormFieldMsg-1ed3f51d.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./label-d0315384.js";import"./index-da3e0c00.js";import"./events-5adf6b62.js";import"./associated.controller-52d302aa.js";import"./access-and-short-key-9cca88b8.js";import"./tooltip-align-8e0fa436.js";import"./align-4719d626.js";import"./hide-label-429a15ea.js";import"./i18n-5fe08f1c.js";import"./i18n-7ea9f137.js";import"./component-names-a18a51c8.js";import"./InternalUnderlinedBadgeText-22278de8.js";import"./Alert-080adf2e.js";import"./Heading-0459992b.js";const v=["button","default","switch"],g=(e,n)=>{l(e,"_checked",n)},y=(e,n)=>{l(e,"_indeterminate",n)},_=["left","right"],x=(e,n)=>{s(e,"_labelAlign",(e=>"string"==typeof e&&_.includes(e)),new Set([`KoliBriLabelAlign {${_.join(", ")}`]),n)};class w extends a{constructor(e,n,t){super(e,n,t),this.setFormAssociatedCheckboxValue=e=>{this.component._checked?this.setFormAssociatedValue(e):this.setFormAssociatedValue(null)},this.component=e}validateChecked(e){g(this.component,e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateIcons(e){s(this.component,"_icons",(e=>"object"==typeof e&&null!==e&&(c(e.checked,1)||c(e.indeterminate,1)||c(e.unchecked,1))),new Set(["InputCheckboxIcons"]),e,{hooks:{beforePatch:(e,n,t)=>{n.set("_icons",Object.assign(Object.assign({},t.state._icons),e))}}})}validateIndeterminate(e){y(this.component,e)}validateLabelAlign(e){x(this.component,e)}validateValue(e){r(this.component,"_value",e),this.setFormAssociatedCheckboxValue(this.component.state._value)}validateVariant(e){s(this.component,"_variant",(e=>"string"==typeof e&&v.includes(e)),new Set([`String {${v.join(", ")}`]),e)}componentWillLoad(){super.componentWillLoad(),this.validateChecked(this.component._checked),this.validateIcons(this.component._icons),this.validateIndeterminate(this.component._indeterminate),this.validateValue(this.component._value),this.validateVariant(this.component._variant),this.validateLabelAlign(this.component._labelAlign)}}const j=e=>{var{class:t}=e,o=h(e,["class"]);return n(b,Object.assign({class:i("kol-checkbox__icon",t)},o))},z=e=>{var{class:t}=e,o=h(e,["class"]);return n(p,Object.assign({class:i("kol-checkbox__input",t)},o,{type:"checkbox"}))},I=e=>{var t,{class:o,variant:a="default",icon:l,inputProps:s}=e,r=h(e,["class","variant","icon","inputProps"]);const c=m(null==s?void 0:s.msg,null==s?void 0:s.touched),d={[`kol-checkbox--variant-${a}`]:!0,"kol-checkbox--checked":null==s?void 0:s.checked,"kol-checkbox--indeterminate":null==s?void 0:s.indeterminate,"kol-checkbox--disabled":Boolean(null==s?void 0:s.disabled),"kol-checkbox--required":Boolean(null==s?void 0:s.required),"kol-checkbox--touched":Boolean(null==s?void 0:s.touched),[`kol-checkbox--${(null===(t=null==s?void 0:s.msg)||void 0===t?void 0:t.type)||"error"}`]:Boolean(c)};return n("label",Object.assign({class:i("kol-checkbox",d,o)},r),n(j,{label:"",icons:l}),n(z,Object.assign({},s)))},S=I;function A(e,n={}){const{ariaDescribedBy:t}=f(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t};return"_required"in e&&(i.required=e._required),"_checked"in e&&(i.checked=e._checked),"_indeterminate"in e&&(i.indeterminate=e._indeterminate),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=k(e._msg)),Object.assign(Object.assign({},i),n)}const O=e=>{var{state:t,inputProps:i}=e,o=h(e,["state","inputProps"]);const a=(null==t?void 0:t._variant)||"default";return n(S,Object.assign({variant:a,inputProps:A(t,i)},o))},B=O,V='/*\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 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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\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,\n [disabled]:focus .kol-span {\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 {\n display: contents;\n }\n .kol-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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-field-control {\n min-height: var(--a11y-min-size);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label";\n grid-template-rows: auto;\n align-items: center;\n justify-content: left;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input";\n grid-template-rows: auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n grid-area: input;\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-field-control__label {\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-grow: 1;\n grid-area: label;\n min-height: var(--a11y-min-size);\n }\n .kol-field-control__label--visually-hidden {\n height: 0;\n margin: 0;\n padding: 0;\n visibility: hidden;\n }\n .kol-field-control__label-text::after {\n content: "";\n }\n .kol-field-control__tooltip .span-label::after {\n content: "";\n }\n .kol-field-control__hint {\n grid-area: hint;\n }\n .kol-field-control--disabled .kol-field-control__label {\n cursor: not-allowed;\n opacity: 0.5;\n }\n .kol-field-control--required .kol-field-control__label-text::after {\n content: "*";\n }\n .kol-field-control--required .kol-field-control__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n }\n .kol-checkbox {\n position: relative;\n display: flex;\n align-items: center;\n }\n .kol-checkbox .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n appearance: none;\n background-color: #fff;\n cursor: pointer;\n transition: 0.5s;\n margin: 0;\n border-style: solid;\n border-width: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .kol-checkbox .kol-input:before {\n content: "";\n cursor: pointer;\n }\n .kol-checkbox .kol-input:disabled:before {\n cursor: not-allowed;\n }\n /**\n * Variant: Checkbox\n */\n .kol-checkbox--variant-default {\n height: var(--a11y-min-size);\n justify-content: center;\n position: relative;\n width: var(--a11y-min-size);\n }\n .kol-checkbox--variant-default .kol-icon {\n display: flex;\n inset: auto;\n position: absolute;\n z-index: 1;\n pointer-events: none;\n }\n .kol-checkbox--variant-default .kol-icon::part(icon) {\n display: none;\n }\n .kol-checkbox--variant-default .kol-input {\n width: calc(22rem / var(--kolibri-root-font-size, 16));\n height: calc(22rem / var(--kolibri-root-font-size, 16));\n }\n .kol-checkbox--variant-default.kol-checkbox--checked .kol-icon::part(icon), .kol-checkbox--variant-default.kol-checkbox--indeterminate .kol-icon::part(icon) {\n display: block;\n }\n /**\n * Variant: Switch\n */\n .kol-checkbox--variant-switch {\n position: relative;\n }\n .kol-checkbox--variant-switch .kol-input {\n display: inline-block;\n height: 1.7em;\n min-width: 3.2em;\n position: relative;\n width: 3.2em;\n }\n .kol-checkbox--variant-switch .kol-input::before {\n background-color: #000;\n height: 1.2em;\n left: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n top: calc(0.25em - (2rem / var(--kolibri-root-font-size, 16)));\n position: absolute;\n transition: 0.5s;\n width: 1.2em;\n }\n .kol-checkbox--variant-switch .kol-input:checked::before {\n transform: translateX(1.5em);\n }\n .kol-checkbox--variant-switch .kol-input:indeterminate::before {\n transform: translateX(0.75em);\n }\n .kol-checkbox--variant-switch .kol-icon {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.2em;\n height: 1.2em;\n position: absolute;\n z-index: 1;\n top: 50%;\n left: calc(4rem / var(--kolibri-root-font-size, 16));\n transform: translate(0, -50%);\n transition: 0.5s;\n color: #000;\n }\n .kol-checkbox--variant-switch.kol-checkbox--checked .kol-icon {\n transform: translate(1.5em, -50%);\n }\n .kol-checkbox--variant-switch.kol-checkbox--indeterminate .kol-icon {\n transform: translate(0.75em, -50%);\n }\n /**\n * Variant: Button\n */\n .kol-checkbox--variant-button {\n width: var(--a11y-min-size);\n }\n .kol-checkbox--variant-button .kol-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n }\n}',K=V,L=class{getModelValue(){return this._checked?this.state._value:null}async getValue(){return this.getModelValue()}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,class:i("kol-input-checkbox",{"kol-input-checkbox--checked":this.state._checked,"kol-input-checkbox--indeterminate":this.state._indeterminate,[`kol-input-checkbox--variant-${this.state._variant||"default"}`]:!0,[`kol-input-checkbox--label-align-${this.state._labelAlign||"right"}`]:!0}),tooltipAlign:this._tooltipAlign,"data-role":"button"===this.state._variant?"button":void 0,alert:this.showAsAlert(),renderNoTooltip:!0}}getFieldControlProps(){return{class:i("kol-input-checkbox__field-control",{"kol-input-checkbox__field-control--checked":this.state._checked,"kol-input-checkbox__field-control--indeterminate":this.state._indeterminate,[`kol-input-checkbox__field-control--variant-${this.state._variant||"default"}`]:!0}),state:this.state}}getInputProps(){return{state:this.state,icon:this.getIcon(),inputProps:Object.assign(Object.assign({class:i({"visually-hidden":"button"===this.state._variant}),ref:this.catchRef},this.controller.onFacade),{onInput:this.onInput,onChange:this.onChange,onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1},onClick:void 0})}}getIcon(){return this.state._indeterminate?this.state._icons.indeterminate:this.state._checked?this.state._icons.checked:this.state._icons.unchecked}render(){return n(u,Object.assign({key:"6a0a46a18a7de19b8379ffbcefcf8e7eb346f5e6"},this.getFormFieldProps(),{renderNoLabel:!0}),n(d,Object.assign({key:"827396232275bb9e76fcba42e9bdaabc4238e09a"},this.getFieldControlProps(),{renderNoHint:!0}),n(B,Object.assign({key:"5cc4790a0e8fb58964741c78047c9d0b2d46e80d"},this.getInputProps()))))}constructor(n){e(this,n),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{this._checked=!this._checked,this._indeterminate=!1;const n=this.getModelValue();this.controller.onFacade.onInput(e,!1,n),this.controller.setFormAssociatedCheckboxValue(n)},this.onChange=e=>{this.controller.onFacade.onChange(e,this.getModelValue())},this._accessKey=void 0,this._checked=!1,this._hideMsg=!1,this._disabled=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._indeterminate=void 0,this._label=void 0,this._labelAlign="right",this._msg=void 0,this._name=void 0,this._on=void 0,this._required=!1,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=!0,this._variant="default",this.state={_checked:!1,_hideMsg:!1,_icons:{checked:"codicon codicon-check",indeterminate:"codicon codicon-remove",unchecked:"codicon codicon-close"},_id:`id-${o()}`,_indeterminate:!1,_label:"",_value:!0,_variant:"default",_labelAlign:"right"},this.inputHasFocus=!1,this.controller=new w(this,"checkbox",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateChecked(e){this.controller.validateChecked(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHint(e){this.controller.validateHint(e)}validateIcons(e){this.controller.validateIcons(e)}validateId(e){this.controller.validateId(e)}validateIndeterminate(e){this.controller.validateIndeterminate(e)}validateLabel(e){this.controller.validateLabel(e)}validateLabelAlign(e){this.controller.validateLabelAlign(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTabIndex(e){this.controller.validateTabIndex(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}validateVariant(e){this.controller.validateVariant(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return t(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_checked:["validateChecked"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_indeterminate:["validateIndeterminate"],_label:["validateLabel"],_labelAlign:["validateLabelAlign"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"],_variant:["validateVariant"]}}};L.style={default:K};export{L as kol_input_checkbox};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["inputCheckboxVariantOptions","validateChecked","component","value","watchBoolean","validateIndeterminate","labelAlignPropTypeOptions","validateLabelAlign","watchValidator","includes","Set","join","InputCheckboxController","InputCheckboxRadioController","constructor","name","host","super","this","setFormAssociatedCheckboxValue","_checked","setFormAssociatedValue","state","_value","validateIcons","isString","checked","indeterminate","unchecked","hooks","beforePatch","nextValue","nextState","set","Object","assign","_icons","validateValue","setState","validateVariant","componentWillLoad","_indeterminate","_variant","_labelAlign","IconWrapperFc","_a","class","classNames","other","__rest","h","KolIconFc","clsx","InputWrapperFc","KolInputFc","type","CheckboxFc","variant","icon","inputProps","showMsg","checkHasError","msg","touched","cssVariants","Boolean","disabled","required","_b","label","icons","KolCheckboxFc","getCheckboxProps","ariaDescribedBy","getRenderStates","props","id","_id","hideLabel","_hideLabel","_label","accessKey","_accessKey","_disabled","_name","_required","_touched","convertMsgToInternMsg","_msg","CheckboxStateWrapper","KolCheckboxStateWrapperFc","defaultStyleCss","KolInputCheckboxDefaultStyle0","KolInputCheckbox","getModelValue","getValue","kolFocus","inputRef","focus","getFormFieldProps","tooltipAlign","_tooltipAlign","undefined","alert","showAsAlert","renderNoTooltip","getFieldControlProps","getInputProps","getIcon","ref","catchRef","controller","onFacade","onInput","onChange","onFocus","event","inputHasFocus","onBlur","onClick","render","KolFormFieldStateWrapperFc","key","renderNoLabel","KolFieldControlStateWrapperFc","renderNoHint","hostRef","_hideError","nonce","validateAccessKey","validateDisabled","validateHideError","validateHideLabel","validateHint","validateId","validateLabel","validateMsg","validateName","validateOn","validateRequired","validateShortKey","validateSyncValueBySelector","validateTabIndex","validateTouched"],"sources":["src/schema/components/input-checkbox.ts","src/schema/props/checked.ts","src/schema/props/indeterminate.ts","src/schema/props/label-align.ts","src/components/input-checkbox/controller.ts","src/functional-components/inputs/Checkbox/Checkbox.tsx","src/functional-component-wrappers/CheckboxStateWrapper/CheckboxStateWrapper.tsx","src/components/input-checkbox/style.scss?tag=kol-input-checkbox&mode=default&encapsulation=shadow","src/components/input-checkbox/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tMsgPropType,\n\tPropChecked,\n\tPropDisabled,\n\tPropHideError,\n\tPropHideLabel,\n\tPropIndeterminate,\n\tPropLabelAlign,\n\tPropLabelWithExpertSlot,\n\tPropMsg,\n\tPropName,\n\tPropRequired,\n\tPropSyncValueBySelector,\n\tPropTouched,\n\tPropShortKey,\n\tPropAccessKey,\n} from '../props';\nimport type { AnyIconFontClass, InputTypeOnDefault, StencilUnknown, Stringified } from '../types';\n\nexport const inputCheckboxVariantOptions = ['button', 'default', 'switch'] as const;\nexport type InputCheckboxVariant = (typeof inputCheckboxVariantOptions)[number];\n\nexport type InputCheckboxIconsProp =\n\t| {\n\t\t\tchecked: AnyIconFontClass;\n\t\t\tindeterminate?: AnyIconFontClass;\n\t\t\tunchecked?: AnyIconFontClass;\n\t }\n\t| {\n\t\t\tchecked?: AnyIconFontClass;\n\t\t\tindeterminate: AnyIconFontClass;\n\t\t\tunchecked?: AnyIconFontClass;\n\t }\n\t| {\n\t\t\tchecked?: AnyIconFontClass;\n\t\t\tindeterminate?: AnyIconFontClass;\n\t\t\tunchecked: AnyIconFontClass;\n\t };\n\nexport type InputCheckboxIconsState = {\n\tchecked: AnyIconFontClass;\n\tindeterminate: AnyIconFontClass;\n\tunchecked: AnyIconFontClass;\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\thint: string;\n\ticons: Stringified<InputCheckboxIconsProp>;\n\tmsg: Stringified<MsgPropType>;\n\ton: InputTypeOnDefault;\n\ttabIndex: number;\n\tvalue: Stringified<StencilUnknown>;\n\tvariant: InputCheckboxVariant;\n} & PropAccessKey &\n\tPropChecked &\n\tPropDisabled &\n\tPropHideError &\n\tPropHideLabel &\n\tPropIndeterminate &\n\tPropName &\n\tPropRequired &\n\tPropShortKey &\n\tPropSyncValueBySelector &\n\tPropTouched &\n\tPropLabelAlign;\n\ntype RequiredStates = {\n\ticons: InputCheckboxIconsState;\n\tid: string;\n\tvalue: StencilUnknown;\n\tvariant: InputCheckboxVariant;\n} & PropChecked &\n\tPropHideError &\n\tPropIndeterminate &\n\tPropLabelWithExpertSlot;\ntype OptionalStates = {\n\thint: string;\n\ton: InputTypeOnDefault;\n\ttabIndex: number;\n} & PropAccessKey &\n\tPropDisabled &\n\tPropHideLabel &\n\tPropMsg &\n\tPropName &\n\tPropRequired &\n\tPropShortKey &\n\tPropTouched &\n\tPropLabelAlign;\n\nexport type InputCheckboxProps = Generic.Element.Members<RequiredProps, OptionalProps>;\nexport type InputCheckboxStates = Generic.Element.Members<RequiredStates, OptionalStates>;\nexport type InputCheckboxWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\nexport type InputCheckboxAPI = Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates>;\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type CheckedPropType = boolean;\n\n/**\n * Defines whether the checkbox is checked or not. Can be read and written.\n */\nexport type PropChecked = {\n\tchecked: CheckedPropType;\n};\n\n/* validator */\nexport const validateChecked = (component: Generic.Element.Component, value?: CheckedPropType): void => {\n\twatchBoolean(component, '_checked', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type IndeterminatePropType = boolean;\n\n/**\n * Puts the checkbox in the indeterminate state, does not change the value of _checked.\n */\nexport type PropIndeterminate = {\n\tindeterminate: IndeterminatePropType;\n};\n\n/* validator */\nexport const validateIndeterminate = (component: Generic.Element.Component, value?: IndeterminatePropType): void => {\n\twatchBoolean(component, '_indeterminate', value);\n};\n","/* types */\nimport type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../utils';\n\nconst labelAlignPropTypeOptions = ['left', 'right'] as const;\nexport type LabelAlignPropType = (typeof labelAlignPropTypeOptions)[number];\n\n/**\n * Defines which alignment should be used for presentation.\n */\nexport type PropLabelAlign = {\n\tlabelAlign: LabelAlignPropType;\n};\n\n/* validator */\nexport const validateLabelAlign = (component: Generic.Element.Component, value?: LabelAlignPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_labelAlign`,\n\t\t(value) => typeof value === 'string' && labelAlignPropTypeOptions.includes(value),\n\t\tnew Set([`KoliBriLabelAlign {${labelAlignPropTypeOptions.join(', ')}`]),\n\t\tvalue,\n\t);\n};\n","import type {\n\tCheckedPropType,\n\tIndeterminatePropType,\n\tInputCheckboxIconsProp,\n\tInputCheckboxIconsState,\n\tInputCheckboxProps,\n\tInputCheckboxVariant,\n\tInputCheckboxWatches,\n\tLabelAlignPropType,\n\tStencilUnknown,\n\tStringified,\n} from '../../schema';\nimport { inputCheckboxVariantOptions, isString, setState, validateChecked, validateIndeterminate, validateLabelAlign, watchValidator } from '../../schema';\n\nimport { InputCheckboxRadioController } from '../input-radio/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class InputCheckboxController extends InputCheckboxRadioController implements InputCheckboxWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly setFormAssociatedCheckboxValue = (value: StencilUnknown) => {\n\t\tif (this.component._checked) {\n\t\t\tthis.setFormAssociatedValue(value);\n\t\t} else {\n\t\t\tthis.setFormAssociatedValue(null);\n\t\t}\n\t};\n\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tvalidateChecked(this.component, value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\treturn typeof value === 'object' && value !== null && (isString(value.checked, 1) || isString(value.indeterminate, 1) || isString(value.unchecked, 1));\n\t\t\t},\n\t\t\tnew Set(['InputCheckboxIcons']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (nextValue: unknown, nextState: Map<string, unknown>, component: Generic.Element.Component) => {\n\t\t\t\t\t\tnextState.set('_icons', {\n\t\t\t\t\t\t\t...(component.state._icons as InputCheckboxIconsState),\n\t\t\t\t\t\t\t...(nextValue as InputCheckboxIconsProp),\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tvalidateIndeterminate(this.component, value);\n\t}\n\n\tpublic validateLabelAlign(value?: LabelAlignPropType): void {\n\t\tvalidateLabelAlign(this.component, value);\n\t}\n\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tsetState(this.component, '_value', value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_variant',\n\t\t\t(value): boolean => typeof value === 'string' && inputCheckboxVariantOptions.includes(value),\n\t\t\tnew Set([`String {${inputCheckboxVariantOptions.join(', ')}`]),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateChecked(this.component._checked);\n\t\tthis.validateIcons(this.component._icons);\n\t\tthis.validateIndeterminate(this.component._indeterminate);\n\t\tthis.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t\tthis.validateLabelAlign(this.component._labelAlign);\n\t}\n}\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport KolIconFc, { type IconProps } from '../../Icon';\nimport KolInputFc, { type InputProps } from '../Input';\nimport { checkHasError } from '../../../schema';\n\nexport type CheckboxProps = JSXBase.HTMLAttributes<HTMLLabelElement> & {\n\ticon: string;\n\tvariant?: 'default' | 'button' | 'switch';\n\tinputProps: InputProps;\n};\n\nconst IconWrapperFc: FC<IconProps> = ({ class: classNames, ...other }) => {\n\treturn <KolIconFc class={clsx('kol-checkbox__icon', classNames)} {...other} />;\n};\n\nconst InputWrapperFc: FC<InputProps> = ({ class: classNames, ...other }) => {\n\treturn <KolInputFc class={clsx('kol-checkbox__input', classNames)} {...other} type=\"checkbox\" />;\n};\n\nconst CheckboxFc: FC<CheckboxProps> = ({ class: classNames, variant = 'default', icon, inputProps, ...other }) => {\n\tconst showMsg = checkHasError(inputProps?.msg, inputProps?.touched);\n\n\tconst cssVariants = {\n\t\t[`kol-checkbox--variant-${variant}`]: true,\n\t\t[`kol-checkbox--checked`]: inputProps?.checked,\n\t\t[`kol-checkbox--indeterminate`]: inputProps?.indeterminate,\n\t\t['kol-checkbox--disabled']: Boolean(inputProps?.disabled),\n\t\t['kol-checkbox--required']: Boolean(inputProps?.required),\n\t\t['kol-checkbox--touched']: Boolean(inputProps?.touched),\n\t\t[`kol-checkbox--${inputProps?.msg?.type || 'error'}`]: Boolean(showMsg),\n\t};\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/label-has-associated-control\n\t\t<label class={clsx('kol-checkbox', cssVariants, classNames)} {...other}>\n\t\t\t<IconWrapperFc label=\"\" icons={icon} />\n\t\t\t<InputWrapperFc {...inputProps} />\n\t\t</label>\n\t);\n};\nexport default CheckboxFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolCheckboxFc, { type CheckboxProps } from '../../functional-components/inputs/Checkbox';\nimport { type InputProps } from '../../functional-components/inputs/Input';\n\nimport { type InputCheckboxStates, convertMsgToInternMsg } from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\n\nexport type CheckboxStateWrapperProps = Omit<CheckboxProps, 'inputProps'> & {\n\tstate: InputCheckboxStates;\n\tinputProps?: Partial<InputProps>;\n};\n\nfunction getCheckboxProps(state: InputCheckboxStates, inputProps: Partial<InputProps> = {}): InputProps {\n\tconst { ariaDescribedBy } = getRenderStates(state);\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tvalue: state._value as string | number | string[],\n\t\taccessKey: state._accessKey,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\n\t\tariaDescribedBy: ariaDescribedBy,\n\t};\n\n\tif ('_required' in state) props.required = state._required;\n\tif ('_checked' in state) props.checked = state._checked;\n\tif ('_indeterminate' in state) props.indeterminate = state._indeterminate;\n\tif ('_touched' in state) props.touched = state._touched;\n\tif ('_msg' in state) props.msg = convertMsgToInternMsg(state._msg);\n\n\treturn { ...props, ...inputProps };\n}\n\nconst CheckboxStateWrapper: FC<CheckboxStateWrapperProps> = ({ state, inputProps, ...other }) => {\n\tconst variant = state?._variant || 'default';\n\n\treturn <KolCheckboxFc variant={variant} inputProps={getCheckboxProps(state, inputProps)} {...other} />;\n};\n\nexport default CheckboxStateWrapper;\n","@import '../../styles/global';\n@import '../../styles/kol-field-control-mixin';\n@import '../../styles/kol-form-field-mixin';\n@import '../@shared/mixins';\n@import '../host-display-block';\n@import '../tooltip/style';\n\n@include kol-form-field;\n@include kol-field-control;\n\n@layer kol-component {\n\t$root: '.kol-checkbox';\n\n\t.kol-form-field {\n\t\tdisplay: grid;\n\t}\n\n\t#{$root} {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t.kol-input {\n\t\t\tfont-size: rem(16);\n\n\t\t\tappearance: none;\n\t\t\tbackground-color: #fff;\n\t\t\tcursor: pointer;\n\t\t\ttransition: 0.5s;\n\n\t\t\tmargin: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-width: rem(2);\n\n\t\t\t&:before {\n\t\t\t\tcontent: '';\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t&:disabled:before {\n\t\t\t\tcursor: not-allowed;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Variant: Checkbox\n\t */\n\t#{$root}--variant-default {\n\t\theight: var(--a11y-min-size);\n\t\tjustify-content: center;\n\t\tposition: relative;\n\t\twidth: var(--a11y-min-size);\n\n\t\t.kol-icon {\n\t\t\tdisplay: flex;\n\t\t\tinset: auto;\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tpointer-events: none;\n\n\t\t\t&::part(icon) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\n\t\t.kol-input {\n\t\t\twidth: rem(22);\n\t\t\theight: rem(22);\n\t\t}\n\n\t\t&#{$root}--checked,\n\t\t&#{$root}--indeterminate {\n\t\t\t.kol-icon::part(icon) {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Variant: Switch\n\t */\n\t#{$root}--variant-switch {\n\t\tposition: relative;\n\n\t\t.kol-input {\n\t\t\tdisplay: inline-block;\n\t\t\theight: 1.7em;\n\t\t\tmin-width: 3.2em;\n\t\t\tposition: relative;\n\t\t\twidth: 3.2em;\n\n\t\t\t&::before {\n\t\t\t\tbackground-color: #000;\n\t\t\t\theight: 1.2em;\n\t\t\t\tleft: calc(0.25em - rem(2));\n\t\t\t\ttop: calc(0.25em - rem(2));\n\t\t\t\tposition: absolute;\n\t\t\t\ttransition: 0.5s;\n\t\t\t\twidth: 1.2em;\n\t\t\t}\n\n\t\t\t&:checked::before {\n\t\t\t\ttransform: translateX(1.5em);\n\t\t\t}\n\n\t\t\t&:indeterminate::before {\n\t\t\t\ttransform: translateX(0.75em);\n\t\t\t}\n\t\t}\n\n\t\t.kol-icon {\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 1.2em;\n\t\t\theight: 1.2em;\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\ttop: 50%;\n\t\t\tleft: rem(4);\n\t\t\ttransform: translate(0, -50%);\n\t\t\ttransition: 0.5s;\n\t\t\tcolor: #000;\n\t\t}\n\n\t\t&#{$root}--checked .kol-icon {\n\t\t\ttransform: translate(1.5em, -50%);\n\t\t}\n\n\t\t&#{$root}--indeterminate .kol-icon {\n\t\t\ttransform: translate(0.75em, -50%);\n\t\t}\n\t}\n\n\t/**\n\t * Variant: Button\n\t */\n\t#{$root}--variant-button {\n\t\twidth: var(--a11y-min-size);\n\n\t\t.kol-icon {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: var(--a11y-min-size);\n\t\t\theight: var(--a11y-min-size);\n\t\t}\n\t}\n}\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type {\n\tCheckedPropType,\n\tFocusableElement,\n\tHideErrorPropType,\n\tIdPropType,\n\tIndeterminatePropType,\n\tInputCheckboxAPI,\n\tInputCheckboxIconsProp,\n\tInputCheckboxStates,\n\tInputCheckboxVariant,\n\tInputTypeOnDefault,\n\tLabelAlignPropType,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { InputCheckboxController } from './controller';\n\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper';\nimport KolFieldControlStateWrapperFc, { type FieldControlStateWrapperProps } from '../../functional-component-wrappers/FieldControlStateWrapper';\nimport KolCheckboxStateWrapperFc, { type CheckboxStateWrapperProps } from '../../functional-component-wrappers/CheckboxStateWrapper';\n\n/**\n * @slot expert - Checkbox description.\n */\n@Component({\n\ttag: 'kol-input-checkbox',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolInputCheckbox implements InputCheckboxAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolInputCheckboxElement;\n\tprivate inputRef?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.inputRef = ref;\n\t};\n\n\tprivate getModelValue(): StencilUnknown {\n\t\treturn this._checked ? this.state._value : null;\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<StencilUnknown> {\n\t\treturn this.getModelValue();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.inputRef?.focus();\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tclass: clsx('kol-input-checkbox', {\n\t\t\t\t[`kol-input-checkbox--checked`]: this.state._checked,\n\t\t\t\t[`kol-input-checkbox--indeterminate`]: this.state._indeterminate,\n\t\t\t\t[`kol-input-checkbox--variant-${this.state._variant || 'default'}`]: true,\n\t\t\t\t[`kol-input-checkbox--label-align-${this.state._labelAlign || 'right'}`]: true,\n\t\t\t}),\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\t'data-role': this.state._variant === 'button' ? 'button' : undefined,\n\t\t\talert: this.showAsAlert(),\n\t\t\trenderNoTooltip: true,\n\t\t};\n\t}\n\n\tprivate getFieldControlProps(): FieldControlStateWrapperProps {\n\t\treturn {\n\t\t\tclass: clsx('kol-input-checkbox__field-control', {\n\t\t\t\t[`kol-input-checkbox__field-control--checked`]: this.state._checked,\n\t\t\t\t[`kol-input-checkbox__field-control--indeterminate`]: this.state._indeterminate,\n\t\t\t\t[`kol-input-checkbox__field-control--variant-${this.state._variant || 'default'}`]: true,\n\t\t\t}),\n\t\t\tstate: this.state,\n\t\t};\n\t}\n\n\tprivate getInputProps(): CheckboxStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\ticon: this.getIcon(),\n\t\t\tinputProps: {\n\t\t\t\tclass: clsx({\n\t\t\t\t\t'visually-hidden': this.state._variant === 'button',\n\t\t\t\t}),\n\t\t\t\tref: this.catchRef,\n\t\t\t\t...this.controller.onFacade,\n\t\t\t\tonInput: this.onInput,\n\t\t\t\tonChange: this.onChange,\n\t\t\t\tonFocus: (event: Event) => {\n\t\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\t\tthis.inputHasFocus = true;\n\t\t\t\t},\n\t\t\t\tonBlur: (event: Event) => {\n\t\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\t\tthis.inputHasFocus = false;\n\t\t\t\t},\n\t\t\t\tonClick: undefined, // onClick is not needed since onChange already triggers the correct event\n\t\t\t},\n\t\t};\n\t}\n\n\tprivate getIcon(): string {\n\t\tif (this.state._indeterminate) return this.state._icons.indeterminate;\n\t\tif (this.state._checked) return this.state._icons.checked;\n\t\treturn this.state._icons.unchecked;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()} renderNoLabel>\n\t\t\t\t<KolFieldControlStateWrapperFc {...this.getFieldControlProps()} renderNoHint>\n\t\t\t\t\t<KolCheckboxStateWrapperFc {...this.getInputProps()} />\n\t\t\t\t</KolFieldControlStateWrapperFc>\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputCheckboxController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the checkbox is checked or not. Can be read and written.\n\t * @TODO: Change type back to `CheckedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _checked?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<InputCheckboxIconsProp>;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Puts the checkbox in the indeterminate state, does not change the value of _checked.\n\t * @TODO: Change type back to `IndeterminatePropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _indeterminate?: boolean;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines which alignment should be used for presentation.\n\t */\n\t@Prop() public _labelAlign?: LabelAlignPropType = 'right';\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown> = true;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: InputCheckboxVariant = 'default';\n\n\t@State() public state: InputCheckboxStates = {\n\t\t_checked: false,\n\t\t_hideError: false,\n\t\t_icons: {\n\t\t\tchecked: 'codicon codicon-check',\n\t\t\tindeterminate: 'codicon codicon-remove',\n\t\t\tunchecked: 'codicon codicon-close',\n\t\t},\n\t\t_id: `id-${nonce()}`,\n\t\t_indeterminate: false,\n\t\t_label: '', // ⚠ required\n\t\t_value: true,\n\t\t_variant: 'default',\n\t\t_labelAlign: 'right',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new InputCheckboxController(this, 'checkbox', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_checked')\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tthis.controller.validateChecked(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_indeterminate')\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tthis.controller.validateIndeterminate(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_labelAlign')\n\tpublic validateLabelAlign(value?: LabelAlignPropType): void {\n\t\tthis.controller.validateLabelAlign(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\tthis.controller.validateVariant(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n\n\tprivate onInput = (event: Event): void => {\n\t\tthis._checked = !this._checked;\n\t\tthis._indeterminate = false;\n\n\t\tconst value = this.getModelValue();\n\t\tthis.controller.onFacade.onInput(event, false, value);\n\t\tthis.controller.setFormAssociatedCheckboxValue(value);\n\t};\n\n\tprivate onChange = (event: Event): void => {\n\t\tthis.controller.onFacade.onChange(event, this.getModelValue());\n\t};\n}\n"],"mappings":";;;0qCAqBO,MAAMA,EAA8B,CAAC,SAAU,UAAW,UCN1D,MAAMC,EAAkB,CAACC,EAAsCC,KACrEC,EAAaF,EAAW,WAAYC,EAAM,ECDpC,MAAME,EAAwB,CAACH,EAAsCC,KAC3EC,EAAaF,EAAW,iBAAkBC,EAAM,ECZjD,MAAMG,EAA4B,CAAC,OAAQ,SAWpC,MAAMC,EAAqB,CAACL,EAAsCC,KACxEK,EACCN,EACA,eACCC,UAAiBA,IAAU,UAAYG,EAA0BG,SAASN,IAC3E,IAAIO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AWxE,gBAAgBpC,E,CAG1B,iBAAAqC,GACNtB,KAAKoE,SAAWpE,KAAKoE,WAAa,KAClCpE,KAAK6F,WAAWvE,mB","ignoreList":[]}
|
1
|
+
{"version":3,"names":["inputCheckboxVariantOptions","validateChecked","component","value","watchBoolean","validateIndeterminate","labelAlignPropTypeOptions","validateLabelAlign","watchValidator","includes","Set","join","InputCheckboxController","InputCheckboxRadioController","constructor","name","host","super","this","setFormAssociatedCheckboxValue","_checked","setFormAssociatedValue","state","_value","validateIcons","isString","checked","indeterminate","unchecked","hooks","beforePatch","nextValue","nextState","set","Object","assign","_icons","validateValue","setState","validateVariant","componentWillLoad","_indeterminate","_variant","_labelAlign","IconWrapperFc","_a","class","classNames","other","__rest","h","KolIconFc","clsx","InputWrapperFc","KolInputFc","type","CheckboxFc","variant","icon","inputProps","showMsg","checkHasError","msg","touched","cssVariants","Boolean","disabled","required","_b","label","icons","KolCheckboxFc","getCheckboxProps","ariaDescribedBy","getRenderStates","props","id","_id","hideLabel","_hideLabel","_label","accessKey","_accessKey","_disabled","_name","_required","_touched","convertMsgToInternMsg","_msg","CheckboxStateWrapper","KolCheckboxStateWrapperFc","defaultStyleCss","KolInputCheckboxDefaultStyle0","KolInputCheckbox","getModelValue","getValue","kolFocus","inputRef","focus","getFormFieldProps","tooltipAlign","_tooltipAlign","undefined","alert","showAsAlert","renderNoTooltip","getFieldControlProps","getInputProps","getIcon","ref","catchRef","controller","onFacade","onInput","onChange","onFocus","event","inputHasFocus","onBlur","onClick","render","KolFormFieldStateWrapperFc","key","renderNoLabel","KolFieldControlStateWrapperFc","renderNoHint","hostRef","_hideMsg","nonce","validateAccessKey","validateDisabled","validateHideMsg","validateHideLabel","validateHint","validateId","validateLabel","validateMsg","validateName","validateOn","validateRequired","validateShortKey","validateSyncValueBySelector","validateTabIndex","validateTouched"],"sources":["src/schema/components/input-checkbox.ts","src/schema/props/checked.ts","src/schema/props/indeterminate.ts","src/schema/props/label-align.ts","src/components/input-checkbox/controller.ts","src/functional-components/inputs/Checkbox/Checkbox.tsx","src/functional-component-wrappers/CheckboxStateWrapper/CheckboxStateWrapper.tsx","src/components/input-checkbox/style.scss?tag=kol-input-checkbox&mode=default&encapsulation=shadow","src/components/input-checkbox/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tMsgPropType,\n\tPropChecked,\n\tPropDisabled,\n\tPropHideMsg,\n\tPropHideLabel,\n\tPropIndeterminate,\n\tPropLabelAlign,\n\tPropLabelWithExpertSlot,\n\tPropMsg,\n\tPropName,\n\tPropRequired,\n\tPropSyncValueBySelector,\n\tPropTouched,\n\tPropShortKey,\n\tPropAccessKey,\n} from '../props';\nimport type { AnyIconFontClass, InputTypeOnDefault, StencilUnknown, Stringified } from '../types';\n\nexport const inputCheckboxVariantOptions = ['button', 'default', 'switch'] as const;\nexport type InputCheckboxVariant = (typeof inputCheckboxVariantOptions)[number];\n\nexport type InputCheckboxIconsProp =\n\t| {\n\t\t\tchecked: AnyIconFontClass;\n\t\t\tindeterminate?: AnyIconFontClass;\n\t\t\tunchecked?: AnyIconFontClass;\n\t }\n\t| {\n\t\t\tchecked?: AnyIconFontClass;\n\t\t\tindeterminate: AnyIconFontClass;\n\t\t\tunchecked?: AnyIconFontClass;\n\t }\n\t| {\n\t\t\tchecked?: AnyIconFontClass;\n\t\t\tindeterminate?: AnyIconFontClass;\n\t\t\tunchecked: AnyIconFontClass;\n\t };\n\nexport type InputCheckboxIconsState = {\n\tchecked: AnyIconFontClass;\n\tindeterminate: AnyIconFontClass;\n\tunchecked: AnyIconFontClass;\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\thint: string;\n\ticons: Stringified<InputCheckboxIconsProp>;\n\tmsg: Stringified<MsgPropType>;\n\ton: InputTypeOnDefault;\n\ttabIndex: number;\n\tvalue: Stringified<StencilUnknown>;\n\tvariant: InputCheckboxVariant;\n} & PropAccessKey &\n\tPropChecked &\n\tPropDisabled &\n\tPropHideMsg &\n\tPropHideLabel &\n\tPropIndeterminate &\n\tPropName &\n\tPropRequired &\n\tPropShortKey &\n\tPropSyncValueBySelector &\n\tPropTouched &\n\tPropLabelAlign;\n\ntype RequiredStates = {\n\ticons: InputCheckboxIconsState;\n\tid: string;\n\tvalue: StencilUnknown;\n\tvariant: InputCheckboxVariant;\n} & PropChecked &\n\tPropHideMsg &\n\tPropIndeterminate &\n\tPropLabelWithExpertSlot;\ntype OptionalStates = {\n\thint: string;\n\ton: InputTypeOnDefault;\n\ttabIndex: number;\n} & PropAccessKey &\n\tPropDisabled &\n\tPropHideLabel &\n\tPropMsg &\n\tPropName &\n\tPropRequired &\n\tPropShortKey &\n\tPropTouched &\n\tPropLabelAlign;\n\nexport type InputCheckboxProps = Generic.Element.Members<RequiredProps, OptionalProps>;\nexport type InputCheckboxStates = Generic.Element.Members<RequiredStates, OptionalStates>;\nexport type InputCheckboxWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\nexport type InputCheckboxAPI = Generic.Element.ComponentApi<RequiredProps, OptionalProps, RequiredStates, OptionalStates>;\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type CheckedPropType = boolean;\n\n/**\n * Defines whether the checkbox is checked or not. Can be read and written.\n */\nexport type PropChecked = {\n\tchecked: CheckedPropType;\n};\n\n/* validator */\nexport const validateChecked = (component: Generic.Element.Component, value?: CheckedPropType): void => {\n\twatchBoolean(component, '_checked', value);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchBoolean } from '../utils';\n\n/* types */\nexport type IndeterminatePropType = boolean;\n\n/**\n * Puts the checkbox in the indeterminate state, does not change the value of _checked.\n */\nexport type PropIndeterminate = {\n\tindeterminate: IndeterminatePropType;\n};\n\n/* validator */\nexport const validateIndeterminate = (component: Generic.Element.Component, value?: IndeterminatePropType): void => {\n\twatchBoolean(component, '_indeterminate', value);\n};\n","/* types */\nimport type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../utils';\n\nconst labelAlignPropTypeOptions = ['left', 'right'] as const;\nexport type LabelAlignPropType = (typeof labelAlignPropTypeOptions)[number];\n\n/**\n * Defines which alignment should be used for presentation.\n */\nexport type PropLabelAlign = {\n\tlabelAlign: LabelAlignPropType;\n};\n\n/* validator */\nexport const validateLabelAlign = (component: Generic.Element.Component, value?: LabelAlignPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t`_labelAlign`,\n\t\t(value) => typeof value === 'string' && labelAlignPropTypeOptions.includes(value),\n\t\tnew Set([`KoliBriLabelAlign {${labelAlignPropTypeOptions.join(', ')}`]),\n\t\tvalue,\n\t);\n};\n","import type {\n\tCheckedPropType,\n\tIndeterminatePropType,\n\tInputCheckboxIconsProp,\n\tInputCheckboxIconsState,\n\tInputCheckboxProps,\n\tInputCheckboxVariant,\n\tInputCheckboxWatches,\n\tLabelAlignPropType,\n\tStencilUnknown,\n\tStringified,\n} from '../../schema';\nimport { inputCheckboxVariantOptions, isString, setState, validateChecked, validateIndeterminate, validateLabelAlign, watchValidator } from '../../schema';\n\nimport { InputCheckboxRadioController } from '../input-radio/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class InputCheckboxController extends InputCheckboxRadioController implements InputCheckboxWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly setFormAssociatedCheckboxValue = (value: StencilUnknown) => {\n\t\tif (this.component._checked) {\n\t\t\tthis.setFormAssociatedValue(value);\n\t\t} else {\n\t\t\tthis.setFormAssociatedValue(null);\n\t\t}\n\t};\n\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tvalidateChecked(this.component, value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\treturn typeof value === 'object' && value !== null && (isString(value.checked, 1) || isString(value.indeterminate, 1) || isString(value.unchecked, 1));\n\t\t\t},\n\t\t\tnew Set(['InputCheckboxIcons']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (nextValue: unknown, nextState: Map<string, unknown>, component: Generic.Element.Component) => {\n\t\t\t\t\t\tnextState.set('_icons', {\n\t\t\t\t\t\t\t...(component.state._icons as InputCheckboxIconsState),\n\t\t\t\t\t\t\t...(nextValue as InputCheckboxIconsProp),\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t}\n\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tvalidateIndeterminate(this.component, value);\n\t}\n\n\tpublic validateLabelAlign(value?: LabelAlignPropType): void {\n\t\tvalidateLabelAlign(this.component, value);\n\t}\n\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tsetState(this.component, '_value', value);\n\t\tthis.setFormAssociatedCheckboxValue(this.component.state._value as StencilUnknown);\n\t}\n\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_variant',\n\t\t\t(value): boolean => typeof value === 'string' && inputCheckboxVariantOptions.includes(value),\n\t\t\tnew Set([`String {${inputCheckboxVariantOptions.join(', ')}`]),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateChecked(this.component._checked);\n\t\tthis.validateIcons(this.component._icons);\n\t\tthis.validateIndeterminate(this.component._indeterminate);\n\t\tthis.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t\tthis.validateLabelAlign(this.component._labelAlign);\n\t}\n}\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport KolIconFc, { type IconProps } from '../../Icon';\nimport KolInputFc, { type InputProps } from '../Input';\nimport { checkHasError } from '../../../schema';\n\nexport type CheckboxProps = JSXBase.HTMLAttributes<HTMLLabelElement> & {\n\ticon: string;\n\tvariant?: 'default' | 'button' | 'switch';\n\tinputProps: InputProps;\n};\n\nconst IconWrapperFc: FC<IconProps> = ({ class: classNames, ...other }) => {\n\treturn <KolIconFc class={clsx('kol-checkbox__icon', classNames)} {...other} />;\n};\n\nconst InputWrapperFc: FC<InputProps> = ({ class: classNames, ...other }) => {\n\treturn <KolInputFc class={clsx('kol-checkbox__input', classNames)} {...other} type=\"checkbox\" />;\n};\n\nconst CheckboxFc: FC<CheckboxProps> = ({ class: classNames, variant = 'default', icon, inputProps, ...other }) => {\n\tconst showMsg = checkHasError(inputProps?.msg, inputProps?.touched);\n\n\tconst cssVariants = {\n\t\t[`kol-checkbox--variant-${variant}`]: true,\n\t\t[`kol-checkbox--checked`]: inputProps?.checked,\n\t\t[`kol-checkbox--indeterminate`]: inputProps?.indeterminate,\n\t\t['kol-checkbox--disabled']: Boolean(inputProps?.disabled),\n\t\t['kol-checkbox--required']: Boolean(inputProps?.required),\n\t\t['kol-checkbox--touched']: Boolean(inputProps?.touched),\n\t\t[`kol-checkbox--${inputProps?.msg?.type || 'error'}`]: Boolean(showMsg),\n\t};\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/label-has-associated-control\n\t\t<label class={clsx('kol-checkbox', cssVariants, classNames)} {...other}>\n\t\t\t<IconWrapperFc label=\"\" icons={icon} />\n\t\t\t<InputWrapperFc {...inputProps} />\n\t\t</label>\n\t);\n};\nexport default CheckboxFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolCheckboxFc, { type CheckboxProps } from '../../functional-components/inputs/Checkbox';\nimport { type InputProps } from '../../functional-components/inputs/Input';\n\nimport { type InputCheckboxStates, convertMsgToInternMsg } from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\n\nexport type CheckboxStateWrapperProps = Omit<CheckboxProps, 'inputProps'> & {\n\tstate: InputCheckboxStates;\n\tinputProps?: Partial<InputProps>;\n};\n\nfunction getCheckboxProps(state: InputCheckboxStates, inputProps: Partial<InputProps> = {}): InputProps {\n\tconst { ariaDescribedBy } = getRenderStates(state);\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tvalue: state._value as string | number | string[],\n\t\taccessKey: state._accessKey,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\n\t\tariaDescribedBy: ariaDescribedBy,\n\t};\n\n\tif ('_required' in state) props.required = state._required;\n\tif ('_checked' in state) props.checked = state._checked;\n\tif ('_indeterminate' in state) props.indeterminate = state._indeterminate;\n\tif ('_touched' in state) props.touched = state._touched;\n\tif ('_msg' in state) props.msg = convertMsgToInternMsg(state._msg);\n\n\treturn { ...props, ...inputProps };\n}\n\nconst CheckboxStateWrapper: FC<CheckboxStateWrapperProps> = ({ state, inputProps, ...other }) => {\n\tconst variant = state?._variant || 'default';\n\n\treturn <KolCheckboxFc variant={variant} inputProps={getCheckboxProps(state, inputProps)} {...other} />;\n};\n\nexport default CheckboxStateWrapper;\n","@import '../../styles/global';\n@import '../../styles/kol-field-control-mixin';\n@import '../../styles/kol-form-field-mixin';\n@import '../@shared/mixins';\n@import '../host-display-block';\n@import '../tooltip/style';\n\n@include kol-form-field;\n@include kol-field-control;\n\n@layer kol-component {\n\t$root: '.kol-checkbox';\n\n\t.kol-form-field {\n\t\tdisplay: grid;\n\t}\n\n\t#{$root} {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\t.kol-input {\n\t\t\tfont-size: rem(16);\n\n\t\t\tappearance: none;\n\t\t\tbackground-color: #fff;\n\t\t\tcursor: pointer;\n\t\t\ttransition: 0.5s;\n\n\t\t\tmargin: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-width: rem(2);\n\n\t\t\t&:before {\n\t\t\t\tcontent: '';\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t&:disabled:before {\n\t\t\t\tcursor: not-allowed;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Variant: Checkbox\n\t */\n\t#{$root}--variant-default {\n\t\theight: var(--a11y-min-size);\n\t\tjustify-content: center;\n\t\tposition: relative;\n\t\twidth: var(--a11y-min-size);\n\n\t\t.kol-icon {\n\t\t\tdisplay: flex;\n\t\t\tinset: auto;\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\tpointer-events: none;\n\n\t\t\t&::part(icon) {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\n\t\t.kol-input {\n\t\t\twidth: rem(22);\n\t\t\theight: rem(22);\n\t\t}\n\n\t\t&#{$root}--checked,\n\t\t&#{$root}--indeterminate {\n\t\t\t.kol-icon::part(icon) {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Variant: Switch\n\t */\n\t#{$root}--variant-switch {\n\t\tposition: relative;\n\n\t\t.kol-input {\n\t\t\tdisplay: inline-block;\n\t\t\theight: 1.7em;\n\t\t\tmin-width: 3.2em;\n\t\t\tposition: relative;\n\t\t\twidth: 3.2em;\n\n\t\t\t&::before {\n\t\t\t\tbackground-color: #000;\n\t\t\t\theight: 1.2em;\n\t\t\t\tleft: calc(0.25em - rem(2));\n\t\t\t\ttop: calc(0.25em - rem(2));\n\t\t\t\tposition: absolute;\n\t\t\t\ttransition: 0.5s;\n\t\t\t\twidth: 1.2em;\n\t\t\t}\n\n\t\t\t&:checked::before {\n\t\t\t\ttransform: translateX(1.5em);\n\t\t\t}\n\n\t\t\t&:indeterminate::before {\n\t\t\t\ttransform: translateX(0.75em);\n\t\t\t}\n\t\t}\n\n\t\t.kol-icon {\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: 1.2em;\n\t\t\theight: 1.2em;\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\ttop: 50%;\n\t\t\tleft: rem(4);\n\t\t\ttransform: translate(0, -50%);\n\t\t\ttransition: 0.5s;\n\t\t\tcolor: #000;\n\t\t}\n\n\t\t&#{$root}--checked .kol-icon {\n\t\t\ttransform: translate(1.5em, -50%);\n\t\t}\n\n\t\t&#{$root}--indeterminate .kol-icon {\n\t\t\ttransform: translate(0.75em, -50%);\n\t\t}\n\t}\n\n\t/**\n\t * Variant: Button\n\t */\n\t#{$root}--variant-button {\n\t\twidth: var(--a11y-min-size);\n\n\t\t.kol-icon {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\twidth: var(--a11y-min-size);\n\t\t\theight: var(--a11y-min-size);\n\t\t}\n\t}\n}\n","/* eslint-disable jsx-a11y/label-has-associated-control */\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type {\n\tCheckedPropType,\n\tFocusableElement,\n\tHideMsgPropType,\n\tIdPropType,\n\tIndeterminatePropType,\n\tInputCheckboxAPI,\n\tInputCheckboxIconsProp,\n\tInputCheckboxStates,\n\tInputCheckboxVariant,\n\tInputTypeOnDefault,\n\tLabelAlignPropType,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { InputCheckboxController } from './controller';\n\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper';\nimport KolFieldControlStateWrapperFc, { type FieldControlStateWrapperProps } from '../../functional-component-wrappers/FieldControlStateWrapper';\nimport KolCheckboxStateWrapperFc, { type CheckboxStateWrapperProps } from '../../functional-component-wrappers/CheckboxStateWrapper';\n\n/**\n * @slot expert - Checkbox description.\n */\n@Component({\n\ttag: 'kol-input-checkbox',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolInputCheckbox implements InputCheckboxAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolInputCheckboxElement;\n\tprivate inputRef?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.inputRef = ref;\n\t};\n\n\tprivate getModelValue(): StencilUnknown {\n\t\treturn this._checked ? this.state._value : null;\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<StencilUnknown> {\n\t\treturn this.getModelValue();\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.inputRef?.focus();\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tclass: clsx('kol-input-checkbox', {\n\t\t\t\t[`kol-input-checkbox--checked`]: this.state._checked,\n\t\t\t\t[`kol-input-checkbox--indeterminate`]: this.state._indeterminate,\n\t\t\t\t[`kol-input-checkbox--variant-${this.state._variant || 'default'}`]: true,\n\t\t\t\t[`kol-input-checkbox--label-align-${this.state._labelAlign || 'right'}`]: true,\n\t\t\t}),\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\t'data-role': this.state._variant === 'button' ? 'button' : undefined,\n\t\t\talert: this.showAsAlert(),\n\t\t\trenderNoTooltip: true,\n\t\t};\n\t}\n\n\tprivate getFieldControlProps(): FieldControlStateWrapperProps {\n\t\treturn {\n\t\t\tclass: clsx('kol-input-checkbox__field-control', {\n\t\t\t\t[`kol-input-checkbox__field-control--checked`]: this.state._checked,\n\t\t\t\t[`kol-input-checkbox__field-control--indeterminate`]: this.state._indeterminate,\n\t\t\t\t[`kol-input-checkbox__field-control--variant-${this.state._variant || 'default'}`]: true,\n\t\t\t}),\n\t\t\tstate: this.state,\n\t\t};\n\t}\n\n\tprivate getInputProps(): CheckboxStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\ticon: this.getIcon(),\n\t\t\tinputProps: {\n\t\t\t\tclass: clsx({\n\t\t\t\t\t'visually-hidden': this.state._variant === 'button',\n\t\t\t\t}),\n\t\t\t\tref: this.catchRef,\n\t\t\t\t...this.controller.onFacade,\n\t\t\t\tonInput: this.onInput,\n\t\t\t\tonChange: this.onChange,\n\t\t\t\tonFocus: (event: Event) => {\n\t\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\t\tthis.inputHasFocus = true;\n\t\t\t\t},\n\t\t\t\tonBlur: (event: Event) => {\n\t\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\t\tthis.inputHasFocus = false;\n\t\t\t\t},\n\t\t\t\tonClick: undefined, // onClick is not needed since onChange already triggers the correct event\n\t\t\t},\n\t\t};\n\t}\n\n\tprivate getIcon(): string {\n\t\tif (this.state._indeterminate) return this.state._icons.indeterminate;\n\t\tif (this.state._checked) return this.state._icons.checked;\n\t\treturn this.state._icons.unchecked;\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()} renderNoLabel>\n\t\t\t\t<KolFieldControlStateWrapperFc {...this.getFieldControlProps()} renderNoHint>\n\t\t\t\t\t<KolCheckboxStateWrapperFc {...this.getInputProps()} />\n\t\t\t\t</KolFieldControlStateWrapperFc>\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputCheckboxController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the checkbox is checked or not. Can be read and written.\n\t * @TODO: Change type back to `CheckedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _checked?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideMsgPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideMsg?: boolean = false;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<InputCheckboxIconsProp>;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Puts the checkbox in the indeterminate state, does not change the value of _checked.\n\t * @TODO: Change type back to `IndeterminatePropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _indeterminate?: boolean;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines which alignment should be used for presentation.\n\t */\n\t@Prop() public _labelAlign?: LabelAlignPropType = 'right';\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown> = true;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: InputCheckboxVariant = 'default';\n\n\t@State() public state: InputCheckboxStates = {\n\t\t_checked: false,\n\t\t_hideMsg: false,\n\t\t_icons: {\n\t\t\tchecked: 'codicon codicon-check',\n\t\t\tindeterminate: 'codicon codicon-remove',\n\t\t\tunchecked: 'codicon codicon-close',\n\t\t},\n\t\t_id: `id-${nonce()}`,\n\t\t_indeterminate: false,\n\t\t_label: '', // ⚠ required\n\t\t_value: true,\n\t\t_variant: 'default',\n\t\t_labelAlign: 'right',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new InputCheckboxController(this, 'checkbox', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_checked')\n\tpublic validateChecked(value?: CheckedPropType): void {\n\t\tthis.controller.validateChecked(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideMsg')\n\tpublic validateHideMsg(value?: HideMsgPropType): void {\n\t\tthis.controller.validateHideMsg(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<InputCheckboxIconsProp>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_indeterminate')\n\tpublic validateIndeterminate(value?: IndeterminatePropType): void {\n\t\tthis.controller.validateIndeterminate(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_labelAlign')\n\tpublic validateLabelAlign(value?: LabelAlignPropType): void {\n\t\tthis.controller.validateLabelAlign(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: Stringified<StencilUnknown>): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: InputCheckboxVariant): void {\n\t\tthis.controller.validateVariant(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n\n\tprivate onInput = (event: Event): void => {\n\t\tthis._checked = !this._checked;\n\t\tthis._indeterminate = false;\n\n\t\tconst value = this.getModelValue();\n\t\tthis.controller.onFacade.onInput(event, false, value);\n\t\tthis.controller.setFormAssociatedCheckboxValue(value);\n\t};\n\n\tprivate onChange = (event: Event): void => {\n\t\tthis.controller.onFacade.onChange(event, this.getModelValue());\n\t};\n}\n"],"mappings":";;;qlCAqBO,MAAMA,EAA8B,CAAC,SAAU,UAAW,UCN1D,MAAMC,EAAkB,CAACC,EAAsCC,KACrEC,EAAaF,EAAW,WAAYC,EAAM,ECDpC,MAAME,EAAwB,CAACH,EAAsCC,KAC3EC,EAAaF,EAAW,iBAAkBC,EAAM,ECZjD,MAAMG,EAA4B,CAAC,OAAQ,SAWpC,MAAMC,EAAqB,CAACL,EAAsCC,KACxEK,EACCN,EACA,eACCC,UAAiBA,IAAU,UAAYG,EAA0BG,SAASN,IAC3E,IAAIO,IAAI,CAAC,sBAAsBJ,EAA0BK,KAAK,UAC9DR,EACA,E,MCLWS,UAAgCC,EAG5C,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pE,KAAK6F,WAAWvE,mB","ignoreList":[]}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h as n,r as t,g as e}from"./index-095473f8.js";import{n as i}from"./dev.utils-a3bfded4.js";import{I as o}from"./controller-icon-d99920a4.js";import{v as a}from"./suggestions-f139f5ec.js";import{w as s,i as l}from"./prop.validators-9feb1d92.js";import{K as r}from"./InputContainerStateWrapper-5cf1f1e5.js";import{K as d}from"./InputStateWrapper-14a4f1d3.js";import{K as h}from"./getRenderStates-f8d64e58.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./controller-0434e53f.js";import"./events-5adf6b62.js";import"./associated.controller-52d302aa.js";import"./access-and-short-key-9cca88b8.js";import"./tooltip-align-8e0fa436.js";import"./align-4719d626.js";import"./hide-label-429a15ea.js";import"./msg-0c13cf1c.js";import"./common-54bf85ba.js";import"./label-d0315384.js";import"./icons-199f1746.js";import"./index-da3e0c00.js";import"./isString-5af96894.js";import"./isObject-ffcbbb76.js";import"./tslib.es6-1173d062.js";import"./component-names-50e16b86.js";import"./Icon-0a8aaa01.js";import"./clsx-09a06a12.js";import"./Input-199b40e8.js";import"./FormFieldMsg-12e502c7.js";import"./Alert-130db08c.js";import"./i18n-5fe08f1c.js";import"./i18n-7ea9f137.js";import"./Heading-401912a9.js";import"./InternalUnderlinedBadgeText-8e356b64.js";const c=["on","off"];class m extends o{constructor(t,n,e){super(t,n,e),this.component=t}validateAutoComplete(t){s(this.component,"_autoComplete",(t=>"string"==typeof t&&c.includes(t)),new Set(c),t)}validateSuggestions(t){a(this.component,t)}validateValue(t){l(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const p="/*\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 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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\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,\n [disabled]:focus .kol-span {\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 {\n display: contents;\n }\n .kol-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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 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}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n cursor: pointer;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n height: calc(44rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",u=p,f=class{async getValue(){var t;return null===(t=this.inputRef)||void 0===t?void 0:t.value}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}getFormFieldProps(){return{state:this.state,class:"kol-input-color",tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,type:"color",slot:"input",state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput})}render(){return n(h,Object.assign({key:"9685b88440ba4fb5fa56d14dd3a60e6ec071e54b"},this.getFormFieldProps()),n(r,{key:"e237de181840ff7a8c03782d06b26792bf434355",state:this.state},n(d,Object.assign({key:"163688653e2b4d90a9336696486185c027dd84ed"},this.getInputProps()))))}constructor(n){t(this,n),this.catchRef=t=>{this.inputRef=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onInput=t=>{var n,e;this._value=null!==(e=null===(n=this.inputRef)||void 0===n?void 0:n.value)&&void 0!==e?e:"",this.controller.onFacade.onInput(t)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideError:!1,_id:`id-${i()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new m(this,"color",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateValue(t){this.controller.validateValue(t)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};f.style={default:u};export{f as kol_input_color};
|
4
|
+
import{h as n,r as t,g as e}from"./index-91489a9f.js";import{n as i}from"./dev.utils-b9e6a3e1.js";import{I as o,K as a}from"./controller-icon-4be72f9f.js";import{v as s}from"./suggestions-f139f5ec.js";import{w as l,i as r}from"./prop.validators-9feb1d92.js";import{K as d}from"./InputStateWrapper-e1a2298b.js";import{K as c}from"./getRenderStates-a7a33541.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./InternalUnderlinedBadgeText-22278de8.js";import"./isObject-ffcbbb76.js";import"./tslib.es6-1173d062.js";import"./component-names-a18a51c8.js";import"./Icon-936c5cfc.js";import"./clsx-09a06a12.js";import"./FormFieldMsg-1ed3f51d.js";import"./common-54bf85ba.js";import"./Alert-080adf2e.js";import"./i18n-5fe08f1c.js";import"./i18n-7ea9f137.js";import"./Heading-0459992b.js";import"./icons-199f1746.js";import"./index-da3e0c00.js";import"./Input-40160769.js";import"./events-5adf6b62.js";import"./associated.controller-52d302aa.js";import"./access-and-short-key-9cca88b8.js";import"./tooltip-align-8e0fa436.js";import"./align-4719d626.js";import"./hide-label-429a15ea.js";import"./label-d0315384.js";const h=["on","off"];class m extends o{constructor(n,t,e){super(n,t,e),this.component=n}validateAutoComplete(n){l(this.component,"_autoComplete",(n=>"string"==typeof n&&h.includes(n)),new Set(h),n)}validateSuggestions(n){s(this.component,n)}validateValue(n){r(this.component,"_value",n),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateSuggestions(this.component._suggestions),this.validateValue(this.component._value)}}const u="/*\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 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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\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,\n [disabled]:focus .kol-span {\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 {\n display: contents;\n }\n .kol-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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 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}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n cursor: pointer;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n height: calc(44rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",p=u,f=class{async getValue(){var n;return null===(n=this.inputRef)||void 0===n?void 0:n.value}async kolFocus(){var n;null===(n=this.inputRef)||void 0===n||n.focus()}getFormFieldProps(){return{state:this.state,class:"kol-input-color",tooltipAlign:this._tooltipAlign,onClick:()=>{var n;return null===(n=this.inputRef)||void 0===n?void 0:n.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,type:"color",slot:"input",state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.onInput})}render(){return n(c,Object.assign({key:"2cc074d267724a8844cb3a74173a4158d5085dec"},this.getFormFieldProps()),n(a,{key:"97ab0641e442efdf1cae0db8b98ddc495dcbbb83",state:this.state},n(d,Object.assign({key:"04f39017c2a6c0056d7c72d2dbc868f6af0eb495"},this.getInputProps()))))}constructor(n){t(this,n),this.catchRef=n=>{this.inputRef=n},this.onBlur=n=>{this.controller.onFacade.onBlur(n),this.inputHasFocus=!1},this.onFocus=n=>{this.controller.onFacade.onFocus(n),this.inputHasFocus=!0},this.onInput=n=>{var t,e;this._value=null!==(e=null===(t=this.inputRef)||void 0===t?void 0:t.value)&&void 0!==e?e:"",this.controller.onFacade.onInput(n)},this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._value=void 0,this.state={_autoComplete:"off",_hideMsg:!1,_id:`id-${i()}`,_label:"",_suggestions:[]},this.inputHasFocus=!1,this.controller=new m(this,"color",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(n){this.controller.validateAccessKey(n)}validateAutoComplete(n){this.controller.validateAutoComplete(n)}validateDisabled(n){this.controller.validateDisabled(n)}validateHideMsg(n){this.controller.validateHideMsg(n)}validateHideLabel(n){this.controller.validateHideLabel(n)}validateHint(n){this.controller.validateHint(n)}validateIcons(n){this.controller.validateIcons(n)}validateId(n){this.controller.validateId(n)}validateLabel(n){this.controller.validateLabel(n)}validateMsg(n){this.controller.validateMsg(n)}validateName(n){this.controller.validateName(n)}validateOn(n){this.controller.validateOn(n)}validateShortKey(n){this.controller.validateShortKey(n)}validateSmartButton(n){this.controller.validateSmartButton(n)}validateSuggestions(n){this.controller.validateSuggestions(n)}validateSyncValueBySelector(n){this.controller.validateSyncValueBySelector(n)}validateTabIndex(n){this.controller.validateTabIndex(n)}validateTouched(n){this.controller.validateTouched(n)}validateValue(n){this.controller.validateValue(n)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return e(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_value:["validateValue"]}}};f.style={default:p};export{f as kol_input_color};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["inputTypeOnOffOptions","InputColorController","InputIconController","constructor","component","name","host","super","this","validateAutoComplete","value","watchValidator","includes","Set","validateSuggestions","validateValue","watchString","setFormAssociatedValue","state","_value","componentWillLoad","_autoComplete","_suggestions","defaultStyleCss","KolInputColorDefaultStyle0","KolInputColor","getValue","_a","inputRef","kolFocus","focus","getFormFieldProps","class","tooltipAlign","_tooltipAlign","onClick","alert","showAsAlert","getInputProps","Object","assign","ref","catchRef","type","slot","controller","onFacade","onBlur","onFocus","onInput","render","h","KolFormFieldStateWrapperFc","key","KolInputContainerFc","KolInputStateWrapperFc","hostRef","event","inputHasFocus","_b","_hideError","_id","nonce","_label","Boolean","_touched","validateAccessKey","validateDisabled","validateHideError","validateHideLabel","validateHint","validateIcons","validateId","validateLabel","validateMsg","validateName","validateOn","validateShortKey","validateSmartButton","validateSyncValueBySelector","validateTabIndex","validateTouched"],"sources":["src/schema/types/input/types.ts","src/components/input-color/controller.ts","src/components/input-color/style.scss?tag=kol-input-color&mode=default&encapsulation=shadow","src/components/input-color/shadow.tsx"],"sourcesContent":["import type { EventCallback, EventValueOrEventCallback } from '../callbacks';\nimport type { Callback } from '../../enums';\n\nexport const inputTypeOnOffOptions = ['on', 'off'] as const;\nexport type InputTypeOnOff = (typeof inputTypeOnOffOptions)[number];\n\ntype InputTypeOnBlur = {\n\t[Callback.onBlur]?: EventCallback<Event>;\n};\n\ntype InputTypeOnClick = {\n\t[Callback.onClick]?: EventCallback<Event>;\n};\n\ntype InputTypeOnChange = {\n\t[Callback.onChange]?: EventValueOrEventCallback<Event, unknown>;\n};\n\ntype InputTypeOnFocus = {\n\t[Callback.onFocus]?: EventCallback<Event>;\n};\n\ntype InputTypeOnInput = {\n\t[Callback.onInput]?: EventValueOrEventCallback<Event, unknown>;\n};\n\n// https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element\nexport type Option<T> = {\n\tdisabled?: boolean;\n\tlabel: string | number;\n\t// selected?: boolean; // wird über den value der *-Komponente gesteuert\n\tvalue: T;\n};\nexport type RadioOption<T> = Option<T> & {\n\thint?: string;\n};\nexport type Optgroup<T> = {\n\tdisabled?: boolean;\n\tlabel: string;\n\toptions: Option<T>[];\n};\n\nexport type SelectOption<T> = Option<T> | Optgroup<T> | RadioOption<T>;\n\nexport type InputTypeOnDefault = InputTypeOnBlur & InputTypeOnClick & InputTypeOnChange & InputTypeOnFocus & InputTypeOnInput;\n","import type { InputColorProps, InputColorWatches, InputTypeOnOff, SuggestionsPropType } from '../../schema';\nimport { inputTypeOnOffOptions, validateSuggestions, watchString, watchValidator } from '../../schema';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class InputColorController extends InputIconController implements InputColorWatches {\n\tprotected readonly component: Generic.Element.Component & InputColorProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputColorProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_autoComplete',\n\t\t\t(value): boolean => typeof value === 'string' && inputTypeOnOffOptions.includes(value),\n\t\t\tnew Set(inputTypeOnOffOptions),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateSuggestions(this.component._suggestions);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@import '../../styles/global';\n@import '../../styles/kol-alert-mixin';\n@import '../../styles/kol-form-field-mixin';\n@import '../../styles/kol-input-container-mixin';\n@import '../../styles/kol-input-mixin';\n@import '../@shared/mixins';\n\n@include kol-alert;\n@include kol-form-field;\n@include kol-input-container;\n@include kol-input;\n","import type {\n\tButtonProps,\n\tFocusableElement,\n\tHideErrorPropType,\n\tIdPropType,\n\tInputColorAPI,\n\tInputColorStates,\n\tInputTypeOnDefault,\n\tInputTypeOnOff,\n\tKoliBriHorizontalIcons,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tShortKeyPropType,\n\tStringified,\n\tSuggestionsPropType,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { nonce } from '../../utils/dev.utils';\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper';\nimport KolInputStateWrapperFc, { type InputStateWrapperProps } from '../../functional-component-wrappers/InputStateWrapper';\nimport KolInputContainerFc from '../../functional-component-wrappers/InputContainerStateWrapper';\nimport { InputColorController } from './controller';\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-input-color',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolInputColor implements InputColorAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolInputColorElement;\n\tprivate inputRef?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.inputRef = ref;\n\t};\n\n\tprivate readonly onBlur = (event: FocusEvent) => {\n\t\tthis.controller.onFacade.onBlur(event);\n\t\tthis.inputHasFocus = false;\n\t};\n\n\tprivate readonly onFocus = (event: FocusEvent) => {\n\t\tthis.controller.onFacade.onFocus(event);\n\t\tthis.inputHasFocus = true;\n\t};\n\n\tprivate readonly onInput = (event: InputEvent) => {\n\t\tthis._value = this.inputRef?.value ?? '';\n\t\tthis.controller.onFacade.onInput(event);\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<string | undefined> {\n\t\treturn this.inputRef?.value;\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.inputRef?.focus();\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tclass: 'kol-input-color',\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\tonClick: () => this.inputRef?.focus(),\n\t\t\talert: this.showAsAlert(),\n\t\t};\n\t}\n\n\tprivate getInputProps(): InputStateWrapperProps {\n\t\treturn {\n\t\t\tref: this.catchRef,\n\t\t\ttype: 'color',\n\t\t\tslot: 'input',\n\t\t\tstate: this.state,\n\t\t\t...this.controller.onFacade,\n\t\t\tonBlur: this.onBlur,\n\t\t\tonFocus: this.onFocus,\n\t\t\tonInput: this.onInput,\n\t\t};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()}>\n\t\t\t\t<KolInputContainerFc state={this.state}>\n\t\t\t\t\t<KolInputStateWrapperFc {...this.getInputProps()} />\n\t\t\t\t</KolInputContainerFc>\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputColorController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the input can be auto-completed.\n\t */\n\t@Prop() public _autoComplete?: InputTypeOnOff;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideErrorPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideError?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<KoliBriHorizontalIcons>;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop({ reflect: true }) public _value?: string;\n\n\t@State() public state: InputColorStates = {\n\t\t_autoComplete: 'off',\n\t\t_hideError: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_suggestions: [],\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new InputColorController(this, 'color', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_autoComplete')\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\tthis.controller.validateAutoComplete(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideError')\n\tpublic validateHideError(value?: HideErrorPropType): void {\n\t\tthis.controller.validateHideError(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tthis.controller.validateSmartButton(value);\n\t}\n\n\t@Watch('_suggestions')\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tthis.controller.validateSuggestions(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n}\n"],"mappings":";;;svCAGO,MAAMA,EAAwB,CAAC,KAAM,O,MCG/BC,UAA6BC,EAGzC,WAAAC,CAAmBC,EAAwDC,EAAcC,GACxFC,MAAM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a5D,E,CAIvB,aAAA6D,CAAc7D,GACpBF,KAAKqC,WAAW0B,cAAc7D,E,CAIxB,UAAA8D,CAAW9D,GACjBF,KAAKqC,WAAW2B,WAAW9D,E,CAIrB,aAAA+D,CAAc/D,GACpBF,KAAKqC,WAAW4B,cAAc/D,E,CAIxB,WAAAgE,CAAYhE,GAClBF,KAAKqC,WAAW6B,YAAYhE,E,CAItB,YAAAiE,CAAajE,GACnBF,KAAKqC,WAAW8B,aAAajE,E,CAIvB,UAAAkE,CAAWlE,GACjBF,KAAKqC,WAAW+B,WAAWlE,E,CAIrB,gBAAAmE,CAAiBnE,GACvBF,KAAKqC,WAAWgC,iBAAiBnE,E,CAI3B,mBAAAoE,CAAoBpE,GAC1BF,KAAKqC,WAAWiC,oBAAoBpE,E,CAI9B,mBAAAI,CAAoBJ,GAC1BF,KAAKqC,WAAW/B,oBAAoBJ,E,CAI9B,2BAAAqE,CAA4BrE,GAClCF,KAAKqC,WAAWkC,4BAA4BrE,E,CAItC,gBAAAsE,CAAiBtE,GACvBF,KAAKqC,WAAWmC,iBAAiBtE,E,CAI3B,eAAAuE,CAAgBvE,GACtBF,KAAKqC,WAAWoC,gBAAgBvE,E,CAI1B,aAAAK,CAAcL,GACpBF,KAAKqC,WAAW9B,cAAcL,E,CAGxB,iBAAAU,GACNZ,KAAKyD,SAAWzD,KAAKyD,WAAa,KAClCzD,KAAKqC,WAAWzB,mB","ignoreList":[]}
|
1
|
+
{"version":3,"names":["inputTypeOnOffOptions","InputColorController","InputIconController","constructor","component","name","host","super","this","validateAutoComplete","value","watchValidator","includes","Set","validateSuggestions","validateValue","watchString","setFormAssociatedValue","state","_value","componentWillLoad","_autoComplete","_suggestions","defaultStyleCss","KolInputColorDefaultStyle0","KolInputColor","getValue","_a","inputRef","kolFocus","focus","getFormFieldProps","class","tooltipAlign","_tooltipAlign","onClick","alert","showAsAlert","getInputProps","Object","assign","ref","catchRef","type","slot","controller","onFacade","onBlur","onFocus","onInput","render","h","KolFormFieldStateWrapperFc","key","KolInputContainerFc","KolInputStateWrapperFc","hostRef","event","inputHasFocus","_b","_hideMsg","_id","nonce","_label","Boolean","_touched","validateAccessKey","validateDisabled","validateHideMsg","validateHideLabel","validateHint","validateIcons","validateId","validateLabel","validateMsg","validateName","validateOn","validateShortKey","validateSmartButton","validateSyncValueBySelector","validateTabIndex","validateTouched"],"sources":["src/schema/types/input/types.ts","src/components/input-color/controller.ts","src/components/input-color/style.scss?tag=kol-input-color&mode=default&encapsulation=shadow","src/components/input-color/shadow.tsx"],"sourcesContent":["import type { EventCallback, EventValueOrEventCallback } from '../callbacks';\nimport type { Callback } from '../../enums';\n\nexport const inputTypeOnOffOptions = ['on', 'off'] as const;\nexport type InputTypeOnOff = (typeof inputTypeOnOffOptions)[number];\n\ntype InputTypeOnBlur = {\n\t[Callback.onBlur]?: EventCallback<Event>;\n};\n\ntype InputTypeOnClick = {\n\t[Callback.onClick]?: EventCallback<Event>;\n};\n\ntype InputTypeOnChange = {\n\t[Callback.onChange]?: EventValueOrEventCallback<Event, unknown>;\n};\n\ntype InputTypeOnFocus = {\n\t[Callback.onFocus]?: EventCallback<Event>;\n};\n\ntype InputTypeOnInput = {\n\t[Callback.onInput]?: EventValueOrEventCallback<Event, unknown>;\n};\n\n// https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element\nexport type Option<T> = {\n\tdisabled?: boolean;\n\tlabel: string | number;\n\t// selected?: boolean; // wird über den value der *-Komponente gesteuert\n\tvalue: T;\n};\nexport type RadioOption<T> = Option<T> & {\n\thint?: string;\n};\nexport type Optgroup<T> = {\n\tdisabled?: boolean;\n\tlabel: string;\n\toptions: Option<T>[];\n};\n\nexport type SelectOption<T> = Option<T> | Optgroup<T> | RadioOption<T>;\n\nexport type InputTypeOnDefault = InputTypeOnBlur & InputTypeOnClick & InputTypeOnChange & InputTypeOnFocus & InputTypeOnInput;\n","import type { InputColorProps, InputColorWatches, InputTypeOnOff, SuggestionsPropType } from '../../schema';\nimport { inputTypeOnOffOptions, validateSuggestions, watchString, watchValidator } from '../../schema';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\nexport class InputColorController extends InputIconController implements InputColorWatches {\n\tprotected readonly component: Generic.Element.Component & InputColorProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputColorProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\twatchValidator(\n\t\t\tthis.component,\n\t\t\t'_autoComplete',\n\t\t\t(value): boolean => typeof value === 'string' && inputTypeOnOffOptions.includes(value),\n\t\t\tnew Set(inputTypeOnOffOptions),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value);\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateSuggestions(this.component._suggestions);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n","@import '../../styles/global';\n@import '../../styles/kol-alert-mixin';\n@import '../../styles/kol-form-field-mixin';\n@import '../../styles/kol-input-container-mixin';\n@import '../../styles/kol-input-mixin';\n@import '../@shared/mixins';\n\n@include kol-alert;\n@include kol-form-field;\n@include kol-input-container;\n@include kol-input;\n","import type {\n\tButtonProps,\n\tFocusableElement,\n\tHideMsgPropType,\n\tIdPropType,\n\tInputColorAPI,\n\tInputColorStates,\n\tInputTypeOnDefault,\n\tInputTypeOnOff,\n\tKoliBriHorizontalIcons,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tShortKeyPropType,\n\tStringified,\n\tSuggestionsPropType,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\n\nimport { nonce } from '../../utils/dev.utils';\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper';\nimport KolInputStateWrapperFc, { type InputStateWrapperProps } from '../../functional-component-wrappers/InputStateWrapper';\nimport KolInputContainerFc from '../../functional-component-wrappers/InputContainerStateWrapper';\nimport { InputColorController } from './controller';\n\n/**\n * @slot - Die Beschriftung des Eingabefeldes.\n */\n@Component({\n\ttag: 'kol-input-color',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolInputColor implements InputColorAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolInputColorElement;\n\tprivate inputRef?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.inputRef = ref;\n\t};\n\n\tprivate readonly onBlur = (event: FocusEvent) => {\n\t\tthis.controller.onFacade.onBlur(event);\n\t\tthis.inputHasFocus = false;\n\t};\n\n\tprivate readonly onFocus = (event: FocusEvent) => {\n\t\tthis.controller.onFacade.onFocus(event);\n\t\tthis.inputHasFocus = true;\n\t};\n\n\tprivate readonly onInput = (event: InputEvent) => {\n\t\tthis._value = this.inputRef?.value ?? '';\n\t\tthis.controller.onFacade.onInput(event);\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<string | undefined> {\n\t\treturn this.inputRef?.value;\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.inputRef?.focus();\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tclass: 'kol-input-color',\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\tonClick: () => this.inputRef?.focus(),\n\t\t\talert: this.showAsAlert(),\n\t\t};\n\t}\n\n\tprivate getInputProps(): InputStateWrapperProps {\n\t\treturn {\n\t\t\tref: this.catchRef,\n\t\t\ttype: 'color',\n\t\t\tslot: 'input',\n\t\t\tstate: this.state,\n\t\t\t...this.controller.onFacade,\n\t\t\tonBlur: this.onBlur,\n\t\t\tonFocus: this.onFocus,\n\t\t\tonInput: this.onInput,\n\t\t};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()}>\n\t\t\t\t<KolInputContainerFc state={this.state}>\n\t\t\t\t\t<KolInputStateWrapperFc {...this.getInputProps()} />\n\t\t\t\t</KolInputContainerFc>\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputColorController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Defines whether the input can be auto-completed.\n\t */\n\t@Prop() public _autoComplete?: InputTypeOnOff;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideMsgPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideMsg?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: Stringified<KoliBriHorizontalIcons>;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Allows to add a button with an arbitrary action within the element (_hide-label only).\n\t */\n\t@Prop() public _smartButton?: Stringified<ButtonProps>;\n\n\t/**\n\t * Suggestions to provide for the input.\n\t */\n\t@Prop() public _suggestions?: SuggestionsPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)\n\t */\n\t@Prop() public _tabIndex?: number;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t */\n\t@Prop({ reflect: true }) public _value?: string;\n\n\t@State() public state: InputColorStates = {\n\t\t_autoComplete: 'off',\n\t\t_hideMsg: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_suggestions: [],\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new InputColorController(this, 'color', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_autoComplete')\n\tpublic validateAutoComplete(value?: InputTypeOnOff): void {\n\t\tthis.controller.validateAutoComplete(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideMsg')\n\tpublic validateHideMsg(value?: HideMsgPropType): void {\n\t\tthis.controller.validateHideMsg(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_icons')\n\tpublic validateIcons(value?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tthis.controller.validateIcons(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_smartButton')\n\tpublic validateSmartButton(value?: ButtonProps | string): void {\n\t\tthis.controller.validateSmartButton(value);\n\t}\n\n\t@Watch('_suggestions')\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tthis.controller.validateSuggestions(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_tabIndex')\n\tpublic validateTabIndex(value?: number): void {\n\t\tthis.controller.validateTabIndex(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value?: string): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n}\n"],"mappings":";;;smCAGO,MAAMA,EAAwB,CAAC,KAAM,O,MCG/BC,UAA6BC,EAGzC,WAAAC,CAAmBC,EAAwDC,EAAcC,GACxFC,MAAMH,EAAWC,EAAMC,GACvBE,KAAKJ,UAAYA,C,CAGX,oBAAAK,CAAqBC,GAC3BC,EACCH,KAAKJ,UACL,iBACCM,UAA0BA,IAAU,UAAYV,EAAsBY,SAASF,IAChF,IAAIG,IAAIb,GACRU,E,CAIK,mBAAAI,CAAoBJ,GAC1BI,EAAoBN,KAAKJ,UAAWM,E,CAG9B,aAAAK,CAAcL,GACpBM,EAAYR,KAAKJ,UAAW,SAAUM,GACtCF,KAAKS,uBAAuBT,KAAKJ,UAAUc,MAAMC,O,CAG3C,iBAAAC,GACNb,MAAMa,oBACNZ,KAAKC,qBAAqBD,KAAKJ,UAAUiB,eACzCb,KAAKM,oBAAoBN,KAAKJ,UAAUkB,cACxCd,KAAKO,cAAcP,KAAKJ,UAAUe,O,ECrCpC,MAAMI,EAAkB,08OAC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AC1BF,KAAKqC,WAAW/B,oBAAoBJ,E,CAI9B,2BAAAqE,CAA4BrE,GAClCF,KAAKqC,WAAWkC,4BAA4BrE,E,CAItC,gBAAAsE,CAAiBtE,GACvBF,KAAKqC,WAAWmC,iBAAiBtE,E,CAI3B,eAAAuE,CAAgBvE,GACtBF,KAAKqC,WAAWoC,gBAAgBvE,E,CAI1B,aAAAK,CAAcL,GACpBF,KAAKqC,WAAW9B,cAAcL,E,CAGxB,iBAAAU,GACNZ,KAAKyD,SAAWzD,KAAKyD,WAAa,KAClCzD,KAAKqC,WAAWzB,mB","ignoreList":[]}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h as t,r as e,g as n}from"./index-095473f8.js";import{c as i}from"./clsx-09a06a12.js";import{n as a}from"./dev.utils-a3bfded4.js";import{p as o}from"./controller-e3f702f2.js";import{I as s}from"./controller-icon-d99920a4.js";import{b as l,w as r,s as d,k as h,n as c}from"./prop.validators-9feb1d92.js";import{v as f}from"./suggestions-f139f5ec.js";import{K as u}from"./InputContainerStateWrapper-5cf1f1e5.js";import{K as m}from"./InputStateWrapper-14a4f1d3.js";import{K as p}from"./getRenderStates-f8d64e58.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./component-names-50e16b86.js";import"./controller-0434e53f.js";import"./events-5adf6b62.js";import"./associated.controller-52d302aa.js";import"./access-and-short-key-9cca88b8.js";import"./tooltip-align-8e0fa436.js";import"./align-4719d626.js";import"./hide-label-429a15ea.js";import"./msg-0c13cf1c.js";import"./common-54bf85ba.js";import"./label-d0315384.js";import"./icons-199f1746.js";import"./index-da3e0c00.js";import"./isString-5af96894.js";import"./isObject-ffcbbb76.js";import"./tslib.es6-1173d062.js";import"./Icon-0a8aaa01.js";import"./Input-199b40e8.js";import"./FormFieldMsg-12e502c7.js";import"./Alert-130db08c.js";import"./i18n-5fe08f1c.js";import"./i18n-7ea9f137.js";import"./Heading-401912a9.js";import"./InternalUnderlinedBadgeText-8e356b64.js";const b=(t,e)=>{l(t,"_readOnly",e)},v=["date","datetime-local","month","time","week"];class g extends s{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>r(this.component,t,(t=>void 0===t||null==t||""===t||this.validateDateString(t)),new Set(["Date","string{ISO-8601}"]),g.tryParseToString(e,this.component._type,this.component._step),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){r(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateSuggestions(t){f(this.component,t)}static tryParseToString(t,e,n){if("string"==typeof t||null===t)return t;if("object"==typeof t&&t instanceof Date){const i=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),d=[i,a,o].join("-"),c=[l,s,r].join(":");switch(e){case"date":return d;case"datetime-local":return`${d}T${c}`;case"month":return`${i}-${a}`;case"time":return void 0===n||"60"===String(n)?`${l}:${s}`:c;case"week":return`${i}-W${this.getWeekNumberOfDate(t)}`}}}static getWeekNumberOfDate(t){const e=new Date(t),n=(e.getDay()+6)%7;e.setDate(e.getDate()-n+3);const i=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);return(1+Math.ceil((i-e.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(t){switch(this.component._type){case"date":return g.isoDateRegex.test(t);case"datetime-local":return g.isoLocalDateTimeRegex.test(t);case"month":return g.isoMonthRegex.test(t);case"time":return g.isoTimeRegex.test(t);case"week":return g.isoWeekRegex.test(t);default:return!1}}onBlur(t){super.onBlur(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){const e=null!=t||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?t:g.DEFAULT_MAX_DATE;this.validateIso8601("_max",e)}validateMin(t){this.validateIso8601("_min",t)}validateOn(t){d(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){b(this.component,t)}validateRequired(t){l(this.component,"_required",t)}validateStep(t){h(this.component,"_step",t)}validateType(t){r(this.component,"_type",(t=>"string"==typeof t&&v.includes(t)),new Set([`String {${v.join(", ")}`]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}g.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,g.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,g.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,g.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,g.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,g.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const y="/*\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 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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\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,\n [disabled]:focus .kol-span {\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 {\n display: contents;\n }\n .kol-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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 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}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n cursor: pointer;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n height: calc(44rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",k=y,_=class{async getValue(){var t;return this.inputRef&&this.remapValue(null===(t=this.inputRef)||void 0===t?void 0:t.value)}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(t){t instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof t?"String":null}remapValue(t){return"Date"===this._initialValueType?new Date(t):t}getFormFieldProps(){return{state:this.state,class:i("kol-input-date",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onChange:this.onChange,onInput:this.onInput})}render(){return t(p,Object.assign({key:"f94b1ce9669ad1c09b4e308ab97f7b18f0e0a5e8"},this.getFormFieldProps()),t(u,{key:"872fa4ecc38c4f89a68949dd6968ea3009d67eb0",state:this.state},t(m,Object.assign({key:"90f90a5ad5e1cc82fb0b177e9dbabf9f54b72877"},this.getInputProps()))))}constructor(t){e(this,t),this.catchRef=t=>{this.inputRef=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onChange=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onChange(t,n)},this.onInput=t=>{const e=t.target.value,n=this.remapValue(e);this._value=n,this.controller.onFacade.onInput(t,!0,n)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||o({form:this.host,ref:this.inputRef})},this._initialValueType=null,this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideError=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._step=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideError:!1,_id:`id-${a()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new g(this,"date",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideError(t){this.controller.validateHideError(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){t instanceof Date&&c("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(t),void 0!==t&&this.setInitialValueType(t)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}static get delegatesFocus(){return!0}get host(){return n(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideError:["validateHideError"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};_.style={default:k};export{_ as kol_input_date};
|
4
|
+
import{h as t,r as e,g as n}from"./index-91489a9f.js";import{c as i}from"./clsx-09a06a12.js";import{n as a}from"./dev.utils-b9e6a3e1.js";import{p as o}from"./controller-002a86ad.js";import{I as s,K as l}from"./controller-icon-4be72f9f.js";import{b as r,w as d,s as h,k as c,n as u}from"./prop.validators-9feb1d92.js";import{v as f}from"./suggestions-f139f5ec.js";import{K as m}from"./InputStateWrapper-e1a2298b.js";import{K as p}from"./getRenderStates-a7a33541.js";import"./reuse-32931294.js";import"./dev.utils-fab45cbc.js";import"./component-names-a18a51c8.js";import"./InternalUnderlinedBadgeText-22278de8.js";import"./isObject-ffcbbb76.js";import"./tslib.es6-1173d062.js";import"./Icon-936c5cfc.js";import"./FormFieldMsg-1ed3f51d.js";import"./common-54bf85ba.js";import"./Alert-080adf2e.js";import"./i18n-5fe08f1c.js";import"./i18n-7ea9f137.js";import"./Heading-0459992b.js";import"./icons-199f1746.js";import"./index-da3e0c00.js";import"./Input-40160769.js";import"./events-5adf6b62.js";import"./associated.controller-52d302aa.js";import"./access-and-short-key-9cca88b8.js";import"./tooltip-align-8e0fa436.js";import"./align-4719d626.js";import"./hide-label-429a15ea.js";import"./label-d0315384.js";const b=(t,e)=>{r(t,"_readOnly",e)},v=["date","datetime-local","month","time","week"];class g extends s{constructor(t,e,n){super(t,e,n),this.validateIso8601=(t,e,n)=>d(this.component,t,(t=>void 0===t||null==t||""===t||this.validateDateString(t)),new Set(["Date","string{ISO-8601}"]),g.tryParseToString(e,this.component._type,this.component._step),{hooks:{afterPatch:t=>{"string"==typeof t&&n&&n(t)}}}),this.component=t}validateAutoComplete(t){d(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateSuggestions(t){f(this.component,t)}static tryParseToString(t,e,n){if("string"==typeof t||null===t)return t;if("object"==typeof t&&t instanceof Date){const i=t.getFullYear(),a=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0"),d=[i,a,o].join("-"),c=[s,l,r].join(":");switch(e){case"date":return d;case"datetime-local":return`${d}T${c}`;case"month":return`${i}-${a}`;case"time":return void 0===n||"60"===String(n)?`${s}:${l}`:c;case"week":return`${i}-W${this.getWeekNumberOfDate(t)}`}}}static getWeekNumberOfDate(t){const e=new Date(t),n=(e.getDay()+6)%7;e.setDate(e.getDate()-n+3);const i=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);return(1+Math.ceil((i-e.valueOf())/6048e5)).toString().padStart(2,"0")}validateDateString(t){switch(this.component._type){case"date":return g.isoDateRegex.test(t);case"datetime-local":return g.isoLocalDateTimeRegex.test(t);case"month":return g.isoMonthRegex.test(t);case"time":return g.isoTimeRegex.test(t);case"week":return g.isoWeekRegex.test(t);default:return!1}}onBlur(t){super.onBlur(t),!!t.target.value!=!!this.component._value&&(this.component._value=t.target.value)}validateMax(t){const e=null!=t||"date"!==this.component._type&&"month"!==this.component._type&&"datetime-local"!==this.component._type?t:g.DEFAULT_MAX_DATE;this.validateIso8601("_max",e)}validateMin(t){this.validateIso8601("_min",t)}validateOn(t){h(this.component,"_on",Object.assign(Object.assign({},t),{onChange:(e,n)=>{!!n!=!!this.component._value&&(this.component._value=n),(null==t?void 0:t.onChange)&&t.onChange(e,n)}}))}validateReadOnly(t){b(this.component,t)}validateRequired(t){r(this.component,"_required",t)}validateStep(t){c(this.component,"_step",t)}validateType(t){d(this.component,"_type",(t=>"string"==typeof t&&v.includes(t)),new Set([`String {${v.join(", ")}`]),t)}validateValue(t){this.validateValueEx(t)}validateValueEx(t,e){this.validateIso8601("_value",t,e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateMax(this.component._max),this.validateMin(this.component._min),this.validateLabel(this.component._label),this.validateSuggestions(this.component._suggestions),this.validateOn(this.component._on),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateStep(this.component._step),this.validateType(this.component._type),this.validateValue(this.component._value)}}g.isoDateRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])/,g.isoLocalDateTimeRegex=/^\d{4}-([0]\d|1[0-2])-([0-2]\d|3[01])[T ][0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,g.isoMonthRegex=/^\d{4}-([0]\d|1[0-2])/,g.isoTimeRegex=/^[0-2]\d:[0-5]\d(:[0-5]\d(?:\.\d+)?)?/,g.isoWeekRegex=/^\d{4}-W(?:[0-4]\d|5[0-3])$/,g.DEFAULT_MAX_DATE=new Date(9999,11,31,23,59,59);const y="/*\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 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 .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\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,\n [disabled]:focus .kol-span {\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 {\n display: contents;\n }\n .kol-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 .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\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__content {\n background-color: #fff;\n color: #000;\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 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}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: \"*\";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: \"*\";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n cursor: pointer;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-input {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n height: calc(44rem / var(--kolibri-root-font-size, 16));\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input:focus {\n outline: none;\n }\n}",k=y,_=class{async getValue(){var t;return this.inputRef&&this.remapValue(null===(t=this.inputRef)||void 0===t?void 0:t.value)}async kolFocus(){var t;null===(t=this.inputRef)||void 0===t||t.focus()}async reset(){this.state=Object.assign(Object.assign({},this.state),{_value:null}),this.controller.setFormAssociatedValue(""),this.inputRef&&(this.inputRef.value="")}setInitialValueType(t){t instanceof Date?this._initialValueType="Date":this._initialValueType="string"==typeof t?"String":null}remapValue(t){return"Date"===this._initialValueType?new Date(t):t}getFormFieldProps(){return{state:this.state,class:i("kol-input-date",this.state._type,{"has-value":this.state._hasValue}),tooltipAlign:this._tooltipAlign,onClick:()=>{var t;return null===(t=this.inputRef)||void 0===t?void 0:t.focus()},alert:this.showAsAlert()}}getInputProps(){return Object.assign(Object.assign({ref:this.catchRef,state:this.state},this.controller.onFacade),{onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onChange:this.onChange,onInput:this.onInput})}render(){return t(p,Object.assign({key:"7e3a749df34a7a6475d0b84c2203a3d3c784a84d"},this.getFormFieldProps()),t(l,{key:"51ec81dc553db4bc3293877dab6c47dcb697bbdd",state:this.state},t(m,Object.assign({key:"d4662d1832990c06d4327c10eb24866e4d3235df"},this.getInputProps()))))}constructor(t){e(this,t),this.catchRef=t=>{this.inputRef=t},this.onBlur=t=>{this.controller.onFacade.onBlur(t),this.inputHasFocus=!1},this.onFocus=t=>{this.controller.onFacade.onFocus(t),this.inputHasFocus=!0},this.onChange=t=>{const e=t.target.value,n=this.remapValue(e);this.controller.onFacade.onChange(t,n)},this.onInput=t=>{const e=t.target.value,n=this.remapValue(e);this._value=n,this.controller.onFacade.onInput(t,!0,n)},this.onKeyDown=t=>{"Enter"!==t.code&&"NumpadEnter"!==t.code||o({form:this.host,ref:this.inputRef})},this._initialValueType=null,this._accessKey=void 0,this._autoComplete=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._icons=void 0,this._id=void 0,this._label=void 0,this._max=void 0,this._min=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._readOnly=!1,this._required=!1,this._shortKey=void 0,this._smartButton=void 0,this._suggestions=void 0,this._syncValueBySelector=void 0,this._step=void 0,this._tabIndex=void 0,this._tooltipAlign="top",this._touched=!1,this._type="date",this._value=void 0,this.state={_autoComplete:"off",_hasValue:!1,_hideMsg:!1,_id:`id-${a()}`,_label:"",_suggestions:[],_type:"datetime-local"},this.inputHasFocus=!1,this.controller=new g(this,"date",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(t){this.controller.validateAccessKey(t)}validateAutoComplete(t){this.controller.validateAutoComplete(t)}validateDisabled(t){this.controller.validateDisabled(t)}validateHideMsg(t){this.controller.validateHideMsg(t)}validateHideLabel(t){this.controller.validateHideLabel(t)}validateHint(t){this.controller.validateHint(t)}validateIcons(t){this.controller.validateIcons(t)}validateId(t){this.controller.validateId(t)}validateLabel(t){this.controller.validateLabel(t)}validateMax(t){this.controller.validateMax(t)}validateMin(t){this.controller.validateMin(t)}validateMsg(t){this.controller.validateMsg(t)}validateName(t){this.controller.validateName(t)}validateOn(t){this.controller.validateOn(t)}validateReadOnly(t){this.controller.validateReadOnly(t)}validateRequired(t){this.controller.validateRequired(t)}validateShortKey(t){this.controller.validateShortKey(t)}validateSmartButton(t){this.controller.validateSmartButton(t)}validateSuggestions(t){this.controller.validateSuggestions(t)}validateStep(t){this.controller.validateStep(t)}validateSyncValueBySelector(t){this.controller.validateSyncValueBySelector(t)}validateTabIndex(t){this.controller.validateTabIndex(t)}validateTouched(t){this.controller.validateTouched(t)}validateType(t){this.controller.validateType(t)}validateValue(t){t instanceof Date&&u("Date type will be removed in v3. Use `Iso8601` instead."),this.controller.validateValueEx(t),void 0!==t&&this.setInitialValueType(t)}componentWillLoad(){void 0!==this._value&&this.setInitialValueType(this._value),this._touched=!0===this._touched,this.controller.componentWillLoad(),this.state._hasValue=!!this.state._value,this.controller.addValueChangeListener((t=>this.state._hasValue=!!t))}static get delegatesFocus(){return!0}get host(){return n(this)}static get watchers(){return{_accessKey:["validateAccessKey"],_autoComplete:["validateAutoComplete"],_disabled:["validateDisabled"],_hideMsg:["validateHideMsg"],_hideLabel:["validateHideLabel"],_hint:["validateHint"],_icons:["validateIcons"],_id:["validateId"],_label:["validateLabel"],_max:["validateMax"],_min:["validateMin"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_readOnly:["validateReadOnly"],_required:["validateRequired"],_shortKey:["validateShortKey"],_smartButton:["validateSmartButton"],_suggestions:["validateSuggestions"],_step:["validateStep"],_syncValueBySelector:["validateSyncValueBySelector"],_tabIndex:["validateTabIndex"],_touched:["validateTouched"],_type:["validateType"],_value:["validateValue"]}}};_.style={default:k};export{_ as kol_input_date};
|