agnosticui-core 2.0.0-alpha.17 → 2.0.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Checkbox/core/_Checkbox.d.ts +14 -0
- package/dist/components/Checkbox/core/_Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/core/_Checkbox.js +50 -34
- package/dist/components/Radio/core/_Radio.d.ts +26 -3
- package/dist/components/Radio/core/_Radio.d.ts.map +1 -1
- package/dist/components/Radio/core/_Radio.js +153 -110
- package/dist/components/Toggle/core/_Toggle.d.ts +15 -0
- package/dist/components/Toggle/core/_Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/core/_Toggle.js +95 -76
- package/dist/shared/face-mixin.d.ts +6 -0
- package/dist/shared/face-mixin.d.ts.map +1 -1
- package/dist/shared/face-mixin.js +22 -4
- package/package.json +1 -1
- package/src/components/Checkbox/core/_Checkbox.ts +25 -0
- package/src/components/Radio/core/_Radio.ts +67 -5
- package/src/components/Toggle/core/_Toggle.ts +34 -0
- package/src/shared/face-mixin.ts +30 -0
- package/src/components/Drawer/v1/dialog--drawer-bottom.hbs +0 -48
- package/src/components/Drawer/v1/dialog--drawer-end.hbs +0 -48
- package/src/components/Drawer/v1/dialog--drawer-start.hbs +0 -48
- package/src/components/Drawer/v1/dialog--drawer-top.hbs +0 -48
- package/src/components/Drawer/v1/dialog-demo.css +0 -13
- package/src/components/Drawer/v1/dialog.config.yml +0 -5
- package/src/components/Drawer/v1/dialog.css +0 -99
- package/src/components/Drawer/v1/dialog.hbs +0 -48
- package/src/components/Drawer/v1/drawer-animations.css +0 -52
- package/src/components/Drawer/v1/drawer.css +0 -50
|
@@ -67,6 +67,20 @@ export declare class AgCheckbox extends AgCheckbox_base implements CheckboxProps
|
|
|
67
67
|
* by the inner input; we just mirror its state.
|
|
68
68
|
*/
|
|
69
69
|
private _syncValidity;
|
|
70
|
+
/**
|
|
71
|
+
* Sync CustomStateSet states so :state() pseudo-classes work from external CSS.
|
|
72
|
+
*
|
|
73
|
+
* Must be called AFTER _syncValidity() so that :state(invalid) reads the
|
|
74
|
+
* freshly-updated _internals.validity.valid value.
|
|
75
|
+
*
|
|
76
|
+
* Exposed states:
|
|
77
|
+
* :state(checked) — checkbox is checked
|
|
78
|
+
* :state(indeterminate) — checkbox is in indeterminate state
|
|
79
|
+
* :state(disabled) — checkbox is disabled
|
|
80
|
+
* :state(required) — checkbox is required
|
|
81
|
+
* :state(invalid) — FACE constraint validation is failing
|
|
82
|
+
*/
|
|
83
|
+
private _syncStates;
|
|
70
84
|
updated(changedProperties: Map<string, unknown>): void;
|
|
71
85
|
private handleClick;
|
|
72
86
|
private handleChange;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/core/_Checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AASrD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC;AAG7E,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,yBAAyB,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,YAAY,CAAC;IAC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,CAAC;IAGd,OAAO,EAAE,OAAO,CAAC;IAGjB,aAAa,EAAE,OAAO,CAAC;IAGvB,QAAQ,EAAE,OAAO,CAAC;IAGlB,IAAI,EAAE,YAAY,CAAC;IAGnB,KAAK,EAAE,aAAa,CAAC;IAGrB,SAAS,EAAE,MAAM,CAAC;IAGlB,aAAa,EAAE,KAAK,GAAG,OAAO,CAAC;IAI/B,QAAQ,EAAE,OAAO,CAAC;IAGlB,OAAO,EAAE,OAAO,CAAC;IAGjB,YAAY,EAAE,MAAM,CAAC;IAGrB,QAAQ,EAAE,MAAM,CAAC;IAGjB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAGtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAGxD,OAAO,CAAC,IAAI,CAAuC;IAEnD,OAAO,CAAC,QAAQ,CAAC,CAAmB;;IAkBpC;;OAEG;IACH,IAAI,cAAc,IAAI,WAAW,GAAG,IAAI,CAEvC;IAID;;;OAGG;IACM,iBAAiB,IAAI,IAAI;IAQlC;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAIrB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,WAAW;IAUV,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAgBxD,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,YAAY;IAwCpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAcrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAcpB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IASlB,MAAM;IAqEN,YAAY;CAatB"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { LitElement as p, css as u, nothing as
|
|
1
|
+
import { LitElement as p, css as u, nothing as l, html as c } from "lit";
|
|
2
2
|
import { n as r } from "../../../property-CemaeiRl.js";
|
|
3
3
|
import { formControlStyles as f } from "../../../shared/form-control-styles.js";
|
|
4
4
|
import { createFormControlIds as g, buildAriaDescribedBy as m } from "../../../shared/form-control-utils.js";
|
|
5
|
-
import { FaceMixin as
|
|
6
|
-
var v = Object.defineProperty,
|
|
7
|
-
for (var
|
|
8
|
-
(b = d[n]) && (
|
|
9
|
-
return
|
|
5
|
+
import { FaceMixin as k, syncInnerInputValidity as x } from "../../../shared/face-mixin.js";
|
|
6
|
+
var v = Object.defineProperty, i = (d, t, o, s) => {
|
|
7
|
+
for (var a = void 0, n = d.length - 1, b; n >= 0; n--)
|
|
8
|
+
(b = d[n]) && (a = b(t, o, a) || a);
|
|
9
|
+
return a && v(t, o, a), a;
|
|
10
10
|
};
|
|
11
|
-
const h = class h extends
|
|
11
|
+
const h = class h extends k(p) {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(), this._ids = g("ag-checkbox"), this.value = "", this.checked = !1, this.indeterminate = !1, this.disabled = !1, this.size = "medium", this.theme = "primary", this.labelText = "", this.labelPosition = "end", this.required = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "";
|
|
14
14
|
}
|
|
@@ -24,7 +24,7 @@ const h = class h extends x(p) {
|
|
|
24
24
|
* Restores checked and indeterminate to their default states.
|
|
25
25
|
*/
|
|
26
26
|
formResetCallback() {
|
|
27
|
-
this.checked = !1, this.indeterminate = !1, this._internals.setFormValue(null), this._internals.setValidity({});
|
|
27
|
+
this.checked = !1, this.indeterminate = !1, this._internals.setFormValue(null), this._internals.setValidity({}), this._syncStates();
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Sync validity to ElementInternals by delegating to the inner
|
|
@@ -32,11 +32,27 @@ const h = class h extends x(p) {
|
|
|
32
32
|
* by the inner input; we just mirror its state.
|
|
33
33
|
*/
|
|
34
34
|
_syncValidity() {
|
|
35
|
-
|
|
35
|
+
x(this._internals, this.inputRef);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Sync CustomStateSet states so :state() pseudo-classes work from external CSS.
|
|
39
|
+
*
|
|
40
|
+
* Must be called AFTER _syncValidity() so that :state(invalid) reads the
|
|
41
|
+
* freshly-updated _internals.validity.valid value.
|
|
42
|
+
*
|
|
43
|
+
* Exposed states:
|
|
44
|
+
* :state(checked) — checkbox is checked
|
|
45
|
+
* :state(indeterminate) — checkbox is in indeterminate state
|
|
46
|
+
* :state(disabled) — checkbox is disabled
|
|
47
|
+
* :state(required) — checkbox is required
|
|
48
|
+
* :state(invalid) — FACE constraint validation is failing
|
|
49
|
+
*/
|
|
50
|
+
_syncStates() {
|
|
51
|
+
this._setState("checked", this.checked), this._setState("indeterminate", this.indeterminate), this._setState("disabled", this.disabled), this._setState("required", this.required), this._setState("invalid", !this._internals.validity.valid);
|
|
36
52
|
}
|
|
37
53
|
// ─── End FACE ─────────────────────────────────────────────────────────────
|
|
38
54
|
updated(t) {
|
|
39
|
-
super.updated(t), t.has("indeterminate") && this.inputRef && (this.inputRef.indeterminate = this.indeterminate), (t.has("checked") || t.has("indeterminate")) && (this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity());
|
|
55
|
+
super.updated(t), t.has("indeterminate") && this.inputRef && (this.inputRef.indeterminate = this.indeterminate), (t.has("checked") || t.has("indeterminate")) && (this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity(), this._syncStates());
|
|
40
56
|
}
|
|
41
57
|
handleClick(t) {
|
|
42
58
|
this.onClick && this.onClick(t);
|
|
@@ -47,7 +63,7 @@ const h = class h extends x(p) {
|
|
|
47
63
|
return;
|
|
48
64
|
}
|
|
49
65
|
const o = t.target;
|
|
50
|
-
this.checked = o.checked, this.indeterminate && (this.indeterminate = !1), this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity();
|
|
66
|
+
this.checked = o.checked, this.indeterminate && (this.indeterminate = !1), this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity(), this._syncStates();
|
|
51
67
|
const s = new CustomEvent("change", {
|
|
52
68
|
detail: {
|
|
53
69
|
checked: this.checked,
|
|
@@ -64,7 +80,7 @@ const h = class h extends x(p) {
|
|
|
64
80
|
* Render helper text
|
|
65
81
|
*/
|
|
66
82
|
_renderHelper() {
|
|
67
|
-
return this.helpText ?
|
|
83
|
+
return this.helpText ? c`
|
|
68
84
|
<div
|
|
69
85
|
id="${this._ids.helperId}"
|
|
70
86
|
class="ag-form-control__helper ag-checkbox__helper"
|
|
@@ -72,13 +88,13 @@ const h = class h extends x(p) {
|
|
|
72
88
|
>
|
|
73
89
|
${this.helpText}
|
|
74
90
|
</div>
|
|
75
|
-
` :
|
|
91
|
+
` : l;
|
|
76
92
|
}
|
|
77
93
|
/**
|
|
78
94
|
* Render error text
|
|
79
95
|
*/
|
|
80
96
|
_renderError() {
|
|
81
|
-
return !this.invalid || !this.errorMessage ?
|
|
97
|
+
return !this.invalid || !this.errorMessage ? l : c`
|
|
82
98
|
<div
|
|
83
99
|
id="${this._ids.errorId}"
|
|
84
100
|
class="ag-form-control__error ag-checkbox__error"
|
|
@@ -110,8 +126,8 @@ const h = class h extends x(p) {
|
|
|
110
126
|
`, s = `
|
|
111
127
|
checkbox-label-copy
|
|
112
128
|
checkbox-label-copy--${this.size}
|
|
113
|
-
`,
|
|
114
|
-
return
|
|
129
|
+
`, a = this._getAriaDescribedBy();
|
|
130
|
+
return c`
|
|
115
131
|
<div class="ag-checkbox-container">
|
|
116
132
|
<label
|
|
117
133
|
for="${this._ids.inputId}"
|
|
@@ -132,7 +148,7 @@ const h = class h extends x(p) {
|
|
|
132
148
|
aria-label="${this.labelText || "Checkbox"}"
|
|
133
149
|
aria-required="${this.required ? "true" : "false"}"
|
|
134
150
|
aria-invalid="${this.invalid ? "true" : "false"}"
|
|
135
|
-
aria-describedby="${
|
|
151
|
+
aria-describedby="${a || l}"
|
|
136
152
|
aria-checked=${this.indeterminate ? "mixed" : this.checked ? "true" : "false"}
|
|
137
153
|
@click=${this.handleClick}
|
|
138
154
|
@change=${this.handleChange}
|
|
@@ -143,8 +159,8 @@ const h = class h extends x(p) {
|
|
|
143
159
|
aria-hidden="true"
|
|
144
160
|
></span>
|
|
145
161
|
<span class=${s.trim()} part="ag-checkbox-label">
|
|
146
|
-
${this.labelText ||
|
|
147
|
-
${this.required ?
|
|
162
|
+
${this.labelText || c`<slot></slot>`}
|
|
163
|
+
${this.required ? c`<span class="ag-form-control__required" aria-label="required">*</span>` : l}
|
|
148
164
|
</span>
|
|
149
165
|
</label>
|
|
150
166
|
${this._renderHelper()}
|
|
@@ -155,7 +171,7 @@ const h = class h extends x(p) {
|
|
|
155
171
|
firstUpdated() {
|
|
156
172
|
this.inputRef = this.shadowRoot?.querySelector(
|
|
157
173
|
".checkbox-input"
|
|
158
|
-
), this.inputRef && this.indeterminate && (this.inputRef.indeterminate = this.indeterminate), this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity();
|
|
174
|
+
), this.inputRef && this.indeterminate && (this.inputRef.indeterminate = this.indeterminate), this._internals.setFormValue(this.checked ? this.value || "on" : null), this._syncValidity(), this._syncStates();
|
|
159
175
|
}
|
|
160
176
|
};
|
|
161
177
|
h.styles = [
|
|
@@ -390,46 +406,46 @@ h.styles = [
|
|
|
390
406
|
`
|
|
391
407
|
];
|
|
392
408
|
let e = h;
|
|
393
|
-
|
|
409
|
+
i([
|
|
394
410
|
r({ type: String })
|
|
395
411
|
], e.prototype, "value");
|
|
396
|
-
|
|
412
|
+
i([
|
|
397
413
|
r({ type: Boolean, reflect: !0 })
|
|
398
414
|
], e.prototype, "checked");
|
|
399
|
-
|
|
415
|
+
i([
|
|
400
416
|
r({ type: Boolean, reflect: !0 })
|
|
401
417
|
], e.prototype, "indeterminate");
|
|
402
|
-
|
|
418
|
+
i([
|
|
403
419
|
r({ type: Boolean, reflect: !0 })
|
|
404
420
|
], e.prototype, "disabled");
|
|
405
|
-
|
|
421
|
+
i([
|
|
406
422
|
r({ type: String })
|
|
407
423
|
], e.prototype, "size");
|
|
408
|
-
|
|
424
|
+
i([
|
|
409
425
|
r({ type: String })
|
|
410
426
|
], e.prototype, "theme");
|
|
411
|
-
|
|
427
|
+
i([
|
|
412
428
|
r({ type: String })
|
|
413
429
|
], e.prototype, "labelText");
|
|
414
|
-
|
|
430
|
+
i([
|
|
415
431
|
r({ type: String })
|
|
416
432
|
], e.prototype, "labelPosition");
|
|
417
|
-
|
|
433
|
+
i([
|
|
418
434
|
r({ type: Boolean, reflect: !0 })
|
|
419
435
|
], e.prototype, "required");
|
|
420
|
-
|
|
436
|
+
i([
|
|
421
437
|
r({ type: Boolean, reflect: !0 })
|
|
422
438
|
], e.prototype, "invalid");
|
|
423
|
-
|
|
439
|
+
i([
|
|
424
440
|
r({ type: String, attribute: "error-message" })
|
|
425
441
|
], e.prototype, "errorMessage");
|
|
426
|
-
|
|
442
|
+
i([
|
|
427
443
|
r({ type: String, attribute: "help-text" })
|
|
428
444
|
], e.prototype, "helpText");
|
|
429
|
-
|
|
445
|
+
i([
|
|
430
446
|
r({ attribute: !1 })
|
|
431
447
|
], e.prototype, "onClick");
|
|
432
|
-
|
|
448
|
+
i([
|
|
433
449
|
r({ attribute: !1 })
|
|
434
450
|
], e.prototype, "onChange");
|
|
435
451
|
export {
|
|
@@ -113,9 +113,19 @@ export declare class AgRadio extends AgRadio_base implements RadioProps {
|
|
|
113
113
|
*/
|
|
114
114
|
private _syncFormValue;
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
116
|
+
* Returns true if any ag-radio in this named group is checked.
|
|
117
|
+
* Uses the same DOM-traversal logic as uncheckOtherRadiosInGroup so it
|
|
118
|
+
* works whether the radios are in the document or nested inside a shadow root.
|
|
119
|
+
*/
|
|
120
|
+
private _isGroupChecked;
|
|
121
|
+
/**
|
|
122
|
+
* Sync validity to ElementInternals.
|
|
123
|
+
*
|
|
124
|
+
* Shadow DOM isolation prevents the inner <input type="radio"> from seeing
|
|
125
|
+
* sibling ag-radio elements in separate shadow trees, so native delegation
|
|
126
|
+
* would report each unchecked required radio as invalid individually.
|
|
127
|
+
* Instead we query the DOM directly: a required radio group is valid when
|
|
128
|
+
* ANY radio with the same name is checked.
|
|
119
129
|
*/
|
|
120
130
|
private _syncValidity;
|
|
121
131
|
/**
|
|
@@ -123,6 +133,19 @@ export declare class AgRadio extends AgRadio_base implements RadioProps {
|
|
|
123
133
|
* Restores checked to false and clears the form value.
|
|
124
134
|
*/
|
|
125
135
|
formResetCallback(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Sync CustomStateSet states so :state() pseudo-classes work from external CSS.
|
|
138
|
+
*
|
|
139
|
+
* Must be called AFTER _syncValidity() so that :state(invalid) reads the
|
|
140
|
+
* freshly-updated _internals.validity.valid value.
|
|
141
|
+
*
|
|
142
|
+
* Exposed states:
|
|
143
|
+
* :state(checked) — this radio is selected
|
|
144
|
+
* :state(disabled) — radio is disabled
|
|
145
|
+
* :state(required) — radio is required
|
|
146
|
+
* :state(invalid) — FACE constraint validation is failing
|
|
147
|
+
*/
|
|
148
|
+
private _syncStates;
|
|
126
149
|
firstUpdated(): void;
|
|
127
150
|
updated(changedProperties: Map<string, unknown>): void;
|
|
128
151
|
private handleClick;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_Radio.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/core/_Radio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAUrD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACrD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC;AAG1E,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;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