@devschile/chucao 2.7.1 → 2.8.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-deb2571b.entry.js → p-0831c6f2.entry.js} +2 -2
- package/dist/chucao/p-0d7fc720.entry.js +2 -0
- package/dist/chucao/{p-60e1c1df.entry.js.map → p-0d7fc720.entry.js.map} +1 -1
- package/dist/chucao/{p-42028c97.entry.js → p-19d90f87.entry.js} +2 -2
- package/dist/chucao/{p-1b70e3f1.entry.js → p-25f4f815.entry.js} +2 -2
- package/dist/chucao/{p-472ec451.entry.js → p-3e0d7585.entry.js} +2 -2
- package/dist/chucao/{p-f917d34f.entry.js → p-46dae34b.entry.js} +2 -2
- package/dist/chucao/{p-01b6c7bf.entry.js → p-5093c486.entry.js} +2 -2
- package/dist/chucao/{p-337d7f68.entry.js → p-51f6327c.entry.js} +2 -2
- package/dist/chucao/{p-ffecdf25.entry.js → p-5577e0a0.entry.js} +2 -2
- package/dist/chucao/{p-15d27bb7.entry.js → p-56e41372.entry.js} +2 -2
- package/dist/chucao/{p-9ebcc7be.entry.js → p-6c2e5931.entry.js} +2 -2
- package/dist/chucao/{p-f6ab0a11.entry.js → p-6e93c392.entry.js} +2 -2
- package/dist/chucao/{p-9db118d9.entry.js → p-7f99ae48.entry.js} +2 -2
- package/dist/chucao/p-8b09ad3c.entry.js +2 -0
- package/dist/chucao/p-8b09ad3c.entry.js.map +1 -0
- package/dist/chucao/{p-7cdc71cc.entry.js → p-8fcf6d36.entry.js} +2 -2
- package/dist/chucao/{p-CIV5Gg1o.js → p-8l_6qAY9.js} +3 -3
- package/dist/chucao/p-8l_6qAY9.js.map +1 -0
- package/dist/chucao/{p-1e4cd3aa.entry.js → p-920d5727.entry.js} +2 -2
- package/dist/chucao/{p-c90da3c0.entry.js → p-ad41da02.entry.js} +2 -2
- package/dist/chucao/p-af088ffd.entry.js +2 -0
- package/dist/chucao/p-af088ffd.entry.js.map +1 -0
- package/dist/chucao/{p-d8b71751.entry.js → p-b42ec9bf.entry.js} +2 -2
- package/dist/chucao/{p-2e37c61b.entry.js → p-b80c39c3.entry.js} +2 -2
- package/dist/chucao/{p-a7c674b7.entry.js → p-ba589c2f.entry.js} +2 -2
- package/dist/chucao/{p-0c7f6f8d.entry.js → p-c4d68ab7.entry.js} +2 -2
- package/dist/chucao/{p-90284ebe.entry.js → p-c98e2a50.entry.js} +2 -2
- package/dist/chucao/{p-8ae680a4.entry.js → p-ca3179ae.entry.js} +2 -2
- package/dist/chucao/{p-5240f5ac.entry.js → p-d630f662.entry.js} +2 -2
- package/dist/chucao/{p-c4b2bd1f.entry.js → p-d868bdbc.entry.js} +2 -2
- package/dist/chucao/{p-e77d35c3.entry.js → p-e6b7b2da.entry.js} +2 -2
- package/dist/chucao/p-eb39b9c2.entry.js +2 -0
- package/dist/chucao/p-eb39b9c2.entry.js.map +1 -0
- package/dist/chucao/{p-10f6801e.entry.js → p-f0c288db.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ch-alert_8.cjs.entry.js +8 -8
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-cluster.cjs.entry.js +3 -3
- package/dist/cjs/ch-confirm-dialog.cjs.entry.js +138 -0
- package/dist/cjs/ch-confirm-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-description-list.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-drawer.cjs.entry.js +2 -2
- package/dist/cjs/ch-emoji.cjs.entry.js +2 -2
- package/dist/cjs/ch-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/ch-grid.cjs.entry.js +2 -2
- package/dist/cjs/ch-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/ch-icon.cjs.entry.js +2 -2
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +2 -2
- package/dist/cjs/ch-number-input.cjs.entry.js +3 -3
- package/dist/cjs/ch-otp-input.cjs.entry.js +196 -0
- package/dist/cjs/ch-otp-input.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-page-header.cjs.entry.js +2 -2
- package/dist/cjs/ch-pagination.cjs.entry.js +67 -0
- package/dist/cjs/ch-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-radio.cjs.entry.js +2 -2
- package/dist/cjs/ch-segmented-control.cjs.entry.js +2 -2
- package/dist/cjs/ch-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/ch-stack.cjs.entry.js +2 -2
- package/dist/cjs/ch-stat.cjs.entry.js +3 -3
- package/dist/cjs/ch-table.cjs.entry.js +2 -2
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ch-timeline.cjs.entry.js +2 -2
- package/dist/cjs/ch-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/chucao.cjs.js +2 -2
- package/dist/cjs/{index-ByZY6aTj.js → index-C6khqyw3.js} +19 -2
- package/dist/cjs/index-C6khqyw3.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -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-confirm-dialog/ch-confirm-dialog.css +71 -0
- package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js +382 -0
- package/dist/collection/components/ch-confirm-dialog/ch-confirm-dialog.js.map +1 -0
- 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.css +86 -0
- package/dist/collection/components/ch-otp-input/ch-otp-input.js +478 -0
- package/dist/collection/components/ch-otp-input/ch-otp-input.js.map +1 -0
- package/dist/collection/components/ch-page-header/ch-page-header.js +1 -1
- package/dist/collection/components/ch-pagination/ch-pagination.css +63 -0
- package/dist/collection/components/ch-pagination/ch-pagination.js +228 -0
- package/dist/collection/components/ch-pagination/ch-pagination.js.map +1 -0
- 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-confirm-dialog.d.ts +11 -0
- package/dist/components/ch-confirm-dialog.js +2 -0
- package/dist/components/ch-confirm-dialog.js.map +1 -0
- 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-modal.js.map +1 -1
- package/dist/components/ch-number-input.js +1 -1
- package/dist/components/ch-otp-input.d.ts +11 -0
- package/dist/components/ch-otp-input.js +2 -0
- package/dist/components/ch-otp-input.js.map +1 -0
- package/dist/components/ch-page-header.js +1 -1
- package/dist/components/ch-pagination.d.ts +11 -0
- package/dist/components/ch-pagination.js +2 -0
- package/dist/components/ch-pagination.js.map +1 -0
- 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-DiUN1WGc.js → p-CF1yV0aa.js} +2 -2
- package/dist/components/p-CmMN-UuJ.js +2 -0
- package/dist/components/p-CmMN-UuJ.js.map +1 -0
- package/dist/components/p-qP_9qshx.js.map +1 -1
- package/dist/esm/ch-accordion.entry.js +2 -2
- package/dist/esm/ch-alert_8.entry.js +8 -8
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-cluster.entry.js +3 -3
- package/dist/esm/ch-confirm-dialog.entry.js +136 -0
- package/dist/esm/ch-confirm-dialog.entry.js.map +1 -0
- package/dist/esm/ch-description-list.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-drawer.entry.js +2 -2
- package/dist/esm/ch-emoji.entry.js +2 -2
- package/dist/esm/ch-empty-state.entry.js +2 -2
- package/dist/esm/ch-grid.entry.js +2 -2
- package/dist/esm/ch-icon-button.entry.js +2 -2
- package/dist/esm/ch-icon.entry.js +2 -2
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +2 -2
- package/dist/esm/ch-number-input.entry.js +3 -3
- package/dist/esm/ch-otp-input.entry.js +194 -0
- package/dist/esm/ch-otp-input.entry.js.map +1 -0
- package/dist/esm/ch-page-header.entry.js +2 -2
- package/dist/esm/ch-pagination.entry.js +65 -0
- package/dist/esm/ch-pagination.entry.js.map +1 -0
- package/dist/esm/ch-radio.entry.js +2 -2
- package/dist/esm/ch-segmented-control.entry.js +2 -2
- package/dist/esm/ch-skeleton.entry.js +2 -2
- package/dist/esm/ch-stack.entry.js +2 -2
- package/dist/esm/ch-stat.entry.js +3 -3
- package/dist/esm/ch-table.entry.js +2 -2
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +2 -2
- package/dist/esm/ch-timeline.entry.js +2 -2
- package/dist/esm/ch-tooltip.entry.js +3 -3
- package/dist/esm/chucao.js +3 -3
- package/dist/esm/{index-CIV5Gg1o.js → index-8l_6qAY9.js} +19 -2
- package/dist/esm/index-8l_6qAY9.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-confirm-dialog/ch-confirm-dialog.d.ts +81 -0
- package/dist/types/components/ch-otp-input/ch-otp-input.d.ts +79 -0
- package/dist/types/components/ch-pagination/ch-pagination.d.ts +44 -0
- package/dist/types/components.d.ts +548 -0
- package/dist-react/components.d.ts +21 -1
- package/dist-react/components.js +33 -0
- package/dist-react/components.ts +49 -1
- package/dist-vue/index.d.ts +3 -0
- package/dist-vue/index.js +48 -0
- package/dist-vue/index.ts +54 -0
- package/hydrate/index.js +518 -35
- package/hydrate/index.mjs +518 -35
- package/package.json +13 -1
- package/dist/chucao/p-60e1c1df.entry.js +0 -2
- package/dist/chucao/p-CIV5Gg1o.js.map +0 -1
- package/dist/cjs/index-ByZY6aTj.js.map +0 -1
- package/dist/esm/index-CIV5Gg1o.js.map +0 -1
- /package/dist/chucao/{p-deb2571b.entry.js.map → p-0831c6f2.entry.js.map} +0 -0
- /package/dist/chucao/{p-42028c97.entry.js.map → p-19d90f87.entry.js.map} +0 -0
- /package/dist/chucao/{p-1b70e3f1.entry.js.map → p-25f4f815.entry.js.map} +0 -0
- /package/dist/chucao/{p-472ec451.entry.js.map → p-3e0d7585.entry.js.map} +0 -0
- /package/dist/chucao/{p-f917d34f.entry.js.map → p-46dae34b.entry.js.map} +0 -0
- /package/dist/chucao/{p-01b6c7bf.entry.js.map → p-5093c486.entry.js.map} +0 -0
- /package/dist/chucao/{p-337d7f68.entry.js.map → p-51f6327c.entry.js.map} +0 -0
- /package/dist/chucao/{p-ffecdf25.entry.js.map → p-5577e0a0.entry.js.map} +0 -0
- /package/dist/chucao/{p-15d27bb7.entry.js.map → p-56e41372.entry.js.map} +0 -0
- /package/dist/chucao/{p-9ebcc7be.entry.js.map → p-6c2e5931.entry.js.map} +0 -0
- /package/dist/chucao/{p-f6ab0a11.entry.js.map → p-6e93c392.entry.js.map} +0 -0
- /package/dist/chucao/{p-9db118d9.entry.js.map → p-7f99ae48.entry.js.map} +0 -0
- /package/dist/chucao/{p-7cdc71cc.entry.js.map → p-8fcf6d36.entry.js.map} +0 -0
- /package/dist/chucao/{p-1e4cd3aa.entry.js.map → p-920d5727.entry.js.map} +0 -0
- /package/dist/chucao/{p-c90da3c0.entry.js.map → p-ad41da02.entry.js.map} +0 -0
- /package/dist/chucao/{p-d8b71751.entry.js.map → p-b42ec9bf.entry.js.map} +0 -0
- /package/dist/chucao/{p-2e37c61b.entry.js.map → p-b80c39c3.entry.js.map} +0 -0
- /package/dist/chucao/{p-a7c674b7.entry.js.map → p-ba589c2f.entry.js.map} +0 -0
- /package/dist/chucao/{p-0c7f6f8d.entry.js.map → p-c4d68ab7.entry.js.map} +0 -0
- /package/dist/chucao/{p-90284ebe.entry.js.map → p-c98e2a50.entry.js.map} +0 -0
- /package/dist/chucao/{p-8ae680a4.entry.js.map → p-ca3179ae.entry.js.map} +0 -0
- /package/dist/chucao/{p-5240f5ac.entry.js.map → p-d630f662.entry.js.map} +0 -0
- /package/dist/chucao/{p-c4b2bd1f.entry.js.map → p-d868bdbc.entry.js.map} +0 -0
- /package/dist/chucao/{p-e77d35c3.entry.js.map → p-e6b7b2da.entry.js.map} +0 -0
- /package/dist/chucao/{p-10f6801e.entry.js.map → p-f0c288db.entry.js.map} +0 -0
- /package/dist/components/{p-DiUN1WGc.js.map → p-CF1yV0aa.js.map} +0 -0
package/hydrate/index.mjs
CHANGED
|
@@ -2820,6 +2820,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
2820
2820
|
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
2821
2821
|
endPostUpdate();
|
|
2822
2822
|
}
|
|
2823
|
+
{
|
|
2824
|
+
hostRef.$onInstanceResolve$(elm);
|
|
2825
|
+
}
|
|
2823
2826
|
{
|
|
2824
2827
|
if (hostRef.$onRenderResolve$) {
|
|
2825
2828
|
hostRef.$onRenderResolve$();
|
|
@@ -5498,7 +5501,7 @@ class ChAccordion {
|
|
|
5498
5501
|
this.chChange.emit(this.value);
|
|
5499
5502
|
};
|
|
5500
5503
|
render() {
|
|
5501
|
-
return (hAsync(Host, { key: '
|
|
5504
|
+
return (hAsync(Host, { key: 'da264a6faa4d8da510d2964bef410d7c733bc507' }, this.items.map(item => {
|
|
5502
5505
|
const open = this.value === item.value;
|
|
5503
5506
|
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}` }))));
|
|
5504
5507
|
})));
|
|
@@ -5661,7 +5664,7 @@ class ChAlert {
|
|
|
5661
5664
|
render() {
|
|
5662
5665
|
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
5663
5666
|
const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
|
|
5664
|
-
return (hAsync(Host, { key: '
|
|
5667
|
+
return (hAsync(Host, { key: 'c7fb041416b2958fcda758a3297a0f9546456ef3' }, hAsync("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (hAsync("svg", { key: '1a89cc6797bd6b425920f61f545f407326422e93', 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: 'd30f1b3897d3ce681789507aa2677b29a83e8346', class: "alert-content" }, hAsync("slot", { key: 'a4bc52ace056a573b21ecec083d017b3c5c22245' })), this.dismissLabel && (hAsync("button", { key: '571947bd96a9c2f22b7af7989abd406dff860256', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, hAsync("span", { key: 'e8d282730aa25aad78f05ce118cb65fce9ea85c5', "aria-hidden": "true" }, "\u00D7"))))));
|
|
5665
5668
|
}
|
|
5666
5669
|
static get style() { return chAlertCss(); }
|
|
5667
5670
|
static get cmpMeta() { return {
|
|
@@ -5703,7 +5706,7 @@ class ChBadge {
|
|
|
5703
5706
|
*/
|
|
5704
5707
|
statusCue = true;
|
|
5705
5708
|
render() {
|
|
5706
|
-
return (hAsync(Host, { key: '
|
|
5709
|
+
return (hAsync(Host, { key: '712c653d4047845d6afce4655271f2c80e3fe6a8' }, hAsync("span", { key: 'dd24bf1f555b229bee277b77c175b485f4a10680', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && hAsync("span", { key: 'cef4173e40dac2798c2a26381763bb470cf0bacc', class: "badge-dot", "aria-hidden": "true" }), hAsync("slot", { key: '6e8c09dd9260d80c9fda09b402dfc3b1cef53907' }))));
|
|
5707
5710
|
}
|
|
5708
5711
|
static get style() { return chBadgeCss(); }
|
|
5709
5712
|
static get cmpMeta() { return {
|
|
@@ -5834,7 +5837,7 @@ class ChCard {
|
|
|
5834
5837
|
registerInstance(this, hostRef);
|
|
5835
5838
|
}
|
|
5836
5839
|
render() {
|
|
5837
|
-
return (hAsync(Host, { key: '
|
|
5840
|
+
return (hAsync(Host, { key: 'f237dce6afd9f9c88f52784de63073d3b4dc31fd' }, hAsync("div", { key: '2256360ad3b736aaf595cb0440903eb90ffc9968', class: "card" }, hAsync("slot", { key: '5ce63027b9e1abd925b4a1d7261752a4b579b336' }))));
|
|
5838
5841
|
}
|
|
5839
5842
|
static get style() { return chCardCss(); }
|
|
5840
5843
|
static get cmpMeta() { return {
|
|
@@ -5975,7 +5978,7 @@ class ChCheckbox {
|
|
|
5975
5978
|
return undefined;
|
|
5976
5979
|
}
|
|
5977
5980
|
render() {
|
|
5978
|
-
return (hAsync(Host, { key: '
|
|
5981
|
+
return (hAsync(Host, { key: '3e0f2f162d1ec1a4715b44a37211a30c63f830b2' }, hAsync("label", { key: '8042cb81ab53a9451a8757dfa63ef8cea8f41954', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("input", { key: '0d55f22c4625f48c8bf2eee15a7710cfb80c4328', 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: '146e3b4fa88237da4af8f8b0a408909b4d11555e', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'd82032ae57e8e818a91fa04cfd5e505dea47c22d', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '9f418c648d4929086a77ca868a7c13cdccb328cb', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5979
5982
|
}
|
|
5980
5983
|
static get formAssociated() { return true; }
|
|
5981
5984
|
static get watchers() { return {
|
|
@@ -6046,13 +6049,13 @@ class ChCluster {
|
|
|
6046
6049
|
return GAPS$2.has(this.gap) ? this.gap : 'md';
|
|
6047
6050
|
}
|
|
6048
6051
|
render() {
|
|
6049
|
-
return (hAsync(Host, { key: '
|
|
6052
|
+
return (hAsync(Host, { key: 'd1852bc490835eb559f31039e14b87d59b151b11', class: {
|
|
6050
6053
|
'cluster': true,
|
|
6051
6054
|
[`cluster--gap-${this.gapStep}`]: true,
|
|
6052
6055
|
[`cluster--align-${this.align}`]: true,
|
|
6053
6056
|
[`cluster--justify-${this.justify}`]: true,
|
|
6054
6057
|
'cluster--nowrap': !this.wrap,
|
|
6055
|
-
} }, hAsync("slot", { key: '
|
|
6058
|
+
} }, hAsync("slot", { key: '7dc3c83e40d8e0d5dd18052bb9c36898a443ce23' })));
|
|
6056
6059
|
}
|
|
6057
6060
|
static get style() { return chClusterCss(); }
|
|
6058
6061
|
static get cmpMeta() { return {
|
|
@@ -6070,6 +6073,173 @@ class ChCluster {
|
|
|
6070
6073
|
}; }
|
|
6071
6074
|
}
|
|
6072
6075
|
|
|
6076
|
+
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)}`;
|
|
6077
|
+
|
|
6078
|
+
/**
|
|
6079
|
+
* A confirmation dialog over `ch-modal`.
|
|
6080
|
+
*
|
|
6081
|
+
* Declarative only: the consumer opens it with `open` and handles the outcome.
|
|
6082
|
+
* The imperative `confirm()` helper is a separate concern and a separate issue,
|
|
6083
|
+
* because a promise-returning helper has to own mounting, focus and unhandled
|
|
6084
|
+
* rejection, none of which a component should decide for its consumer.
|
|
6085
|
+
*
|
|
6086
|
+
* The guarantees this adds over a plain `ch-modal` are the ones that make a
|
|
6087
|
+
* confirmation safe:
|
|
6088
|
+
*
|
|
6089
|
+
* - exactly one outcome per interaction — a double click on Confirm emits once;
|
|
6090
|
+
* - every dismissal path (Cancel, Escape, backdrop, confirm) is reported, so a
|
|
6091
|
+
* consumer awaiting an answer cannot hang;
|
|
6092
|
+
* - focus lands on Cancel for a destructive action, so the absent-minded Enter
|
|
6093
|
+
* does not destroy anything;
|
|
6094
|
+
* - `pending` is not a cancellation: a slow request keeps the dialog open.
|
|
6095
|
+
*/
|
|
6096
|
+
class ChConfirmDialog {
|
|
6097
|
+
constructor(hostRef) {
|
|
6098
|
+
registerInstance(this, hostRef);
|
|
6099
|
+
this.chConfirm = createEvent(this, "chConfirm");
|
|
6100
|
+
this.chCancel = createEvent(this, "chCancel");
|
|
6101
|
+
}
|
|
6102
|
+
get el() { return getElement(this); }
|
|
6103
|
+
/** Whether the dialog is open. Kept in sync when it is dismissed. */
|
|
6104
|
+
open = false;
|
|
6105
|
+
/**
|
|
6106
|
+
* The question, set as the dialog's accessible name. Required: a dialog
|
|
6107
|
+
* without a name is announced as an unlabelled group.
|
|
6108
|
+
*/
|
|
6109
|
+
heading;
|
|
6110
|
+
/** Supporting text, rendered under the heading. */
|
|
6111
|
+
message;
|
|
6112
|
+
/** Label of the confirming action. */
|
|
6113
|
+
confirmLabel = 'Confirm';
|
|
6114
|
+
/** Label of the dismissing action. */
|
|
6115
|
+
cancelLabel = 'Cancel';
|
|
6116
|
+
/**
|
|
6117
|
+
* `danger` styles the confirm action as destructive and moves the initial
|
|
6118
|
+
* focus to Cancel, so the safe choice is the default one.
|
|
6119
|
+
*/
|
|
6120
|
+
tone = 'default';
|
|
6121
|
+
/** Whether the confirm action is in flight; both buttons are then disabled. */
|
|
6122
|
+
pending = false;
|
|
6123
|
+
/**
|
|
6124
|
+
* Whether Escape and the backdrop dismiss the dialog. When false, the only
|
|
6125
|
+
* way out is one of the two buttons — use it only for a decision that must
|
|
6126
|
+
* be answered rather than abandoned.
|
|
6127
|
+
*/
|
|
6128
|
+
dismissible = true;
|
|
6129
|
+
/** Emitted once when the user confirms. */
|
|
6130
|
+
chConfirm;
|
|
6131
|
+
/** Emitted once when the dialog is dismissed without confirming. */
|
|
6132
|
+
chCancel;
|
|
6133
|
+
/** `true` once an outcome has been emitted for the current opening. */
|
|
6134
|
+
settled = false;
|
|
6135
|
+
cancelButton;
|
|
6136
|
+
confirmButton;
|
|
6137
|
+
componentDidLoad() {
|
|
6138
|
+
if (this.open) {
|
|
6139
|
+
this.onOpening();
|
|
6140
|
+
}
|
|
6141
|
+
}
|
|
6142
|
+
handleOpenChange(open) {
|
|
6143
|
+
if (open) {
|
|
6144
|
+
this.onOpening();
|
|
6145
|
+
return;
|
|
6146
|
+
}
|
|
6147
|
+
this.settled = false;
|
|
6148
|
+
}
|
|
6149
|
+
onOpening() {
|
|
6150
|
+
this.settled = false;
|
|
6151
|
+
// Focus is moved once the dialog is actually shown; the modal handles
|
|
6152
|
+
// moving focus into itself, and this refines where it lands.
|
|
6153
|
+
requestAnimationFrame(() => {
|
|
6154
|
+
const target = this.tone === 'danger' ? this.cancelButton : this.confirmButton;
|
|
6155
|
+
target?.focus();
|
|
6156
|
+
});
|
|
6157
|
+
}
|
|
6158
|
+
settle(outcome) {
|
|
6159
|
+
if (this.settled) {
|
|
6160
|
+
return;
|
|
6161
|
+
}
|
|
6162
|
+
this.settled = true;
|
|
6163
|
+
if (outcome === 'confirm') {
|
|
6164
|
+
this.chConfirm.emit();
|
|
6165
|
+
return;
|
|
6166
|
+
}
|
|
6167
|
+
this.chCancel.emit();
|
|
6168
|
+
}
|
|
6169
|
+
handleConfirm = () => {
|
|
6170
|
+
if (this.pending) {
|
|
6171
|
+
return;
|
|
6172
|
+
}
|
|
6173
|
+
this.settle('confirm');
|
|
6174
|
+
};
|
|
6175
|
+
handleCancel = () => {
|
|
6176
|
+
if (this.pending) {
|
|
6177
|
+
return;
|
|
6178
|
+
}
|
|
6179
|
+
this.open = false;
|
|
6180
|
+
this.settle('cancel');
|
|
6181
|
+
};
|
|
6182
|
+
/**
|
|
6183
|
+
* `ch-modal` reports every close that was not requested by the consumer —
|
|
6184
|
+
* Escape and the backdrop. A close while `pending` is the consumer's own
|
|
6185
|
+
* doing and is not a cancellation.
|
|
6186
|
+
*/
|
|
6187
|
+
handleModalClose = () => {
|
|
6188
|
+
this.open = false;
|
|
6189
|
+
if (this.pending) {
|
|
6190
|
+
return;
|
|
6191
|
+
}
|
|
6192
|
+
this.settle('cancel');
|
|
6193
|
+
};
|
|
6194
|
+
/**
|
|
6195
|
+
* Escape is a platform close request on the inner `<dialog>`, so a
|
|
6196
|
+
* non-dismissible dialog cancels it before it takes effect. The backdrop is
|
|
6197
|
+
* handled by `ch-modal` and is suppressed the same way.
|
|
6198
|
+
*/
|
|
6199
|
+
handleKeyDown = (event) => {
|
|
6200
|
+
if (this.dismissible || event.key !== 'Escape') {
|
|
6201
|
+
return;
|
|
6202
|
+
}
|
|
6203
|
+
event.preventDefault();
|
|
6204
|
+
event.stopPropagation();
|
|
6205
|
+
};
|
|
6206
|
+
/**
|
|
6207
|
+
* Focus the safe action. Exposed so a consumer can return focus deliberately
|
|
6208
|
+
* after a request settles.
|
|
6209
|
+
*/
|
|
6210
|
+
async focusCancel() {
|
|
6211
|
+
this.cancelButton?.focus();
|
|
6212
|
+
}
|
|
6213
|
+
render() {
|
|
6214
|
+
return (hAsync(Host, { key: '7aa8fd72a281369f47ce7f1eb99c52ab60ba4ee0', onKeyDown: this.handleKeyDown }, hAsync("ch-modal", { key: '019663f042f5c2ce3dd1f58433faee170c01e8e6', open: this.open, label: this.heading, size: "sm", onChClose: this.handleModalClose, onChOpen: () => this.onOpening() }, hAsync("h2", { key: '9d97f437e535a3a9feb181e9807dc9c532efd872', slot: "heading", class: "confirm__heading" }, this.heading), this.message && hAsync("p", { key: 'a0d64b2b915624473162557972eabdf80b445d58', class: "confirm__message" }, this.message), hAsync("div", { key: '0b44308d6eb7a4aea2c1166f8a7f6f19c41cdbb7', class: "confirm__actions" }, hAsync("button", { key: '7908d0db96e7c59c7b4673220aa62c2170b29d54', 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: '43657105b474b303160da19e1fa5fda47f63207c', 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)))));
|
|
6215
|
+
}
|
|
6216
|
+
static get watchers() { return {
|
|
6217
|
+
"open": [{
|
|
6218
|
+
"handleOpenChange": 0
|
|
6219
|
+
}]
|
|
6220
|
+
}; }
|
|
6221
|
+
static get style() { return chConfirmDialogCss(); }
|
|
6222
|
+
static get cmpMeta() { return {
|
|
6223
|
+
"$flags$": 521,
|
|
6224
|
+
"$tagName$": "ch-confirm-dialog",
|
|
6225
|
+
"$members$": {
|
|
6226
|
+
"open": [1028],
|
|
6227
|
+
"heading": [1],
|
|
6228
|
+
"message": [1],
|
|
6229
|
+
"confirmLabel": [1, "confirm-label"],
|
|
6230
|
+
"cancelLabel": [1, "cancel-label"],
|
|
6231
|
+
"tone": [1],
|
|
6232
|
+
"pending": [4],
|
|
6233
|
+
"dismissible": [4],
|
|
6234
|
+
"settled": [32],
|
|
6235
|
+
"focusCancel": [64]
|
|
6236
|
+
},
|
|
6237
|
+
"$listeners$": undefined,
|
|
6238
|
+
"$lazyBundleId$": "-",
|
|
6239
|
+
"$attrsToReflect$": []
|
|
6240
|
+
}; }
|
|
6241
|
+
}
|
|
6242
|
+
|
|
6073
6243
|
const chDescriptionListCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary)}:host([hidden]){display:none}.list{margin:0;display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:var(--spacing-sm) var(--spacing-2xl)}.list--columns-2,.list--columns-3{grid-template-columns:repeat(2, minmax(0, 1fr))}.list--columns-3{grid-template-columns:repeat(3, minmax(0, 1fr))}@media (max-width: 48rem){.list--columns-2,.list--columns-3{grid-template-columns:minmax(0, 1fr)}}::slotted(div){display:grid;grid-template-columns:fit-content(min(12rem, 40%)) minmax(0, 1fr);gap:var(--spacing-sm);align-items:baseline}::slotted(dt){font-family:var(--typography-heading);font-weight:var(--typography-weight-semibold);font-size:var(--typography-size-sm);color:var(--color-text-primary)}::slotted(dd){margin:0;font-size:var(--typography-size-sm);min-width:0;overflow-wrap:break-word}`;
|
|
6074
6244
|
|
|
6075
6245
|
const COLUMNS = new Set(['1', '2', '3']);
|
|
@@ -6106,7 +6276,7 @@ class ChDescriptionList {
|
|
|
6106
6276
|
return COLUMNS.has(this.columns) ? this.columns : '1';
|
|
6107
6277
|
}
|
|
6108
6278
|
render() {
|
|
6109
|
-
return (hAsync(Host, { key: '
|
|
6279
|
+
return (hAsync(Host, { key: '590fc24614ba9240d7708cff6cb6027eca5904bf' }, hAsync("dl", { key: '868ee275cd6c792bff933c2429fe23985b9c30e3', class: `list list--columns-${this.columnCount}` }, hAsync("slot", { key: '7433fcda6f0e6b2c738c790839169669c31bd266' }))));
|
|
6110
6280
|
}
|
|
6111
6281
|
static get style() { return chDescriptionListCss(); }
|
|
6112
6282
|
static get cmpMeta() { return {
|
|
@@ -6132,7 +6302,7 @@ class ChDivider {
|
|
|
6132
6302
|
*/
|
|
6133
6303
|
orientation = 'horizontal';
|
|
6134
6304
|
render() {
|
|
6135
|
-
return (hAsync(Host, { key: '
|
|
6305
|
+
return (hAsync(Host, { key: '068a29854d312d17f5f5b768975996e1b8db9317', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: 'c2dca357f717b822caa028fae4c1d5e4709ae75c', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
6136
6306
|
}
|
|
6137
6307
|
static get style() { return chDividerCss(); }
|
|
6138
6308
|
static get cmpMeta() { return {
|
|
@@ -6337,7 +6507,7 @@ class ChDrawer {
|
|
|
6337
6507
|
this.chClose.emit();
|
|
6338
6508
|
};
|
|
6339
6509
|
render() {
|
|
6340
|
-
return (hAsync(Host, { key: '
|
|
6510
|
+
return (hAsync(Host, { key: 'f20d997fbaec9bcb5a4435c53bc893513e07bf05' }, hAsync("dialog", { key: '216248a651d9fbd61c659da772cb2c1cd9cdb029', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '2d0f9c5a66ae0f609185479722236bfa35fc15ff', class: "drawer-head" }, hAsync("slot", { key: '3e3fc15109e4e463cfcff4a96cffd943a0c48f3d', name: "header" }), this.closeLabel && (hAsync("button", { key: 'a6e3b3d7ab9955cb9e84405c3313c85389bb1b5a', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: '2dcb7632e635f763c0973cdb4fb7fe8dfa09fd4b', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: '0a73837b9dcae4d31d7abb4cec14d93a9bbdec4a', class: "drawer-body" }, hAsync("slot", { key: 'f9786b2da1062eeb7d7019b849508eb3a5fc83b7' })), hAsync("slot", { key: '85e518742d2c5435ce50c52100d24576caae9a8b', name: "footer" }))));
|
|
6341
6511
|
}
|
|
6342
6512
|
static get watchers() { return {
|
|
6343
6513
|
"open": [{
|
|
@@ -6449,7 +6619,7 @@ class ChEmoji {
|
|
|
6449
6619
|
this.loaded = true;
|
|
6450
6620
|
};
|
|
6451
6621
|
render() {
|
|
6452
|
-
return (hAsync(Host, { key: '
|
|
6622
|
+
return (hAsync(Host, { key: 'fd0f1f45a986a2668adb3cda893e4f6666f78eeb' }, hAsync("img", { key: '207a6d2d6111fd13d724e4f3ce5dcc1d299f1228', class: {
|
|
6453
6623
|
'emoji': true,
|
|
6454
6624
|
[`emoji--${this.size}`]: true,
|
|
6455
6625
|
'emoji--hidden': !this.loaded,
|
|
@@ -6505,7 +6675,7 @@ class ChEmptyState {
|
|
|
6505
6675
|
*/
|
|
6506
6676
|
size = 'md';
|
|
6507
6677
|
render() {
|
|
6508
|
-
return (hAsync(Host, { key: '
|
|
6678
|
+
return (hAsync(Host, { key: 'ad3644cfbad791e9684b20b9776c8c68d15036e2', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, hAsync("div", { key: '88479d9470be1db6d4d9968ad656297f06a2526c', class: "empty-state__inner" }, hAsync("div", { key: '07b46c4f6e086921367b466df1b40eb3f49aeeac', class: "empty-state__icon", "aria-hidden": "true" }, hAsync("slot", { key: 'f2b769787d5b2aaa04493157f39e20c164df2322', name: "icon" })), hAsync("h3", { key: '83131b17b5dac383141f2997ac2dfdde2b620d16', class: "empty-state__title" }, this.title), this.description && hAsync("p", { key: 'ca76152650118f55229ebac53c2963cb84982e77', class: "empty-state__description" }, this.description), hAsync("div", { key: '552f1319198b0c182cace7956e84ddc9e837043e', class: "empty-state__actions" }, hAsync("slot", { key: 'b99db3bfac784acf8389f100362371c3a44f4ace' })))));
|
|
6509
6679
|
}
|
|
6510
6680
|
static get style() { return chEmptyStateCss(); }
|
|
6511
6681
|
static get cmpMeta() { return {
|
|
@@ -6576,7 +6746,7 @@ class ChGrid {
|
|
|
6576
6746
|
this.el.style.setProperty('--ch-grid-columns', template);
|
|
6577
6747
|
}
|
|
6578
6748
|
render() {
|
|
6579
|
-
return (hAsync(Host, { key: '
|
|
6749
|
+
return (hAsync(Host, { key: '7e22752629d6e8dae0dd6ae05eb12aba96c97fc2', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, hAsync("slot", { key: 'dc7286fa1b34610aa802afc7298422147d936cbd' })));
|
|
6580
6750
|
}
|
|
6581
6751
|
static get style() { return chGridCss(); }
|
|
6582
6752
|
static get cmpMeta() { return {
|
|
@@ -6626,7 +6796,7 @@ class ChIcon {
|
|
|
6626
6796
|
render() {
|
|
6627
6797
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
6628
6798
|
const decorative = !this.label;
|
|
6629
|
-
return (hAsync(Host, { key: '
|
|
6799
|
+
return (hAsync(Host, { key: '4d1ec8879f2715fa6973c1e06de4109f68f7b439' }, hAsync("svg", { key: 'e2a72cd9a83a9672e04484f042801041f80a2b81', 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)))));
|
|
6630
6800
|
}
|
|
6631
6801
|
static get style() { return chIconCss(); }
|
|
6632
6802
|
static get cmpMeta() { return {
|
|
@@ -6689,7 +6859,7 @@ class ChIconButton {
|
|
|
6689
6859
|
};
|
|
6690
6860
|
render() {
|
|
6691
6861
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
6692
|
-
return (hAsync(Host, { key: '
|
|
6862
|
+
return (hAsync(Host, { key: 'eb744fa706b32c5ffca8b174f5cfc5e5cb546879' }, hAsync("button", { key: 'a0923d38dc46adce13ae3d8e12426a419fe37c4a', 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: 'db67ffae9402ea67849f8b4aa487bf3fb152da63', 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))))));
|
|
6693
6863
|
}
|
|
6694
6864
|
static get style() { return chIconButtonCss(); }
|
|
6695
6865
|
static get cmpMeta() { return {
|
|
@@ -6830,7 +7000,7 @@ class ChInput {
|
|
|
6830
7000
|
return undefined;
|
|
6831
7001
|
}
|
|
6832
7002
|
render() {
|
|
6833
|
-
return (hAsync(Host, { key: '
|
|
7003
|
+
return (hAsync(Host, { key: '2a892c87f8c2d7840c89b546e53b1cd4274de6d1' }, this.label && (hAsync("label", { key: '7c10ad2de5992e8e96accb3752bb62a7ecc5a562', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: '746c04af3a66f8bd3789f037d77560f30b79ae67', 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: '5c1985773e1ec0de670e5fa0d94b33cea81b9e63', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '48a2823957aba104c6a6599dbd409824c2f60f79', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
6834
7004
|
}
|
|
6835
7005
|
static get formAssociated() { return true; }
|
|
6836
7006
|
static get watchers() { return {
|
|
@@ -7079,7 +7249,7 @@ class ChModal {
|
|
|
7079
7249
|
this.chClose.emit();
|
|
7080
7250
|
};
|
|
7081
7251
|
render() {
|
|
7082
|
-
return (hAsync(Host, { key: '
|
|
7252
|
+
return (hAsync(Host, { key: 'e9b0fe7e84f3de036e01f836bb431849b4486ab3' }, hAsync("dialog", { key: '0c5017b5e773534c11a74504a0773ae555b32322', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: 'ae8988208ac3856792eff026e8ebd1f9e696b175', class: "modal-head" }, hAsync("slot", { key: 'f7f231f4a5b8541ce2da8ea000b5ce95d58484b3', name: "heading" }), this.closeLabel && (hAsync("button", { key: 'dbf0962e6244cff373887fa1e1501aaae6e15250', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: 'e7e1493a5eca9afb0f9fef279efdd5692157755a', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: '95b719095bac72ce64e6201ef4465c1173dfb16f', class: "modal-body" }, hAsync("slot", { key: 'bad31888a31219e6dffd294ca18a749e9916c0f2' })))));
|
|
7083
7253
|
}
|
|
7084
7254
|
static get watchers() { return {
|
|
7085
7255
|
"open": [{
|
|
@@ -7320,10 +7490,10 @@ class ChNumberInput {
|
|
|
7320
7490
|
}
|
|
7321
7491
|
render() {
|
|
7322
7492
|
const showError = this.isInvalid && this.errorMessage;
|
|
7323
|
-
return (hAsync(Host, { key: '
|
|
7493
|
+
return (hAsync(Host, { key: 'cf109ceb6d832f6c9dcedd666beee69fb4e434f6' }, this.label && (hAsync("label", { key: 'cc6bb3e172738febaf91777499bd8f9c9e6c9701', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: '44f4199e9d18f4dd3600183f2a4ba4e451013bc6', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid },
|
|
7324
7494
|
// `text` with `inputmode`, not `type="number"`: a number input drops
|
|
7325
7495
|
// partial values and cannot show grouped digits.
|
|
7326
|
-
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: '
|
|
7496
|
+
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: '30c755eee77a4fce6c04350e61ffa084a33a085d', class: "hint", id: this.hintId }, this.hint)), showError && (hAsync("p", { key: '3bd96e7dae46ba2a16b23db0d7d1d528590468c9', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7327
7497
|
}
|
|
7328
7498
|
static get formAssociated() { return true; }
|
|
7329
7499
|
static get watchers() { return {
|
|
@@ -7371,6 +7541,227 @@ class ChNumberInput {
|
|
|
7371
7541
|
}; }
|
|
7372
7542
|
}
|
|
7373
7543
|
|
|
7544
|
+
const chOtpInputCss = () => `:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus,:host(:user-invalid) .input:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}.input{font-family:var(--typography-heading);font-size:var(--typography-size-lg);letter-spacing:0.4em;text-align:center;font-variant-numeric:tabular-nums}`;
|
|
7545
|
+
|
|
7546
|
+
let otpIds = 0;
|
|
7547
|
+
/**
|
|
7548
|
+
* One-time-code input.
|
|
7549
|
+
*
|
|
7550
|
+
* One native `<input>` holds the whole code, not a box per digit. Per-digit
|
|
7551
|
+
* inputs break paste, break SMS autofill (the platform fills a single field
|
|
7552
|
+
* carrying `autocomplete="one-time-code"`), and give a keyboard user several
|
|
7553
|
+
* tab stops for what is one value. The segmented look is drawn by the shadow
|
|
7554
|
+
* CSS over the single field.
|
|
7555
|
+
*
|
|
7556
|
+
* It never submits on completion: a code entered is not a decision to send it,
|
|
7557
|
+
* so the consumer listens to `chComplete` and submits when it decides to.
|
|
7558
|
+
*/
|
|
7559
|
+
class ChOtpInput {
|
|
7560
|
+
constructor(hostRef) {
|
|
7561
|
+
registerInstance(this, hostRef);
|
|
7562
|
+
this.chInput = createEvent(this, "chInput");
|
|
7563
|
+
this.chComplete = createEvent(this, "chComplete");
|
|
7564
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
7565
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
7566
|
+
}
|
|
7567
|
+
else {
|
|
7568
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
7569
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
7570
|
+
}
|
|
7571
|
+
}
|
|
7572
|
+
inputId = `ch-otp-input-${++otpIds}`;
|
|
7573
|
+
hintId = `${this.inputId}-hint`;
|
|
7574
|
+
errorId = `${this.inputId}-error`;
|
|
7575
|
+
initialValue = '';
|
|
7576
|
+
internals;
|
|
7577
|
+
formDisabled = false;
|
|
7578
|
+
get host() { return getElement(this); }
|
|
7579
|
+
/** Visible label, associated with the input via `for`/`id`. */
|
|
7580
|
+
label;
|
|
7581
|
+
/** The code without separators. Filtered to alphanumerics on every change. */
|
|
7582
|
+
value = '';
|
|
7583
|
+
/** How many characters make a complete code. */
|
|
7584
|
+
length = 6;
|
|
7585
|
+
/**
|
|
7586
|
+
* `numeric` restricts input to digits, which is the shape of nearly every
|
|
7587
|
+
* one-time code and lets a phone open the number pad.
|
|
7588
|
+
*/
|
|
7589
|
+
inputMode = 'numeric';
|
|
7590
|
+
/** Whether the codes are masked, as for a short-lived secret. */
|
|
7591
|
+
secret = false;
|
|
7592
|
+
/** Placeholder shown when empty. */
|
|
7593
|
+
placeholder;
|
|
7594
|
+
/** Name submitted with the form. */
|
|
7595
|
+
name;
|
|
7596
|
+
/** Whether the field is disabled. */
|
|
7597
|
+
disabled = false;
|
|
7598
|
+
/** Whether a complete code is required for the field to be valid. */
|
|
7599
|
+
required = false;
|
|
7600
|
+
/** Helper text, replaced by `errorMessage` when invalid. */
|
|
7601
|
+
hint;
|
|
7602
|
+
/** Custom error message; wins over the built-in incomplete-code message. */
|
|
7603
|
+
errorMessage;
|
|
7604
|
+
/** Whether the field is marked invalid by the consumer. */
|
|
7605
|
+
invalid = false;
|
|
7606
|
+
/** Emitted on every change with the current (possibly partial) code. */
|
|
7607
|
+
chInput;
|
|
7608
|
+
/**
|
|
7609
|
+
* Emitted once, when the code becomes complete and valid after not being so.
|
|
7610
|
+
* Never fires again while it stays complete, so holding a code cannot
|
|
7611
|
+
* resubmit it.
|
|
7612
|
+
*/
|
|
7613
|
+
chComplete;
|
|
7614
|
+
wasComplete = false;
|
|
7615
|
+
componentDidLoad() {
|
|
7616
|
+
this.initialValue = this.value;
|
|
7617
|
+
this.wasComplete = this.isComplete;
|
|
7618
|
+
this.syncForm();
|
|
7619
|
+
this.host.addEventListener('focusout', this.markTouched);
|
|
7620
|
+
this.host.addEventListener('invalid', this.markTouched);
|
|
7621
|
+
}
|
|
7622
|
+
/**
|
|
7623
|
+
* Leaving the field is what turns an unfinished code into an error. The
|
|
7624
|
+
* validity has to be recomputed here: `syncForm` reads the attribute, and
|
|
7625
|
+
* setting it alone would not update `ElementInternals`.
|
|
7626
|
+
*/
|
|
7627
|
+
markTouched = () => {
|
|
7628
|
+
this.host.setAttribute('data-touched', '');
|
|
7629
|
+
this.syncForm();
|
|
7630
|
+
};
|
|
7631
|
+
/** Whether the value is a complete, correctly shaped code. */
|
|
7632
|
+
get isComplete() {
|
|
7633
|
+
if (this.value.length !== this.length) {
|
|
7634
|
+
return false;
|
|
7635
|
+
}
|
|
7636
|
+
return this.inputMode === 'numeric' ? /^\d+$/u.test(this.value) : /^[a-z0-9]+$/iu.test(this.value);
|
|
7637
|
+
}
|
|
7638
|
+
/** The message for an incomplete code, which is what makes it invalid. */
|
|
7639
|
+
get incompleteMessage() {
|
|
7640
|
+
if (this.errorMessage || this.invalid || this.value === '') {
|
|
7641
|
+
return undefined;
|
|
7642
|
+
}
|
|
7643
|
+
return this.isComplete ? undefined : `Enter the ${this.length}-character code.`;
|
|
7644
|
+
}
|
|
7645
|
+
syncForm() {
|
|
7646
|
+
const internals = this.internals;
|
|
7647
|
+
if (typeof internals?.setFormValue !== 'function') {
|
|
7648
|
+
return;
|
|
7649
|
+
}
|
|
7650
|
+
internals.setFormValue(this.value);
|
|
7651
|
+
const empty = this.value === '';
|
|
7652
|
+
const base = resolveValidity({ required: this.required, empty, invalid: this.invalid, errorMessage: this.errorMessage });
|
|
7653
|
+
// A partially typed code is what the user is doing, not an error, unless
|
|
7654
|
+
// they have already left the field once.
|
|
7655
|
+
const touched = this.host.hasAttribute('data-touched');
|
|
7656
|
+
const incomplete = this.incompleteMessage;
|
|
7657
|
+
if (incomplete && touched && !empty) {
|
|
7658
|
+
internals.setValidity({ ...base.flags, customError: true }, incomplete);
|
|
7659
|
+
return;
|
|
7660
|
+
}
|
|
7661
|
+
internals.setValidity(base.flags, base.message);
|
|
7662
|
+
}
|
|
7663
|
+
formResetCallback() {
|
|
7664
|
+
this.value = this.initialValue;
|
|
7665
|
+
this.wasComplete = this.isComplete;
|
|
7666
|
+
this.syncForm();
|
|
7667
|
+
const input = this.host.shadowRoot?.querySelector('input');
|
|
7668
|
+
if (input) {
|
|
7669
|
+
input.value = this.value;
|
|
7670
|
+
}
|
|
7671
|
+
}
|
|
7672
|
+
formDisabledCallback(isDisabled) {
|
|
7673
|
+
this.formDisabled = isDisabled;
|
|
7674
|
+
}
|
|
7675
|
+
/** Strips everything the input mode does not allow, then caps the length. */
|
|
7676
|
+
sanitize(raw) {
|
|
7677
|
+
const allowed = this.inputMode === 'numeric' ? raw.replace(/\D/gu, '') : raw.replace(/[^a-z0-9]/giu, '');
|
|
7678
|
+
return allowed.slice(0, Math.max(1, this.length));
|
|
7679
|
+
}
|
|
7680
|
+
handleInput = (ev) => {
|
|
7681
|
+
const input = ev.target;
|
|
7682
|
+
const clean = this.sanitize(input.value);
|
|
7683
|
+
// The element holds the raw text, so a rejected character has to be
|
|
7684
|
+
// written back or it stays visible while the value says otherwise.
|
|
7685
|
+
if (input.value !== clean) {
|
|
7686
|
+
input.value = clean;
|
|
7687
|
+
}
|
|
7688
|
+
this.value = clean;
|
|
7689
|
+
this.chInput.emit(clean);
|
|
7690
|
+
const complete = this.isComplete;
|
|
7691
|
+
if (complete && !this.wasComplete) {
|
|
7692
|
+
this.chComplete.emit(clean);
|
|
7693
|
+
}
|
|
7694
|
+
this.wasComplete = complete;
|
|
7695
|
+
this.syncForm();
|
|
7696
|
+
};
|
|
7697
|
+
handleBlur = () => {
|
|
7698
|
+
this.syncForm();
|
|
7699
|
+
};
|
|
7700
|
+
get isInvalid() {
|
|
7701
|
+
return this.invalid || (this.host.hasAttribute('data-touched') && this.incompleteMessage !== undefined);
|
|
7702
|
+
}
|
|
7703
|
+
get describedBy() {
|
|
7704
|
+
if (this.isInvalid && this.errorMessage) {
|
|
7705
|
+
return this.errorId;
|
|
7706
|
+
}
|
|
7707
|
+
if (this.hint) {
|
|
7708
|
+
return this.hintId;
|
|
7709
|
+
}
|
|
7710
|
+
return undefined;
|
|
7711
|
+
}
|
|
7712
|
+
render() {
|
|
7713
|
+
const showError = this.isInvalid && this.errorMessage;
|
|
7714
|
+
return (hAsync(Host, { key: 'addfb3ad7a6a5fabefe89dd5cde1d4e5b79d7c7c' }, this.label && (hAsync("label", { key: 'e2ad53ac281a2334712d04ff6e09070616a38e7f', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: '4ea2123ba313a2626105346db50af219f5542de3', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.isInvalid }, type: this.secret ? 'password' : 'text', inputMode: this.inputMode,
|
|
7715
|
+
// The platform fills a single field carrying this attribute; per-digit
|
|
7716
|
+
// inputs never receive the SMS code.
|
|
7717
|
+
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: '6ecfc85e27b82b2afe94f66959e3f5cb99708189', class: "hint", id: this.hintId }, this.hint)), showError && (hAsync("p", { key: '9b429bcea9bfb40c9583778dcdc4e8f64a84b552', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7718
|
+
}
|
|
7719
|
+
static get formAssociated() { return true; }
|
|
7720
|
+
static get watchers() { return {
|
|
7721
|
+
"value": [{
|
|
7722
|
+
"syncForm": 0
|
|
7723
|
+
}],
|
|
7724
|
+
"required": [{
|
|
7725
|
+
"syncForm": 0
|
|
7726
|
+
}],
|
|
7727
|
+
"invalid": [{
|
|
7728
|
+
"syncForm": 0
|
|
7729
|
+
}],
|
|
7730
|
+
"errorMessage": [{
|
|
7731
|
+
"syncForm": 0
|
|
7732
|
+
}],
|
|
7733
|
+
"length": [{
|
|
7734
|
+
"syncForm": 0
|
|
7735
|
+
}],
|
|
7736
|
+
"inputMode": [{
|
|
7737
|
+
"syncForm": 0
|
|
7738
|
+
}]
|
|
7739
|
+
}; }
|
|
7740
|
+
static get style() { return chOtpInputCss(); }
|
|
7741
|
+
static get cmpMeta() { return {
|
|
7742
|
+
"$flags$": 585,
|
|
7743
|
+
"$tagName$": "ch-otp-input",
|
|
7744
|
+
"$members$": {
|
|
7745
|
+
"label": [1],
|
|
7746
|
+
"value": [1025],
|
|
7747
|
+
"length": [2],
|
|
7748
|
+
"inputMode": [1, "input-mode"],
|
|
7749
|
+
"secret": [4],
|
|
7750
|
+
"placeholder": [1],
|
|
7751
|
+
"name": [513],
|
|
7752
|
+
"disabled": [516],
|
|
7753
|
+
"required": [516],
|
|
7754
|
+
"hint": [1],
|
|
7755
|
+
"errorMessage": [1, "error-message"],
|
|
7756
|
+
"invalid": [4],
|
|
7757
|
+
"formDisabled": [32]
|
|
7758
|
+
},
|
|
7759
|
+
"$listeners$": undefined,
|
|
7760
|
+
"$lazyBundleId$": "-",
|
|
7761
|
+
"$attrsToReflect$": [["name", "name"], ["disabled", "disabled"], ["required", "required"]]
|
|
7762
|
+
}; }
|
|
7763
|
+
}
|
|
7764
|
+
|
|
7374
7765
|
const chPageHeaderCss = () => `:host{display:block}.header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--spacing-2xl);padding-bottom:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.header-text{display:flex;flex-direction:column;gap:var(--spacing-xs);flex:1 1 20rem;min-width:0}.header-eyebrow{margin:0;color:var(--text-secondary);font-family:var(--font-heading);font-size:var(--typography-size-xs);letter-spacing:var(--typography-tracking-badge);text-transform:uppercase}.header-title{margin:0;color:var(--text);font-family:var(--font-heading);font-size:var(--typography-size-xl);font-weight:var(--typography-weight-bold);line-height:1.2;overflow-wrap:anywhere}.header-description{margin:0;color:var(--text-secondary);font-size:var(--typography-size-sm);line-height:1.5;overflow-wrap:anywhere}.header-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--spacing-md);max-width:100%}.header-actions:empty{display:none}.header--stacked .header-actions{flex-basis:100%}@media (max-width: 30rem){.header{flex-direction:column}.header-actions{width:100%}}@media (forced-colors: active){.header{border-bottom-color:CanvasText}}`;
|
|
7375
7766
|
|
|
7376
7767
|
/**
|
|
@@ -7414,7 +7805,7 @@ class ChPageHeader {
|
|
|
7414
7805
|
actionsStacked = false;
|
|
7415
7806
|
render() {
|
|
7416
7807
|
const Heading = this.headingLevel;
|
|
7417
|
-
return (hAsync(Host, { key: '
|
|
7808
|
+
return (hAsync(Host, { key: '1cafd07a2f349f4430ba34013c05e5183965fbbb' }, hAsync("div", { key: '177e37bd58f4284e2ec0e8777d81141eac9f00df', class: { 'header': true, 'header--stacked': this.actionsStacked } }, hAsync("div", { key: '343b3a0b688d7e4c120e3f4d937fa8780f832937', class: "header-text" }, this.eyebrow && hAsync("p", { key: '27f87c70c45c34abb331703dab225ec94d8365c3', class: "header-eyebrow" }, this.eyebrow), hAsync(Heading, { key: '57d7d9f930284597705e7369ab2ce6f401a08ace', class: "header-title" }, this.title), this.description && hAsync("p", { key: '5213e3d9df7c05f3acf8e4b93c57c84ddc9f665c', class: "header-description" }, this.description)), hAsync("div", { key: '605e9ca206d4af6dade53df096a621fae89f595a', class: "header-actions" }, hAsync("slot", { key: 'dacaf1353ca517d10819eaa94f158e3a148319be', name: "actions" })))));
|
|
7418
7809
|
}
|
|
7419
7810
|
static get style() { return chPageHeaderCss(); }
|
|
7420
7811
|
static get cmpMeta() { return {
|
|
@@ -7433,6 +7824,95 @@ class ChPageHeader {
|
|
|
7433
7824
|
}; }
|
|
7434
7825
|
}
|
|
7435
7826
|
|
|
7827
|
+
const chPaginationCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-primary)}:host([hidden]){display:none}.pager{display:flex;align-items:center;gap:var(--spacing-md)}.pager__button{display:inline-flex;align-items:center;justify-content:center;min-width:2rem;height:2rem;padding:0 var(--spacing-sm);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-size:var(--typography-size-md);line-height:1;cursor:pointer}.pager__button:hover:not(:disabled){border-color:var(--color-border-hover);background:var(--color-surface-hover)}.pager__button:focus-visible{outline:2px solid var(--color-accent-default);outline-offset:2px}.pager__button:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.pager__summary{margin:0;font-size:var(--typography-size-sm);color:var(--color-text-secondary);font-variant-numeric:tabular-nums}.pager--sm .pager__button{min-width:1.5rem;height:1.5rem}.pager--sm .pager__summary{font-size:var(--typography-size-xs)}`;
|
|
7828
|
+
|
|
7829
|
+
let paginationIds = 0;
|
|
7830
|
+
/**
|
|
7831
|
+
* Controlled pagination for a known total.
|
|
7832
|
+
*
|
|
7833
|
+
* It holds no page state: `page` and `pageSize` come from the consumer and
|
|
7834
|
+
* every action emits `chPageChange` with the page it wants. That matches
|
|
7835
|
+
* `ch-table`, so a consumer wiring the two together has one model to reason
|
|
7836
|
+
* about — the table shows the rows for `page`, the pagination asks for the
|
|
7837
|
+
* next one, and nothing moves until the consumer's data does.
|
|
7838
|
+
*
|
|
7839
|
+
* No numbered page list. A list of numbers is wrong more often than it is
|
|
7840
|
+
* right (it depends on how many pages fit, which depends on the font, the
|
|
7841
|
+
* locale and the container), and it is the part consumers most often need to
|
|
7842
|
+
* replace with their own. Prev/next plus a position summary covers the
|
|
7843
|
+
* default case; the summary is what tells a screen-reader user where they are.
|
|
7844
|
+
*/
|
|
7845
|
+
class ChPagination {
|
|
7846
|
+
constructor(hostRef) {
|
|
7847
|
+
registerInstance(this, hostRef);
|
|
7848
|
+
this.chPageChange = createEvent(this, "chPageChange");
|
|
7849
|
+
}
|
|
7850
|
+
labelId = `ch-pagination-${++paginationIds}`;
|
|
7851
|
+
/** The current page, 1-based. Controlled by the consumer. */
|
|
7852
|
+
page = 1;
|
|
7853
|
+
/** How many rows a page holds. Controlled by the consumer. */
|
|
7854
|
+
pageSize = 10;
|
|
7855
|
+
/** How many rows exist in total. Zero renders a disabled, empty pager. */
|
|
7856
|
+
total = 0;
|
|
7857
|
+
/** Accessible name for the navigation landmark. */
|
|
7858
|
+
label = 'Pagination';
|
|
7859
|
+
/** Size of the controls. */
|
|
7860
|
+
size = 'md';
|
|
7861
|
+
/** Whether the whole control is disabled. */
|
|
7862
|
+
disabled = false;
|
|
7863
|
+
/** Emitted when the user asks for another page. The consumer applies it. */
|
|
7864
|
+
chPageChange;
|
|
7865
|
+
get pageCount() {
|
|
7866
|
+
if (this.total <= 0 || this.pageSize <= 0) {
|
|
7867
|
+
return 0;
|
|
7868
|
+
}
|
|
7869
|
+
return Math.ceil(this.total / this.pageSize);
|
|
7870
|
+
}
|
|
7871
|
+
/** How many rows this page shows, which is short on the last page. */
|
|
7872
|
+
get rowsOnPage() {
|
|
7873
|
+
if (this.pageCount === 0) {
|
|
7874
|
+
return 0;
|
|
7875
|
+
}
|
|
7876
|
+
const remaining = this.total - (this.page - 1) * this.pageSize;
|
|
7877
|
+
return Math.max(0, Math.min(this.pageSize, remaining));
|
|
7878
|
+
}
|
|
7879
|
+
get firstRow() {
|
|
7880
|
+
return this.rowsOnPage === 0 ? 0 : (this.page - 1) * this.pageSize + 1;
|
|
7881
|
+
}
|
|
7882
|
+
get lastRow() {
|
|
7883
|
+
return this.rowsOnPage === 0 ? 0 : this.firstRow + this.rowsOnPage - 1;
|
|
7884
|
+
}
|
|
7885
|
+
go(next) {
|
|
7886
|
+
if (this.disabled || next < 1 || next > this.pageCount || next === this.page) {
|
|
7887
|
+
return;
|
|
7888
|
+
}
|
|
7889
|
+
this.chPageChange.emit({ page: next, pageSize: this.pageSize });
|
|
7890
|
+
}
|
|
7891
|
+
render() {
|
|
7892
|
+
const count = this.pageCount;
|
|
7893
|
+
const atStart = this.page <= 1;
|
|
7894
|
+
const atEnd = count === 0 || this.page >= count;
|
|
7895
|
+
const blocked = this.disabled || count === 0;
|
|
7896
|
+
return (hAsync(Host, { key: '82d5cbf478d149a09f17d43113374f0a9fdb626c' }, hAsync("nav", { key: 'd6b712c900e61d03864e3b2f799a881f340b01a9', class: { pager: true, [`pager--${this.size}`]: true }, "aria-label": this.label }, hAsync("button", { key: 'f3a2d877c6af803d8bde467efbc437c36502e7c3', class: "pager__button", type: "button", disabled: blocked || atStart, onClick: () => this.go(this.page - 1), "aria-label": "Previous page" }, hAsync("span", { key: '8d2c3e7d96bc0761fb56318b34a70924c7250939', "aria-hidden": "true" }, "\u2039")), hAsync("p", { key: 'c4eb6fb365ab8f06dadee383be08f0d8fe39f882', class: "pager__summary", id: this.labelId, "aria-live": "polite" }, count === 0 ? 'No results' : `${this.firstRow}–${this.lastRow} of ${this.total}`), hAsync("button", { key: '1ee7a5084c6d937bb1d1b2260b09dd5d190aaf09', class: "pager__button", type: "button", disabled: blocked || atEnd, onClick: () => this.go(this.page + 1), "aria-label": "Next page" }, hAsync("span", { key: '8fbf8209157fe9833a25ed22270580a980d66a1d', "aria-hidden": "true" }, "\u203A")))));
|
|
7897
|
+
}
|
|
7898
|
+
static get style() { return chPaginationCss(); }
|
|
7899
|
+
static get cmpMeta() { return {
|
|
7900
|
+
"$flags$": 521,
|
|
7901
|
+
"$tagName$": "ch-pagination",
|
|
7902
|
+
"$members$": {
|
|
7903
|
+
"page": [2],
|
|
7904
|
+
"pageSize": [2, "page-size"],
|
|
7905
|
+
"total": [2],
|
|
7906
|
+
"label": [1],
|
|
7907
|
+
"size": [1],
|
|
7908
|
+
"disabled": [516]
|
|
7909
|
+
},
|
|
7910
|
+
"$listeners$": undefined,
|
|
7911
|
+
"$lazyBundleId$": "-",
|
|
7912
|
+
"$attrsToReflect$": [["disabled", "disabled"]]
|
|
7913
|
+
}; }
|
|
7914
|
+
}
|
|
7915
|
+
|
|
7436
7916
|
const chRadioCss = () => `:host{display:inline-block}.group-label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.radio-group{display:flex;flex-direction:column;gap:var(--spacing-lg)}.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:50%;background:var(--surface);cursor:pointer;transition:border-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)}.input:checked::before{content:'';width:var(--spacing-md);height:var(--spacing-md);border-radius:50%;background:var(--accent)}.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)}`;
|
|
7437
7917
|
|
|
7438
7918
|
let radioIds = 0;
|
|
@@ -7544,7 +8024,7 @@ class ChRadio {
|
|
|
7544
8024
|
}
|
|
7545
8025
|
render() {
|
|
7546
8026
|
const groupName = this.name || `${this.groupId}-group`;
|
|
7547
|
-
return (hAsync(Host, { key: '
|
|
8027
|
+
return (hAsync(Host, { key: 'bf7c403e1c7c172b5427d6e41d6740909e7f42f8' }, this.label && (hAsync("span", { key: '4a5391dca354ab46c80238f0f5d8ac43f1024b28', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '75854ae56cf848cbfcbb6a3a36fd831975e41071', 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: '270d6cdf03427427e88d5c6445f6607779c3ee14', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '6091a667601e9ff02f4b245d5a2cebf1e63d4ce0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7548
8028
|
}
|
|
7549
8029
|
static get formAssociated() { return true; }
|
|
7550
8030
|
static get watchers() { return {
|
|
@@ -7688,7 +8168,7 @@ class ChSegmentedControl {
|
|
|
7688
8168
|
}
|
|
7689
8169
|
render() {
|
|
7690
8170
|
const groupName = this.name || `${this.groupId}-group`;
|
|
7691
|
-
return (hAsync(Host, { key: '
|
|
8171
|
+
return (hAsync(Host, { key: '521878f5cc2c183a1ac2c89d2fa4d1b26e58dcce' }, this.label && (hAsync("span", { key: 'd87b35d855bd1185ddff983b7af098dcd867ed3a', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '008d37b8f9c50b007d7975b8cf0ce7ba52c283a1', 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)))))));
|
|
7692
8172
|
}
|
|
7693
8173
|
static get formAssociated() { return true; }
|
|
7694
8174
|
static get watchers() { return {
|
|
@@ -7831,7 +8311,7 @@ class ChSelect {
|
|
|
7831
8311
|
return undefined;
|
|
7832
8312
|
}
|
|
7833
8313
|
render() {
|
|
7834
|
-
return (hAsync(Host, { key: '
|
|
8314
|
+
return (hAsync(Host, { key: '21825ec1b83a93617413179ec79ba42ef2e980fe' }, this.label && (hAsync("label", { key: 'e41e1268d92384f93bf492f90c6a727ddd5a05e0', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: '25160df5f7628bf89d6d7bb1f2736b44d02455d9', 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: '6e6977e6c5d120a2bf28b1b05892ff90ca32e1ff', 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: '92cb97df6b5ff80857fa6463d189e366697d6fd5', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '08d3f5deefd5d155c0fd54f06a0f6f5c60db8873', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7835
8315
|
}
|
|
7836
8316
|
static get formAssociated() { return true; }
|
|
7837
8317
|
static get watchers() { return {
|
|
@@ -7924,7 +8404,7 @@ class ChSkeleton {
|
|
|
7924
8404
|
return { width: this.width, height: this.height };
|
|
7925
8405
|
}
|
|
7926
8406
|
render() {
|
|
7927
|
-
return (hAsync(Host, { key: '
|
|
8407
|
+
return (hAsync(Host, { key: '4bf9bb4d0fdfb1ecff7f0a9606da0c3eaa47aca3', "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) })))));
|
|
7928
8408
|
}
|
|
7929
8409
|
static get style() { return chSkeletonCss(); }
|
|
7930
8410
|
static get cmpMeta() { return {
|
|
@@ -7972,7 +8452,7 @@ class ChSpinner {
|
|
|
7972
8452
|
label;
|
|
7973
8453
|
render() {
|
|
7974
8454
|
const labelled = Boolean(this.label);
|
|
7975
|
-
return (hAsync(Host, { key: '
|
|
8455
|
+
return (hAsync(Host, { key: 'ed67d11ad7efe04c34372852f5c4b81c71bf2327' }, hAsync("span", { key: 'fff47dcd59f6e8881ea6295f5d062f888328a081', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
7976
8456
|
}
|
|
7977
8457
|
static get style() { return chSpinnerCss(); }
|
|
7978
8458
|
static get cmpMeta() { return {
|
|
@@ -8018,7 +8498,7 @@ class ChStack {
|
|
|
8018
8498
|
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
8019
8499
|
}
|
|
8020
8500
|
render() {
|
|
8021
|
-
return (hAsync(Host, { key: '
|
|
8501
|
+
return (hAsync(Host, { key: '9c781e2f2c953d67442838300c7cd83fb47c19c6', class: { stack: true, [`stack--gap-${this.gapStep}`]: true, [`stack--align-${this.align}`]: true, [`stack--justify-${this.justify}`]: true } }, hAsync("slot", { key: '3907d79b2c5f58a9dccf9b68e34d3fb0878c16a5' })));
|
|
8022
8502
|
}
|
|
8023
8503
|
static get style() { return chStackCss(); }
|
|
8024
8504
|
static get cmpMeta() { return {
|
|
@@ -8084,10 +8564,10 @@ class ChStat {
|
|
|
8084
8564
|
}
|
|
8085
8565
|
render() {
|
|
8086
8566
|
const cue = this.toneClass === 'positive' ? '+' : this.toneClass === 'negative' ? '−' : null;
|
|
8087
|
-
return (hAsync(Host, { key: '
|
|
8567
|
+
return (hAsync(Host, { key: '79553724e7efce617f793913fc4b65301d8e4214', class: "stat" }, hAsync("div", { key: '1d24c5b7fce578242c2464914beddd7c0bc0ac1b', class: "stat__inner" }, hAsync("span", { key: '37bbb5ebf996a2f460d817ffc546bf37100a4c7f', class: "stat__label" }, this.label), hAsync("span", { key: 'a1e5ff57b56f04fcc31b31d04ad6e8fae4ab75e3', class: {
|
|
8088
8568
|
stat__value: true,
|
|
8089
8569
|
[`stat__value--${this.toneClass}`]: this.toneClass !== 'default',
|
|
8090
|
-
} }, cue && (hAsync("span", { key: '
|
|
8570
|
+
} }, cue && (hAsync("span", { key: '9a35c34c366d66f3712f9c22cacefe48e550a08f', class: "stat__cue", "aria-hidden": "true" }, cue)), hAsync("slot", { key: 'cbf547c8ec13a675cd694e39016b7a702fac41a5', name: "value" }, this.value)), this.hint && hAsync("span", { key: 'ceaa61ab32fd4b607fe40f96a4ded7588098c98b', class: "stat__hint" }, this.hint), hAsync("div", { key: '67352638ded6243693a9698105b9d330466ccc3b', class: "stat__footer" }, hAsync("slot", { key: '8d8e59eae68d8d7153a57ec33a8185483e79b8f3', name: "footer" })))));
|
|
8091
8571
|
}
|
|
8092
8572
|
static get style() { return chStatCss(); }
|
|
8093
8573
|
static get cmpMeta() { return {
|
|
@@ -8213,7 +8693,7 @@ class ChSwitch {
|
|
|
8213
8693
|
return undefined;
|
|
8214
8694
|
}
|
|
8215
8695
|
render() {
|
|
8216
|
-
return (hAsync(Host, { key: '
|
|
8696
|
+
return (hAsync(Host, { key: 'f0ad3dab1049febb1e4506c538a938eec237b6ee' }, hAsync("label", { key: '0ec252ff6c58a79c3d1054312f6f92dd03352f69', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, hAsync("input", { key: 'a2471b09c6e1a026ec6189b3b542edc7147b8759', 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: 'dbcf0512d51e71c0072e4d159e23d822a7676da2', class: "track" }, hAsync("span", { key: 'e7ef5934e2c03ba12e320fe963b4904237bf05d5', class: "thumb" })), this.label && hAsync("span", { key: '90e1fc7560f839ec50014648235cc753c955b82a', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'c5150070147fcf40364925a5c164ec80d511b411', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'c9cc633cd70f53aa62425faf92e760cf8cb816fd', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
8217
8697
|
}
|
|
8218
8698
|
static get formAssociated() { return true; }
|
|
8219
8699
|
static get watchers() { return {
|
|
@@ -8410,7 +8890,7 @@ class ChTable {
|
|
|
8410
8890
|
const empty = this.emptyState;
|
|
8411
8891
|
// Before the first measurement the table is rendered as non-empty, so a
|
|
8412
8892
|
// consumer never sees the empty message flash over real rows.
|
|
8413
|
-
return (hAsync(Host, { key: '
|
|
8893
|
+
return (hAsync(Host, { key: 'e7957ed09b624ec1fdc599f300d7b1a49668ec41', class: { 'table': true, 'table--empty': empty === 'true' || empty === 'filtered' } }, hAsync("div", { key: 'c2fe932de59ee1c557c7a10bdd5f8704b5ee1dd2', class: "table__scroll", tabIndex: 0, role: "group", "aria-labelledby": this.captionId }, hAsync("table", { key: '9e76c06676ef07c3c7fc46e80e78a7baba6f0c33' }, hAsync("caption", { key: '3842f79c25b143fdb6d410d985e1d456cbdde190', id: this.captionId, class: "caption" }, this.label), hAsync("thead", { key: '1116cf7fed60c9757fac4097332aa2308609cb6b' }, hAsync("tr", { key: 'f8ea8e04ca4bd02a63768c93c6ce1c5b4e307792' }, this.columns.map(column => this.renderHeaderCell(column)))), hAsync("tbody", { key: '2a2c7b18fad74c854cad9164978753ffe168219f' }, hAsync("slot", { key: '514e8c0b56e8beb8c0503723823ce8be7a588af6' })))), (empty === 'true' || empty === 'filtered') && (hAsync("div", { key: 'a64841b511490e24462b89b8007f79c662de6120', class: "table__empty", id: this.emptyId }, hAsync("slot", { key: '32bcbe36421d083883223dadaec7dbd194deab8c', name: "empty" }, hAsync("p", { key: '36a9af8b0e9cbb0dfb96d52d057c910a92fe918e', class: "table__empty-message" }, this.emptyMessage(empty)))))));
|
|
8414
8894
|
}
|
|
8415
8895
|
static get watchers() { return {
|
|
8416
8896
|
"filtered": [{
|
|
@@ -8530,7 +9010,7 @@ class ChTabs {
|
|
|
8530
9010
|
}
|
|
8531
9011
|
render() {
|
|
8532
9012
|
const active = this.activeValue;
|
|
8533
|
-
return (hAsync(Host, { key: '
|
|
9013
|
+
return (hAsync(Host, { key: '596a51404c0d7d87f9988534f65e98135ecfcb75' }, hAsync("div", { key: '6eb8cf1c1a986ce1ebd211806d130c0156bad2f1', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
8534
9014
|
const selected = tab.value === active;
|
|
8535
9015
|
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));
|
|
8536
9016
|
})), 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}` }))))));
|
|
@@ -8672,7 +9152,7 @@ class ChTextarea {
|
|
|
8672
9152
|
return undefined;
|
|
8673
9153
|
}
|
|
8674
9154
|
render() {
|
|
8675
|
-
return (hAsync(Host, { key: '
|
|
9155
|
+
return (hAsync(Host, { key: 'd416e809a6e1e3efe416add0008da16a690a611f' }, this.label && (hAsync("label", { key: '777fd65954d8b346dd58ff06fa482e63ebcc3469', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: '5ec5f626a54f7b94be8064e759553f7324499485', 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: 'dee1dba3eda31566326284fccbdc0f352b14fe8f', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '5e1d47eb86b8ddd5284c3bad620bab11e340034c', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
8676
9156
|
}
|
|
8677
9157
|
static get formAssociated() { return true; }
|
|
8678
9158
|
static get watchers() { return {
|
|
@@ -8743,7 +9223,7 @@ class ChTimeline {
|
|
|
8743
9223
|
registerInstance(this, hostRef);
|
|
8744
9224
|
}
|
|
8745
9225
|
render() {
|
|
8746
|
-
return (hAsync(Host, { key: '
|
|
9226
|
+
return (hAsync(Host, { key: 'f8e1398cd3993e0b4fdfa039f2e09d99321745e0', class: "timeline" }, hAsync("ol", { key: '0341a6f18ed91895bc18b01b4a2d327eed48befc', class: "list" }, hAsync("slot", { key: '90c240cb80a37e844f840d062b7b7e5b97a97c1a' }))));
|
|
8747
9227
|
}
|
|
8748
9228
|
static get style() { return chTimelineCss(); }
|
|
8749
9229
|
static get cmpMeta() { return {
|
|
@@ -9049,7 +9529,7 @@ class ChTooltip {
|
|
|
9049
9529
|
};
|
|
9050
9530
|
render() {
|
|
9051
9531
|
const { offset } = this;
|
|
9052
|
-
return (hAsync(Host, { key: '
|
|
9532
|
+
return (hAsync(Host, { key: 'ccc4855053e0c1661f37ef6d40dffc4d0ff8fef3' }, hAsync("span", { key: 'c71b50bd48142031f60017a01e9abbeaad755f83', class: "anchor" }, hAsync("span", { key: 'aa337facc4dd983a5c2b2cf68ef1b3079e911f0b', class: "probe", "aria-hidden": "true", ref: el => (this.probeEl = el) }), hAsync("slot", { key: 'd4c7db781d9cad1b61d0b17071e41ee9619e5129', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: '8eda03e816c13ba58721a3f2c058d1e812c5630e', ref: el => (this.bubbleEl = el), style: {
|
|
9053
9533
|
'--ch-tooltip-offset-top': offset ? `${offset.top}px` : null,
|
|
9054
9534
|
'--ch-tooltip-offset-left': offset ? `${offset.left}px` : null,
|
|
9055
9535
|
}, class: {
|
|
@@ -9057,7 +9537,7 @@ class ChTooltip {
|
|
|
9057
9537
|
'bubble--positioned': Boolean(this.offset),
|
|
9058
9538
|
[`bubble--${this.resolvedPlacement ?? this.placement}`]: true,
|
|
9059
9539
|
'bubble--visible': this.visible,
|
|
9060
|
-
} }, hAsync("slot", { key: '
|
|
9540
|
+
} }, hAsync("slot", { key: '402e2c295e88586d78974a2169a75afda1380c96', name: "content", onSlotchange: this.associate })))));
|
|
9061
9541
|
}
|
|
9062
9542
|
static get style() { return chTooltipCss(); }
|
|
9063
9543
|
static get cmpMeta() { return {
|
|
@@ -9088,6 +9568,7 @@ registerComponents([
|
|
|
9088
9568
|
ChCard,
|
|
9089
9569
|
ChCheckbox,
|
|
9090
9570
|
ChCluster,
|
|
9571
|
+
ChConfirmDialog,
|
|
9091
9572
|
ChDescriptionList,
|
|
9092
9573
|
ChDivider,
|
|
9093
9574
|
ChDrawer,
|
|
@@ -9100,7 +9581,9 @@ registerComponents([
|
|
|
9100
9581
|
ChLink,
|
|
9101
9582
|
ChModal,
|
|
9102
9583
|
ChNumberInput,
|
|
9584
|
+
ChOtpInput,
|
|
9103
9585
|
ChPageHeader,
|
|
9586
|
+
ChPagination,
|
|
9104
9587
|
ChRadio,
|
|
9105
9588
|
ChSegmentedControl,
|
|
9106
9589
|
ChSelect,
|