@public-ui/components 3.0.2-6ae0104cda0b7b19a5b0d6bbc5f990b9fe544fa0.0 → 3.0.2-ab502d4896d9763f93bb8cce1b07a1b2f8d04439.0
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/README.md +8 -58
- package/custom-elements.json +1 -29
- package/dist/cjs/Alert-b599bc66.js +4 -0
- package/dist/cjs/Alert-b599bc66.js.map +1 -0
- package/dist/cjs/{Collapsible-2225015b.js → Collapsible-a3348b65.js} +1 -1
- package/dist/cjs/{Collapsible-2225015b.js.map → Collapsible-a3348b65.js.map} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-fd532c80.js → CustomSuggestionsOptionsGroup-51c0ad18.js} +1 -1
- package/dist/cjs/{CustomSuggestionsOptionsGroup-fd532c80.js.map → CustomSuggestionsOptionsGroup-51c0ad18.js.map} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-736434ca.js → FieldControlStateWrapper-275c5fe3.js} +1 -1
- package/dist/cjs/{FieldControlStateWrapper-736434ca.js.map → FieldControlStateWrapper-275c5fe3.js.map} +1 -1
- package/dist/cjs/{Heading-6bf1ffac.js → Heading-831f5344.js} +1 -1
- package/dist/cjs/{Heading-6bf1ffac.js.map → Heading-831f5344.js.map} +1 -1
- package/dist/cjs/{Icon-0537cd28.js → Icon-0bb5c729.js} +1 -1
- package/dist/cjs/{Icon-0537cd28.js.map → Icon-0bb5c729.js.map} +1 -1
- package/dist/cjs/{Input-b7b2e83b.js → Input-68e72472.js} +1 -1
- package/dist/cjs/{Input-b7b2e83b.js.map → Input-68e72472.js.map} +1 -1
- package/dist/cjs/{InputStateWrapper-5c622a6d.js → InputStateWrapper-8261610e.js} +1 -1
- package/dist/cjs/{InputStateWrapper-5c622a6d.js.map → InputStateWrapper-8261610e.js.map} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-a54799ae.js → InternalUnderlinedBadgeText-1bc154d6.js} +1 -1
- package/dist/cjs/{InternalUnderlinedBadgeText-a54799ae.js.map → InternalUnderlinedBadgeText-1bc154d6.js.map} +1 -1
- package/dist/cjs/{Span-c9f5cc1a.js → Span-075a6839.js} +1 -1
- package/dist/cjs/{Span-c9f5cc1a.js.map → Span-075a6839.js.map} +1 -1
- package/dist/cjs/{app-globals-171737a2.js → app-globals-b81e81b4.js} +1 -1
- package/dist/cjs/{app-globals-171737a2.js.map → app-globals-b81e81b4.js.map} +1 -1
- package/dist/cjs/{controller-1ead3829.js → controller-4ed7f7a2.js} +1 -1
- package/dist/cjs/{controller-1ead3829.js.map → controller-4ed7f7a2.js.map} +1 -1
- package/dist/cjs/{controller-c6c3ab7a.js → controller-9d924d4c.js} +1 -1
- package/dist/cjs/{controller-c6c3ab7a.js.map → controller-9d924d4c.js.map} +1 -1
- package/dist/cjs/{controller-57e0e326.js → controller-dd97ea50.js} +1 -1
- package/dist/cjs/{controller-57e0e326.js.map → controller-dd97ea50.js.map} +1 -1
- package/dist/cjs/{controller-icon-cbcacd17.js → controller-icon-254c03cc.js} +1 -1
- package/dist/cjs/{controller-icon-cbcacd17.js.map → controller-icon-254c03cc.js.map} +1 -1
- package/dist/cjs/{dev.utils-bfd07ca6.js → dev.utils-cdb40099.js} +1 -1
- package/dist/cjs/{dev.utils-bfd07ca6.js.map → dev.utils-cdb40099.js.map} +1 -1
- package/dist/cjs/{devtools-c3023af8.js → devtools-1b1530aa.js} +1 -1
- package/dist/cjs/{devtools-c3023af8.js.map → devtools-1b1530aa.js.map} +1 -1
- package/dist/cjs/{getRenderStates-f985f2e4.js → getRenderStates-73bb848b.js} +1 -1
- package/dist/cjs/{getRenderStates-f985f2e4.js.map → getRenderStates-73bb848b.js.map} +1 -1
- package/dist/cjs/{index-ae732dfd.js → index-3a8217e6.js} +1 -1
- package/dist/cjs/{index-ae732dfd.js.map → index-3a8217e6.js.map} +1 -1
- package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
- package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-alert-wc.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-alert.cjs.entry.js +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-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.cjs.entry.js +1 -1
- package/dist/cjs/kol-card-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-card.cjs.entry.js +1 -1
- package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
- package/dist/cjs/kol-details.cjs.entry.js +1 -1
- package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kol-form.cjs.entry.js +1 -1
- package/dist/cjs/kol-heading.cjs.entry.js +1 -1
- package/dist/cjs/kol-icon.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js +1 -1
- package/dist/cjs/kol-image.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
- package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
- package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
- package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-link.cjs.entry.js +1 -1
- package/dist/cjs/kol-modal.cjs.entry.js +1 -1
- package/dist/cjs/kol-nav.cjs.entry.js +1 -1
- package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-popover-button.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-single-select.cjs.entry.js +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-split-button.cjs.entry.js.map +1 -1
- package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
- package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
- package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
- package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
- package/dist/cjs/kol-tree.cjs.entry.js +1 -1
- package/dist/cjs/kol-version.cjs.entry.js +1 -1
- package/dist/cjs/kolibri.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/test-component.cjs.entry.js +1 -1
- package/dist/components/Alert.js +1 -1
- package/dist/components/Alert.js.map +1 -1
- package/dist/components/kol-alert-wc.js +1 -1
- package/dist/components/kol-alert-wc.js.map +1 -1
- package/dist/components/kol-image.js +1 -1
- package/dist/components/kol-image.js.map +1 -1
- package/dist/components/kol-split-button.js +1 -1
- package/dist/components/kol-split-button.js.map +1 -1
- package/dist/esm/Alert-58253beb.js +4 -0
- package/dist/esm/Alert-58253beb.js.map +1 -0
- package/dist/esm/{Collapsible-7be44a00.js → Collapsible-eb5f8bf7.js} +1 -1
- package/dist/esm/{Collapsible-7be44a00.js.map → Collapsible-eb5f8bf7.js.map} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-cdea277e.js → CustomSuggestionsOptionsGroup-14853f08.js} +1 -1
- package/dist/esm/{CustomSuggestionsOptionsGroup-cdea277e.js.map → CustomSuggestionsOptionsGroup-14853f08.js.map} +1 -1
- package/dist/esm/{FieldControlStateWrapper-6c17f96e.js → FieldControlStateWrapper-f0050c71.js} +1 -1
- package/dist/esm/{FieldControlStateWrapper-6c17f96e.js.map → FieldControlStateWrapper-f0050c71.js.map} +1 -1
- package/dist/esm/{Heading-31a470a8.js → Heading-1e98210c.js} +1 -1
- package/dist/esm/{Heading-31a470a8.js.map → Heading-1e98210c.js.map} +1 -1
- package/dist/esm/{Icon-e36657fc.js → Icon-34fc4368.js} +1 -1
- package/dist/esm/{Icon-e36657fc.js.map → Icon-34fc4368.js.map} +1 -1
- package/dist/esm/{Input-b352cf7a.js → Input-0929c3c6.js} +1 -1
- package/dist/esm/{Input-b352cf7a.js.map → Input-0929c3c6.js.map} +1 -1
- package/dist/esm/{InputStateWrapper-38536b7a.js → InputStateWrapper-fa236825.js} +1 -1
- package/dist/esm/{InputStateWrapper-38536b7a.js.map → InputStateWrapper-fa236825.js.map} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-b1330190.js → InternalUnderlinedBadgeText-ca1489f7.js} +1 -1
- package/dist/esm/{InternalUnderlinedBadgeText-b1330190.js.map → InternalUnderlinedBadgeText-ca1489f7.js.map} +1 -1
- package/dist/esm/{Span-88b22574.js → Span-34b71ebc.js} +1 -1
- package/dist/esm/{Span-88b22574.js.map → Span-34b71ebc.js.map} +1 -1
- package/dist/esm/{app-globals-f7121568.js → app-globals-4392aff3.js} +1 -1
- package/dist/esm/{app-globals-f7121568.js.map → app-globals-4392aff3.js.map} +1 -1
- package/dist/esm/{controller-7a002c8f.js → controller-374b61ec.js} +1 -1
- package/dist/esm/{controller-7a002c8f.js.map → controller-374b61ec.js.map} +1 -1
- package/dist/esm/{controller-8b5dbe81.js → controller-69d06fa0.js} +1 -1
- package/dist/esm/{controller-8b5dbe81.js.map → controller-69d06fa0.js.map} +1 -1
- package/dist/esm/{controller-ac40e13c.js → controller-83424231.js} +1 -1
- package/dist/esm/{controller-ac40e13c.js.map → controller-83424231.js.map} +1 -1
- package/dist/esm/{controller-icon-0d71a8a2.js → controller-icon-256a4f31.js} +1 -1
- package/dist/esm/{controller-icon-0d71a8a2.js.map → controller-icon-256a4f31.js.map} +1 -1
- package/dist/esm/{dev.utils-ffecab2f.js → dev.utils-7b2d1fa9.js} +1 -1
- package/dist/esm/{dev.utils-ffecab2f.js.map → dev.utils-7b2d1fa9.js.map} +1 -1
- package/dist/esm/{devtools-a4e8658c.js → devtools-a09bf7e7.js} +1 -1
- package/dist/esm/{devtools-a4e8658c.js.map → devtools-a09bf7e7.js.map} +1 -1
- package/dist/esm/{getRenderStates-c4bde254.js → getRenderStates-67595fa6.js} +1 -1
- package/dist/esm/{getRenderStates-c4bde254.js.map → getRenderStates-67595fa6.js.map} +1 -1
- package/dist/esm/{index-02bdb302.js → index-1704c42b.js} +1 -1
- package/dist/esm/{index-02bdb302.js.map → index-1704c42b.js.map} +1 -1
- package/dist/esm/kol-abbr.entry.js +1 -1
- package/dist/esm/kol-accordion.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js +1 -1
- package/dist/esm/kol-alert-wc.entry.js.map +1 -1
- package/dist/esm/kol-alert.entry.js +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-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.entry.js +1 -1
- package/dist/esm/kol-card-wc.entry.js +1 -1
- package/dist/esm/kol-card.entry.js +1 -1
- package/dist/esm/kol-combobox.entry.js +1 -1
- package/dist/esm/kol-details.entry.js +1 -1
- package/dist/esm/kol-drawer.entry.js +1 -1
- package/dist/esm/kol-form.entry.js +1 -1
- package/dist/esm/kol-heading.entry.js +1 -1
- package/dist/esm/kol-icon.entry.js +1 -1
- package/dist/esm/kol-image.entry.js +1 -1
- package/dist/esm/kol-image.entry.js.map +1 -1
- package/dist/esm/kol-input-checkbox.entry.js +1 -1
- package/dist/esm/kol-input-color.entry.js +1 -1
- package/dist/esm/kol-input-date.entry.js +1 -1
- package/dist/esm/kol-input-email.entry.js +1 -1
- package/dist/esm/kol-input-file.entry.js +1 -1
- package/dist/esm/kol-input-number.entry.js +1 -1
- package/dist/esm/kol-input-password.entry.js +1 -1
- package/dist/esm/kol-input-radio.entry.js +1 -1
- package/dist/esm/kol-input-range.entry.js +1 -1
- package/dist/esm/kol-input-text.entry.js +1 -1
- package/dist/esm/kol-kolibri.entry.js +1 -1
- package/dist/esm/kol-link-button.entry.js +1 -1
- package/dist/esm/kol-link-wc.entry.js +1 -1
- package/dist/esm/kol-link.entry.js +1 -1
- package/dist/esm/kol-modal.entry.js +1 -1
- package/dist/esm/kol-nav.entry.js +1 -1
- package/dist/esm/kol-pagination.entry.js +1 -1
- package/dist/esm/kol-popover-button-wc.entry.js +1 -1
- package/dist/esm/kol-popover-button.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-single-select.entry.js +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-split-button.entry.js.map +1 -1
- package/dist/esm/kol-table-settings-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateful.entry.js +1 -1
- package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
- package/dist/esm/kol-table-stateless.entry.js +1 -1
- package/dist/esm/kol-tabs.entry.js +1 -1
- package/dist/esm/kol-textarea.entry.js +1 -1
- package/dist/esm/kol-toast-container.entry.js +1 -1
- package/dist/esm/kol-toolbar.entry.js +1 -1
- package/dist/esm/kol-tooltip-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item-wc.entry.js +1 -1
- package/dist/esm/kol-tree-item.entry.js +1 -1
- package/dist/esm/kol-tree-wc.entry.js +1 -1
- package/dist/esm/kol-tree.entry.js +1 -1
- package/dist/esm/kol-version.entry.js +1 -1
- package/dist/esm/kolibri.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/test-component.entry.js +1 -1
- package/dist/kolibri/Alert-58253beb.js +4 -0
- package/dist/kolibri/Alert-58253beb.js.map +1 -0
- package/dist/kolibri/{Collapsible-7be44a00.js → Collapsible-eb5f8bf7.js} +1 -1
- package/dist/kolibri/{CustomSuggestionsOptionsGroup-cdea277e.js → CustomSuggestionsOptionsGroup-14853f08.js} +1 -1
- package/dist/kolibri/{FieldControlStateWrapper-6c17f96e.js → FieldControlStateWrapper-f0050c71.js} +1 -1
- package/dist/kolibri/Heading-1e98210c.js +4 -0
- package/dist/kolibri/Icon-34fc4368.js +4 -0
- package/dist/kolibri/Input-0929c3c6.js +4 -0
- package/dist/kolibri/{InputStateWrapper-38536b7a.js → InputStateWrapper-fa236825.js} +1 -1
- package/dist/kolibri/{InternalUnderlinedBadgeText-b1330190.js → InternalUnderlinedBadgeText-ca1489f7.js} +1 -1
- package/dist/kolibri/Span-34b71ebc.js +4 -0
- package/dist/kolibri/{Span-88b22574.js.map → Span-34b71ebc.js.map} +1 -1
- package/dist/kolibri/{app-globals-f7121568.js → app-globals-4392aff3.js} +1 -1
- package/dist/kolibri/{controller-7a002c8f.js → controller-374b61ec.js} +1 -1
- package/dist/kolibri/{controller-8b5dbe81.js → controller-69d06fa0.js} +1 -1
- package/dist/kolibri/{controller-ac40e13c.js → controller-83424231.js} +1 -1
- package/dist/kolibri/{controller-icon-0d71a8a2.js → controller-icon-256a4f31.js} +1 -1
- package/dist/kolibri/{dev.utils-ffecab2f.js → dev.utils-7b2d1fa9.js} +1 -1
- package/dist/kolibri/{devtools-a4e8658c.js → devtools-a09bf7e7.js} +1 -1
- package/dist/kolibri/{getRenderStates-c4bde254.js → getRenderStates-67595fa6.js} +1 -1
- package/dist/kolibri/{index-02bdb302.js → index-1704c42b.js} +1 -1
- package/dist/kolibri/{index-02bdb302.js.map → index-1704c42b.js.map} +1 -1
- package/dist/kolibri/kol-abbr.entry.js +1 -1
- package/dist/kolibri/kol-accordion.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js +1 -1
- package/dist/kolibri/kol-alert-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-alert.entry.js +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-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.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.entry.js +1 -1
- package/dist/kolibri/kol-card-wc.entry.js.map +1 -1
- package/dist/kolibri/kol-card.entry.js +1 -1
- package/dist/kolibri/kol-combobox.entry.js +1 -1
- package/dist/kolibri/kol-details.entry.js +1 -1
- package/dist/kolibri/kol-drawer.entry.js +1 -1
- package/dist/kolibri/kol-form.entry.js +1 -1
- package/dist/kolibri/kol-heading.entry.js +1 -1
- package/dist/kolibri/kol-icon.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js +1 -1
- package/dist/kolibri/kol-image.entry.js.map +1 -1
- package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
- package/dist/kolibri/kol-input-color.entry.js +1 -1
- package/dist/kolibri/kol-input-date.entry.js +1 -1
- package/dist/kolibri/kol-input-email.entry.js +1 -1
- package/dist/kolibri/kol-input-file.entry.js +1 -1
- package/dist/kolibri/kol-input-number.entry.js +1 -1
- package/dist/kolibri/kol-input-password.entry.js +1 -1
- package/dist/kolibri/kol-input-radio.entry.js +1 -1
- package/dist/kolibri/kol-input-range.entry.js +1 -1
- package/dist/kolibri/kol-input-text.entry.js +1 -1
- package/dist/kolibri/kol-kolibri.entry.js +1 -1
- package/dist/kolibri/kol-link-button.entry.js +1 -1
- package/dist/kolibri/kol-link-wc.entry.js +1 -1
- package/dist/kolibri/kol-link.entry.js +1 -1
- package/dist/kolibri/kol-modal.entry.js +1 -1
- package/dist/kolibri/kol-nav.entry.js +1 -1
- package/dist/kolibri/kol-pagination.entry.js +1 -1
- package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
- package/dist/kolibri/kol-popover-button.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-single-select.entry.js +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-split-button.entry.js.map +1 -1
- package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateful.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
- package/dist/kolibri/kol-table-stateless.entry.js +1 -1
- package/dist/kolibri/kol-tabs.entry.js +1 -1
- package/dist/kolibri/kol-textarea.entry.js +1 -1
- package/dist/kolibri/kol-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-tree-item-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree-item.entry.js +1 -1
- package/dist/kolibri/kol-tree-wc.entry.js +1 -1
- package/dist/kolibri/kol-tree.entry.js +1 -1
- package/dist/kolibri/kol-version.entry.js +1 -1
- package/dist/kolibri/kolibri.esm.js +1 -1
- package/dist/kolibri/kolibri.esm.js.map +1 -1
- package/dist/kolibri/test-component.entry.js +1 -1
- package/dist/types/components/split-button/shadow.d.ts +4 -11
- package/dist/types/components.d.ts +6 -32
- package/dist/types/schema/components/image.d.ts +16 -5
- package/dist/types/schema/props/index.d.ts +1 -1
- package/dist/types/schema/props/loading.d.ts +0 -3
- package/doc/components.md +4 -4
- package/doc/split-button.md +18 -41
- package/package.json +1 -1
- package/vscode-custom-data.json +0 -12
- package/dist/cjs/Alert-5ca7c116.js +0 -4
- package/dist/cjs/Alert-5ca7c116.js.map +0 -1
- package/dist/esm/Alert-c6ac1427.js +0 -4
- package/dist/esm/Alert-c6ac1427.js.map +0 -1
- package/dist/kolibri/Alert-c6ac1427.js +0 -4
- package/dist/kolibri/Alert-c6ac1427.js.map +0 -1
- package/dist/kolibri/Heading-31a470a8.js +0 -4
- package/dist/kolibri/Icon-e36657fc.js +0 -4
- package/dist/kolibri/Input-b352cf7a.js +0 -4
- package/dist/kolibri/Span-88b22574.js +0 -4
- package/dist/types/schema/props/alt.d.ts +0 -7
- package/dist/types/schema/props/image-sizes.d.ts +0 -7
- package/dist/types/schema/props/image-srcset.d.ts +0 -7
- /package/dist/kolibri/{Collapsible-7be44a00.js.map → Collapsible-eb5f8bf7.js.map} +0 -0
- /package/dist/kolibri/{CustomSuggestionsOptionsGroup-cdea277e.js.map → CustomSuggestionsOptionsGroup-14853f08.js.map} +0 -0
- /package/dist/kolibri/{FieldControlStateWrapper-6c17f96e.js.map → FieldControlStateWrapper-f0050c71.js.map} +0 -0
- /package/dist/kolibri/{Heading-31a470a8.js.map → Heading-1e98210c.js.map} +0 -0
- /package/dist/kolibri/{Icon-e36657fc.js.map → Icon-34fc4368.js.map} +0 -0
- /package/dist/kolibri/{Input-b352cf7a.js.map → Input-0929c3c6.js.map} +0 -0
- /package/dist/kolibri/{InputStateWrapper-38536b7a.js.map → InputStateWrapper-fa236825.js.map} +0 -0
- /package/dist/kolibri/{InternalUnderlinedBadgeText-b1330190.js.map → InternalUnderlinedBadgeText-ca1489f7.js.map} +0 -0
- /package/dist/kolibri/{app-globals-f7121568.js.map → app-globals-4392aff3.js.map} +0 -0
- /package/dist/kolibri/{controller-7a002c8f.js.map → controller-374b61ec.js.map} +0 -0
- /package/dist/kolibri/{controller-8b5dbe81.js.map → controller-69d06fa0.js.map} +0 -0
- /package/dist/kolibri/{controller-ac40e13c.js.map → controller-83424231.js.map} +0 -0
- /package/dist/kolibri/{controller-icon-0d71a8a2.js.map → controller-icon-256a4f31.js.map} +0 -0
- /package/dist/kolibri/{dev.utils-ffecab2f.js.map → dev.utils-7b2d1fa9.js.map} +0 -0
- /package/dist/kolibri/{devtools-a4e8658c.js.map → devtools-a09bf7e7.js.map} +0 -0
- /package/dist/kolibri/{getRenderStates-c4bde254.js.map → getRenderStates-67595fa6.js.map} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"file":"Alert.js","mappings":";;;;;;;;;;;AAWA,MAAM,IAAI,GAA4D,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;IACzF,QACC;QACC,YAAM,KAAK,EAAC,iBAAiB,IAAE,SAAS,CAAQ;QAChD,EAAC,UAAU,IAAC,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAI,CA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AAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\t/**\n\t\t * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n\t\t * - https://googlechrome.github.io/samples/vibration/\n\t\t * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n\t\t * @todo Move side-effect out of render-function to avoid multiple incarnations.\n\t\t */\n\t\tif (navigator.userActivation?.hasBeenActive) {\n\t\t\tnavigator?.vibrate?.([100, 75, 100, 75, 100]);\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{i as watchBoolean,k as setState,w as watchValidator}from"./index2.js";import{w as watchHeadingLevel}from"./validation.js";import{K as KolAlertFc}from"./Alert.js";import{d as dispatchDomEvent,K as KolEvent}from"./events.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],KolAlertWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e,t;null===(t=null===(e=this._on)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e,new Event("Close")),this.host&&dispatchDomEvent(this.host,KolEvent.close)},this.handleAlertTimeout=()=>{this.validateAlert(!1)},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=0,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:0}}render(){const{_alert:e,_hasCloser:t,_label:a,_level:l,_type:i,_variant:s}=this.state,o={alert:e,hasCloser:t,label:a,level:l,type:i,variant:s,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return h(KolAlertFc,Object.assign({key:"
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{i as watchBoolean,k as setState,w as watchValidator}from"./index2.js";import{w as watchHeadingLevel}from"./validation.js";import{K as KolAlertFc}from"./Alert.js";import{d as dispatchDomEvent,K as KolEvent}from"./events.js";import{v as validateHasCloser}from"./has-closer.js";import{v as validateLabel}from"./label.js";const alertTypeOptions=["default","info","success","warning","error"],alertVariantOptions=["card","msg"],KolAlertWc$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.close=()=>{var e,t;null===(t=null===(e=this._on)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e,new Event("Close")),this.host&&dispatchDomEvent(this.host,KolEvent.close)},this.handleAlertTimeout=()=>{this.validateAlert(!1)},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=0,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:0}}render(){const{_alert:e,_hasCloser:t,_label:a,_level:l,_type:i,_variant:s}=this.state,o={alert:e,hasCloser:t,label:a,level:l,type:i,variant:s,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return h(KolAlertFc,Object.assign({key:"9038051f21b86a9c83c8ac5619e723dff5ebcbeb"},o),h("slot",{key:"cfd116176ab783db5232d9d5520f8ae890ca44db"}))}validateAlert(e){watchBoolean(this,"_alert",e)}validateHasCloser(e){validateHasCloser(this,e)}validateLabel(e){validateLabel(this,e)}validateLevel(e){watchHeadingLevel(this,e)}validateOn(e){this.validateOnValue(e)&&setState(this,"_on",{onClose:e.onClose})}validateType(e){watchValidator(this,"_type",(e=>"string"==typeof e&&alertTypeOptions.includes(e)),new Set(`String {${alertTypeOptions.join(", ")}`),e)}validateVariant(e){watchValidator(this,"_variant",(e=>"string"==typeof e&&alertVariantOptions.includes(e)),new Set(`AlertVariant {${alertVariantOptions.join(", ")}`),e)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}get host(){return this}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}},[4,"kol-alert-wc",{_alert:[4],_hasCloser:[4,"_has-closer"],_label:[1],_level:[2],_on:[16],_type:[1],_variant:[1],state:[32]},void 0,{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-alert-wc"].forEach((e=>{if("kol-alert-wc"===e)customElements.get(e)||customElements.define(e,KolAlertWc$1)}))}const KolAlertWc=KolAlertWc$1,defineCustomElement=defineCustomElement$1;export{KolAlertWc,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-alert-wc.js","mappings":";;;;;;;;;;;AAKO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAGrF,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAU;;MCQ9CA,YAAU;;;;QAGL,UAAK,GAAG;;YACxB,MAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,mDAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACxC,IAAI,IAAI,CAAC,IAAI,EAAE;gBACd,gBAAgB,CAAC,IAAI,CAAC,
|
1
|
+
{"file":"kol-alert-wc.js","mappings":";;;;;;;;;;;AAKO,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAGrF,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,KAAK,CAAU;;MCQ9CA,YAAU;;;;QAGL,UAAK,GAAG;;YACxB,MAAA,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,mDAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACxC,IAAI,IAAI,CAAC,IAAI,EAAE;gBACd,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC5C;SACD,CAAC;QAEe,uBAAkB,GAAG;YACrC,IAAI,CAAC,aAAa,CAAC,KAA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tD,CAMD,CAAC;SAOF;KACD;IAGM,YAAY,CAAC,KAAiB;QACpC,cAAc,CACb,IAAI,EACJ,OAAO,EACP,CAAC,KAAM,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,EACzE,IAAI,GAAG,CAAC,WAAW,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EACjD,KAAK,CACL,CAAC;KACF;IAGM,eAAe,CAAC,KAAoB;QAC1C,cAAc,CACb,IAAI,EACJ,UAAU,EACV,CAAC,KAAM,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC5E,IAAI,GAAG,CAAC,iBAAiB,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAC1D,KAAK,CACL,CAAC;KACF;IAEM,iBAAiB;QACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolAlertWc"],"sources":["src/schema/components/alert.ts","src/components/alert/component.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { HeadingLevel, PropAlert, PropHasCloser, PropLabel } from '../props';\nimport type { EventCallback } from '../types';\n\nexport const alertTypeOptions = ['default', 'info', 'success', 'warning', 'error'] as const;\nexport type AlertType = (typeof alertTypeOptions)[number];\n\nexport const alertVariantOptions = ['card', 'msg'] as const;\nexport type AlertVariant = (typeof alertVariantOptions)[number];\n\nexport type KoliBriAlertEventCallbacks = {\n\tonClose?: EventCallback<Event>;\n};\n\ntype RequiredAlertProps = NonNullable<unknown>;\ntype OptionalAlertProps = {\n\tlevel: HeadingLevel;\n\ton: KoliBriAlertEventCallbacks;\n\ttype: AlertType;\n\tvariant: AlertVariant;\n} & PropLabel &\n\tPropAlert &\n\tPropHasCloser;\n\ntype RequiredAlertStates = RequiredAlertProps;\ntype OptionalAlertStates = OptionalAlertProps;\n\nexport type InternalAlertProps = RequiredAlertProps & OptionalAlertProps;\n\nexport type AlertProps = Generic.Element.Members<RequiredAlertProps, OptionalAlertProps>;\nexport type AlertStates = Generic.Element.Members<RequiredAlertStates, OptionalAlertStates>;\nexport type AlertAPI = Generic.Element.ComponentApi<RequiredAlertProps, OptionalAlertProps, RequiredAlertStates, OptionalAlertStates>;\n","import type { JSX } from '@stencil/core';\nimport { alertTypeOptions, alertVariantOptions, setState, validateHasCloser, validateLabel, watchBoolean, watchValidator } from '../../schema';\nimport { Component, Element, h, Prop, State, Watch } from '@stencil/core';\nimport { watchHeadingLevel } from '../heading/validation';\nimport type { AlertAPI, AlertStates, AlertType, AlertVariant, HasCloserPropType, HeadingLevel, KoliBriAlertEventCallbacks, LabelPropType } from '../../schema';\nimport KolAlertFc, { type KolAlertFcProps } from '../../functional-components/Alert';\nimport { dispatchDomEvent, KolEvent } from '../../utils/events';\n\n/**\n * @internal\n * @slot - Der Inhalt der Meldung.\n */\n@Component({\n\ttag: 'kol-alert-wc',\n\tshadow: false,\n})\nexport class KolAlertWc implements AlertAPI {\n\t@Element() private readonly host?: HTMLKolAlertWcElement;\n\n\tprivate readonly close = () => {\n\t\tthis._on?.onClose?.(new Event('Close'));\n\t\tif (this.host) {\n\t\t\tdispatchDomEvent(this.host, KolEvent.close);\n\t\t}\n\t};\n\n\tprivate readonly handleAlertTimeout = () => {\n\t\tthis.validateAlert(false);\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst { _alert, _hasCloser, _label, _level, _type, _variant } = this.state;\n\n\t\tconst props: KolAlertFcProps = {\n\t\t\talert: _alert,\n\t\t\thasCloser: _hasCloser,\n\t\t\tlabel: _label,\n\t\t\tlevel: _level,\n\t\t\ttype: _type,\n\t\t\tvariant: _variant,\n\t\t\tonCloserClick: this.close,\n\t\t\tonAlertTimeout: this.handleAlertTimeout,\n\t\t};\n\n\t\treturn (\n\t\t\t<KolAlertFc {...props}>\n\t\t\t\t<slot />\n\t\t\t</KolAlertFc>\n\t\t);\n\t}\n\n\t/**\n\t * Defines whether the screen-readers should read out the notification.\n\t */\n\t@Prop() public _alert?: boolean = false;\n\n\t/**\n\t * Defines whether the element can be closed.\n\t * @TODO: Change type back to `HasCloserPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hasCloser?: boolean = false;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label?: LabelPropType;\n\n\t/**\n\t * Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text.\n\t */\n\t@Prop() public _level?: HeadingLevel = 0;\n\n\t/**\n\t * Gibt die EventCallback-Function für das Schließen des Alerts an.\n\t */\n\t@Prop() public _on?: KoliBriAlertEventCallbacks;\n\n\t/**\n\t * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: AlertType = 'default';\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: AlertVariant = 'msg';\n\n\t@State() public state: AlertStates = {\n\t\t_level: 0,\n\t};\n\n\t@Watch('_alert')\n\tpublic validateAlert(value?: boolean): void {\n\t\twatchBoolean(this, '_alert', value);\n\t}\n\n\t@Watch('_hasCloser')\n\tpublic validateHasCloser(value?: HasCloserPropType): void {\n\t\tvalidateHasCloser(this, value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelPropType): void {\n\t\tvalidateLabel(this, value);\n\t}\n\n\t@Watch('_level')\n\tpublic validateLevel(value?: HeadingLevel): void {\n\t\twatchHeadingLevel(this, value);\n\t}\n\n\tprivate validateOnValue = (value: unknown): boolean =>\n\t\ttypeof value === 'object' && value !== null && typeof (value as KoliBriAlertEventCallbacks).onClose === 'function';\n\n\t@Watch('_on')\n\tpublic validateOn(value?: KoliBriAlertEventCallbacks): void {\n\t\tif (this.validateOnValue(value)) {\n\t\t\tsetState<KoliBriAlertEventCallbacks>(\n\t\t\t\tthis,\n\t\t\t\t'_on',\n\t\t\t\t{\n\t\t\t\t\tonClose: (value as KoliBriAlertEventCallbacks).onClose,\n\t\t\t\t},\n\t\t\t\t// {\n\t\t\t\t// \tafterPatch: (value: unknown) => {\n\t\t\t\t// \t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t\t// \t},\n\t\t\t\t// }\n\t\t\t);\n\t\t\t// } else {\n\t\t\t// \tsetState<KoliBriAlertEventCallbacks>(this, '_on', null, {\n\t\t\t// \t\tafterPatch: (value: unknown) => {\n\t\t\t// \t\t\tthis._hasCloser = this.validateOnValue(value);\n\t\t\t// \t\t},\n\t\t\t// \t});\n\t\t}\n\t}\n\n\t@Watch('_type')\n\tpublic validateType(value?: AlertType): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_type',\n\t\t\t(value?) => typeof value === 'string' && alertTypeOptions.includes(value),\n\t\t\tnew Set(`String {${alertTypeOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\t@Watch('_variant')\n\tpublic validateVariant(value?: AlertVariant): void {\n\t\twatchValidator(\n\t\t\tthis,\n\t\t\t'_variant',\n\t\t\t(value?) => typeof value === 'string' && alertVariantOptions.includes(value),\n\t\t\tnew Set(`AlertVariant {${alertVariantOptions.join(', ')}`),\n\t\t\tvalue,\n\t\t);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlert(this._alert);\n\t\tthis.validateHasCloser(this._hasCloser);\n\t\tthis.validateLabel(this._label);\n\t\tthis.validateLevel(this._level);\n\t\tthis.validateOn(this._on);\n\t\tthis.validateType(this._type);\n\t\tthis.validateVariant(this._variant);\n\t}\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{w as watchValidator,l as watchString}from"./index2.js";import{v as validateImageSource}from"./image-source.js";const loadingOptions=["eager","lazy"];function validateLoading(e,n){watchValidator(e,"_loading",(e=>"string"==typeof e&&loadingOptions.includes(e)),new Set(loadingOptions),n)}const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 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 .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .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 .kol-image {\n display: inline-block;\n max-height: 100%;\n max-width: 100%;\n }\n}",KolImageDefaultStyle0=defaultStyleCss,KolImage$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this._alt=void 0,this._loading="lazy",this._sizes=void 0,this._src=void 0,this._srcset=void 0,this.state={_alt:"",_loading:"lazy",_src:""}}validateAlt(e){watchString(this,"_alt",e,{required:!0})}validateLoading(e){validateLoading(this,e)}validateSizes(e){watchString(this,"_sizes",e)}validateSrc(e){validateImageSource(this,e,{required:!0})}validateSrcset(e){watchString(this,"_srcset",e)}componentWillLoad(){this.validateAlt(this._alt),this.validateLoading(this._loading),this.validateSizes(this._sizes),this.validateSrc(this._src),this.validateSrcset(this._srcset)}render(){return h("img",{key:"23837493ec11632608a497a0319b945b91cadb6d",class:"kol-image",alt:this.state._alt,loading:this.state._loading,sizes:this.state._sizes,src:this.state._src,srcset:this.state._srcset})}static get watchers(){return{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}}static get style(){return{default:KolImageDefaultStyle0}}},[33,"kol-image",{_alt:[1],_loading:[1],_sizes:[1],_src:[1],_srcset:[1],state:[32]},void 0,{_alt:["validateAlt"],_loading:["validateLoading"],_sizes:["validateSizes"],_src:["validateSrc"],_srcset:["validateSrcset"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-image"].forEach((e=>{if("kol-image"===e)customElements.get(e)||customElements.define(e,KolImage$1)}))}const KolImage=KolImage$1,defineCustomElement=defineCustomElement$1;export{KolImage,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-image.js","mappings":";;;;;;;
|
1
|
+
{"file":"kol-image.js","mappings":";;;;;;;AAGA,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;SAGlC,eAAe,CAAC,SAAoC,EAAE,KAAe;IACp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,4DACC,KAAK,EAAC,WAAW,EACjB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACpB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACxB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACpB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GACpB,EACN;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolImage"],"sources":["src/schema/props/loading.ts","src/components/image/style.scss?tag=kol-image&mode=default&encapsulation=shadow","src/components/image/shadow.tsx"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport { watchValidator } from '../utils';\n\nconst loadingOptions = ['eager', 'lazy'] as const;\nexport type Loading = (typeof loadingOptions)[number];\n\nexport function validateLoading(component: Generic.Element.Component, value?: Loading): void {\n\twatchValidator<Loading>(component, '_loading', (value) => typeof value === 'string' && loadingOptions.includes(value), new Set(loadingOptions), value);\n}\n","@use '../../styles/global' as *;\n\n@layer kol-component {\n\t.kol-image {\n\t\tdisplay: inline-block;\n\t\tmax-height: 100%;\n\t\tmax-width: 100%;\n\t}\n}\n","import type { ImageAPI, ImageSourcePropType, ImageStates, Loading } from '../../schema';\nimport { validateImageSource, validateLoading, watchString } from '../../schema';\nimport { Component, h, Prop, State, Watch } from '@stencil/core';\n\nimport type { JSX } from '@stencil/core';\n@Component({\n\ttag: 'kol-image',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: true,\n})\nexport class KolImage implements ImageAPI {\n\t/**\n\t * Setzt den alternativen Text.\n\t */\n\t@Prop() public _alt!: string;\n\n\t/**\n\t * Defines the loading mode for the image.\n\t */\n\t@Prop() public _loading?: Loading = 'lazy';\n\n\t/**\n\t * Defines the image sizes for different screen resolutions, supporting _srcset.\n\t */\n\t@Prop() public _sizes?: string;\n\n\t/**\n\t * Sets the image `src` attribute to the given string.\n\t */\n\t@Prop() public _src!: ImageSourcePropType;\n\n\t/**\n\t * Setzt eine Liste von Quell-URLs mit Breiten der Bilder.\n\t */\n\t@Prop() public _srcset?: string;\n\n\t@State() public state: ImageStates = {\n\t\t_alt: '', // ⚠ required\n\t\t_loading: 'lazy',\n\t\t_src: '', // ⚠ required\n\t};\n\n\t@Watch('_alt')\n\tpublic validateAlt(value?: string): void {\n\t\twatchString(this, '_alt', value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_loading')\n\tpublic validateLoading(value?: Loading): void {\n\t\tvalidateLoading(this, value);\n\t}\n\n\t@Watch('_sizes')\n\tpublic validateSizes(value?: string): void {\n\t\twatchString(this, '_sizes', value);\n\t}\n\n\t@Watch('_src')\n\tpublic validateSrc(value?: ImageSourcePropType): void {\n\t\tvalidateImageSource(this, value, {\n\t\t\trequired: true,\n\t\t});\n\t}\n\n\t@Watch('_srcset')\n\tpublic validateSrcset(value?: string): void {\n\t\twatchString(this, '_srcset', value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis.validateAlt(this._alt);\n\t\tthis.validateLoading(this._loading);\n\t\tthis.validateSizes(this._sizes);\n\t\tthis.validateSrc(this._src);\n\t\tthis.validateSrcset(this._srcset);\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<img\n\t\t\t\tclass=\"kol-image\"\n\t\t\t\talt={this.state._alt}\n\t\t\t\tloading={this.state._loading}\n\t\t\t\tsizes={this.state._sizes}\n\t\t\t\tsrc={this.state._src}\n\t\t\t\tsrcset={this.state._srcset}\n\t\t\t></img>\n\t\t);\n\t}\n}\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{b as KolButtonWcTag,l as KolPopoverWcTag}from"./component-names.js";import{c as clsx}from"./clsx.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 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 .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .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 .kol-popover {\n height: 0;\n position: absolute;\n }\n .kol-popover__content {\n background-color: #fff;\n min-height: max-content;\n min-width: max-content;\n opacity: 0;\n position: absolute;\n }\n .kol-popover__content--visible {\n animation: 0.3s ease-in forwards fadeInOpacity;\n }\n .kol-popover__content--disappear {\n animation: 0.3s ease-in backwards fadeInOpacity;\n }\n .kol-popover__arrow {\n background-color: inherit;\n height: var(--font-size);\n position: absolute;\n rotate: 0.125turn;\n width: var(--font-size);\n z-index: -1;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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-split-button {\n display: flex;\n position: relative;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n }\n .kol-split-button__button {\n flex-grow: 1;\n text-align: left;\n }\n .kol-split-button .kol-popover__content {\n margin-top: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .kol-split-button .kol-popover__arrow {\n display: none;\n }\n}",KolSplitButtonDefaultStyle0=defaultStyleCss,KolSplitButton$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchPrimaryRef=n=>{this.primaryButtonWcRef=n},this.clickButtonHandler={onClick:n=>{var t,e;n.stopPropagation(),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onClick)&&(null===(e=this._on)||void 0===e||e.onClick(n,this._value))}},this.clickToggleHandler={onClick:n=>{n.stopPropagation(),this.toggleDropdown()}},this.toggleDropdown=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!this.state._show})},this.handleOnClose=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!1})},this._accessKey=void 0,this._ariaControls=void 0,this._ariaDescription=void 0,this._ariaExpanded=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_show:!1}}async getValue(){return this._value}async kolFocus(){var n;await(null===(n=this.primaryButtonWcRef)||void 0===n?void 0:n.kolFocus())}render(){const n="kol-split-button-dropdown-label";return h("div",{key:"2ca0df775c2fcce89473dfeaad1fbb64235b8a3b",class:"kol-split-button"},h("div",{key:"8933d5eddbc53f3653dcba1c4bcee525cff244b4",class:"kol-split-button__root"},h(KolButtonWcTag,{key:"f5a0ca81140515725acb321757a7fe36ee02ea14",class:clsx("kol-split-button__button",{[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0}),ref:this.catchPrimaryRef,_accessKey:this._accessKey,_ariaControls:this._ariaControls,_ariaDescription:this._ariaDescription,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_id:this._id,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_role:this._role,_shortKey:this._shortKey,_syncValueBySelector:this._syncValueBySelector,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_buttonVariant:this._variant}),h("div",{key:"4ee2a8564093ceaf91735a06cadb2d61477e8403",class:"kol-split-button__horizontal-line"}),h(KolButtonWcTag,{key:"aae9e7140a3f4fe3c892a29172b33c72ef165a30",class:"kol-split-button__secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?translate(`${n}-close`):translate(`${n}-open`),_on:this.clickToggleHandler})),h(KolPopoverWcTag,{key:"032232308b826e91f2bed8dce79ce898961f5f0f",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},h("slot",{key:"dc706f0a2c45e7527111af72e0bdf5b6a551ef60"})))}async closePopup(){return this.handleOnClose(),Promise.resolve()}static get delegatesFocus(){return!0}static get style(){return{default:KolSplitButtonDefaultStyle0}}},[49,"kol-split-button",{_accessKey:[1,"_access-key"],_ariaControls:[1,"_aria-controls"],_ariaDescription:[1,"_aria-description"],_ariaExpanded:[4,"_aria-expanded"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_role:[1],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],state:[32],getValue:[64],kolFocus:[64],closePopup:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-split-button"].forEach((n=>{if("kol-split-button"===n)customElements.get(n)||customElements.define(n,KolSplitButton$1)}))}const KolSplitButton=KolSplitButton$1,defineCustomElement=defineCustomElement$1;export{KolSplitButton,defineCustomElement};
|
4
|
+
import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{t as translate}from"./i18n2.js";import{b as KolButtonWcTag,l as KolPopoverWcTag}from"./component-names.js";import{c as clsx}from"./clsx.js";const defaultStyleCss="/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]),\n .kol-input .input {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\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%;\n /* 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 .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n font-size: rem(16);\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .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 .kol-popover {\n height: 0;\n position: absolute;\n }\n .kol-popover__content {\n background-color: #fff;\n min-height: max-content;\n min-width: max-content;\n opacity: 0;\n position: absolute;\n }\n .kol-popover__content--visible {\n animation: 0.3s ease-in forwards fadeInOpacity;\n }\n .kol-popover__content--disappear {\n animation: 0.3s ease-in backwards fadeInOpacity;\n }\n .kol-popover__arrow {\n background-color: inherit;\n height: var(--font-size);\n position: absolute;\n rotate: 0.125turn;\n width: var(--font-size);\n z-index: -1;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\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-split-button {\n display: flex;\n position: relative;\n }\n .kol-split-button__root {\n display: flex;\n position: relative;\n }\n .kol-split-button__button {\n flex-grow: 1;\n text-align: left;\n }\n .kol-split-button .kol-popover__content {\n margin-top: calc(2rem / var(--kolibri-root-font-size, 16));\n }\n .kol-split-button .kol-popover__arrow {\n display: none;\n }\n}",KolSplitButtonDefaultStyle0=defaultStyleCss,KolSplitButton$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.clickButtonHandler={onClick:n=>{var t,e;n.stopPropagation(),"function"==typeof(null===(t=this._on)||void 0===t?void 0:t.onClick)?null===(e=this._on)||void 0===e||e.onClick(n,this._value):this.toggleDropdown()}},this.clickToggleHandler={onClick:n=>{n.stopPropagation(),this.toggleDropdown()}},this.toggleDropdown=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!this.state._show})},this.handleOnClose=()=>{this.state=Object.assign(Object.assign({},this.state),{_show:!1})},this._ariaControls=void 0,this._ariaExpanded=void 0,this._ariaSelected=void 0,this._customClass=void 0,this._disabled=!1,this._hideLabel=!1,this._icons=void 0,this._id=void 0,this._label=void 0,this._name=void 0,this._on=void 0,this._role=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._type="button",this._value=void 0,this._variant="normal",this.state={_show:!1}}render(){const n="kol-split-button-dropdown-label";return h("div",{key:"adfeb36fc1c13115648cab2c692dcf28ede4f663",class:"kol-split-button"},h("div",{key:"6ddddfa00a901d7a1c02a242384ba6478955c13b",class:"kol-split-button__root"},h(KolButtonWcTag,{key:"73295b6c589ee559c4e301c6685568e0aa6359de",class:clsx("kol-split-button__button",{[this._variant]:"custom"!==this._variant,[this._customClass]:"custom"===this._variant&&"string"==typeof this._customClass&&this._customClass.length>0}),_ariaControls:this._ariaControls,_ariaExpanded:this._ariaExpanded,_ariaSelected:this._ariaSelected,_customClass:this._customClass,_disabled:this._disabled,_icons:this._icons,_hideLabel:this._hideLabel,_label:this._label,_name:this._name,_on:this.clickButtonHandler,_role:this._role,_syncValueBySelector:this._syncValueBySelector,_tooltipAlign:this._tooltipAlign,_type:this._type,_value:this._value,_buttonVariant:this._variant}),h("div",{key:"29f15b767934692234c76d6738696ea225488d24",class:"kol-split-button__horizontal-line"}),h(KolButtonWcTag,{key:"689696759403849639ec892383aad2d055ac1482",class:"kol-split-button__secondary-button",_disabled:this._disabled,_hideLabel:!0,_icons:"codicon codicon-triangle-down",_label:this.state._show?translate(`${n}-close`):translate(`${n}-open`),_on:this.clickToggleHandler})),h(KolPopoverWcTag,{key:"ba4151408b5ea8295eaee3f680ccd394e081464b",_show:this.state._show,_on:{onClose:this.handleOnClose},_align:"bottom"},h("slot",{key:"88c02a85478c3cedae8272e2f3f4848bbf031488"})))}async closePopup(){return this.handleOnClose(),Promise.resolve()}static get delegatesFocus(){return!0}static get style(){return{default:KolSplitButtonDefaultStyle0}}},[49,"kol-split-button",{_ariaControls:[1,"_aria-controls"],_ariaExpanded:[4,"_aria-expanded"],_ariaSelected:[4,"_aria-selected"],_customClass:[1,"_custom-class"],_disabled:[4],_hideLabel:[4,"_hide-label"],_icons:[1],_id:[1],_label:[1],_name:[1],_on:[16],_role:[1],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_type:[1],_value:[8],_variant:[1],state:[32],closePopup:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-split-button"].forEach((n=>{if("kol-split-button"===n)customElements.get(n)||customElements.define(n,KolSplitButton$1)}))}const KolSplitButton=KolSplitButton$1,defineCustomElement=defineCustomElement$1;export{KolSplitButton,defineCustomElement};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"kol-split-button.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,61MAA61M,CAAC;AACt3M,oCAAe,eAAe;;MCmCjBA,gBAAc;;;;;QAGT,oBAAe,GAAG,CAAC,GAA4B;YAC/D,IAAI,CAAC,kBAAkB,GAAG,GAAG,CAAC;SAC9B,CAAC;QAae,uBAAkB,GAAG;YACrC,OAAO,EAAE,CAAC,KAAiB;;gBA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AAE,IAAI,CAAC,kBAAkB,GACX,CACb,EACN,EAAC,eAAe,qDAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAC,QAAQ,IAC9F,8DAAQ,CACS,CACb,EACL;KACF;IAGM,MAAM,UAAU;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;KACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSplitButton"],"sources":["src/components/split-button/style.scss?tag=kol-split-button&mode=default&encapsulation=shadow","src/components/split-button/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n@use '../popover/style.scss' as *;\n@use '../tooltip/style.scss' as *;\n\n@layer kol-component {\n\t.kol-split-button {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\n\t\t&__root {\n\t\t\tdisplay: flex;\n\t\t\tposition: relative;\n\t\t}\n\n\t\t&__button {\n\t\t\tflex-grow: 1;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t.kol-popover {\n\t\t\t&__content {\n\t\t\t\tmargin-top: rem(2);\n\t\t\t}\n\n\t\t\t&__arrow {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n","import type {\n\tAccessKeyPropType,\n\tAlternativeButtonLinkRolePropType,\n\tAriaDescriptionPropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelWithExpertSlotPropType,\n\tShortKeyPropType,\n\tSplitButtonProps,\n\tSplitButtonStates,\n\tStencilUnknown,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop, State } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { KolButtonWcTag, KolPopoverWcTag } from '../../core/component-names';\nimport clsx from 'clsx';\n\n/**\n * @slot - Ermöglicht das Einfügen beliebigen HTMLs in das dropdown.\n */\n@Component({\n\ttag: 'kol-split-button',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolSplitButton implements SplitButtonProps /*, SplitButtonAPI*/ {\n\tprivate primaryButtonWcRef?: HTMLKolButtonWcElement;\n\n\tprivate readonly catchPrimaryRef = (ref?: HTMLKolButtonWcElement) => {\n\t\tthis.primaryButtonWcRef = ref;\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._value;\n\t}\n\n\t@Method()\n\tpublic async kolFocus() {\n\t\tawait this.primaryButtonWcRef?.kolFocus();\n\t}\n\n\tprivate readonly clickButtonHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\n\t\t\tif (typeof this._on?.onClick === 'function') {\n\t\t\t\t// TODO: this._on is not validated\n\t\t\t\tthis._on?.onClick(event, this._value);\n\t\t\t}\n\t\t},\n\t};\n\tprivate readonly clickToggleHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\t\t\tthis.toggleDropdown();\n\t\t},\n\t};\n\n\tprivate readonly toggleDropdown = () => {\n\t\tthis.state = { ...this.state, _show: !this.state._show };\n\t};\n\n\tprivate readonly handleOnClose = () => {\n\t\tthis.state = { ...this.state, _show: false };\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst i18nDropdownLabel = 'kol-split-button-dropdown-label';\n\t\treturn (\n\t\t\t<div class=\"kol-split-button\">\n\t\t\t\t<div class=\"kol-split-button__root\">\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={clsx('kol-split-button__button', {\n\t\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tref={this.catchPrimaryRef}\n\t\t\t\t\t\t_accessKey={this._accessKey}\n\t\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t\t_ariaDescription={this._ariaDescription}\n\t\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_icons={this._icons}\n\t\t\t\t\t\t_id={this._id}\n\t\t\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t\t_name={this._name}\n\t\t\t\t\t\t_on={this.clickButtonHandler}\n\t\t\t\t\t\t_role={this._role}\n\t\t\t\t\t\t_shortKey={this._shortKey}\n\t\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t\t_type={this._type}\n\t\t\t\t\t\t_value={this._value}\n\t\t\t\t\t\t_buttonVariant={this._variant}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t\t<div class=\"kol-split-button__horizontal-line\"></div>\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass=\"kol-split-button__secondary-button\"\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons=\"codicon codicon-triangle-down\"\n\t\t\t\t\t\t_label={this.state._show ? translate(`${i18nDropdownLabel}-close`) : translate(`${i18nDropdownLabel}-open`)}\n\t\t\t\t\t\t_on={this.clickToggleHandler}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t</div>\n\t\t\t\t<KolPopoverWcTag _show={this.state._show} _on={{ onClose: this.handleOnClose }} _align=\"bottom\">\n\t\t\t\t\t<slot />\n\t\t\t\t</KolPopoverWcTag>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t@Method()\n\tpublic async closePopup() {\n\t\tthis.handleOnClose();\n\n\t\treturn Promise.resolve();\n\t}\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?: AccessKeyPropType;\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Defines the value for the aria-description attribute.\n\t */\n\t@Prop() public _ariaDescription?: AriaDescriptionPropType;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * 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 icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: string;\n\n\t/**\n\t * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\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 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 * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: StencilUnknown;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@State() public state: SplitButtonStates = {\n\t\t_show: false,\n\t};\n}\n"],"version":3}
|
1
|
+
{"file":"kol-split-button.js","mappings":";;;;;;;;AAAA,MAAM,eAAe,GAAG,61MAA61M,CAAC;AACt3M,oCAAe,eAAe;;MCkCjBA,gBAAc;;;;;QACT,uBAAkB,GAAG;YACrC,OAAO,EAAE,CAAC,KAAiB;;gBAC1B,KAAK,CAAC,eAAe,EAAE,CAAC;gBAExB,IAAI,QAAO,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,CAAA,KAAK,UAAU,EAAE;oBAE5C,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;iBACtC;qBAAM;oBACN,IAAI,CAAC,cAAc,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UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,IAAI,CAAC,kBAAkB,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAC/C,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,cAAc,EAAE,IAAI,CAAC,QAAQ,GACZ,EAClB,4DAAK,KAAK,EAAC,mCAAmC,GAAO,EACrD,EAAC,cAAc,qDACd,KAAK,EAAC,oCAAoC,EAC1C,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,UAAU,QACV,MAAM,EAAC,+BAA+B,EACtC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,GAAG,iBAAiB,QAAQ,CAAC,GAAG,SAAS,CAAC,GAAG,iBAAiB,OAAO,CAAC,EAC3G,GAAG,EAAE,IAAI,CAAC,kBAAkB,GACX,CACb,EACN,EAAC,eAAe,qDAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,MAAM,EAAC,QAAQ,IAC9F,8DAAQ,CACS,CACb,EACL;KACF;IAGM,MAAM,UAAU;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;KACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolSplitButton"],"sources":["src/components/split-button/style.scss?tag=kol-split-button&mode=default&encapsulation=shadow","src/components/split-button/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n@use '../popover/style.scss' as *;\n@use '../tooltip/style.scss' as *;\n\n@layer kol-component {\n\t.kol-split-button {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\n\t\t&__root {\n\t\t\tdisplay: flex;\n\t\t\tposition: relative;\n\t\t}\n\n\t\t&__button {\n\t\t\tflex-grow: 1;\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t.kol-popover {\n\t\t\t&__content {\n\t\t\t\tmargin-top: rem(2);\n\t\t\t}\n\n\t\t\t&__arrow {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n","import type {\n\tAlternativeButtonLinkRolePropType,\n\tButtonCallbacksPropType,\n\tButtonTypePropType,\n\tButtonVariantPropType,\n\tCustomClassPropType,\n\tIconsPropType,\n\tLabelPropType,\n\tNamePropType,\n\tSplitButtonProps,\n\tSplitButtonStates,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\nimport type { JSX } from '@stencil/core';\nimport { Component, h, Method, Prop, State } from '@stencil/core';\n\nimport { translate } from '../../i18n';\nimport { KolButtonWcTag, KolPopoverWcTag } from '../../core/component-names';\nimport clsx from 'clsx';\n\n/**\n * @slot - Ermöglicht das Einfügen beliebigen HTMLs in das dropdown.\n */\n@Component({\n\ttag: 'kol-split-button',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolSplitButton implements SplitButtonProps /*, SplitButtonAPI*/ {\n\tprivate readonly clickButtonHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\n\t\t\tif (typeof this._on?.onClick === 'function') {\n\t\t\t\t// TODO: this._on is not validated\n\t\t\t\tthis._on?.onClick(event, this._value);\n\t\t\t} else {\n\t\t\t\tthis.toggleDropdown();\n\t\t\t}\n\t\t},\n\t};\n\tprivate readonly clickToggleHandler = {\n\t\tonClick: (event: MouseEvent) => {\n\t\t\tevent.stopPropagation(); // stop propagation to avoid triggering the event that closes the popover\n\t\t\tthis.toggleDropdown();\n\t\t},\n\t};\n\n\tprivate readonly toggleDropdown = () => {\n\t\tthis.state = { ...this.state, _show: !this.state._show };\n\t};\n\n\tprivate readonly handleOnClose = () => {\n\t\tthis.state = { ...this.state, _show: false };\n\t};\n\n\tpublic render(): JSX.Element {\n\t\tconst i18nDropdownLabel = 'kol-split-button-dropdown-label';\n\t\treturn (\n\t\t\t<div class=\"kol-split-button\">\n\t\t\t\t<div class=\"kol-split-button__root\">\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={clsx('kol-split-button__button', {\n\t\t\t\t\t\t\t[this._variant as string]: this._variant !== 'custom',\n\t\t\t\t\t\t\t[this._customClass as string]: this._variant === 'custom' && typeof this._customClass === 'string' && this._customClass.length > 0,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\t_ariaControls={this._ariaControls}\n\t\t\t\t\t\t_ariaExpanded={this._ariaExpanded}\n\t\t\t\t\t\t_ariaSelected={this._ariaSelected}\n\t\t\t\t\t\t_customClass={this._customClass}\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_icons={this._icons}\n\t\t\t\t\t\t_hideLabel={this._hideLabel}\n\t\t\t\t\t\t_label={this._label}\n\t\t\t\t\t\t_name={this._name}\n\t\t\t\t\t\t_on={this.clickButtonHandler}\n\t\t\t\t\t\t_role={this._role}\n\t\t\t\t\t\t_syncValueBySelector={this._syncValueBySelector}\n\t\t\t\t\t\t_tooltipAlign={this._tooltipAlign}\n\t\t\t\t\t\t_type={this._type}\n\t\t\t\t\t\t_value={this._value}\n\t\t\t\t\t\t_buttonVariant={this._variant}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t\t<div class=\"kol-split-button__horizontal-line\"></div>\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass=\"kol-split-button__secondary-button\"\n\t\t\t\t\t\t_disabled={this._disabled}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons=\"codicon codicon-triangle-down\"\n\t\t\t\t\t\t_label={this.state._show ? translate(`${i18nDropdownLabel}-close`) : translate(`${i18nDropdownLabel}-open`)}\n\t\t\t\t\t\t_on={this.clickToggleHandler}\n\t\t\t\t\t></KolButtonWcTag>\n\t\t\t\t</div>\n\t\t\t\t<KolPopoverWcTag _show={this.state._show} _on={{ onClose: this.handleOnClose }} _align=\"bottom\">\n\t\t\t\t\t<slot />\n\t\t\t\t</KolPopoverWcTag>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t@Method()\n\tpublic async closePopup() {\n\t\tthis.handleOnClose();\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Defines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)\n\t */\n\t@Prop() public _ariaControls?: string;\n\n\t/**\n\t * Defines whether the interactive element of the component expanded something. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n\t */\n\t@Prop() public _ariaExpanded?: boolean;\n\n\t/**\n\t * Defines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n\t */\n\t@Prop() public _ariaSelected?: boolean;\n\n\t/**\n\t * Defines the custom class attribute if _variant=\"custom\" is set.\n\t */\n\t@Prop() public _customClass?: CustomClassPropType;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * 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 icon classnames (e.g. `_icons=\"fa-solid fa-user\"`).\n\t */\n\t@Prop() public _icons?: IconsPropType;\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: string;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.).\n\t */\n\t@Prop() public _label!: LabelPropType;\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 * Defines the callback functions for button events.\n\t */\n\t@Prop() public _on?: ButtonCallbacksPropType<StencilUnknown>;\n\n\t/**\n\t * Defines the role of the components primary element.\n\t */\n\t@Prop() public _role?: AlternativeButtonLinkRolePropType;\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 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 * Defines either the type of the component or of the components interactive element.\n\t */\n\t@Prop() public _type?: ButtonTypePropType = 'button';\n\n\t/**\n\t * Defines the value that the button emits on click.\n\t */\n\t@Prop() public _value?: Stringified<StencilUnknown>;\n\n\t/**\n\t * Defines which variant should be used for presentation.\n\t */\n\t@Prop() public _variant?: ButtonVariantPropType = 'normal';\n\n\t@State() public state: SplitButtonStates = {\n\t\t_show: false,\n\t};\n}\n"],"version":3}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/*!
|
2
|
+
* KoliBri - The accessible HTML-Standard
|
3
|
+
*/
|
4
|
+
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-1704c42b.js";import{c as clsx}from"./clsx-09a06a12.js";import{e as KolIconTag,b as KolButtonWcTag}from"./component-names-553d8bfa.js";import{t as translate}from"./i18n-260f0fe9.js";import{a as BEM_CLASS_ALERT__ICON,b as bem,c as BEM_CLASS_ALERT__CONTENT,d as BEM_CLASS_ALERT__CLOSER}from"./bem-e4c3a2e6.js";import{K as KolHeadingFc}from"./Heading-1e98210c.js";const Icon=({ariaLabel:a,icon:e})=>h(Fragment,null,h("span",{class:"visually-hidden"},a),h(KolIconTag,{class:BEM_CLASS_ALERT__ICON,_label:"",_icons:e})),AlertIcon=({type:a,label:e})=>{switch(a){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e})}},KolAlertFc=(a,e)=>{var o,l;const{class:n={},alert:s=!1,hasCloser:i=!1,label:r,level:t=0,type:c="default",variant:d="msg",onAlertTimeout:_,onCloserClick:b}=a,m=__rest(a,["class","alert","hasCloser","label","level","type","variant","onAlertTimeout","onCloserClick"]);s&&((null===(o=navigator.userActivation)||void 0===o?void 0:o.hasBeenActive)&&(null===(l=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===l||l.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==_||_()}),1e4));const v=bem("kol-alert",{hasCloser:!!i,[`type-${c}`]:!0,[`variant-${d}`]:!0}),g=bem("kol-alert","heading",{[`h${t}`]:!0}),u=Object.assign({class:clsx(n,v),role:s?"error"===c?"alert":"status":void 0},m);return h("div",Object.assign({},u),h("div",{class:"kol-alert__container"},h(AlertIcon,{label:r,type:c}),h("div",{class:"kol-alert__container-content"},r&&h(KolHeadingFc,{class:g,level:t,id:"heading"},r),"msg"===d&&h("span",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":r?"heading":void 0},e)),i&&h(KolButtonWcTag,{class:BEM_CLASS_ALERT__CLOSER,"data-testid":"alert-close-button",_ariaDescription:(null==r?void 0:r.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close-alert"),_on:{onClick:b},_tooltipAlign:"left"})),"card"===d&&h("div",{class:BEM_CLAS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AC,8BAA8B;gBACvC,KAAK,KACL,EAAC,YAAY,IAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,IACjE,KAAK,CACQ,CACf;gBACA,OAAO,KAAK,KAAK,KACjB,YAAM,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACpF,QAAQ,CACH,CACP,CACI;YACL,SAAS,KACT,EAAC,cAAc,IACd,KAAK,EAAE,uBAAuB,iBAClB,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\t/**\n\t\t * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n\t\t * - https://googlechrome.github.io/samples/vibration/\n\t\t * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n\t\t * @todo Move side-effect out of render-function to avoid multiple incarnations.\n\t\t */\n\t\tif (navigator.userActivation?.hasBeenActive) {\n\t\t\tnavigator?.vibrate?.([100, 75, 100, 75, 100]);\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-
|
4
|
+
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-1704c42b.js";import{c as clsx}from"./clsx-09a06a12.js";import{b as KolButtonWcTag}from"./component-names-553d8bfa.js";import{K as KolHeadingFc}from"./Heading-1e98210c.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:i,level:e=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,b=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),_=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},b),h(KolHeadingFc,{ref:null==r?void 0:r.ref,level:e,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${_}`,_label:i,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"Collapsible-
|
1
|
+
{"file":"Collapsible-eb5f8bf7.js","mappings":";;;;;;;;;MAuCM,gBAAgB,GAAyB,CAAC,KAAK,EAAE,QAAQ;IAC9D,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,GAAG,EAAE,EAAE,kBAAkB,GAAG,EAAE,EAAE,YAAY,GAAG,EAAE,KAAe,KAAK,EAAf,KAAK,UAAK,KAAK,EAArJ,sHAA6I,CAAQ,CAAC;IAC5J,MAAM,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;IAErC,QACC,yBACC,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,IAAI,CACV,aAAa,EACb;YACC,uBAAuB,EAAE,QAAQ,KAAK,IAAI;YAC1C,mBAAmB,EAAE,IAAI,KAAK,IAAI;SAClC,EACD,UAAU,CACV,IACG,KAAK;QAET,EAAC,YAAY,IAAC,GAAG,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC;YAC3G,EAAC,cAAc,IACd,KAAK,EAAE,IAAI,CAAC,6BAA6B,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,CAAC,EACrE,GAAG,EAAE,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,GAAG,EAC5B,IAAI,EAAC,QAAQ,EACb,aAAa,EAAE,GAAG,EAAE,UAAU,EAC9B,aAAa,EAAE,IAAI,EACnB,SAAS,EAAE,QAAQ,EACnB,MAAM,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,KAAI,mBAAmB,IAAI,EAAE,EAC/D,MAAM,EAAE,KAAK,EACb,GAAG,EAAE,EAAE,OAAO,EAAE,GACC,CACJ;QACf,WAAK,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY,CAAC;YACnE,WAAK,KAAK,EAAE,IAAI,CAAC,gCAAgC,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,cAAc,CAAC;gBAC/E,0BAAkB,IAAI,KAAK,KAAK,GAAG,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,IAClI,QAAQ,CACJ,CACD,CACD,CACD,EACL;AACH;;;;","names":[],"sources":["src/functional-components/Collapsible/Collapsible.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { HeadingLevel, IconsPropType } from '../../schema';\nimport KolHeadingFc from '../Heading';\n\ntype ClassType =\n\t| string\n\t| {\n\t\t\t[className: string]: boolean;\n\t };\n\nexport type CollapsibleProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\topen?: boolean;\n\tdisabled?: boolean;\n\tlevel?: HeadingLevel;\n\tlabel: string;\n\n\tHeadingProps?: {\n\t\tref?: ((elm?: HTMLElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t};\n\n\tHeadingButtonProps?: {\n\t\tref?: ((elm?: HTMLKolButtonWcElement | undefined) => void) | undefined;\n\t\tclass?: ClassType;\n\t\t_icons?: IconsPropType;\n\t};\n\n\tContentProps?: {\n\t\tclass?: ClassType;\n\t\tanimationClass?: ClassType;\n\t\twrapperClass?: ClassType;\n\t};\n};\n\nconst KolCollapsibleFc: FC<CollapsibleProps> = (props, children) => {\n\tconst { id, class: classNames, label, level = 1, disabled, open, onClick, HeadingProps = {}, HeadingButtonProps = {}, ContentProps = {}, ...other } = props;\n\tconst icon = open ? 'remove' : 'add';\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tclass={clsx(\n\t\t\t\t'collapsible',\n\t\t\t\t{\n\t\t\t\t\t'collapsible--disabled': disabled === true,\n\t\t\t\t\t'collapsible--open': open === true,\n\t\t\t\t},\n\t\t\t\tclassNames,\n\t\t\t)}\n\t\t\t{...other}\n\t\t>\n\t\t\t<KolHeadingFc ref={HeadingProps?.ref} level={level} class={clsx('collapsible__heading', HeadingProps?.class)}>\n\t\t\t\t<KolButtonWcTag\n\t\t\t\t\tclass={clsx('collapsible__heading-button', HeadingButtonProps?.class)}\n\t\t\t\t\tref={HeadingButtonProps?.ref}\n\t\t\t\t\tslot=\"expert\"\n\t\t\t\t\t_ariaControls={`${id}-control`}\n\t\t\t\t\t_ariaExpanded={open}\n\t\t\t\t\t_disabled={disabled}\n\t\t\t\t\t_icons={HeadingButtonProps?._icons || `codicon codicon-${icon}`}\n\t\t\t\t\t_label={label}\n\t\t\t\t\t_on={{ onClick }}\n\t\t\t\t></KolButtonWcTag>\n\t\t\t</KolHeadingFc>\n\t\t\t<div class={clsx('collapsible__wrapper', ContentProps?.wrapperClass)}>\n\t\t\t\t<div class={clsx('collapsible__wrapper-animation', ContentProps?.animationClass)}>\n\t\t\t\t\t<div aria-hidden={open === false ? 'true' : undefined} class={clsx('collapsible__content', ContentProps?.class)} id={`${id}-control`}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default KolCollapsibleFc;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h}from"./index-
|
4
|
+
import{h}from"./index-1704c42b.js";import{e as KolIconTag}from"./component-names-553d8bfa.js";import{t as translate}from"./i18n-260f0fe9.js";import{c as clsx}from"./clsx-09a06a12.js";const getRenderStates=o=>{var s;const t="error"===(null===(s=o._msg)||void 0===s?void 0:s._type)&&!0===o._touched,e="string"==typeof o._hint&&o._hint.length>0,n=[];return!0===t&&n.push(`${o._id}-error`),!0===e&&n.push(`${o._id}-hint`),{hasMsg:t,hasHint:e,ariaDescribedBy:n}},CustomSuggestionsToggleFc=({onClick:o,disabled:s})=>h("button",{tabindex:"-1",class:"kol-custom-suggestions-toggle",onClick:o,disabled:s},h(KolIconTag,{_icons:"codicon codicon-triangle-down",_label:translate("kol-dropdown")})),CustomSuggestionsOptionFc=({index:o,ref:s,selected:t,onClick:e,onMouseOver:n,onFocus:i,onKeyDown:r,option:c})=>h("li",{id:`option-${o}`,key:`-${o}`,ref:s,"data-index":o,tabIndex:-1,role:"option","aria-selected":t?"true":void 0,onClick:e,onMouseOver:n,onFocus:i,class:"kol-custom-suggestions-option",onKeyDown:r},c),CustomSuggestionsOptionsGroupFc=({blockSuggestionMouseOver:o,onKeyDown:s,style:t},e)=>h("ul",{role:"listbox",style:t,class:clsx("kol-custom-suggestions-options-group",{"kol-custom-suggestions-options-group--cursor-hidden":o}),onKeyDown:s},e);export{CustomSuggestionsToggleFc as C,CustomSuggestionsOptionsGroupFc as a,CustomSuggestionsOptionFc as b,getRender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GAAG,EAAE,IAAI,KAAK,EAAE,EAChB,GAAG,EAAE,GAAG,gBACI,KAAK,EACjB,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAC,QAAQ,mBACE,QAAQ,GAAG,MAAM,GAAG,SAAS,EAC5C,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,+BAA+B,EACrC,SAAS,EAAE,SAAS,IAEnB,MAAM,CACH,EACJ;AACH;;MCtBM,+BAA+B,GAA2C,CAAC,EAAE,wBAAwB,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,QAAQ;IACxI,QACC,UACC,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,CAAC,sCAAsC,EAAE;YACnD,qDAAqD,EAAE,wBAAwB;SAC/E,CAAC,EACF,SAAS,EAAE,SAAS,IAEnB,QAAQ,CACL,EACJ;AACH;;;;","names":[],"sources":["src/components/input/controller.ts","src/functional-components/CustomSuggestionsToggle/CustomSuggestionsToggle.tsx","src/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.tsx","src/functional-components/CustomSuggestionsOptionsGroup/CustomSuggestionsOptionsGroup.tsx"],"sourcesContent":["import type { MsgPropType, TouchedPropType } from '../../schema';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_msg?: MsgPropType;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasMsg: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst isMessageValid = state._msg?._type === 'error';\n\tconst hasMsg = isMessageValid && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasMsg === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasMsg, hasHint, ariaDescribedBy };\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport type { JSXBase } from '@stencil/core/internal';\n\nexport type CustomSuggestionsToggleProps = JSXBase.HTMLAttributes<HTMLButtonElement> & { disabled?: boolean };\n\nconst CustomSuggestionsToggleFc: FC<CustomSuggestionsToggleProps> = ({ onClick, disabled }) => {\n\treturn (\n\t\t<button tabindex=\"-1\" class=\"kol-custom-suggestions-toggle\" onClick={onClick} disabled={disabled}>\n\t\t\t<KolIconTag _icons=\"codicon codicon-triangle-down\" _label={translate('kol-dropdown')} />\n\t\t</button>\n\t);\n};\nexport default CustomSuggestionsToggleFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type CustomSuggestionsProps = JSXBase.HTMLAttributes<HTMLLIElement> & {\n\tindex: number;\n\toption: W3CInputValue;\n\tselected: boolean;\n\tref?: ((elm?: HTMLLIElement | undefined) => void) | undefined;\n};\n\nconst CustomSuggestionsOptionFc: FC<CustomSuggestionsProps> = ({ index, ref, selected, onClick, onMouseOver, onFocus, onKeyDown, option }) => {\n\treturn (\n\t\t<li\n\t\t\tid={`option-${index}`}\n\t\t\tkey={`-${index}`}\n\t\t\tref={ref}\n\t\t\tdata-index={index}\n\t\t\ttabIndex={-1}\n\t\t\trole=\"option\"\n\t\t\taria-selected={selected ? 'true' : undefined}\n\t\t\tonClick={onClick}\n\t\t\tonMouseOver={onMouseOver}\n\t\t\tonFocus={onFocus}\n\t\t\tclass=\"kol-custom-suggestions-option\"\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{option}\n\t\t</li>\n\t);\n};\nexport default CustomSuggestionsOptionFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nexport type CustomSuggestionsOptionsGroupProps = JSXBase.HTMLAttributes<HTMLUListElement> & {\n\tblockSuggestionMouseOver: boolean;\n};\n\nconst CustomSuggestionsOptionsGroupFc: FC<CustomSuggestionsOptionsGroupProps> = ({ blockSuggestionMouseOver, onKeyDown, style }, children) => {\n\treturn (\n\t\t<ul\n\t\t\trole=\"listbox\"\n\t\t\tstyle={style}\n\t\t\tclass={clsx('kol-custom-suggestions-options-group', {\n\t\t\t\t'kol-custom-suggestions-options-group--cursor-hidden': blockSuggestionMouseOver,\n\t\t\t})}\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{children}\n\t\t</ul>\n\t);\n};\nexport default CustomSuggestionsOptionsGroupFc;\n"],"version":3}
|
package/dist/esm/{FieldControlStateWrapper-6c17f96e.js → FieldControlStateWrapper-f0050c71.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-
|
4
|
+
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-1704c42b.js";import{c as clsx}from"./clsx-09a06a12.js";import{m as showExpertSlot,C as buildBadgeTextString}from"./index-ebe5a881.js";import{b as FormFieldTooltipFc,K as KolFormFieldLabelFc,d as KolFormFieldHintFc,c as checkHasMsg,a as convertMsgToInternMsg}from"./getRenderStates-67595fa6.js";const InputContainer=(e,l)=>{var{class:o}=e,t=__rest(e,["class"]);return h("div",Object.assign({class:clsx("kol-field-control__input",o)},t),l)},KolFieldControlFc=(e,l)=>{const{class:o,id:t,disabled:r,label:s,hideLabel:i,labelAlign:n,renderNoTooltip:a,hint:d,renderNoHint:c,tooltipAlign:b,accessKey:p,shortKey:g,msg:F,touched:_,required:f,readonly:u,fieldControlInputProps:m,fieldControlLabelProps:y,fieldControlTooltipProps:C,fieldControlHintProps:K}=e,k=__rest(e,["class","id","disabled","label","hideLabel","labelAlign","renderNoTooltip","hint","renderNoHint","tooltipAlign","accessKey","shortKey","msg","touched","required","readonly","fieldControlInputProps","fieldControlLabelProps","fieldControlTooltipProps","fieldControlHintProps"]),x=!c,j=!a,T=checkHasMsg(F,_),v=showExpertSlot(s),B=j&&!v&&i,P=buildBadgeTextString(p,g),L=[h(Fragment,null,h(InputContainer,Object.assign({},m),l),B&&h(FormFieldTooltipFc,Object.assign({},C||{},{id:t,label:s,hideLabel:i,align:b,badgeText:P}))),h(KolFormFieldLabelFc,Object.assign({},y||{},{id:t,baseClassName:"kol-field-control",class:clsx(null==y?void 0:y.class,{"kol-field-control__label--visually-hidden":Boolean(i)}),hasExpertSlot:v,label:s,accessKey:p,shortKey:g}))];"left"===n&&L.reverse();const O={"kol-field-control--disabled":Boolean(r),"kol-field-control--required":Boolean(f),"kol-field-control--touched":Boolean(_),"kol-field-control--hide-label":Boolean(i),"kol-field-control--read-only":Boolean(u),[`kol-field-control--${(null==F?void 0:F.type)||"error"}`]:Boolean(T),[`kol-field-control--label-align-${n}`]:Boolean(n)};return h("div",Object.assign({class:clsx("kol-field-control",O,o)},k),L,x&&h(KolFormFieldHintFc,Object.assign({},K||{},{baseClassName:"kol-field-control",id:t,hint:d})))};function getFieldControlProps(e){const l={id:e._id,disabled:e._disabled,msg:convertMsgToInternMsg(e._msg),hint:e._hint,label:e._label,hideLabel:e._hideLabel,touched:e._touched};return"_required"in e&&(l.required=e._required),"_readOnly"in e&&(l.readonly=e._readOnly),"_labelAlign"in e&&(l.labelAlign=e._labelAlign),"_accessKey"in e&&(l.accessKey=e._accessKey),"_shortKey"in e&&(l.shortKey=e._shortKey),l}const FieldControlStateWrapper=(e,l)=>{var{state:o}=e,t=__rest(e,["state"]);return h(KolFieldControlFc,Object.assign({},getFieldControlProps(o),t),l)};export{FieldControlStateWrapper as F};
|
@@ -1 +1 @@
|
|
1
|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EAAE,IAAI,EAAE,IAAI,IAAI,CAC7H,EACL;AACH,CAAC;;AC7FD,SAAS,oBAAoB,CAAC,KAAiB;IAC9C,MAAM,KAAK,GAAsB;QAChC,EAAE,EAAE,KAAK,CAAC,GAAG;QACb,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,GAAG,EAAE,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,IAAI,EAAE,KAAK,CAAC,KAAK;QACjB,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,OAAO,EAAE,KAAK,CAAC,QAAQ;KACvB,CAAC;IAEF,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,aAAa,IAAI,KAAK,EAAE;QAC3B,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC;KACrC;IAED,IAAI,YAAY,IAAI,KAAK,EAAE;QAC1B,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC;KACnC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;MAEK,wBAAwB,GAAsC,CAAC,EAAmB,EAAE,QAAQ;QAA7B,EAAE,KAAK,OAAY,EAAP,KAAK,cAAjB,SAAmB,CAAF;IACrF,QACC,EAAC,iBAAiB,oBAAK,oBAAoB,CAAC,KAAK,CAAC,EAAM,KAAK,GAC3D,QAAQ,CACU,EACnB;AACH;;;;","names":["KolFieldControlTooltipFc","KolFieldControlLabelFc","KolFieldControlHintFc"],"sources":["src/functional-components/FieldControl/FieldControl.tsx","src/functional-component-wrappers/FieldControlStateWrapper/FieldControlStateWrapper.tsx"],"sourcesContent":["import { h, Fragment, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { type AlignPropType, type LabelAlignPropType, buildBadgeTextString, checkHasMsg, type InternMsgPropType, showExpertSlot } from '../../schema';\nimport KolFieldControlTooltipFc from '../FormFieldTooltip';\nimport KolFieldControlLabelFc from '../FormFieldLabel';\nimport KolFieldControlHintFc from '../FormFieldHint';\n\nexport type FieldControlProps = Omit<JSXBase.HTMLAttributes<HTMLElement>, 'id'> & {\n\tid: string;\n\thint?: string;\n\tlabel: string;\n\thideLabel?: boolean;\n\tlabelAlign?: LabelAlignPropType;\n\taccessKey?: string;\n\tshortKey?: string;\n\ttooltipAlign?: AlignPropType;\n\tdisabled?: boolean;\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n\trequired?: boolean;\n\treadonly?: boolean;\n\tshowTooltip?: boolean;\n\n\trenderNoLabel?: boolean;\n\trenderNoHint?: boolean;\n\trenderNoTooltip?: boolean;\n\n\tfieldControlLabelProps?: JSXBase.HTMLAttributes<Omit<HTMLLabelElement | HTMLLegendElement, 'id' | 'hidden' | 'htmlFor'>> & {\n\t\tcomponent?: 'label' | 'legend';\n\t\tshowBadge?: boolean;\n\t};\n\tfieldControlInputProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tfieldControlTooltipProps?: Pick<JSXBase.HTMLAttributes<HTMLElement>, 'class'>;\n\tfieldControlHintProps?: JSXBase.HTMLAttributes<HTMLElement>;\n};\n\nconst InputContainer: FC<JSXBase.HTMLAttributes<HTMLDivElement>> = ({ class: classNames, ...other }, children) => {\n\treturn (\n\t\t<div class={clsx('kol-field-control__input', classNames)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nconst KolFieldControlFc: FC<FieldControlProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames,\n\t\tid,\n\t\tdisabled,\n\t\tlabel,\n\t\thideLabel,\n\t\tlabelAlign,\n\t\trenderNoTooltip,\n\t\thint,\n\t\trenderNoHint,\n\t\ttooltipAlign,\n\t\taccessKey,\n\t\tshortKey,\n\t\tmsg,\n\t\ttouched,\n\t\trequired,\n\t\treadonly,\n\t\tfieldControlInputProps,\n\t\tfieldControlLabelProps,\n\t\tfieldControlTooltipProps,\n\t\tfieldControlHintProps,\n\t\t...other\n\t} = props;\n\n\tconst canShowHint = !renderNoHint;\n\tconst canShowTooltip = !renderNoTooltip;\n\tconst showMsg = checkHasMsg(msg, touched);\n\tconst hasExpertSlot = showExpertSlot(label);\n\tconst useTooltipInsteadOfLabel = canShowTooltip && !hasExpertSlot && hideLabel;\n\tconst badgeText = buildBadgeTextString(accessKey, shortKey);\n\n\tconst components = [\n\t\t<>\n\t\t\t<InputContainer {...fieldControlInputProps}>{children}</InputContainer>\n\t\t\t{useTooltipInsteadOfLabel && (\n\t\t\t\t<KolFieldControlTooltipFc\n\t\t\t\t\t{...(fieldControlTooltipProps || {})}\n\t\t\t\t\tid={id}\n\t\t\t\t\tlabel={label}\n\t\t\t\t\thideLabel={hideLabel}\n\t\t\t\t\talign={tooltipAlign}\n\t\t\t\t\tbadgeText={badgeText}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>,\n\t\t<KolFieldControlLabelFc\n\t\t\t{...(fieldControlLabelProps || {})}\n\t\t\tid={id}\n\t\t\tbaseClassName=\"kol-field-control\"\n\t\t\tclass={clsx(fieldControlLabelProps?.class, {\n\t\t\t\t['kol-field-control__label--visually-hidden']: Boolean(hideLabel),\n\t\t\t})}\n\t\t\thasExpertSlot={hasExpertSlot}\n\t\t\tlabel={label}\n\t\t\taccessKey={accessKey}\n\t\t\tshortKey={shortKey}\n\t\t/>,\n\t];\n\n\tif (labelAlign === 'left') {\n\t\tcomponents.reverse();\n\t}\n\n\tconst stateCssClasses = {\n\t\t['kol-field-control--disabled']: Boolean(disabled),\n\t\t['kol-field-control--required']: Boolean(required),\n\t\t['kol-field-control--touched']: Boolean(touched),\n\t\t['kol-field-control--hide-label']: Boolean(hideLabel),\n\t\t['kol-field-control--read-only']: Boolean(readonly),\n\t\t[`kol-field-control--${msg?.type || 'error'}`]: Boolean(showMsg),\n\t\t[`kol-field-control--label-align-${labelAlign}`]: Boolean(labelAlign),\n\t};\n\n\treturn (\n\t\t<div class={clsx('kol-field-control', stateCssClasses, classNames)} {...other}>\n\t\t\t{components}\n\t\t\t{canShowHint && <KolFieldControlHintFc {...(fieldControlHintProps || {})} baseClassName=\"kol-field-control\" id={id} hint={hint} />}\n\t\t</div>\n\t);\n};\n\nexport default KolFieldControlFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolFieldControlFc, { type FieldControlProps } from '../../functional-components/FieldControl';\nimport {\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype InputCheckboxStates,\n\ttype InputRadioStates,\n\ttype SelectStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\n\ntype InputState =\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates\n\t| InputCheckboxStates\n\t| InputRadioStates\n\t| SelectStates;\n\nexport type FieldControlStateWrapperProps = Partial<FieldControlProps> & {\n\tstate: InputState;\n};\n\nfunction getFieldControlProps(state: InputState): FieldControlProps {\n\tconst props: FieldControlProps = {\n\t\tid: state._id,\n\t\tdisabled: state._disabled,\n\t\tmsg: convertMsgToInternMsg(state._msg),\n\t\thint: state._hint,\n\t\tlabel: state._label,\n\t\thideLabel: state._hideLabel,\n\t\ttouched: state._touched,\n\t};\n\n\tif ('_required' in state) {\n\t\tprops.required = state._required;\n\t}\n\n\tif ('_readOnly' in state) {\n\t\tprops.readonly = state._readOnly;\n\t}\n\n\tif ('_labelAlign' in state) {\n\t\tprops.labelAlign = state._labelAlign;\n\t}\n\n\tif ('_accessKey' in state) {\n\t\tprops.accessKey = state._accessKey;\n\t}\n\n\tif ('_shortKey' in state) {\n\t\tprops.shortKey = state._shortKey;\n\t}\n\n\treturn props;\n}\n\nconst FieldControlStateWrapper: FC<FieldControlStateWrapperProps> = ({ state, ...other }, children) => {\n\treturn (\n\t\t<KolFieldControlFc {...getFieldControlProps(state)} {...other}>\n\t\t\t{children}\n\t\t</KolFieldControlFc>\n\t);\n};\n\nexport default FieldControlStateWrapper;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-
|
4
|
+
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-1704c42b.js";import{c as clsx}from"./clsx-09a06a12.js";const MIN_HEADING_LEVEL=1,MAX_HEADING_LEVEL=6;function isValidHeadingLevel(e){return e>=MIN_HEADING_LEVEL&&e<=6}function getHeadlineTag(e){return isValidHeadingLevel(e)?`h${e}`:"strong"}function getSubHeadlineTag(e){return 1===e?"span":getHeadlineTag(e)}const KolHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const c=getHeadlineTag(a);return h(c,Object.assign({class:clsx("kol-headline",`kol-headline--${c}`,s)},n),l)},KolSecondaryHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const c=getSubHeadlineTag(a+1);return h(c,Object.assign({class:clsx("kol-headline kol-headline--group kol-headline--secondary",s)},n),l)},KolHeadingFc=(e,l)=>{var{secondaryHeadline:s,level:a=MIN_HEADING_LEVEL,class:n,HeadingGroupProps:c={},SecondaryHeadlineProps:i={}}=e,o=__rest(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const r=Object.assign({level:a},o);if(!s)return h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--single")},r),l);const{class:d}=c,t=__rest(c,["class"]),g=Object.assign({class:clsx("kol-heading-group",d)},t);return h("hgroup",Object.assign({},g),h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--group","kol-headline--primary")},r),l),h(KolSecondaryHeadlineFc,Object.assign({level:a},i),s))};export{KolHeadingFc as K};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"Heading-
|
1
|
+
{"file":"Heading-1e98210c.js","mappings":";;;;;;;AAyBA,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAW5B,SAAS,mBAAmB,CAAC,KAAa;IACzC,OAAO,KAAK,IAAI,iBAAiB,IAAI,KAAK,IAAI,iBAAiB,CAAC;AACjE,CAAC;SAQe,cAAc,CAAC,KAA4B;IAC1D,OAAO,mBAAmB,CAAC,KAAK,CAAC,GAAI,IAAI,KAAK,EAAkB,GAAG,QAAQ,CAAC;AAC7E,CAAC;SAQe,iBAAiB,CAAC,KAA4B;IAC7D,OAAO,KAAK,KAAK,CAAC,GAAG,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAQD,MAAM,aAAa,GAAsB,CAAC,EAA0D,EAAE,QAAQ;QAApE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,GAAG,iBAAiB,OAAY,EAAP,KAAK,cAAxD,kBAA0D,CAAF;IACjG,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAE1C,QACC,EAAC,WAAW,kBAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,iBAAiB,WAAW,EAAE,EAAE,UAAU,CAAC,IAAM,KAAK,GAC7F,QAAQ,CACI,EACb;AACH,CAAC,CAAC;AAQF,MAAM,sBAAsB,GAA+B,CAAC,EAA0D,EAAE,QAAQ;QAApE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,GAAG,iBAAiB,OAAY,EAAP,KAAK,cAAxD,kBAA0D,CAAF;IACnH,MAAM,WAAW,GAAG,iBAAiB,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAEjD,QACC,EAAC,WAAW,kBAAC,KAAK,EAAE,IAAI,CAAC,0DAA0D,EAAE,UAAU,CAAC,IAAM,KAAK,GACzG,QAAQ,CACI,EACb;AACH,CAAC,CAAC;MAQI,YAAY,GAAqB,CACtC,EAAkI,EAClI,QAAQ;QADR,EAAE,iBAAiB,EAAE,KAAK,GAAG,iBAAiB,EAAE,KAAK,EAAE,UAAU,EAAE,iBAAiB,GAAG,EAAE,EAAE,sBAAsB,GAAG,EAAE,OAAY,EAAP,KAAK,cAAhI,sFAAkI,CAAF;IAGhI,MAAM,aAAa,mBAClB,KAAK,IACF,KAAK,CACR,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE;QACvB,QACC,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,sBAAsB,CAAC,IAAM,aAAa,GAC/E,QAAQ,CACM,EACf;KACF;IAED,MAAM,EAAE,KAAK,EAAE,eAAe,KAAqB,iBAAiB,EAAjC,WAAW,UAAK,iBAAiB,EAA9D,SAA0C,CAAoB,CAAC;IACrE,MAAM,kBAAkB,mBACvB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,IAC9C,WAAW,CACd,CAAC;IAEF,QACC,8BAAY,kBAAkB;QAC7B,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,qBAAqB,EAAE,uBAAuB,CAAC,IAAM,aAAa,GACvG,QAAQ,CACM;QAChB,EAAC,sBAAsB,kBAAC,KAAK,EAAE,KAAK,IAAM,sBAAsB,GAC9D,iBAAiB,CACM,CACjB,EACR;AACH;;;;","names":[],"sources":["src/functional-components/Heading/Heading.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel } from '../../schema';\n\ntype HGroupProps = JSXBase.HTMLAttributes<HTMLElement>;\n\n// Define a base type for common props\ntype BaseProps = JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement> & {\n\tlevel?: HeadingLevel;\n};\n\n// Define a type for the main headline props\ntype HeadlineProps = BaseProps;\n\n// Define a type for the secondary headline props\ntype SecondaryHeadlineProps = BaseProps;\n\n// Define a type for the main Heading component props\nexport type HeadingProps = HeadlineProps & {\n\tsecondaryHeadline?: string;\n\tHeadingGroupProps?: HGroupProps;\n\tSecondaryHeadlineProps?: JSXBase.HTMLAttributes<HTMLHeadingElement | HTMLElement>;\n};\n\nconst MIN_HEADING_LEVEL = 1;\nconst MAX_HEADING_LEVEL = 6;\n\n// Define a union type for valid headline tags\ntype HeadlineTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'strong';\ntype SubHeadlineTag = 'span' | HeadlineTag;\n\n/**\n * Checks if the given level is a valid heading level.\n * @param level - The heading level to check.\n * @returns True if the level is valid, false otherwise.\n */\nfunction isValidHeadingLevel(level: number): boolean {\n\treturn level >= MIN_HEADING_LEVEL && level <= MAX_HEADING_LEVEL;\n}\n\n/**\n * Returns the appropriate headline tag based on the level.\n * If the level is invalid, returns 'strong'.\n * @param level - The heading level.\n * @returns The corresponding headline tag.\n */\nexport function getHeadlineTag(level: HeadingLevel | number): HeadlineTag {\n\treturn isValidHeadingLevel(level) ? (`h${level}` as HeadlineTag) : 'strong';\n}\n\n/**\n * Returns the appropriate sub-headline tag based on the level.\n * If the level is 1, returns 'span', otherwise returns the headline tag.\n * @param level - The heading level.\n * @returns The corresponding sub-headline tag.\n */\nexport function getSubHeadlineTag(level: HeadingLevel | number): SubHeadlineTag {\n\treturn level === 1 ? 'span' : getHeadlineTag(level);\n}\n\n/**\n * Functional component for rendering a headline.\n * @param props - The properties for the headline component.\n * @param children - The children to render inside the headline.\n * @returns A VNode representing the headline.\n */\nconst KolHeadlineFc: FC<HeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${HeadlineTag}`, classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a secondary headline.\n * @param props - The properties for the secondary headline component.\n * @param children - The children to render inside the secondary headline.\n * @returns A VNode representing the secondary headline.\n */\nconst KolSecondaryHeadlineFc: FC<SecondaryHeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getSubHeadlineTag(level + 1);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline kol-headline--group kol-headline--secondary', classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a heading with an optional secondary headline.\n * @param props - The properties for the heading component.\n * @param children - The children to render inside the heading.\n * @returns A VNode representing the heading.\n */\nconst KolHeadingFc: FC<HeadingProps> = (\n\t{ secondaryHeadline, level = MIN_HEADING_LEVEL, class: classNames, HeadingGroupProps = {}, SecondaryHeadlineProps = {}, ...other },\n\tchildren,\n) => {\n\tconst headlineProps: HeadlineProps = {\n\t\tlevel,\n\t\t...other,\n\t};\n\n\tif (!secondaryHeadline) {\n\t\treturn (\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--single')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t);\n\t}\n\n\tconst { class: groupClassNames, ...groupOthers } = HeadingGroupProps;\n\tconst headlineGroupProps: HGroupProps = {\n\t\tclass: clsx('kol-heading-group', groupClassNames),\n\t\t...groupOthers,\n\t};\n\n\treturn (\n\t\t<hgroup {...headlineGroupProps}>\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--group', 'kol-headline--primary')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t\t<KolSecondaryHeadlineFc level={level} {...SecondaryHeadlineProps}>\n\t\t\t\t{secondaryHeadline}\n\t\t\t</KolSecondaryHeadlineFc>\n\t\t</hgroup>\n\t);\n};\n\nexport default KolHeadingFc;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{h}from"./index-
|
4
|
+
import{h}from"./index-1704c42b.js";import{e as KolIconTag}from"./component-names-553d8bfa.js";const KolIconFc=o=>{const{class:c,style:n,icons:s,label:l,onClick:a}=o;return h(KolIconTag,{class:c,style:n,onClick:a,_icons:s,_label:l})};export{KolIconFc as K};
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"Icon-
|
1
|
+
{"file":"Icon-34fc4368.js","mappings":";;;;;;MAUM,SAAS,GAAkB,CAAC,KAAK;IACtC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAElE,OAAO,EAAC,UAAU,IAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAI,CAAC;AACxG;;;;","names":[],"sources":["src/functional-components/Icon/Icon.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { InternalIconProps } from '../../schema';\n\nexport type IconProps = InternalIconProps & {\n\tclass?: string;\n\tstyle?: { [key: string]: string };\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolIconFc: FC<IconProps> = (props) => {\n\tconst { class: classNames, style, icons, label, onClick } = props;\n\n\treturn <KolIconTag class={classNames} style={style} onClick={onClick} _icons={icons} _label={label} />;\n};\n\nexport default KolIconFc;\n"],"version":3}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* KoliBri - The accessible HTML-Standard
|
3
3
|
*/
|
4
|
-
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-
|
4
|
+
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-1704c42b.js";import{c as clsx}from"./clsx-09a06a12.js";import"./index-ebe5a881.js";import{e as getDefaultProps,c as checkHasMsg}from"./getRenderStates-67595fa6.js";const InputFc=e=>{const{class:s,msg:a,required:l,disabled:t,touched:i,readonly:o,ariaDescribedBy:r,hideLabel:d,label:n,suggestions:c,value:u}=e,b=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),p=checkHasMsg(a,i),g={"kol-input--disabled":Boolean(t),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(i),"kol-input--readonly":Boolean(o),[`kol-input--${(null==a?void 0:a.type)||"error"}`]:p},m=Object.assign(Object.assign({class:clsx("kol-input",g,s),required:l,disabled:t,readonly:o,type:"text",list:c?`${b.id}-list`:void 0},getDefaultProps({ariaDescribedBy:r,hideLabel:d,label:n})),b);return h(Fragment,null,h("input",Object.assign({},m,{value:u})),c)};export{InputFc as I};
|