@devschile/chucao 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/dist/chucao/chucao.css +1 -1
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/chucao.esm.js.map +1 -1
- package/dist/chucao/index.esm.js +1 -1
- package/dist/chucao/index.esm.js.map +1 -1
- package/dist/chucao/p-0305f2eb.entry.js +2 -0
- package/dist/chucao/{p-af2c57b5.entry.js.map → p-0305f2eb.entry.js.map} +1 -1
- package/dist/chucao/{p-dde82d7d.entry.js → p-053d58a4.entry.js} +2 -2
- package/dist/chucao/{p-fcc70c8d.entry.js → p-20492b73.entry.js} +2 -2
- package/dist/chucao/p-488c7838.entry.js +2 -0
- package/dist/chucao/{p-175aee94.entry.js → p-9a614e82.entry.js} +2 -2
- package/dist/chucao/{p-d75eeeea.entry.js → p-ad3206a2.entry.js} +2 -2
- package/dist/chucao/p-c598f978.entry.js +2 -0
- package/dist/chucao/p-c598f978.entry.js.map +1 -0
- package/dist/chucao/{p-85a49fd7.entry.js → p-fe8e9537.entry.js} +2 -2
- package/dist/chucao/p-pfWAsOzE.js +3 -0
- package/dist/chucao/p-pfWAsOzE.js.map +1 -0
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/{ch-badge_6.cjs.entry.js → ch-alert_8.cjs.entry.js} +73 -9
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ch-divider.cjs.entry.js +2 -2
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-radio.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/chucao.cjs.js +3 -3
- package/dist/cjs/chucao.cjs.js.map +1 -1
- package/dist/cjs/{index-CiYvuUBV.js → index-ls4U227d.js} +38 -9
- package/dist/cjs/index-ls4U227d.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ch-alert/ch-alert.css +77 -0
- package/dist/collection/components/ch-alert/ch-alert.js +118 -0
- package/dist/collection/components/ch-alert/ch-alert.js.map +1 -0
- package/dist/collection/components/ch-badge/ch-badge.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js +1 -1
- package/dist/collection/components/ch-button/ch-button.js.map +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-divider/ch-divider.js +1 -1
- package/dist/collection/components/ch-input/ch-input.js +1 -1
- package/dist/collection/components/ch-radio/ch-radio.js +1 -1
- package/dist/collection/components/ch-select/ch-select.js +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.css +39 -0
- package/dist/collection/components/ch-spinner/ch-spinner.js +90 -0
- package/dist/collection/components/ch-spinner/ch-spinner.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/tokens/tokens.js +5 -1
- package/dist/collection/tokens/tokens.js.map +1 -1
- package/dist/collection/tokens/types.js.map +1 -1
- package/dist/components/ch-accordion.js +1 -1
- package/dist/components/ch-alert.d.ts +11 -0
- package/dist/components/ch-alert.js +2 -0
- package/dist/components/ch-alert.js.map +1 -0
- package/dist/components/ch-badge.js +1 -1
- package/dist/components/ch-button.js +1 -1
- package/dist/components/ch-button.js.map +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-divider.js +1 -1
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-spinner.d.ts +11 -0
- package/dist/components/ch-spinner.js +2 -0
- package/dist/components/ch-spinner.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/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-ONE3uKkF.js +2 -0
- package/dist/components/p-ONE3uKkF.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/{ch-badge_6.entry.js → ch-alert_8.entry.js} +72 -10
- package/dist/esm/ch-alert_8.entry.js.map +1 -0
- package/dist/esm/ch-checkbox.entry.js +2 -2
- package/dist/esm/ch-divider.entry.js +2 -2
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-radio.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/chucao.js +4 -4
- package/dist/esm/chucao.js.map +1 -1
- package/dist/esm/{index-ImsAHlk9.js → index-pfWAsOzE.js} +38 -9
- package/dist/esm/index-pfWAsOzE.js.map +1 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-alert/ch-alert.d.ts +34 -0
- package/dist/types/components/ch-spinner/ch-spinner.d.ts +25 -0
- package/dist/types/components.d.ts +153 -0
- package/dist/types/stencil-public-runtime.d.ts +11 -0
- package/dist/types/tokens/tokens.d.ts +4 -0
- package/dist/types/tokens/types.d.ts +2 -2
- package/dist-react/components.d.ts +9 -1
- package/dist-react/components.js +18 -0
- package/dist-react/components.ts +25 -1
- package/dist-vue/index.d.ts +2 -0
- package/dist-vue/index.js +13 -0
- package/dist-vue/index.ts +17 -0
- package/hydrate/index.js +138 -16
- package/hydrate/index.mjs +138 -16
- package/package.json +6 -2
- package/dist/chucao/p-ImsAHlk9.js +0 -3
- package/dist/chucao/p-ImsAHlk9.js.map +0 -1
- package/dist/chucao/p-af2c57b5.entry.js +0 -2
- package/dist/chucao/p-b4520f1c.entry.js +0 -2
- package/dist/chucao/p-b4520f1c.entry.js.map +0 -1
- package/dist/chucao/p-fe0c9320.entry.js +0 -2
- package/dist/cjs/ch-badge_6.cjs.entry.js.map +0 -1
- package/dist/cjs/index-CiYvuUBV.js.map +0 -1
- package/dist/components/p-x4aZoujY.js +0 -2
- package/dist/components/p-x4aZoujY.js.map +0 -1
- package/dist/esm/ch-badge_6.entry.js.map +0 -1
- package/dist/esm/index-ImsAHlk9.js.map +0 -1
- /package/dist/chucao/{p-dde82d7d.entry.js.map → p-053d58a4.entry.js.map} +0 -0
- /package/dist/chucao/{p-fcc70c8d.entry.js.map → p-20492b73.entry.js.map} +0 -0
- /package/dist/chucao/{p-fe0c9320.entry.js.map → p-488c7838.entry.js.map} +0 -0
- /package/dist/chucao/{p-175aee94.entry.js.map → p-9a614e82.entry.js.map} +0 -0
- /package/dist/chucao/{p-d75eeeea.entry.js.map → p-ad3206a2.entry.js.map} +0 -0
- /package/dist/chucao/{p-85a49fd7.entry.js.map → p-fe8e9537.entry.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
2
|
|
|
3
3
|
const chAccordionCss = () => `:host{display:block}.item{background:var(--surface);border:var(--border-width) solid var(--border);border-radius:var(--radius);transition:border-color var(--duration-normal) var(--easing-default)}.item+.item{margin-top:var(--spacing-md)}.item--open{border-color:var(--border-hover)}.item-head{margin:0}.item-toggle{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-lg);width:100%;padding:var(--spacing-2xl) var(--spacing-3xl);background:transparent;border:none;color:var(--text);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer}.item-toggle::after{content:'';width:var(--spacing-md);height:var(--spacing-md);flex-shrink:0;border-right:var(--border-width) solid var(--text-muted);border-bottom:var(--border-width) solid var(--text-muted);transform:rotate(45deg);transition:transform var(--duration-normal) var(--easing-default)}.item--open .item-toggle::after{transform:rotate(-135deg)}.item-toggle:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.item-toggle:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.item-panel{padding:0 var(--spacing-3xl) var(--spacing-3xl);color:var(--text-muted)}.item-panel[hidden]{display:none}`;
|
|
4
4
|
|
|
@@ -1,4 +1,40 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
|
+
|
|
3
|
+
const chAlertCss = () => `:host{display:block}.alert{display:flex;align-items:flex-start;gap:var(--spacing-2xl);padding:var(--spacing-2xl) var(--spacing-3xl);border:var(--border-width) solid transparent;border-radius:var(--radius);font-size:var(--typography-size-sm);line-height:1.5}.alert-content{flex:1;min-width:0;overflow-wrap:anywhere}.alert--default{color:var(--text);background:var(--surface);border-color:var(--border)}.alert--positive{color:var(--color-status-positive);background:var(--color-status-positive-background);border-color:var(--color-status-positive)}.alert--warning{color:var(--color-status-warning);background:var(--color-status-warning-background);border-color:var(--color-status-warning)}.alert-dismiss{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:var(--spacing-2xs) var(--spacing-md);border:0;border-radius:var(--radius);background:none;color:inherit;cursor:pointer;font-family:var(--font-heading);font-size:var(--typography-size-lg);line-height:1;transition:background-color var(--duration-normal) var(--easing-default)}.alert-dismiss:hover{background:var(--surface-hover)}.alert-dismiss:focus-visible{outline:var(--focus-outline-width) solid currentColor;outline-offset:var(--focus-outline-offset)}@media (pointer: coarse){.alert-dismiss{min-width:44px;min-height:44px}}@media (prefers-reduced-motion: reduce){.alert-dismiss{transition:none}}`;
|
|
4
|
+
|
|
5
|
+
const ChAlert = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.chDismiss = createEvent(this, "chDismiss");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The kind of message. `default` is neutral, `positive` confirms, and
|
|
12
|
+
* `warning` covers both warnings and errors — the token scale has a single
|
|
13
|
+
* status colour for the two of them.
|
|
14
|
+
*/
|
|
15
|
+
variant = 'default';
|
|
16
|
+
/**
|
|
17
|
+
* Accessible label for the dismiss button, set as `aria-label`. Setting it
|
|
18
|
+
* is what adds the button: the button's only content is a decorative glyph,
|
|
19
|
+
* so without a label it would have no accessible name at all.
|
|
20
|
+
*/
|
|
21
|
+
dismissLabel;
|
|
22
|
+
/**
|
|
23
|
+
* Emitted when the dismiss button is clicked. The alert stays in the DOM —
|
|
24
|
+
* whether to remove it is the consumer's decision. If you do remove it, move
|
|
25
|
+
* focus somewhere sensible first: removing the focused button drops focus to
|
|
26
|
+
* `<body>`.
|
|
27
|
+
*/
|
|
28
|
+
chDismiss;
|
|
29
|
+
handleDismiss = () => {
|
|
30
|
+
this.chDismiss.emit();
|
|
31
|
+
};
|
|
32
|
+
render() {
|
|
33
|
+
const role = this.variant === 'warning' ? 'alert' : 'status';
|
|
34
|
+
return (h(Host, { key: '7d96602ad2c2b3824588f01d5b94d73098da6ce4' }, h("div", { key: role, class: { alert: true, [`alert--${this.variant}`]: true }, role: role }, h("div", { key: '64d7af5aad0e4b103b35cc2ba3756b1a1601b148', class: "alert-content" }, h("slot", { key: '44573092407161bbeafe5117bddb54168b183d90' })), this.dismissLabel && (h("button", { key: '018858ac292c0fb7f26c788f629638f533d0dfd6', class: "alert-dismiss", type: "button", "aria-label": this.dismissLabel, onClick: this.handleDismiss }, h("span", { key: 'f6454d5285ed9c7c414d839d2d35d2ce0c271dd4', "aria-hidden": "true" }, "\u00D7"))))));
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
ChAlert.style = chAlertCss();
|
|
2
38
|
|
|
3
39
|
const chBadgeCss = () => `:host{display:inline-block}.badge{display:inline-block;padding:var(--spacing-2xs) var(--spacing-lg);border-radius:var(--radius-pill);font-size:var(--typography-size-xs);font-weight:var(--typography-weight-semibold);text-transform:uppercase;letter-spacing:var(--typography-tracking-badge)}.badge--default{background:var(--color-surface-hover);color:var(--accent)}.badge--positive{background:var(--color-status-positive-background);color:var(--color-status-positive)}.badge--warning{background:var(--color-status-warning-background);color:var(--color-status-warning)}`;
|
|
4
40
|
|
|
@@ -11,7 +47,7 @@ const ChBadge = class {
|
|
|
11
47
|
*/
|
|
12
48
|
variant = 'default';
|
|
13
49
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: 'ca1fb0c9d678b6ea5b68ca131ba153116bbd577d' }, h("span", { key: '929e2268094bdad7df6e3c8371896e364ebf79c3', class: { badge: true, [`badge--${this.variant}`]: true } }, h("slot", { key: '64422988ad046244722755d39e564295f79a6ce1' }))));
|
|
15
51
|
}
|
|
16
52
|
};
|
|
17
53
|
ChBadge.style = chBadgeCss();
|
|
@@ -45,7 +81,7 @@ const ChButton = class {
|
|
|
45
81
|
this.chClick.emit(ev);
|
|
46
82
|
};
|
|
47
83
|
render() {
|
|
48
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '9363b49e8d38c0fab49ed10356380ded20a8cf5e' }, h("button", { key: '3c98506ae1418c4bc88f5aa72dfe058948556ed5', class: { btn: true, [`btn--${this.variant}`]: true }, type: "button", disabled: this.disabled, "aria-label": this.label, onClick: this.handleClick }, h("slot", { key: 'cdcf4f656b995fa527d4139a41b2ea3c7086e065' }))));
|
|
49
85
|
}
|
|
50
86
|
};
|
|
51
87
|
ChButton.style = chButtonCss();
|
|
@@ -57,7 +93,7 @@ const ChCard = class {
|
|
|
57
93
|
registerInstance(this, hostRef);
|
|
58
94
|
}
|
|
59
95
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: 'de99971fb6a845e8ca6c406d669abd64f7e45068' }, h("div", { key: '6dcae41e636af83221f710212ed1ec16a21dcdde', class: "card" }, h("slot", { key: 'b2a1354d297ce45c97f0ed4378f5710b4b0ac13d' }))));
|
|
61
97
|
}
|
|
62
98
|
};
|
|
63
99
|
ChCard.style = chCardCss();
|
|
@@ -142,7 +178,7 @@ const ChInput = class {
|
|
|
142
178
|
return undefined;
|
|
143
179
|
}
|
|
144
180
|
render() {
|
|
145
|
-
return (h(Host, { key: '
|
|
181
|
+
return (h(Host, { key: '5587a60f279a66d0610ab0dd5f9e64510fe47313' }, this.label && (h("label", { key: 'cc4d3718b5eba3f87dd91be2be2d8bfcccbad7db', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: 'a40ed7693272f9bdbcec81afa3f6f81ea6aa3dac', 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, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'b574a65d362071b4528f87013a5349f63f0b1768', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '061d995029cd884daa9f7c228ade06036369bb24', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
146
182
|
}
|
|
147
183
|
};
|
|
148
184
|
ChInput.style = chInputCss();
|
|
@@ -218,11 +254,37 @@ const ChSelect = class {
|
|
|
218
254
|
return undefined;
|
|
219
255
|
}
|
|
220
256
|
render() {
|
|
221
|
-
return (h(Host, { key: '
|
|
257
|
+
return (h(Host, { key: '90aaf1fa70da54071539de8a22ebe9373f2ae90a' }, this.label && (h("label", { key: '8b14b4deb611c4f1eb496c6f0d3fa58b7c4342b6', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: 'c93b4ba079e9e61ef5bb2392256545af73263665', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: 'df8e97bdb0bd3e5426558027d34c1eb63ee76f1e', value: "", disabled: true, hidden: true, selected: !this.value }, this.placeholder)), this.options.map(option => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label)))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '6b6078e31a1a2f183951f5ada63a5e7e7f582f96', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'f7791b37b8660441a43a6b45d99472b2df7df0ab', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
222
258
|
}
|
|
223
259
|
};
|
|
224
260
|
ChSelect.style = chSelectCss();
|
|
225
261
|
|
|
262
|
+
const chSpinnerCss = () => `:host{display:inline-block;vertical-align:middle}.spinner{display:block;box-sizing:border-box;width:1em;height:1em;border:0.125em solid currentColor;border-top-color:transparent;border-radius:50%;animation:ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite}.spinner--sm{font-size:var(--typography-size-sm)}.spinner--md{font-size:var(--typography-size-lg)}.spinner--lg{font-size:var(--typography-size-xl)}@keyframes ch-spinner-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:calc(var(--duration-spin) * 4)}}`;
|
|
263
|
+
|
|
264
|
+
const ChSpinner = class {
|
|
265
|
+
constructor(hostRef) {
|
|
266
|
+
registerInstance(this, hostRef);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a
|
|
270
|
+
* font-size and the spinner is drawn in `em`, so it also scales with an
|
|
271
|
+
* inherited font-size.
|
|
272
|
+
*/
|
|
273
|
+
size = 'md';
|
|
274
|
+
/**
|
|
275
|
+
* Accessible label announced while the spinner is visible, e.g. `Cargando
|
|
276
|
+
* resultados`. When omitted the spinner is treated as decorative and hidden
|
|
277
|
+
* from assistive technology — the right behaviour next to visible loading
|
|
278
|
+
* text, which would otherwise be announced twice.
|
|
279
|
+
*/
|
|
280
|
+
label;
|
|
281
|
+
render() {
|
|
282
|
+
const labelled = Boolean(this.label);
|
|
283
|
+
return (h(Host, { key: 'dc7c7e19f6a6878680555b0d7dbd84f5dc5774c8' }, h("span", { key: 'd29d5f3344ae578d2a28382b13b45b901d41e52b', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
ChSpinner.style = chSpinnerCss();
|
|
287
|
+
|
|
226
288
|
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)}.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)}`;
|
|
227
289
|
|
|
228
290
|
let switchIds = 0;
|
|
@@ -290,12 +352,12 @@ const ChSwitch = class {
|
|
|
290
352
|
return undefined;
|
|
291
353
|
}
|
|
292
354
|
render() {
|
|
293
|
-
return (h(Host, { key: '
|
|
355
|
+
return (h(Host, { key: 'a128c7c2e1585f9a71518600938ec9a3e9d8a4d4' }, h("label", { key: '36f4c5cba4e01a50d2aef68c8114ea77991cd11d', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.switchId }, h("input", { key: '9fbf7fc62f8e9a164c3eceb4981288d848e14165', 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, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: 'b5e6e89d183871b88f423c83097c7aaed3a62fe8', class: "track" }, h("span", { key: 'cd092c415e40b88f31a72c8f07df0a7d8e09f03e', class: "thumb" })), this.label && h("span", { key: '58032729eae055013e19e8ac3d2acac959e0f333', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '37ee421f7d76991d1d040a04402f1da4eaf22397', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '5ecaa144451f07ecce26e839f757ee53fbdc7265', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
294
356
|
}
|
|
295
357
|
};
|
|
296
358
|
ChSwitch.style = chSwitchCss();
|
|
297
359
|
|
|
298
|
-
export { ChBadge as ch_badge, ChButton as ch_button, ChCard as ch_card, ChInput as ch_input, ChSelect as ch_select, ChSwitch as ch_switch };
|
|
299
|
-
//# sourceMappingURL=ch-badge.ch-button.ch-card.ch-input.ch-select.ch-switch.entry.js.map
|
|
360
|
+
export { ChAlert as ch_alert, ChBadge as ch_badge, ChButton as ch_button, ChCard as ch_card, ChInput as ch_input, ChSelect as ch_select, ChSpinner as ch_spinner, ChSwitch as ch_switch };
|
|
361
|
+
//# sourceMappingURL=ch-alert.ch-badge.ch-button.ch-card.ch-input.ch-select.ch-spinner.ch-switch.entry.js.map
|
|
300
362
|
|
|
301
|
-
//# sourceMappingURL=ch-
|
|
363
|
+
//# sourceMappingURL=ch-alert_8.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"ch-alert_8.entry.js","mappings":";;AAAA,MAAM,UAAU,GAAG,MAAM,CAAC,m2CAAm2C,CAAC;;MCkBj3C,OAAO,GAAA,MAAA;;;;;AAClB;;;;AAIG;IACK,OAAO,GAAmB,SAAS;AAE3C;;;;AAIG;AACK,IAAA,YAAY;AAEpB;;;;;AAKG;AACM,IAAA,SAAS;IAEV,aAAa,GAAG,MAAK;AAC3B,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;AACvB,KAAC;IAED,MAAM,GAAA;AACJ,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,OAAO,GAAG,QAAQ;AAE5D,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAIH,CAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA,OAAA,EAAU,IAAI,CAAC,OAAO,CAAA,CAAE,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAA,EAClF,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAa,CACT,EACL,IAAI,CAAC,YAAY,KAChB,+DAAQ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AA,0CAAA,EAAM,KAAK,EAAC,OAAO,EAAA,EACjB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,OAAO,EAAA,CAAQ,CACtB,EACN,IAAI,CAAC,KAAK,IAAI,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,YAAY,EAAA,EAAE,IAAI,CAAC,KAAK,CAAQ,CACrD,EACP,IAAI,CAAC,IAAI,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,KAChD,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,MAAM,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,EAAA,EAC5B,IAAI,CAAC,IAAI,CACR,CACL,EACA,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,KAChC,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,OAAO,EAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAC,OAAO,EAAA,EAC5C,IAAI,CAAC,YAAY,CAChB,CACL,CACI;;;;;;;","names":[],"sources":["src/components/ch-alert/ch-alert.css?tag=ch-alert&encapsulation=shadow","src/components/ch-alert/ch-alert.tsx","src/components/ch-badge/ch-badge.css?tag=ch-badge&encapsulation=shadow","src/components/ch-badge/ch-badge.tsx","src/components/ch-button/ch-button.css?tag=ch-button&encapsulation=shadow","src/components/ch-button/ch-button.tsx","src/components/ch-card/ch-card.css?tag=ch-card&encapsulation=shadow","src/components/ch-card/ch-card.tsx","src/components/ch-input/ch-input.css?tag=ch-input&encapsulation=shadow","src/components/ch-input/ch-input.tsx","src/components/ch-select/ch-select.css?tag=ch-select&encapsulation=shadow","src/components/ch-select/ch-select.tsx","src/components/ch-spinner/ch-spinner.css?tag=ch-spinner&encapsulation=shadow","src/components/ch-spinner/ch-spinner.tsx","src/components/ch-switch/ch-switch.css?tag=ch-switch&encapsulation=shadow","src/components/ch-switch/ch-switch.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.alert {\n display: flex;\n align-items: flex-start;\n gap: var(--spacing-2xl);\n padding: var(--spacing-2xl) var(--spacing-3xl);\n border: var(--border-width) solid transparent;\n border-radius: var(--radius);\n font-size: var(--typography-size-sm);\n line-height: 1.5;\n}\n\n.alert-content {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.alert--default {\n color: var(--text);\n background: var(--surface);\n border-color: var(--border);\n}\n\n.alert--positive {\n color: var(--color-status-positive);\n background: var(--color-status-positive-background);\n border-color: var(--color-status-positive);\n}\n\n.alert--warning {\n color: var(--color-status-warning);\n background: var(--color-status-warning-background);\n border-color: var(--color-status-warning);\n}\n\n.alert-dismiss {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n padding: var(--spacing-2xs) var(--spacing-md);\n border: 0;\n border-radius: var(--radius);\n background: none;\n color: inherit;\n cursor: pointer;\n font-family: var(--font-heading);\n font-size: var(--typography-size-lg);\n line-height: 1;\n transition: background-color var(--duration-normal) var(--easing-default);\n}\n\n.alert-dismiss:hover {\n background: var(--surface-hover);\n}\n\n.alert-dismiss:focus-visible {\n outline: var(--focus-outline-width) solid currentColor;\n outline-offset: var(--focus-outline-offset);\n}\n\n@media (pointer: coarse) {\n .alert-dismiss {\n min-width: 44px;\n min-height: 44px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .alert-dismiss {\n transition: none;\n }\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChAlertVariant = 'default' | 'positive' | 'warning';\n\n/**\n * Block-level status message.\n *\n * `warning` carries `role=\"alert\"` and is announced assertively; `default` and\n * `positive` use `role=\"status\"`, since a confirmation is not urgent enough to\n * interrupt. Both announce reliably when the alert is added to the page in\n * response to something — an alert already present at load may not be read out,\n * which is how live regions work rather than something this component controls.\n */\n@Component({\n tag: 'ch-alert',\n styleUrl: 'ch-alert.css',\n shadow: true,\n})\nexport class ChAlert {\n /**\n * The kind of message. `default` is neutral, `positive` confirms, and\n * `warning` covers both warnings and errors — the token scale has a single\n * status colour for the two of them.\n */\n @Prop() variant: ChAlertVariant = 'default';\n\n /**\n * Accessible label for the dismiss button, set as `aria-label`. Setting it\n * is what adds the button: the button's only content is a decorative glyph,\n * so without a label it would have no accessible name at all.\n */\n @Prop() dismissLabel?: string;\n\n /**\n * Emitted when the dismiss button is clicked. The alert stays in the DOM —\n * whether to remove it is the consumer's decision. If you do remove it, move\n * focus somewhere sensible first: removing the focused button drops focus to\n * `<body>`.\n */\n @Event() chDismiss: EventEmitter<void>;\n\n private handleDismiss = () => {\n this.chDismiss.emit();\n };\n\n render() {\n const role = this.variant === 'warning' ? 'alert' : 'status';\n\n return (\n <Host>\n {/* Keyed on the role so a variant change replaces the node instead of\n mutating its role in place, which assistive technology does not\n reliably re-announce. */}\n <div key={role} class={{ alert: true, [`alert--${this.variant}`]: true }} role={role}>\n <div class=\"alert-content\">\n <slot></slot>\n </div>\n {this.dismissLabel && (\n <button class=\"alert-dismiss\" type=\"button\" aria-label={this.dismissLabel} onClick={this.handleDismiss}>\n <span aria-hidden=\"true\">×</span>\n </button>\n )}\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.badge {\n display: inline-block;\n padding: var(--spacing-2xs) var(--spacing-lg);\n border-radius: var(--radius-pill);\n font-size: var(--typography-size-xs);\n font-weight: var(--typography-weight-semibold);\n text-transform: uppercase;\n letter-spacing: var(--typography-tracking-badge);\n}\n\n.badge--default {\n background: var(--color-surface-hover);\n color: var(--accent);\n}\n\n.badge--positive {\n background: var(--color-status-positive-background);\n color: var(--color-status-positive);\n}\n.badge--warning {\n background: var(--color-status-warning-background);\n color: var(--color-status-warning);\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChBadgeVariant = 'default' | 'positive' | 'warning';\n\n@Component({\n tag: 'ch-badge',\n styleUrl: 'ch-badge.css',\n shadow: true,\n})\nexport class ChBadge {\n /**\n * The visual style of the badge. Either `default`, `positive`, or `warning`.\n */\n @Prop() variant: ChBadgeVariant = 'default';\n\n render() {\n return (\n <Host>\n <span class={{ badge: true, [`badge--${this.variant}`]: true }}>\n <slot></slot>\n </span>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.btn {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-sm);\n border: none;\n cursor: pointer;\n font-family: inherit;\n font-size: inherit;\n}\n\n.btn:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.btn:focus-visible {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n.btn--primary {\n background-color: var(--accent);\n color: var(--color-accent-text);\n font-weight: var(--typography-weight-bold);\n padding: var(--spacing-xs) var(--spacing-xl);\n border-radius: var(--radius-pill);\n transition:\n background-color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default);\n}\n\n.btn--primary:hover {\n background-color: var(--accent-hover);\n transform: translateY(calc(-1 * var(--spacing-elevate)));\n}\n\n.btn--secondary {\n background-color: transparent;\n color: var(--text);\n font-weight: var(--typography-weight-bold);\n padding: var(--spacing-xs) var(--spacing-xl);\n border-radius: var(--radius-pill);\n border: var(--border-width) solid var(--border);\n transition:\n border-color var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default);\n}\n\n.btn--secondary:hover {\n border-color: var(--border-hover);\n background-color: var(--surface-hover);\n transform: translateY(calc(-1 * var(--spacing-elevate)));\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport type ChButtonVariant = 'primary' | 'secondary';\n\n@Component({\n tag: 'ch-button',\n styleUrl: 'ch-button.css',\n shadow: true,\n})\nexport class ChButton {\n /**\n * The visual style of the button. Either `primary` or `secondary`.\n */\n @Prop() variant: ChButtonVariant = 'primary';\n\n /**\n * Whether the button is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Accessible label set as `aria-label` on the native `<button>`. Use it\n * when the button's content doesn't convey its purpose on its own (e.g.\n * an icon-only button).\n */\n @Prop() label?: string;\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() chClick: EventEmitter<MouseEvent>;\n\n private handleClick = (ev: MouseEvent) => {\n this.chClick.emit(ev);\n };\n\n render() {\n return (\n <Host>\n <button class={{ btn: true, [`btn--${this.variant}`]: true }} type=\"button\" disabled={this.disabled} aria-label={this.label} onClick={this.handleClick}>\n <slot></slot>\n </button>\n </Host>\n );\n }\n}\n",":host {\n display: block;\n}\n\n::slotted(p) {\n color: var(--text-muted);\n}\n\n.card {\n color: var(--text);\n background: var(--surface);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius);\n padding: var(--spacing-4xl) var(--spacing-5xl);\n backdrop-filter: blur(var(--effect-blur));\n position: relative;\n overflow: hidden;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n transform var(--duration-fast) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.card::before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: var(--border-accent-bar);\n background: var(--accent);\n opacity: 0;\n transition: opacity var(--duration-normal) var(--easing-default);\n}\n\n.card:hover {\n border-color: var(--border-hover);\n transform: translateX(var(--spacing-shift));\n box-shadow: var(--shadow-card-hover);\n}\n\n.card:hover::before {\n opacity: 1;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'ch-card',\n styleUrl: 'ch-card.css',\n shadow: true,\n})\nexport class ChCard {\n render() {\n return (\n <Host>\n <div class=\"card\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n.label {\n display: block;\n margin-bottom: var(--spacing-sm);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n color: var(--text);\n}\n\n.input {\n box-sizing: border-box;\n width: 100%;\n padding: var(--spacing-xl) var(--spacing-3xl);\n border-radius: var(--radius);\n border: var(--border-width) solid var(--border);\n background: var(--surface);\n color: var(--text);\n backdrop-filter: blur(var(--effect-blur));\n font-family: inherit;\n font-size: inherit;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.input::placeholder {\n color: var(--text-muted);\n}\n\n.input:focus {\n border-color: var(--accent);\n box-shadow: var(--shadow-focus-ring);\n outline: none;\n}\n\n.input--invalid {\n border-color: var(--color-status-warning);\n}\n\n.input--invalid:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n.input:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nlet inputIds = 0;\n\n@Component({\n tag: 'ch-input',\n styleUrl: 'ch-input.css',\n shadow: true,\n})\nexport class ChInput {\n private readonly inputId = `ch-input-${++inputIds}`;\n private readonly hintId = `${this.inputId}-hint`;\n private readonly errorId = `${this.inputId}-error`;\n\n /**\n * Visible label rendered above the input and associated with it via\n * `for`/`id`, so assistive technology announces the input's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The type of the input, mirroring the native `<input type>` attribute.\n */\n @Prop() type = 'text';\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value = '';\n\n /**\n * Placeholder text shown when the input is empty.\n */\n @Prop() placeholder?: string;\n\n /**\n * The name of the input, submitted with form data.\n */\n @Prop() name?: string;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Whether the input is required.\n */\n @Prop() required = false;\n\n /**\n * Helper text rendered below the input, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the input is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the input when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the input is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted on every keystroke, with the current input value.\n */\n @Event() chInput: EventEmitter<string>;\n\n /**\n * Emitted when the input value is committed (on native `change`).\n */\n @Event() chChange: EventEmitter<string>;\n\n private handleInput = (ev: InputEvent) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.chInput.emit(this.value);\n };\n\n private handleChange = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.chChange.emit(this.value);\n };\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n </label>\n )}\n <input\n id={this.label ? this.inputId : undefined}\n class={{ 'input': true, 'input--invalid': this.invalid }}\n type={this.type}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n value={this.value}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onInput={this.handleInput}\n onChange={this.handleChange}\n />\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n.label {\n display: block;\n margin-bottom: var(--spacing-sm);\n font-size: var(--typography-size-sm);\n font-weight: var(--typography-weight-semibold);\n color: var(--text);\n}\n\n.select {\n box-sizing: border-box;\n width: 100%;\n padding: var(--spacing-xl) var(--spacing-3xl);\n border-radius: var(--radius);\n border: var(--border-width) solid var(--border);\n background: var(--surface);\n color: var(--text);\n backdrop-filter: blur(var(--effect-blur));\n font-family: inherit;\n font-size: inherit;\n cursor: pointer;\n transition:\n border-color var(--duration-normal) var(--easing-default),\n box-shadow var(--duration-normal) var(--easing-default);\n}\n\n.select:focus {\n border-color: var(--accent);\n box-shadow: var(--shadow-focus-ring);\n outline: none;\n}\n\n.select--invalid {\n border-color: var(--color-status-warning);\n}\n\n.select--invalid:focus {\n border-color: var(--color-status-warning);\n box-shadow: 0 0 0 3px var(--color-status-warning-background);\n}\n\n.select:disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.select option {\n background: var(--bg);\n color: var(--text);\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nexport interface ChSelectOption {\n label: string;\n value: string;\n disabled?: boolean;\n}\n\nlet selectIds = 0;\n\n@Component({\n tag: 'ch-select',\n styleUrl: 'ch-select.css',\n shadow: true,\n})\nexport class ChSelect {\n private readonly selectId = `ch-select-${++selectIds}`;\n private readonly hintId = `${this.selectId}-hint`;\n private readonly errorId = `${this.selectId}-error`;\n\n /**\n * Visible label rendered above the select and associated with it via\n * `for`/`id`, so assistive technology announces the select's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The list of options rendered inside the select.\n */\n @Prop() options: ChSelectOption[] = [];\n\n /**\n * The value of the selected option.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Placeholder shown as a disabled, hidden first option when no value is selected.\n */\n @Prop() placeholder?: string;\n\n /**\n * The name of the select, submitted with form data.\n */\n @Prop() name?: string;\n\n /**\n * Whether the select is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Whether a value is required.\n */\n @Prop() required = false;\n\n /**\n * Helper text rendered below the select, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the select is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the select when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the select is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted when the selected option changes, with the new value.\n */\n @Event() chChange: EventEmitter<string>;\n\n private handleChange = (ev: Event) => {\n this.value = (ev.target as HTMLSelectElement).value;\n this.chChange.emit(this.value);\n };\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n {this.label && (\n <label class=\"label\" htmlFor={this.selectId}>\n {this.label}\n </label>\n )}\n <select\n id={this.label ? this.selectId : undefined}\n class={{ 'select': true, 'select--invalid': this.invalid }}\n name={this.name}\n disabled={this.disabled}\n required={this.required}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onChange={this.handleChange}\n >\n {this.placeholder && (\n <option value=\"\" disabled hidden selected={!this.value}>\n {this.placeholder}\n </option>\n )}\n {this.options.map(option => (\n <option value={option.value} disabled={option.disabled} selected={option.value === this.value}>\n {option.label}\n </option>\n ))}\n </select>\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n vertical-align: middle;\n}\n\n.spinner {\n display: block;\n box-sizing: border-box;\n width: 1em;\n height: 1em;\n border: 0.125em solid currentColor;\n border-top-color: transparent;\n border-radius: 50%;\n animation: ch-spinner-rotate var(--duration-spin) var(--easing-linear) infinite;\n}\n\n.spinner--sm {\n font-size: var(--typography-size-sm);\n}\n\n.spinner--md {\n font-size: var(--typography-size-lg);\n}\n\n.spinner--lg {\n font-size: var(--typography-size-xl);\n}\n\n@keyframes ch-spinner-rotate {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinner {\n animation-duration: calc(var(--duration-spin) * 4);\n }\n}\n","import { Component, Host, Prop, h } from '@stencil/core';\n\nexport type ChSpinnerSize = 'sm' | 'md' | 'lg';\n\n/**\n * Loading indicator.\n *\n * The spinner is drawn in `currentColor`, so it takes the surrounding text\n * colour and stays legible on any surface — inside a primary `ch-button` it\n * picks up the button's own text colour instead of the accent, which would be\n * invisible there. Set `color` on or above the element to change it.\n */\n@Component({\n tag: 'ch-spinner',\n styleUrl: 'ch-spinner.css',\n shadow: true,\n})\nexport class ChSpinner {\n /**\n * The size of the spinner. Either `sm`, `md`, or `lg`. Each size sets a\n * font-size and the spinner is drawn in `em`, so it also scales with an\n * inherited font-size.\n */\n @Prop() size: ChSpinnerSize = 'md';\n\n /**\n * Accessible label announced while the spinner is visible, e.g. `Cargando\n * resultados`. When omitted the spinner is treated as decorative and hidden\n * from assistive technology — the right behaviour next to visible loading\n * text, which would otherwise be announced twice.\n */\n @Prop() label?: string;\n\n render() {\n const labelled = Boolean(this.label);\n\n return (\n <Host>\n <span\n class={{ spinner: true, [`spinner--${this.size}`]: true }}\n role={labelled ? 'status' : undefined}\n aria-label={labelled ? this.label : undefined}\n aria-hidden={labelled ? undefined : 'true'}\n ></span>\n </Host>\n );\n }\n}\n",":host {\n display: inline-block;\n}\n\n.control {\n position: relative;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-lg);\n cursor: pointer;\n}\n\n.control--disabled {\n opacity: var(--opacity-disabled);\n cursor: not-allowed;\n}\n\n.input {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.input:focus-visible ~ .track {\n outline: var(--focus-outline-width) solid var(--accent);\n outline-offset: var(--focus-outline-offset);\n}\n\n.track {\n position: relative;\n box-sizing: border-box;\n width: var(--spacing-6xl);\n height: var(--spacing-5xl);\n flex-shrink: 0;\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius-pill);\n background: var(--surface);\n transition:\n border-color var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default);\n}\n\n.thumb {\n position: absolute;\n top: 50%;\n left: var(--spacing-2xs);\n width: var(--spacing-2xl);\n height: var(--spacing-2xl);\n border-radius: 50%;\n background: var(--text-muted);\n transform: translateY(-50%);\n transition:\n left var(--duration-normal) var(--easing-default),\n background-color var(--duration-normal) var(--easing-default);\n}\n\n.input:checked ~ .track {\n border-color: var(--accent);\n background: var(--accent);\n}\n\n.input:checked ~ .track .thumb {\n left: calc(100% - var(--spacing-2xl) - var(--spacing-2xs));\n background: var(--color-accent-text);\n}\n\n.input--invalid ~ .track {\n border-color: var(--color-status-warning);\n}\n\n.input--invalid:focus-visible ~ .track {\n outline-color: var(--color-status-warning);\n}\n\n.label-text {\n color: var(--text);\n}\n\n.hint,\n.error {\n margin: var(--spacing-sm) 0 0;\n font-size: var(--typography-size-sm);\n color: var(--text-muted);\n}\n\n.error {\n color: var(--color-status-warning);\n}\n","import { Component, Event, type EventEmitter, Host, Prop, h } from '@stencil/core';\n\nlet switchIds = 0;\n\n@Component({\n tag: 'ch-switch',\n styleUrl: 'ch-switch.css',\n shadow: true,\n})\nexport class ChSwitch {\n private readonly switchId = `ch-switch-${++switchIds}`;\n private readonly hintId = `${this.switchId}-hint`;\n private readonly errorId = `${this.switchId}-error`;\n\n /**\n * Visible label rendered next to the switch, associated with it via\n * `for`/`id`, so assistive technology announces the switch's purpose.\n */\n @Prop() label?: string;\n\n /**\n * The name of the switch, submitted with form data.\n */\n @Prop() name?: string;\n\n /**\n * The value of the switch, submitted with form data.\n */\n @Prop() value = 'on';\n\n /**\n * Whether the switch is on.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Whether the switch is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Whether the switch is required.\n */\n @Prop() required = false;\n\n /**\n * Helper text rendered below the switch, associated via `aria-describedby`.\n * Replaced by `errorMessage` when the switch is invalid.\n */\n @Prop() hint?: string;\n\n /**\n * Error message rendered below the switch when it is invalid.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Whether the switch is in an invalid state; toggles `aria-invalid` and error styling.\n */\n @Prop() invalid = false;\n\n /**\n * Emitted when the switch is toggled, with the new on/off state.\n */\n @Event() chChange: EventEmitter<boolean>;\n\n private handleChange = (ev: Event) => {\n this.checked = (ev.target as HTMLInputElement).checked;\n this.chChange.emit(this.checked);\n };\n\n private get describedBy(): string | undefined {\n if (this.invalid && this.errorMessage) {\n return this.errorId;\n }\n if (this.hint) {\n return this.hintId;\n }\n return undefined;\n }\n\n render() {\n return (\n <Host>\n <label class={{ 'control': true, 'control--disabled': this.disabled }} htmlFor={this.switchId}>\n <input\n id={this.switchId}\n class={{ 'input': true, 'input--invalid': this.invalid }}\n type=\"checkbox\"\n role=\"switch\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n disabled={this.disabled}\n required={this.required}\n aria-checked={this.checked ? 'true' : 'false'}\n aria-invalid={this.invalid ? 'true' : undefined}\n aria-describedby={this.describedBy}\n onChange={this.handleChange}\n />\n <span class=\"track\">\n <span class=\"thumb\"></span>\n </span>\n {this.label && <span class=\"label-text\">{this.label}</span>}\n </label>\n {this.hint && !(this.invalid && this.errorMessage) && (\n <p class=\"hint\" id={this.hintId}>\n {this.hint}\n </p>\n )}\n {this.invalid && this.errorMessage && (\n <p class=\"error\" id={this.errorId} role=\"alert\">\n {this.errorMessage}\n </p>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
2
|
|
|
3
3
|
const chCheckboxCss = () => `:host{display:inline-block}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), background-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent);background:var(--accent)}.input:checked::before{content:'';width:var(--spacing-xs);height:var(--spacing-lg);border:solid var(--color-accent-text);border-width:0 var(--spacing-shift) var(--spacing-shift) 0;transform:rotate(45deg);margin-top:calc(-1 * var(--spacing-2xs))}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}.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)}`;
|
|
4
4
|
|
|
@@ -67,7 +67,7 @@ const ChCheckbox = class {
|
|
|
67
67
|
return undefined;
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h(Host, { key: '
|
|
70
|
+
return (h(Host, { key: '4675fecfe18e63c55133ffb78e6a6c0548804e1b' }, h("label", { key: '334ddbcfd3ef1640d84dc751a127a3fb6d69e722', class: { 'control': true, 'control--disabled': this.disabled }, htmlFor: this.checkboxId }, h("input", { key: 'a251b722681f33d3c96ce04a0ce915b6be71a81c', id: this.checkboxId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), this.label && h("span", { key: '2aa179c9467a1b22e7c37b16da44e677cc10bd69', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'd31d7b78cc4912b4441b0ab17eb44ed22ef67e6e', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'ae43049c16c7c61322785863d0c6e2e90e79d954', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
ChCheckbox.style = chCheckboxCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
2
|
|
|
3
3
|
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%}`;
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@ const ChDivider = class {
|
|
|
11
11
|
*/
|
|
12
12
|
orientation = 'horizontal';
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '888debaaee690d5bbc5e276773f16ac7ead0129a', class: { 'divider--vertical': this.orientation === 'vertical' } }, h("hr", { key: 'ae175f047605cfbe2b24d50e0dab56ac362c49a1', class: { divider: true, [`divider--${this.orientation}`]: true }, "aria-orientation": this.orientation })));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
ChDivider.style = chDividerCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
2
|
|
|
3
3
|
const chLinkCss = () => `:host{display:inline}.link{color:var(--accent);font-weight:var(--typography-weight-semibold);text-decoration:var(--ch-link-text-decoration, underline);text-decoration-thickness:var(--border-width);text-underline-offset:var(--spacing-shift);border-radius:var(--radius-sm);transition:color var(--duration-normal) var(--easing-default), opacity var(--duration-normal) var(--easing-default)}.link:hover{color:var(--accent-hover)}.link:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.link--muted{color:var(--text-muted);text-decoration:none}.link--muted:hover{color:var(--text)}.link--disabled{color:var(--text-muted);text-decoration:none;opacity:var(--opacity-disabled);cursor:not-allowed}`;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
2
|
|
|
3
3
|
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)}.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)}`;
|
|
4
4
|
|
|
@@ -70,7 +70,7 @@ const ChRadio = class {
|
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
72
|
const groupName = this.name || `${this.groupId}-group`;
|
|
73
|
-
return (h(Host, { key: '
|
|
73
|
+
return (h(Host, { key: '68ce563b4a03669b76ff3822705b1ff92c4c02f2' }, this.label && (h("span", { key: '1887f5b70a5bf9f049495d76588458181d3f7735', class: "group-label", id: this.labelId }, this.label)), h("div", { key: 'c38ee340f9527e16c5587f2309f91ea463bb7cad', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (h("label", { class: { 'control': true, 'control--disabled': this.disabled || option.disabled } }, h("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { class: "mark" }), h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'ad60ce772279809ee334fc30182be1d0350d5586', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '316c911f9e1a29d17cc2d6b0e60ed35755420ae2', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
ChRadio.style = chRadioCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
2
|
|
|
3
3
|
const chTabsCss = () => `:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;
|
|
4
4
|
|
|
@@ -84,7 +84,7 @@ const ChTabs = class {
|
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
86
|
const active = this.activeValue;
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '0467e7ea24884d4c19c33b736a07303569dfaa3b' }, h("div", { key: '8ad451816ef31809c82486f3c9dd36b6e89e77e5', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
|
|
88
88
|
const selected = tab.value === active;
|
|
89
89
|
return (h("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
|
|
90
90
|
})), this.tabs.map(tab => (h("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, h("slot", { name: `panel-${tab.value}` }))))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-pfWAsOzE.js';
|
|
2
2
|
|
|
3
3
|
const chTextareaCss = () => `: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)}.textarea{box-sizing:border-box;width:100%;min-height:var(--spacing-6xl);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;line-height:var(--spacing-5xl);resize:vertical;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.textarea::placeholder{color:var(--text-muted)}.textarea:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.textarea--invalid{border-color:var(--color-status-warning)}.textarea--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.textarea: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)}`;
|
|
4
4
|
|
|
@@ -81,7 +81,7 @@ const ChTextarea = class {
|
|
|
81
81
|
return undefined;
|
|
82
82
|
}
|
|
83
83
|
render() {
|
|
84
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '894524247096933b3d2f9cd5897da2c10133cefb' }, this.label && (h("label", { key: '1e1d409f458fb7431eb2670ddf2c4146bf28060f', class: "label", htmlFor: this.textareaId }, this.label)), h("textarea", { key: '9e2cd4f388bc31df4d498d8e32d88be063b557f1', 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, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: 'cea50156d745ca55ef6da857c5302c8e04ceb483', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: 'ea525c23bf381f8382e134c01ea76086d84164da', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
ChTextarea.style = chTextareaCss();
|
package/dist/esm/chucao.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-pfWAsOzE.js';
|
|
2
|
+
export { s as setNonce } from './index-pfWAsOzE.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Patch Browser v4.
|
|
5
|
+
Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
var patchBrowser = () => {
|
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["ch-
|
|
19
|
+
return bootstrapLazy([["ch-alert_8",[[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[769,"ch-button",{"variant":[1],"disabled":[4],"label":[1]}],[257,"ch-card"],[513,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-spinner",{"size":[1],"label":[1]}],[513,"ch-switch",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-accordion",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox",[[513,"ch-checkbox",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-divider",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-radio",[[513,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tabs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea",[[513,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
//# sourceMappingURL=chucao.js.map
|
|
22
22
|
|
package/dist/esm/chucao.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chucao.js","sources":["node_modules/.pnpm/@stencil+core@4.
|
|
1
|
+
{"version":3,"file":"chucao.js","sources":["node_modules/.pnpm/@stencil+core@4.44.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG;AACpC,EAAE,MAAM,IAAI,GAAiE,EAAE;AAC/E,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI;AACrD;AACA,EAAE,OAAO,cAAc,CAAC,IAAI,CAAC;AAC7B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAM,aAAa,EAAE;AACvB,EAAE,OAAO,aAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D,CAAC,CAAC","x_google_ignoreList":[0]}
|
|
@@ -2,10 +2,10 @@ const NAMESPACE = 'chucao';
|
|
|
2
2
|
const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
|
|
3
3
|
|
|
4
4
|
const globalScripts = () => {};
|
|
5
|
-
const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--easing-default:ease;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
|
|
5
|
+
const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--duration-spin:800ms;--easing-default:ease;--easing-linear:linear;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.44.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
@@ -114,7 +114,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
114
114
|
|
|
115
115
|
// src/client/client-load-module.ts
|
|
116
116
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
117
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
117
118
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
119
|
+
var _a;
|
|
118
120
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
119
121
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
120
122
|
if (!bundleId) {
|
|
@@ -124,21 +126,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
124
126
|
if (module) {
|
|
125
127
|
return module[exportName];
|
|
126
128
|
}
|
|
129
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
130
|
+
const cacheBustParams = [
|
|
131
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
132
|
+
""
|
|
133
|
+
].filter(Boolean).join("&");
|
|
127
134
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
128
135
|
return import(
|
|
129
136
|
/* @vite-ignore */
|
|
130
137
|
/* webpackInclude: /\.entry\.js$/ */
|
|
131
138
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
132
139
|
/* webpackMode: "lazy" */
|
|
133
|
-
`./${bundleId}.entry.js${""}`
|
|
140
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
134
141
|
).then(
|
|
135
142
|
(importedModule) => {
|
|
136
143
|
{
|
|
144
|
+
failedLoadAttempts.delete(bundleId);
|
|
137
145
|
cmpModules.set(bundleId, importedModule);
|
|
138
146
|
}
|
|
139
147
|
return importedModule[exportName];
|
|
140
148
|
},
|
|
141
149
|
(e) => {
|
|
150
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
142
151
|
consoleError(e, hostRef.$hostElement$);
|
|
143
152
|
}
|
|
144
153
|
);
|
|
@@ -157,6 +166,8 @@ var HYDRATE_ID = "s-id";
|
|
|
157
166
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
158
167
|
var HYDRATE_CHILD_ID = "c-id";
|
|
159
168
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
169
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
170
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
160
171
|
var win = typeof window !== "undefined" ? window : {};
|
|
161
172
|
var plt = {
|
|
162
173
|
$flags$: 0,
|
|
@@ -183,6 +194,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
183
194
|
var queuePending = false;
|
|
184
195
|
var queueDomReads = [];
|
|
185
196
|
var queueDomWrites = [];
|
|
197
|
+
var scheduleFlush = () => {
|
|
198
|
+
var _a;
|
|
199
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
200
|
+
};
|
|
186
201
|
var queueTask = (queue, write) => (cb) => {
|
|
187
202
|
queue.push(cb);
|
|
188
203
|
if (!queuePending) {
|
|
@@ -190,7 +205,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
190
205
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
191
206
|
nextTick(flush);
|
|
192
207
|
} else {
|
|
193
|
-
|
|
208
|
+
scheduleFlush();
|
|
194
209
|
}
|
|
195
210
|
}
|
|
196
211
|
};
|
|
@@ -209,7 +224,7 @@ var flush = () => {
|
|
|
209
224
|
{
|
|
210
225
|
consume(queueDomWrites);
|
|
211
226
|
if (queuePending = queueDomReads.length > 0) {
|
|
212
|
-
|
|
227
|
+
scheduleFlush();
|
|
213
228
|
}
|
|
214
229
|
}
|
|
215
230
|
};
|
|
@@ -504,6 +519,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
504
519
|
} else if (child != null && typeof child !== "boolean") {
|
|
505
520
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
506
521
|
child = String(child);
|
|
522
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
523
|
+
{
|
|
524
|
+
consoleError("Invalid vNode child");
|
|
525
|
+
}
|
|
526
|
+
continue;
|
|
507
527
|
}
|
|
508
528
|
if (simple && lastSimple) {
|
|
509
529
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -1870,10 +1890,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1870
1890
|
|
|
1871
1891
|
// src/runtime/initialize-component.ts
|
|
1872
1892
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1893
|
+
var _a;
|
|
1873
1894
|
let Cstr;
|
|
1874
1895
|
try {
|
|
1875
1896
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1876
1897
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1898
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1877
1899
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1878
1900
|
if (bundleId) {
|
|
1879
1901
|
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
@@ -1885,6 +1907,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1885
1907
|
Cstr = CstrImport;
|
|
1886
1908
|
}
|
|
1887
1909
|
if (!Cstr) {
|
|
1910
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1911
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1912
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1913
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1914
|
+
}
|
|
1888
1915
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1889
1916
|
}
|
|
1890
1917
|
if (!Cstr.isProxied) {
|
|
@@ -1938,7 +1965,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1938
1965
|
hostRef.$onRenderResolve$();
|
|
1939
1966
|
hostRef.$onRenderResolve$ = void 0;
|
|
1940
1967
|
}
|
|
1941
|
-
if (hostRef.$onReadyResolve$) {
|
|
1968
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
1942
1969
|
hostRef.$onReadyResolve$(elm);
|
|
1943
1970
|
}
|
|
1944
1971
|
}
|
|
@@ -1995,6 +2022,8 @@ var connectedCallback = (elm) => {
|
|
|
1995
2022
|
} else {
|
|
1996
2023
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1997
2024
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2025
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
2026
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
1998
2027
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1999
2028
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
2000
2029
|
}
|
|
@@ -2104,7 +2133,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2104
2133
|
}
|
|
2105
2134
|
disconnectedCallback() {
|
|
2106
2135
|
plt.jmp(() => disconnectedCallback(this));
|
|
2107
|
-
|
|
2136
|
+
nextTick(() => {
|
|
2108
2137
|
var _a3;
|
|
2109
2138
|
const hostRef = getHostRef(this);
|
|
2110
2139
|
if (!hostRef) {
|
|
@@ -2162,6 +2191,6 @@ function transformTag(tag) {
|
|
|
2162
2191
|
}
|
|
2163
2192
|
|
|
2164
2193
|
export { Host as H, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2165
|
-
//# sourceMappingURL=index-
|
|
2194
|
+
//# sourceMappingURL=index-pfWAsOzE.js.map
|
|
2166
2195
|
|
|
2167
|
-
//# sourceMappingURL=index-
|
|
2196
|
+
//# sourceMappingURL=index-pfWAsOzE.js.map
|