@devschile/chucao 2.8.0 → 2.9.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/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/{p-5093c486.entry.js → p-03acf096.entry.js} +2 -2
- package/dist/chucao/{p-f0c288db.entry.js → p-0ce2b15d.entry.js} +2 -2
- package/dist/chucao/{p-af088ffd.entry.js → p-10e37157.entry.js} +2 -2
- package/dist/chucao/{p-46dae34b.entry.js → p-12043dc1.entry.js} +2 -2
- package/dist/chucao/p-1dca55d6.entry.js +2 -0
- package/dist/chucao/{p-0831c6f2.entry.js.map → p-1dca55d6.entry.js.map} +1 -1
- package/dist/chucao/{p-c4d68ab7.entry.js → p-244d8e96.entry.js} +2 -2
- package/dist/chucao/{p-ba589c2f.entry.js → p-29841714.entry.js} +2 -2
- package/dist/chucao/{p-5577e0a0.entry.js → p-302ec527.entry.js} +2 -2
- package/dist/chucao/{p-25f4f815.entry.js → p-5a62951e.entry.js} +2 -2
- package/dist/chucao/{p-3e0d7585.entry.js → p-5d0ac17a.entry.js} +2 -2
- package/dist/chucao/{p-b42ec9bf.entry.js → p-5e0e1012.entry.js} +2 -2
- package/dist/chucao/{p-56e41372.entry.js → p-61a94a4e.entry.js} +2 -2
- package/dist/chucao/p-649c2cef.entry.js +2 -0
- package/dist/chucao/p-649c2cef.entry.js.map +1 -0
- package/dist/chucao/{p-eb39b9c2.entry.js → p-674c0f61.entry.js} +2 -2
- package/dist/chucao/{p-d868bdbc.entry.js → p-67f0fc77.entry.js} +2 -2
- package/dist/chucao/{p-d630f662.entry.js → p-68e4a129.entry.js} +2 -2
- package/dist/chucao/{p-b80c39c3.entry.js → p-6e345b3f.entry.js} +2 -2
- package/dist/chucao/{p-6e93c392.entry.js → p-72d4dacf.entry.js} +2 -2
- package/dist/chucao/{p-ca3179ae.entry.js → p-74d9b7e5.entry.js} +2 -2
- package/dist/chucao/{p-8b09ad3c.entry.js → p-791ce537.entry.js} +2 -2
- package/dist/chucao/{p-ad41da02.entry.js → p-79e8c10b.entry.js} +2 -2
- package/dist/chucao/{p-c98e2a50.entry.js → p-7e13f725.entry.js} +2 -2
- package/dist/chucao/{p-6c2e5931.entry.js → p-8b23d072.entry.js} +2 -2
- package/dist/chucao/{p-920d5727.entry.js → p-a5430e95.entry.js} +2 -2
- package/dist/chucao/{p-e6b7b2da.entry.js → p-a7c66879.entry.js} +2 -2
- package/dist/chucao/p-b452d6cb.entry.js +2 -0
- package/dist/chucao/{p-0d7fc720.entry.js → p-b7332faf.entry.js} +2 -2
- package/dist/chucao/{p-19d90f87.entry.js → p-f3d03388.entry.js} +2 -2
- package/dist/chucao/{p-8fcf6d36.entry.js → p-f925d45c.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ch-alert_8.cjs.entry.js +7 -7
- package/dist/cjs/ch-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ch-cluster.cjs.entry.js +2 -2
- package/dist/cjs/ch-combobox.cjs.entry.js +304 -0
- package/dist/cjs/ch-combobox.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-confirm-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ch-description-list.cjs.entry.js +1 -1
- package/dist/cjs/ch-divider.cjs.entry.js +1 -1
- package/dist/cjs/ch-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ch-emoji.cjs.entry.js +1 -1
- package/dist/cjs/ch-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/ch-grid.cjs.entry.js +1 -1
- package/dist/cjs/ch-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ch-icon.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +1 -1
- package/dist/cjs/ch-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ch-otp-input.cjs.entry.js +2 -2
- package/dist/cjs/ch-page-header.cjs.entry.js +1 -1
- package/dist/cjs/ch-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ch-radio.cjs.entry.js +1 -1
- package/dist/cjs/ch-segmented-control.cjs.entry.js +1 -1
- package/dist/cjs/ch-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ch-stack.cjs.entry.js +1 -1
- package/dist/cjs/ch-stat.cjs.entry.js +2 -2
- package/dist/cjs/ch-table.cjs.entry.js +1 -1
- package/dist/cjs/ch-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ch-textarea.cjs.entry.js +1 -1
- package/dist/cjs/ch-timeline.cjs.entry.js +1 -1
- package/dist/cjs/ch-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/chucao.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ch-accordion/ch-accordion.js +1 -1
- package/dist/collection/components/ch-alert/ch-alert.js +1 -1
- package/dist/collection/components/ch-badge/ch-badge.js +1 -1
- package/dist/collection/components/ch-card/ch-card.js +1 -1
- package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
- package/dist/collection/components/ch-cluster/ch-cluster.js +2 -2
- package/dist/collection/components/ch-combobox/ch-combobox.css +153 -0
- package/dist/collection/components/ch-combobox/ch-combobox.js +577 -0
- package/dist/collection/components/ch-combobox/ch-combobox.js.map +1 -0
- package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js +1 -1
- package/dist/collection/components/ch-description-list/ch-description-list.js +1 -1
- package/dist/collection/components/ch-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-drawer/ch-drawer.js +1 -1
- package/dist/collection/components/ch-emoji/ch-emoji.js +1 -1
- package/dist/collection/components/ch-empty-state/ch-empty-state.js +1 -1
- package/dist/collection/components/ch-grid/ch-grid.js +1 -1
- package/dist/collection/components/ch-icon/ch-icon.js +1 -1
- package/dist/collection/components/ch-icon-button/ch-icon-button.js +1 -1
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-modal/ch-modal.js +1 -1
- package/dist/collection/components/ch-number-input/ch-number-input.js +2 -2
- package/dist/collection/components/ch-otp-input/ch-otp-input.js +2 -2
- package/dist/collection/components/ch-page-header/ch-page-header.js +1 -1
- package/dist/collection/components/ch-pagination/ch-pagination.js +1 -1
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-segmented-control/ch-segmented-control.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-skeleton/ch-skeleton.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
- package/dist/collection/components/ch-stack/ch-stack.js +1 -1
- package/dist/collection/components/ch-stat/ch-stat.js +2 -2
- package/dist/collection/components/ch-switch/ch-switch.js +1 -1
- package/dist/collection/components/ch-table/ch-table.js +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
- package/dist/collection/components/ch-timeline/ch-timeline.js +1 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +2 -2
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.js +1 -1
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-card.js +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-cluster.js +1 -1
- package/dist/components/ch-combobox.d.ts +11 -0
- package/dist/components/ch-combobox.js +2 -0
- package/dist/components/ch-combobox.js.map +1 -0
- package/dist/components/ch-confirm-dialog.js +1 -1
- package/dist/components/ch-description-list.js +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-drawer.js +1 -1
- package/dist/components/ch-emoji.js +1 -1
- package/dist/components/ch-empty-state.js +1 -1
- package/dist/components/ch-grid.js +1 -1
- package/dist/components/ch-icon-button.js +1 -1
- package/dist/components/ch-icon.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-modal.js +1 -1
- package/dist/components/ch-number-input.js +1 -1
- package/dist/components/ch-otp-input.js +1 -1
- package/dist/components/ch-page-header.js +1 -1
- package/dist/components/ch-pagination.js +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-segmented-control.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-skeleton.js +1 -1
- package/dist/components/ch-spinner.js +1 -1
- package/dist/components/ch-stack.js +1 -1
- package/dist/components/ch-stat.js +1 -1
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-table.js +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/ch-timeline.js +1 -1
- package/dist/components/ch-tooltip.js +1 -1
- package/dist/components/{p-CF1yV0aa.js → p-CuSstsTP.js} +2 -2
- package/dist/components/{p-CmMN-UuJ.js → p-MBLhKofG.js} +2 -2
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/ch-alert_8.entry.js +7 -7
- package/dist/esm/ch-checkbox.entry.js +1 -1
- package/dist/esm/ch-cluster.entry.js +2 -2
- package/dist/esm/ch-combobox.entry.js +302 -0
- package/dist/esm/ch-combobox.entry.js.map +1 -0
- package/dist/esm/ch-confirm-dialog.entry.js +1 -1
- package/dist/esm/ch-description-list.entry.js +1 -1
- package/dist/esm/ch-divider.entry.js +1 -1
- package/dist/esm/ch-drawer.entry.js +1 -1
- package/dist/esm/ch-emoji.entry.js +1 -1
- package/dist/esm/ch-empty-state.entry.js +1 -1
- package/dist/esm/ch-grid.entry.js +1 -1
- package/dist/esm/ch-icon-button.entry.js +1 -1
- package/dist/esm/ch-icon.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +1 -1
- package/dist/esm/ch-number-input.entry.js +2 -2
- package/dist/esm/ch-otp-input.entry.js +2 -2
- package/dist/esm/ch-page-header.entry.js +1 -1
- package/dist/esm/ch-pagination.entry.js +1 -1
- package/dist/esm/ch-radio.entry.js +1 -1
- package/dist/esm/ch-segmented-control.entry.js +1 -1
- package/dist/esm/ch-skeleton.entry.js +1 -1
- package/dist/esm/ch-stack.entry.js +1 -1
- package/dist/esm/ch-stat.entry.js +2 -2
- package/dist/esm/ch-table.entry.js +1 -1
- package/dist/esm/ch-tabs.entry.js +1 -1
- package/dist/esm/ch-textarea.entry.js +1 -1
- package/dist/esm/ch-timeline.entry.js +1 -1
- package/dist/esm/ch-tooltip.entry.js +2 -2
- package/dist/esm/chucao.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ch-combobox/ch-combobox.d.ts +98 -0
- package/dist/types/components.d.ts +209 -0
- package/dist-react/components.d.ts +7 -1
- package/dist-react/components.js +12 -0
- package/dist-react/components.ts +19 -1
- package/dist-vue/index.d.ts +1 -0
- package/dist-vue/index.js +19 -0
- package/dist-vue/index.ts +21 -0
- package/hydrate/index.js +376 -39
- package/hydrate/index.mjs +376 -39
- package/package.json +5 -1
- package/dist/chucao/p-0831c6f2.entry.js +0 -2
- package/dist/chucao/p-7f99ae48.entry.js +0 -2
- /package/dist/chucao/{p-5093c486.entry.js.map → p-03acf096.entry.js.map} +0 -0
- /package/dist/chucao/{p-f0c288db.entry.js.map → p-0ce2b15d.entry.js.map} +0 -0
- /package/dist/chucao/{p-af088ffd.entry.js.map → p-10e37157.entry.js.map} +0 -0
- /package/dist/chucao/{p-46dae34b.entry.js.map → p-12043dc1.entry.js.map} +0 -0
- /package/dist/chucao/{p-c4d68ab7.entry.js.map → p-244d8e96.entry.js.map} +0 -0
- /package/dist/chucao/{p-ba589c2f.entry.js.map → p-29841714.entry.js.map} +0 -0
- /package/dist/chucao/{p-5577e0a0.entry.js.map → p-302ec527.entry.js.map} +0 -0
- /package/dist/chucao/{p-25f4f815.entry.js.map → p-5a62951e.entry.js.map} +0 -0
- /package/dist/chucao/{p-3e0d7585.entry.js.map → p-5d0ac17a.entry.js.map} +0 -0
- /package/dist/chucao/{p-b42ec9bf.entry.js.map → p-5e0e1012.entry.js.map} +0 -0
- /package/dist/chucao/{p-56e41372.entry.js.map → p-61a94a4e.entry.js.map} +0 -0
- /package/dist/chucao/{p-eb39b9c2.entry.js.map → p-674c0f61.entry.js.map} +0 -0
- /package/dist/chucao/{p-d868bdbc.entry.js.map → p-67f0fc77.entry.js.map} +0 -0
- /package/dist/chucao/{p-d630f662.entry.js.map → p-68e4a129.entry.js.map} +0 -0
- /package/dist/chucao/{p-b80c39c3.entry.js.map → p-6e345b3f.entry.js.map} +0 -0
- /package/dist/chucao/{p-6e93c392.entry.js.map → p-72d4dacf.entry.js.map} +0 -0
- /package/dist/chucao/{p-ca3179ae.entry.js.map → p-74d9b7e5.entry.js.map} +0 -0
- /package/dist/chucao/{p-8b09ad3c.entry.js.map → p-791ce537.entry.js.map} +0 -0
- /package/dist/chucao/{p-ad41da02.entry.js.map → p-79e8c10b.entry.js.map} +0 -0
- /package/dist/chucao/{p-c98e2a50.entry.js.map → p-7e13f725.entry.js.map} +0 -0
- /package/dist/chucao/{p-6c2e5931.entry.js.map → p-8b23d072.entry.js.map} +0 -0
- /package/dist/chucao/{p-920d5727.entry.js.map → p-a5430e95.entry.js.map} +0 -0
- /package/dist/chucao/{p-e6b7b2da.entry.js.map → p-a7c66879.entry.js.map} +0 -0
- /package/dist/chucao/{p-7f99ae48.entry.js.map → p-b452d6cb.entry.js.map} +0 -0
- /package/dist/chucao/{p-0d7fc720.entry.js.map → p-b7332faf.entry.js.map} +0 -0
- /package/dist/chucao/{p-19d90f87.entry.js.map → p-f3d03388.entry.js.map} +0 -0
- /package/dist/chucao/{p-8fcf6d36.entry.js.map → p-f925d45c.entry.js.map} +0 -0
- /package/dist/components/{p-CF1yV0aa.js.map → p-CuSstsTP.js.map} +0 -0
- /package/dist/components/{p-CmMN-UuJ.js.map → p-MBLhKofG.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -5503,7 +5503,7 @@ class ChAccordion {
|
|
|
5503
5503
|
this.chChange.emit(this.value);
|
|
5504
5504
|
};
|
|
5505
5505
|
render() {
|
|
5506
|
-
return (hAsync(Host, { key: '
|
|
5506
|
+
return (hAsync(Host, { key: '75d95349674170ef9e9f6e74b4b3c4369e7f1e21' }, this.items.map(item => {
|
|
5507
5507
|
const open = this.value === item.value;
|
|
5508
5508
|
return (hAsync("div", { key: item.value, class: { 'item': true, 'item--open': open } }, hAsync("h3", { class: "item-head" }, hAsync("button", { type: "button", class: "item-toggle", id: this.headerId(item.value), "data-value": item.value, "aria-expanded": open ? 'true' : 'false', "aria-controls": this.panelId(item.value), disabled: item.disabled, onClick: () => this.toggle(item.value) }, item.title)), hAsync("div", { class: "item-panel", id: this.panelId(item.value), role: "region", "aria-labelledby": this.headerId(item.value), hidden: !open }, hAsync("slot", { name: `panel-${item.value}` }))));
|
|
5509
5509
|
})));
|
|
@@ -5666,7 +5666,7 @@ class ChAlert {
|
|
|
5666
5666
|
render() {
|
|
5667
5667
|
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
5668
5668
|
const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
|
|
5669
|
-
return (hAsync(Host, { key: '
|
|
5669
|
+
return (hAsync(Host, { key: '55c2c37d0a730000b644c583a99eae37d6f75784' }, hAsync("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (hAsync("svg", { key: '8fb807cd1f894c0960c55a3e417a418078c79d63', class: "alert-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, shapes.map(shape => hAsync(shape.tag, shape.attrs)))), hAsync("div", { key: '43784df5b3ede4eb01521439dd90d85fccf6fe43', class: "alert-content" }, hAsync("slot", { key: 'f4643113dfe9e3beb6f5e1ae9794b28c19ea3341' })), this.dismissLabel && (hAsync("button", { key: 'a1b3afee8907514f9448810b8f22d288a2f50057', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, hAsync("span", { key: '50371733d2358e002f7bdd1d5f8cb61d020c1cb9', "aria-hidden": "true" }, "\u00D7"))))));
|
|
5670
5670
|
}
|
|
5671
5671
|
static get style() { return chAlertCss(); }
|
|
5672
5672
|
static get cmpMeta() { return {
|
|
@@ -5708,7 +5708,7 @@ class ChBadge {
|
|
|
5708
5708
|
*/
|
|
5709
5709
|
statusCue = true;
|
|
5710
5710
|
render() {
|
|
5711
|
-
return (hAsync(Host, { key: '
|
|
5711
|
+
return (hAsync(Host, { key: '104554450ef32f24bb88afc77ad0b3d79811de6c' }, hAsync("span", { key: '10531c508c51141fe433f794877d38ac8f9d7859', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && hAsync("span", { key: 'f6bb6f7c23e7d7f4051a6022f76a15f640e35650', class: "badge-dot", "aria-hidden": "true" }), hAsync("slot", { key: '6c4d8c9c981be16facbcf95c3c0abce6f164ed16' }))));
|
|
5712
5712
|
}
|
|
5713
5713
|
static get style() { return chBadgeCss(); }
|
|
5714
5714
|
static get cmpMeta() { return {
|
|
@@ -5839,7 +5839,7 @@ class ChCard {
|
|
|
5839
5839
|
registerInstance(this, hostRef);
|
|
5840
5840
|
}
|
|
5841
5841
|
render() {
|
|
5842
|
-
return (hAsync(Host, { key: '
|
|
5842
|
+
return (hAsync(Host, { key: 'f3a0efc8ed91ac81cf39d599acdf1944d72b56c1' }, hAsync("div", { key: '5524237836d327c8c988903393b5adc09078b121', class: "card" }, hAsync("slot", { key: '7c5a80c115399f591e40705abafd8288ff575d0f' }))));
|
|
5843
5843
|
}
|
|
5844
5844
|
static get style() { return chCardCss(); }
|
|
5845
5845
|
static get cmpMeta() { return {
|
|
@@ -5980,7 +5980,7 @@ class ChCheckbox {
|
|
|
5980
5980
|
return undefined;
|
|
5981
5981
|
}
|
|
5982
5982
|
render() {
|
|
5983
|
-
return (hAsync(Host, { key: '
|
|
5983
|
+
return (hAsync(Host, { key: 'cf170be4d00e1ccb5511b0b72f6d42faa35b6371' }, hAsync("label", { key: '3af65f435365b1ffdaf2d4149d87c8c4f7630998', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("input", { key: '3073840bef40f15e7688920209df189e831d4139', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && hAsync("span", { key: 'a2630c7bf760b5adcd5b22e423d20e1bf7bb5107', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '4c51711fe4a623c2b9a77dc66b2e2668c905fc19', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '053569a86c7c3cd01b2278d3dcde7c649142a7c3', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5984
5984
|
}
|
|
5985
5985
|
static get formAssociated() { return true; }
|
|
5986
5986
|
static get watchers() { return {
|
|
@@ -6051,13 +6051,13 @@ class ChCluster {
|
|
|
6051
6051
|
return GAPS$2.has(this.gap) ? this.gap : 'md';
|
|
6052
6052
|
}
|
|
6053
6053
|
render() {
|
|
6054
|
-
return (hAsync(Host, { key: '
|
|
6054
|
+
return (hAsync(Host, { key: '82b4133e903fd75e71314ae814d7c76d1844bcdc', class: {
|
|
6055
6055
|
'cluster': true,
|
|
6056
6056
|
[`cluster--gap-${this.gapStep}`]: true,
|
|
6057
6057
|
[`cluster--align-${this.align}`]: true,
|
|
6058
6058
|
[`cluster--justify-${this.justify}`]: true,
|
|
6059
6059
|
'cluster--nowrap': !this.wrap,
|
|
6060
|
-
} }, hAsync("slot", { key: '
|
|
6060
|
+
} }, hAsync("slot", { key: 'a53161dbf0dbfeb52e5dae80de4764d9c708c3c6' })));
|
|
6061
6061
|
}
|
|
6062
6062
|
static get style() { return chClusterCss(); }
|
|
6063
6063
|
static get cmpMeta() { return {
|
|
@@ -6075,6 +6075,342 @@ class ChCluster {
|
|
|
6075
6075
|
}; }
|
|
6076
6076
|
}
|
|
6077
6077
|
|
|
6078
|
+
const chComboboxCss = () => `:host{display:block;width:100%;font-family:var(--typography-body)}:host([hidden]){display:none}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.chips{display:flex;flex-wrap:wrap;gap:var(--spacing-xs);margin:0 0 var(--spacing-sm);padding:0;list-style:none}.chip{display:inline-flex;align-items:center;gap:var(--spacing-xs);max-width:100%;padding:var(--spacing-2xs) var(--spacing-sm);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-hover);font-size:var(--typography-size-sm)}.chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip__remove{all:unset;cursor:pointer;padding:0 var(--spacing-2xs);border-radius:var(--radius-sm);color:var(--color-text-secondary);line-height:1}.chip__remove:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:1px}.field{position:relative}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);color:var(--color-text-primary);font-family:inherit;font-size:var(--typography-size-md);transition:border-color var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--color-text-secondary)}.input:focus{border-color:var(--color-accent-default);outline:2px solid var(--color-accent-default);outline-offset:1px}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input--invalid{border-color:var(--color-status-warning)}.listbox{position:absolute;z-index:var(--z-index-dropdown);top:calc(100% + var(--spacing-2xs));left:0;right:0;max-height:16rem;margin:0;padding:var(--spacing-2xs);overflow-y:auto;list-style:none;border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);box-shadow:var(--shadow-elevate)}.listbox[hidden]{display:none}.listbox__option{padding:var(--spacing-sm) var(--spacing-md);border-radius:var(--radius-sm);font-size:var(--typography-size-sm);cursor:pointer}.listbox__option--active{background:var(--color-surface-hover);font-weight:var(--typography-weight-semibold);box-shadow:inset 2px 0 0 var(--color-accent-default)}.listbox__option--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.listbox__empty{padding:var(--spacing-sm) var(--spacing-md);font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.error{color:var(--color-status-warning)}`;
|
|
6079
|
+
|
|
6080
|
+
let comboboxIds = 0;
|
|
6081
|
+
/**
|
|
6082
|
+
* A text field that filters a list of options and commits a choice.
|
|
6083
|
+
*
|
|
6084
|
+
* The input is a native `<input>` rather than `ch-input`: the combobox role
|
|
6085
|
+
* and its `aria-*` state have to sit on the element that owns the interaction,
|
|
6086
|
+
* and ARIA does not forward through a wrapper component.
|
|
6087
|
+
*
|
|
6088
|
+
* Single and multiple are one component. `multiple` changes the value shape
|
|
6089
|
+
* (`string` vs `string[]`), renders the chosen values as removable chips, and
|
|
6090
|
+
* keeps the list open after a pick; single commits and closes. Everything else
|
|
6091
|
+
* — filtering, the active option, keyboard behaviour, validity — is shared, so
|
|
6092
|
+
* the two cannot drift apart.
|
|
6093
|
+
*
|
|
6094
|
+
* The consumer owns the options and, if it fetches them, their ordering: this
|
|
6095
|
+
* component never sorts, debounces or requests anything. It filters what it is
|
|
6096
|
+
* given, and reports what the user asked for.
|
|
6097
|
+
*/
|
|
6098
|
+
class ChCombobox {
|
|
6099
|
+
constructor(hostRef) {
|
|
6100
|
+
registerInstance(this, hostRef);
|
|
6101
|
+
this.chChange = createEvent(this, "chChange");
|
|
6102
|
+
this.chFilter = createEvent(this, "chFilter");
|
|
6103
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
6104
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
6105
|
+
}
|
|
6106
|
+
else {
|
|
6107
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
6108
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
6109
|
+
}
|
|
6110
|
+
}
|
|
6111
|
+
inputId = `ch-combobox-${++comboboxIds}`;
|
|
6112
|
+
listId = `${this.inputId}-list`;
|
|
6113
|
+
hintId = `${this.inputId}-hint`;
|
|
6114
|
+
errorId = `${this.inputId}-error`;
|
|
6115
|
+
initialValue = [];
|
|
6116
|
+
internals;
|
|
6117
|
+
formDisabled = false;
|
|
6118
|
+
get host() { return getElement(this); }
|
|
6119
|
+
/** Visible label, associated with the input via `for`/`id`. */
|
|
6120
|
+
label;
|
|
6121
|
+
/** The options to filter and choose from. */
|
|
6122
|
+
options = [];
|
|
6123
|
+
/** The committed value. An array when `multiple`. */
|
|
6124
|
+
value;
|
|
6125
|
+
/** Whether the user can pick more than one option. */
|
|
6126
|
+
multiple = false;
|
|
6127
|
+
/** Placeholder shown while the field is empty. */
|
|
6128
|
+
placeholder;
|
|
6129
|
+
/** Name submitted with the form. Repeated once per value when `multiple`. */
|
|
6130
|
+
name;
|
|
6131
|
+
/** Whether the field is disabled. */
|
|
6132
|
+
disabled = false;
|
|
6133
|
+
/** Whether at least one value is required. */
|
|
6134
|
+
required = false;
|
|
6135
|
+
/** Helper text, replaced by `errorMessage` when invalid. */
|
|
6136
|
+
hint;
|
|
6137
|
+
/** Custom error message; wins over the built-in messages. */
|
|
6138
|
+
errorMessage;
|
|
6139
|
+
/** Whether the field is marked invalid by the consumer. */
|
|
6140
|
+
invalid = false;
|
|
6141
|
+
/** Text the user has typed to filter with. */
|
|
6142
|
+
query = '';
|
|
6143
|
+
/** Whether the list is rendered. */
|
|
6144
|
+
expanded = false;
|
|
6145
|
+
/** Index into `visibleOptions` of the option under the keyboard cursor. */
|
|
6146
|
+
activeIndex = -1;
|
|
6147
|
+
/** Emitted whenever the committed value changes. */
|
|
6148
|
+
chChange;
|
|
6149
|
+
/** Emitted as the user types, with the raw query, so a consumer can filter remotely. */
|
|
6150
|
+
chFilter;
|
|
6151
|
+
/** The committed values as an array, whatever the mode. */
|
|
6152
|
+
get selected() {
|
|
6153
|
+
if (Array.isArray(this.value)) {
|
|
6154
|
+
return this.value;
|
|
6155
|
+
}
|
|
6156
|
+
return this.value === undefined || this.value === '' ? [] : [this.value];
|
|
6157
|
+
}
|
|
6158
|
+
/** Options that match the current query. */
|
|
6159
|
+
get visibleOptions() {
|
|
6160
|
+
const query = this.query.trim().toLowerCase();
|
|
6161
|
+
if (query === '') {
|
|
6162
|
+
return this.options;
|
|
6163
|
+
}
|
|
6164
|
+
return this.options.filter(option => option.label.toLowerCase().includes(query));
|
|
6165
|
+
}
|
|
6166
|
+
/** Options that are still choosable: already-picked ones drop out in multiple mode. */
|
|
6167
|
+
get choosable() {
|
|
6168
|
+
if (!this.multiple) {
|
|
6169
|
+
return this.visibleOptions;
|
|
6170
|
+
}
|
|
6171
|
+
const chosen = new Set(this.selected);
|
|
6172
|
+
return this.visibleOptions.filter(option => !chosen.has(option.value));
|
|
6173
|
+
}
|
|
6174
|
+
labelFor(value) {
|
|
6175
|
+
return this.options.find(option => option.value === value)?.label ?? value;
|
|
6176
|
+
}
|
|
6177
|
+
componentDidLoad() {
|
|
6178
|
+
this.initialValue = this.selected;
|
|
6179
|
+
this.syncForm();
|
|
6180
|
+
this.host.addEventListener('focusout', this.handleFocusOut);
|
|
6181
|
+
this.host.addEventListener('invalid', this.markTouched);
|
|
6182
|
+
}
|
|
6183
|
+
disconnectedCallback() {
|
|
6184
|
+
this.host.removeEventListener('focusout', this.handleFocusOut);
|
|
6185
|
+
}
|
|
6186
|
+
markTouched = () => {
|
|
6187
|
+
this.host.setAttribute('data-touched', '');
|
|
6188
|
+
};
|
|
6189
|
+
/**
|
|
6190
|
+
* Closing on blur is deferred: clicking an option also blurs the input, and
|
|
6191
|
+
* the click must be allowed to land first.
|
|
6192
|
+
*/
|
|
6193
|
+
handleFocusOut = () => {
|
|
6194
|
+
this.markTouched();
|
|
6195
|
+
window.setTimeout(() => {
|
|
6196
|
+
if (!this.host.contains(document.activeElement) && this.host.shadowRoot?.activeElement == null) {
|
|
6197
|
+
this.expanded = false;
|
|
6198
|
+
this.syncForm();
|
|
6199
|
+
}
|
|
6200
|
+
}, 0);
|
|
6201
|
+
};
|
|
6202
|
+
syncForm() {
|
|
6203
|
+
const internals = this.internals;
|
|
6204
|
+
if (typeof internals?.setFormValue !== 'function') {
|
|
6205
|
+
return;
|
|
6206
|
+
}
|
|
6207
|
+
const values = this.selected;
|
|
6208
|
+
// Multiple entries are submitted once per value, the way a multi-select does.
|
|
6209
|
+
if (this.multiple) {
|
|
6210
|
+
const data = new FormData();
|
|
6211
|
+
for (const entry of values) {
|
|
6212
|
+
data.append(this.name ?? '', entry);
|
|
6213
|
+
}
|
|
6214
|
+
internals.setFormValue(values.length === 0 ? null : data);
|
|
6215
|
+
}
|
|
6216
|
+
else {
|
|
6217
|
+
internals.setFormValue(values[0] ?? '');
|
|
6218
|
+
}
|
|
6219
|
+
const { flags, message } = resolveValidity({
|
|
6220
|
+
required: this.required,
|
|
6221
|
+
empty: values.length === 0,
|
|
6222
|
+
invalid: this.invalid,
|
|
6223
|
+
errorMessage: this.errorMessage,
|
|
6224
|
+
});
|
|
6225
|
+
internals.setValidity(flags, message);
|
|
6226
|
+
}
|
|
6227
|
+
formResetCallback() {
|
|
6228
|
+
this.value = this.multiple ? [...this.initialValue] : (this.initialValue[0] ?? '');
|
|
6229
|
+
this.query = '';
|
|
6230
|
+
this.syncForm();
|
|
6231
|
+
const input = this.host.shadowRoot?.querySelector('.input');
|
|
6232
|
+
if (input) {
|
|
6233
|
+
input.value = '';
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
formDisabledCallback(isDisabled) {
|
|
6237
|
+
this.formDisabled = isDisabled;
|
|
6238
|
+
}
|
|
6239
|
+
commit(value) {
|
|
6240
|
+
if (this.multiple) {
|
|
6241
|
+
const next = this.selected.includes(value) ? this.selected : [...this.selected, value];
|
|
6242
|
+
this.value = next;
|
|
6243
|
+
this.query = '';
|
|
6244
|
+
const input = this.host.shadowRoot?.querySelector('.input');
|
|
6245
|
+
if (input) {
|
|
6246
|
+
input.value = '';
|
|
6247
|
+
}
|
|
6248
|
+
// Keep the list open: choosing again is the common case here.
|
|
6249
|
+
this.activeIndex = -1;
|
|
6250
|
+
}
|
|
6251
|
+
else {
|
|
6252
|
+
this.value = value;
|
|
6253
|
+
this.query = this.labelFor(value);
|
|
6254
|
+
this.expanded = false;
|
|
6255
|
+
this.activeIndex = -1;
|
|
6256
|
+
}
|
|
6257
|
+
this.chChange.emit(this.value);
|
|
6258
|
+
this.syncForm();
|
|
6259
|
+
}
|
|
6260
|
+
remove(value) {
|
|
6261
|
+
const next = this.selected.filter(entry => entry !== value);
|
|
6262
|
+
this.value = this.multiple ? next : '';
|
|
6263
|
+
this.chChange.emit(this.value);
|
|
6264
|
+
this.syncForm();
|
|
6265
|
+
}
|
|
6266
|
+
open() {
|
|
6267
|
+
if (this.disabled || this.formDisabled) {
|
|
6268
|
+
return;
|
|
6269
|
+
}
|
|
6270
|
+
this.expanded = true;
|
|
6271
|
+
}
|
|
6272
|
+
moveActive(delta) {
|
|
6273
|
+
const count = this.choosable.length;
|
|
6274
|
+
if (count === 0) {
|
|
6275
|
+
return;
|
|
6276
|
+
}
|
|
6277
|
+
const next = this.activeIndex + delta;
|
|
6278
|
+
this.activeIndex = next < 0 ? count - 1 : next >= count ? 0 : next;
|
|
6279
|
+
}
|
|
6280
|
+
handleInput = (event) => {
|
|
6281
|
+
const input = event.target;
|
|
6282
|
+
this.query = input.value;
|
|
6283
|
+
this.expanded = true;
|
|
6284
|
+
this.activeIndex = this.choosable.length > 0 ? 0 : -1;
|
|
6285
|
+
// Single mode shows a typed-but-uncommitted value as no value at all.
|
|
6286
|
+
if (!this.multiple && this.value !== undefined && this.value !== this.labelFor(this.selected[0] ?? '')) {
|
|
6287
|
+
this.value = '';
|
|
6288
|
+
}
|
|
6289
|
+
this.chFilter.emit(this.query);
|
|
6290
|
+
};
|
|
6291
|
+
handleKeyDown = (event) => {
|
|
6292
|
+
if (event.key === 'ArrowDown') {
|
|
6293
|
+
event.preventDefault();
|
|
6294
|
+
this.open();
|
|
6295
|
+
this.moveActive(1);
|
|
6296
|
+
return;
|
|
6297
|
+
}
|
|
6298
|
+
if (event.key === 'ArrowUp') {
|
|
6299
|
+
event.preventDefault();
|
|
6300
|
+
this.open();
|
|
6301
|
+
this.moveActive(-1);
|
|
6302
|
+
return;
|
|
6303
|
+
}
|
|
6304
|
+
if (event.key === 'Enter') {
|
|
6305
|
+
const option = this.choosable[this.activeIndex];
|
|
6306
|
+
if (this.expanded && option && !option.disabled) {
|
|
6307
|
+
event.preventDefault();
|
|
6308
|
+
this.commit(option.value);
|
|
6309
|
+
}
|
|
6310
|
+
return;
|
|
6311
|
+
}
|
|
6312
|
+
if (event.key === 'Escape' && this.expanded) {
|
|
6313
|
+
event.preventDefault();
|
|
6314
|
+
this.expanded = false;
|
|
6315
|
+
this.activeIndex = -1;
|
|
6316
|
+
return;
|
|
6317
|
+
}
|
|
6318
|
+
// Backspace in an empty multiple field removes the last chip.
|
|
6319
|
+
if (event.key === 'Backspace' && this.multiple && this.query === '') {
|
|
6320
|
+
const last = this.selected[this.selected.length - 1];
|
|
6321
|
+
if (last !== undefined) {
|
|
6322
|
+
event.preventDefault();
|
|
6323
|
+
this.remove(last);
|
|
6324
|
+
}
|
|
6325
|
+
}
|
|
6326
|
+
};
|
|
6327
|
+
handleFocus = () => {
|
|
6328
|
+
this.open();
|
|
6329
|
+
};
|
|
6330
|
+
handleBlur = () => {
|
|
6331
|
+
// A single-mode field shows the chosen label, not what was typed.
|
|
6332
|
+
const input = this.host.shadowRoot?.querySelector('.input');
|
|
6333
|
+
if (input && !this.multiple) {
|
|
6334
|
+
this.query = '';
|
|
6335
|
+
input.value = this.selected.length > 0 ? this.labelFor(this.selected[0]) : '';
|
|
6336
|
+
}
|
|
6337
|
+
};
|
|
6338
|
+
get isInvalid() {
|
|
6339
|
+
return this.invalid || (this.host.hasAttribute('data-touched') && this.selected.length === 0 && this.required);
|
|
6340
|
+
}
|
|
6341
|
+
get describedBy() {
|
|
6342
|
+
if (this.isInvalid && this.errorMessage) {
|
|
6343
|
+
return this.errorId;
|
|
6344
|
+
}
|
|
6345
|
+
return this.hint ? this.hintId : undefined;
|
|
6346
|
+
}
|
|
6347
|
+
/** The option id for `aria-activedescendant`. */
|
|
6348
|
+
optionId(index) {
|
|
6349
|
+
return `${this.inputId}-option-${index}`;
|
|
6350
|
+
}
|
|
6351
|
+
render() {
|
|
6352
|
+
const options = this.choosable;
|
|
6353
|
+
const active = this.activeIndex >= 0 && this.activeIndex < options.length ? options[this.activeIndex] : undefined;
|
|
6354
|
+
const chosen = this.selected;
|
|
6355
|
+
const showError = this.isInvalid && this.errorMessage;
|
|
6356
|
+
return (hAsync(Host, { key: '783df95d2970b0db5c6f839fb0acbaa7582301f0' }, this.label && (hAsync("label", { key: '232933c04601d543b391d15603f1dcfafa2f6e73', class: "label", htmlFor: this.inputId }, this.label)), this.multiple && chosen.length > 0 && (hAsync("ul", { key: 'e7e92805f42a9a97d0587463f0b68fa79368cc6b', class: "chips", "aria-label": "Selected values" }, chosen.map(entry => (hAsync("li", { class: "chip", key: entry }, hAsync("span", { class: "chip__label" }, this.labelFor(entry)), hAsync("button", { type: "button", class: "chip__remove", "aria-label": `Remove ${this.labelFor(entry)}`, onClick: () => this.remove(entry) }, hAsync("span", { "aria-hidden": "true" }, "\u00D7"))))))), hAsync("div", { key: '076bd78c0c43327c298baf37e9411d68e6b03734', class: "field" }, hAsync("input", { key: '0e2caa28567ea21d8b5a98a8b1ed949e07731e09', id: this.label && !this.multiple ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid }, type: "text", role: "combobox", autocomplete: "off", "aria-expanded": this.expanded ? 'true' : 'false', "aria-controls": this.listId, "aria-autocomplete": "list", "aria-activedescendant": active ? this.optionId(this.activeIndex) : undefined, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, placeholder: chosen.length === 0 ? this.placeholder : undefined, value: this.multiple ? this.query : this.query || (chosen[0] !== undefined ? this.labelFor(chosen[0]) : ''), onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), hAsync("ul", { key: '5f843aef03c09ff9dd1e02c3da90f6e9dbcca858', class: "listbox", id: this.listId, role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, hidden: !this.expanded }, options.length === 0 && (hAsync("li", { key: '1bb282438f1889da96af7d27b504e31ab19088e5', class: "listbox__empty", role: "presentation" }, "No results")), options.map((option, index) => (hAsync("li", { class: {
|
|
6357
|
+
'listbox__option': true,
|
|
6358
|
+
'listbox__option--active': index === this.activeIndex,
|
|
6359
|
+
'listbox__option--disabled': option.disabled === true,
|
|
6360
|
+
}, id: this.optionId(index), key: option.value, role: "option", "aria-selected": this.multiple ? 'false' : chosen[0] === option.value ? 'true' : 'false', "aria-disabled": option.disabled ? 'true' : undefined,
|
|
6361
|
+
// Pointer-down commits before the input's blur closes the list.
|
|
6362
|
+
onMouseDown: event => {
|
|
6363
|
+
event.preventDefault();
|
|
6364
|
+
if (!option.disabled) {
|
|
6365
|
+
this.commit(option.value);
|
|
6366
|
+
}
|
|
6367
|
+
} }, option.label))))), this.hint && !showError && (hAsync("p", { key: 'dc7f8a5d26e55d2d7836bf72a5359a6c0fbe0220', class: "hint", id: this.hintId }, this.hint)), showError && (hAsync("p", { key: 'd3d9beaa0eb9d830b2c9f3082ea0bf0490efe3ee', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
6368
|
+
}
|
|
6369
|
+
static get formAssociated() { return true; }
|
|
6370
|
+
static get watchers() { return {
|
|
6371
|
+
"value": [{
|
|
6372
|
+
"syncForm": 0
|
|
6373
|
+
}],
|
|
6374
|
+
"required": [{
|
|
6375
|
+
"syncForm": 0
|
|
6376
|
+
}],
|
|
6377
|
+
"invalid": [{
|
|
6378
|
+
"syncForm": 0
|
|
6379
|
+
}],
|
|
6380
|
+
"errorMessage": [{
|
|
6381
|
+
"syncForm": 0
|
|
6382
|
+
}],
|
|
6383
|
+
"multiple": [{
|
|
6384
|
+
"syncForm": 0
|
|
6385
|
+
}]
|
|
6386
|
+
}; }
|
|
6387
|
+
static get style() { return chComboboxCss(); }
|
|
6388
|
+
static get cmpMeta() { return {
|
|
6389
|
+
"$flags$": 585,
|
|
6390
|
+
"$tagName$": "ch-combobox",
|
|
6391
|
+
"$members$": {
|
|
6392
|
+
"label": [1],
|
|
6393
|
+
"options": [16],
|
|
6394
|
+
"value": [1025],
|
|
6395
|
+
"multiple": [516],
|
|
6396
|
+
"placeholder": [1],
|
|
6397
|
+
"name": [513],
|
|
6398
|
+
"disabled": [516],
|
|
6399
|
+
"required": [516],
|
|
6400
|
+
"hint": [1],
|
|
6401
|
+
"errorMessage": [1, "error-message"],
|
|
6402
|
+
"invalid": [4],
|
|
6403
|
+
"formDisabled": [32],
|
|
6404
|
+
"query": [32],
|
|
6405
|
+
"expanded": [32],
|
|
6406
|
+
"activeIndex": [32]
|
|
6407
|
+
},
|
|
6408
|
+
"$listeners$": undefined,
|
|
6409
|
+
"$lazyBundleId$": "-",
|
|
6410
|
+
"$attrsToReflect$": [["multiple", "multiple"], ["name", "name"], ["disabled", "disabled"], ["required", "required"]]
|
|
6411
|
+
}; }
|
|
6412
|
+
}
|
|
6413
|
+
|
|
6078
6414
|
const chConfirmDialogCss = () => `:host{display:contents;font-family:var(--typography-body)}.confirm__heading{margin:0;font-family:var(--typography-heading);font-size:var(--typography-size-lg);font-weight:var(--typography-weight-semibold);color:var(--color-text-primary)}.confirm__message{margin:0;font-size:var(--typography-size-sm);color:var(--color-text-secondary);overflow-wrap:break-word}.confirm__actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--spacing-md);margin-top:var(--spacing-2xl)}.confirm__button{display:inline-flex;align-items:center;justify-content:center;min-height:2.25rem;padding:0 var(--spacing-lg);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-sm);background:var(--color-surface-default);color:var(--color-text-primary);font-family:var(--typography-body);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);cursor:pointer}.confirm__button:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:2px}.confirm__button:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.confirm__button--confirm{border-color:var(--color-accent-default);background:var(--color-accent-default);color:var(--color-accent-text)}.confirm__button--danger{border-color:var(--color-status-warning);background:var(--color-status-warning);color:var(--color-text-primary)}.confirm__button--danger::before{content:'⚠';margin-right:var(--spacing-xs)}`;
|
|
6079
6415
|
|
|
6080
6416
|
/**
|
|
@@ -6213,7 +6549,7 @@ class ChConfirmDialog {
|
|
|
6213
6549
|
this.cancelButton?.focus();
|
|
6214
6550
|
}
|
|
6215
6551
|
render() {
|
|
6216
|
-
return (hAsync(Host, { key: '
|
|
6552
|
+
return (hAsync(Host, { key: 'b51a806f4cca331fc3a95421d3342608c6e0df4c', onKeyDown: this.handleKeyDown }, hAsync("ch-modal", { key: '453db02cd724bc9bf2ed7c4b61bcf04c77b8d449', open: this.open, label: this.heading, size: "sm", onChClose: this.handleModalClose, onChOpen: () => this.onOpening() }, hAsync("h2", { key: '1dee8f11ee68679792c394506ab2e8a7f98b852b', slot: "heading", class: "confirm__heading" }, this.heading), this.message && hAsync("p", { key: 'f2a8a473acfcdfee51600a0dc7bc47b85f4a0889', class: "confirm__message" }, this.message), hAsync("div", { key: '7ecfa78e4df217e38519f115fdcb4761ed88937d', class: "confirm__actions" }, hAsync("button", { key: '0c4a117caee9ef316932e2eea9c0aa3734f0bbee', class: { 'confirm__button': true, 'confirm__button--cancel': true }, type: "button", ref: el => (this.cancelButton = el), disabled: this.pending, onClick: this.handleCancel }, this.cancelLabel), hAsync("button", { key: 'd33fd5f6f218bfcd39f179e29d757f7f9bdcae30', class: { 'confirm__button': true, 'confirm__button--confirm': true, 'confirm__button--danger': this.tone === 'danger' }, type: "button", ref: el => (this.confirmButton = el), disabled: this.pending, "aria-busy": this.pending ? 'true' : undefined, onClick: this.handleConfirm }, this.confirmLabel)))));
|
|
6217
6553
|
}
|
|
6218
6554
|
static get watchers() { return {
|
|
6219
6555
|
"open": [{
|
|
@@ -6278,7 +6614,7 @@ class ChDescriptionList {
|
|
|
6278
6614
|
return COLUMNS.has(this.columns) ? this.columns : '1';
|
|
6279
6615
|
}
|
|
6280
6616
|
render() {
|
|
6281
|
-
return (hAsync(Host, { key: '
|
|
6617
|
+
return (hAsync(Host, { key: '1fd1228705a78196b618efc4b9665de038663ae5' }, hAsync("dl", { key: '0b724aa3c5dec011106347d9d29d0420f723012f', class: `list list--columns-${this.columnCount}` }, hAsync("slot", { key: '4da2c6965568cf7d2f93ee98e131a7bede26d5dc' }))));
|
|
6282
6618
|
}
|
|
6283
6619
|
static get style() { return chDescriptionListCss(); }
|
|
6284
6620
|
static get cmpMeta() { return {
|
|
@@ -6304,7 +6640,7 @@ class ChDivider {
|
|
|
6304
6640
|
*/
|
|
6305
6641
|
orientation = 'horizontal';
|
|
6306
6642
|
render() {
|
|
6307
|
-
return (hAsync(Host, { key: '
|
|
6643
|
+
return (hAsync(Host, { key: 'cc193b7e7229de8ff96eb056bd345cc8d666004b', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: '659320c0372d208aab9b13d471427e479499a72c', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
6308
6644
|
}
|
|
6309
6645
|
static get style() { return chDividerCss(); }
|
|
6310
6646
|
static get cmpMeta() { return {
|
|
@@ -6509,7 +6845,7 @@ class ChDrawer {
|
|
|
6509
6845
|
this.chClose.emit();
|
|
6510
6846
|
};
|
|
6511
6847
|
render() {
|
|
6512
|
-
return (hAsync(Host, { key: '
|
|
6848
|
+
return (hAsync(Host, { key: '1a51b3f19b956fe860fe4def9f2ac23eac7f86ac' }, hAsync("dialog", { key: 'ad7366eb2e6274962faa2a1564a06ecc3268329c', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: 'ce532be71c35234f1713051e5669f1cf9316031e', class: "drawer-head" }, hAsync("slot", { key: 'b522a8f26dddefd2aaf146134ac24e026a5eb72a', name: "header" }), this.closeLabel && (hAsync("button", { key: 'b51fb4e20797cd82661c72c9250b0875338180f0', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: 'dd21e30fcb74f08c80b1c2ba79696e1d54bf4c26', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'eacafa24e5af7c107e09a7cbfdfc93ae6f373dc5', class: "drawer-body" }, hAsync("slot", { key: 'ddf9370c27956bc2954a3af29064394d37ec5e67' })), hAsync("slot", { key: '0065c8f5bafb14791e63d15bbec0ec2ba533c222', name: "footer" }))));
|
|
6513
6849
|
}
|
|
6514
6850
|
static get watchers() { return {
|
|
6515
6851
|
"open": [{
|
|
@@ -6621,7 +6957,7 @@ class ChEmoji {
|
|
|
6621
6957
|
this.loaded = true;
|
|
6622
6958
|
};
|
|
6623
6959
|
render() {
|
|
6624
|
-
return (hAsync(Host, { key: '
|
|
6960
|
+
return (hAsync(Host, { key: 'd6e224a01b95fdebb4525b30b326585ee96e1050' }, hAsync("img", { key: '6bc232d8f25e0099c9e2794f15b8e47f6c2dbb22', class: {
|
|
6625
6961
|
'emoji': true,
|
|
6626
6962
|
[`emoji--${this.size}`]: true,
|
|
6627
6963
|
'emoji--hidden': !this.loaded,
|
|
@@ -6677,7 +7013,7 @@ class ChEmptyState {
|
|
|
6677
7013
|
*/
|
|
6678
7014
|
size = 'md';
|
|
6679
7015
|
render() {
|
|
6680
|
-
return (hAsync(Host, { key: '
|
|
7016
|
+
return (hAsync(Host, { key: '15a171d5e6128b278078f3564fe27a75f2d3638f', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, hAsync("div", { key: '959baade697f5817d46fe2ef1e08b31d1f14168d', class: "empty-state__inner" }, hAsync("div", { key: 'c97f9d6405da2d81e538701c48e12acbb6bbbd76', class: "empty-state__icon", "aria-hidden": "true" }, hAsync("slot", { key: 'abb50aae0a68ff11b5042a51cdb8d7f69d965ae8', name: "icon" })), hAsync("h3", { key: '2049c3cb4714b642670ba283f8c3c9e3e1ba6ae4', class: "empty-state__title" }, this.title), this.description && hAsync("p", { key: 'b74601952c870aab10345c7bdc856dc779396645', class: "empty-state__description" }, this.description), hAsync("div", { key: 'c72be9f5a4f40113d1c6df1d62c9b617e8dcb407', class: "empty-state__actions" }, hAsync("slot", { key: 'c998904407c1cf174921873e3d547c2056f3d1b5' })))));
|
|
6681
7017
|
}
|
|
6682
7018
|
static get style() { return chEmptyStateCss(); }
|
|
6683
7019
|
static get cmpMeta() { return {
|
|
@@ -6748,7 +7084,7 @@ class ChGrid {
|
|
|
6748
7084
|
this.el.style.setProperty('--ch-grid-columns', template);
|
|
6749
7085
|
}
|
|
6750
7086
|
render() {
|
|
6751
|
-
return (hAsync(Host, { key: '
|
|
7087
|
+
return (hAsync(Host, { key: '4fbcd3b5e563ebf0f5b2878ef6af0cb2d1c0f427', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, hAsync("slot", { key: '4fe1548392ab44de9dd895129d77f20650a0d929' })));
|
|
6752
7088
|
}
|
|
6753
7089
|
static get style() { return chGridCss(); }
|
|
6754
7090
|
static get cmpMeta() { return {
|
|
@@ -6798,7 +7134,7 @@ class ChIcon {
|
|
|
6798
7134
|
render() {
|
|
6799
7135
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
6800
7136
|
const decorative = !this.label;
|
|
6801
|
-
return (hAsync(Host, { key: '
|
|
7137
|
+
return (hAsync(Host, { key: 'c55af60731d59ee48bfb2566f498c5675c36cb04' }, hAsync("svg", { key: '65334ba063c059ef2a505c7ea34859d1d1971f01', class: `icon icon--${this.size}`, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", role: decorative ? undefined : 'img', "aria-label": this.label, "aria-hidden": decorative ? 'true' : undefined, focusable: "false" }, (shapes ?? []).map(shape => hAsync(shape.tag, shape.attrs)))));
|
|
6802
7138
|
}
|
|
6803
7139
|
static get style() { return chIconCss(); }
|
|
6804
7140
|
static get cmpMeta() { return {
|
|
@@ -6861,7 +7197,7 @@ class ChIconButton {
|
|
|
6861
7197
|
};
|
|
6862
7198
|
render() {
|
|
6863
7199
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
6864
|
-
return (hAsync(Host, { key: '
|
|
7200
|
+
return (hAsync(Host, { key: '585bbba80a0811664fcc2fa8fd625cd8655e3395' }, hAsync("button", { key: 'd817e9eda842b824a052be9b822c860b9417ddd4', class: `button button--${this.size}`, type: this.type, "aria-label": this.label, "aria-busy": this.loading ? 'true' : undefined, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.handleClick }, hAsync("svg", { key: '2f0278d9f551da6b526c3fe5a6680cd38080502e', class: "icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", focusable: "false" }, (shapes ?? []).map(shape => hAsync(shape.tag, shape.attrs))))));
|
|
6865
7201
|
}
|
|
6866
7202
|
static get style() { return chIconButtonCss(); }
|
|
6867
7203
|
static get cmpMeta() { return {
|
|
@@ -7002,7 +7338,7 @@ class ChInput {
|
|
|
7002
7338
|
return undefined;
|
|
7003
7339
|
}
|
|
7004
7340
|
render() {
|
|
7005
|
-
return (hAsync(Host, { key: '
|
|
7341
|
+
return (hAsync(Host, { key: '80dd56c8fa40d4c8c4eec2b62d1fea2aaa574dcc' }, this.label && (hAsync("label", { key: 'd1d4c26e7a49f176f5d986af107395fd32abbd11', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: '9220c4f98593dce4af626a2d068e654cf360199b', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '802ec36ef19bebd3371ff9535fba4052268f3db6', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '489b9634ce6577f71c5875a45cfc5b8a5eeb6cf1', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7006
7342
|
}
|
|
7007
7343
|
static get formAssociated() { return true; }
|
|
7008
7344
|
static get watchers() { return {
|
|
@@ -7251,7 +7587,7 @@ class ChModal {
|
|
|
7251
7587
|
this.chClose.emit();
|
|
7252
7588
|
};
|
|
7253
7589
|
render() {
|
|
7254
|
-
return (hAsync(Host, { key: '
|
|
7590
|
+
return (hAsync(Host, { key: '36395dc0b52676493b93d02c04d1c810d98c8028' }, hAsync("dialog", { key: '99d446c5d0ecd9e16f8d36fc2903f1ab06c274f2', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '9dd7043302df7ffa89fdb44f54ed5c93a48fff7e', class: "modal-head" }, hAsync("slot", { key: '473041c868d2234c66276936cde0d020b8ed74ce', name: "heading" }), this.closeLabel && (hAsync("button", { key: 'e3f65a8c91283b8f3a27975afe44e47e65fbf03f', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: 'dbacf11f6b06ed4183e6d277fc807d63867fdf1d', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: '1d9e1567fe0046078f1d26f5dea25c3c06c7e6ed', class: "modal-body" }, hAsync("slot", { key: 'cc0a63c64b512a6c40c59d8395ced225a961adfc' })))));
|
|
7255
7591
|
}
|
|
7256
7592
|
static get watchers() { return {
|
|
7257
7593
|
"open": [{
|
|
@@ -7492,10 +7828,10 @@ class ChNumberInput {
|
|
|
7492
7828
|
}
|
|
7493
7829
|
render() {
|
|
7494
7830
|
const showError = this.isInvalid && this.errorMessage;
|
|
7495
|
-
return (hAsync(Host, { key: '
|
|
7831
|
+
return (hAsync(Host, { key: '0265106cccf730338541d292be247b7853ab00cf' }, this.label && (hAsync("label", { key: '17293d5cc55a8d4de0cd544ea1f508d1ed820b12', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'ce17dc7c0f5c1064d8535aef942e486a46b72188', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid },
|
|
7496
7832
|
// `text` with `inputmode`, not `type="number"`: a number input drops
|
|
7497
7833
|
// partial values and cannot show grouped digits.
|
|
7498
|
-
type: "text", inputMode: this.decimals ? 'decimal' : 'numeric', name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.typing ? this.draft : this.formatDisplay(this.value), "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur }), this.hint && !showError && (hAsync("p", { key: '
|
|
7834
|
+
type: "text", inputMode: this.decimals ? 'decimal' : 'numeric', name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.typing ? this.draft : this.formatDisplay(this.value), "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur }), this.hint && !showError && (hAsync("p", { key: '37611a7755f6885e6f87a600b1a27cc5edd5fefd', class: "hint", id: this.hintId }, this.hint)), showError && (hAsync("p", { key: '68b8c5b964a2a98df493103b1fde088aeefda769', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7499
7835
|
}
|
|
7500
7836
|
static get formAssociated() { return true; }
|
|
7501
7837
|
static get watchers() { return {
|
|
@@ -7713,10 +8049,10 @@ class ChOtpInput {
|
|
|
7713
8049
|
}
|
|
7714
8050
|
render() {
|
|
7715
8051
|
const showError = this.isInvalid && this.errorMessage;
|
|
7716
|
-
return (hAsync(Host, { key: '
|
|
8052
|
+
return (hAsync(Host, { key: '1ce9d8e77463ecb270b870461ef96f8e84f418df' }, this.label && (hAsync("label", { key: 'd19c88141314b68912c91af235d45eceaa12555b', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'e2e93f1672fa753b3b20bc032abc6e375591cf3f', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid }, type: this.secret ? 'password' : 'text', inputMode: this.inputMode,
|
|
7717
8053
|
// The platform fills a single field carrying this attribute; per-digit
|
|
7718
8054
|
// inputs never receive the SMS code.
|
|
7719
|
-
autocomplete: "one-time-code", autocapitalize: this.inputMode === 'text' ? 'characters' : 'off', spellcheck: false, name: this.name, placeholder: this.placeholder, maxLength: this.length, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onBlur: this.handleBlur }), this.hint && !showError && (hAsync("p", { key: '
|
|
8055
|
+
autocomplete: "one-time-code", autocapitalize: this.inputMode === 'text' ? 'characters' : 'off', spellcheck: false, name: this.name, placeholder: this.placeholder, maxLength: this.length, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.isInvalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onBlur: this.handleBlur }), this.hint && !showError && (hAsync("p", { key: 'f02aa008051c1c0d64bba7045fb72d8c89ebaddd', class: "hint", id: this.hintId }, this.hint)), showError && (hAsync("p", { key: 'ff9dc44ff5de84fd100fe617677ad18ab898fe1e', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7720
8056
|
}
|
|
7721
8057
|
static get formAssociated() { return true; }
|
|
7722
8058
|
static get watchers() { return {
|
|
@@ -7807,7 +8143,7 @@ class ChPageHeader {
|
|
|
7807
8143
|
actionsStacked = false;
|
|
7808
8144
|
render() {
|
|
7809
8145
|
const Heading = this.headingLevel;
|
|
7810
|
-
return (hAsync(Host, { key: '
|
|
8146
|
+
return (hAsync(Host, { key: '482cd87ddc139731c8b09ba6441231657aae0fcd' }, hAsync("div", { key: '9b4d97c14cc6c88d926e4384c6e85df097fdd4ac', class: { 'header': true, 'header--stacked': this.actionsStacked } }, hAsync("div", { key: '55daa00350e1204e7a80cc7ee9d1efad49bc517f', class: "header-text" }, this.eyebrow && hAsync("p", { key: 'f30b06834abcc2c6e4aca65b56d6860e8a242dfe', class: "header-eyebrow" }, this.eyebrow), hAsync(Heading, { key: '2f0c4b1e6608403ce1b4d9316247d6012c4c810f', class: "header-title" }, this.title), this.description && hAsync("p", { key: '28633505d6dcc8346a34010e85664d48bc8b019b', class: "header-description" }, this.description)), hAsync("div", { key: '1bda14e777cc0744a9391ea64accb9d2c734dfc2', class: "header-actions" }, hAsync("slot", { key: '7869965c1649dfc6ffa0e019e84d6785344187d2', name: "actions" })))));
|
|
7811
8147
|
}
|
|
7812
8148
|
static get style() { return chPageHeaderCss(); }
|
|
7813
8149
|
static get cmpMeta() { return {
|
|
@@ -7895,7 +8231,7 @@ class ChPagination {
|
|
|
7895
8231
|
const atStart = this.page <= 1;
|
|
7896
8232
|
const atEnd = count === 0 || this.page >= count;
|
|
7897
8233
|
const blocked = this.disabled || count === 0;
|
|
7898
|
-
return (hAsync(Host, { key: '
|
|
8234
|
+
return (hAsync(Host, { key: 'c5091d1a0791a1e0a87fb483ae026484d2aa6c6a' }, hAsync("nav", { key: 'f70132cdc0ebd3f08d6b712b843bc5a36b20d355', class: { pager: true, [`pager--${this.size}`]: true }, "aria-label": this.label }, hAsync("button", { key: '3aebe1cce9b909f8b5977f231bd540121fc95f50', class: "pager__button", type: "button", disabled: blocked || atStart, onClick: () => this.go(this.page - 1), "aria-label": "Previous page" }, hAsync("span", { key: 'e68021c2356a38c6a79ecf79a9a7cbcd9063e6cf', "aria-hidden": "true" }, "\u2039")), hAsync("p", { key: 'd615f3d94d3c5c9a4232ca50ddf1fc8113eb932e', class: "pager__summary", id: this.labelId, "aria-live": "polite" }, count === 0 ? 'No results' : `${this.firstRow}–${this.lastRow} of ${this.total}`), hAsync("button", { key: '0724d97b05c7fe1ef2501317bd28218fa4d8c440', class: "pager__button", type: "button", disabled: blocked || atEnd, onClick: () => this.go(this.page + 1), "aria-label": "Next page" }, hAsync("span", { key: '05cbf13c2be6ccc33e4a517b995a22113306883b', "aria-hidden": "true" }, "\u203A")))));
|
|
7899
8235
|
}
|
|
7900
8236
|
static get style() { return chPaginationCss(); }
|
|
7901
8237
|
static get cmpMeta() { return {
|
|
@@ -8026,7 +8362,7 @@ class ChRadio {
|
|
|
8026
8362
|
}
|
|
8027
8363
|
render() {
|
|
8028
8364
|
const groupName = this.name || `${this.groupId}-group`;
|
|
8029
|
-
return (hAsync(Host, { key: '
|
|
8365
|
+
return (hAsync(Host, { key: '51bc6a2d4ff9a098889dc65b55afdb7e70a65d5b' }, this.label && (hAsync("span", { key: '0e043e7f3e5a8b48e700975e84c7d5a3515b645a', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '70853bba1a97cae044ef799a892049f32eb4d61c', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { class: "mark" }), hAsync("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'cb17c2fc139bb933acf2fc8080e10ee0466c1b68', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'de2406de9bec97f248c3252a9acd9c1ab0c745e0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
8030
8366
|
}
|
|
8031
8367
|
static get formAssociated() { return true; }
|
|
8032
8368
|
static get watchers() { return {
|
|
@@ -8170,7 +8506,7 @@ class ChSegmentedControl {
|
|
|
8170
8506
|
}
|
|
8171
8507
|
render() {
|
|
8172
8508
|
const groupName = this.name || `${this.groupId}-group`;
|
|
8173
|
-
return (hAsync(Host, { key: '
|
|
8509
|
+
return (hAsync(Host, { key: '2380775f9f3448f173db291ee69b95cbbe77d12b' }, this.label && (hAsync("span", { key: 'fe3f47b45547039550c1581b6aec30b45cf01296', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'fe42cb7bd8a7a675211a0a2637d8b023d12874a4', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (hAsync("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, hAsync("input", { class: "input", type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || this.formDisabled || option.disabled, onChange: this.handleChange }), hAsync("span", { class: "label-text" }, option.label)))))));
|
|
8174
8510
|
}
|
|
8175
8511
|
static get formAssociated() { return true; }
|
|
8176
8512
|
static get watchers() { return {
|
|
@@ -8313,7 +8649,7 @@ class ChSelect {
|
|
|
8313
8649
|
return undefined;
|
|
8314
8650
|
}
|
|
8315
8651
|
render() {
|
|
8316
|
-
return (hAsync(Host, { key: '
|
|
8652
|
+
return (hAsync(Host, { key: 'bb342289b7725eaf8269ceb86589ebeb61f4c63b' }, this.label && (hAsync("label", { key: '766492635c7eac71f719d52d07f71b9895037410', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'f086a020b93254d04b635677290e6e5ae9b1b35c', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (hAsync("option", { key: '3c22ffe91a28b7e9e3a302c31a3c8945335bd2df', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (hAsync("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '495b45c73e98b0b61ccde9e16972d0ff80665edf', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '62f08ed1c7bce8a3fbc357bcf0928dd23c897a7b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
8317
8653
|
}
|
|
8318
8654
|
static get formAssociated() { return true; }
|
|
8319
8655
|
static get watchers() { return {
|
|
@@ -8406,7 +8742,7 @@ class ChSkeleton {
|
|
|
8406
8742
|
return { width: this.width, height: this.height };
|
|
8407
8743
|
}
|
|
8408
8744
|
render() {
|
|
8409
|
-
return (hAsync(Host, { key: '
|
|
8745
|
+
return (hAsync(Host, { key: '0a4de76c2f5d591ccdc128d41412fd99d5b0f191', "aria-hidden": "true", class: { 'skeleton': true, [`skeleton--${this.shape}`]: true, 'skeleton--animated': this.animated } }, Array.from({ length: this.items }).map((value, index) => (hAsync("span", { class: "skeleton__item", style: this.sizeStyle, key: index, "data-index": String(value) })))));
|
|
8410
8746
|
}
|
|
8411
8747
|
static get style() { return chSkeletonCss(); }
|
|
8412
8748
|
static get cmpMeta() { return {
|
|
@@ -8454,7 +8790,7 @@ class ChSpinner {
|
|
|
8454
8790
|
label;
|
|
8455
8791
|
render() {
|
|
8456
8792
|
const labelled = Boolean(this.label);
|
|
8457
|
-
return (hAsync(Host, { key: '
|
|
8793
|
+
return (hAsync(Host, { key: '03ab408176f59ecdd51a493d795ccc86acfa563c' }, hAsync("span", { key: 'db54c4d2001a01caeea33426d4042c7ee5546b75', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
8458
8794
|
}
|
|
8459
8795
|
static get style() { return chSpinnerCss(); }
|
|
8460
8796
|
static get cmpMeta() { return {
|
|
@@ -8500,7 +8836,7 @@ class ChStack {
|
|
|
8500
8836
|
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
8501
8837
|
}
|
|
8502
8838
|
render() {
|
|
8503
|
-
return (hAsync(Host, { key: '
|
|
8839
|
+
return (hAsync(Host, { key: 'd9947ce1a6c5b06b8e83d458a9b4a71032e1f8a7', class: { stack: true, [`stack--gap-${this.gapStep}`]: true, [`stack--align-${this.align}`]: true, [`stack--justify-${this.justify}`]: true } }, hAsync("slot", { key: '2698e4850b1fd63367d1b7f55dacd1e0e3ae2b3c' })));
|
|
8504
8840
|
}
|
|
8505
8841
|
static get style() { return chStackCss(); }
|
|
8506
8842
|
static get cmpMeta() { return {
|
|
@@ -8566,10 +8902,10 @@ class ChStat {
|
|
|
8566
8902
|
}
|
|
8567
8903
|
render() {
|
|
8568
8904
|
const cue = this.toneClass === 'positive' ? '+' : this.toneClass === 'negative' ? '−' : null;
|
|
8569
|
-
return (hAsync(Host, { key: '
|
|
8905
|
+
return (hAsync(Host, { key: '45a42444173ee0839913b7b42df270ffdad064c5', class: "stat" }, hAsync("div", { key: 'dee4aadc137f789e6c44718c3dad1c195a90d6ba', class: "stat__inner" }, hAsync("span", { key: '5300a63497a673ed7e840079b0d63510979c8622', class: "stat__label" }, this.label), hAsync("span", { key: 'e8e56b69c7ed471a0a668588436c9d0149f32da3', class: {
|
|
8570
8906
|
stat__value: true,
|
|
8571
8907
|
[`stat__value--${this.toneClass}`]: this.toneClass !== 'default',
|
|
8572
|
-
} }, cue && (hAsync("span", { key: '
|
|
8908
|
+
} }, cue && (hAsync("span", { key: '1d977df4d28190286ac0e99fa376e97c992831ec', class: "stat__cue", "aria-hidden": "true" }, cue)), hAsync("slot", { key: '29c9924f93fc6f948be898cf788d40a78b3b8ee4', name: "value" }, this.value)), this.hint && hAsync("span", { key: 'ad8179cd263b13dcded4a1b74cffb7c38290a791', class: "stat__hint" }, this.hint), hAsync("div", { key: '3d00f1e7c055f847d4bbdecbfdd5fd291f5087b4', class: "stat__footer" }, hAsync("slot", { key: 'c0288524426fa4195f9998eb4188af7f6aa11150', name: "footer" })))));
|
|
8573
8909
|
}
|
|
8574
8910
|
static get style() { return chStatCss(); }
|
|
8575
8911
|
static get cmpMeta() { return {
|
|
@@ -8695,7 +9031,7 @@ class ChSwitch {
|
|
|
8695
9031
|
return undefined;
|
|
8696
9032
|
}
|
|
8697
9033
|
render() {
|
|
8698
|
-
return (hAsync(Host, { key: '
|
|
9034
|
+
return (hAsync(Host, { key: 'bae45755c2467bf088ab67b71c6a21289e33f8f2' }, hAsync("label", { key: '5d68a33bb80334a7f5f326bd6f2dfc2f4c3e01df', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, hAsync("input", { key: 'e48330e2c0b23077d34392960dd3d53052b8b21c', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), hAsync("span", { key: '8f7d8fc472bb03a907e007eaf0c4e81d4f2b1a34', class: "track" }, hAsync("span", { key: '574549aed9d109225c15d2a8b94893dea3799fbf', class: "thumb" })), this.label && hAsync("span", { key: '3da40cbd701270e368f8280fb0475d4372ae65c9', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '39fbb18961f849f241c19bfcd1895285b948b8da', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'a29a1a5dc06732a17e745634bf2874a4f28ff574', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
8699
9035
|
}
|
|
8700
9036
|
static get formAssociated() { return true; }
|
|
8701
9037
|
static get watchers() { return {
|
|
@@ -8892,7 +9228,7 @@ class ChTable {
|
|
|
8892
9228
|
const empty = this.emptyState;
|
|
8893
9229
|
// Before the first measurement the table is rendered as non-empty, so a
|
|
8894
9230
|
// consumer never sees the empty message flash over real rows.
|
|
8895
|
-
return (hAsync(Host, { key: '
|
|
9231
|
+
return (hAsync(Host, { key: 'bb91f61f579bc99b632bdd5b3a746c6c7319dd70', class: { 'table': true, 'table--empty': empty === 'true' || empty === 'filtered' } }, hAsync("div", { key: 'ddd75bdab98d1784863697dc784d2cec869bd5f5', class: "table__scroll", tabIndex: 0, role: "group", "aria-labelledby": this.captionId }, hAsync("table", { key: 'cf02a54dd6b14a1604b417adab84cde9d0f4d814' }, hAsync("caption", { key: 'fc6f525350e2a51e5325f383edd361c270c25fc0', id: this.captionId, class: "caption" }, this.label), hAsync("thead", { key: '2d03b39883847a2ab0f1807fcf767fc4edea8ad9' }, hAsync("tr", { key: '739e4f34d5a2338db3fabf2f3c9fa265d6d9f976' }, this.columns.map(column => this.renderHeaderCell(column)))), hAsync("tbody", { key: '7584a38498f3c9521640f1f472d841350605a15f' }, hAsync("slot", { key: '81ea6c4992fa3de24916f16db27663646409e8d5' })))), (empty === 'true' || empty === 'filtered') && (hAsync("div", { key: '6b745d95d7f9ebf56d73be6723f9b6aba1854709', class: "table__empty", id: this.emptyId }, hAsync("slot", { key: '2d3cfd14af06b26e2ea6837cc756b555fbeeb5cf', name: "empty" }, hAsync("p", { key: '53a2d940717ae12c04862b544d6eb60c6ed932a5', class: "table__empty-message" }, this.emptyMessage(empty)))))));
|
|
8896
9232
|
}
|
|
8897
9233
|
static get watchers() { return {
|
|
8898
9234
|
"filtered": [{
|
|
@@ -9012,7 +9348,7 @@ class ChTabs {
|
|
|
9012
9348
|
}
|
|
9013
9349
|
render() {
|
|
9014
9350
|
const active = this.activeValue;
|
|
9015
|
-
return (hAsync(Host, { key: '
|
|
9351
|
+
return (hAsync(Host, { key: '2f6a0ba1be82d292dcb11f772f8764dcce7201bc' }, hAsync("div", { key: '914cb32e1467aaac43178866fbcc9b45d32ec495', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
9016
9352
|
const selected = tab.value === active;
|
|
9017
9353
|
return (hAsync("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
|
|
9018
9354
|
})), this.tabs.map(tab => (hAsync("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, hAsync("slot", { name: `panel-${tab.value}` }))))));
|
|
@@ -9154,7 +9490,7 @@ class ChTextarea {
|
|
|
9154
9490
|
return undefined;
|
|
9155
9491
|
}
|
|
9156
9492
|
render() {
|
|
9157
|
-
return (hAsync(Host, { key: '
|
|
9493
|
+
return (hAsync(Host, { key: '2e8db2290d6a221b844ef2b510d9d1db4d9aac18' }, this.label && (hAsync("label", { key: 'b1687f64d9474706dfcbe7042444e2bfe74a5e49', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: '3e45a32bcfb609fb072bcf84cba46e7d0d5806a8', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '8c013880c709dd0b35d6122765bf2cf8d456f08b', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '88d45fbc82deb9131364b5e2f502daf104c72d56', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
9158
9494
|
}
|
|
9159
9495
|
static get formAssociated() { return true; }
|
|
9160
9496
|
static get watchers() { return {
|
|
@@ -9225,7 +9561,7 @@ class ChTimeline {
|
|
|
9225
9561
|
registerInstance(this, hostRef);
|
|
9226
9562
|
}
|
|
9227
9563
|
render() {
|
|
9228
|
-
return (hAsync(Host, { key: '
|
|
9564
|
+
return (hAsync(Host, { key: '8f9e53b6f2f9c2f9d60a421c1c1c59240e469099', class: "timeline" }, hAsync("ol", { key: '535a06f4b150fc1a67a6baae2f406b76f08cf293', class: "list" }, hAsync("slot", { key: '584198aa85286147b49f2bd4e3897b0faa529309' }))));
|
|
9229
9565
|
}
|
|
9230
9566
|
static get style() { return chTimelineCss(); }
|
|
9231
9567
|
static get cmpMeta() { return {
|
|
@@ -9531,7 +9867,7 @@ class ChTooltip {
|
|
|
9531
9867
|
};
|
|
9532
9868
|
render() {
|
|
9533
9869
|
const { offset } = this;
|
|
9534
|
-
return (hAsync(Host, { key: '
|
|
9870
|
+
return (hAsync(Host, { key: '24f3c1522fdde642c50e0358d32a8b7ea8e0d327' }, hAsync("span", { key: '2e09507788b944ab599667bd1bd1d9327e9fc510', class: "anchor" }, hAsync("span", { key: '87b00e6c802396181a808823ef7e08a7f2d18bf8', class: "probe", "aria-hidden": "true", ref: el => (this.probeEl = el) }), hAsync("slot", { key: '9620f1447fa376df84a56348759bac1933f96214', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: 'd8a517178b2035dc9254a48cff8c59cda4025965', ref: el => (this.bubbleEl = el), style: {
|
|
9535
9871
|
'--ch-tooltip-offset-top': offset ? `${offset.top}px` : null,
|
|
9536
9872
|
'--ch-tooltip-offset-left': offset ? `${offset.left}px` : null,
|
|
9537
9873
|
}, class: {
|
|
@@ -9539,7 +9875,7 @@ class ChTooltip {
|
|
|
9539
9875
|
'bubble--positioned': Boolean(this.offset),
|
|
9540
9876
|
[`bubble--${this.resolvedPlacement ?? this.placement}`]: true,
|
|
9541
9877
|
'bubble--visible': this.visible,
|
|
9542
|
-
} }, hAsync("slot", { key: '
|
|
9878
|
+
} }, hAsync("slot", { key: '5f72e3c398fbe6c14ccea1cdd3f20c40beb9f950', name: "content", onSlotchange: this.associate })))));
|
|
9543
9879
|
}
|
|
9544
9880
|
static get style() { return chTooltipCss(); }
|
|
9545
9881
|
static get cmpMeta() { return {
|
|
@@ -9570,6 +9906,7 @@ registerComponents([
|
|
|
9570
9906
|
ChCard,
|
|
9571
9907
|
ChCheckbox,
|
|
9572
9908
|
ChCluster,
|
|
9909
|
+
ChCombobox,
|
|
9573
9910
|
ChConfirmDialog,
|
|
9574
9911
|
ChDescriptionList,
|
|
9575
9912
|
ChDivider,
|