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

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 (249) hide show
  1. package/README.md +67 -33
  2. package/dist/{VueButton.vue_vue_type_script_setup_true_lang-Bq8IPXqd.js → VueButton.vue_vue_type_script_setup_true_lang-D1jGatE9.js} +17 -15
  3. package/dist/{VueButtonFx.vue_vue_type_script_setup_true_lang-BUudF-lg.js → VueButtonFx.vue_vue_type_script_setup_true_lang-BRrt6Nxs.js} +1 -0
  4. package/dist/{VueCheckbox.vue_vue_type_script_setup_true_lang-DERDRO2P.js → VueCheckbox.vue_vue_type_script_setup_true_lang-VtQfJ-6f.js} +9 -10
  5. package/dist/{VueCombobox.vue_vue_type_script_setup_true_lang-C7gDMrYJ.js → VueCombobox.vue_vue_type_script_setup_true_lang-BSTZGX2X.js} +15 -13
  6. package/dist/VueIcon.vue_vue_type_script_setup_true_lang-C2Sky3bU.js +22 -0
  7. package/dist/{VueImage.vue_vue_type_script_setup_true_lang-CUwbK3NF.js → VueImage.vue_vue_type_script_setup_true_lang-SddK93SB.js} +23 -17
  8. package/dist/{VueInput.vue_vue_type_script_setup_true_lang-Dsxo7DuX.js → VueInput.vue_vue_type_script_setup_true_lang-wYdAqg-i.js} +19 -19
  9. package/dist/{VueMenu.vue_vue_type_script_setup_true_lang-bnn7ochj.js → VueMenu.vue_vue_type_script_setup_true_lang-BXc7397e.js} +5 -4
  10. package/dist/{VueRadio.vue_vue_type_script_setup_true_lang-DxNhH12d.js → VueRadio.vue_vue_type_script_setup_true_lang-C7Z-sWpa.js} +10 -12
  11. package/dist/{VueRating.vue_vue_type_script_setup_true_lang-CICncp71.js → VueRating.vue_vue_type_script_setup_true_lang-Bm2nRrqr.js} +11 -9
  12. package/dist/VueSelectionButton.vue_vue_type_script_setup_true_lang-DJN-Uk6n.js +24 -0
  13. package/dist/VueSelectionButtonGroup.vue_vue_type_script_setup_true_lang-DwYrIMVO.js +46 -0
  14. package/dist/VueSelectionCard.vue_vue_type_script_setup_true_lang-DJiyPsXH.js +24 -0
  15. package/dist/VueSelectionCardGroup.vue_vue_type_script_setup_true_lang-D5CycLY5.js +40 -0
  16. package/dist/{VueToggle.vue_vue_type_script_setup_true_lang-BxrvAsse.js → VueToggle.vue_vue_type_script_setup_true_lang-DLPCBOqZ.js} +18 -16
  17. package/dist/components/Alert/core/_Alert.d.ts.map +1 -1
  18. package/dist/components/Alert/core/_Alert.js +38 -19
  19. package/dist/components/Button/core/_Button.d.ts +5 -0
  20. package/dist/components/Button/core/_Button.d.ts.map +1 -1
  21. package/dist/components/Button/core/_Button.js +147 -65
  22. package/dist/components/Button/vue/VueButton.js +1 -1
  23. package/dist/components/Button/vue/VueButton.vue.d.ts +3 -0
  24. package/dist/components/Button/vue/VueButton.vue.d.ts.map +1 -1
  25. package/dist/components/Button/vue/index.js +1 -1
  26. package/dist/components/ButtonFx/vue/VueButtonFx.js +1 -1
  27. package/dist/components/ButtonFx/vue/index.js +1 -1
  28. package/dist/components/Card/core/_Card.d.ts +9 -1
  29. package/dist/components/Card/core/_Card.d.ts.map +1 -1
  30. package/dist/components/Card/core/_Card.js +83 -29
  31. package/dist/components/Card/vue/VueCard.js +29 -16
  32. package/dist/components/Card/vue/VueCard.vue.d.ts +25 -5
  33. package/dist/components/Card/vue/VueCard.vue.d.ts.map +1 -1
  34. package/dist/components/Checkbox/core/_Checkbox.d.ts +37 -11
  35. package/dist/components/Checkbox/core/_Checkbox.d.ts.map +1 -1
  36. package/dist/components/Checkbox/core/_Checkbox.js +73 -42
  37. package/dist/components/Checkbox/vue/VueCheckbox.js +1 -1
  38. package/dist/components/Checkbox/vue/VueCheckbox.vue.d.ts +3 -3
  39. package/dist/components/Checkbox/vue/VueCheckbox.vue.d.ts.map +1 -1
  40. package/dist/components/Checkbox/vue/index.js +1 -1
  41. package/dist/components/Combobox/core/_Combobox.d.ts +24 -1
  42. package/dist/components/Combobox/core/_Combobox.d.ts.map +1 -1
  43. package/dist/components/Combobox/core/_Combobox.js +141 -92
  44. package/dist/components/Combobox/vue/VueCombobox.js +1 -1
  45. package/dist/components/Combobox/vue/index.js +1 -1
  46. package/dist/components/Fieldset/vue/VueFieldset.vue.d.ts +1 -1
  47. package/dist/components/Icon/vue/VueIcon.js +1 -1
  48. package/dist/components/Icon/vue/VueIcon.vue.d.ts.map +1 -1
  49. package/dist/components/Icon/vue/index.js +1 -1
  50. package/dist/components/Image/vue/VueImage.js +1 -1
  51. package/dist/components/Image/vue/VueImage.vue.d.ts.map +1 -1
  52. package/dist/components/Image/vue/index.js +1 -1
  53. package/dist/components/Input/core/_Input.d.ts +21 -2
  54. package/dist/components/Input/core/_Input.d.ts.map +1 -1
  55. package/dist/components/Input/core/_Input.js +71 -35
  56. package/dist/components/Input/vue/VueInput.js +1 -1
  57. package/dist/components/Input/vue/VueInput.vue.d.ts.map +1 -1
  58. package/dist/components/Input/vue/index.js +1 -1
  59. package/dist/components/Link/core/_Link.d.ts.map +1 -1
  60. package/dist/components/Link/core/_Link.js +1 -0
  61. package/dist/components/Link/vue/VueLink.js +6 -5
  62. package/dist/components/Link/vue/VueLink.vue.d.ts.map +1 -1
  63. package/dist/components/Menu/vue/VueMenu.js +1 -1
  64. package/dist/components/Menu/vue/index.js +1 -1
  65. package/dist/components/Pagination/core/_Pagination.d.ts +0 -1
  66. package/dist/components/Pagination/core/_Pagination.d.ts.map +1 -1
  67. package/dist/components/Pagination/core/_Pagination.js +6 -9
  68. package/dist/components/Radio/core/_Radio.d.ts +55 -10
  69. package/dist/components/Radio/core/_Radio.d.ts.map +1 -1
  70. package/dist/components/Radio/core/_Radio.js +165 -116
  71. package/dist/components/Radio/vue/VueRadio.js +1 -1
  72. package/dist/components/Radio/vue/VueRadio.vue.d.ts.map +1 -1
  73. package/dist/components/Radio/vue/index.js +1 -1
  74. package/dist/components/Rating/core/_Rating.d.ts +23 -2
  75. package/dist/components/Rating/core/_Rating.d.ts.map +1 -1
  76. package/dist/components/Rating/core/_Rating.js +97 -64
  77. package/dist/components/Rating/vue/VueRating.js +1 -1
  78. package/dist/components/Rating/vue/VueRating.vue.d.ts +2 -0
  79. package/dist/components/Rating/vue/VueRating.vue.d.ts.map +1 -1
  80. package/dist/components/Rating/vue/index.js +1 -1
  81. package/dist/components/Select/core/_Select.d.ts +20 -2
  82. package/dist/components/Select/core/_Select.d.ts.map +1 -1
  83. package/dist/components/Select/core/_Select.js +99 -69
  84. package/dist/components/SelectionButton/core/SelectionButton.d.ts +9 -0
  85. package/dist/components/SelectionButton/core/SelectionButton.d.ts.map +1 -0
  86. package/dist/components/SelectionButton/core/SelectionButton.js +5 -0
  87. package/dist/components/SelectionButton/core/_SelectionButton.d.ts +47 -0
  88. package/dist/components/SelectionButton/core/_SelectionButton.d.ts.map +1 -0
  89. package/dist/components/SelectionButton/core/_SelectionButton.js +474 -0
  90. package/dist/components/SelectionButton/react/ReactSelectionButton.d.ts +9 -0
  91. package/dist/components/SelectionButton/react/ReactSelectionButton.d.ts.map +1 -0
  92. package/dist/components/SelectionButton/react/ReactSelectionButton.js +12 -0
  93. package/dist/components/SelectionButton/react/index.d.ts +3 -0
  94. package/dist/components/SelectionButton/react/index.d.ts.map +1 -0
  95. package/dist/components/SelectionButton/react/index.js +4 -0
  96. package/dist/components/SelectionButton/vue/VueSelectionButton.js +4 -0
  97. package/dist/components/SelectionButton/vue/VueSelectionButton.vue.d.ts +55 -0
  98. package/dist/components/SelectionButton/vue/VueSelectionButton.vue.d.ts.map +1 -0
  99. package/dist/components/SelectionButton/vue/index.d.ts +6 -0
  100. package/dist/components/SelectionButton/vue/index.d.ts.map +1 -0
  101. package/dist/components/SelectionButton/vue/index.js +4 -0
  102. package/dist/components/SelectionButtonGroup/core/SelectionButtonGroup.d.ts +9 -0
  103. package/dist/components/SelectionButtonGroup/core/SelectionButtonGroup.d.ts.map +1 -0
  104. package/dist/components/SelectionButtonGroup/core/SelectionButtonGroup.js +5 -0
  105. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts +87 -0
  106. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts.map +1 -0
  107. package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.js +235 -0
  108. package/dist/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.d.ts +13 -0
  109. package/dist/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.d.ts.map +1 -0
  110. package/dist/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.js +15 -0
  111. package/dist/components/SelectionButtonGroup/react/index.d.ts +3 -0
  112. package/dist/components/SelectionButtonGroup/react/index.d.ts.map +1 -0
  113. package/dist/components/SelectionButtonGroup/react/index.js +4 -0
  114. package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.js +4 -0
  115. package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue.d.ts +101 -0
  116. package/dist/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue.d.ts.map +1 -0
  117. package/dist/components/SelectionButtonGroup/vue/index.d.ts +6 -0
  118. package/dist/components/SelectionButtonGroup/vue/index.d.ts.map +1 -0
  119. package/dist/components/SelectionButtonGroup/vue/index.js +4 -0
  120. package/dist/components/SelectionCard/core/SelectionCard.d.ts +9 -0
  121. package/dist/components/SelectionCard/core/SelectionCard.d.ts.map +1 -0
  122. package/dist/components/SelectionCard/core/SelectionCard.js +5 -0
  123. package/dist/components/SelectionCard/core/_SelectionCard.d.ts +39 -0
  124. package/dist/components/SelectionCard/core/_SelectionCard.d.ts.map +1 -0
  125. package/dist/components/SelectionCard/core/_SelectionCard.js +318 -0
  126. package/dist/components/SelectionCard/react/ReactSelectionCard.d.ts +9 -0
  127. package/dist/components/SelectionCard/react/ReactSelectionCard.d.ts.map +1 -0
  128. package/dist/components/SelectionCard/react/ReactSelectionCard.js +12 -0
  129. package/dist/components/SelectionCard/react/index.d.ts +3 -0
  130. package/dist/components/SelectionCard/react/index.d.ts.map +1 -0
  131. package/dist/components/SelectionCard/react/index.js +4 -0
  132. package/dist/components/SelectionCard/vue/VueSelectionCard.js +4 -0
  133. package/dist/components/SelectionCard/vue/VueSelectionCard.vue.d.ts +55 -0
  134. package/dist/components/SelectionCard/vue/VueSelectionCard.vue.d.ts.map +1 -0
  135. package/dist/components/SelectionCard/vue/index.d.ts +6 -0
  136. package/dist/components/SelectionCard/vue/index.d.ts.map +1 -0
  137. package/dist/components/SelectionCard/vue/index.js +4 -0
  138. package/dist/components/SelectionCardGroup/core/SelectionCardGroup.d.ts +9 -0
  139. package/dist/components/SelectionCardGroup/core/SelectionCardGroup.d.ts.map +1 -0
  140. package/dist/components/SelectionCardGroup/core/SelectionCardGroup.js +5 -0
  141. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts +69 -0
  142. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.d.ts.map +1 -0
  143. package/dist/components/SelectionCardGroup/core/_SelectionCardGroup.js +220 -0
  144. package/dist/components/SelectionCardGroup/react/ReactSelectionCardGroup.d.ts +13 -0
  145. package/dist/components/SelectionCardGroup/react/ReactSelectionCardGroup.d.ts.map +1 -0
  146. package/dist/components/SelectionCardGroup/react/ReactSelectionCardGroup.js +15 -0
  147. package/dist/components/SelectionCardGroup/react/index.d.ts +3 -0
  148. package/dist/components/SelectionCardGroup/react/index.d.ts.map +1 -0
  149. package/dist/components/SelectionCardGroup/react/index.js +4 -0
  150. package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.js +4 -0
  151. package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue.d.ts +86 -0
  152. package/dist/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue.d.ts.map +1 -0
  153. package/dist/components/SelectionCardGroup/vue/index.d.ts +6 -0
  154. package/dist/components/SelectionCardGroup/vue/index.d.ts.map +1 -0
  155. package/dist/components/SelectionCardGroup/vue/index.js +4 -0
  156. package/dist/components/Slider/core/_Slider.d.ts +10 -16
  157. package/dist/components/Slider/core/_Slider.d.ts.map +1 -1
  158. package/dist/components/Slider/core/_Slider.js +28 -39
  159. package/dist/components/Timeline/core/_Timeline.d.ts.map +1 -1
  160. package/dist/components/Timeline/core/_Timeline.js +8 -3
  161. package/dist/components/Timeline/react/ReactTimeline.d.ts +23 -9
  162. package/dist/components/Timeline/react/ReactTimeline.d.ts.map +1 -1
  163. package/dist/components/Timeline/react/ReactTimeline.js +18 -14
  164. package/dist/components/Toggle/core/_Toggle.d.ts +36 -6
  165. package/dist/components/Toggle/core/_Toggle.d.ts.map +1 -1
  166. package/dist/components/Toggle/core/_Toggle.js +117 -77
  167. package/dist/components/Toggle/vue/VueToggle.js +1 -1
  168. package/dist/components/Toggle/vue/VueToggle.vue.d.ts.map +1 -1
  169. package/dist/components/Toggle/vue/index.js +1 -1
  170. package/dist/shared/face-mixin.d.ts +82 -0
  171. package/dist/shared/face-mixin.d.ts.map +1 -0
  172. package/dist/shared/face-mixin.js +86 -0
  173. package/dist/shared/form-control-styles.js +1 -1
  174. package/dist/styles/ag-tokens-dark.css +4 -0
  175. package/dist/styles/ag-tokens.css +18 -13
  176. package/dist/test-setup.js +340 -255
  177. package/package.json +51 -13
  178. package/src/components/Alert/core/_Alert.ts +21 -2
  179. package/src/components/Button/core/_Button.ts +111 -21
  180. package/src/components/Button/vue/VueButton.vue +2 -0
  181. package/src/components/Card/core/_Card.ts +70 -3
  182. package/src/components/Card/vue/VueCard.vue +19 -3
  183. package/src/components/Checkbox/core/_Checkbox.ts +78 -18
  184. package/src/components/Checkbox/vue/VueCheckbox.vue +0 -6
  185. package/src/components/Combobox/core/_Combobox.ts +84 -2
  186. package/src/components/Combobox/vue/VueCombobox.vue +1 -0
  187. package/src/components/Drawer/v1/dialog--drawer-bottom.hbs +48 -0
  188. package/src/components/Drawer/v1/dialog--drawer-end.hbs +48 -0
  189. package/src/components/Drawer/v1/dialog--drawer-start.hbs +48 -0
  190. package/src/components/Drawer/v1/dialog--drawer-top.hbs +48 -0
  191. package/src/components/Drawer/v1/dialog-demo.css +13 -0
  192. package/src/components/Drawer/v1/dialog.config.yml +5 -0
  193. package/src/components/Drawer/v1/dialog.css +99 -0
  194. package/src/components/Drawer/v1/dialog.hbs +48 -0
  195. package/src/components/Drawer/v1/drawer-animations.css +52 -0
  196. package/src/components/Drawer/v1/drawer.css +50 -0
  197. package/src/components/Icon/vue/VueIcon.vue +2 -5
  198. package/src/components/Image/vue/VueImage.vue +17 -13
  199. package/src/components/Input/core/_Input.ts +58 -3
  200. package/src/components/Input/vue/VueInput.vue +2 -6
  201. package/src/components/Link/core/_Link.ts +1 -0
  202. package/src/components/Link/vue/VueLink.vue +1 -0
  203. package/src/components/Pagination/core/_Pagination.ts +10 -18
  204. package/src/components/Radio/core/_Radio.ts +131 -41
  205. package/src/components/Radio/vue/VueRadio.vue +1 -5
  206. package/src/components/Rating/core/_Rating.ts +62 -5
  207. package/src/components/Rating/vue/VueRating.vue +3 -0
  208. package/src/components/Select/core/_Select.ts +55 -6
  209. package/src/components/SelectionButton/core/SelectionButton.ts +13 -0
  210. package/src/components/SelectionButton/core/_SelectionButton.ts +551 -0
  211. package/src/components/SelectionButton/react/ReactSelectionButton.tsx +16 -0
  212. package/src/components/SelectionButton/react/index.ts +4 -0
  213. package/src/components/SelectionButton/vue/VueSelectionButton.vue +33 -0
  214. package/src/components/SelectionButton/vue/index.ts +5 -0
  215. package/src/components/SelectionButtonGroup/core/SelectionButtonGroup.ts +13 -0
  216. package/src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts +423 -0
  217. package/src/components/SelectionButtonGroup/react/ReactSelectionButtonGroup.tsx +29 -0
  218. package/src/components/SelectionButtonGroup/react/index.ts +9 -0
  219. package/src/components/SelectionButtonGroup/vue/VueSelectionButtonGroup.vue +89 -0
  220. package/src/components/SelectionButtonGroup/vue/index.ts +5 -0
  221. package/src/components/SelectionCard/core/SelectionCard.ts +13 -0
  222. package/src/components/SelectionCard/core/_SelectionCard.ts +384 -0
  223. package/src/components/SelectionCard/react/ReactSelectionCard.tsx +16 -0
  224. package/src/components/SelectionCard/react/index.ts +4 -0
  225. package/src/components/SelectionCard/vue/VueSelectionCard.vue +33 -0
  226. package/src/components/SelectionCard/vue/index.ts +5 -0
  227. package/src/components/SelectionCardGroup/core/SelectionCardGroup.ts +13 -0
  228. package/src/components/SelectionCardGroup/core/_SelectionCardGroup.ts +396 -0
  229. package/src/components/SelectionCardGroup/react/ReactSelectionCardGroup.tsx +29 -0
  230. package/src/components/SelectionCardGroup/react/index.ts +9 -0
  231. package/src/components/SelectionCardGroup/vue/VueSelectionCardGroup.vue +71 -0
  232. package/src/components/SelectionCardGroup/vue/index.ts +5 -0
  233. package/src/components/Slider/core/_Slider.ts +28 -28
  234. package/src/components/Timeline/core/_Timeline.ts +5 -0
  235. package/src/components/Timeline/react/ReactTimeline.tsx +47 -24
  236. package/src/components/Toggle/core/_Toggle.ts +83 -9
  237. package/src/components/Toggle/vue/VueToggle.vue +2 -0
  238. package/src/shared/face-mixin.ts +233 -0
  239. package/src/shared/form-control-styles.ts +1 -1
  240. package/src/styles/ag-tokens-dark.css +4 -0
  241. package/src/styles/ag-tokens.css +18 -13
  242. package/RTL_IMPLEMENTATION_PLAN.md +0 -295
  243. package/dist/VueIcon.vue_vue_type_script_setup_true_lang-kC-nzMyu.js +0 -25
  244. package/dist/components/Input/core/_Input.BACKUP.d.ts +0 -114
  245. package/dist/components/Input/core/_Input.BACKUP.d.ts.map +0 -1
  246. package/dist/components/Input/core/_Input.BACKUP.js +0 -511
  247. package/dist/global.d.js +0 -1
  248. package/src/components/Input/core/_Input.BACKUP.ts +0 -710
  249. package/src/global.d.ts +0 -43
