agnosticui-core 2.0.0-alpha.21 → 2.0.0-alpha.22

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.
Files changed (53) hide show
  1. package/dist/components/Checkbox/core/_Checkbox.d.ts +6 -0
  2. package/dist/components/Checkbox/core/_Checkbox.d.ts.map +1 -1
  3. package/dist/components/Checkbox/core/_Checkbox.js +44 -36
  4. package/dist/components/Combobox/core/_Combobox.d.ts +19 -0
  5. package/dist/components/Combobox/core/_Combobox.d.ts.map +1 -1
  6. package/dist/components/Combobox/core/_Combobox.js +154 -122
  7. package/dist/components/Combobox/vue/VueCombobox.vue.d.ts +1 -1
  8. package/dist/components/Dialog/core/_dialog.d.ts.map +1 -1
  9. package/dist/components/Dialog/core/_dialog.js +176 -166
  10. package/dist/components/Dialog/react/ReactDialog.d.ts +27 -8
  11. package/dist/components/Dialog/react/ReactDialog.d.ts.map +1 -1
  12. package/dist/components/Dialog/react/ReactDialog.js +32 -10
  13. package/dist/components/Input/core/_Input.d.ts +19 -0
  14. package/dist/components/Input/core/_Input.d.ts.map +1 -1
  15. package/dist/components/Input/core/_Input.js +34 -9
  16. package/dist/components/Radio/core/_Radio.d.ts +5 -0
  17. package/dist/components/Radio/core/_Radio.d.ts.map +1 -1
  18. package/dist/components/Radio/core/_Radio.js +38 -31
  19. package/dist/components/Rating/core/_Rating.d.ts +18 -0
  20. package/dist/components/Rating/core/_Rating.d.ts.map +1 -1
  21. package/dist/components/Rating/core/_Rating.js +90 -68
  22. package/dist/components/Select/core/_Select.d.ts +19 -0
  23. package/dist/components/Select/core/_Select.d.ts.map +1 -1
  24. package/dist/components/Select/core/_Select.js +102 -65
  25. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts +18 -0
  26. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts.map +1 -1
  27. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.js +54 -32
  28. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts +18 -0
  29. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts.map +1 -1
  30. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.js +61 -39
  31. package/dist/components/Slider/core/_Slider.d.ts +20 -0
  32. package/dist/components/Slider/core/_Slider.d.ts.map +1 -1
  33. package/dist/components/Slider/core/_Slider.js +132 -104
  34. package/dist/components/Toggle/core/_Toggle.d.ts +6 -0
  35. package/dist/components/Toggle/core/_Toggle.d.ts.map +1 -1
  36. package/dist/components/Toggle/core/_Toggle.js +94 -86
  37. package/dist/shared/face-mixin.d.ts +5 -0
  38. package/dist/shared/face-mixin.d.ts.map +1 -1
  39. package/dist/shared/face-mixin.js +39 -25
  40. package/package.json +1 -1
  41. package/src/components/Checkbox/core/_Checkbox.ts +16 -0
  42. package/src/components/Combobox/core/_Combobox.ts +53 -0
  43. package/src/components/Dialog/core/_dialog.ts +19 -2
  44. package/src/components/Dialog/react/ReactDialog.tsx +60 -3
  45. package/src/components/Input/core/_Input.ts +47 -0
  46. package/src/components/Radio/core/_Radio.ts +14 -0
  47. package/src/components/Rating/core/_Rating.ts +42 -0
  48. package/src/components/Select/core/_Select.ts +57 -0
  49. package/src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts +48 -0
  50. package/src/components/SelectionCardGroup/core/_SelectionCardGroup.ts +48 -0
  51. package/src/components/Slider/core/_Slider.ts +53 -0
  52. package/src/components/Toggle/core/_Toggle.ts +15 -0
  53. package/src/shared/face-mixin.ts +48 -6
@@ -6,10 +6,10 @@ import { o as c } from "../../../if-defined-C8i28hSj.js";
6
6
  import { createFormControlIds as x, isHorizontalLabel as b, buildAriaDescribedBy as k } from "../../../shared/form-control-utils.js";
7
7
  import { formControlStyles as w } from "../../../shared/form-control-styles.js";
8
8
  import { FaceMixin as T } from "../../../shared/face-mixin.js";
