@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
|
@@ -5,7 +5,7 @@ export class ChDivider {
|
|
|
5
5
|
*/
|
|
6
6
|
orientation = 'horizontal';
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: 'cc193b7e7229de8ff96eb056bd345cc8d666004b', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: '659320c0372d208aab9b13d471427e479499a72c', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "ch-divider"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -145,7 +145,7 @@ export class ChDrawer {
|
|
|
145
145
|
if (!this.label) {
|
|
146
146
|
warnMissingName(this.el, 'ch-drawer', 'pass label with the same text as the header');
|
|
147
147
|
}
|
|
148
|
-
return (h(Host, { key: '
|
|
148
|
+
return (h(Host, { key: '1a51b3f19b956fe860fe4def9f2ac23eac7f86ac' }, h("dialog", { key: 'ad7366eb2e6274962faa2a1564a06ecc3268329c', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: 'ce532be71c35234f1713051e5669f1cf9316031e', class: "drawer-head" }, h("slot", { key: 'b522a8f26dddefd2aaf146134ac24e026a5eb72a', name: "header" }), this.closeLabel && (h("button", { key: 'b51fb4e20797cd82661c72c9250b0875338180f0', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'dd21e30fcb74f08c80b1c2ba79696e1d54bf4c26', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: 'eacafa24e5af7c107e09a7cbfdfc93ae6f373dc5', class: "drawer-body" }, h("slot", { key: 'ddf9370c27956bc2954a3af29064394d37ec5e67' })), h("slot", { key: '0065c8f5bafb14791e63d15bbec0ec2ba533c222', name: "footer" }))));
|
|
149
149
|
}
|
|
150
150
|
static get is() { return "ch-drawer"; }
|
|
151
151
|
static get encapsulation() { return "shadow"; }
|
|
@@ -49,7 +49,7 @@ export class ChEmoji {
|
|
|
49
49
|
this.loaded = true;
|
|
50
50
|
};
|
|
51
51
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
52
|
+
return (h(Host, { key: 'd6e224a01b95fdebb4525b30b326585ee96e1050' }, h("img", { key: '6bc232d8f25e0099c9e2794f15b8e47f6c2dbb22', class: {
|
|
53
53
|
'emoji': true,
|
|
54
54
|
[`emoji--${this.size}`]: true,
|
|
55
55
|
'emoji--hidden': !this.loaded,
|
|
@@ -22,7 +22,7 @@ export class ChEmptyState {
|
|
|
22
22
|
*/
|
|
23
23
|
size = 'md';
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '15a171d5e6128b278078f3564fe27a75f2d3638f', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, h("div", { key: '959baade697f5817d46fe2ef1e08b31d1f14168d', class: "empty-state__inner" }, h("div", { key: 'c97f9d6405da2d81e538701c48e12acbb6bbbd76', class: "empty-state__icon", "aria-hidden": "true" }, h("slot", { key: 'abb50aae0a68ff11b5042a51cdb8d7f69d965ae8', name: "icon" })), h("h3", { key: '2049c3cb4714b642670ba283f8c3c9e3e1ba6ae4', class: "empty-state__title" }, this.title), this.description && h("p", { key: 'b74601952c870aab10345c7bdc856dc779396645', class: "empty-state__description" }, this.description), h("div", { key: 'c72be9f5a4f40113d1c6df1d62c9b617e8dcb407', class: "empty-state__actions" }, h("slot", { key: 'c998904407c1cf174921873e3d547c2056f3d1b5' })))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "ch-empty-state"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,7 +48,7 @@ export class ChGrid {
|
|
|
48
48
|
this.el.style.setProperty('--ch-grid-columns', template);
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
return (h(Host, { key: '
|
|
51
|
+
return (h(Host, { key: '4fbcd3b5e563ebf0f5b2878ef6af0cb2d1c0f427', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, h("slot", { key: '4fe1548392ab44de9dd895129d77f20650a0d929' })));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "ch-grid"; }
|
|
54
54
|
static get encapsulation() { return "shadow"; }
|
|
@@ -28,7 +28,7 @@ export class ChIcon {
|
|
|
28
28
|
render() {
|
|
29
29
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
30
30
|
const decorative = !this.label;
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: 'c55af60731d59ee48bfb2566f498c5675c36cb04' }, h("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 => h(shape.tag, shape.attrs)))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "ch-icon"; }
|
|
34
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -40,7 +40,7 @@ export class ChIconButton {
|
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
42
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '585bbba80a0811664fcc2fa8fd625cd8655e3395' }, h("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 }, h("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 => h(shape.tag, shape.attrs))))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "ch-icon-button"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|
|
@@ -107,7 +107,7 @@ export class ChInput {
|
|
|
107
107
|
return undefined;
|
|
108
108
|
}
|
|
109
109
|
render() {
|
|
110
|
-
return (h(Host, { key: '
|
|
110
|
+
return (h(Host, { key: '80dd56c8fa40d4c8c4eec2b62d1fea2aaa574dcc' }, this.label && (h("label", { key: 'd1d4c26e7a49f176f5d986af107395fd32abbd11', class: "label", htmlFor: this.inputId }, this.label)), h("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) && (h("p", { key: '802ec36ef19bebd3371ff9535fba4052268f3db6', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '489b9634ce6577f71c5875a45cfc5b8a5eeb6cf1', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
111
111
|
}
|
|
112
112
|
static get is() { return "ch-input"; }
|
|
113
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -152,7 +152,7 @@ export class ChModal {
|
|
|
152
152
|
if (!this.label) {
|
|
153
153
|
warnMissingName(this.el, 'ch-modal', 'pass label with the same text as the heading');
|
|
154
154
|
}
|
|
155
|
-
return (h(Host, { key: '
|
|
155
|
+
return (h(Host, { key: '36395dc0b52676493b93d02c04d1c810d98c8028' }, h("dialog", { key: '99d446c5d0ecd9e16f8d36fc2903f1ab06c274f2', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, h("div", { key: '9dd7043302df7ffa89fdb44f54ed5c93a48fff7e', class: "modal-head" }, h("slot", { key: '473041c868d2234c66276936cde0d020b8ed74ce', name: "heading" }), this.closeLabel && (h("button", { key: 'e3f65a8c91283b8f3a27975afe44e47e65fbf03f', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, h("span", { key: 'dbacf11f6b06ed4183e6d277fc807d63867fdf1d', "aria-hidden": "true" }, "\u00D7")))), h("div", { key: '1d9e1567fe0046078f1d26f5dea25c3c06c7e6ed', class: "modal-body" }, h("slot", { key: 'cc0a63c64b512a6c40c59d8395ced225a961adfc' })))));
|
|
156
156
|
}
|
|
157
157
|
static get is() { return "ch-modal"; }
|
|
158
158
|
static get encapsulation() { return "shadow"; }
|
|
@@ -204,10 +204,10 @@ export class ChNumberInput {
|
|
|
204
204
|
}
|
|
205
205
|
render() {
|
|
206
206
|
const showError = this.isInvalid && this.errorMessage;
|
|
207
|
-
return (h(Host, { key: '
|
|
207
|
+
return (h(Host, { key: '0265106cccf730338541d292be247b7853ab00cf' }, this.label && (h("label", { key: '17293d5cc55a8d4de0cd544ea1f508d1ed820b12', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'ce17dc7c0f5c1064d8535aef942e486a46b72188', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid },
|
|
208
208
|
// `text` with `inputmode`, not `type="number"`: a number input drops
|
|
209
209
|
// partial values and cannot show grouped digits.
|
|
210
|
-
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 && (h("p", { key: '
|
|
210
|
+
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 && (h("p", { key: '37611a7755f6885e6f87a600b1a27cc5edd5fefd', class: "hint", id: this.hintId }, this.hint)), showError && (h("p", { key: '68b8c5b964a2a98df493103b1fde088aeefda769', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
211
211
|
}
|
|
212
212
|
static get is() { return "ch-number-input"; }
|
|
213
213
|
static get encapsulation() { return "shadow"; }
|
|
@@ -156,10 +156,10 @@ export class ChOtpInput {
|
|
|
156
156
|
}
|
|
157
157
|
render() {
|
|
158
158
|
const showError = this.isInvalid && this.errorMessage;
|
|
159
|
-
return (h(Host, { key: '
|
|
159
|
+
return (h(Host, { key: '1ce9d8e77463ecb270b870461ef96f8e84f418df' }, this.label && (h("label", { key: 'd19c88141314b68912c91af235d45eceaa12555b', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'e2e93f1672fa753b3b20bc032abc6e375591cf3f', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid }, type: this.secret ? 'password' : 'text', inputMode: this.inputMode,
|
|
160
160
|
// The platform fills a single field carrying this attribute; per-digit
|
|
161
161
|
// inputs never receive the SMS code.
|
|
162
|
-
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 && (h("p", { key: '
|
|
162
|
+
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 && (h("p", { key: 'f02aa008051c1c0d64bba7045fb72d8c89ebaddd', class: "hint", id: this.hintId }, this.hint)), showError && (h("p", { key: 'ff9dc44ff5de84fd100fe617677ad18ab898fe1e', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
163
163
|
}
|
|
164
164
|
static get is() { return "ch-otp-input"; }
|
|
165
165
|
static get encapsulation() { return "shadow"; }
|
|
@@ -37,7 +37,7 @@ export class ChPageHeader {
|
|
|
37
37
|
actionsStacked = false;
|
|
38
38
|
render() {
|
|
39
39
|
const Heading = this.headingLevel;
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: '482cd87ddc139731c8b09ba6441231657aae0fcd' }, h("div", { key: '9b4d97c14cc6c88d926e4384c6e85df097fdd4ac', class: { 'header': true, 'header--stacked': this.actionsStacked } }, h("div", { key: '55daa00350e1204e7a80cc7ee9d1efad49bc517f', class: "header-text" }, this.eyebrow && h("p", { key: 'f30b06834abcc2c6e4aca65b56d6860e8a242dfe', class: "header-eyebrow" }, this.eyebrow), h(Heading, { key: '2f0c4b1e6608403ce1b4d9316247d6012c4c810f', class: "header-title" }, this.title), this.description && h("p", { key: '28633505d6dcc8346a34010e85664d48bc8b019b', class: "header-description" }, this.description)), h("div", { key: '1bda14e777cc0744a9391ea64accb9d2c734dfc2', class: "header-actions" }, h("slot", { key: '7869965c1649dfc6ffa0e019e84d6785344187d2', name: "actions" })))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "ch-page-header"; }
|
|
43
43
|
static get encapsulation() { return "shadow"; }
|
|
@@ -62,7 +62,7 @@ export class ChPagination {
|
|
|
62
62
|
const atStart = this.page <= 1;
|
|
63
63
|
const atEnd = count === 0 || this.page >= count;
|
|
64
64
|
const blocked = this.disabled || count === 0;
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: 'c5091d1a0791a1e0a87fb483ae026484d2aa6c6a' }, h("nav", { key: 'f70132cdc0ebd3f08d6b712b843bc5a36b20d355', class: { pager: true, [`pager--${this.size}`]: true }, "aria-label": this.label }, h("button", { key: '3aebe1cce9b909f8b5977f231bd540121fc95f50', class: "pager__button", type: "button", disabled: blocked || atStart, onClick: () => this.go(this.page - 1), "aria-label": "Previous page" }, h("span", { key: 'e68021c2356a38c6a79ecf79a9a7cbcd9063e6cf', "aria-hidden": "true" }, "\u2039")), h("p", { key: 'd615f3d94d3c5c9a4232ca50ddf1fc8113eb932e', class: "pager__summary", id: this.labelId, "aria-live": "polite" }, count === 0 ? 'No results' : `${this.firstRow}–${this.lastRow} of ${this.total}`), h("button", { key: '0724d97b05c7fe1ef2501317bd28218fa4d8c440', class: "pager__button", type: "button", disabled: blocked || atEnd, onClick: () => this.go(this.page + 1), "aria-label": "Next page" }, h("span", { key: '05cbf13c2be6ccc33e4a517b995a22113306883b', "aria-hidden": "true" }, "\u203A")))));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "ch-pagination"; }
|
|
68
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -98,7 +98,7 @@ export class ChRadio {
|
|
|
98
98
|
}
|
|
99
99
|
render() {
|
|
100
100
|
const groupName = this.name || `${this.groupId}-group`;
|
|
101
|
-
return (h(Host, { key: '
|
|
101
|
+
return (h(Host, { key: '51bc6a2d4ff9a098889dc65b55afdb7e70a65d5b' }, this.label && (h("span", { key: '0e043e7f3e5a8b48e700975e84c7d5a3515b645a', class: "group-label", id: this.labelId }, this.label)), h("div", { key: '70853bba1a97cae044ef799a892049f32eb4d61c', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, h("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 }), h("span", { class: "mark" }), h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'cb17c2fc139bb933acf2fc8080e10ee0466c1b68', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'de2406de9bec97f248c3252a9acd9c1ab0c745e0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
102
102
|
}
|
|
103
103
|
static get is() { return "ch-radio"; }
|
|
104
104
|
static get encapsulation() { return "shadow"; }
|
|
@@ -92,7 +92,7 @@ export class ChSegmentedControl {
|
|
|
92
92
|
}
|
|
93
93
|
render() {
|
|
94
94
|
const groupName = this.name || `${this.groupId}-group`;
|
|
95
|
-
return (h(Host, { key: '
|
|
95
|
+
return (h(Host, { key: '2380775f9f3448f173db291ee69b95cbbe77d12b' }, this.label && (h("span", { key: 'fe3f47b45547039550c1581b6aec30b45cf01296', class: "group-label", id: this.labelId }, this.label)), h("div", { key: 'fe42cb7bd8a7a675211a0a2637d8b023d12874a4', class: { segmented: true, [`segmented--${this.size}`]: true }, role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled || option.disabled } }, h("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 }), h("span", { class: "label-text" }, option.label)))))));
|
|
96
96
|
}
|
|
97
97
|
static get is() { return "ch-segmented-control"; }
|
|
98
98
|
static get encapsulation() { return "shadow"; }
|
|
@@ -99,7 +99,7 @@ export class ChSelect {
|
|
|
99
99
|
return undefined;
|
|
100
100
|
}
|
|
101
101
|
render() {
|
|
102
|
-
return (h(Host, { key: '
|
|
102
|
+
return (h(Host, { key: 'bb342289b7725eaf8269ceb86589ebeb61f4c63b' }, this.label && (h("label", { key: '766492635c7eac71f719d52d07f71b9895037410', class: "label", htmlFor: this.selectId }, this.label)), h("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 && (h("option", { key: '3c22ffe91a28b7e9e3a302c31a3c8945335bd2df', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '495b45c73e98b0b61ccde9e16972d0ff80665edf', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '62f08ed1c7bce8a3fbc357bcf0928dd23c897a7b', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
103
103
|
}
|
|
104
104
|
static get is() { return "ch-select"; }
|
|
105
105
|
static get encapsulation() { return "shadow"; }
|
|
@@ -47,7 +47,7 @@ export class ChSkeleton {
|
|
|
47
47
|
return { width: this.width, height: this.height };
|
|
48
48
|
}
|
|
49
49
|
render() {
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(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) => (h("span", { class: "skeleton__item", style: this.sizeStyle, key: index, "data-index": String(value) })))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "ch-skeleton"; }
|
|
53
53
|
static get encapsulation() { return "shadow"; }
|
|
@@ -23,7 +23,7 @@ export class ChSpinner {
|
|
|
23
23
|
label;
|
|
24
24
|
render() {
|
|
25
25
|
const labelled = Boolean(this.label);
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '03ab408176f59ecdd51a493d795ccc86acfa563c' }, h("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' })));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "ch-spinner"; }
|
|
29
29
|
static get encapsulation() { return "shadow"; }
|
|
@@ -24,7 +24,7 @@ export class ChStack {
|
|
|
24
24
|
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: 'd9947ce1a6c5b06b8e83d458a9b4a71032e1f8a7', class: { stack: true, [`stack--gap-${this.gapStep}`]: true, [`stack--align-${this.align}`]: true, [`stack--justify-${this.justify}`]: true } }, h("slot", { key: '2698e4850b1fd63367d1b7f55dacd1e0e3ae2b3c' })));
|
|
28
28
|
}
|
|
29
29
|
static get is() { return "ch-stack"; }
|
|
30
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,10 +43,10 @@ export class ChStat {
|
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
45
|
const cue = this.toneClass === 'positive' ? '+' : this.toneClass === 'negative' ? '−' : null;
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: '45a42444173ee0839913b7b42df270ffdad064c5', class: "stat" }, h("div", { key: 'dee4aadc137f789e6c44718c3dad1c195a90d6ba', class: "stat__inner" }, h("span", { key: '5300a63497a673ed7e840079b0d63510979c8622', class: "stat__label" }, this.label), h("span", { key: 'e8e56b69c7ed471a0a668588436c9d0149f32da3', class: {
|
|
47
47
|
stat__value: true,
|
|
48
48
|
[`stat__value--${this.toneClass}`]: this.toneClass !== 'default',
|
|
49
|
-
} }, cue && (h("span", { key: '
|
|
49
|
+
} }, cue && (h("span", { key: '1d977df4d28190286ac0e99fa376e97c992831ec', class: "stat__cue", "aria-hidden": "true" }, cue)), h("slot", { key: '29c9924f93fc6f948be898cf788d40a78b3b8ee4', name: "value" }, this.value)), this.hint && h("span", { key: 'ad8179cd263b13dcded4a1b74cffb7c38290a791', class: "stat__hint" }, this.hint), h("div", { key: '3d00f1e7c055f847d4bbdecbfdd5fd291f5087b4', class: "stat__footer" }, h("slot", { key: 'c0288524426fa4195f9998eb4188af7f6aa11150', name: "footer" })))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "ch-stat"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -95,7 +95,7 @@ export class ChSwitch {
|
|
|
95
95
|
return undefined;
|
|
96
96
|
}
|
|
97
97
|
render() {
|
|
98
|
-
return (h(Host, { key: '
|
|
98
|
+
return (h(Host, { key: 'bae45755c2467bf088ab67b71c6a21289e33f8f2' }, h("label", { key: '5d68a33bb80334a7f5f326bd6f2dfc2f4c3e01df', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, h("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 }), h("span", { key: '8f7d8fc472bb03a907e007eaf0c4e81d4f2b1a34', class: "track" }, h("span", { key: '574549aed9d109225c15d2a8b94893dea3799fbf', class: "thumb" })), this.label && h("span", { key: '3da40cbd701270e368f8280fb0475d4372ae65c9', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '39fbb18961f849f241c19bfcd1895285b948b8da', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'a29a1a5dc06732a17e745634bf2874a4f28ff574', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
99
99
|
}
|
|
100
100
|
static get is() { return "ch-switch"; }
|
|
101
101
|
static get encapsulation() { return "shadow"; }
|
|
@@ -151,7 +151,7 @@ export class ChTable {
|
|
|
151
151
|
const empty = this.emptyState;
|
|
152
152
|
// Before the first measurement the table is rendered as non-empty, so a
|
|
153
153
|
// consumer never sees the empty message flash over real rows.
|
|
154
|
-
return (h(Host, { key: '
|
|
154
|
+
return (h(Host, { key: 'bb91f61f579bc99b632bdd5b3a746c6c7319dd70', class: { 'table': true, 'table--empty': empty === 'true' || empty === 'filtered' } }, h("div", { key: 'ddd75bdab98d1784863697dc784d2cec869bd5f5', class: "table__scroll", tabIndex: 0, role: "group", "aria-labelledby": this.captionId }, h("table", { key: 'cf02a54dd6b14a1604b417adab84cde9d0f4d814' }, h("caption", { key: 'fc6f525350e2a51e5325f383edd361c270c25fc0', id: this.captionId, class: "caption" }, this.label), h("thead", { key: '2d03b39883847a2ab0f1807fcf767fc4edea8ad9' }, h("tr", { key: '739e4f34d5a2338db3fabf2f3c9fa265d6d9f976' }, this.columns.map(column => this.renderHeaderCell(column)))), h("tbody", { key: '7584a38498f3c9521640f1f472d841350605a15f' }, h("slot", { key: '81ea6c4992fa3de24916f16db27663646409e8d5' })))), (empty === 'true' || empty === 'filtered') && (h("div", { key: '6b745d95d7f9ebf56d73be6723f9b6aba1854709', class: "table__empty", id: this.emptyId }, h("slot", { key: '2d3cfd14af06b26e2ea6837cc756b555fbeeb5cf', name: "empty" }, h("p", { key: '53a2d940717ae12c04862b544d6eb60c6ed932a5', class: "table__empty-message" }, this.emptyMessage(empty)))))));
|
|
155
155
|
}
|
|
156
156
|
static get is() { return "ch-table"; }
|
|
157
157
|
static get encapsulation() { return "shadow"; }
|
|
@@ -77,7 +77,7 @@ export class ChTabs {
|
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
79
|
const active = this.activeValue;
|
|
80
|
-
return (h(Host, { key: '
|
|
80
|
+
return (h(Host, { key: '2f6a0ba1be82d292dcb11f772f8764dcce7201bc' }, h("div", { key: '914cb32e1467aaac43178866fbcc9b45d32ec495', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
81
81
|
const selected = tab.value === active;
|
|
82
82
|
return (h("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));
|
|
83
83
|
})), this.tabs.map(tab => (h("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 }, h("slot", { name: `panel-${tab.value}` }))))));
|
|
@@ -108,7 +108,7 @@ export class ChTextarea {
|
|
|
108
108
|
return undefined;
|
|
109
109
|
}
|
|
110
110
|
render() {
|
|
111
|
-
return (h(Host, { key: '
|
|
111
|
+
return (h(Host, { key: '2e8db2290d6a221b844ef2b510d9d1db4d9aac18' }, this.label && (h("label", { key: 'b1687f64d9474706dfcbe7042444e2bfe74a5e49', class: "label", htmlFor: this.textareaId }, this.label)), h("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) && (h("p", { key: '8c013880c709dd0b35d6122765bf2cf8d456f08b', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '88d45fbc82deb9131364b5e2f502daf104c72d56', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
112
112
|
}
|
|
113
113
|
static get is() { return "ch-textarea"; }
|
|
114
114
|
static get encapsulation() { return "shadow"; }
|
|
@@ -25,7 +25,7 @@ import { Host, h } from "@stencil/core";
|
|
|
25
25
|
*/
|
|
26
26
|
export class ChTimeline {
|
|
27
27
|
render() {
|
|
28
|
-
return (h(Host, { key: '
|
|
28
|
+
return (h(Host, { key: '8f9e53b6f2f9c2f9d60a421c1c1c59240e469099', class: "timeline" }, h("ol", { key: '535a06f4b150fc1a67a6baae2f406b76f08cf293', class: "list" }, h("slot", { key: '584198aa85286147b49f2bd4e3897b0faa529309' }))));
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "ch-timeline"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -192,7 +192,7 @@ export class ChTooltip {
|
|
|
192
192
|
};
|
|
193
193
|
render() {
|
|
194
194
|
const { offset } = this;
|
|
195
|
-
return (h(Host, { key: '
|
|
195
|
+
return (h(Host, { key: '24f3c1522fdde642c50e0358d32a8b7ea8e0d327' }, h("span", { key: '2e09507788b944ab599667bd1bd1d9327e9fc510', class: "anchor" }, h("span", { key: '87b00e6c802396181a808823ef7e08a7f2d18bf8', class: "probe", "aria-hidden": "true", ref: el => (this.probeEl = el) }), h("slot", { key: '9620f1447fa376df84a56348759bac1933f96214', name: "trigger", onSlotchange: this.associate }), h("span", { key: 'd8a517178b2035dc9254a48cff8c59cda4025965', ref: el => (this.bubbleEl = el), style: {
|
|
196
196
|
'--ch-tooltip-offset-top': offset ? `${offset.top}px` : null,
|
|
197
197
|
'--ch-tooltip-offset-left': offset ? `${offset.left}px` : null,
|
|
198
198
|
}, class: {
|
|
@@ -200,7 +200,7 @@ export class ChTooltip {
|
|
|
200
200
|
'bubble--positioned': Boolean(this.offset),
|
|
201
201
|
[`bubble--${this.resolvedPlacement ?? this.placement}`]: true,
|
|
202
202
|
'bubble--visible': this.visible,
|
|
203
|
-
} }, h("slot", { key: '
|
|
203
|
+
} }, h("slot", { key: '5f72e3c398fbe6c14ccea1cdd3f20c40beb9f950', name: "content", onSlotchange: this.associate })))));
|
|
204
204
|
}
|
|
205
205
|
static get is() { return "ch-tooltip"; }
|
|
206
206
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,t,H as
|
|
1
|
+
import{p as e,t,H as r,c as a,h as i,d as o}from"./p-qP_9qshx.js";const s=()=>`:host{display:block}.item{background:var(--surface);border:var(--border-width) solid var(--border);border-radius:var(--radius);transition:border-color var(--duration-normal) var(--easing-default)}.item+.item{margin-top:var(--spacing-md)}.item--open{border-color:var(--border-hover)}.item-head{margin:0}.item-toggle{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-lg);width:100%;padding:var(--spacing-2xl) var(--spacing-3xl);background:transparent;border:none;color:var(--text);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer}.item-toggle::after{content:'';width:var(--spacing-md);height:var(--spacing-md);flex-shrink:0;border-right:var(--border-width) solid var(--text-muted);border-bottom:var(--border-width) solid var(--text-muted);transform:rotate(45deg);transition:transform var(--duration-normal) var(--easing-default)}.item--open .item-toggle::after{transform:rotate(-135deg)}.item-toggle:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.item-toggle:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.item-panel{padding:0 var(--spacing-3xl) var(--spacing-3xl);color:var(--text-muted)}.item-panel[hidden]{display:none}`;let n=0;const d=e(class e extends r{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chChange=a(this,"chChange")}baseId=`ch-accordion-${++n}`;items=[];value;chChange;headerId(e){return`${this.baseId}-${e}-header`}panelId(e){return`${this.baseId}-${e}-panel`}toggle=e=>{this.value=this.value===e?undefined:e;this.chChange.emit(this.value)};render(){return i(o,{key:"75d95349674170ef9e9f6e74b4b3c4369e7f1e21"},this.items.map((e=>{const t=this.value===e.value;return i("div",{key:e.value,class:{item:true,"item--open":t}},i("h3",{class:"item-head"},i("button",{type:"button",class:"item-toggle",id:this.headerId(e.value),"data-value":e.value,"aria-expanded":t?"true":"false","aria-controls":this.panelId(e.value),disabled:e.disabled,onClick:()=>this.toggle(e.value)},e.title)),i("div",{class:"item-panel",id:this.panelId(e.value),role:"region","aria-labelledby":this.headerId(e.value),hidden:!t},i("slot",{name:`panel-${e.value}`})))})))}static get style(){return s()}},[769,"ch-accordion",{items:[16],value:[1025]}]);function l(){if(typeof customElements==="undefined"){return}const e=["ch-accordion"];e.forEach((e=>{switch(e){case"ch-accordion":if(!customElements.get(t(e))){customElements.define(t(e),d)}break}}))}l();const c=d;const h=l;export{c as ChAccordion,h as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-accordion.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as
|
|
1
|
+
import{p as e,H as r,c as t,h as s,d as a,t as o}from"./p-qP_9qshx.js";import{c as i}from"./p-CnivhwvG.js";const n=()=>`:host{display:block}.alert{display:flex;align-items:flex-start;gap:var(--spacing-2xl);padding:var(--spacing-2xl) var(--spacing-3xl);border:var(--border-width) solid transparent;border-left:var(--border-accent-bar) solid transparent;border-radius:var(--radius);font-size:var(--typography-size-sm);line-height:1.5}.alert-icon{width:var(--icon-size-md);height:var(--icon-size-md);flex:none;margin-top:1px}.alert-content{flex:1;min-width:0;overflow-wrap:anywhere}.alert--default{color:var(--text);background:var(--surface);border-color:var(--border);border-left-color:var(--color-text-secondary)}.alert--positive{color:var(--color-status-positive);background:var(--color-status-positive-background);border-color:var(--color-status-positive);border-left-color:var(--color-status-positive)}.alert--warning{color:var(--color-status-warning);background:var(--color-status-warning-background);border-color:var(--color-status-warning);border-left-color:var(--color-status-warning)}.alert-dismiss{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:inherit;cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.alert-dismiss:hover{background:var(--surface-hover)}.alert-dismiss:focus-visible{outline:var(--focus-outline-width) solid currentColor;outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.alert-dismiss{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.alert-dismiss{transition:none}}`;const l={default:"info",positive:"success",warning:"alert"};const c=e(class e extends r{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chDismiss=t(this,"chDismiss")}variant="default";dismissLabel;statusCue=true;chDismiss;handleDismiss=()=>{this.chDismiss.emit()};render(){const e=this.variant==="warning"?"alert":"status";const r=this.statusCue?i[l[this.variant]]:undefined;return s(a,{key:"55c2c37d0a730000b644c583a99eae37d6f75784"},s("div",{key:e,class:{alert:true,[`alert--${this.variant}`]:true},role:e},r&&s("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"},r.map((e=>s(e.tag,e.attrs)))),s("div",{key:"43784df5b3ede4eb01521439dd90d85fccf6fe43",class:"alert-content"},s("slot",{key:"f4643113dfe9e3beb6f5e1ae9794b28c19ea3341"})),this.dismissLabel&&s("button",{key:"a1b3afee8907514f9448810b8f22d288a2f50057",class:"alert-dismiss",type:"button","aria-label":this.dismissLabel,onClick:this.handleDismiss},s("span",{key:"50371733d2358e002f7bdd1d5f8cb61d020c1cb9","aria-hidden":"true"},"×"))))}static get style(){return n()}},[769,"ch-alert",{variant:[1],dismissLabel:[1,"dismiss-label"],statusCue:[4,"status-cue"]}]);function d(){if(typeof customElements==="undefined"){return}const e=["ch-alert"];e.forEach((e=>{switch(e){case"ch-alert":if(!customElements.get(o(e))){customElements.define(o(e),c)}break}}))}d();const u=c;const f=d;export{u as ChAlert,f as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-alert.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as r,H as a,h as e,d as t,t as s}from"./p-qP_9qshx.js";const o=()=>`:host{display:inline-block}.badge{display:inline-flex;align-items:center;gap:var(--spacing-xs);padding:var(--spacing-2xs) var(--spacing-lg);border:var(--border-width) solid transparent;border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge-dot{display:block;flex:none;width:0.45em;height:0.45em;background:currentColor;border-radius:var(--radius-pill)}.badge--default{background:var(--color-surface-hover);color:var(--accent);border-color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive);border-color:var(--color-status-positive)}.badge--positive .badge-dot{background:transparent;border:var(--border-width) solid currentColor;border-radius:var(--radius-pill)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning);border-color:var(--color-status-warning)}.badge--warning .badge-dot{border-radius:0}`;const d=r(class r extends a{constructor(r){super();if(r!==false){this.__registerHost()}this.__attachShadow()}variant="default";statusCue=true;render(){return e(t,{key:"
|
|
1
|
+
import{p as r,H as a,h as e,d as t,t as s}from"./p-qP_9qshx.js";const o=()=>`:host{display:inline-block}.badge{display:inline-flex;align-items:center;gap:var(--spacing-xs);padding:var(--spacing-2xs) var(--spacing-lg);border:var(--border-width) solid transparent;border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge-dot{display:block;flex:none;width:0.45em;height:0.45em;background:currentColor;border-radius:var(--radius-pill)}.badge--default{background:var(--color-surface-hover);color:var(--accent);border-color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive);border-color:var(--color-status-positive)}.badge--positive .badge-dot{background:transparent;border:var(--border-width) solid currentColor;border-radius:var(--radius-pill)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning);border-color:var(--color-status-warning)}.badge--warning .badge-dot{border-radius:0}`;const d=r(class r extends a{constructor(r){super();if(r!==false){this.__registerHost()}this.__attachShadow()}variant="default";statusCue=true;render(){return e(t,{key:"104554450ef32f24bb88afc77ad0b3d79811de6c"},e("span",{key:"10531c508c51141fe433f794877d38ac8f9d7859",class:{badge:true,[`badge--${this.variant}`]:true}},this.statusCue&&e("span",{key:"f6bb6f7c23e7d7f4051a6022f76a15f640e35650",class:"badge-dot","aria-hidden":"true"}),e("slot",{key:"6c4d8c9c981be16facbcf95c3c0abce6f164ed16"})))}static get style(){return o()}},[769,"ch-badge",{variant:[1],statusCue:[4,"status-cue"]}]);function c(){if(typeof customElements==="undefined"){return}const r=["ch-badge"];r.forEach((r=>{switch(r){case"ch-badge":if(!customElements.get(s(r))){customElements.define(s(r),d)}break}}))}c();const i=d;const n=c;export{i as ChBadge,n as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-badge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as r,H as t,c as a,h as e,d as n,t as s}from"./p-qP_9qshx.js";import{d as i}from"./p-
|
|
1
|
+
import{p as r,H as t,c as a,h as e,d as n,t as s}from"./p-qP_9qshx.js";import{d as i}from"./p-CuSstsTP.js";function o(r){return Array.from(r.childNodes).some((r=>{if(r.nodeType!==3&&r.nodeType!==1){return false}if(r.nodeType===1&&r.hasAttribute("slot")){return false}return(r.textContent??"").trim()!==""}))}const l=()=>`:host{display:inline-block}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacing-sm);box-sizing:border-box;border:var(--border-width) solid transparent;border-radius:var(--radius-pill);cursor:pointer;font-family:inherit;font-weight:var(--typography-weight-bold);text-decoration:none;line-height:1.2;transition:background-color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default), color var(--duration-normal) var(--easing-default), transform var(--duration-fast) var(--easing-default)}.btn--sm{padding:var(--spacing-2xs) var(--spacing-lg);font-size:var(--typography-size-sm)}.btn--md{padding:var(--spacing-xs) var(--spacing-xl);font-size:inherit}.btn--lg{padding:var(--spacing-sm) var(--spacing-2xl);font-size:var(--typography-size-lg)}.btn:disabled,.btn--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.btn--loading:disabled,.btn--loading.btn--disabled{opacity:1;cursor:progress}.btn:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.btn--primary{background-color:var(--accent);color:var(--color-accent-text)}.btn--primary:hover:not(:disabled){background-color:var(--accent-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}.btn--secondary{background-color:transparent;color:var(--text);border-color:var(--border)}.btn--secondary:hover:not(:disabled){border-color:var(--border-hover);background-color:var(--surface-hover);transform:translateY(calc(-1 * var(--spacing-elevate)))}.btn--ghost{background-color:transparent;color:var(--text)}.btn--ghost:hover:not(:disabled){background-color:var(--surface-hover)}.btn--danger{background-color:var(--color-status-warning);color:var(--bg)}.btn--danger:hover:not(:disabled){filter:brightness(0.92);transform:translateY(calc(-1 * var(--spacing-elevate)))}`;const c=r(class r extends t{constructor(r){super();if(r!==false){this.__registerHost()}this.__attachShadow();this.chClick=a(this,"chClick")}get el(){return this}variant="primary";size="md";disabled=false;loading=false;href;target;label;chClick;handleClick=r=>{if(this.disabled||this.loading){r.preventDefault();return}this.chClick.emit(r)};get spinnerSize(){return this.size==="lg"?"md":"sm"}renderContent(){return[this.loading?e("ch-spinner",{size:this.spinnerSize}):e("slot",{name:"start"}),e("slot",null),e("slot",{name:"end"})]}render(){if(!this.label&&!o(this.el));const r={btn:true,[`btn--${this.variant}`]:true,[`btn--${this.size}`]:true,"btn--loading":this.loading};if(this.href&&!this.disabled&&!this.loading){return e(n,null,e("a",{class:r,href:this.href,target:this.target,rel:this.target==="_blank"?"noopener noreferrer":undefined,"aria-label":this.label,onClick:this.handleClick},this.renderContent()))}if(this.href){return e(n,null,e("span",{class:{...r,"btn--disabled":true},"aria-label":this.label,"aria-disabled":"true","aria-busy":this.loading?"true":undefined},this.renderContent()))}return e(n,null,e("button",{class:r,type:"button",disabled:this.disabled||this.loading,"aria-label":this.label,"aria-busy":this.loading?"true":undefined,onClick:this.handleClick},this.renderContent()))}static get style(){return l()}},[769,"ch-button",{variant:[1],size:[1],disabled:[4],loading:[4],href:[1],target:[1],label:[1]}]);function d(){if(typeof customElements==="undefined"){return}const r=["ch-button","ch-spinner"];r.forEach((r=>{switch(r){case"ch-button":if(!customElements.get(s(r))){customElements.define(s(r),c)}break;case"ch-spinner":if(!customElements.get(s(r))){i()}break}}))}d();const b=c;const u=d;export{b as ChButton,u as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as r,H as a,h as o,d as t,t as e}from"./p-qP_9qshx.js";const
|
|
1
|
+
import{p as r,H as a,h as o,d as t,t as e}from"./p-qP_9qshx.js";const c=()=>`:host{display:block}::slotted(p){color:var(--text-muted)}.card{color:var(--text);background:var(--surface);border:var(--border-width) solid var(--border);border-radius:var(--radius);padding:var(--spacing-4xl) var(--spacing-5xl);backdrop-filter:blur(var(--effect-blur));position:relative;overflow:hidden;transition:border-color var(--duration-normal) var(--easing-default), transform var(--duration-fast) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.card:hover{border-color:var(--border-hover);transform:translateX(var(--spacing-shift));box-shadow:var(--shadow-card-hover)}.card:hover::before{opacity:1}`;const s=r(class r extends a{constructor(r){super();if(r!==false){this.__registerHost()}this.__attachShadow()}render(){return o(t,{key:"f3a0efc8ed91ac81cf39d599acdf1944d72b56c1"},o("div",{key:"5524237836d327c8c988903393b5adc09078b121",class:"card"},o("slot",{key:"7c5a80c115399f591e40705abafd8288ff575d0f"})))}static get style(){return c()}},[257,"ch-card"]);function d(){if(typeof customElements==="undefined"){return}const r=["ch-card"];r.forEach((r=>{switch(r){case"ch-card":if(!customElements.get(e(r))){customElements.define(e(r),s)}break}}))}d();const n=s;const i=d;export{n as ChCard,i as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-card.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as i,c as t,h as s,d as r,t as a}from"./p-qP_9qshx.js";import{r as o}from"./p-BXzZsX2r.js";const n=()=>`:host{display:inline-block}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent);background:var(--accent)}.input:checked::before{content:'';width:var(--spacing-xs);height:var(--spacing-lg);border:solid var(--color-accent-text);border-width:0 var(--spacing-shift) var(--spacing-shift) 0;transform:rotate(45deg);margin-top:calc(-1 * var(--spacing-2xs))}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible,:host(:user-invalid) .input:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let c=0;const
|
|
1
|
+
import{p as e,H as i,c as t,h as s,d as r,t as a}from"./p-qP_9qshx.js";import{r as o}from"./p-BXzZsX2r.js";const n=()=>`:host{display:inline-block}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent);background:var(--accent)}.input:checked::before{content:'';width:var(--spacing-xs);height:var(--spacing-lg);border:solid var(--color-accent-text);border-width:0 var(--spacing-shift) var(--spacing-shift) 0;transform:rotate(45deg);margin-top:calc(-1 * var(--spacing-2xs))}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible,:host(:user-invalid) .input:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;let c=0;const d=e(class e extends i{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.chChange=t(this,"chChange");this.internals=this.attachInternals()}checkboxId=`ch-checkbox-${++c}`;hintId=`${this.checkboxId}-hint`;errorId=`${this.checkboxId}-error`;initialChecked=false;internals;formDisabled=false;get host(){return this}label;name;value="on";checked=false;disabled=false;required=false;hint;errorMessage;invalid=false;chChange;handleChange=e=>{this.checked=e.target.checked;this.chChange.emit(this.checked)};syncForm(){const e=this.internals;if(typeof e?.setFormValue!=="function"){return}e.setFormValue(this.checked?this.value:null);const{flags:i,message:t}=o({required:this.required,empty:!this.checked,invalid:this.invalid,errorMessage:this.errorMessage});e.setValidity(i,t)}componentDidLoad(){this.initialChecked=this.checked;this.syncForm();this.host.addEventListener("change",this.markTouched);this.host.addEventListener("focusout",this.markTouched);this.host.addEventListener("invalid",this.markTouched)}markTouched=()=>{this.host.setAttribute("data-touched","")};formResetCallback(){this.checked=this.initialChecked}formDisabledCallback(e){this.formDisabled=e}get describedBy(){if(this.invalid&&this.errorMessage){return this.errorId}if(this.hint){return this.hintId}return undefined}render(){return s(r,{key:"cf170be4d00e1ccb5511b0b72f6d42faa35b6371"},s("label",{key:"3af65f435365b1ffdaf2d4149d87c8c4f7630998",class:{control:true,"control--disabled":this.disabled||this.formDisabled},htmlFor:this.checkboxId},s("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&&s("span",{key:"a2630c7bf760b5adcd5b22e423d20e1bf7bb5107",class:"label-text"},this.label)),this.hint&&!(this.invalid&&this.errorMessage)&&s("p",{key:"4c51711fe4a623c2b9a77dc66b2e2668c905fc19",class:"hint",id:this.hintId},this.hint),this.invalid&&this.errorMessage&&s("p",{key:"053569a86c7c3cd01b2278d3dcde7c649142a7c3",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return true}static get watchers(){return{checked:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}]}}static get style(){return n()}},[577,"ch-checkbox",{label:[1],name:[513],value:[1],checked:[1028],disabled:[516],required:[516],hint:[1],errorMessage:[1,"error-message"],invalid:[4],formDisabled:[32]},undefined,{checked:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}]}]);function l(){if(typeof customElements==="undefined"){return}const e=["ch-checkbox"];e.forEach((e=>{switch(e){case"ch-checkbox":if(!customElements.get(a(e))){customElements.define(a(e),d)}break}}))}l();const h=d;const u=l;export{h as ChCheckbox,u as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-checkbox.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,h as s,d as a,t as r}from"./p-qP_9qshx.js";const l=()=>`:host{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;box-sizing:border-box}:host([hidden]){display:none}.cluster--nowrap{flex-wrap:nowrap}.cluster--gap-none{gap:0}.cluster--gap-2xs{gap:var(--spacing-2xs)}.cluster--gap-xs{gap:var(--spacing-xs)}.cluster--gap-sm{gap:var(--spacing-sm)}.cluster--gap-md{gap:var(--spacing-md)}.cluster--gap-lg{gap:var(--spacing-lg)}.cluster--gap-xl{gap:var(--spacing-xl)}.cluster--gap-2xl{gap:var(--spacing-2xl)}.cluster--gap-3xl{gap:var(--spacing-3xl)}.cluster--gap-4xl{gap:var(--spacing-4xl)}.cluster--gap-5xl{gap:var(--spacing-5xl)}.cluster--gap-6xl{gap:var(--spacing-6xl)}.cluster--align-stretch{align-items:stretch}.cluster--align-start{align-items:flex-start}.cluster--align-center{align-items:center}.cluster--align-end{align-items:flex-end}.cluster--align-baseline{align-items:baseline}.cluster--justify-start{justify-content:flex-start}.cluster--justify-center{justify-content:center}.cluster--justify-end{justify-content:flex-end}.cluster--justify-between{justify-content:space-between}.cluster--justify-around{justify-content:space-around}`;const
|
|
1
|
+
import{p as t,H as e,h as s,d as a,t as r}from"./p-qP_9qshx.js";const l=()=>`:host{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;box-sizing:border-box}:host([hidden]){display:none}.cluster--nowrap{flex-wrap:nowrap}.cluster--gap-none{gap:0}.cluster--gap-2xs{gap:var(--spacing-2xs)}.cluster--gap-xs{gap:var(--spacing-xs)}.cluster--gap-sm{gap:var(--spacing-sm)}.cluster--gap-md{gap:var(--spacing-md)}.cluster--gap-lg{gap:var(--spacing-lg)}.cluster--gap-xl{gap:var(--spacing-xl)}.cluster--gap-2xl{gap:var(--spacing-2xl)}.cluster--gap-3xl{gap:var(--spacing-3xl)}.cluster--gap-4xl{gap:var(--spacing-4xl)}.cluster--gap-5xl{gap:var(--spacing-5xl)}.cluster--gap-6xl{gap:var(--spacing-6xl)}.cluster--align-stretch{align-items:stretch}.cluster--align-start{align-items:flex-start}.cluster--align-center{align-items:center}.cluster--align-end{align-items:flex-end}.cluster--align-baseline{align-items:baseline}.cluster--justify-start{justify-content:flex-start}.cluster--justify-center{justify-content:center}.cluster--justify-end{justify-content:flex-end}.cluster--justify-between{justify-content:space-between}.cluster--justify-around{justify-content:space-around}`;const c=new Set(["none","2xs","xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl"]);const n=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.__attachShadow()}gap="md";align="center";justify="start";wrap=true;get gapStep(){return c.has(this.gap)?this.gap:"md"}render(){return s(a,{key:"82b4133e903fd75e71314ae814d7c76d1844bcdc",class:{cluster:true,[`cluster--gap-${this.gapStep}`]:true,[`cluster--align-${this.align}`]:true,[`cluster--justify-${this.justify}`]:true,"cluster--nowrap":!this.wrap}},s("slot",{key:"a53161dbf0dbfeb52e5dae80de4764d9c708c3c6"}))}static get style(){return l()}},[769,"ch-cluster",{gap:[1],align:[1],justify:[1],wrap:[4]}]);function i(){if(typeof customElements==="undefined"){return}const t=["ch-cluster"];t.forEach((t=>{switch(t){case"ch-cluster":if(!customElements.get(r(t))){customElements.define(r(t),n)}break}}))}i();const u=n;const g=i;export{u as ChCluster,g as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=ch-cluster.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ChCombobox extends Components.ChCombobox, HTMLElement {}
|
|
4
|
+
export const ChCombobox: {
|
|
5
|
+
prototype: ChCombobox;
|
|
6
|
+
new (): ChCombobox;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as i,H as t,c as s,h as e,d as r,t as a}from"./p-qP_9qshx.js";import{r as o}from"./p-BXzZsX2r.js";const n=()=>`: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)}`;let h=0;const l=i(class i extends t{constructor(i){super();if(i!==false){this.__registerHost()}this.__attachShadow();this.chChange=s(this,"chChange");this.chFilter=s(this,"chFilter");this.internals=this.attachInternals()}inputId=`ch-combobox-${++h}`;listId=`${this.inputId}-list`;hintId=`${this.inputId}-hint`;errorId=`${this.inputId}-error`;initialValue=[];internals;formDisabled=false;get host(){return this}label;options=[];value;multiple=false;placeholder;name;disabled=false;required=false;hint;errorMessage;invalid=false;query="";expanded=false;activeIndex=-1;chChange;chFilter;get selected(){if(Array.isArray(this.value)){return this.value}return this.value===undefined||this.value===""?[]:[this.value]}get visibleOptions(){const i=this.query.trim().toLowerCase();if(i===""){return this.options}return this.options.filter((t=>t.label.toLowerCase().includes(i)))}get choosable(){if(!this.multiple){return this.visibleOptions}const i=new Set(this.selected);return this.visibleOptions.filter((t=>!i.has(t.value)))}labelFor(i){return this.options.find((t=>t.value===i))?.label??i}componentDidLoad(){this.initialValue=this.selected;this.syncForm();this.host.addEventListener("focusout",this.handleFocusOut);this.host.addEventListener("invalid",this.markTouched)}disconnectedCallback(){this.host.removeEventListener("focusout",this.handleFocusOut)}markTouched=()=>{this.host.setAttribute("data-touched","")};handleFocusOut=()=>{this.markTouched();window.setTimeout((()=>{if(!this.host.contains(document.activeElement)&&this.host.shadowRoot?.activeElement==null){this.expanded=false;this.syncForm()}}),0)};syncForm(){const i=this.internals;if(typeof i?.setFormValue!=="function"){return}const t=this.selected;if(this.multiple){const s=new FormData;for(const i of t){s.append(this.name??"",i)}i.setFormValue(t.length===0?null:s)}else{i.setFormValue(t[0]??"")}const{flags:s,message:e}=o({required:this.required,empty:t.length===0,invalid:this.invalid,errorMessage:this.errorMessage});i.setValidity(s,e)}formResetCallback(){this.value=this.multiple?[...this.initialValue]:this.initialValue[0]??"";this.query="";this.syncForm();const i=this.host.shadowRoot?.querySelector(".input");if(i){i.value=""}}formDisabledCallback(i){this.formDisabled=i}commit(i){if(this.multiple){const t=this.selected.includes(i)?this.selected:[...this.selected,i];this.value=t;this.query="";const s=this.host.shadowRoot?.querySelector(".input");if(s){s.value=""}this.activeIndex=-1}else{this.value=i;this.query=this.labelFor(i);this.expanded=false;this.activeIndex=-1}this.chChange.emit(this.value);this.syncForm()}remove(i){const t=this.selected.filter((t=>t!==i));this.value=this.multiple?t:"";this.chChange.emit(this.value);this.syncForm()}open(){if(this.disabled||this.formDisabled){return}this.expanded=true}moveActive(i){const t=this.choosable.length;if(t===0){return}const s=this.activeIndex+i;this.activeIndex=s<0?t-1:s>=t?0:s}handleInput=i=>{const t=i.target;this.query=t.value;this.expanded=true;this.activeIndex=this.choosable.length>0?0:-1;if(!this.multiple&&this.value!==undefined&&this.value!==this.labelFor(this.selected[0]??"")){this.value=""}this.chFilter.emit(this.query)};handleKeyDown=i=>{if(i.key==="ArrowDown"){i.preventDefault();this.open();this.moveActive(1);return}if(i.key==="ArrowUp"){i.preventDefault();this.open();this.moveActive(-1);return}if(i.key==="Enter"){const t=this.choosable[this.activeIndex];if(this.expanded&&t&&!t.disabled){i.preventDefault();this.commit(t.value)}return}if(i.key==="Escape"&&this.expanded){i.preventDefault();this.expanded=false;this.activeIndex=-1;return}if(i.key==="Backspace"&&this.multiple&&this.query===""){const t=this.selected[this.selected.length-1];if(t!==undefined){i.preventDefault();this.remove(t)}}};handleFocus=()=>{this.open()};handleBlur=()=>{const i=this.host.shadowRoot?.querySelector(".input");if(i&&!this.multiple){this.query="";i.value=this.selected.length>0?this.labelFor(this.selected[0]):""}};get isInvalid(){return this.invalid||this.host.hasAttribute("data-touched")&&this.selected.length===0&&this.required}get describedBy(){if(this.isInvalid&&this.errorMessage){return this.errorId}return this.hint?this.hintId:undefined}optionId(i){return`${this.inputId}-option-${i}`}render(){const i=this.choosable;const t=this.activeIndex>=0&&this.activeIndex<i.length?i[this.activeIndex]:undefined;const s=this.selected;const a=this.isInvalid&&this.errorMessage;return e(r,{key:"783df95d2970b0db5c6f839fb0acbaa7582301f0"},this.label&&e("label",{key:"232933c04601d543b391d15603f1dcfafa2f6e73",class:"label",htmlFor:this.inputId},this.label),this.multiple&&s.length>0&&e("ul",{key:"e7e92805f42a9a97d0587463f0b68fa79368cc6b",class:"chips","aria-label":"Selected values"},s.map((i=>e("li",{class:"chip",key:i},e("span",{class:"chip__label"},this.labelFor(i)),e("button",{type:"button",class:"chip__remove","aria-label":`Remove ${this.labelFor(i)}`,onClick:()=>this.remove(i)},e("span",{"aria-hidden":"true"},"×")))))),e("div",{key:"076bd78c0c43327c298baf37e9411d68e6b03734",class:"field"},e("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":t?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:s.length===0?this.placeholder:undefined,value:this.multiple?this.query:this.query||(s[0]!==undefined?this.labelFor(s[0]):""),onInput:this.handleInput,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur}),e("ul",{key:"5f843aef03c09ff9dd1e02c3da90f6e9dbcca858",class:"listbox",id:this.listId,role:"listbox","aria-multiselectable":this.multiple?"true":undefined,hidden:!this.expanded},i.length===0&&e("li",{key:"1bb282438f1889da96af7d27b504e31ab19088e5",class:"listbox__empty",role:"presentation"},"No results"),i.map(((i,t)=>e("li",{class:{listbox__option:true,"listbox__option--active":t===this.activeIndex,"listbox__option--disabled":i.disabled===true},id:this.optionId(t),key:i.value,role:"option","aria-selected":this.multiple?"false":s[0]===i.value?"true":"false","aria-disabled":i.disabled?"true":undefined,onMouseDown:t=>{t.preventDefault();if(!i.disabled){this.commit(i.value)}}},i.label))))),this.hint&&!a&&e("p",{key:"dc7f8a5d26e55d2d7836bf72a5359a6c0fbe0220",class:"hint",id:this.hintId},this.hint),a&&e("p",{key:"d3d9beaa0eb9d830b2c9f3082ea0bf0490efe3ee",class:"error",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return true}static get watchers(){return{value:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}],multiple:[{syncForm:0}]}}static get style(){return n()}},[577,"ch-combobox",{label:[1],options:[16],value:[1025],multiple:[516],placeholder:[1],name:[513],disabled:[516],required:[516],hint:[1],errorMessage:[1,"error-message"],invalid:[4],formDisabled:[32],query:[32],expanded:[32],activeIndex:[32]},undefined,{value:[{syncForm:0}],required:[{syncForm:0}],invalid:[{syncForm:0}],errorMessage:[{syncForm:0}],multiple:[{syncForm:0}]}]);function d(){if(typeof customElements==="undefined"){return}const i=["ch-combobox"];i.forEach((i=>{switch(i){case"ch-combobox":if(!customElements.get(a(i))){customElements.define(a(i),l)}break}}))}d();const c=l;const u=d;export{c as ChCombobox,u as defineCustomElement};
|
|
2
|
+
//# sourceMappingURL=ch-combobox.js.map
|