@luzmo/lucero 1.0.1-alpha.15 → 1.0.1-alpha.16

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 (277) hide show
  1. package/components/accordion/index.cjs +183 -6
  2. package/components/accordion/index.js +136 -88
  3. package/components/action-bar/index.cjs +85 -4
  4. package/components/action-bar/index.js +72 -50
  5. package/components/action-button/index.cjs +205 -3
  6. package/components/action-button/index.js +167 -93
  7. package/components/action-group/index.cjs +7 -1
  8. package/components/action-group/index.js +12 -8
  9. package/components/action-group-DHp8RHDf.js +392 -0
  10. package/components/action-group-MPf19RPV.cjs +391 -0
  11. package/components/action-menu/index.cjs +91 -11
  12. package/components/action-menu/index.js +66 -47
  13. package/components/avatar/index.cjs +63 -3
  14. package/components/avatar/index.js +54 -42
  15. package/components/base-COw9n7UR.cjs +119 -0
  16. package/components/base-DmeVy0cq.js +120 -0
  17. package/components/button/index.cjs +134 -2
  18. package/components/button/index.js +106 -72
  19. package/components/button-base-7Ak55xFd.cjs +206 -0
  20. package/components/button-base-C3kf6BTK.js +207 -0
  21. package/components/button-group/index.cjs +45 -1
  22. package/components/button-group/index.js +37 -25
  23. package/components/calendar/index.cjs +632 -1
  24. package/components/calendar/index.js +637 -7
  25. package/components/checkbox/index.cjs +111 -4
  26. package/components/checkbox/index.js +98 -53
  27. package/components/checkbox-mixin-8cL-vfDy.js +84 -0
  28. package/components/checkbox-mixin-CE7dJj3J.cjs +83 -0
  29. package/components/clear-button-Co6oKSgl.js +59 -0
  30. package/components/clear-button-X_HDY2eH.cjs +58 -0
  31. package/components/close-button-DPBK6Kpu.cjs +59 -0
  32. package/components/close-button-Miw9ZjoJ.js +60 -0
  33. package/components/color-area/index.cjs +440 -13
  34. package/components/color-area/index.js +322 -187
  35. package/components/color-controller-BjDZaxhX.js +491 -0
  36. package/components/color-controller-C3c_vb2P.cjs +490 -0
  37. package/components/color-field/index.cjs +95 -2
  38. package/components/color-field/index.js +77 -41
  39. package/components/color-handle/index.cjs +64 -3
  40. package/components/color-handle/index.js +58 -37
  41. package/components/color-loupe/index.cjs +7 -1
  42. package/components/color-loupe/index.js +12 -8
  43. package/components/color-loupe-BQqNR8YD.cjs +88 -0
  44. package/components/color-loupe-B_DDFv8l.js +89 -0
  45. package/components/color-menu/index.cjs +217 -12
  46. package/components/color-menu/index.js +187 -93
  47. package/components/color-palette/index.cjs +89 -1
  48. package/components/color-palette/index.js +78 -51
  49. package/components/color-palette-group/index.cjs +259 -3
  50. package/components/color-palette-group/index.js +193 -105
  51. package/components/color-picker/index.cjs +114 -6
  52. package/components/color-picker/index.js +92 -72
  53. package/components/color-slider/index.cjs +585 -1
  54. package/components/color-slider/index.js +590 -7
  55. package/components/{directive-oAbCiebi.js → condition-attribute-with-id-Cn815e9W.js} +22 -22
  56. package/components/condition-attribute-with-id-DEc2Yjne.cjs +43 -0
  57. package/components/date-time-picker/index.cjs +1357 -31
  58. package/components/date-time-picker/index.js +951 -637
  59. package/components/dependency-manger-CcIE1uvQ.cjs +63 -0
  60. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-XHpQjFgK.js} +24 -14
  61. package/components/divider/index.cjs +54 -1
  62. package/components/divider/index.js +49 -30
  63. package/components/divider.module-Cm5LcDRV.cjs +20 -0
  64. package/components/divider.module-DauH6k2_.js +21 -0
  65. package/components/element-resolution-DCsrhGZO.cjs +112 -0
  66. package/components/element-resolution-nMlmW4Jy.js +113 -0
  67. package/components/field-group/index.cjs +7 -1
  68. package/components/field-group/index.js +12 -8
  69. package/components/field-group-DNmY8W9v.cjs +86 -0
  70. package/components/field-group-DVdAWCQF.js +87 -0
  71. package/components/field-label/index.cjs +7 -1
  72. package/components/field-label/index.js +12 -8
  73. package/components/field-label-CKH9EXpR.cjs +156 -0
  74. package/components/field-label-Dpsecoc6.js +157 -0
  75. package/components/focus-group-BqDAk9Is.js +337 -0
  76. package/components/focus-group-DFzOlalL.cjs +336 -0
  77. package/components/focus-visible-B-B8-P9R.cjs +104 -0
  78. package/components/focus-visible-BUPRWlsh.js +105 -0
  79. package/components/focusable-BPrTcZPd.cjs +262 -0
  80. package/components/focusable-ChCLg1k4.js +263 -0
  81. package/components/{directive-C7oCP5Bh.cjs → focusable-selectors-D0t_5P7C.cjs} +16 -5
  82. package/components/{focusable-selectors-B4YgbghQ.js → focusable-selectors-IltOAOd9.js} +7 -4
  83. package/components/icon/index.cjs +90 -1
  84. package/components/icon/index.js +74 -46
  85. package/components/index.cjs +174 -1
  86. package/components/index.js +174 -172
  87. package/components/infield-button/index.cjs +46 -2
  88. package/components/infield-button/index.js +41 -30
  89. package/components/label/index.cjs +37 -1
  90. package/components/label/index.js +36 -24
  91. package/components/{language-resolution-8yZa5r_P.js → language-resolution-BSGJAWiQ.js} +21 -16
  92. package/components/language-resolution-iN9EImbb.cjs +57 -0
  93. package/components/like-anchor-D62faRNG.cjs +79 -0
  94. package/components/like-anchor-v3cJ9RWM.js +80 -0
  95. package/components/manage-help-text-BYx84zZR.cjs +125 -0
  96. package/components/manage-help-text-DOuMTGht.js +126 -0
  97. package/components/menu/index.cjs +1297 -29
  98. package/components/menu/index.js +954 -499
  99. package/components/multi-language-field/index.cjs +132 -2
  100. package/components/multi-language-field/index.js +118 -88
  101. package/components/number-field/index.cjs +613 -10
  102. package/components/number-field/index.js +442 -243
  103. package/components/observe-slot-presence-9AwLGUQ_.cjs +78 -0
  104. package/components/observe-slot-presence-DcMdoumP.js +79 -0
  105. package/components/observe-slot-text-CSofZeeF.cjs +104 -0
  106. package/components/observe-slot-text-CjnkkBPn.js +105 -0
  107. package/components/options/index.cjs +693 -60
  108. package/components/options/index.js +519 -953
  109. package/components/overlay/index.cjs +367 -21
  110. package/components/overlay/index.js +273 -189
  111. package/components/overlay-CN8ISP1F.js +2485 -0
  112. package/components/overlay-LViy9VWM.cjs +2484 -0
  113. package/components/{pending-state-DTX7ggyF.js → pending-state-CXbe-Xul.js} +28 -13
  114. package/components/pending-state-e4RbXe9u.cjs +75 -0
  115. package/components/picker/index.cjs +9 -1
  116. package/components/picker/index.js +15 -11
  117. package/components/picker-DNde3awt.cjs +672 -0
  118. package/components/picker-PfUAF05y.js +673 -0
  119. package/components/picker-button/index.cjs +56 -4
  120. package/components/picker-button/index.js +45 -34
  121. package/components/platform-CxDar3Dn.cjs +68 -0
  122. package/components/platform-Cxn0WbyT.js +69 -0
  123. package/components/popover/index.cjs +7 -1
  124. package/components/popover/index.js +12 -8
  125. package/components/popover-BkbYhl3i.js +74 -0
  126. package/components/popover-BkgUf0kL.cjs +74 -0
  127. package/components/progress-circle/index.cjs +7 -1
  128. package/components/progress-circle/index.js +12 -8
  129. package/components/progress-circle-Hu_ivPHf.js +133 -0
  130. package/components/progress-circle-_Etqsj9f.cjs +132 -0
  131. package/components/radio/index.cjs +244 -2
  132. package/components/radio/index.js +192 -110
  133. package/components/{when-CDK1Tt5Y.js → random-id-BE6HA503.cjs} +7 -10
  134. package/components/{random-id-ByCz1xaq.js → random-id-BEc6QIUL.js} +3 -3
  135. package/components/roving-tabindex-AsmAh2In.cjs +95 -0
  136. package/components/roving-tabindex-DPF9NmrH.js +96 -0
  137. package/components/search/index.cjs +115 -8
  138. package/components/search/index.js +96 -66
  139. package/components/select/index.cjs +720 -51
  140. package/components/select/index.js +563 -347
  141. package/components/sized-mixin-DmkrNdWB.js +80 -0
  142. package/components/sized-mixin-UaTVa-AE.cjs +79 -0
  143. package/components/slider/index.cjs +119 -1
  144. package/components/slider/index.js +100 -1113
  145. package/components/{condition-attribute-with-id-Dv4lSRbe.js → slottable-request-event-CANixJnR.cjs} +15 -13
  146. package/components/{slottable-request-event-DggLA4Rx.js → slottable-request-event-D9WzrdWv.js} +12 -9
  147. package/components/strategies-DlMlaSJR.cjs +317 -0
  148. package/components/strategies-DlPQoTFE.js +318 -0
  149. package/components/streaming-listener-D4sHaMub.cjs +145 -0
  150. package/components/streaming-listener-cAz5zJyk.js +146 -0
  151. package/components/swatch/index.cjs +436 -7
  152. package/components/swatch/index.js +350 -205
  153. package/components/switch/index.cjs +61 -2
  154. package/components/switch/index.js +51 -34
  155. package/components/tabs/index.cjs +693 -26
  156. package/components/tabs/index.js +521 -388
  157. package/components/tags/index.cjs +201 -4
  158. package/components/tags/index.js +152 -87
  159. package/components/text-field/index.cjs +49 -3
  160. package/components/text-field/index.js +44 -30
  161. package/components/text-field-11tcnftU.cjs +338 -0
  162. package/components/text-field-Chi9J2Cz.js +339 -0
  163. package/components/text-field.module-CMBS0jSL.js +21 -0
  164. package/components/text-field.module-DIJdV_sA.cjs +20 -0
  165. package/components/toast/index.cjs +177 -12
  166. package/components/toast/index.js +145 -73
  167. package/components/tooltip/index.cjs +221 -6
  168. package/components/tooltip/index.js +155 -131
  169. package/components/tooltip/tooltip.d.ts +1 -12
  170. package/components/unit-input/index.cjs +232 -8
  171. package/components/unit-input/index.js +201 -108
  172. package/components/utils.cjs +25 -1
  173. package/components/utils.js +22 -22
  174. package/custom-elements.json +1 -1
  175. package/package.json +1 -1
  176. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  177. package/components/NumberFormatter-DgOUVrge.js +0 -136
  178. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  179. package/components/NumberParser-ci9J5EKv.js +0 -173
  180. package/components/action-group-DBImibFn.js +0 -258
  181. package/components/action-group-DJGMcRHb.cjs +0 -20
  182. package/components/async-directive-BX1T1e1_.cjs +0 -22
  183. package/components/async-directive-BfcqVjDp.js +0 -82
  184. package/components/base-BjTwmyRF.cjs +0 -22
  185. package/components/base-CBCg3yyw.cjs +0 -40
  186. package/components/base-D76d76ww.js +0 -26
  187. package/components/base-WsynuqaS.js +0 -677
  188. package/components/button-base-DbkDzb71.js +0 -144
  189. package/components/button-base-XgPLmwP-.cjs +0 -25
  190. package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
  191. package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
  192. package/components/class-map-Di1D_rCm.cjs +0 -22
  193. package/components/class-map-NbVXqBU0.js +0 -51
  194. package/components/clear-button-BbVqNU-g.js +0 -53
  195. package/components/clear-button-DYdeFsS8.cjs +0 -18
  196. package/components/close-button-CpfKibqg.cjs +0 -18
  197. package/components/close-button-DzOZZmkY.js +0 -51
  198. package/components/color-controller-B0uX6Zso.js +0 -3230
  199. package/components/color-controller-CoUL5f9K.cjs +0 -18
  200. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  201. package/components/color-loupe-CmMsXbjT.js +0 -81
  202. package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
  203. package/components/dependency-manger-C5HCkMMB.cjs +0 -18
  204. package/components/directive-helpers-Cm6gitnu.js +0 -62
  205. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  206. package/components/divider.module-DDvBo9zo.cjs +0 -18
  207. package/components/divider.module-DoQWQEIJ.js +0 -21
  208. package/components/element-resolution-BvRLGqIU.cjs +0 -18
  209. package/components/element-resolution-FCUT-wql.js +0 -91
  210. package/components/field-group-DXfBWrkO.js +0 -66
  211. package/components/field-group-DkGst3r5.cjs +0 -23
  212. package/components/field-label-CZ2zzChK.js +0 -106
  213. package/components/field-label-mO1AkUgR.cjs +0 -25
  214. package/components/flow-D-0MTYCm.js +0 -527
  215. package/components/flow-DM3dNAKs.cjs +0 -30
  216. package/components/focus-group-DHeTq18L.js +0 -218
  217. package/components/focus-group-DnxZUBhQ.cjs +0 -18
  218. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  219. package/components/focus-visible-DBlJGoEW.js +0 -74
  220. package/components/focusable-BxtpnzWp.js +0 -153
  221. package/components/focusable-EbipgXRh.cjs +0 -18
  222. package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
  223. package/components/if-defined-C9YGdo33.cjs +0 -22
  224. package/components/if-defined-DOaE2coe.js +0 -27
  225. package/components/index-BQoI8AD3.cjs +0 -113
  226. package/components/index-BwxgAdzi.cjs +0 -57
  227. package/components/index-Cb9zsiz6.js +0 -1490
  228. package/components/index-HjQa8tew.js +0 -1174
  229. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  230. package/components/like-anchor-Bvn_vLQ8.js +0 -69
  231. package/components/like-anchor-sod1C1fR.cjs +0 -32
  232. package/components/luzmo-icons-D47EGj-3.cjs +0 -29
  233. package/components/luzmo-icons-NEyaMpEM.js +0 -229
  234. package/components/manage-help-text-DhgARkZX.cjs +0 -30
  235. package/components/manage-help-text-syYnjKGL.js +0 -92
  236. package/components/mutation-controller-DH7YOCyj.js +0 -52
  237. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  238. package/components/observe-slot-presence-CmVi0zTc.js +0 -68
  239. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  240. package/components/observe-slot-text-BPfIQQtz.js +0 -87
  241. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  242. package/components/overlay-Cig9r6uU.js +0 -2747
  243. package/components/overlay-KSKMzzkh.cjs +0 -47
  244. package/components/pending-state-CaH1si5b.cjs +0 -26
  245. package/components/picker-CAYj4hBD.js +0 -461
  246. package/components/picker-apS0Zrly.cjs +0 -123
  247. package/components/platform-BM-uMWpX.js +0 -69
  248. package/components/platform-BiXhwqk3.cjs +0 -18
  249. package/components/popover-DjX0aAnY.js +0 -67
  250. package/components/popover-KFfO0IYL.cjs +0 -30
  251. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  252. package/components/progress-circle-DXH9z8-6.js +0 -97
  253. package/components/query-BL-TJj7K.cjs +0 -22
  254. package/components/query-D_KR_GUc.js +0 -51
  255. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  256. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  257. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  258. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  259. package/components/random-id-CqvckpWe.cjs +0 -18
  260. package/components/roving-tabindex-By_fCy_e.cjs +0 -18
  261. package/components/roving-tabindex-DOg4z6ZU.js +0 -66
  262. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  263. package/components/sized-mixin-D4ACoVUr.js +0 -63
  264. package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
  265. package/components/state-D8JEtYqe.cjs +0 -22
  266. package/components/state-Deh-vKYE.js +0 -29
  267. package/components/strategies-9indNIEb.js +0 -195
  268. package/components/strategies-BACP6MhR.cjs +0 -18
  269. package/components/streaming-listener-B00MvALi.cjs +0 -18
  270. package/components/streaming-listener-CP-JE6Fa.js +0 -91
  271. package/components/style-map-CeilmSgs.cjs +0 -22
  272. package/components/style-map-IgqIKvlE.js +0 -53
  273. package/components/text-field-BYF2RHY8.cjs +0 -85
  274. package/components/text-field-PYafEYeO.js +0 -314
  275. package/components/text-field.module-C2KVUJcX.js +0 -21
  276. package/components/text-field.module-DXhFA9G-.cjs +0 -18
  277. package/components/when-CDZyJPvd.cjs +0 -22