9
- var V = Object.defineProperty, s = (v, t, e, o) => {
10
- for (var i = void 0, r = v.length - 1, l; r >= 0; r--)
11
- (l = v[r]) && (i = l(t, e, i) || i);
12
- return i && V(t, e, i), i;
9
+ var V = Object.defineProperty, o = (v, t, e, i) => {
10
+ for (var a = void 0, r = v.length - 1, l; r >= 0; r--)
11
+ (l = v[r]) && (a = l(t, e, a) || a);
12
+ return a && V(t, e, a), a;
13
13
  };
14
14
  const _ = class _ extends T(y) {
15
15
  // ~60fps
@@ -37,15 +37,43 @@ const _ = class _ extends T(y) {
37
37
  }
38
38
  }
39
39
  // ─── FACE ─────────────────────────────────────────────────────────────────
40
+ updated(t) {
41
+ super.updated(t), (t.has("disabled") || t.has("readonly") || t.has("required") || t.has("invalid")) && this._syncStates();
42
+ }
40
43
  firstUpdated() {
41
- this._defaultValue = Array.isArray(this.value) ? [...this.value] : this.value, this._updateFormValue();
44
+ this._defaultValue = Array.isArray(this.value) ? [...this.value] : this.value, this._updateFormValue(), this._syncStates();
42
45
  }
43
46
  /**
44
47
  * FACE lifecycle: called when the parent form is reset.
45
48
  * Restores the slider to the value it had on first render.
46
49
  */
47
50
  formResetCallback() {
48
- this.value = Array.isArray(this._defaultValue) ? [...this._defaultValue] : this._defaultValue, this._updateFormValue();
51
+ this.value = Array.isArray(this._defaultValue) ? [...this._defaultValue] : this._defaultValue, this._updateFormValue(), this._syncStates();
52
+ }
53
+ /**
54
+ * FACE lifecycle: called on session restore or browser autofill.
55
+ * Restores the slider value from the previously saved FormData.
56
+ * Single mode: one entry (name, valueStr). Dual mode: two entries.
57
+ */
58
+ formStateRestoreCallback(t, e) {
59
+ if (!(t instanceof FormData) || !this.name) return;
60
+ const i = Array.from(t.getAll(this.name));
61
+ this.dual && i.length === 2 ? this.value = [parseFloat(i[0]), parseFloat(i[1])] : i.length === 1 && (this.value = parseFloat(i[0])), this._updateFormValue(), this._syncStates();
62
+ }
63
+ /**
64
+ * Sync CustomStateSet states so :state() pseudo-classes work from external CSS.
65
+ *
66
+ * Must be called AFTER _updateFormValue() (which also calls setValidity) so
67
+ * that :state(invalid) reads the freshly-updated _internals.validity.valid value.
68
+ *
69
+ * Exposed states:
70
+ * :state(disabled) — slider is disabled
71
+ * :state(readonly) — slider is read-only
72
+ * :state(required) — slider is required
73
+ * :state(invalid) — FACE constraint validation is failing
74
+ */
75
+ _syncStates() {
76
+ this._setState("disabled", this.disabled), this._setState("readonly", this.readonly), this._setState("required", this.required), this._setState("invalid", !this._internals.validity.valid);
49
77
  }
50
78
  // ─── End FACE ─────────────────────────────────────────────────────────────
51
79
  /**
@@ -77,9 +105,9 @@ const _ = class _ extends T(y) {
77
105
  /**
78
106
  * Get value from pointer position
79
107
  */
80
- _getValueFromPointer(t, e, o) {
81
- let i;
82
- return this.vertical ? i = (o.bottom - e) / o.height * 100 : i = (t - o.left) / o.width * 100, i = Math.max(0, Math.min(100, i)), this._getValueFromPercentage(i);
108
+ _getValueFromPointer(t, e, i) {
109
+ let a;
110
+ return this.vertical ? a = (i.bottom - e) / i.height * 100 : a = (t - i.left) / i.width * 100, a = Math.max(0, Math.min(100, a)), this._getValueFromPercentage(a);
83
111
  }
84
112
  /**
85
113
  * Clamp value to min/max and step
@@ -105,10 +133,10 @@ const _ = class _ extends T(y) {
105
133
  */
106
134
  _handleThumbPointerDown(t, e) {
107
135
  if (this.disabled || this.readonly) return;
108
- const o = this._track;
109
- if (!o) return;
136
+ const i = this._track;
137
+ if (!i) return;
110
138
  t.preventDefault(), t.stopPropagation(), t.currentTarget.setPointerCapture(t.pointerId);
111
- const r = o.getBoundingClientRect(), l = this._values;
139
+ const r = i.getBoundingClientRect(), l = this._values;
112
140
  this._activeDrag = {
113
141
  thumb: e,
114
142
  startX: t.clientX,
@@ -126,13 +154,13 @@ const _ = class _ extends T(y) {
126
154
  if (e - this._lastRenderTime < this._renderThrottleMs)
127
155
  return;
128
156
  this._lastRenderTime = e, t.preventDefault();
129
- const { thumb: o, trackRect: i } = this._activeDrag, r = this._getValueFromPointer(t.clientX, t.clientY, i);
157
+ const { thumb: i, trackRect: a } = this._activeDrag, r = this._getValueFromPointer(t.clientX, t.clientY, a);
130
158
  if (this.dual) {
131
159
  const l = this._values;
132
- if (o === "min") {
160
+ if (i === "min") {
133
161
  const u = this.step, p = l[1] - u, g = [Math.min(r, p), l[1]];
134
162
  this._updateValue(g, "input");
135
- } else if (o === "max") {
163
+ } else if (i === "max") {
136
164
  const u = this.step, p = l[0] + u, n = Math.max(r, p), g = [l[0], n];
137
165
  this._updateValue(g, "input");
138
166
  }
@@ -154,16 +182,16 @@ const _ = class _ extends T(y) {
154
182
  return;
155
183
  if (this.dual && Array.isArray(t)) {
156
184
  t = [this._clampValue(t[0]), this._clampValue(t[1])];
157
- const i = this.step;
158
- t[1] - t[0] < i && (t[0] === this._values[0] ? t[0] = t[1] - i : t[1] = t[0] + i), t[0] > t[1] && (t = [t[1], t[0]]);
185
+ const a = this.step;
186
+ t[1] - t[0] < a && (t[0] === this._values[0] ? t[0] = t[1] - a : t[1] = t[0] + a), t[0] > t[1] && (t = [t[1], t[0]]);
159
187
  } else !this.dual && typeof t == "number" && (t = this._clampValue(t));
160
188
  this.value = t, this._updateFormValue(), e === "input" && this._draggingThumb && this._announceValue(t);
161
- const o = new CustomEvent(e, {
189
+ const i = new CustomEvent(e, {
162
190
  bubbles: !0,
163
191
  composed: !0,
164
192
  detail: { value: t }
165
193
  });
166
- this.dispatchEvent(o), e === "change" && this.onChange ? this.onChange(o) : e === "input" && this.onInput && this.onInput(o);
194
+ this.dispatchEvent(i), e === "change" && this.onChange ? this.onChange(i) : e === "input" && this.onInput && this.onInput(i);
167
195
  }
168
196
  /**
169
197
  * Handle input events from native range inputs
@@ -175,12 +203,12 @@ const _ = class _ extends T(y) {
175
203
  t.preventDefault();
176
204
  return;
177
205
  }
178
- const o = t.target, i = parseFloat(o.value);
206
+ const i = t.target, a = parseFloat(i.value);
179
207
  if (this.dual) {
180
- const r = this._values, l = e === "min" ? [i, r[1]] : [r[0], i];
208
+ const r = this._values, l = e === "min" ? [a, r[1]] : [r[0], a];
181
209
  this._updateValue(l, "input");
182
210
  } else
183
- this._updateValue(i, "input");
211
+ this._updateValue(a, "input");
184
212
  }
185
213
  /**
186
214
  * Handle change events from native range inputs
@@ -192,12 +220,12 @@ const _ = class _ extends T(y) {
192
220
  t.preventDefault();
193
221
  return;
194
222
  }
195
- const o = t.target, i = parseFloat(o.value);
223
+ const i = t.target, a = parseFloat(i.value);
196
224
  if (this.dual) {
197
- const r = this._values, l = e === "min" ? [i, r[1]] : [r[0], i];
225
+ const r = this._values, l = e === "min" ? [a, r[1]] : [r[0], a];
198
226
  this._updateValue(l, "change");
199
227
  } else
200
- this._updateValue(i, "change");
228
+ this._updateValue(a, "change");
201
229
  }
202
230
  /**
203
231
  * Handle focus events
@@ -222,12 +250,12 @@ const _ = class _ extends T(y) {
222
250
  */
223
251
  _handleTrackClick(t) {
224
252
  if (this.disabled || this.readonly) return;
225
- const o = t.currentTarget.getBoundingClientRect(), i = this._getValueFromPointer(t.clientX, t.clientY, o);
253
+ const i = t.currentTarget.getBoundingClientRect(), a = this._getValueFromPointer(t.clientX, t.clientY, i);
226
254
  if (this.dual) {
227
- const r = this._values, l = Math.abs(i - r[0]), u = Math.abs(i - r[1]), p = l < u ? [i, r[1]] : [r[0], i];
255
+ const r = this._values, l = Math.abs(a - r[0]), u = Math.abs(a - r[1]), p = l < u ? [a, r[1]] : [r[0], a];
228
256
  this._updateValue(p);
229
257
  } else
230
- this._updateValue(i);
258
+ this._updateValue(a);
231
259
  }
232
260
  /**
233
261
  * Generate tick marks
@@ -238,8 +266,8 @@ const _ = class _ extends T(y) {
238
266
  const t = [], e = Math.floor((this.max - this.min) / this.tickStep);
239
267
  if (e > 1e3)
240
268
  return null;
241
- for (let i = 0; i <= e; i++) {
242
- const r = this.min + i * this.tickStep, l = this._getPercentage(r), u = this.vertical ? `bottom: ${l}%` : `inset-inline-start: ${l}%`;
269
+ for (let a = 0; a <= e; a++) {
270
+ const r = this.min + a * this.tickStep, l = this._getPercentage(r), u = this.vertical ? `bottom: ${l}%` : `inset-inline-start: ${l}%`;
243
271
  t.push(d`
244
272
  <div class="ag-slider__tick" style="${u}">
245
273
  <div class="ag-slider__tick-label">${r}</div>
@@ -251,8 +279,8 @@ const _ = class _ extends T(y) {
251
279
  /**
252
280
  * Render thumb with tooltip
253
281
  */
254
- _renderThumb(t, e, o) {
255
- const i = this._getPercentage(t), r = this._focusedThumb === e, l = this._draggingThumb === e, u = this.vertical ? `bottom: ${i}%` : `inset-inline-start: ${i}%`, p = `ag-slider__thumb
282
+ _renderThumb(t, e, i) {
283
+ const a = this._getPercentage(t), r = this._focusedThumb === e, l = this._draggingThumb === e, u = this.vertical ? `bottom: ${a}%` : `inset-inline-start: ${a}%`, p = `ag-slider__thumb
256
284
  ${r ? "ag-slider__thumb--focused" : ""}
257
285
  ${l ? "ag-slider__thumb--active" : ""}
258
286
  ${this.readonly ? "ag-slider__thumb--readonly" : ""}`;
@@ -278,11 +306,11 @@ const _ = class _ extends T(y) {
278
306
  _renderProgress() {
279
307
  const t = this._values;
280
308
  if (this.dual) {
281
- const e = this._getPercentage(t[0]), o = this._getPercentage(t[1]), r = `ag-slider__progress ${t[1] - t[0] <= this.step ? "ag-slider__progress--min-gap" : ""}`, l = this.vertical ? `bottom: ${e}%; height: ${o - e}%` : `left: ${e}%; width: ${o - e}%`;
309
+ const e = this._getPercentage(t[0]), i = this._getPercentage(t[1]), r = `ag-slider__progress ${t[1] - t[0] <= this.step ? "ag-slider__progress--min-gap" : ""}`, l = this.vertical ? `bottom: ${e}%; height: ${i - e}%` : `left: ${e}%; width: ${i - e}%`;
282
310
  return d`<div class="${r}" style="${l}" part="ag-slider-progress"></div>`;
283
311
  } else {
284
- const e = this._getPercentage(t[1]), o = this.vertical ? `bottom: 0; height: ${e}%` : `left: 0; width: ${e}%`;
285
- return d`<div class="ag-slider__progress" style="${o}" part="ag-slider-progress"></div>`;
312
+ const e = this._getPercentage(t[1]), i = this.vertical ? `bottom: 0; height: ${e}%` : `left: 0; width: ${e}%`;
313
+ return d`<div class="ag-slider__progress" style="${i}" part="ag-slider-progress"></div>`;
286
314
  }
287
315
  }
288
316
  renderLabel() {
@@ -305,7 +333,7 @@ const _ = class _ extends T(y) {
305
333
  errorId: this._errorId,
306
334
  hasHelper: !!this.helpText && !this.invalid,
307
335
  hasError: !!this.invalid && !!this.errorMessage
308
- }), o = this.label ? `${this.label} - Minimum value` : "Minimum value", i = this.label ? `${this.label} - Maximum value` : "Maximum value", r = this.helpText && !this.invalid ? d`<div class="ag-form-control__helper" id="${this._helperId}">
336
+ }), i = this.label ? `${this.label} - Minimum value` : "Minimum value", a = this.label ? `${this.label} - Maximum value` : "Maximum value", r = this.helpText && !this.invalid ? d`<div class="ag-form-control__helper" id="${this._helperId}">
309
337
  ${this.helpText}
310
338
  </div>` : "", l = this.invalid && this.errorMessage ? d`<div class="ag-form-control__error" id="${this._errorId}">
311
339
  ${this.errorMessage}
@@ -331,7 +359,7 @@ const _ = class _ extends T(y) {
331
359
  aria-valuemin="${this.min}"
332
360
  aria-valuemax="${t[1]}"
333
361
  aria-valuenow="${t[0]}"
334
- aria-label="${c(this.dual ? o : this.ariaLabel || void 0)}"
362
+ aria-label="${c(this.dual ? i : this.ariaLabel || void 0)}"
335
363
  aria-describedby="${c(e)}"
336
364
  @input=${(n) => this._handleInput(n, "min")}
337
365
  @change=${(n) => this._handleChange(n, "min")}
@@ -351,7 +379,7 @@ const _ = class _ extends T(y) {
351
379
  aria-valuemin="${t[0]}"
352
380
  aria-valuemax="${this.max}"
353
381
  aria-valuenow="${t[1]}"
354
- aria-label="${c(this.dual ? i : void 0)}"
382
+ aria-label="${c(this.dual ? a : void 0)}"
355
383
  aria-describedby="${c(e)}"
356
384
  @input=${(n) => this._handleInput(n, "max")}
357
385
  @change=${(n) => this._handleChange(n, "max")}
@@ -803,103 +831,103 @@ _.styles = [
803
831
  }
804
832
  `
805
833
  ];
806
- let a = _;
807
- s([
834
+ let s = _;
835
+ o([
808
836
  h({ type: String })
809
- ], a.prototype, "label");
810
- s([
837
+ ], s.prototype, "label");
838
+ o([
811
839
  h({ type: String, attribute: "label-position" })
812
- ], a.prototype, "labelPosition");
813
- s([
840
+ ], s.prototype, "labelPosition");
841
+ o([
814
842
  h({ type: Boolean, attribute: "label-hidden" })
815
- ], a.prototype, "labelHidden");
816
- s([
843
+ ], s.prototype, "labelHidden");
844
+ o([
817
845
  h({ type: Boolean, attribute: "no-label" })
818
- ], a.prototype, "noLabel");
819
- s([
846
+ ], s.prototype, "noLabel");
847
+ o([
820
848
  h({ type: String, reflect: !0, attribute: "aria-label" })
821
- ], a.prototype, "ariaLabel");
822
- s([
849
+ ], s.prototype, "ariaLabel");
850
+ o([
823
851
  h({ type: Number })
824
- ], a.prototype, "min");
825
- s([
852
+ ], s.prototype, "min");
853
+ o([
826
854
  h({ type: Number })
827
- ], a.prototype, "max");
828
- s([
855
+ ], s.prototype, "max");
856
+ o([
829
857
  h({ type: Number })
830
- ], a.prototype, "step");
831
- s([
858
+ ], s.prototype, "step");
859
+ o([
832
860
  h({ type: Object })
833
- ], a.prototype, "value");
834
- s([
861
+ ], s.prototype, "value");
862
+ o([
835
863
  h({ type: Boolean, reflect: !0 })
836
- ], a.prototype, "dual");
837
- s([
864
+ ], s.prototype, "dual");
865
+ o([
838
866
  h({ type: Boolean, reflect: !0 })
839
- ], a.prototype, "vertical");
840
- s([
867
+ ], s.prototype, "vertical");
868
+ o([
841
869
  h({ type: Boolean, reflect: !0 })
842
- ], a.prototype, "filled");
843
- s([
870
+ ], s.prototype, "filled");
871
+ o([
844
872
  h({ type: Boolean, reflect: !0 })
845
- ], a.prototype, "monochrome");
846
- s([
873
+ ], s.prototype, "monochrome");
874
+ o([
847
875
  h({ type: String, reflect: !0 })
848
- ], a.prototype, "size");
849
- s([
876
+ ], s.prototype, "size");
877
+ o([
850
878
  h({ type: Boolean, reflect: !0 })
851
- ], a.prototype, "disabled");
852
- s([
879
+ ], s.prototype, "disabled");
880
+ o([
853
881
  h({ type: Boolean, reflect: !0 })
854
- ], a.prototype, "readonly");
855
- s([
882
+ ], s.prototype, "readonly");
883
+ o([
856
884
  h({ type: Boolean, reflect: !0 })
857
- ], a.prototype, "required");
858
- s([
885
+ ], s.prototype, "required");
886
+ o([
859
887
  h({ type: Boolean, reflect: !0 })
860
- ], a.prototype, "invalid");
861
- s([
888
+ ], s.prototype, "invalid");
889
+ o([
862
890
  h({ type: String, attribute: "error-message" })
863
- ], a.prototype, "errorMessage");
864
- s([
891
+ ], s.prototype, "errorMessage");
892
+ o([
865
893
  h({ type: String, attribute: "help-text" })
866
- ], a.prototype, "helpText");
867
- s([
894
+ ], s.prototype, "helpText");
895
+ o([
868
896
  h({ type: Boolean, attribute: "show-tooltip" })
869
- ], a.prototype, "showTooltip");
870
- s([
897
+ ], s.prototype, "showTooltip");
898
+ o([
871
899
  h({ type: Boolean, attribute: "show-ticks" })
872
- ], a.prototype, "showTicks");
873
- s([
900
+ ], s.prototype, "showTicks");
901
+ o([
874
902
  h({ type: Number, attribute: "tick-step" })
875
- ], a.prototype, "tickStep");
876
- s([
903
+ ], s.prototype, "tickStep");
904
+ o([
877
905
  h({ attribute: !1 })
878
- ], a.prototype, "onChange");
879
- s([
906
+ ], s.prototype, "onChange");
907
+ o([
880
908
  h({ attribute: !1 })
881
- ], a.prototype, "onInput");
882
- s([
909
+ ], s.prototype, "onInput");
910
+ o([
883
911
  h({ attribute: !1 })
884
- ], a.prototype, "onFocus");
885
- s([
912
+ ], s.prototype, "onFocus");
913
+ o([
886
914
  h({ attribute: !1 })
887
- ], a.prototype, "onBlur");
888
- s([
915
+ ], s.prototype, "onBlur");
916
+ o([
889
917
  m()
890
- ], a.prototype, "_activeThumb");
891
- s([
918
+ ], s.prototype, "_activeThumb");
919
+ o([
892
920
  m()
893
- ], a.prototype, "_focusedThumb");
894
- s([
921
+ ], s.prototype, "_focusedThumb");
922
+ o([
895
923
  m()
896
- ], a.prototype, "_draggingThumb");
897
- s([
924
+ ], s.prototype, "_draggingThumb");
925
+ o([
898
926
  f(".ag-slider__track")
899
- ], a.prototype, "_track");
900
- s([
927
+ ], s.prototype, "_track");
928
+ o([
901
929
  f(".ag-slider__live-region")
902
- ], a.prototype, "_liveRegion");
930
+ ], s.prototype, "_liveRegion");
903
931
  export {
904
- a as AgSlider
932
+ s as AgSlider
905
933
  };
@@ -124,6 +124,12 @@ export declare class AgToggle extends AgToggle_base implements ToggleProps {
124
124
  * Restores checked to false and clears form value and validity.
125
125
  */
126
126
  formResetCallback(): void;
127
+ /**
128
+ * FACE lifecycle: called on session restore or browser autofill.
129
+ * Restores checked state from the previously saved form value.
130
+ * A non-null state means the toggle was on; null means it was off.
131
+ */
132
+ formStateRestoreCallback(state: File | string | FormData | null, _mode: 'restore' | 'autocomplete'): void;
127
133
  /**
128
134
  * Sync validity state to ElementInternals.
129
135
  * Toggle has no inner <input> to delegate to, so required validation
@@ -1 +1 @@
1
- {"version":3,"file":"_Toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/Toggle/core/_Toggle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhF,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,uBAAuB,CAAC,CAAC;AAErE,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,E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