@devschile/chucao 1.8.0 → 2.1.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 +3 -0
- package/dist/chucao/chucao.esm.js +1 -1
- package/dist/chucao/chucao.esm.js.map +1 -1
- package/dist/chucao/{p-e8fe65bb.entry.js → p-04dbcfa0.entry.js} +2 -2
- package/dist/chucao/p-11083711.entry.js +2 -0
- package/dist/chucao/p-11083711.entry.js.map +1 -0
- package/dist/chucao/{p-cfb6db53.entry.js → p-121fbfc8.entry.js} +2 -2
- package/dist/chucao/p-1b1e56cd.entry.js +2 -0
- package/dist/chucao/p-1b1e56cd.entry.js.map +1 -0
- package/dist/chucao/{p-df73f786.entry.js → p-2ab4a6a8.entry.js} +2 -2
- package/dist/chucao/p-4bc8e098.entry.js +2 -0
- package/dist/chucao/p-4bc8e098.entry.js.map +1 -0
- package/dist/chucao/p-5fe8bfff.entry.js +2 -0
- package/dist/chucao/p-5fe8bfff.entry.js.map +1 -0
- package/dist/chucao/p-9bb81a65.entry.js +2 -0
- package/dist/chucao/p-9bb81a65.entry.js.map +1 -0
- package/dist/chucao/p-DWC12BJ-.js +3 -0
- package/dist/chucao/p-DWC12BJ-.js.map +1 -0
- package/dist/chucao/{p-2d7e81b2.entry.js → p-a955eebf.entry.js} +2 -2
- package/dist/chucao/{p-cbb2b478.entry.js → p-d5a9e340.entry.js} +2 -2
- package/dist/chucao/{p-1cc7042e.entry.js → p-ff5f5c1f.entry.js} +2 -2
- package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
- package/dist/cjs/ch-alert_8.cjs.entry.js +186 -9
- package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-checkbox.cjs.entry.js +62 -3
- package/dist/cjs/ch-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-divider.cjs.entry.js +1 -1
- package/dist/cjs/ch-emoji.cjs.entry.js +104 -0
- package/dist/cjs/ch-emoji.cjs.entry.js.map +1 -0
- package/dist/cjs/ch-link.cjs.entry.js +1 -1
- package/dist/cjs/ch-modal.cjs.entry.js +2 -2
- package/dist/cjs/ch-radio.cjs.entry.js +62 -3
- package/dist/cjs/ch-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ch-textarea.cjs.entry.js +62 -3
- package/dist/cjs/ch-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/ch-tooltip.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-DMeDkSQU.js → index-C9cpLteP.js} +71 -12
- package/dist/cjs/index-C9cpLteP.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ch-card/ch-card.js +1 -1
- package/dist/collection/components/ch-checkbox/ch-checkbox.css +10 -0
- package/dist/collection/components/ch-checkbox/ch-checkbox.js +64 -4
- package/dist/collection/components/ch-checkbox/ch-checkbox.js.map +1 -1
- package/dist/collection/components/ch-emoji/ch-emoji.css +33 -0
- package/dist/collection/components/ch-emoji/ch-emoji.js +151 -0
- package/dist/collection/components/ch-emoji/ch-emoji.js.map +1 -0
- package/dist/collection/components/ch-input/ch-input.css +11 -0
- package/dist/collection/components/ch-input/ch-input.js +64 -4
- package/dist/collection/components/ch-input/ch-input.js.map +1 -1
- package/dist/collection/components/ch-modal/ch-modal.js +1 -1
- package/dist/collection/components/ch-radio/ch-radio.css +10 -0
- package/dist/collection/components/ch-radio/ch-radio.js +64 -4
- package/dist/collection/components/ch-radio/ch-radio.js.map +1 -1
- package/dist/collection/components/ch-select/ch-select.css +11 -0
- package/dist/collection/components/ch-select/ch-select.js +64 -4
- package/dist/collection/components/ch-select/ch-select.js.map +1 -1
- package/dist/collection/components/ch-spinner/ch-spinner.js +1 -1
- package/dist/collection/components/ch-switch/ch-switch.css +10 -0
- package/dist/collection/components/ch-switch/ch-switch.js +64 -4
- package/dist/collection/components/ch-switch/ch-switch.js.map +1 -1
- package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
- package/dist/collection/components/ch-textarea/ch-textarea.css +11 -0
- package/dist/collection/components/ch-textarea/ch-textarea.js +64 -4
- package/dist/collection/components/ch-textarea/ch-textarea.js.map +1 -1
- package/dist/collection/components/ch-tooltip/ch-tooltip.js +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-checkbox.js +1 -1
- package/dist/components/ch-checkbox.js.map +1 -1
- package/dist/components/ch-divider.js +1 -1
- package/dist/components/ch-emoji.d.ts +11 -0
- package/dist/components/ch-emoji.js +2 -0
- package/dist/components/ch-emoji.js.map +1 -0
- package/dist/components/ch-input.js +1 -1
- package/dist/components/ch-input.js.map +1 -1
- package/dist/components/ch-link.js +1 -1
- package/dist/components/ch-modal.js +1 -1
- package/dist/components/ch-radio.js +1 -1
- package/dist/components/ch-radio.js.map +1 -1
- package/dist/components/ch-select.js +1 -1
- package/dist/components/ch-select.js.map +1 -1
- package/dist/components/ch-spinner.js +1 -1
- package/dist/components/ch-switch.js +1 -1
- package/dist/components/ch-switch.js.map +1 -1
- package/dist/components/ch-tabs.js +1 -1
- package/dist/components/ch-textarea.js +1 -1
- package/dist/components/ch-textarea.js.map +1 -1
- package/dist/components/ch-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BhAZrOxf.js +2 -0
- package/dist/components/p-BhAZrOxf.js.map +1 -0
- package/dist/esm/ch-accordion.entry.js +1 -1
- package/dist/esm/ch-alert_8.entry.js +186 -9
- package/dist/esm/ch-alert_8.entry.js.map +1 -1
- package/dist/esm/ch-checkbox.entry.js +62 -3
- package/dist/esm/ch-checkbox.entry.js.map +1 -1
- package/dist/esm/ch-divider.entry.js +1 -1
- package/dist/esm/ch-emoji.entry.js +102 -0
- package/dist/esm/ch-emoji.entry.js.map +1 -0
- package/dist/esm/ch-link.entry.js +1 -1
- package/dist/esm/ch-modal.entry.js +2 -2
- package/dist/esm/ch-radio.entry.js +62 -3
- package/dist/esm/ch-radio.entry.js.map +1 -1
- package/dist/esm/ch-tabs.entry.js +2 -2
- package/dist/esm/ch-textarea.entry.js +62 -3
- package/dist/esm/ch-textarea.entry.js.map +1 -1
- package/dist/esm/ch-tooltip.entry.js +2 -2
- package/dist/esm/chucao.js +4 -4
- package/dist/esm/chucao.js.map +1 -1
- package/dist/esm/{index-Bvah_WQV.js → index-DWC12BJ-.js} +71 -12
- package/dist/esm/index-DWC12BJ-.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/ch-checkbox/ch-checkbox.d.ts +9 -0
- package/dist/types/components/ch-emoji/ch-emoji.d.ts +32 -0
- package/dist/types/components/ch-input/ch-input.d.ts +9 -0
- package/dist/types/components/ch-radio/ch-radio.d.ts +9 -0
- package/dist/types/components/ch-select/ch-select.d.ts +9 -0
- package/dist/types/components/ch-switch/ch-switch.d.ts +9 -0
- package/dist/types/components/ch-textarea/ch-textarea.d.ts +9 -0
- package/dist/types/components.d.ts +96 -0
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist-react/components.d.ts +3 -0
- package/dist-react/components.js +9 -0
- package/dist-react/components.ts +12 -0
- package/dist-vue/index.d.ts +1 -0
- package/dist-vue/index.js +6 -0
- package/dist-vue/index.ts +8 -0
- package/hydrate/index.js +555 -63
- package/hydrate/index.mjs +555 -63
- package/loader/index.d.ts +1 -1
- package/package.json +5 -1
- package/dist/chucao/p-13ab5f9a.entry.js +0 -2
- package/dist/chucao/p-13ab5f9a.entry.js.map +0 -1
- package/dist/chucao/p-23c5220b.entry.js +0 -2
- package/dist/chucao/p-23c5220b.entry.js.map +0 -1
- package/dist/chucao/p-421cda05.entry.js +0 -2
- package/dist/chucao/p-421cda05.entry.js.map +0 -1
- package/dist/chucao/p-Bvah_WQV.js +0 -3
- package/dist/chucao/p-Bvah_WQV.js.map +0 -1
- package/dist/chucao/p-c16b18b7.entry.js +0 -2
- package/dist/chucao/p-c16b18b7.entry.js.map +0 -1
- package/dist/cjs/index-DMeDkSQU.js.map +0 -1
- package/dist/components/p-hyy-cLgi.js +0 -2
- package/dist/components/p-hyy-cLgi.js.map +0 -1
- package/dist/esm/index-Bvah_WQV.js.map +0 -1
- /package/dist/chucao/{p-e8fe65bb.entry.js.map → p-04dbcfa0.entry.js.map} +0 -0
- /package/dist/chucao/{p-cfb6db53.entry.js.map → p-121fbfc8.entry.js.map} +0 -0
- /package/dist/chucao/{p-df73f786.entry.js.map → p-2ab4a6a8.entry.js.map} +0 -0
- /package/dist/chucao/{p-2d7e81b2.entry.js.map → p-a955eebf.entry.js.map} +0 -0
- /package/dist/chucao/{p-cbb2b478.entry.js.map → p-d5a9e340.entry.js.map} +0 -0
- /package/dist/chucao/{p-1cc7042e.entry.js.map → p-ff5f5c1f.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-DWC12BJ-.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,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, a as getElement } from './index-DWC12BJ-.js';
|
|
2
2
|
|
|
3
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
4
|
|
|
@@ -93,12 +93,12 @@ const ChCard = class {
|
|
|
93
93
|
registerInstance(this, hostRef);
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: 'de570a460eff697eb242ef56fcedd5b400d6b03f' }, h("div", { key: '3350619356a929c5d922948d52d6635420dc8547', class: "card" }, h("slot", { key: 'b50679202b5fea142702de0babf62587186d4dc8' }))));
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
ChCard.style = chCardCss();
|
|
100
100
|
|
|
101
|
-
const chInputCss = () => `:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
|
|
101
|
+
const chInputCss = () => `:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.input{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input::placeholder{color:var(--text-muted)}.input:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .input,:host(:user-invalid) .input{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .input:focus,:host(:user-invalid) .input:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.input:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
|
|
102
102
|
|
|
103
103
|
let inputIds = 0;
|
|
104
104
|
const ChInput = class {
|
|
@@ -106,10 +106,21 @@ const ChInput = class {
|
|
|
106
106
|
registerInstance(this, hostRef);
|
|
107
107
|
this.chInput = createEvent(this, "chInput");
|
|
108
108
|
this.chChange = createEvent(this, "chChange");
|
|
109
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
110
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
114
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
115
|
+
}
|
|
109
116
|
}
|
|
110
117
|
inputId = `ch-input-${++inputIds}`;
|
|
111
118
|
hintId = `${this.inputId}-hint`;
|
|
112
119
|
errorId = `${this.inputId}-error`;
|
|
120
|
+
initialValue = '';
|
|
121
|
+
internals;
|
|
122
|
+
formDisabled = false;
|
|
123
|
+
get host() { return getElement(this); }
|
|
113
124
|
/**
|
|
114
125
|
* Visible label rendered above the input and associated with it via
|
|
115
126
|
* `for`/`id`, so assistive technology announces the input's purpose.
|
|
@@ -168,6 +179,39 @@ const ChInput = class {
|
|
|
168
179
|
this.value = ev.target.value;
|
|
169
180
|
this.chChange.emit(this.value);
|
|
170
181
|
};
|
|
182
|
+
syncForm() {
|
|
183
|
+
const internals = this.internals;
|
|
184
|
+
if (typeof internals?.setFormValue !== 'function') {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
internals.setFormValue(this.value);
|
|
188
|
+
const flags = {};
|
|
189
|
+
let message;
|
|
190
|
+
if (this.required && this.value === '') {
|
|
191
|
+
flags.valueMissing = true;
|
|
192
|
+
}
|
|
193
|
+
if (this.invalid && this.errorMessage) {
|
|
194
|
+
flags.customError = true;
|
|
195
|
+
}
|
|
196
|
+
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
197
|
+
internals.setValidity(flags, message);
|
|
198
|
+
}
|
|
199
|
+
componentDidLoad() {
|
|
200
|
+
this.initialValue = this.value;
|
|
201
|
+
this.syncForm();
|
|
202
|
+
this.host.addEventListener('change', this.markTouched);
|
|
203
|
+
this.host.addEventListener('focusout', this.markTouched);
|
|
204
|
+
this.host.addEventListener('invalid', this.markTouched);
|
|
205
|
+
}
|
|
206
|
+
markTouched = () => {
|
|
207
|
+
this.host.setAttribute('data-touched', '');
|
|
208
|
+
};
|
|
209
|
+
formResetCallback() {
|
|
210
|
+
this.value = this.initialValue;
|
|
211
|
+
}
|
|
212
|
+
formDisabledCallback(isDisabled) {
|
|
213
|
+
this.formDisabled = isDisabled;
|
|
214
|
+
}
|
|
171
215
|
get describedBy() {
|
|
172
216
|
if (this.invalid && this.errorMessage) {
|
|
173
217
|
return this.errorId;
|
|
@@ -178,22 +222,48 @@ const ChInput = class {
|
|
|
178
222
|
return undefined;
|
|
179
223
|
}
|
|
180
224
|
render() {
|
|
181
|
-
return (h(Host, { key: '
|
|
225
|
+
return (h(Host, { key: '8a4b7cf5b80097afb849e2de9620fdd205774923' }, this.label && (h("label", { key: '7400206e6c27d61e7b9afadeba8a2131059af59a', class: "label", htmlFor: this.inputId }, this.label)), h("input", { key: '2c4fd9215d5b21f28d57a1c49eeaa64224e21e05', id: this.label ? this.inputId : undefined, class: { 'input': true, 'input--invalid': this.invalid }, type: this.type, name: this.name, placeholder: this.placeholder, disabled: this.disabled || this.formDisabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '6e6a381f81442622784afc480eb79327ae8a8525', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '743215633ca399d801c813194b054d40631b7be6', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
182
226
|
}
|
|
227
|
+
static get formAssociated() { return true; }
|
|
228
|
+
static get watchers() { return {
|
|
229
|
+
"value": [{
|
|
230
|
+
"syncForm": 0
|
|
231
|
+
}],
|
|
232
|
+
"required": [{
|
|
233
|
+
"syncForm": 0
|
|
234
|
+
}],
|
|
235
|
+
"invalid": [{
|
|
236
|
+
"syncForm": 0
|
|
237
|
+
}],
|
|
238
|
+
"errorMessage": [{
|
|
239
|
+
"syncForm": 0
|
|
240
|
+
}]
|
|
241
|
+
}; }
|
|
183
242
|
};
|
|
184
243
|
ChInput.style = chInputCss();
|
|
185
244
|
|
|
186
|
-
const chSelectCss = () => `: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)}.select{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.select:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.select--invalid{border-color:var(--color-status-warning)}.select--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.select:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.select option{background:var(--bg);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)}`;
|
|
245
|
+
const chSelectCss = () => `: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)}.select{box-sizing:border-box;width:100%;padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.select:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.select--invalid{border-color:var(--color-status-warning)}.select--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}:host([data-touched]:invalid) .select,:host(:user-invalid) .select{border-color:var(--color-status-warning)}:host([data-touched]:invalid) .select:focus,:host(:user-invalid) .select:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.select:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.select option{background:var(--bg);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)}`;
|
|
187
246
|
|
|
188
247
|
let selectIds = 0;
|
|
189
248
|
const ChSelect = class {
|
|
190
249
|
constructor(hostRef) {
|
|
191
250
|
registerInstance(this, hostRef);
|
|
192
251
|
this.chChange = createEvent(this, "chChange");
|
|
252
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
253
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
257
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
258
|
+
}
|
|
193
259
|
}
|
|
194
260
|
selectId = `ch-select-${++selectIds}`;
|
|
195
261
|
hintId = `${this.selectId}-hint`;
|
|
196
262
|
errorId = `${this.selectId}-error`;
|
|
263
|
+
initialValue;
|
|
264
|
+
internals;
|
|
265
|
+
formDisabled = false;
|
|
266
|
+
get host() { return getElement(this); }
|
|
197
267
|
/**
|
|
198
268
|
* Visible label rendered above the select and associated with it via
|
|
199
269
|
* `for`/`id`, so assistive technology announces the select's purpose.
|
|
@@ -244,6 +314,39 @@ const ChSelect = class {
|
|
|
244
314
|
this.value = ev.target.value;
|
|
245
315
|
this.chChange.emit(this.value);
|
|
246
316
|
};
|
|
317
|
+
syncForm() {
|
|
318
|
+
const internals = this.internals;
|
|
319
|
+
if (typeof internals?.setFormValue !== 'function') {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
internals.setFormValue(this.value ?? '');
|
|
323
|
+
const flags = {};
|
|
324
|
+
let message;
|
|
325
|
+
if (this.required && !this.value) {
|
|
326
|
+
flags.valueMissing = true;
|
|
327
|
+
}
|
|
328
|
+
if (this.invalid && this.errorMessage) {
|
|
329
|
+
flags.customError = true;
|
|
330
|
+
}
|
|
331
|
+
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
332
|
+
internals.setValidity(flags, message);
|
|
333
|
+
}
|
|
334
|
+
componentDidLoad() {
|
|
335
|
+
this.initialValue = this.value;
|
|
336
|
+
this.syncForm();
|
|
337
|
+
this.host.addEventListener('change', this.markTouched);
|
|
338
|
+
this.host.addEventListener('focusout', this.markTouched);
|
|
339
|
+
this.host.addEventListener('invalid', this.markTouched);
|
|
340
|
+
}
|
|
341
|
+
markTouched = () => {
|
|
342
|
+
this.host.setAttribute('data-touched', '');
|
|
343
|
+
};
|
|
344
|
+
formResetCallback() {
|
|
345
|
+
this.value = this.initialValue;
|
|
346
|
+
}
|
|
347
|
+
formDisabledCallback(isDisabled) {
|
|
348
|
+
this.formDisabled = isDisabled;
|
|
349
|
+
}
|
|
247
350
|
get describedBy() {
|
|
248
351
|
if (this.invalid && this.errorMessage) {
|
|
249
352
|
return this.errorId;
|
|
@@ -254,8 +357,23 @@ const ChSelect = class {
|
|
|
254
357
|
return undefined;
|
|
255
358
|
}
|
|
256
359
|
render() {
|
|
257
|
-
return (h(Host, { key: '
|
|
360
|
+
return (h(Host, { key: 'ffca23504c723f60f7430e6db2e1fa00db1fd4d8' }, this.label && (h("label", { key: '697998ec67f01f3ca2849b1fb2aa88790d98010b', class: "label", htmlFor: this.selectId }, this.label)), h("select", { key: 'f344d240f38dd123bdfd2d34cd15fbc7b5ae0a2c', id: this.label ? this.selectId : undefined, class: { 'select': true, 'select--invalid': this.invalid }, name: this.name, disabled: this.disabled || this.formDisabled, required: this.required, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }, this.placeholder && (h("option", { key: '34200e96dad92ed55632f0430abde5bc34cf6e6a', 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: '55690dbf57cad7c974d0bf1b8eedb733ddc5b571', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '7d4598b112d21ebc96ac04bca553f63dd5825996', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
258
361
|
}
|
|
362
|
+
static get formAssociated() { return true; }
|
|
363
|
+
static get watchers() { return {
|
|
364
|
+
"value": [{
|
|
365
|
+
"syncForm": 0
|
|
366
|
+
}],
|
|
367
|
+
"required": [{
|
|
368
|
+
"syncForm": 0
|
|
369
|
+
}],
|
|
370
|
+
"invalid": [{
|
|
371
|
+
"syncForm": 0
|
|
372
|
+
}],
|
|
373
|
+
"errorMessage": [{
|
|
374
|
+
"syncForm": 0
|
|
375
|
+
}]
|
|
376
|
+
}; }
|
|
259
377
|
};
|
|
260
378
|
ChSelect.style = chSelectCss();
|
|
261
379
|
|
|
@@ -280,22 +398,33 @@ const ChSpinner = class {
|
|
|
280
398
|
label;
|
|
281
399
|
render() {
|
|
282
400
|
const labelled = Boolean(this.label);
|
|
283
|
-
return (h(Host, { key: '
|
|
401
|
+
return (h(Host, { key: '9182eecf066be099714a870fa601f744362e697d' }, h("span", { key: 'd67f2572ab80facadd4d49043a892b16816b4fef', class: { spinner: true, [`spinner--${this.size}`]: true }, role: labelled ? 'status' : undefined, "aria-label": labelled ? this.label : undefined, "aria-hidden": labelled ? undefined : 'true' })));
|
|
284
402
|
}
|
|
285
403
|
};
|
|
286
404
|
ChSpinner.style = chSpinnerCss();
|
|
287
405
|
|
|
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)}`;
|
|
406
|
+
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)}`;
|
|
289
407
|
|
|
290
408
|
let switchIds = 0;
|
|
291
409
|
const ChSwitch = class {
|
|
292
410
|
constructor(hostRef) {
|
|
293
411
|
registerInstance(this, hostRef);
|
|
294
412
|
this.chChange = createEvent(this, "chChange");
|
|
413
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
414
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
418
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
419
|
+
}
|
|
295
420
|
}
|
|
296
421
|
switchId = `ch-switch-${++switchIds}`;
|
|
297
422
|
hintId = `${this.switchId}-hint`;
|
|
298
423
|
errorId = `${this.switchId}-error`;
|
|
424
|
+
initialChecked = false;
|
|
425
|
+
internals;
|
|
426
|
+
formDisabled = false;
|
|
427
|
+
get host() { return getElement(this); }
|
|
299
428
|
/**
|
|
300
429
|
* Visible label rendered next to the switch, associated with it via
|
|
301
430
|
* `for`/`id`, so assistive technology announces the switch's purpose.
|
|
@@ -342,6 +471,39 @@ const ChSwitch = class {
|
|
|
342
471
|
this.checked = ev.target.checked;
|
|
343
472
|
this.chChange.emit(this.checked);
|
|
344
473
|
};
|
|
474
|
+
syncForm() {
|
|
475
|
+
const internals = this.internals;
|
|
476
|
+
if (typeof internals?.setFormValue !== 'function') {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
internals.setFormValue(this.checked ? this.value : null);
|
|
480
|
+
const flags = {};
|
|
481
|
+
let message;
|
|
482
|
+
if (this.required && !this.checked) {
|
|
483
|
+
flags.valueMissing = true;
|
|
484
|
+
}
|
|
485
|
+
if (this.invalid && this.errorMessage) {
|
|
486
|
+
flags.customError = true;
|
|
487
|
+
}
|
|
488
|
+
message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);
|
|
489
|
+
internals.setValidity(flags, message);
|
|
490
|
+
}
|
|
491
|
+
componentDidLoad() {
|
|
492
|
+
this.initialChecked = this.checked;
|
|
493
|
+
this.syncForm();
|
|
494
|
+
this.host.addEventListener('change', this.markTouched);
|
|
495
|
+
this.host.addEventListener('focusout', this.markTouched);
|
|
496
|
+
this.host.addEventListener('invalid', this.markTouched);
|
|
497
|
+
}
|
|
498
|
+
markTouched = () => {
|
|
499
|
+
this.host.setAttribute('data-touched', '');
|
|
500
|
+
};
|
|
501
|
+
formResetCallback() {
|
|
502
|
+
this.checked = this.initialChecked;
|
|
503
|
+
}
|
|
504
|
+
formDisabledCallback(isDisabled) {
|
|
505
|
+
this.formDisabled = isDisabled;
|
|
506
|
+
}
|
|
345
507
|
get describedBy() {
|
|
346
508
|
if (this.invalid && this.errorMessage) {
|
|
347
509
|
return this.errorId;
|
|
@@ -352,8 +514,23 @@ const ChSwitch = class {
|
|
|
352
514
|
return undefined;
|
|
353
515
|
}
|
|
354
516
|
render() {
|
|
355
|
-
return (h(Host, { key: '
|
|
517
|
+
return (h(Host, { key: 'c1a98e9b04710ed014a8c18d6591fee427df0033' }, h("label", { key: '4b14ec7d7709090235b0e9b74a45d4c76dd52f25', class: { 'control': true, 'control--disabled': this.disabled || this.formDisabled }, htmlFor: this.switchId }, h("input", { key: '4f2c9472b3bf34db582a94e307cc8b47b5dfcd38', id: this.switchId, class: { 'input': true, 'input--invalid': this.invalid }, type: "checkbox", role: "switch", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.formDisabled, required: this.required, "aria-checked": this.checked ? 'true' : 'false', "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), h("span", { key: '6b2c20c6242178bba39f105a535bb12fc5198cd0', class: "track" }, h("span", { key: '4ae0e675ce335417b867f6b688ec5545769b2d2c', class: "thumb" })), this.label && h("span", { key: 'd5383fac3349441104c0926a6c88078b85bda05c', class: "label-text" }, this.label)), this.hint && !(this.invalid && this.errorMessage) && (h("p", { key: '41ed07a95f8d627fb4ed8c903b6ba5ee39baa6a5', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (h("p", { key: '71cf8526dec44e2099235e3bc744db2aa53d70f0', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
|
|
356
518
|
}
|
|
519
|
+
static get formAssociated() { return true; }
|
|
520
|
+
static get watchers() { return {
|
|
521
|
+
"checked": [{
|
|
522
|
+
"syncForm": 0
|
|
523
|
+
}],
|
|
524
|
+
"required": [{
|
|
525
|
+
"syncForm": 0
|
|
526
|
+
}],
|
|
527
|
+
"invalid": [{
|
|
528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,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
|
+
{"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,E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AC,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:host([data-touched]:invalid) .input,\n:host(:user-invalid) .input {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .input:focus,\n:host(:user-invalid) .input: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 { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nlet inputIds = 0;\n\n@Component({\n tag: 'ch-input',\n styleUrl: 'ch-input.css',\n shadow: true,\n formAssociated: 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 private initialValue = '';\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\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({ reflect: true }) name?: string;\n\n /**\n * Whether the input is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether the input is required.\n */\n @Prop({ reflect: true }) 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 @Watch('value')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.value);\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && this.value === '') {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialValue = this.value;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.value = this.initialValue;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\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 || this.formDisabled}\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:host([data-touched]:invalid) .select,\n:host(:user-invalid) .select {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .select:focus,\n:host(:user-invalid) .select: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 { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, 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 formAssociated: 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 private initialValue: string | undefined;\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\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({ reflect: true }) name?: string;\n\n /**\n * Whether the select is disabled.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * Whether a value is required.\n */\n @Prop({ reflect: true }) 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 @Watch('value')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.value ?? '');\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && !this.value) {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialValue = this.value;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.value = this.initialValue;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\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 || this.formDisabled}\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:host([data-touched]:invalid) .track,\n:host(:user-invalid) .track {\n border-color: var(--color-status-warning);\n}\n\n:host([data-touched]:invalid) .input:focus-visible ~ .track,\n:host(:user-invalid) .input: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 { AttachInternals, Component, Element, Event, type EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\nlet switchIds = 0;\n\n@Component({\n tag: 'ch-switch',\n styleUrl: 'ch-switch.css',\n shadow: true,\n formAssociated: 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 private initialChecked = false;\n\n @AttachInternals() internals!: ElementInternals;\n @State() formDisabled = false;\n @Element() private host!: HTMLElement;\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({ reflect: true }) 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({ reflect: true }) disabled = false;\n\n /**\n * Whether the switch is required.\n */\n @Prop({ reflect: true }) 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 @Watch('checked')\n @Watch('required')\n @Watch('invalid')\n @Watch('errorMessage')\n protected syncForm(): void {\n const internals = this.internals;\n if (typeof internals?.setFormValue !== 'function') {\n return;\n }\n internals.setFormValue(this.checked ? this.value : null);\n const flags: ValidityStateFlags = {};\n let message: string | undefined;\n if (this.required && !this.checked) {\n flags.valueMissing = true;\n }\n if (this.invalid && this.errorMessage) {\n flags.customError = true;\n }\n message = this.errorMessage ?? (flags.valueMissing ? 'Please fill out this field.' : undefined);\n internals.setValidity(flags, message);\n }\n\n componentDidLoad() {\n this.initialChecked = this.checked;\n this.syncForm();\n this.host.addEventListener('change', this.markTouched);\n this.host.addEventListener('focusout', this.markTouched);\n this.host.addEventListener('invalid', this.markTouched);\n }\n\n private markTouched = (): void => {\n this.host.setAttribute('data-touched', '');\n };\n\n formResetCallback(): void {\n this.checked = this.initialChecked;\n }\n\n formDisabledCallback(isDisabled: boolean): void {\n this.formDisabled = isDisabled;\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 || this.formDisabled }} 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 || this.formDisabled}\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}
|