@@ -15,8 +15,250 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../base-CBCg3yyw.cjs"),h=require("../focus-visible-B0P9aY_G.cjs"),b=require("../sized-mixin-CPxE5C96.cjs"),v=require("../query-assigned-nodes-BcKWmGzy.cjs"),p=require("../roving-tabindex-By_fCy_e.cjs"),m=require("../field-group-DkGst3r5.cjs"),f='@media (forced-colors: active){:host{--highcontrast-radio-neutral-content-color: CanvasText;--highcontrast-radio-neutral-content-color-hover: CanvasText;--highcontrast-radio-neutral-content-color-down: CanvasText;--highcontrast-radio-neutral-content-color-focus: CanvasText;--highcontrast-radio-button-border-color-default: ButtonText;--highcontrast-radio-button-border-color-hover: Highlight;--highcontrast-radio-button-border-color-down: ButtonText;--highcontrast-radio-button-border-color-focus: Highlight;--highcontrast-radio-emphasized-accent-color: ButtonText;--highcontrast-radio-emphasized-accent-color-hover: Highlight;--highcontrast-radio-emphasized-accent-color-down: ButtonText;--highcontrast-radio-emphasized-accent-color-focus: Highlight;--highcontrast-radio-button-checked-border-color-default: Highlight;--highcontrast-radio-button-checked-border-color-hover: Highlight;--highcontrast-radio-button-checked-border-color-down: Highlight;--highcontrast-radio-button-checked-border-color-focus: Highlight;--highcontrast-radio-disabled-content-color: GrayText;--highcontrast-radio-disabled-border-color: GrayText;--highcontrast-radio-focus-indicator-color: CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--luzmo-radio-height, var(--radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative;font-family:var(--luzmo-radio-font-family, var(--luzmo-font-family))}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down, var(--luzmo-radio-button-border-color-down, var(--radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down, var(--luzmo-radio-button-checked-border-color-down, var(--radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down, var(--luzmo-radio-neutral-content-color-down, var(--radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus, var(--luzmo-radio-button-border-color-focus, var(--radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus, var(--luzmo-radio-button-checked-border-color-focus, var(--radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus, var(--luzmo-radio-neutral-content-color-focus, var(--radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color, var(--luzmo-radio-emphasized-accent-color, var(--radio-emphasized-accent-color)))}@media (hover: hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover, var(--luzmo-radio-button-border-color-hover, var(--radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover, var(--luzmo-radio-button-checked-border-color-hover, var(--radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover, var(--luzmo-radio-neutral-content-color-hover, var(--radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover, var(--luzmo-radio-emphasized-accent-color-hover, var(--radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down, var(--luzmo-radio-emphasized-accent-color-down, var(--radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus, var(--luzmo-radio-emphasized-accent-color-focus, var(--radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color, var(--luzmo-radio-disabled-border-color, var(--radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color, var(--luzmo-radio-disabled-content-color, var(--radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--luzmo-radio-line-height, var(--radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--radio-button-control-size) / 2 - var(--radio-button-selection-indicator) / 2);border-color:var(--highcontrast-radio-button-checked-border-color-default, var(--luzmo-radio-button-checked-border-color-default, var(--radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);border-style:solid}#label{text-align:start;font-size:var(--luzmo-radio-font-size, var(--radio-font-size));color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));line-height:var(--luzmo-radio-line-height, var(--radio-line-height));transition:color var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;margin-block-start:var(--radio-label-top-to-text);margin-block-end:var(--radio-label-bottom-to-text);margin-inline-start:var(--luzmo-radio-text-to-control, var(--radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--luzmo-radio-line-height-cjk, var(--radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-radio-button-top-to-control, var(--radio-button-top-to-control));position:relative}#button:before{z-index:0;content:"";box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color, var(--luzmo-radio-button-background-color, var(--radio-button-background-color)));border-width:var(--luzmo-radio-border-width, var(--radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default, var(--luzmo-radio-button-border-color-default, var(--radio-button-border-color-default)));transition:border var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out,box-shadow var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:"";transition:opacity var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out,margin var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%) translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}:host{--radio-button-border-color-default: var(--luzmo-border-color-full);--radio-button-border-color-hover: var(--luzmo-border-color-full-hover);--radio-button-border-color-down: var(--luzmo-border-color-full-hover);--radio-button-border-color-focus: var(--luzmo-border-color-full-hover);--radio-neutral-content-color: var(--luzmo-selected-color-hard);--radio-neutral-content-color-hover: var(--luzmo-selected-color-hard-hover);--radio-neutral-content-color-down: var(--luzmo-selected-color-hard-down);--radio-neutral-content-color-focus: var(--luzmo-selected-color-hard-focus);--radio-button-selection-indicator: var(--luzmo-spacing-2);--radio-focus-indicator-width: var(--luzmo-indicator-width);--radio-focus-indicator-gap: var(--luzmo-indicator-gap);--radio-focus-indicator-color: var(--luzmo-primary);--radio-disabled-content-color: var(--luzmo-disabled-color);--radio-disabled-border-color: var(--luzmo-border-color-disabled);--radio-emphasized-accent-color: var(--luzmo-primary);--radio-emphasized-accent-color-hover: var(--luzmo-primary-hover);--radio-emphasized-accent-color-down: var(--luzmo-primary-down);--radio-emphasized-accent-color-focus: var(--luzmo-primary-focus);--radio-border-width: calc(var(--luzmo-border-width) * 2);--radio-button-background-color: var(--luzmo-background-color);--radio-button-checked-border-color-default: var(--luzmo-selected-color-hard);--radio-button-checked-border-color-hover: var( --luzmo-selected-color-hard-hover );--radio-button-checked-border-color-down: var( --luzmo-selected-color-hard-down );--radio-button-checked-border-color-focus: var( --luzmo-selected-color-hard-focus );--radio-line-height: 1.3;--radio-animation-duration: var(--luzmo-animation-duration);--radio-height: 32px;--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 6px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--radio-line-height-cjk: 1.5}:host{--radio-height: var(--luzmo-component-height);--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 7px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host([size=s]){--radio-height: var(--luzmo-component-height-s);--radio-button-control-size: var(--luzmo-spacing-4);--radio-text-to-control: 9px;--radio-label-top-to-text: var(--luzmo-spacing-2);--radio-label-bottom-to-text: 5px;--radio-button-top-to-control: 6px;--radio-font-size: var(--luzmo-spacing-4)}:host([size=l]){--radio-height: var(--luzmo-component-height-l);--radio-button-control-size: 16px;--radio-text-to-control: 11px;--radio-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--radio-label-bottom-to-text: 11px;--radio-button-top-to-control: var(--luzmo-spacing-4);--radio-font-size: 16px}:host([size=xl]){--radio-height: var(--luzmo-component-height-xl);--radio-button-control-size: 18px;--radio-text-to-control: 13px;--radio-label-top-to-text: var(--luzmo-spacing-4);--radio-label-bottom-to-text: 14px;--radio-button-top-to-control: 15px;--radio-font-size: 18px}:host([emphasized]){--radio-button-checked-border-color-default: var(--luzmo-primary);--radio-button-checked-border-color-hover: var(--luzmo-primary-hover);--radio-button-checked-border-color-down: var(--luzmo-primary-down);--radio-button-checked-border-color-focus: var(--luzmo-primary-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}';var z=Object.defineProperty,n=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&z(o,t,r),r};class a extends b.SizedMixin(h.FocusVisiblePolyfillMixin(e.LuzmoElement),{noDefaultSize:!0}){constructor(){super(...arguments),this.autofocus=!1,this.value="",this.checked=!1,this.disabled=!1,this.emphasized=!1,this.invalid=!1,this.readonly=!1}static get styles(){return[e.r(f)]}click(){this.disabled||this.activate()}manageAutoFocus(){this.autofocus&&(this.dispatchEvent(new KeyboardEvent("keydown",{code:"Tab"})),this.focus())}activate(){this.checked||(this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}handleKeyup(o){o.code==="Space"&&this.activate()}render(){return e.x`
18
+ "use strict";
19
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
20
+ const lit = require("lit");
21
+ const decorators_js = require("lit/decorators.js");
22
+ const base = require("../base-COw9n7UR.cjs");
23
+ const focusVisible = require("../focus-visible-B-B8-P9R.cjs");
24
+ const sizedMixin = require("../sized-mixin-UaTVa-AE.cjs");
25
+ const rovingTabindex = require("../roving-tabindex-AsmAh2In.cjs");
26
+ const fieldGroup = require("../field-group-DNmY8W9v.cjs");
27
+ const radioStyles = '@media (forced-colors: active){:host{--highcontrast-radio-neutral-content-color: CanvasText;--highcontrast-radio-neutral-content-color-hover: CanvasText;--highcontrast-radio-neutral-content-color-down: CanvasText;--highcontrast-radio-neutral-content-color-focus: CanvasText;--highcontrast-radio-button-border-color-default: ButtonText;--highcontrast-radio-button-border-color-hover: Highlight;--highcontrast-radio-button-border-color-down: ButtonText;--highcontrast-radio-button-border-color-focus: Highlight;--highcontrast-radio-emphasized-accent-color: ButtonText;--highcontrast-radio-emphasized-accent-color-hover: Highlight;--highcontrast-radio-emphasized-accent-color-down: ButtonText;--highcontrast-radio-emphasized-accent-color-focus: Highlight;--highcontrast-radio-button-checked-border-color-default: Highlight;--highcontrast-radio-button-checked-border-color-hover: Highlight;--highcontrast-radio-button-checked-border-color-down: Highlight;--highcontrast-radio-button-checked-border-color-focus: Highlight;--highcontrast-radio-disabled-content-color: GrayText;--highcontrast-radio-disabled-border-color: GrayText;--highcontrast-radio-focus-indicator-color: CanvasText}#button:after{forced-color-adjust:none}}:host{vertical-align:top;min-block-size:var(--luzmo-radio-height, var(--radio-height));max-inline-size:100%;align-items:flex-start;display:inline-flex;position:relative;font-family:var(--luzmo-radio-font-family, var(--luzmo-font-family))}:host(:active) #button:before{border-color:var(--highcontrast-radio-button-border-color-down, var(--luzmo-radio-button-border-color-down, var(--radio-button-border-color-down)))}:host(:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-down, var(--luzmo-radio-button-checked-border-color-down, var(--radio-button-checked-border-color-down)))}:host(:active) #label{color:var(--highcontrast-radio-neutral-content-color-down, var(--luzmo-radio-neutral-content-color-down, var(--radio-neutral-content-color-down)))}:host(:focus-visible) #button:before{border-color:var(--highcontrast-radio-button-border-color-focus, var(--luzmo-radio-button-border-color-focus, var(--radio-button-border-color-focus)))}:host(:focus-visible) #button:after{border-style:solid;border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2)}:host(:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-focus, var(--luzmo-radio-button-checked-border-color-focus, var(--radio-button-checked-border-color-focus)))}:host(:focus-visible) #label{color:var(--highcontrast-radio-neutral-content-color-focus, var(--luzmo-radio-neutral-content-color-focus, var(--radio-neutral-content-color-focus)))}:host([readonly]) #input:read-only{cursor:auto}:host([readonly]) #button{clip:rect(1px,1px,1px,1px);clip-path:inset(50%);position:fixed;inset-block-end:100%;inset-inline-end:100%}:host([readonly][checked][disabled]) #input~#label,:host([readonly][disabled]) #input~#label,:host([readonly]) #label{color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));margin-inline-start:0}:host([emphasized][checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color, var(--luzmo-radio-emphasized-accent-color, var(--radio-emphasized-accent-color)))}@media (hover: hover){:host(:hover) #button:before{border-color:var(--highcontrast-radio-button-border-color-hover, var(--luzmo-radio-button-border-color-hover, var(--radio-button-border-color-hover)))}:host([checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-button-checked-border-color-hover, var(--luzmo-radio-button-checked-border-color-hover, var(--radio-button-checked-border-color-hover)))}:host(:hover) #label{color:var(--highcontrast-radio-neutral-content-color-hover, var(--luzmo-radio-neutral-content-color-hover, var(--radio-neutral-content-color-hover)))}:host([emphasized][checked]:hover) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-hover, var(--luzmo-radio-emphasized-accent-color-hover, var(--radio-emphasized-accent-color-hover)))}}:host([emphasized]:active[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-down, var(--luzmo-radio-emphasized-accent-color-down, var(--radio-emphasized-accent-color-down)))}:host([emphasized]:focus-visible[checked]) #input+#button:before{border-color:var(--highcontrast-radio-emphasized-accent-color-focus, var(--luzmo-radio-emphasized-accent-color-focus, var(--radio-emphasized-accent-color-focus)))}:host([checked][disabled]) #input+#button:before,:host([disabled]) #input+#button:before{border-color:var(--highcontrast-radio-disabled-border-color, var(--luzmo-radio-disabled-border-color, var(--radio-disabled-border-color)))}:host([checked][disabled]) #input~#label,:host([disabled]) #input~#label{color:var(--highcontrast-radio-disabled-content-color, var(--luzmo-radio-disabled-content-color, var(--radio-disabled-content-color)))}#input{font-family:inherit;font-size:100%;line-height:var(--luzmo-radio-line-height, var(--radio-line-height));box-sizing:border-box;inline-size:100%;block-size:100%;opacity:0;z-index:1;cursor:pointer;margin:0;padding:0;position:absolute;overflow:visible}:host([disabled]) #input{cursor:default}:host([checked]) #input+#button:before{border-width:calc(var(--radio-button-control-size) / 2 - var(--radio-button-selection-indicator) / 2);border-color:var(--highcontrast-radio-button-checked-border-color-default, var(--luzmo-radio-button-checked-border-color-default, var(--radio-button-checked-border-color-default)))}#input:focus-visible+#button:after{border-width:var(--luzmo-radio-focus-indicator-width, var(--radio-focus-indicator-width));border-color:var(--highcontrast-radio-focus-indicator-color, var(--luzmo-radio-focus-indicator-color, var(--radio-focus-indicator-color)));inline-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);block-size:calc(var(--radio-button-control-size) + var(--radio-focus-indicator-gap) * 2);border-style:solid}#label{text-align:start;font-size:var(--luzmo-radio-font-size, var(--radio-font-size));color:var(--highcontrast-radio-neutral-content-color, var(--luzmo-radio-neutral-content-color, var(--radio-neutral-content-color)));line-height:var(--luzmo-radio-line-height, var(--radio-line-height));transition:color var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;margin-block-start:var(--radio-label-top-to-text);margin-block-end:var(--radio-label-bottom-to-text);margin-inline-start:var(--luzmo-radio-text-to-control, var(--radio-text-to-control))}#label:lang(ja),#label:lang(ko),#label:lang(zh){line-height:var(--luzmo-radio-line-height-cjk, var(--radio-line-height-cjk))}#button{box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-radio-button-top-to-control, var(--radio-button-top-to-control));position:relative}#button:before{z-index:0;content:"";box-sizing:border-box;inline-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));block-size:var(--luzmo-radio-button-control-size, var(--radio-button-control-size));background-color:var(--highcontrast-radio-button-background-color, var(--luzmo-radio-button-background-color, var(--radio-button-background-color)));border-width:var(--luzmo-radio-border-width, var(--radio-border-width));border-color:var(--highcontrast-radio-button-border-color-default, var(--luzmo-radio-button-border-color-default, var(--radio-button-border-color-default)));transition:border var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out,box-shadow var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-in-out;border-style:solid;border-radius:50%;display:block;position:absolute}#button:after{content:"";transition:opacity var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out,margin var(--luzmo-radio-animation-duration, var(--radio-animation-duration)) ease-out;border-radius:50%;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%) translateY(-50%)}:host:dir(rtl) #button:after,:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}:host{--radio-button-border-color-default: var(--luzmo-border-color-full);--radio-button-border-color-hover: var(--luzmo-border-color-full-hover);--radio-button-border-color-down: var(--luzmo-border-color-full-hover);--radio-button-border-color-focus: var(--luzmo-border-color-full-hover);--radio-neutral-content-color: var(--luzmo-selected-color-hard);--radio-neutral-content-color-hover: var(--luzmo-selected-color-hard-hover);--radio-neutral-content-color-down: var(--luzmo-selected-color-hard-down);--radio-neutral-content-color-focus: var(--luzmo-selected-color-hard-focus);--radio-button-selection-indicator: var(--luzmo-spacing-2);--radio-focus-indicator-width: var(--luzmo-indicator-width);--radio-focus-indicator-gap: var(--luzmo-indicator-gap);--radio-focus-indicator-color: var(--luzmo-primary);--radio-disabled-content-color: var(--luzmo-disabled-color);--radio-disabled-border-color: var(--luzmo-border-color-disabled);--radio-emphasized-accent-color: var(--luzmo-primary);--radio-emphasized-accent-color-hover: var(--luzmo-primary-hover);--radio-emphasized-accent-color-down: var(--luzmo-primary-down);--radio-emphasized-accent-color-focus: var(--luzmo-primary-focus);--radio-border-width: calc(var(--luzmo-border-width) * 2);--radio-button-background-color: var(--luzmo-background-color);--radio-button-checked-border-color-default: var(--luzmo-selected-color-hard);--radio-button-checked-border-color-hover: var( --luzmo-selected-color-hard-hover );--radio-button-checked-border-color-down: var( --luzmo-selected-color-hard-down );--radio-button-checked-border-color-focus: var( --luzmo-selected-color-hard-focus );--radio-line-height: 1.3;--radio-animation-duration: var(--luzmo-animation-duration);--radio-height: 32px;--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 6px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--radio-line-height-cjk: 1.5}:host{--radio-height: var(--luzmo-component-height);--radio-button-control-size: 14px;--radio-text-to-control: 10px;--radio-label-top-to-text: 7px;--radio-label-bottom-to-text: 9px;--radio-button-top-to-control: 9px;--radio-font-size: 14px}:host([size=s]){--radio-height: var(--luzmo-component-height-s);--radio-button-control-size: var(--luzmo-spacing-4);--radio-text-to-control: 9px;--radio-label-top-to-text: var(--luzmo-spacing-2);--radio-label-bottom-to-text: 5px;--radio-button-top-to-control: 6px;--radio-font-size: var(--luzmo-spacing-4)}:host([size=l]){--radio-height: var(--luzmo-component-height-l);--radio-button-control-size: 16px;--radio-text-to-control: 11px;--radio-label-top-to-text: calc( var(--luzmo-spacing-3) + var(--luzmo-spacing-1) );--radio-label-bottom-to-text: 11px;--radio-button-top-to-control: var(--luzmo-spacing-4);--radio-font-size: 16px}:host([size=xl]){--radio-height: var(--luzmo-component-height-xl);--radio-button-control-size: 18px;--radio-text-to-control: 13px;--radio-label-top-to-text: var(--luzmo-spacing-4);--radio-label-bottom-to-text: 14px;--radio-button-top-to-control: 15px;--radio-font-size: 18px}:host([emphasized]){--radio-button-checked-border-color-default: var(--luzmo-primary);--radio-button-checked-border-color-hover: var(--luzmo-primary-hover);--radio-button-checked-border-color-down: var(--luzmo-primary-down);--radio-button-checked-border-color-focus: var(--luzmo-primary-focus)}:host(:focus){outline:none}:host([disabled]){pointer-events:none}:host([dir=rtl]) #button:after{transform:translate(50%) translateY(-50%)}';
28
+ var __defProp$1 = Object.defineProperty;
29
+ var __decorateClass$1 = (decorators, target, key, kind) => {
30
+ var result = void 0;
31
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
32
+ if (decorator = decorators[i])
33
+ result = decorator(target, key, result) || result;
34
+ if (result) __defProp$1(target, key, result);
35
+ return result;
36
+ };
37
+ class LuzmoRadio extends sizedMixin.SizedMixin(
38
+ focusVisible.FocusVisiblePolyfillMixin(base.LuzmoElement),
39
+ { noDefaultSize: true }
40
+ ) {
41
+ constructor() {
42
+ super(...arguments);
43
+ this.autofocus = false;
44
+ this.value = "";
45
+ this.checked = false;
46
+ this.disabled = false;
47
+ this.emphasized = false;
48
+ this.invalid = false;
49
+ this.readonly = false;
50
+ }
51
+ static get styles() {
52
+ return [lit.unsafeCSS(radioStyles)];
53
+ }
54
+ click() {
55
+ if (this.disabled) {
56
+ return;
57
+ }
58
+ this.activate();
59
+ }
60
+ manageAutoFocus() {
61
+ if (this.autofocus) {
62
+ this.dispatchEvent(
63
+ new KeyboardEvent("keydown", {
64
+ code: "Tab"
65
+ })
66
+ );
67
+ this.focus();
68
+ }
69
+ }
70
+ activate() {
71
+ if (this.checked) {
72
+ return;
73
+ }
74
+ this.checked = true;
75
+ this.dispatchEvent(
76
+ new Event("change", {
77
+ bubbles: true,
78
+ composed: true
79
+ })
80
+ );
81
+ }
82
+ handleKeyup(event) {
83
+ if (event.code === "Space") {
84
+ this.activate();
85
+ }
86
+ }
87
+ render() {
88
+ return lit.html`
19
89
  <div id="input"></div>
20
90
  <span id="button"></span>
21
91
  <span id="label" role="presentation"><slot></slot></span>
22
- `}firstUpdated(o){super.firstUpdated(o),this.setAttribute("role","radio"),this.hasAttribute("tabindex")||(this.tabIndex=0),this.manageAutoFocus(),this.addEventListener("click",this.activate),this.addEventListener("keyup",this.handleKeyup)}updated(o){super.updated(o),o.has("invalid")&&(this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")),o.has("checked")&&(this.checked?this.setAttribute("aria-checked","true"):this.setAttribute("aria-checked","false")),o.has("disabled")&&(this.disabled?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled"))}}n([e.n({type:Boolean})],a.prototype,"autofocus");n([e.n({type:String,reflect:!0})],a.prototype,"value");n([e.n({type:Boolean,reflect:!0})],a.prototype,"checked");n([e.n({type:Boolean,reflect:!0})],a.prototype,"disabled");n([e.n({type:Boolean,reflect:!0})],a.prototype,"emphasized");n([e.n({type:Boolean,reflect:!0})],a.prototype,"invalid");n([e.n({type:Boolean,reflect:!0})],a.prototype,"readonly");var g=Object.defineProperty,u=(d,o,t,l)=>{for(var r=void 0,i=d.length-1,c;i>=0;i--)(c=d[i])&&(r=c(o,t,r)||r);return r&&g(o,t,r),r};class s extends h.FocusVisiblePolyfillMixin(m.LuzmoFieldGroup){constructor(){super(...arguments),this.name="",this.rovingTabindexController=new p.RovingTabindexController(this,{focusInIndex:o=>o.findIndex(t=>this.selected?!t.disabled&&t.value===this.selected:!t.disabled),elementEnterAction:o=>{this._setSelected(o.value)},elements:()=>this.buttons,isFocusableElement:o=>!o.disabled}),this.selected=""}get buttons(){return this.defaultNodes.filter(o=>o instanceof a)}focus(){this.rovingTabindexController.focus()}_setSelected(o){if(o===this.selected)return;const t=this.selected,l=o?this.querySelector(`luzmo-radio[value="${o}"]`):void 0;if(this.selected=l?o:"",!this.dispatchEvent(new Event("change",{cancelable:!0,bubbles:!0,composed:!0}))){this.selected=t;return}this.validateRadios()}willUpdate(o){if(!this.hasUpdated){this.setAttribute("role","radiogroup");const t=this.querySelector("luzmo-radio[checked]"),l=t?t.value:"";if(this.selected=l||this.selected,this.selected&&this.selected!==l){const r=this.querySelector(`luzmo-radio[value="${this.selected}"]`);r&&(r.checked=!0)}this.shadowRoot.addEventListener("change",r=>{r.stopPropagation();const i=r.target;this._setSelected(i.value)})}o.has("selected")&&this.validateRadios()}async validateRadios(){let o=!1;this.hasUpdated||await this.updateComplete,this.buttons.map(t=>{t.checked=this.selected===t.value,o=o||t.checked}),o||(this.selected="")}handleSlotchange(){this.rovingTabindexController.clearElementCache()}}u([e.n({type:String})],s.prototype,"name");u([v.n()],s.prototype,"defaultNodes");u([e.n({reflect:!0})],s.prototype,"selected");customElements.get("luzmo-radio")||customElements.define("luzmo-radio",a);customElements.get("luzmo-radio-group")||customElements.define("luzmo-radio-group",s);exports.LuzmoRadio=a;exports.LuzmoRadioGroup=s;
92
+ `;
93
+ }
94
+ firstUpdated(changes) {
95
+ super.firstUpdated(changes);
96
+ this.setAttribute("role", "radio");
97
+ if (!this.hasAttribute("tabindex")) {
98
+ this.tabIndex = 0;
99
+ }
100
+ this.manageAutoFocus();
101
+ this.addEventListener("click", this.activate);
102
+ this.addEventListener("keyup", this.handleKeyup);
103
+ }
104
+ updated(changes) {
105
+ super.updated(changes);
106
+ if (changes.has("invalid")) {
107
+ if (this.invalid) {
108
+ this.setAttribute("aria-invalid", "true");
109
+ } else {
110
+ this.removeAttribute("aria-invalid");
111
+ }
112
+ }
113
+ if (changes.has("checked")) {
114
+ if (this.checked) {
115
+ this.setAttribute("aria-checked", "true");
116
+ } else {
117
+ this.setAttribute("aria-checked", "false");
118
+ }
119
+ }
120
+ if (changes.has("disabled")) {
121
+ if (this.disabled) {
122
+ this.setAttribute("aria-disabled", "true");
123
+ } else {
124
+ this.removeAttribute("aria-disabled");
125
+ }
126
+ }
127
+ }
128
+ }
129
+ __decorateClass$1([
130
+ decorators_js.property({ type: Boolean })
131
+ ], LuzmoRadio.prototype, "autofocus");
132
+ __decorateClass$1([
133
+ decorators_js.property({ type: String, reflect: true })
134
+ ], LuzmoRadio.prototype, "value");
135
+ __decorateClass$1([
136
+ decorators_js.property({ type: Boolean, reflect: true })
137
+ ], LuzmoRadio.prototype, "checked");
138
+ __decorateClass$1([
139
+ decorators_js.property({ type: Boolean, reflect: true })
140
+ ], LuzmoRadio.prototype, "disabled");
141
+ __decorateClass$1([
142
+ decorators_js.property({ type: Boolean, reflect: true })
143
+ ], LuzmoRadio.prototype, "emphasized");
144
+ __decorateClass$1([
145
+ decorators_js.property({ type: Boolean, reflect: true })
146
+ ], LuzmoRadio.prototype, "invalid");
147
+ __decorateClass$1([
148
+ decorators_js.property({ type: Boolean, reflect: true })
149
+ ], LuzmoRadio.prototype, "readonly");
150
+ var __defProp = Object.defineProperty;
151
+ var __decorateClass = (decorators, target, key, kind) => {
152
+ var result = void 0;
153
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
154
+ if (decorator = decorators[i])
155
+ result = decorator(target, key, result) || result;
156
+ if (result) __defProp(target, key, result);
157
+ return result;
158
+ };
159
+ class LuzmoRadioGroup extends focusVisible.FocusVisiblePolyfillMixin(
160
+ fieldGroup.LuzmoFieldGroup
161
+ ) {
162
+ constructor() {
163
+ super(...arguments);
164
+ this.name = "";
165
+ this.rovingTabindexController = new rovingTabindex.RovingTabindexController(this, {
166
+ focusInIndex: (elements) => elements.findIndex(
167
+ (el) => this.selected ? !el.disabled && el.value === this.selected : !el.disabled
168
+ ),
169
+ elementEnterAction: (el) => {
170
+ this._setSelected(el.value);
171
+ },
172
+ elements: () => this.buttons,
173
+ isFocusableElement: (el) => !el.disabled
174
+ });
175
+ this.selected = "";
176
+ }
177
+ get buttons() {
178
+ return this.defaultNodes.filter(
179
+ (node) => node instanceof LuzmoRadio
180
+ );
181
+ }
182
+ focus() {
183
+ this.rovingTabindexController.focus();
184
+ }
185
+ _setSelected(value) {
186
+ if (value === this.selected) {
187
+ return;
188
+ }
189
+ const oldValue = this.selected;
190
+ const radio = value ? this.querySelector(`luzmo-radio[value="${value}"]`) : void 0;
191
+ this.selected = radio ? value : "";
192
+ const applyDefault = this.dispatchEvent(
193
+ new Event("change", {
194
+ cancelable: true,
195
+ bubbles: true,
196
+ composed: true
197
+ })
198
+ );
199
+ if (!applyDefault) {
200
+ this.selected = oldValue;
201
+ return;
202
+ }
203
+ this.validateRadios();
204
+ }
205
+ willUpdate(changes) {
206
+ if (!this.hasUpdated) {
207
+ this.setAttribute("role", "radiogroup");
208
+ const checkedRadio = this.querySelector(
209
+ "luzmo-radio[checked]"
210
+ );
211
+ const checkedRadioValue = checkedRadio ? checkedRadio.value : "";
212
+ this.selected = checkedRadioValue || this.selected;
213
+ if (this.selected && this.selected !== checkedRadioValue) {
214
+ const selectedRadio = this.querySelector(
215
+ `luzmo-radio[value="${this.selected}"]`
216
+ );
217
+ if (selectedRadio) {
218
+ selectedRadio.checked = true;
219
+ }
220
+ }
221
+ this.shadowRoot.addEventListener("change", (event) => {
222
+ event.stopPropagation();
223
+ const target = event.target;
224
+ this._setSelected(target.value);
225
+ });
226
+ }
227
+ if (changes.has("selected")) {
228
+ this.validateRadios();
229
+ }
230
+ }
231
+ async validateRadios() {
232
+ let validSelection = false;
233
+ if (!this.hasUpdated) {
234
+ await this.updateComplete;
235
+ }
236
+ this.buttons.map((button) => {
237
+ button.checked = this.selected === button.value;
238
+ validSelection = validSelection || button.checked;
239
+ });
240
+ if (!validSelection) {
241
+ this.selected = "";
242
+ }
243
+ }
244
+ handleSlotchange() {
245
+ this.rovingTabindexController.clearElementCache();
246
+ }
247
+ }
248
+ __decorateClass([
249
+ decorators_js.property({ type: String })
250
+ ], LuzmoRadioGroup.prototype, "name");
251
+ __decorateClass([
252
+ decorators_js.queryAssignedNodes()
253
+ ], LuzmoRadioGroup.prototype, "defaultNodes");
254
+ __decorateClass([
255
+ decorators_js.property({ reflect: true })
256
+ ], LuzmoRadioGroup.prototype, "selected");
257
+ if (!customElements.get("luzmo-radio")) {
258
+ customElements.define("luzmo-radio", LuzmoRadio);
259
+ }
260
+ if (!customElements.get("luzmo-radio-group")) {
261
+ customElements.define("luzmo-radio-group", LuzmoRadioGroup);
262
+ }
263
+ exports.LuzmoRadio = LuzmoRadio;
264
+ exports.LuzmoRadioGroup = LuzmoRadioGroup;