@devschile/chucao 2.5.0 → 2.6.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-f5b74bca.entry.js → p-0409c063.entry.js} +2 -2
- package/dist/chucao/{p-0bc141a2.entry.js → p-090d26f1.entry.js} +2 -2
- package/dist/chucao/{p-f9fe752c.entry.js → p-207648f9.entry.js} +2 -2
- package/dist/chucao/{p-9f73855e.entry.js → p-20ea1b18.entry.js} +2 -2
- package/dist/chucao/{p-be7b5c21.entry.js → p-21ca2235.entry.js} +2 -2
- package/dist/chucao/{p-fdf065e6.entry.js → p-2c1bc8bd.entry.js} +2 -2
- package/dist/chucao/{p-2c681cc0.entry.js → p-370d9629.entry.js} +2 -2
- package/dist/chucao/{p-2c681cc0.entry.js.map → p-370d9629.entry.js.map} +1 -1
- package/dist/chucao/{p-6345c9e1.entry.js → p-50cbea7f.entry.js} +2 -2
- package/dist/chucao/p-66ae9e2c.entry.js +2 -0
- package/dist/chucao/p-66ae9e2c.entry.js.map +1 -0
- package/dist/chucao/p-79f20bfd.entry.js +2 -0
- package/dist/chucao/p-79f20bfd.entry.js.map +1 -0
- package/dist/chucao/{p-c251b0d1.entry.js → p-7d4336bd.entry.js} +2 -2
- package/dist/chucao/{p-957acf39.entry.js → p-81b6622f.entry.js} +2 -2
- package/dist/chucao/{p-b53d954e.entry.js → p-925af6b8.entry.js} +2 -2
- package/dist/chucao/p-95061461.entry.js +2 -0
- package/dist/chucao/{p-97655c41.entry.js → p-9794a3fa.entry.js} +2 -2
- package/dist/chucao/{p-26e144ff.entry.js → p-b56f4a29.entry.js} +2 -2
- package/dist/chucao/{p-c165f839.entry.js → p-b9b47942.entry.js} +2 -2
- package/dist/chucao/{p-0e044eff.entry.js → p-c1b35f1b.entry.js} +2 -2
- package/dist/chucao/p-e2f725bd.entry.js +2 -0
- package/dist/chucao/{p-2e785177.entry.js.map → p-e2f725bd.entry.js.map} +1 -1
- package/dist/chucao/{p-350f974d.entry.js → p-e6f959f4.entry.js} +2 -2
- package/dist/chucao/p-f0aea6ed.entry.js +2 -0
- package/dist/chucao/{p-1108062e.entry.js → p-f7305552.entry.js} +2 -2
- package/dist/chucao/p-ffaf1a31.entry.js +2 -0
- package/dist/chucao/p-ffaf1a31.entry.js.map +1 -0
- 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-description-list.cjs.entry.js +29 -0
- package/dist/cjs/ch-description-list.cjs.entry.js.map +1 -0
- 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-page-header.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 +46 -0
- package/dist/cjs/ch-stat.cjs.entry.js.map +1 -0
- 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 +20 -0
- package/dist/cjs/ch-timeline.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-tooltip.cjs.entry.js +6 -4
- package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/chucao.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +9 -6
- 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-description-list/ch-description-list.css +60 -0
- package/dist/collection/components/ch-description-list/ch-description-list.js +78 -0
- package/dist/collection/components/ch-description-list/ch-description-list.js.map +1 -0
- 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-page-header/ch-page-header.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.css +68 -0
- package/dist/collection/components/ch-stat/ch-stat.js +151 -0
- package/dist/collection/components/ch-stat/ch-stat.js.map +1 -0
- package/dist/collection/components/ch-switch/ch-switch.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.css +54 -0
- package/dist/collection/components/ch-timeline/ch-timeline.js +43 -0
- package/dist/collection/components/ch-timeline/ch-timeline.js.map +1 -0
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +6 -4
- package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -1
- 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-card.js.map +1 -1
- package/dist/components/ch-checkbox.js +1 -1
- package/dist/components/ch-cluster.js +1 -1
- package/dist/components/ch-description-list.d.ts +11 -0
- package/dist/components/ch-description-list.js +2 -0
- package/dist/components/ch-description-list.js.map +1 -0
- 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-page-header.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.d.ts +11 -0
- package/dist/components/ch-stat.js +2 -0
- package/dist/components/ch-stat.js.map +1 -0
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/ch-timeline.d.ts +11 -0
- package/dist/components/ch-timeline.js +2 -0
- package/dist/components/ch-timeline.js.map +1 -0
- package/dist/components/ch-tooltip.js +1 -1
- package/dist/components/ch-tooltip.js.map +1 -1
- package/dist/components/{p-CV0rD-fF.js → p-Cw0b4OGc.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-description-list.entry.js +27 -0
- package/dist/esm/ch-description-list.entry.js.map +1 -0
- 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-page-header.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 +44 -0
- package/dist/esm/ch-stat.entry.js.map +1 -0
- 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 +18 -0
- package/dist/esm/ch-timeline.entry.js.map +1 -0
- package/dist/esm/ch-tooltip.entry.js +6 -4
- package/dist/esm/ch-tooltip.entry.js.map +1 -1
- package/dist/esm/chucao.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ch-description-list/ch-description-list.d.ts +30 -0
- package/dist/types/components/ch-stat/ch-stat.d.ts +42 -0
- package/dist/types/components/ch-timeline/ch-timeline.d.ts +27 -0
- package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +4 -2
- package/dist/types/components.d.ts +312 -0
- package/dist-react/components.d.ts +9 -0
- package/dist-react/components.js +27 -0
- package/dist-react/components.ts +36 -0
- package/dist-vue/index.d.ts +3 -0
- package/dist-vue/index.js +13 -0
- package/dist-vue/index.ts +19 -0
- package/hydrate/index.js +200 -30
- package/hydrate/index.mjs +200 -30
- package/package.json +14 -2
- package/dist/chucao/p-2e785177.entry.js +0 -2
- package/dist/chucao/p-4846cac4.entry.js +0 -2
- package/dist/chucao/p-b6cc08f0.entry.js +0 -2
- /package/dist/chucao/{p-f5b74bca.entry.js.map → p-0409c063.entry.js.map} +0 -0
- /package/dist/chucao/{p-0bc141a2.entry.js.map → p-090d26f1.entry.js.map} +0 -0
- /package/dist/chucao/{p-f9fe752c.entry.js.map → p-207648f9.entry.js.map} +0 -0
- /package/dist/chucao/{p-9f73855e.entry.js.map → p-20ea1b18.entry.js.map} +0 -0
- /package/dist/chucao/{p-be7b5c21.entry.js.map → p-21ca2235.entry.js.map} +0 -0
- /package/dist/chucao/{p-fdf065e6.entry.js.map → p-2c1bc8bd.entry.js.map} +0 -0
- /package/dist/chucao/{p-6345c9e1.entry.js.map → p-50cbea7f.entry.js.map} +0 -0
- /package/dist/chucao/{p-c251b0d1.entry.js.map → p-7d4336bd.entry.js.map} +0 -0
- /package/dist/chucao/{p-957acf39.entry.js.map → p-81b6622f.entry.js.map} +0 -0
- /package/dist/chucao/{p-b53d954e.entry.js.map → p-925af6b8.entry.js.map} +0 -0
- /package/dist/chucao/{p-b6cc08f0.entry.js.map → p-95061461.entry.js.map} +0 -0
- /package/dist/chucao/{p-97655c41.entry.js.map → p-9794a3fa.entry.js.map} +0 -0
- /package/dist/chucao/{p-26e144ff.entry.js.map → p-b56f4a29.entry.js.map} +0 -0
- /package/dist/chucao/{p-c165f839.entry.js.map → p-b9b47942.entry.js.map} +0 -0
- /package/dist/chucao/{p-0e044eff.entry.js.map → p-c1b35f1b.entry.js.map} +0 -0
- /package/dist/chucao/{p-350f974d.entry.js.map → p-e6f959f4.entry.js.map} +0 -0
- /package/dist/chucao/{p-4846cac4.entry.js.map → p-f0aea6ed.entry.js.map} +0 -0
- /package/dist/chucao/{p-1108062e.entry.js.map → p-f7305552.entry.js.map} +0 -0
- /package/dist/components/{p-CV0rD-fF.js.map → p-Cw0b4OGc.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -5500,7 +5500,7 @@ class ChAccordion {
|
|
|
5500
5500
|
this.chChange.emit(this.value);
|
|
5501
5501
|
};
|
|
5502
5502
|
render() {
|
|
5503
|
-
return (hAsync(Host, { key: '
|
|
5503
|
+
return (hAsync(Host, { key: '83cb1bb02baec54767edde0241c9f784b35cf336' }, this.items.map(item => {
|
|
5504
5504
|
const open = this.value === item.value;
|
|
5505
5505
|
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}` }))));
|
|
5506
5506
|
})));
|
|
@@ -5663,7 +5663,7 @@ class ChAlert {
|
|
|
5663
5663
|
render() {
|
|
5664
5664
|
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
5665
5665
|
const shapes = this.statusCue ? chIcons[VARIANT_ICON[this.variant]] : undefined;
|
|
5666
|
-
return (hAsync(Host, { key: '
|
|
5666
|
+
return (hAsync(Host, { key: 'a3b0af93e0fd59c088575c1a56265698ca2836b0' }, hAsync("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, shapes && (hAsync("svg", { key: '7bceb09ba57e6b6d2344cb88476f8327c215941d', 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: '0e936cb51c852ab375b32b4fd5bcf3e275f56d21', class: "alert-content" }, hAsync("slot", { key: 'f29a5e218b900718505908b0c6731403414eacda' })), this.dismissLabel && (hAsync("button", { key: 'fe80820757f3fe2f76d44f6227f9ce6e0774cb30', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, hAsync("span", { key: 'eb8110f89d6fb3f080f78a8b2e2569f2050bd91d', "aria-hidden": "true" }, "\u00D7"))))));
|
|
5667
5667
|
}
|
|
5668
5668
|
static get style() { return chAlertCss(); }
|
|
5669
5669
|
static get cmpMeta() { return {
|
|
@@ -5705,7 +5705,7 @@ class ChBadge {
|
|
|
5705
5705
|
*/
|
|
5706
5706
|
statusCue = true;
|
|
5707
5707
|
render() {
|
|
5708
|
-
return (hAsync(Host, { key: '
|
|
5708
|
+
return (hAsync(Host, { key: '4c2874a988c47589bb4b101479e93aba9c1cf05c' }, hAsync("span", { key: '5d78f0c78545ad36f3e8cbfee48b0256545e9964', class: { badge: true, [`badge--${this.variant}`]: true } }, this.statusCue && hAsync("span", { key: '02bebc85a39fca230f09cc4688a05d055396d054', class: "badge-dot", "aria-hidden": "true" }), hAsync("slot", { key: '87d5e53ae4ea195f6f78ce8694048c9cd27af2ac' }))));
|
|
5709
5709
|
}
|
|
5710
5710
|
static get style() { return chBadgeCss(); }
|
|
5711
5711
|
static get cmpMeta() { return {
|
|
@@ -5836,7 +5836,7 @@ class ChCard {
|
|
|
5836
5836
|
registerInstance(this, hostRef);
|
|
5837
5837
|
}
|
|
5838
5838
|
render() {
|
|
5839
|
-
return (hAsync(Host, { key: '
|
|
5839
|
+
return (hAsync(Host, { key: '3f9cac3b9c506e14a27750e0e501a4f524ef9d8d' }, hAsync("div", { key: 'a35fc3f44e85df166a311317d5409ed96664c4e8', class: "card" }, hAsync("slot", { key: '15efcaa33c3fdf8599c78cfe61ee107fd42115b3' }))));
|
|
5840
5840
|
}
|
|
5841
5841
|
static get style() { return chCardCss(); }
|
|
5842
5842
|
static get cmpMeta() { return {
|
|
@@ -5977,7 +5977,7 @@ class ChCheckbox {
|
|
|
5977
5977
|
return undefined;
|
|
5978
5978
|
}
|
|
5979
5979
|
render() {
|
|
5980
|
-
return (hAsync(Host, { key: '
|
|
5980
|
+
return (hAsync(Host, { key: '09ba208488d214d27ae2d5019a231a17033e5157' }, hAsync("label", { key: '266604e9468f3a12b9593afc0ba25389ae6ab327', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.checkboxId }, hAsync("input", { key: 'd068dc3c56fd8c2588821de0f394296305023f1d', 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: '22f1fd5ab55d39da62fee78434794cd488bf1dcd', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: 'ef7de0570aeac42cfedaf7dd90922460e0c822d9', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'f4fea80489574d6673176fc1139c496c202a92bc', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
5981
5981
|
}
|
|
5982
5982
|
static get formAssociated() { return true; }
|
|
5983
5983
|
static get watchers() { return {
|
|
@@ -6048,13 +6048,13 @@ class ChCluster {
|
|
|
6048
6048
|
return GAPS$2.has(this.gap) ? this.gap : 'md';
|
|
6049
6049
|
}
|
|
6050
6050
|
render() {
|
|
6051
|
-
return (hAsync(Host, { key: '
|
|
6051
|
+
return (hAsync(Host, { key: 'e3d17238168f3faaa452740f0aab6a9e0ed5219f', class: {
|
|
6052
6052
|
'cluster': true,
|
|
6053
6053
|
[`cluster--gap-${this.gapStep}`]: true,
|
|
6054
6054
|
[`cluster--align-${this.align}`]: true,
|
|
6055
6055
|
[`cluster--justify-${this.justify}`]: true,
|
|
6056
6056
|
'cluster--nowrap': !this.wrap,
|
|
6057
|
-
} }, hAsync("slot", { key: '
|
|
6057
|
+
} }, hAsync("slot", { key: '638cecec55ed72d53eb5c6e51d1a683833fa5756' })));
|
|
6058
6058
|
}
|
|
6059
6059
|
static get style() { return chClusterCss(); }
|
|
6060
6060
|
static get cmpMeta() { return {
|
|
@@ -6072,6 +6072,57 @@ class ChCluster {
|
|
|
6072
6072
|
}; }
|
|
6073
6073
|
}
|
|
6074
6074
|
|
|
6075
|
+
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}`;
|
|
6076
|
+
|
|
6077
|
+
const COLUMNS = new Set(['1', '2', '3']);
|
|
6078
|
+
/**
|
|
6079
|
+
* Label/value pairs for detail views, on a native `<dl>`.
|
|
6080
|
+
*
|
|
6081
|
+
* The component renders the `<dl>` and the layout; the consumer writes the
|
|
6082
|
+
* terms and descriptions. Group each pair in a `<div>` (valid HTML 5.2
|
|
6083
|
+
* grouping) — the group is the grid item, which is what keeps a pair from
|
|
6084
|
+
* splitting across columns:
|
|
6085
|
+
*
|
|
6086
|
+
* ```html
|
|
6087
|
+
* <ch-description-list columns="2">
|
|
6088
|
+
* <div><dt>Cliente</dt><dd>Aurora SpA</dd></div>
|
|
6089
|
+
* <div><dt>Pedido</dt><dd>#1523</dd></div>
|
|
6090
|
+
* </ch-description-list>
|
|
6091
|
+
* ```
|
|
6092
|
+
*
|
|
6093
|
+
* The markup stays native in the light DOM, so the `term` role reaches the
|
|
6094
|
+
* accessibility tree untouched — the shape decision on #81 measured that a
|
|
6095
|
+
* custom wrapper adds nothing in Chromium while risking other browsers. No
|
|
6096
|
+
* `ch-description-item` element exists for the same reason.
|
|
6097
|
+
*/
|
|
6098
|
+
class ChDescriptionList {
|
|
6099
|
+
constructor(hostRef) {
|
|
6100
|
+
registerInstance(this, hostRef);
|
|
6101
|
+
}
|
|
6102
|
+
/**
|
|
6103
|
+
* How many pairs share a row on a wide viewport. One column is the stacked
|
|
6104
|
+
* layout. An unknown value falls back to one column.
|
|
6105
|
+
*/
|
|
6106
|
+
columns = '1';
|
|
6107
|
+
get columnCount() {
|
|
6108
|
+
return COLUMNS.has(this.columns) ? this.columns : '1';
|
|
6109
|
+
}
|
|
6110
|
+
render() {
|
|
6111
|
+
return (hAsync(Host, { key: 'd4905aeabf16e8c0798601a15e9115128c87f367' }, hAsync("dl", { key: 'f2f85f1cdae61f0d5d8c007509ec75f21a9e69df', class: `list list--columns-${this.columnCount}` }, hAsync("slot", { key: '60883fb5884ad38791c7ef811e4f3a0be6396e61' }))));
|
|
6112
|
+
}
|
|
6113
|
+
static get style() { return chDescriptionListCss(); }
|
|
6114
|
+
static get cmpMeta() { return {
|
|
6115
|
+
"$flags$": 777,
|
|
6116
|
+
"$tagName$": "ch-description-list",
|
|
6117
|
+
"$members$": {
|
|
6118
|
+
"columns": [1]
|
|
6119
|
+
},
|
|
6120
|
+
"$listeners$": undefined,
|
|
6121
|
+
"$lazyBundleId$": "-",
|
|
6122
|
+
"$attrsToReflect$": []
|
|
6123
|
+
}; }
|
|
6124
|
+
}
|
|
6125
|
+
|
|
6075
6126
|
const chDividerCss = () => `:host{display:block}:host(.divider--vertical){display:inline-block;height:100%;align-self:stretch}.divider{margin:0;border:none;background:var(--border)}.divider--horizontal{width:100%;height:var(--border-width)}.divider--vertical{width:var(--border-width);height:100%}`;
|
|
6076
6127
|
|
|
6077
6128
|
class ChDivider {
|
|
@@ -6083,7 +6134,7 @@ class ChDivider {
|
|
|
6083
6134
|
*/
|
|
6084
6135
|
orientation = 'horizontal';
|
|
6085
6136
|
render() {
|
|
6086
|
-
return (hAsync(Host, { key: '
|
|
6137
|
+
return (hAsync(Host, { key: 'c18cffa051e3fde189ed358a748e58d0af534357', class: { 'divider--vertical': this.orientation === 'vertical' } }, hAsync("hr", { key: '2a6fe2c3a2b61eecd03e0b5d2830695328e77453', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
6087
6138
|
}
|
|
6088
6139
|
static get style() { return chDividerCss(); }
|
|
6089
6140
|
static get cmpMeta() { return {
|
|
@@ -6288,7 +6339,7 @@ class ChDrawer {
|
|
|
6288
6339
|
this.chClose.emit();
|
|
6289
6340
|
};
|
|
6290
6341
|
render() {
|
|
6291
|
-
return (hAsync(Host, { key: '
|
|
6342
|
+
return (hAsync(Host, { key: 'a0406608e57614c79a23673f040191e2d94cdd48' }, hAsync("dialog", { key: '84072ff1a87f1033c5b4911089c8c0819fe087ea', class: { drawer: true, [`drawer--${this.side}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '57cddba1e04471dc6d0fe6e86311c38bb4329969', class: "drawer-head" }, hAsync("slot", { key: 'b77179dec88ae4d1b9975b7e6b16184a8aa8bb79', name: "header" }), this.closeLabel && (hAsync("button", { key: '88daedc7a80418e3480b577639e80ef31ff02486', class: "drawer-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: 'e5bb3e74f1b4365b0e32e2b8e70bdc46ac882c78', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'd81831510dd6a0d9e97eddffac99bc0689bf3d31', class: "drawer-body" }, hAsync("slot", { key: 'f3d72a55ad19021369e117ec5bf9693bc6d72c85' })), hAsync("slot", { key: '339e8989a2ea9f580a756ff89e10c40e55904c11', name: "footer" }))));
|
|
6292
6343
|
}
|
|
6293
6344
|
static get watchers() { return {
|
|
6294
6345
|
"open": [{
|
|
@@ -6400,7 +6451,7 @@ class ChEmoji {
|
|
|
6400
6451
|
this.loaded = true;
|
|
6401
6452
|
};
|
|
6402
6453
|
render() {
|
|
6403
|
-
return (hAsync(Host, { key: '
|
|
6454
|
+
return (hAsync(Host, { key: '4a5c5b2a917227ab3fb9aabe560718a84dd17730' }, hAsync("img", { key: 'dbc09e58cd1a6ce899ce82dd1ec13ba15955b4ad', class: {
|
|
6404
6455
|
'emoji': true,
|
|
6405
6456
|
[`emoji--${this.size}`]: true,
|
|
6406
6457
|
'emoji--hidden': !this.loaded,
|
|
@@ -6456,7 +6507,7 @@ class ChEmptyState {
|
|
|
6456
6507
|
*/
|
|
6457
6508
|
size = 'md';
|
|
6458
6509
|
render() {
|
|
6459
|
-
return (hAsync(Host, { key: '
|
|
6510
|
+
return (hAsync(Host, { key: '73a168213e3f62b73d859dd6e1ad35eff6694746', class: { 'empty-state': true, [`empty-state--${this.size}`]: true } }, hAsync("div", { key: '81bbad48af38acd640a67673132773a66d06c35b', class: "empty-state__inner" }, hAsync("div", { key: '1f9f8953beba68951163a5081ada1254ee6de61c', class: "empty-state__icon", "aria-hidden": "true" }, hAsync("slot", { key: '70c2b38f1a780b4c39a676d6b4cf4fe9d80a45c5', name: "icon" })), hAsync("h3", { key: '964501021ac65c7edb96c60b9e6f6dc7aece2ebe', class: "empty-state__title" }, this.title), this.description && hAsync("p", { key: 'a6effa9b7a24875938fc18ee9e6a7acf1c35b0ba', class: "empty-state__description" }, this.description), hAsync("div", { key: '0052d3c169569b96ee73b481f44b669715f90771', class: "empty-state__actions" }, hAsync("slot", { key: '3fa51fed8e5f49e02a9f588a3c0577ce9c2c5797' })))));
|
|
6460
6511
|
}
|
|
6461
6512
|
static get style() { return chEmptyStateCss(); }
|
|
6462
6513
|
static get cmpMeta() { return {
|
|
@@ -6527,7 +6578,7 @@ class ChGrid {
|
|
|
6527
6578
|
this.el.style.setProperty('--ch-grid-columns', template);
|
|
6528
6579
|
}
|
|
6529
6580
|
render() {
|
|
6530
|
-
return (hAsync(Host, { key: '
|
|
6581
|
+
return (hAsync(Host, { key: '09a37640189b353bd109bce97ad684396f91a06d', class: { grid: true, [`grid--gap-${this.gapStep}`]: true } }, hAsync("slot", { key: 'e309fee76ea499e4c3b22082218d12fc94cb8fb8' })));
|
|
6531
6582
|
}
|
|
6532
6583
|
static get style() { return chGridCss(); }
|
|
6533
6584
|
static get cmpMeta() { return {
|
|
@@ -6577,7 +6628,7 @@ class ChIcon {
|
|
|
6577
6628
|
render() {
|
|
6578
6629
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
6579
6630
|
const decorative = !this.label;
|
|
6580
|
-
return (hAsync(Host, { key: '
|
|
6631
|
+
return (hAsync(Host, { key: 'c5f0c415136db62b88cfdd17b1535ccabda92060' }, hAsync("svg", { key: '55e4f5604d9a6b3e7727fb8354658928104ea156', 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)))));
|
|
6581
6632
|
}
|
|
6582
6633
|
static get style() { return chIconCss(); }
|
|
6583
6634
|
static get cmpMeta() { return {
|
|
@@ -6640,7 +6691,7 @@ class ChIconButton {
|
|
|
6640
6691
|
};
|
|
6641
6692
|
render() {
|
|
6642
6693
|
const shapes = this.name ? chIcons[this.name] : undefined;
|
|
6643
|
-
return (hAsync(Host, { key: '
|
|
6694
|
+
return (hAsync(Host, { key: '201ad628b28588bdf40baf822abc60b2c8b7c6f2' }, hAsync("button", { key: '21fb01a8b6deef9e330ee2e3805834f5f2b8a953', 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: 'c003a3643d5968f08cf9227f768aea7b4817ab7d', 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))))));
|
|
6644
6695
|
}
|
|
6645
6696
|
static get style() { return chIconButtonCss(); }
|
|
6646
6697
|
static get cmpMeta() { return {
|
|
@@ -6781,7 +6832,7 @@ class ChInput {
|
|
|
6781
6832
|
return undefined;
|
|
6782
6833
|
}
|
|
6783
6834
|
render() {
|
|
6784
|
-
return (hAsync(Host, { key: '
|
|
6835
|
+
return (hAsync(Host, { key: 'd85d2773a340ee1a46f7f76a0d287ff1194d0e0b' }, this.label && (hAsync("label", { key: '9ad19457232c703a59eab1062e12c17e8c2b8327', class: "label", htmlFor: this.inputId }, this.label)), hAsync("input", { key: 'f88fe669d2afa183230b1286dd88ccc894eaee5e', 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: '31bdbb81ba537cc7d84b8cf7fc24055890b9b000', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '50a7cb03654f5deaa70af64ee14d774e94f77816', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
6785
6836
|
}
|
|
6786
6837
|
static get formAssociated() { return true; }
|
|
6787
6838
|
static get watchers() { return {
|
|
@@ -7030,7 +7081,7 @@ class ChModal {
|
|
|
7030
7081
|
this.chClose.emit();
|
|
7031
7082
|
};
|
|
7032
7083
|
render() {
|
|
7033
|
-
return (hAsync(Host, { key: '
|
|
7084
|
+
return (hAsync(Host, { key: '01e01a6927352410f85cb7022aa653482e52f010' }, hAsync("dialog", { key: '166798e913c662fad6c517d3c5ac957b3d9a44cf', class: { modal: true, [`modal--${this.size}`]: true }, "aria-label": this.label, ref: el => (this.dialog = el) }, hAsync("div", { key: '3d0766206306e7efe1c613313a99d049aea168ef', class: "modal-head" }, hAsync("slot", { key: '9b50ec72180b64e7eef52dab2f9246eee1cbe788', name: "heading" }), this.closeLabel && (hAsync("button", { key: 'd6c375363d9debb0c3858bb0dc1a67c816b24442', class: "modal-close", type: "button", "aria-label": this.closeLabel, onClick: this.handleCloseClick }, hAsync("span", { key: '128216aa8fca200775cd7ab28b23555bd516d1db', "aria-hidden": "true" }, "\u00D7")))), hAsync("div", { key: 'eebabfd71be502cc99e8337526cd31d4406d5eb8', class: "modal-body" }, hAsync("slot", { key: '1bbc38d606a23c6b499a80a6695a1ee6334c414f' })))));
|
|
7034
7085
|
}
|
|
7035
7086
|
static get watchers() { return {
|
|
7036
7087
|
"open": [{
|
|
@@ -7096,7 +7147,7 @@ class ChPageHeader {
|
|
|
7096
7147
|
actionsStacked = false;
|
|
7097
7148
|
render() {
|
|
7098
7149
|
const Heading = this.headingLevel;
|
|
7099
|
-
return (hAsync(Host, { key: '
|
|
7150
|
+
return (hAsync(Host, { key: '0e2bc8c10790e1f6f36a4c679579ac775f6ec3a4' }, hAsync("div", { key: '8ef9876c61f0ff325fedfb899d2e09c02b8e5e53', class: { 'header': true, 'header--stacked': this.actionsStacked } }, hAsync("div", { key: '3bef4d66f8d69397c4117e9d4a0637e978abbe2e', class: "header-text" }, this.eyebrow && hAsync("p", { key: '1ae504669807c48d95d12ce5b7d488f85e5dc864', class: "header-eyebrow" }, this.eyebrow), hAsync(Heading, { key: '9b6374d6b1d18124e49acf67af08443175f4bbaa', class: "header-title" }, this.title), this.description && hAsync("p", { key: '9c3d2d58f1c2dde2c70fc5f86eb2d580a13f8594', class: "header-description" }, this.description)), hAsync("div", { key: '3b48c89c2a8c4c5d3e42f6b78db80b3e9c2e0c50', class: "header-actions" }, hAsync("slot", { key: '77b2010fec0113af7c8ee7c7bcd884dd11b05138', name: "actions" })))));
|
|
7100
7151
|
}
|
|
7101
7152
|
static get style() { return chPageHeaderCss(); }
|
|
7102
7153
|
static get cmpMeta() { return {
|
|
@@ -7226,7 +7277,7 @@ class ChRadio {
|
|
|
7226
7277
|
}
|
|
7227
7278
|
render() {
|
|
7228
7279
|
const groupName = this.name || `${this.groupId}-group`;
|
|
7229
|
-
return (hAsync(Host, { key: '
|
|
7280
|
+
return (hAsync(Host, { key: 'f55466f6bcbe3283d294161c02498419066ca958' }, this.label && (hAsync("span", { key: '789131e7d8812ee930db5e0a0c6dc7f7e353249f', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: 'fc0a7adbde7feaaca99d156d45aacb6d18d5588e', 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: '53f3e9d368cfefa9a4d85010b65f002a3b92e0f4', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '517b7204ebf91042d293be294d7e936954eb80fb', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7230
7281
|
}
|
|
7231
7282
|
static get formAssociated() { return true; }
|
|
7232
7283
|
static get watchers() { return {
|
|
@@ -7370,7 +7421,7 @@ class ChSegmentedControl {
|
|
|
7370
7421
|
}
|
|
7371
7422
|
render() {
|
|
7372
7423
|
const groupName = this.name || `${this.groupId}-group`;
|
|
7373
|
-
return (hAsync(Host, { key: '
|
|
7424
|
+
return (hAsync(Host, { key: 'a8782886fd0c20fa96a5a54c9997fe9d91d3e670' }, this.label && (hAsync("span", { key: '99a2727035a62f71d01f07e0cf222becb118d3b2', class: "group-label", id: this.labelId }, this.label)), hAsync("div", { key: '31b293c379a996e06650c1a6c9fe9c46c32097a2', 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)))))));
|
|
7374
7425
|
}
|
|
7375
7426
|
static get formAssociated() { return true; }
|
|
7376
7427
|
static get watchers() { return {
|
|
@@ -7513,7 +7564,7 @@ class ChSelect {
|
|
|
7513
7564
|
return undefined;
|
|
7514
7565
|
}
|
|
7515
7566
|
render() {
|
|
7516
|
-
return (hAsync(Host, { key: '
|
|
7567
|
+
return (hAsync(Host, { key: 'aeba7eff5bf3bd7926922e65376c6508fc1c4dd3' }, this.label && (hAsync("label", { key: '943e5557014e2297368825505513f4ad8b093ee5', class: "label", htmlFor: this.selectId }, this.label)), hAsync("select", { key: 'ccec2dfef1b06b219e7aed536914ebf2b24e370f', 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: 'a0c41592c1a5a90f611917da984374edf5305b96', 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: '28a35ede5d7bb1937d501719244b4b9f7a5d95f2', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: 'b021c848f75367e2e3329aab423f787205ee0491', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7517
7568
|
}
|
|
7518
7569
|
static get formAssociated() { return true; }
|
|
7519
7570
|
static get watchers() { return {
|
|
@@ -7606,7 +7657,7 @@ class ChSkeleton {
|
|
|
7606
7657
|
return { width: this.width, height: this.height };
|
|
7607
7658
|
}
|
|
7608
7659
|
render() {
|
|
7609
|
-
return (hAsync(Host, { key: '
|
|
7660
|
+
return (hAsync(Host, { key: '705e4cd6dac9c8c8578cb8133a700c3297d9fffe', "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) })))));
|
|
7610
7661
|
}
|
|
7611
7662
|
static get style() { return chSkeletonCss(); }
|
|
7612
7663
|
static get cmpMeta() { return {
|
|
@@ -7654,7 +7705,7 @@ class ChSpinner {
|
|
|
7654
7705
|
label;
|
|
7655
7706
|
render() {
|
|
7656
7707
|
const labelled = Boolean(this.label);
|
|
7657
|
-
return (hAsync(Host, { key: '
|
|
7708
|
+
return (hAsync(Host, { key: '6d26b2ead7b674058b3d5c56caf9329cf9377ae6' }, hAsync("span", { key: 'a3fa9b56474271154527b9e0f9def3136b158ea4', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
7658
7709
|
}
|
|
7659
7710
|
static get style() { return chSpinnerCss(); }
|
|
7660
7711
|
static get cmpMeta() { return {
|
|
@@ -7700,7 +7751,7 @@ class ChStack {
|
|
|
7700
7751
|
return GAPS.has(this.gap) ? this.gap : 'md';
|
|
7701
7752
|
}
|
|
7702
7753
|
render() {
|
|
7703
|
-
return (hAsync(Host, { key: '
|
|
7754
|
+
return (hAsync(Host, { key: 'd4ee90331cd1ff0d65eb9c80aa684d3b2f5e2876', class: { stack: true, [`stack--gap-${this.gapStep}`]: true, [`stack--align-${this.align}`]: true, [`stack--justify-${this.justify}`]: true } }, hAsync("slot", { key: 'bdfe358adc457ed6ba79ca80b9e96f17597fbcb5' })));
|
|
7704
7755
|
}
|
|
7705
7756
|
static get style() { return chStackCss(); }
|
|
7706
7757
|
static get cmpMeta() { return {
|
|
@@ -7717,6 +7768,76 @@ class ChStack {
|
|
|
7717
7768
|
}; }
|
|
7718
7769
|
}
|
|
7719
7770
|
|
|
7771
|
+
const chStatCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-primary)}:host([hidden]){display:none}.stat__inner{display:flex;flex-direction:column;gap:var(--spacing-2xs);padding:var(--spacing-md) var(--spacing-lg);border:var(--border-width) solid var(--color-border-default);border-radius:var(--radius-md);background:var(--color-surface-default)}.stat__label{font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);letter-spacing:0.06em;text-transform:uppercase;color:var(--color-text-secondary)}.stat__value{font-family:var(--typography-heading);font-size:var(--typography-size-xl);font-weight:var(--typography-weight-bold);font-variant-numeric:tabular-nums;display:flex;align-items:baseline;gap:var(--spacing-2xs)}.stat__cue{font-size:var(--typography-size-md)}.stat__value--positive{color:var(--color-status-positive)}.stat__value--negative{color:var(--color-status-negative)}.stat__value--unavailable{color:var(--color-text-tertiary);font-style:italic}.stat__hint{font-size:var(--typography-size-sm);color:var(--color-text-secondary)}.stat__footer:empty{display:none}.stat__footer{margin-top:var(--spacing-2xs)}`;
|
|
7772
|
+
|
|
7773
|
+
const TONES = new Set(['default', 'positive', 'negative', 'unavailable']);
|
|
7774
|
+
/**
|
|
7775
|
+
* One dashboard metric: a label, a value and an optional hint.
|
|
7776
|
+
*
|
|
7777
|
+
* The value is a string the consumer has already formatted — the component
|
|
7778
|
+
* never parses numbers, so locale, currency and precision stay where the
|
|
7779
|
+
* data comes from. On a fetch error, pass the em dash and the unavailable
|
|
7780
|
+
* tone rather than a zero that would read as a real measurement:
|
|
7781
|
+
*
|
|
7782
|
+
* ```html
|
|
7783
|
+
* <ch-stat label="Ventas del mes" value="$1.250.000" tone="positive"></ch-stat>
|
|
7784
|
+
* <ch-stat label="Ticket promedio" value="—" tone="unavailable"></ch-stat>
|
|
7785
|
+
* ```
|
|
7786
|
+
*
|
|
7787
|
+
* A tone is never carried by colour alone: positive and negative values get
|
|
7788
|
+
* a visible sign cue, so the three states stay distinguishable in greyscale
|
|
7789
|
+
* and for colour-blind users. The `value` slot replaces the rendered value
|
|
7790
|
+
* for composed content (a link, a spinner), and the `footer` slot sits under
|
|
7791
|
+
* the hint for a comparison line or a sparkline.
|
|
7792
|
+
*/
|
|
7793
|
+
class ChStat {
|
|
7794
|
+
constructor(hostRef) {
|
|
7795
|
+
registerInstance(this, hostRef);
|
|
7796
|
+
}
|
|
7797
|
+
/**
|
|
7798
|
+
* Short label naming the metric, rendered in small caps above the value.
|
|
7799
|
+
*/
|
|
7800
|
+
label;
|
|
7801
|
+
/**
|
|
7802
|
+
* The metric value, already formatted by the consumer. Shown verbatim.
|
|
7803
|
+
*/
|
|
7804
|
+
value;
|
|
7805
|
+
/**
|
|
7806
|
+
* Secondary line under the value — a comparison or a unit note.
|
|
7807
|
+
*/
|
|
7808
|
+
hint;
|
|
7809
|
+
/**
|
|
7810
|
+
* Visual tone of the value. `positive` and `negative` add a sign cue so
|
|
7811
|
+
* the tone survives greyscale; `unavailable` dims the value for the
|
|
7812
|
+
* "could not be measured" case. An unknown value falls back to `default`.
|
|
7813
|
+
*/
|
|
7814
|
+
tone = 'default';
|
|
7815
|
+
get toneClass() {
|
|
7816
|
+
return TONES.has(this.tone) ? this.tone : 'default';
|
|
7817
|
+
}
|
|
7818
|
+
render() {
|
|
7819
|
+
const cue = this.toneClass === 'positive' ? '+' : this.toneClass === 'negative' ? '−' : null;
|
|
7820
|
+
return (hAsync(Host, { key: '5a43c713faab1513866d8f06899bb3fd3184cf09', class: "stat" }, hAsync("div", { key: '9c24e9774cfe0a70b8ba37c06ce7f264b34a9d8c', class: "stat__inner" }, hAsync("span", { key: '1a9330c2b31ec6de29f1b8c77761d7eb16160aae', class: "stat__label" }, this.label), hAsync("span", { key: '3f6c5e76f5c062effcb9793206a949942bcdfb9a', class: {
|
|
7821
|
+
stat__value: true,
|
|
7822
|
+
[`stat__value--${this.toneClass}`]: this.toneClass !== 'default',
|
|
7823
|
+
} }, cue && (hAsync("span", { key: 'b5f79899ec52e7e2b3ec3c00295f755f770a8bca', class: "stat__cue", "aria-hidden": "true" }, cue)), hAsync("slot", { key: 'b64083aa5738b4088cf9029650286b2564649ec9', name: "value" }, this.value)), this.hint && hAsync("span", { key: '9f560c1f1fd23f08ea63eccc9076066a7fd1a0f9', class: "stat__hint" }, this.hint), hAsync("div", { key: '77f3fe1f87e3abc2cce829e06b21f6b2c5f9aa15', class: "stat__footer" }, hAsync("slot", { key: 'd75204702eab0ab1f55df92e9c13c899235f6840', name: "footer" })))));
|
|
7824
|
+
}
|
|
7825
|
+
static get style() { return chStatCss(); }
|
|
7826
|
+
static get cmpMeta() { return {
|
|
7827
|
+
"$flags$": 777,
|
|
7828
|
+
"$tagName$": "ch-stat",
|
|
7829
|
+
"$members$": {
|
|
7830
|
+
"label": [1],
|
|
7831
|
+
"value": [1],
|
|
7832
|
+
"hint": [1],
|
|
7833
|
+
"tone": [1]
|
|
7834
|
+
},
|
|
7835
|
+
"$listeners$": undefined,
|
|
7836
|
+
"$lazyBundleId$": "-",
|
|
7837
|
+
"$attrsToReflect$": []
|
|
7838
|
+
}; }
|
|
7839
|
+
}
|
|
7840
|
+
|
|
7720
7841
|
const chSwitchCss = () => `:host{display:inline-block}.control{position:relative;display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.input:focus-visible~.track{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.track{position:relative;box-sizing:border-box;width:var(--spacing-6xl);height:var(--spacing-5xl);flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-pill);background:var(--surface);transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.thumb{position:absolute;top:50%;left:var(--spacing-2xs);width:var(--spacing-2xl);height:var(--spacing-2xl);border-radius:50%;background:var(--text-muted);transform:translateY(-50%);transition:left var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default)}.input:checked~.track{border-color:var(--accent);background:var(--accent)}.input:checked~.track .thumb{left:calc(100% - var(--spacing-2xl) - var(--spacing-2xs));background:var(--color-accent-text)}.input--invalid~.track{border-color:var(--color-status-warning)}.input--invalid:focus-visible~.track{outline-color:var(--color-status-warning)}:host([data-touched]:invalid) .track,:host(:user-invalid) .track{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus-visible~.track,:host(:user-invalid) .input:focus-visible~.track{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)}`;
|
|
7721
7842
|
|
|
7722
7843
|
let switchIds = 0;
|
|
@@ -7825,7 +7946,7 @@ class ChSwitch {
|
|
|
7825
7946
|
return undefined;
|
|
7826
7947
|
}
|
|
7827
7948
|
render() {
|
|
7828
|
-
return (hAsync(Host, { key: '
|
|
7949
|
+
return (hAsync(Host, { key: 'e1493afa72058b44b5051cdc641604d02952b6be' }, hAsync("label", { key: '80f2ca9bdb7fab02556f427f4a1fce56744eaf50', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, hAsync("input", { key: '22a873c43b7f9c94455373d80ab5b3c28153ff70', 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: 'd995c061f60ad3040048966da17ad8cb2ebdb622', class: "track" }, hAsync("span", { key: 'ba09dcb23640b2925d0c82f5ab46213acc7e8a86', class: "thumb" })), this.label && hAsync("span", { key: '9849238fd3486bc1d869c6df373e30209e46d264', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (hAsync("p", { key: '76a5cb6da88dbd7088cf2c0d9c2b5a781a632a7f', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '5ebd8ab9b2390fea801bf75eeb4967e95983e041', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
7829
7950
|
}
|
|
7830
7951
|
static get formAssociated() { return true; }
|
|
7831
7952
|
static get watchers() { return {
|
|
@@ -7948,7 +8069,7 @@ class ChTabs {
|
|
|
7948
8069
|
}
|
|
7949
8070
|
render() {
|
|
7950
8071
|
const active = this.activeValue;
|
|
7951
|
-
return (hAsync(Host, { key: '
|
|
8072
|
+
return (hAsync(Host, { key: 'de167280c159345631f84f5eb7a3dc165396f361' }, hAsync("div", { key: '62c008bcf9eafd1c5f5121540b2841e2a6ada541', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
7952
8073
|
const selected = tab.value === active;
|
|
7953
8074
|
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));
|
|
7954
8075
|
})), 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}` }))))));
|
|
@@ -8090,7 +8211,7 @@ class ChTextarea {
|
|
|
8090
8211
|
return undefined;
|
|
8091
8212
|
}
|
|
8092
8213
|
render() {
|
|
8093
|
-
return (hAsync(Host, { key: '
|
|
8214
|
+
return (hAsync(Host, { key: 'c4334a23f6ad2394d410498726f3f422a654ffe3' }, this.label && (hAsync("label", { key: 'd935613b40c6c52be41e258aad2a3c17a290a506', class: "label", htmlFor: this.textareaId }, this.label)), hAsync("textarea", { key: 'ab27ae9a6be7d2bcc17638c209ef23eb3757c102', 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: 'eb488704ac6ff76534308aefd0938d848d14608f', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (hAsync("p", { key: '04c084b29d102f06bf15efc4c416b6ba0967ba8d', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
8094
8215
|
}
|
|
8095
8216
|
static get formAssociated() { return true; }
|
|
8096
8217
|
static get watchers() { return {
|
|
@@ -8130,6 +8251,50 @@ class ChTextarea {
|
|
|
8130
8251
|
}; }
|
|
8131
8252
|
}
|
|
8132
8253
|
|
|
8254
|
+
const chTimelineCss = () => `:host{display:block;font-family:var(--typography-body);color:var(--color-text-secondary)}:host([hidden]){display:none}.list{margin:0;padding:0;display:grid;gap:var(--spacing-md);list-style:none}::slotted(li){position:relative;padding-left:var(--spacing-2xl);min-width:0}::slotted(li)::before{content:'';position:absolute;left:0;top:0.35em;width:var(--spacing-sm);height:var(--spacing-sm);border-radius:50%;background:var(--color-border-default)}::slotted(li:not(:last-of-type))::after{content:'';position:absolute;left:calc(var(--spacing-sm) / 2 - var(--border-width));top:calc(0.35em + var(--spacing-sm));bottom:calc(0px - var(--spacing-md));width:var(--border-width);background:var(--color-border-default)}::slotted(time){font-variant-numeric:tabular-nums}`;
|
|
8255
|
+
|
|
8256
|
+
/**
|
|
8257
|
+
* Chronological history: a native ordered list with a marker dot per item
|
|
8258
|
+
* and a connector line between items — the last item never gets a trailing
|
|
8259
|
+
* connector.
|
|
8260
|
+
*
|
|
8261
|
+
* The component renders the `<ol>` and owns the rail; the consumer writes
|
|
8262
|
+
* plain `<li>` items with whatever content each entry needs — a preformatted
|
|
8263
|
+
* date, a title, a description, and a non-colour state cue from `ch-icon`:
|
|
8264
|
+
*
|
|
8265
|
+
* ```html
|
|
8266
|
+
* <ch-timeline>
|
|
8267
|
+
* <li>
|
|
8268
|
+
* <ch-icon name="check"></ch-icon>
|
|
8269
|
+
* <time datetime="2026-11-02">2 nov 2026</time> — Creado el pedido
|
|
8270
|
+
* </li>
|
|
8271
|
+
* <li><ch-icon name="spinner"></ch-icon> Esperando despacho</li>
|
|
8272
|
+
* </ch-timeline>
|
|
8273
|
+
* ```
|
|
8274
|
+
*
|
|
8275
|
+
* The list semantics survive untouched because the `li` elements stay native
|
|
8276
|
+
* in the light DOM — measured on #83: a wrapped item still counts as a
|
|
8277
|
+
* `listitem`, so nothing is gained by a `ch-timeline-item` element, and
|
|
8278
|
+
* native markup is the safe bet across browsers.
|
|
8279
|
+
*/
|
|
8280
|
+
class ChTimeline {
|
|
8281
|
+
constructor(hostRef) {
|
|
8282
|
+
registerInstance(this, hostRef);
|
|
8283
|
+
}
|
|
8284
|
+
render() {
|
|
8285
|
+
return (hAsync(Host, { key: 'da3288af540acb92113ba83d08fc5e1693e83b3e', class: "timeline" }, hAsync("ol", { key: '1aaee846703dd0a67d6df04945eb4a62e2bbf711', class: "list" }, hAsync("slot", { key: '394cfd03640a2cf78bd620338de9ed9ef7b9d9f5' }))));
|
|
8286
|
+
}
|
|
8287
|
+
static get style() { return chTimelineCss(); }
|
|
8288
|
+
static get cmpMeta() { return {
|
|
8289
|
+
"$flags$": 265,
|
|
8290
|
+
"$tagName$": "ch-timeline",
|
|
8291
|
+
"$members$": undefined,
|
|
8292
|
+
"$listeners$": undefined,
|
|
8293
|
+
"$lazyBundleId$": "-",
|
|
8294
|
+
"$attrsToReflect$": []
|
|
8295
|
+
}; }
|
|
8296
|
+
}
|
|
8297
|
+
|
|
8133
8298
|
const OPPOSITE = {
|
|
8134
8299
|
top: 'bottom',
|
|
8135
8300
|
bottom: 'top',
|
|
@@ -8314,8 +8479,10 @@ class ChTooltip {
|
|
|
8314
8479
|
* Listens on the document because a tooltip opened by hovering leaves focus
|
|
8315
8480
|
* wherever it was, so a host-scoped handler would never see the key.
|
|
8316
8481
|
*
|
|
8317
|
-
*
|
|
8318
|
-
*
|
|
8482
|
+
* `preventDefault()` dismisses only the innermost surface: the platform's
|
|
8483
|
+
* close request for an open native `<dialog>` is the default action of this
|
|
8484
|
+
* same keydown, so cancelling it keeps an enclosing `ch-modal` open. Proven
|
|
8485
|
+
* against a real `ch-modal` in `tests/browser/ch-tooltip.browser.spec.ts`.
|
|
8319
8486
|
*/
|
|
8320
8487
|
handleKeyDown(event) {
|
|
8321
8488
|
if (event.key === 'Escape' && this.visible && !event.defaultPrevented) {
|
|
@@ -8404,7 +8571,7 @@ class ChTooltip {
|
|
|
8404
8571
|
};
|
|
8405
8572
|
render() {
|
|
8406
8573
|
const { offset } = this;
|
|
8407
|
-
return (hAsync(Host, { key: '
|
|
8574
|
+
return (hAsync(Host, { key: '676e431d0100ecc9ea688b7e37bc87e8295bb24d' }, hAsync("span", { key: '20a388681252e9c4d52e662c014efd9a198efbd7', class: "anchor" }, hAsync("slot", { key: 'a06cbe31dd04cba38ef09788359783d816fc1a5b', name: "trigger", onSlotchange: this.associate }), hAsync("span", { key: '13cb5b782a7029fc82c10b9b6765de62b94b9afa', ref: el => (this.bubbleEl = el), style: {
|
|
8408
8575
|
'--ch-tooltip-offset-top': offset ? `${offset.top}px` : null,
|
|
8409
8576
|
'--ch-tooltip-offset-left': offset ? `${offset.left}px` : null,
|
|
8410
8577
|
}, class: {
|
|
@@ -8412,7 +8579,7 @@ class ChTooltip {
|
|
|
8412
8579
|
'bubble--positioned': Boolean(this.offset),
|
|
8413
8580
|
[`bubble--${this.resolvedPlacement ?? this.placement}`]: true,
|
|
8414
8581
|
'bubble--visible': this.visible,
|
|
8415
|
-
} }, hAsync("slot", { key: '
|
|
8582
|
+
} }, hAsync("slot", { key: '6610bbf299354bb3be07bb273fab3f8fd91fd254', name: "content", onSlotchange: this.associate })))));
|
|
8416
8583
|
}
|
|
8417
8584
|
static get style() { return chTooltipCss(); }
|
|
8418
8585
|
static get cmpMeta() { return {
|
|
@@ -8443,6 +8610,7 @@ registerComponents([
|
|
|
8443
8610
|
ChCard,
|
|
8444
8611
|
ChCheckbox,
|
|
8445
8612
|
ChCluster,
|
|
8613
|
+
ChDescriptionList,
|
|
8446
8614
|
ChDivider,
|
|
8447
8615
|
ChDrawer,
|
|
8448
8616
|
ChEmoji,
|
|
@@ -8460,9 +8628,11 @@ registerComponents([
|
|
|
8460
8628
|
ChSkeleton,
|
|
8461
8629
|
ChSpinner,
|
|
8462
8630
|
ChStack,
|
|
8631
|
+
ChStat,
|
|
8463
8632
|
ChSwitch,
|
|
8464
8633
|
ChTabs,
|
|
8465
8634
|
ChTextarea,
|
|
8635
|
+
ChTimeline,
|
|
8466
8636
|
ChTooltip,
|
|
8467
8637
|
]);
|
|
8468
8638
|
|