@@ -1,15 +1,83 @@
1
- import { LitElement as u, css as b, nothing as l, html as c } from "lit";
2
- import { n as i } from "../../../property-CemaeiRl.js";
1
+ import { LitElement as p, css as b, nothing as c, html as h } from "lit";
2
+ import { n as s } from "../../../property-CemaeiRl.js";
3
3
  import { formControlStyles as v } from "../../../shared/form-control-styles.js";
4
4
  import { createFormControlIds as f, buildAriaDescribedBy as w } from "../../../shared/form-control-utils.js";
5
- var m = Object.defineProperty, o = (g, r, d, s) => {
6
- for (var e = void 0, t = g.length - 1, h; t >= 0; t--)
7
- (h = g[t]) && (e = h(r, d, e) || e);
8
- return e && m(r, d, e), e;
5
+ import { FaceMixin as m } from "../../../shared/face-mixin.js";
6
+ var y = Object.defineProperty, d = (g, r, e, a) => {
7
+ for (var t = void 0, i = g.length - 1, l; i >= 0; i--)
8
+ (l = g[i]) && (t = l(r, e, t) || t);
9
+ return t && y(r, e, t), t;
9
10
  }, n;
10
- const a = (n = class extends u {
11
+ const o = (n = class extends m(p) {
11
12
  constructor() {
12
- super(...arguments), this.name = "", this.value = "", this.checked = !1, this.disabled = !1, this.size = "medium", this.theme = "primary", this.labelText = "", this.labelPosition = "end", this.label = "", this.labelHidden = !1, this.noLabel = !1, this.required = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "", this._ids = f("ag-radio");
13
+ super(...arguments), this.value = "", this.checked = !1, this.disabled = !1, this.size = "medium", this.theme = "primary", this.labelText = "", this.labelPosition = "end", this.label = "", this.labelHidden = !1, this.noLabel = !1, this.required = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "", this._ids = f("ag-radio");
14
+ }
15
+ // ─── FACE ─────────────────────────────────────────────────────────────────
16
+ /**
17
+ * Sync the form value to ElementInternals.
18
+ * Submits this radio's value when checked, or null when unchecked.
19
+ * Each radio in the group reports independently; only the checked one
20
+ * contributes a value, matching native radio behavior.
21
+ */
22
+ _syncFormValue() {
23
+ this._internals.setFormValue(this.checked ? this.value : null);
24
+ }
25
+ /**
26
+ * Returns true if any ag-radio in this named group is checked.
27
+ * Uses the same DOM-traversal logic as uncheckOtherRadiosInGroup so it
28
+ * works whether the radios are in the document or nested inside a shadow root.
29
+ */
30
+ _isGroupChecked() {
31
+ if (this.checked) return !0;
32
+ const r = this.getRootNode();
33
+ return Array.from(r.querySelectorAll(`ag-radio[name="${this.name}"]`)).some(
34
+ (e) => e.checked
35
+ );
36
+ }
37
+ /**
38
+ * Sync validity to ElementInternals.
39
+ *
40
+ * Shadow DOM isolation prevents the inner <input type="radio"> from seeing
41
+ * sibling ag-radio elements in separate shadow trees, so native delegation
42
+ * would report each unchecked required radio as invalid individually.
43
+ * Instead we query the DOM directly: a required radio group is valid when
44
+ * ANY radio with the same name is checked.
45
+ */
46
+ _syncValidity() {
47
+ if (!this.required) {
48
+ this._internals.setValidity({});
49
+ return;
50
+ }
51
+ this._isGroupChecked() ? this._internals.setValidity({}) : this._internals.setValidity({ valueMissing: !0 }, "Please select one of these options.");
52
+ }
53
+ /**
54
+ * FACE lifecycle: called when the parent form is reset.
55
+ * Restores checked to false and clears the form value.
56
+ */
57
+ formResetCallback() {
58
+ this.checked = !1, this._internals.setFormValue(null), this._internals.setValidity({}), this._syncStates();
59
+ }
60
+ /**
61
+ * Sync CustomStateSet states so :state() pseudo-classes work from external CSS.
62
+ *
63
+ * Must be called AFTER _syncValidity() so that :state(invalid) reads the
64
+ * freshly-updated _internals.validity.valid value.
65
+ *
66
+ * Exposed states:
67
+ * :state(checked) — this radio is selected
68
+ * :state(disabled) — radio is disabled
69
+ * :state(required) — radio is required
70
+ * :state(invalid) — FACE constraint validation is failing
71
+ */
72
+ _syncStates() {
73
+ this._setState("checked", this.checked), this._setState("disabled", this.disabled), this._setState("required", this.required), this._setState("invalid", !this._internals.validity.valid);
74
+ }
75
+ // ─── End FACE ─────────────────────────────────────────────────────────────
76
+ firstUpdated() {
77
+ this.inputRef = this.shadowRoot?.querySelector(".radio-input"), this._syncFormValue(), this._syncValidity(), this._syncStates();
78
+ }
79
+ updated(r) {
80
+ super.updated(r), r.has("checked") && (this._syncFormValue(), this._syncValidity(), this._syncStates());
13
81
  }
14
82
  handleClick(r) {
15
83
  this.onClick && this.onClick(r);
@@ -18,54 +86,46 @@ const a = (n = class extends u {
18
86
  if (!["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End"].includes(r.key))
19
87
  return;
20
88
  r.preventDefault();
21
- const d = this.getRadiosInGroup();
22
- if (d.length === 0) return;
23
- const s = d.indexOf(this);
24
- if (s === -1) return;
25
- let e;
26
- r.key === "Home" ? e = 0 : r.key === "End" ? e = d.length - 1 : r.key === "ArrowDown" || r.key === "ArrowRight" ? e = (s + 1) % d.length : e = (s - 1 + d.length) % d.length;
27
- const t = d[e];
28
- if (t && !t.disabled) {
29
- const h = t.shadowRoot?.querySelector(".radio-input");
30
- if (h) {
31
- h.focus(), t.checked = !0, t.uncheckOtherRadiosInGroup();
32
- const p = new CustomEvent(
89
+ const e = this.getRadiosInGroup();
90
+ if (e.length === 0) return;
91
+ const a = e.indexOf(this);
92
+ if (a === -1) return;
93
+ let t;
94
+ r.key === "Home" ? t = 0 : r.key === "End" ? t = e.length - 1 : r.key === "ArrowDown" || r.key === "ArrowRight" ? t = (a + 1) % e.length : t = (a - 1 + e.length) % e.length;
95
+ const i = e[t];
96
+ if (i && !i.disabled) {
97
+ const l = i.shadowRoot?.querySelector(".radio-input");
98
+ if (l) {
99
+ l.focus(), i.checked = !0, i.uncheckOtherRadiosInGroup();
100
+ const u = new CustomEvent(
33
101
  "change",
34
102
  {
35
103
  detail: {
36
104
  checked: !0,
37
- value: t.value,
38
- name: t.name
105
+ value: i.value,
106
+ name: i.name
39
107
  },
40
108
  bubbles: !0,
41
109
  composed: !0
42
110
  }
43
111
  );
44
- t.dispatchEvent(p), t.onChange && t.onChange(p);
112
+ i.dispatchEvent(u), i.onChange && i.onChange(u);
45
113
  }
46
114
  }
47
115
  }
48
116
  getRadiosInGroup() {
49
117
  if (!this.name) return [];
50
- let r = this.getRootNode();
51
- for (; r && "host" in r; ) {
52
- const e = r.host?.getRootNode();
53
- if (e && e !== r)
54
- r = e;
55
- else
56
- break;
57
- }
58
- const s = (r instanceof Document ? r : document).querySelectorAll(`ag-radio[name="${this.name}"]`);
59
- return Array.from(s).filter((e) => e instanceof n && !e.disabled);
118
+ const e = this.getRootNode().querySelectorAll(`ag-radio[name="${this.name}"]`);
119
+ return Array.from(e).filter((a) => a instanceof n && !a.disabled);
60
120
  }
61
121
  handleChange(r) {
62
122
  if (this.disabled) {
63
123
  r.preventDefault();
64
124
  return;
65
125
  }
66
- const d = r.target, s = this.checked;
67
- this.checked = d.checked, this.checked && !s && this.name && this.uncheckOtherRadiosInGroup();
68
- const e = new CustomEvent(
126
+ const e = r.target, a = this.checked;
127
+ this.checked = e.checked, this._syncFormValue(), this._syncValidity(), this._syncStates(), this.checked && !a && this.name && this.uncheckOtherRadiosInGroup();
128
+ const t = new CustomEvent(
69
129
  "change",
70
130
  {
71
131
  detail: {
@@ -77,26 +137,18 @@ const a = (n = class extends u {
77
137
  composed: !0
78
138
  }
79
139
  );
80
- this.dispatchEvent(e), this.onChange && this.onChange(e);
140
+ this.dispatchEvent(t), this.onChange && this.onChange(t);
81
141
  }
82
142
  uncheckOtherRadiosInGroup() {
83
- let r = this.getRootNode();
84
- for (; r && "host" in r; ) {
85
- const e = r.host?.getRootNode();
86
- if (e && e !== r)
87
- r = e;
88
- else
89
- break;
90
- }
91
- (r instanceof Document ? r : document).querySelectorAll(`ag-radio[name="${this.name}"]`).forEach((e) => {
92
- e !== this && e instanceof n && (e.checked = !1);
143
+ this.getRootNode().querySelectorAll(`ag-radio[name="${this.name}"]`).forEach((a) => {
144
+ a !== this && a instanceof n && (a.checked = !1, a._syncValidity(), a._syncStates());
93
145
  });
94
146
  }
95
147
  /**
96
148
  * Render optional external label (for groups or above radio)
97
149
  */
98
150
  _renderExternalLabel() {
99
- return !this.label || this.noLabel ? l : c`
151
+ return !this.label || this.noLabel ? c : h`
100
152
  <label
101
153
  id="${this._ids.labelId}"
102
154
  for="${this._ids.inputId}"
@@ -104,9 +156,9 @@ const a = (n = class extends u {
104
156
  part="ag-radio-external-label"
105
157
  >
106
158
  ${this.label}
107
- ${this.required ? c`
159
+ ${this.required ? h`
108
160
  <span class="ag-form-control__required" part="ag-required" aria-hidden="true">*</span>
109
- ` : l}
161
+ ` : c}
110
162
  </label>
111
163
  `;
112
164
  }
@@ -114,7 +166,7 @@ const a = (n = class extends u {
114
166
  * Render helper text
115
167
  */
116
168
  _renderHelper() {
117
- return this.helpText ? c`
169
+ return this.helpText ? h`
118
170
  <div
119
171
  id="${this._ids.helperId}"
120
172
  class="ag-form-control__helper ag-radio__helper"
@@ -122,13 +174,13 @@ const a = (n = class extends u {
122
174
  >
123
175
  ${this.helpText}
124
176
  </div>
125
- ` : l;
177
+ ` : c;
126
178
  }
127
179
  /**
128
180
  * Render error text
129
181
  */
130
182
  _renderError() {
131
- return c`
183
+ return h`
132
184
  <div
133
185
  id="${this._ids.errorId}"
134
186
  class="ag-form-control__error ag-radio__error"
@@ -154,14 +206,14 @@ const a = (n = class extends u {
154
206
  const r = `
155
207
  radio-wrapper
156
208
  ${this.labelPosition === "start" ? "radio-wrapper--label-start" : ""}
157
- `, d = `
209
+ `, e = `
158
210
  radio-indicator
159
211
  radio-indicator--${this.size}
160
212
  radio-indicator--${this.theme}
161
- `, s = `
213
+ `, a = `
162
214
  radio-label
163
215
  radio-label--${this.size}
164
- `, e = this._getAriaDescribedBy(), t = c`
216
+ `, t = this._getAriaDescribedBy(), i = h`
165
217
  <label class=${r.trim()} part="ag-radio-wrapper">
166
218
  <input
167
219
  type="radio"
@@ -175,26 +227,26 @@ const a = (n = class extends u {
175
227
  ?required=${this.required}
176
228
  aria-required="${this.required ? "true" : "false"}"
177
229
  aria-invalid="${this.invalid ? "true" : "false"}"
178
- aria-describedby="${e || l}"
230
+ aria-describedby="${t || c}"
179
231
  @click=${this.handleClick}
180
232
  @change=${this.handleChange}
181
233
  @keydown=${this.handleKeyDown}
182
234
  aria-checked=${this.checked ? "true" : "false"}
183
235
  />
184
- <span class=${d.trim()} part="ag-radio-indicator"></span>
185
- <span class=${s.trim()} part="ag-radio-label">
186
- ${this.labelText ? this.labelText : c`<slot></slot>`}
236
+ <span class=${e.trim()} part="ag-radio-indicator"></span>
237
+ <span class=${a.trim()} part="ag-radio-label">
238
+ ${this.labelText ? this.labelText : h`<slot></slot>`}
187
239
  </span>
188
240
  </label>
189
241
  `;
190
- return this.label || this.helpText || this.errorMessage ? c`
242
+ return this.label || this.helpText || this.errorMessage ? h`
191
243
  <div class="ag-radio-wrapper-with-external">
192
244
  ${this._renderExternalLabel()}
193
- ${t}
245
+ ${i}
194
246
  ${this._renderHelper()}
195
247
  ${this._renderError()}
196
248
  </div>
197
- ` : t;
249
+ ` : i;
198
250
  }
199
251
  }, n.styles = [
200
252
  v,
@@ -384,58 +436,55 @@ const a = (n = class extends u {
384
436
  }
385
437
  `
386
438
  ], n);
387
- o([
388
- i({ type: String, reflect: !0 })
389
- ], a.prototype, "name");
390
- o([
391
- i({ type: String, reflect: !0 })
392
- ], a.prototype, "value");
393
- o([
394
- i({ type: Boolean, reflect: !0 })
395
- ], a.prototype, "checked");
396
- o([
397
- i({ type: Boolean, reflect: !0 })
398
- ], a.prototype, "disabled");
399
- o([
400
- i({ type: String })
401
- ], a.prototype, "size");
402
- o([
403
- i({ type: String })
404
- ], a.prototype, "theme");
405
- o([
406
- i({ type: String })
407
- ], a.prototype, "labelText");
408
- o([
409
- i({ type: String })
410
- ], a.prototype, "labelPosition");
411
- o([
412
- i({ type: String })
413
- ], a.prototype, "label");
414
- o([
415
- i({ type: Boolean, attribute: "label-hidden" })
416
- ], a.prototype, "labelHidden");
417
- o([
418
- i({ type: Boolean, attribute: "no-label" })
419
- ], a.prototype, "noLabel");
420
- o([
421
- i({ type: Boolean, reflect: !0 })
422
- ], a.prototype, "required");
423
- o([
424
- i({ type: Boolean, reflect: !0 })
425
- ], a.prototype, "invalid");
426
- o([
427
- i({ type: String, attribute: "error-message" })
428
- ], a.prototype, "errorMessage");
429
- o([
430
- i({ type: String, attribute: "help-text" })
431
- ], a.prototype, "helpText");
432
- o([
433
- i({ attribute: !1 })
434
- ], a.prototype, "onClick");
435
- o([
436
- i({ attribute: !1 })
437
- ], a.prototype, "onChange");
438
- let _ = a;
439
+ d([
440
+ s({ type: String, reflect: !0 })
441
+ ], o.prototype, "value");
442
+ d([
443
+ s({ type: Boolean, reflect: !0 })
444
+ ], o.prototype, "checked");
445
+ d([
446
+ s({ type: Boolean, reflect: !0 })
447
+ ], o.prototype, "disabled");
448
+ d([
449
+ s({ type: String })
450
+ ], o.prototype, "size");
451
+ d([
452
+ s({ type: String })
453
+ ], o.prototype, "theme");
454
+ d([
455
+ s({ type: String })
456
+ ], o.prototype, "labelText");
457
+ d([
458
+ s({ type: String })
459
+ ], o.prototype, "labelPosition");
460
+ d([
461
+ s({ type: String })
462
+ ], o.prototype, "label");
463
+ d([
464
+ s({ type: Boolean, attribute: "label-hidden" })
465
+ ], o.prototype, "labelHidden");
466
+ d([
467
+ s({ type: Boolean, attribute: "no-label" })
468
+ ], o.prototype, "noLabel");
469
+ d([
470
+ s({ type: Boolean, reflect: !0 })
471
+ ], o.prototype, "required");
472
+ d([
473
+ s({ type: Boolean, reflect: !0 })
474
+ ], o.prototype, "invalid");
475
+ d([
476
+ s({ type: String, attribute: "error-message" })
477
+ ], o.prototype, "errorMessage");
478
+ d([
479
+ s({ type: String, attribute: "help-text" })
480
+ ], o.prototype, "helpText");
481
+ d([
482
+ s({ attribute: !1 })
483
+ ], o.prototype, "onClick");
484
+ d([
485
+ s({ attribute: !1 })
486
+ ], o.prototype, "onChange");
487
+ let C = o;
439
488
  export {
440
- _ as AgRadio
489
+ C as AgRadio
441
490
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../../../VueRadio.vue_vue_type_script_setup_true_lang-DxNhH12d.js";
1
+ import { _ as f } from "../../../VueRadio.vue_vue_type_script_setup_true_lang-C7Z-sWpa.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"VueRadio.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/vue/VueRadio.vue"],"names":[],"mappings":"AAyBA;AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,e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B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { _ as e } from "../../../VueRadio.vue_vue_type_script_setup_true_lang-DxNhH12d.js";
1
+ import { _ as e } from "../../../VueRadio.vue_vue_type_script_setup_true_lang-C7Z-sWpa.js";
2
2
  export {
3
3
  e as VueRadio
4
4
  };
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { LabelPosition } from '../../../shared/form-control-utils';
3
+ import { ValidationMessages } from '../../../shared/face-mixin';
3
4
 
4
5
  export interface RatingChangeEventDetail {
5
6
  oldValue: number;
@@ -31,10 +32,12 @@ export interface RatingProps {
31
32
  invalid?: boolean;
32
33
  errorMessage?: string;
33
34
  helpText?: string;
35
+ validationMessages?: ValidationMessages;
34
36
  onRatingChange?: (event: RatingChangeEvent) => void;
35
37
  onRatingHover?: (event: RatingHoverEvent) => void;
36
38
  }
37
- export declare class AgRating extends LitElement {
39
+ declare const AgRating_base: (new (...args: any[]) => import('../../../shared/face-mixin').FaceMixinInterface) & typeof LitElement;
40
+ export declare class AgRating extends AgRating_base {
38
41
  private uniqueId;
39
42
  private _ratingId;
40
43
  private _labelId;
@@ -47,7 +50,6 @@ export declare class AgRating extends LitElement {
47
50
  allowClear: boolean;
48
51
  variant: '' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
49
52
  size: RatingSize;
50
- name: string;
51
53
  label: string;
52
54
  labelPosition: LabelPosition;
53
55
  labelHidden: boolean;
@@ -56,12 +58,30 @@ export declare class AgRating extends LitElement {
56
58
  invalid: boolean;
57
59
  errorMessage: string;
58
60
  helpText: string;
61
+ validationMessages: ValidationMessages | undefined;
59
62
  onRatingChange?: (event: RatingChangeEvent) => void;
60
63
  onRatingHover?: (event: RatingHoverEvent) => void;
61
64
  private hoverValue;
62
65
  private isHovering;
63
66
  private isPointerDown;
64
67
  constructor();
68
+ /**
69
+ * Sync the form value to ElementInternals.
70
+ * Submits the numeric rating as a string, or null when value is 0 (no rating).
71
+ */
72
+ private _syncFormValue;
73
+ /**
74
+ * Sync validity. No inner input to delegate to, so we implement required
75
+ * directly: a rating of 0 with required=true is valueMissing.
76
+ */
77
+ private _syncValidity;
78
+ firstUpdated(): void;
79
+ updated(changedProperties: Map<string, unknown>): void;
80
+ /**
81
+ * FACE lifecycle: called when the parent form is reset.
82
+ * Restores rating to 0 (no selection).
83
+ */
84
+ formResetCallback(): void;
65
85
  connectedCallback(): void;
66
86
  disconnectedCallback(): void;
67
87
  static styles: import('lit').CSSResult[];
@@ -83,4 +103,5 @@ export declare class AgRating extends LitElement {
83
103
  private commitValue;
84
104
  private emitHoverEvent;
85
105
  }
106
+ export {};
86
107
  //# sourceMappingURL=_Rating.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_Rating.d.ts","sourceRoot":"","sources":["../../../../src/components/Rating/core/_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