@esri/calcite-components 5.1.0-next.8 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/{H6GZBNAP.js → 2I4IL7KB.js} +1 -1
  3. package/dist/cdn/{B6PZTEUN.js → 2P5ISR6V.js} +1 -1
  4. package/dist/cdn/2TVQXBLD.js +2 -0
  5. package/dist/cdn/2VKTPJWO.js +2 -0
  6. package/dist/cdn/3GDRQKT2.js +2 -0
  7. package/dist/cdn/{SZBL6UYR.js → 3HTVKOWE.js} +1 -1
  8. package/dist/cdn/{PUV74SQM.js → 3IM4BLOF.js} +1 -1
  9. package/dist/cdn/44WHX5D3.js +2 -0
  10. package/dist/cdn/{WVFJMOTI.js → 46F35NGY.js} +1 -1
  11. package/dist/cdn/4A2BNZJW.js +2 -0
  12. package/dist/cdn/{4C3MDIBF.js → 4ANP3V6G.js} +1 -1
  13. package/dist/cdn/4PUYRVNO.js +2 -0
  14. package/dist/cdn/{XIHNK7BL.js → 4RELRYKX.js} +1 -1
  15. package/dist/cdn/4V5C3DSP.js +2 -0
  16. package/dist/cdn/54WP47EN.js +2 -0
  17. package/dist/cdn/5C72Z4LQ.js +2 -0
  18. package/dist/cdn/{AQRFO7EB.js → 5OLLJHWT.js} +1 -1
  19. package/dist/cdn/5SDZUEAZ.js +2 -0
  20. package/dist/cdn/5ULM4EXU.js +2 -0
  21. package/dist/cdn/6U4CYHVA.js +2 -0
  22. package/dist/cdn/6UERLWMH.js +2 -0
  23. package/dist/cdn/{FP7RUVVK.js → 6XE2EP66.js} +1 -1
  24. package/dist/cdn/{X7WG3NQR.js → 6YLT6LZJ.js} +1 -1
  25. package/dist/cdn/6ZUCCZI3.js +2 -0
  26. package/dist/cdn/{7J54SLPG.js → 75ARST2G.js} +1 -1
  27. package/dist/cdn/{ZTRVZ3XB.js → 7A746NXL.js} +1 -1
  28. package/dist/cdn/7DBM34FB.js +2 -0
  29. package/dist/cdn/7FTYXBPX.js +2 -0
  30. package/dist/cdn/7OWLHFPX.js +2 -0
  31. package/dist/cdn/7XMGNOPQ.js +2 -0
  32. package/dist/cdn/A5L2Q32C.js +2 -0
  33. package/dist/cdn/ADH55C3C.js +2 -0
  34. package/dist/cdn/{MMKBWG37.js → ADH5D4IE.js} +1 -1
  35. package/dist/cdn/AFGFN5LE.js +2 -0
  36. package/dist/cdn/AKKQ5DPN.js +2 -0
  37. package/dist/cdn/{6UI3PKF5.js → AYFJCHPP.js} +1 -1
  38. package/dist/cdn/{YRXMN6UU.js → BL4CROY4.js} +1 -1
  39. package/dist/cdn/{LESJQSHY.js → BONCETQ5.js} +1 -1
  40. package/dist/cdn/BOZBB7XQ.js +2 -0
  41. package/dist/cdn/BPVUFU5U.js +4 -0
  42. package/dist/cdn/CY6G2WDI.js +2 -0
  43. package/dist/cdn/{ZNRHT3KC.js → CYVIISMJ.js} +1 -1
  44. package/dist/cdn/{UW5IDOUT.js → D44AQ74K.js} +1 -1
  45. package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
  46. package/dist/cdn/{7BCKEAN4.js → DJTEYVEK.js} +1 -1
  47. package/dist/cdn/DK56URUM.js +2 -0
  48. package/dist/cdn/DMMA5ZYG.js +2 -0
  49. package/dist/cdn/DYMICF33.js +2 -0
  50. package/dist/cdn/{6LSU4JVT.js → E2T2QERX.js} +1 -1
  51. package/dist/cdn/{LWQNBQLX.js → ECXU6B4A.js} +1 -1
  52. package/dist/cdn/EOJ2AVKD.js +2 -0
  53. package/dist/cdn/{H5CLLKA7.js → EPDTHVMK.js} +1 -1
  54. package/dist/cdn/EPNCB6OJ.js +2 -0
  55. package/dist/cdn/FFB3HCSC.js +2 -0
  56. package/dist/cdn/{Z5H3SBF4.js → FHGV3WTN.js} +1 -1
  57. package/dist/cdn/{QLMMEMXZ.js → GALIT4BA.js} +1 -1
  58. package/dist/cdn/{A5U47A46.js → GB2TPSAG.js} +1 -1
  59. package/dist/cdn/{EDTUYGTH.js → GCNYPWEC.js} +1 -1
  60. package/dist/cdn/GDZAGWDU.js +2 -0
  61. package/dist/cdn/{N6UQ2IN3.js → GEEPTD4A.js} +1 -1
  62. package/dist/cdn/{222PZZVE.js → GFEJFYRL.js} +1 -1
  63. package/dist/cdn/{VAIV6TN5.js → GI6UQRPO.js} +1 -1
  64. package/dist/cdn/GJL5RMPQ.js +2 -0
  65. package/dist/cdn/{CW3BSFXN.js → GT3BV452.js} +1 -1
  66. package/dist/cdn/GZHK6NCY.js +2 -0
  67. package/dist/cdn/HB4MH2EZ.js +2 -0
  68. package/dist/cdn/HRC6BJMW.js +2 -0
  69. package/dist/cdn/{OI5C3DZQ.js → I5D2AGK5.js} +1 -1
  70. package/dist/cdn/IEPYYQBO.js +2 -0
  71. package/dist/cdn/{SJMZTW3M.js → ISTQU57G.js} +1 -1
  72. package/dist/cdn/J3ELP2FF.js +2 -0
  73. package/dist/cdn/JITQNOBY.js +2 -0
  74. package/dist/cdn/JIWTOV7Q.js +2 -0
  75. package/dist/cdn/JRHGPYNH.js +2 -0
  76. package/dist/cdn/{XWSZOGW5.js → JWG2PPAV.js} +1 -1
  77. package/dist/cdn/{7PY56QMA.js → JZWVIZ2B.js} +1 -1
  78. package/dist/cdn/{O64Y2APR.js → K57DPE4N.js} +1 -1
  79. package/dist/cdn/{OHI6NELF.js → KEAGVFG4.js} +1 -1
  80. package/dist/cdn/KED2RZ42.js +2 -0
  81. package/dist/cdn/KEFKNHSD.js +2 -0
  82. package/dist/cdn/KLW37VF4.js +2 -0
  83. package/dist/cdn/{PWPVALIF.js → KSR5E33C.js} +1 -1
  84. package/dist/cdn/{LS6DCTIG.js → KTBER6SN.js} +1 -1
  85. package/dist/cdn/{BWVI7Y36.js → KTUCOBBY.js} +1 -1
  86. package/dist/cdn/{QZKM3D6F.js → KWFOKTKG.js} +1 -1
  87. package/dist/cdn/LBFLMGFV.js +2 -0
  88. package/dist/cdn/LHYTGIZG.js +2 -0
  89. package/dist/cdn/{M7DW3FTJ.js → LO5HOYI2.js} +1 -1
  90. package/dist/cdn/LOAHLN6N.js +2 -0
  91. package/dist/cdn/{YOWRCPCO.js → LUWJNSYS.js} +1 -1
  92. package/dist/cdn/MJPROSY6.js +2 -0
  93. package/dist/cdn/{2MVB66KM.js → NBXPROCG.js} +1 -1
  94. package/dist/cdn/NERFMP54.js +2 -0
  95. package/dist/cdn/{FHTREWRA.js → NKYEDCKH.js} +1 -1
  96. package/dist/cdn/NRALFORW.js +2 -0
  97. package/dist/cdn/{ITDGV5OO.js → NRY3KXPN.js} +1 -1
  98. package/dist/cdn/{VS2M3PA6.js → NRYIW7DB.js} +1 -1
  99. package/dist/cdn/NTYYNNBV.js +2 -0
  100. package/dist/cdn/NU23JDGC.js +2 -0
  101. package/dist/cdn/NZC2U4OU.js +2 -0
  102. package/dist/cdn/ODKPYY3R.js +2 -0
  103. package/dist/cdn/OQHB5W7D.js +2 -0
  104. package/dist/cdn/PQ5ASGHR.js +2 -0
  105. package/dist/cdn/PZVPEXW2.js +2 -0
  106. package/dist/cdn/QOPSMYNJ.js +2 -0
  107. package/dist/cdn/QP76SSEW.js +2 -0
  108. package/dist/cdn/{C6PZ6UXS.js → QSU37BPY.js} +1 -1
  109. package/dist/cdn/{EBTV6BQC.js → QYODZAGH.js} +1 -1
  110. package/dist/cdn/R2VQIQOY.js +2 -0
  111. package/dist/cdn/R3SNXCXR.js +2 -0
  112. package/dist/cdn/RJTQLFW2.js +2 -0
  113. package/dist/cdn/{ZWUAND2V.js → RRF6AKIF.js} +1 -1
  114. package/dist/cdn/RSCWCCYB.js +2 -0
  115. package/dist/cdn/{WGLBPXGA.js → RUVQ7O6L.js} +1 -1
  116. package/dist/cdn/RYLKDSFN.js +3 -0
  117. package/dist/cdn/STAAJHPM.js +2 -0
  118. package/dist/cdn/{TRQXVBXU.js → SUEXKJRG.js} +1 -1
  119. package/dist/cdn/TAZRZNVR.js +2 -0
  120. package/dist/cdn/{QO4WS7CE.js → TKHRV4GA.js} +1 -1
  121. package/dist/cdn/{N4R7WBTP.js → TSWJKW5G.js} +1 -1
  122. package/dist/cdn/UDRFE54L.js +2 -0
  123. package/dist/cdn/USZ4G42E.js +2 -0
  124. package/dist/cdn/{DY2ED436.js → UTEI7VLM.js} +1 -1
  125. package/dist/cdn/UWU3SSNM.js +2 -0
  126. package/dist/cdn/UY76KLJJ.js +2 -0
  127. package/dist/cdn/{T2ZN7HPU.js → V5LDBUD2.js} +1 -1
  128. package/dist/cdn/VAXAY3BK.js +2 -0
  129. package/dist/cdn/{DOWM2T5Z.js → VD7KVHE6.js} +1 -1
  130. package/dist/cdn/{7SJGHMRM.js → VYK6NRTI.js} +1 -1
  131. package/dist/cdn/W5TINV5N.js +2 -0
  132. package/dist/cdn/W753MF3U.js +2 -0
  133. package/dist/cdn/WC3SB5B7.js +2 -0
  134. package/dist/cdn/{RH6ZIP65.js → WGGFNK4Z.js} +1 -1
  135. package/dist/cdn/WTP5LKQS.js +2 -0
  136. package/dist/cdn/{NRP3ANIH.js → X3WAJ4V4.js} +1 -1
  137. package/dist/cdn/XMHBPNOP.js +2 -0
  138. package/dist/cdn/{FZIKVG4Q.js → XQXKNOUC.js} +1 -1
  139. package/dist/cdn/{R7ZYHFUG.js → XTKAAKGX.js} +1 -1
  140. package/dist/cdn/XVCPLNXU.js +2 -0
  141. package/dist/cdn/XZK4WGVJ.js +4 -0
  142. package/dist/cdn/{47YWJRMK.js → Y47FX6CN.js} +1 -1
  143. package/dist/cdn/{ITZTBZ6D.js → YFT7U3IW.js} +1 -1
  144. package/dist/cdn/{CZLSVHDA.js → YLZT3LR4.js} +1 -1
  145. package/dist/cdn/{VSGEBKJL.js → ZQ4VNHFE.js} +1 -1
  146. package/dist/cdn/ZSTOD4V7.js +2 -0
  147. package/dist/cdn/ZYQDIIRU.js +2 -0
  148. package/dist/cdn/assets/combobox/t9n/messages.ar.json +1 -1
  149. package/dist/cdn/assets/combobox/t9n/messages.bg.json +1 -1
  150. package/dist/cdn/assets/combobox/t9n/messages.bs.json +1 -1
  151. package/dist/cdn/assets/combobox/t9n/messages.ca.json +1 -1
  152. package/dist/cdn/assets/combobox/t9n/messages.cs.json +1 -1
  153. package/dist/cdn/assets/combobox/t9n/messages.da.json +1 -1
  154. package/dist/cdn/assets/combobox/t9n/messages.de.json +1 -1
  155. package/dist/cdn/assets/combobox/t9n/messages.el.json +1 -1
  156. package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
  157. package/dist/cdn/assets/combobox/t9n/messages.es.json +1 -1
  158. package/dist/cdn/assets/combobox/t9n/messages.et.json +1 -1
  159. package/dist/cdn/assets/combobox/t9n/messages.fi.json +1 -1
  160. package/dist/cdn/assets/combobox/t9n/messages.fr.json +1 -1
  161. package/dist/cdn/assets/combobox/t9n/messages.he.json +1 -1
  162. package/dist/cdn/assets/combobox/t9n/messages.hr.json +1 -1
  163. package/dist/cdn/assets/combobox/t9n/messages.hu.json +1 -1
  164. package/dist/cdn/assets/combobox/t9n/messages.id.json +1 -1
  165. package/dist/cdn/assets/combobox/t9n/messages.it.json +1 -1
  166. package/dist/cdn/assets/combobox/t9n/messages.ja.json +1 -1
  167. package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
  168. package/dist/cdn/assets/combobox/t9n/messages.ko.json +1 -1
  169. package/dist/cdn/assets/combobox/t9n/messages.lt.json +1 -1
  170. package/dist/cdn/assets/combobox/t9n/messages.lv.json +1 -1
  171. package/dist/cdn/assets/combobox/t9n/messages.nl.json +1 -1
  172. package/dist/cdn/assets/combobox/t9n/messages.no.json +1 -1
  173. package/dist/cdn/assets/combobox/t9n/messages.pl.json +1 -1
  174. package/dist/cdn/assets/combobox/t9n/messages.pt-BR.json +1 -1
  175. package/dist/cdn/assets/combobox/t9n/messages.pt-PT.json +1 -1
  176. package/dist/cdn/assets/combobox/t9n/messages.ro.json +1 -1
  177. package/dist/cdn/assets/combobox/t9n/messages.ru.json +1 -1
  178. package/dist/cdn/assets/combobox/t9n/messages.sk.json +1 -1
  179. package/dist/cdn/assets/combobox/t9n/messages.sl.json +1 -1
  180. package/dist/cdn/assets/combobox/t9n/messages.sr.json +1 -1
  181. package/dist/cdn/assets/combobox/t9n/messages.sv.json +1 -1
  182. package/dist/cdn/assets/combobox/t9n/messages.th.json +1 -1
  183. package/dist/cdn/assets/combobox/t9n/messages.tr.json +1 -1
  184. package/dist/cdn/assets/combobox/t9n/messages.uk.json +1 -1
  185. package/dist/cdn/assets/combobox/t9n/messages.vi.json +1 -1
  186. package/dist/cdn/assets/combobox/t9n/messages.zh-CN.json +1 -1
  187. package/dist/cdn/assets/combobox/t9n/messages.zh-HK.json +1 -1
  188. package/dist/cdn/assets/combobox/t9n/messages.zh-TW.json +1 -1
  189. package/dist/cdn/assets/icon/arcgisQuickcapture16.json +1 -0
  190. package/dist/cdn/assets/icon/arcgisQuickcapture24.json +1 -0
  191. package/dist/cdn/assets/icon/arcgisQuickcapture32.json +1 -0
  192. package/dist/cdn/assets/icon/arcgisSurvey12316.json +1 -0
  193. package/dist/cdn/assets/icon/arcgisSurvey12324.json +1 -0
  194. package/dist/cdn/assets/icon/arcgisSurvey12332.json +1 -0
  195. package/dist/cdn/assets/icon/buttons16.json +1 -0
  196. package/dist/cdn/assets/icon/buttons24.json +1 -0
  197. package/dist/cdn/assets/icon/buttons32.json +1 -0
  198. package/dist/cdn/assets/icon/entityTypes16.json +1 -0
  199. package/dist/cdn/assets/icon/entityTypes24.json +1 -0
  200. package/dist/cdn/assets/icon/entityTypes32.json +1 -0
  201. package/dist/cdn/assets/icon/gpsReceiver16.json +1 -0
  202. package/dist/cdn/assets/icon/gpsReceiver24.json +1 -0
  203. package/dist/cdn/assets/icon/gpsReceiver32.json +1 -0
  204. package/dist/cdn/assets/icon/layerStreamSetting16.json +1 -0
  205. package/dist/cdn/assets/icon/layerStreamSetting24.json +1 -0
  206. package/dist/cdn/assets/icon/layerStreamSetting32.json +1 -0
  207. package/dist/cdn/assets/icon/returnToDefault16.json +1 -0
  208. package/dist/cdn/assets/icon/returnToDefault24.json +1 -0
  209. package/dist/cdn/assets/icon/returnToDefault32.json +1 -0
  210. package/dist/cdn/assets/icon/reviewMap16.json +1 -0
  211. package/dist/cdn/assets/icon/reviewMap24.json +1 -0
  212. package/dist/cdn/assets/icon/reviewMap32.json +1 -0
  213. package/dist/cdn/assets/icon/totalStation16.json +1 -0
  214. package/dist/cdn/assets/icon/totalStation24.json +1 -0
  215. package/dist/cdn/assets/icon/totalStation32.json +1 -0
  216. package/dist/cdn/assets/icon/velocityServer16.json +1 -0
  217. package/dist/cdn/assets/icon/velocityServer24.json +1 -0
  218. package/dist/cdn/assets/icon/velocityServer32.json +1 -0
  219. package/dist/cdn/index.js +2 -2
  220. package/dist/cdn/main.css +2 -2
  221. package/dist/chunks/ClearButton.js +16 -0
  222. package/dist/chunks/ExpandToggle.js +2 -2
  223. package/dist/chunks/Heading.js +3 -3
  224. package/dist/chunks/component.js +1 -1
  225. package/dist/chunks/dom.js +49 -28
  226. package/dist/chunks/floating-ui.js +2 -5
  227. package/dist/chunks/locale.js +29 -12
  228. package/dist/chunks/manager.js +505 -0
  229. package/dist/chunks/resources6.js +2 -0
  230. package/dist/chunks/runtime.js +4 -4
  231. package/dist/chunks/useFocusTrap.js +70 -28
  232. package/dist/chunks/useForm.js +225 -44
  233. package/dist/chunks/useFormTrigger.js +25 -0
  234. package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
  235. package/dist/chunks/utils.js +6 -6
  236. package/dist/chunks/utils3.js +18 -3
  237. package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
  238. package/dist/components/calcite-action/customElement.d.ts +20 -12
  239. package/dist/components/calcite-action/customElement.js +10 -15
  240. package/dist/components/calcite-action-bar/customElement.d.ts +4 -4
  241. package/dist/components/calcite-action-bar/customElement.js +12 -6
  242. package/dist/components/calcite-action-group/customElement.d.ts +12 -6
  243. package/dist/components/calcite-action-group/customElement.js +2 -1
  244. package/dist/components/calcite-action-menu/customElement.d.ts +2 -2
  245. package/dist/components/calcite-action-pad/customElement.d.ts +3 -3
  246. package/dist/components/calcite-action-pad/customElement.js +12 -7
  247. package/dist/components/calcite-alert/customElement.d.ts +2 -2
  248. package/dist/components/calcite-alert/customElement.js +1 -1
  249. package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
  250. package/dist/components/calcite-autocomplete/customElement.js +21 -32
  251. package/dist/components/calcite-autocomplete-item/customElement.d.ts +6 -0
  252. package/dist/components/calcite-autocomplete-item/customElement.js +9 -4
  253. package/dist/components/calcite-block/customElement.d.ts +11 -7
  254. package/dist/components/calcite-block/customElement.js +1 -1
  255. package/dist/components/calcite-block-group/customElement.d.ts +1 -1
  256. package/dist/components/calcite-block-group/customElement.js +4 -11
  257. package/dist/components/calcite-block-group/interfaces.d.ts +2 -6
  258. package/dist/components/calcite-block-section/customElement.d.ts +1 -1
  259. package/dist/components/calcite-button/customElement.d.ts +6 -6
  260. package/dist/components/calcite-button/customElement.js +10 -22
  261. package/dist/components/calcite-card/customElement.d.ts +11 -5
  262. package/dist/components/calcite-card/customElement.js +5 -3
  263. package/dist/components/calcite-card-group/customElement.d.ts +9 -3
  264. package/dist/components/calcite-card-group/customElement.js +11 -1
  265. package/dist/components/calcite-carousel/customElement.d.ts +8 -2
  266. package/dist/components/calcite-carousel/customElement.js +11 -8
  267. package/dist/components/calcite-carousel/interfaces.d.ts +3 -1
  268. package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
  269. package/dist/components/calcite-checkbox/customElement.js +2 -15
  270. package/dist/components/calcite-chip/customElement.d.ts +2 -2
  271. package/dist/components/calcite-chip/customElement.js +1 -1
  272. package/dist/components/calcite-chip-group/customElement.d.ts +1 -1
  273. package/dist/components/calcite-color-picker/customElement.d.ts +2 -2
  274. package/dist/components/calcite-color-picker/customElement.js +2 -2
  275. package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
  276. package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
  277. package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
  278. package/dist/components/calcite-combobox/customElement.d.ts +5 -5
  279. package/dist/components/calcite-combobox/customElement.js +57 -69
  280. package/dist/components/calcite-combobox/index.js +2 -1
  281. package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
  282. package/dist/components/calcite-combobox-item/customElement.js +1 -1
  283. package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
  284. package/dist/components/calcite-date-picker/customElement.js +4 -14
  285. package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
  286. package/dist/components/calcite-date-picker-day/customElement.js +1 -1
  287. package/dist/components/calcite-date-picker-month/customElement.js +2 -2
  288. package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
  289. package/dist/components/calcite-dialog/customElement.d.ts +7 -5
  290. package/dist/components/calcite-dialog/customElement.js +4 -2
  291. package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
  292. package/dist/components/calcite-dropdown/customElement.js +166 -91
  293. package/dist/components/calcite-dropdown-item/customElement.d.ts +2 -2
  294. package/dist/components/calcite-dropdown-item/customElement.js +14 -32
  295. package/dist/components/calcite-fab/customElement.d.ts +1 -1
  296. package/dist/components/calcite-fab/customElement.js +2 -2
  297. package/dist/components/calcite-filter/customElement.d.ts +1 -1
  298. package/dist/components/calcite-flow/customElement.d.ts +1 -1
  299. package/dist/components/calcite-flow-item/customElement.d.ts +8 -5
  300. package/dist/components/calcite-flow-item/customElement.js +4 -2
  301. package/dist/components/calcite-focus-trap/customElement.d.ts +46 -0
  302. package/dist/components/calcite-focus-trap/customElement.js +56 -0
  303. package/dist/components/calcite-focus-trap/index.d.ts +1 -0
  304. package/dist/components/calcite-focus-trap/index.js +1 -0
  305. package/dist/components/calcite-graph/customElement.js +1 -1
  306. package/dist/components/calcite-handle/customElement.d.ts +1 -1
  307. package/dist/components/calcite-icon/customElement.d.ts +1 -1
  308. package/dist/components/calcite-inline-editable/customElement.d.ts +2 -2
  309. package/dist/components/calcite-inline-editable/customElement.js +1 -1
  310. package/dist/components/calcite-input/customElement.d.ts +17 -18
  311. package/dist/components/calcite-input/customElement.js +26 -49
  312. package/dist/components/calcite-input/index.js +1 -0
  313. package/dist/components/calcite-input-date-picker/customElement.d.ts +6 -7
  314. package/dist/components/calcite-input-date-picker/customElement.js +67 -76
  315. package/dist/components/calcite-input-message/customElement.d.ts +1 -1
  316. package/dist/components/calcite-input-number/customElement.d.ts +13 -14
  317. package/dist/components/calcite-input-number/customElement.js +22 -48
  318. package/dist/components/calcite-input-number/index.js +1 -0
  319. package/dist/components/calcite-input-text/customElement.d.ts +11 -12
  320. package/dist/components/calcite-input-text/customElement.js +6 -18
  321. package/dist/components/calcite-input-text/index.js +1 -0
  322. package/dist/components/calcite-input-time-picker/customElement.d.ts +6 -7
  323. package/dist/components/calcite-input-time-picker/customElement.js +11 -23
  324. package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -6
  325. package/dist/components/calcite-input-time-zone/customElement.js +21 -19
  326. package/dist/components/calcite-label/customElement.js +1 -1
  327. package/dist/components/calcite-link/customElement.d.ts +9 -9
  328. package/dist/components/calcite-link/customElement.js +28 -23
  329. package/dist/components/calcite-list/customElement.d.ts +1 -1
  330. package/dist/components/calcite-list/customElement.js +18 -15
  331. package/dist/components/calcite-list/interfaces.d.ts +2 -6
  332. package/dist/components/calcite-list-item/customElement.d.ts +2 -2
  333. package/dist/components/calcite-list-item/customElement.js +7 -4
  334. package/dist/components/calcite-list-item-group/customElement.js +6 -0
  335. package/dist/components/calcite-loader/customElement.d.ts +1 -1
  336. package/dist/components/calcite-menu/customElement.d.ts +1 -1
  337. package/dist/components/calcite-menu/customElement.js +1 -1
  338. package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
  339. package/dist/components/calcite-menu-item/customElement.js +1 -1
  340. package/dist/components/calcite-meter/customElement.js +4 -4
  341. package/dist/components/calcite-navigation/customElement.d.ts +9 -2
  342. package/dist/components/calcite-navigation/customElement.js +56 -3
  343. package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
  344. package/dist/components/calcite-navigation-logo/customElement.js +4 -3
  345. package/dist/components/calcite-navigation-user/customElement.d.ts +2 -2
  346. package/dist/components/calcite-navigation-user/customElement.js +11 -6
  347. package/dist/components/calcite-notice/customElement.d.ts +3 -3
  348. package/dist/components/calcite-notice/customElement.js +1 -1
  349. package/dist/components/calcite-pagination/customElement.d.ts +1 -1
  350. package/dist/components/calcite-pagination/customElement.js +1 -1
  351. package/dist/components/calcite-panel/customElement.d.ts +7 -5
  352. package/dist/components/calcite-panel/customElement.js +20 -8
  353. package/dist/components/calcite-popover/customElement.d.ts +2 -2
  354. package/dist/components/calcite-popover/customElement.js +12 -176
  355. package/dist/components/calcite-radio-button/customElement.d.ts +30 -2
  356. package/dist/components/calcite-radio-button/customElement.js +12 -19
  357. package/dist/components/calcite-radio-button-group/customElement.d.ts +1 -1
  358. package/dist/components/calcite-radio-button-group/customElement.js +20 -1
  359. package/dist/components/calcite-rating/customElement.d.ts +3 -4
  360. package/dist/components/calcite-rating/customElement.js +12 -18
  361. package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
  362. package/dist/components/calcite-segmented-control/customElement.js +8 -19
  363. package/dist/components/calcite-segmented-control-item/customElement.d.ts +0 -1
  364. package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
  365. package/dist/components/calcite-select/customElement.d.ts +3 -4
  366. package/dist/components/calcite-select/customElement.js +9 -20
  367. package/dist/components/calcite-sheet/customElement.d.ts +3 -3
  368. package/dist/components/calcite-sheet/customElement.js +3 -7
  369. package/dist/components/calcite-shell-panel/customElement.d.ts +4 -4
  370. package/dist/components/calcite-shell-panel/customElement.js +59 -30
  371. package/dist/components/calcite-slider/customElement.d.ts +3 -4
  372. package/dist/components/calcite-slider/customElement.js +12 -22
  373. package/dist/components/calcite-sort-handle/customElement.d.ts +4 -4
  374. package/dist/components/calcite-sort-handle/customElement.js +44 -17
  375. package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
  376. package/dist/components/calcite-sortable-list/customElement.js +3 -3
  377. package/dist/components/calcite-split-button/customElement.d.ts +8 -8
  378. package/dist/components/calcite-stepper/customElement.d.ts +2 -2
  379. package/dist/components/calcite-stepper/customElement.js +29 -42
  380. package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
  381. package/dist/components/calcite-stepper-item/customElement.js +2 -8
  382. package/dist/components/calcite-swatch/customElement.d.ts +1 -1
  383. package/dist/components/calcite-switch/customElement.d.ts +4 -4
  384. package/dist/components/calcite-switch/customElement.js +9 -8
  385. package/dist/components/calcite-tab/customElement.d.ts +1 -1
  386. package/dist/components/calcite-tab/customElement.js +1 -1
  387. package/dist/components/calcite-tab-nav/customElement.js +1 -1
  388. package/dist/components/calcite-tab-title/customElement.js +1 -1
  389. package/dist/components/calcite-table/customElement.js +1 -1
  390. package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
  391. package/dist/components/calcite-table-header/customElement.d.ts +2 -2
  392. package/dist/components/calcite-table-row/customElement.d.ts +1 -1
  393. package/dist/components/calcite-tabs/customElement.js +2 -1
  394. package/dist/components/calcite-text-area/customElement.d.ts +13 -14
  395. package/dist/components/calcite-text-area/customElement.js +32 -37
  396. package/dist/components/calcite-tile/customElement.d.ts +1 -1
  397. package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
  398. package/dist/components/calcite-time-picker/customElement.js +2 -2
  399. package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
  400. package/dist/components/calcite-tooltip/customElement.js +24 -315
  401. package/dist/components/calcite-tree/customElement.js +1 -1
  402. package/dist/components/calcite-tree-item/customElement.js +2 -3
  403. package/dist/controllers/useSortable.d.ts +7 -0
  404. package/dist/docs/api.json +1 -1
  405. package/dist/docs/docs.json +1 -1
  406. package/dist/docs/supported-browsers.json +1 -1
  407. package/dist/docs/translations.json +1 -1
  408. package/dist/docs/vscode.css-custom-data.json +1 -1
  409. package/dist/docs/vscode.html-custom-data.json +1 -1
  410. package/dist/docs/web-types.json +1 -1
  411. package/dist/index.d.ts +10 -0
  412. package/dist/loader.js +27 -26
  413. package/dist/types/lumina.d.ts +16 -10
  414. package/dist/types/preact.d.ts +17 -10
  415. package/dist/types/react.d.ts +18 -10
  416. package/dist/types/stencil.d.ts +16 -10
  417. package/package.json +22 -23
  418. package/dist/cdn/23OTAQAT.js +0 -3
  419. package/dist/cdn/24AJZ7NF.js +0 -2
  420. package/dist/cdn/2G4JQYU3.js +0 -2
  421. package/dist/cdn/2HAZSBOB.js +0 -2
  422. package/dist/cdn/2IVE7ZEH.js +0 -2
  423. package/dist/cdn/2KWDJDMW.js +0 -2
  424. package/dist/cdn/2MN63CPE.js +0 -2
  425. package/dist/cdn/3KC2E42Z.js +0 -2
  426. package/dist/cdn/3KDUSL55.js +0 -2
  427. package/dist/cdn/4KMSHV4T.js +0 -2
  428. package/dist/cdn/4OYHP3ZM.js +0 -2
  429. package/dist/cdn/5XX7HCEA.js +0 -2
  430. package/dist/cdn/6LVCAJSU.js +0 -2
  431. package/dist/cdn/6UFBJC4N.js +0 -2
  432. package/dist/cdn/6WOFQ5YL.js +0 -2
  433. package/dist/cdn/7JKP2OCF.js +0 -2
  434. package/dist/cdn/7MOAOZLZ.js +0 -2
  435. package/dist/cdn/7Q6OKLFD.js +0 -2
  436. package/dist/cdn/7UOYXJ3K.js +0 -2
  437. package/dist/cdn/AKHHJLNI.js +0 -2
  438. package/dist/cdn/BH25NEU3.js +0 -2
  439. package/dist/cdn/BLZ5Z3L3.js +0 -2
  440. package/dist/cdn/BYFOQ5L7.js +0 -2
  441. package/dist/cdn/CFOEAERZ.js +0 -2
  442. package/dist/cdn/CMJEMF3I.js +0 -2
  443. package/dist/cdn/DML4UYSR.js +0 -2
  444. package/dist/cdn/EXQURJYX.js +0 -2
  445. package/dist/cdn/FA4JJMDD.js +0 -2
  446. package/dist/cdn/FE36XWQT.js +0 -2
  447. package/dist/cdn/FEK3PIOE.js +0 -2
  448. package/dist/cdn/G3LIWIPW.js +0 -2
  449. package/dist/cdn/G5PEBD22.js +0 -2
  450. package/dist/cdn/GBD3L2UH.js +0 -2
  451. package/dist/cdn/GOV5YXBE.js +0 -2
  452. package/dist/cdn/H764MK3H.js +0 -2
  453. package/dist/cdn/HFAM5MEC.js +0 -2
  454. package/dist/cdn/I3AH3MF6.js +0 -2
  455. package/dist/cdn/I7TFCBQO.js +0 -2
  456. package/dist/cdn/IMFR5NEO.js +0 -3
  457. package/dist/cdn/ISXEEXKP.js +0 -2
  458. package/dist/cdn/KB33IA7A.js +0 -2
  459. package/dist/cdn/KONOZFYK.js +0 -2
  460. package/dist/cdn/L36EVTCL.js +0 -2
  461. package/dist/cdn/M5HMGRI3.js +0 -2
  462. package/dist/cdn/MIZ37SIW.js +0 -2
  463. package/dist/cdn/NKB7CA3Y.js +0 -2
  464. package/dist/cdn/OGR5ARIW.js +0 -2
  465. package/dist/cdn/OI35UHBC.js +0 -2
  466. package/dist/cdn/OLJ3NCJ2.js +0 -2
  467. package/dist/cdn/OOITRFLJ.js +0 -2
  468. package/dist/cdn/OXIEI7FU.js +0 -2
  469. package/dist/cdn/OZVZ5LCR.js +0 -2
  470. package/dist/cdn/P76VFMZV.js +0 -2
  471. package/dist/cdn/PXNLTA7Q.js +0 -2
  472. package/dist/cdn/QHJ5GHM6.js +0 -2
  473. package/dist/cdn/QKC2XFP5.js +0 -2
  474. package/dist/cdn/RLE4LAGP.js +0 -2
  475. package/dist/cdn/SDD3P4XX.js +0 -2
  476. package/dist/cdn/T72X6C55.js +0 -2
  477. package/dist/cdn/TWMPNHXY.js +0 -2
  478. package/dist/cdn/UPCUFECO.js +0 -2
  479. package/dist/cdn/UW2OIFN6.js +0 -2
  480. package/dist/cdn/UWFSTP6H.js +0 -2
  481. package/dist/cdn/V6KMTSY3.js +0 -2
  482. package/dist/cdn/V6PUXCHJ.js +0 -2
  483. package/dist/cdn/VZBGQAPM.js +0 -2
  484. package/dist/cdn/W26FRFX7.js +0 -2
  485. package/dist/cdn/WDKSZZPO.js +0 -2
  486. package/dist/cdn/WJXZ7BPV.js +0 -2
  487. package/dist/cdn/XHL646A2.js +0 -2
  488. package/dist/cdn/XMUU3UTU.js +0 -2
  489. package/dist/cdn/YCAYW3ES.js +0 -2
  490. package/dist/cdn/YCIXRDI4.js +0 -4
  491. package/dist/cdn/YCTMZBN3.js +0 -2
  492. package/dist/cdn/YDUAJXOW.js +0 -2
  493. package/dist/cdn/YJRANKFJ.js +0 -2
  494. package/dist/cdn/YWGODKAA.js +0 -2
  495. package/dist/cdn/ZQLGBHLZ.js +0 -2
  496. package/dist/cdn/ZQO6FYUW.js +0 -2
  497. package/dist/chunks/form.js +0 -268
  498. package/dist/chunks/input.js +0 -40
  499. package/dist/controllers/useForm.d.ts +0 -3
  500. package/dist/utils/form.d.ts +0 -3
  501. package/dist/utils/sortableComponent.d.ts +0 -7
@@ -5,21 +5,22 @@ import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { useDirection } from "@arcgis/lumina/controllers";
7
7
  import { g as getRoundRobinIndex } from "../../chunks/array.js";
8
- import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
9
8
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
10
9
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
11
10
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
12
11
  import { u as useInteractive } from "../../chunks/useInteractive.js";
12
+ import { u as useForm } from "../../chunks/useForm.js";
13
13
  const CSS = {
14
14
  container: "container",
15
15
  radio: "radio"
16
16
  };
17
- const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md))}:host([scale=m]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md-plus))}:host([scale=l]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-lg))}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;
17
+ const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md))}:host([scale=m]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-md-plus))}:host([scale=l]){--calcite-internal-radio-size: var(--calcite-radio-button-size, var(--calcite-size-fixed-lg))}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([status=invalid]:not([checked])){--calcite-radio-button-border-color: var(--calcite-color-status-danger)}:host([status=invalid]:not([checked]):focus) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;
18
18
  class RadioButton extends LitElement {
19
19
  constructor() {
20
20
  super();
21
21
  this.containerRef = createRef();
22
22
  this.direction = useDirection();
23
+ this.formSupport = useForm({ inputType: "radio" })(this);
23
24
  this.focusSetter = useSetFocus()(this);
24
25
  this.interactiveContainer = useInteractive(this);
25
26
  this.checked = false;
@@ -28,6 +29,7 @@ class RadioButton extends LitElement {
28
29
  this.hovered = false;
29
30
  this.required = false;
30
31
  this.scale = "m";
32
+ this.status = "idle";
31
33
  this.calciteInternalRadioButtonBlur = createEvent({ cancelable: false });
32
34
  this.calciteInternalRadioButtonCheckedChange = createEvent({ cancelable: false });
33
35
  this.calciteInternalRadioButtonFocus = createEvent({ cancelable: false });
@@ -38,7 +40,10 @@ class RadioButton extends LitElement {
38
40
  this.listen("keydown", this.handleKeyDown);
39
41
  }
40
42
  static {
41
- this.properties = { checked: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], focused: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], hovered: [7, {}, { reflect: true, type: Boolean }], label: 1, labelText: 1, name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], value: 1 };
43
+ this.properties = { checked: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], focused: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], hovered: [7, {}, { reflect: true, type: Boolean }], label: 1, labelText: 1, name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1 };
44
+ }
45
+ static {
46
+ this.formAssociated = true;
42
47
  }
43
48
  static {
44
49
  this.styles = styles;
@@ -49,13 +54,15 @@ class RadioButton extends LitElement {
49
54
  async setFocus(options) {
50
55
  return this.focusSetter(() => this.containerRef.value, options);
51
56
  }
57
+ async setValidity(validity, validationMessage = this.validationMessage) {
58
+ this.elementInternals.setValidity(validity, validationMessage);
59
+ }
52
60
  connectedCallback() {
53
61
  this.rootNode = this.el.getRootNode();
54
62
  if (this.name) {
55
63
  this.checkLastRadioButton();
56
64
  }
57
65
  connectLabel(this);
58
- connectForm(this);
59
66
  this.updateTabIndexOfOtherRadioButtonsInGroup();
60
67
  super.connectedCallback();
61
68
  }
@@ -78,7 +85,6 @@ class RadioButton extends LitElement {
78
85
  disconnectedCallback() {
79
86
  super.disconnectedCallback();
80
87
  disconnectLabel(this);
81
- disconnectForm(this);
82
88
  this.updateTabIndexOfOtherRadioButtonsInGroup();
83
89
  }
84
90
  checkedChanged(newChecked) {
@@ -87,9 +93,6 @@ class RadioButton extends LitElement {
87
93
  }
88
94
  this.calciteInternalRadioButtonCheckedChange.emit();
89
95
  }
90
- syncHiddenFormInput(input) {
91
- input.type = "radio";
92
- }
93
96
  selectItem(items, selectedIndex) {
94
97
  items[selectedIndex].click();
95
98
  }
@@ -111,7 +114,6 @@ class RadioButton extends LitElement {
111
114
  if (this.checked) {
112
115
  return;
113
116
  }
114
- this.uncheckAllRadioButtonsInGroup();
115
117
  this.checked = true;
116
118
  this.calciteRadioButtonChange.emit();
117
119
  }
@@ -150,15 +152,6 @@ class RadioButton extends LitElement {
150
152
  });
151
153
  }
152
154
  }
153
- uncheckAllRadioButtonsInGroup() {
154
- const radioButtons = this.queryButtons();
155
- radioButtons.forEach((radioButton) => {
156
- if (radioButton.checked) {
157
- radioButton.checked = false;
158
- radioButton.focused = false;
159
- }
160
- });
161
- }
162
155
  uncheckOtherRadioButtonsInGroup() {
163
156
  const radioButtons = this.queryButtons();
164
157
  const otherRadioButtons = radioButtons.filter((radioButton) => radioButton !== this.el);
@@ -258,7 +251,7 @@ class RadioButton extends LitElement {
258
251
  }
259
252
  render() {
260
253
  const tabIndex = this.getTabIndex();
261
- return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaChecked=${this.checked} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${tabIndex ?? nothing} ${ref(this.containerRef)}><div class=${safeClassMap(CSS.radio)}></div>${this.labelText && InternalLabel({ labelText: this.labelText, spacingInlineStart: true }) || ""}</div>${HiddenFormInputSlot({ component: this })}` });
254
+ return this.interactiveContainer({ disabled: this.disabled, children: html`<div .ariaChecked=${this.checked} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${tabIndex ?? nothing} ${ref(this.containerRef)}><div class=${safeClassMap(CSS.radio)}></div>${this.labelText && InternalLabel({ labelText: this.labelText, spacingInlineStart: true }) || ""}</div>` });
262
255
  }
263
256
  }
264
257
  customElement("calcite-radio-button", RadioButton);
@@ -62,7 +62,7 @@ export abstract class RadioButtonGroup extends LitElement {
62
62
  * Sets focus on the fist focusable `calcite-radio-button` element in the component.
63
63
  *
64
64
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
65
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
65
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
66
66
  */
67
67
  setFocus(options?: FocusOptions): Promise<void>;
68
68
  /** Fires when the component has changed. */
@@ -7,6 +7,7 @@ import { I as InternalLabel } from "../../chunks/InternalLabel.js";
7
7
  import { V as Validation } from "../../chunks/Validation.js";
8
8
  import { u as useT9n } from "../../chunks/useT9n.js";
9
9
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
10
+ import { c as clearValidationMessage, d as displayValidationMessage } from "../../chunks/useForm.js";
10
11
  const CSS = {
11
12
  itemWrapper: "item-wrapper"
12
13
  };
@@ -29,6 +30,12 @@ class RadioButtonGroup extends LitElement {
29
30
  this.status = "idle";
30
31
  this.calciteRadioButtonGroupChange = createEvent({ cancelable: false });
31
32
  this.listen("calciteRadioButtonChange", this.radioButtonChangeHandler);
33
+ this.listen("calciteInvalid", this.handleInvalidFormEvent);
34
+ this.listen("luminaFormResetCallback", () => {
35
+ if (this.status === "invalid") {
36
+ clearValidationMessage(this);
37
+ }
38
+ });
32
39
  }
33
40
  static {
34
41
  this.properties = { radioButtons: [16, {}, { state: true }], disabled: [7, {}, { reflect: true, type: Boolean }], labelText: 1, layout: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedItem: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1 };
@@ -45,7 +52,7 @@ class RadioButtonGroup extends LitElement {
45
52
  this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
46
53
  }
47
54
  willUpdate(changes) {
48
- if (changes.has("disabled") && (this.hasUpdated || this.disabled !== false) || changes.has("layout") && (this.hasUpdated || this.layout !== "horizontal") || changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
55
+ if (changes.has("disabled") && (this.hasUpdated || this.disabled !== false) || changes.has("layout") && (this.hasUpdated || this.layout !== "horizontal") || changes.has("scale") && (this.hasUpdated || this.scale !== "m") || changes.has("status") && this.hasUpdated) {
49
56
  this.passPropsToRadioButtons();
50
57
  }
51
58
  }
@@ -56,6 +63,14 @@ class RadioButtonGroup extends LitElement {
56
63
  super.disconnectedCallback();
57
64
  this.mutationObserver?.disconnect();
58
65
  }
66
+ handleInvalidFormEvent(event) {
67
+ const message = this.validationMessage || event.target.validationMessage;
68
+ displayValidationMessage(this, {
69
+ message,
70
+ icon: true,
71
+ status: "invalid"
72
+ });
73
+ }
59
74
  passPropsToRadioButtons() {
60
75
  this.radioButtons = Array.from(this.el.querySelectorAll("calcite-radio-button"));
61
76
  this.selectedItem = Array.from(this.radioButtons).reverse().find((radioButton) => radioButton.checked) || null;
@@ -67,6 +82,7 @@ class RadioButtonGroup extends LitElement {
67
82
  radioButton.name = this.name;
68
83
  radioButton.required = this.required;
69
84
  radioButton.scale = this.scale;
85
+ radioButton.status = this.status;
70
86
  });
71
87
  }
72
88
  }
@@ -75,6 +91,9 @@ class RadioButtonGroup extends LitElement {
75
91
  }
76
92
  radioButtonChangeHandler(event) {
77
93
  this.selectedItem = event.target;
94
+ if (this.required && this.selectedItem && this.status === "invalid") {
95
+ clearValidationMessage(this);
96
+ }
78
97
  this.calciteRadioButtonGroupChange.emit();
79
98
  }
80
99
  render() {
@@ -1,6 +1,5 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
- import type { MutableValidityState } from "../../utils/form.js";
4
3
  import type { Scale, Status } from "../interfaces.js";
5
4
  import type { IconName } from "../calcite-icon/interfaces.js";
6
5
 
@@ -72,16 +71,16 @@ export abstract class Rating extends LitElement {
72
71
  /**
73
72
  * The component's current validation state.
74
73
  *
75
- * @mdn [ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
74
+ * @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
76
75
  */
77
- get validity(): MutableValidityState;
76
+ get validity(): ValidityState;
78
77
  /** The component's value. */
79
78
  accessor value: number;
80
79
  /**
81
80
  * Sets focus on the component.
82
81
  *
83
82
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
84
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
83
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
85
84
  */
86
85
  setFocus(options?: FocusOptions): Promise<void>;
87
86
  /** Fires when the component's value changes. */
@@ -3,7 +3,6 @@ import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { live } from "lit/directives/live.js";
4
4
  import { html, css } from "lit";
5
5
  import { safeClassMap, LitElement, createEvent, stringOrBoolean, nothing, safeStyleMap } from "@arcgis/lumina";
6
- import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
7
6
  import { g as guid } from "../../chunks/guid.js";
8
7
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
9
8
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
@@ -11,6 +10,7 @@ import { V as Validation } from "../../chunks/Validation.js";
11
10
  import { u as useT9n } from "../../chunks/useT9n.js";
12
11
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
13
12
  import { u as useInteractive } from "../../chunks/useInteractive.js";
13
+ import { u as useForm } from "../../chunks/useForm.js";
14
14
  const StarIcon = ({ full, scale, partial }) => html`<calcite-icon class=${safeClassMap(partial ? void 0 : "icon")} .icon=${full ? "star-f" : "star"} .scale=${scale}></calcite-icon>`;
15
15
  const CSS = {
16
16
  fieldSet: "fieldset",
@@ -31,6 +31,12 @@ class Rating extends LitElement {
31
31
  constructor() {
32
32
  super();
33
33
  this.emit = false;
34
+ this.formSupport = useForm({
35
+ inputType: "number",
36
+ getValue: () => {
37
+ return this.value === 0 ? "" : this.value;
38
+ }
39
+ })(this);
34
40
  this.guid = IDS.host(guid());
35
41
  this.isKeyboardInteraction = true;
36
42
  this.labelElements = [];
@@ -45,26 +51,16 @@ class Rating extends LitElement {
45
51
  this.scale = "m";
46
52
  this.showChip = false;
47
53
  this.status = "idle";
48
- this.validity = {
49
- valid: false,
50
- badInput: false,
51
- customError: false,
52
- patternMismatch: false,
53
- rangeOverflow: false,
54
- rangeUnderflow: false,
55
- stepMismatch: false,
56
- tooLong: false,
57
- tooShort: false,
58
- typeMismatch: false,
59
- valueMissing: false
60
- };
61
54
  this.calciteRatingChange = createEvent({ cancelable: false });
62
55
  this.listen("keydown", this.handleHostKeyDown);
63
56
  this.listen("pointerout", this.handleRatingPointerOut);
64
57
  this.listen("pointerover", this.handleRatingPointerOver);
65
58
  }
66
59
  static {
67
- this.properties = { hoverValue: [16, {}, { state: true }], average: [11, {}, { reflect: true, type: Number }], count: [11, {}, { reflect: true, type: Number }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], labelText: 1, messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], showChip: [7, {}, { reflect: true, type: Boolean }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [0, {}, { attribute: false }], value: [11, {}, { reflect: true, type: Number }] };
60
+ this.properties = { hoverValue: [16, {}, { state: true }], average: [11, {}, { reflect: true, type: Number }], count: [11, {}, { reflect: true, type: Number }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], labelText: 1, messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], showChip: [7, {}, { reflect: true, type: Boolean }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: [11, {}, { reflect: true, type: Number }] };
61
+ }
62
+ static {
63
+ this.formAssociated = true;
68
64
  }
69
65
  static {
70
66
  this.styles = styles;
@@ -87,7 +83,6 @@ class Rating extends LitElement {
87
83
  connectedCallback() {
88
84
  super.connectedCallback();
89
85
  connectLabel(this);
90
- connectForm(this);
91
86
  }
92
87
  async load() {
93
88
  this.requestUpdate("value");
@@ -122,7 +117,6 @@ class Rating extends LitElement {
122
117
  disconnectedCallback() {
123
118
  super.disconnectedCallback();
124
119
  disconnectLabel(this);
125
- disconnectForm(this);
126
120
  }
127
121
  handleValueUpdate(newValue) {
128
122
  this.hoverValue = newValue;
@@ -233,7 +227,7 @@ class Rating extends LitElement {
233
227
  average,
234
228
  partial
235
229
  })} data-value=${value ?? nothing} for=${id ?? nothing} @click=${this.handleLabelClick} @focus=${this.handleLabelFocus} @keydown=${this.handleLabelKeyDown} @pointerdown=${this.handleLabelPointerDown} @pointerover=${this.handleLabelPointerOver} tabindex=${tabIndex ?? nothing}><input aria-errormessage=${IDS.validationMessage} .ariaInvalid=${this.status === "invalid"} .ariaLabel=${getLabelText(this)} .ariaRequired=${this.required} .checked=${checked} class=${safeClassMap(CSS.visuallyHidden)} .disabled=${this.disabled || this.readOnly} id=${id ?? nothing} name=${this.guid ?? nothing} @change=${this.handleInputChange} tabindex=-1 type=radio .value=${live(value ?? "")}>${StarIcon({ full: selected || average || hovered, scale: this.scale })}${partial && html`<div class=${safeClassMap(CSS.fraction)} style=${safeStyleMap({ width: `${fraction * 100}%` })}>${StarIcon({ full: true, partial: true, scale: this.scale })}</div>` || ""}<span class=${safeClassMap(CSS.visuallyHidden)}>${this.messages.stars.replace("{num}", `${value}`)}</span></label>`;
236
- })}${(this.count || this.average) && this.showChip ? html`<calcite-chip .label=${countString} .scale=${this.scale} .value=${countString}>${!!this.average && html`<span class=${safeClassMap(CSS.numberAverage)}>${this.average.toString()}</span>` || ""}${!!this.count && html`<span class=${safeClassMap(CSS.numberCount)}>(${countString})</span>` || ""}</calcite-chip>` : null}</fieldset>${HiddenFormInputSlot({ component: this })}${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}</span>` });
230
+ })}${(this.count || this.average) && this.showChip ? html`<calcite-chip .label=${countString} .scale=${this.scale} .value=${countString}>${!!this.average && html`<span class=${safeClassMap(CSS.numberAverage)}>${this.average.toString()}</span>` || ""}${!!this.count && html`<span class=${safeClassMap(CSS.numberCount)}>(${countString})</span>` || ""}</calcite-chip>` : null}</fieldset>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}</span>` });
237
231
  }
238
232
  }
239
233
  customElement("calcite-rating", Rating);
@@ -1,6 +1,5 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
- import type { MutableValidityState } from "../../utils/form.js";
4
3
  import type { Appearance, Layout, Scale, Status, Width } from "../interfaces.js";
5
4
  import type { IconName } from "../calcite-icon/interfaces.js";
6
5
  import type { SegmentedControlItem } from "../calcite-segmented-control-item/customElement.js";
@@ -69,9 +68,9 @@ export abstract class SegmentedControl extends LitElement {
69
68
  /**
70
69
  * The component's current validation state.
71
70
  *
72
- * @mdn [ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
71
+ * @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
73
72
  */
74
- get validity(): MutableValidityState;
73
+ get validity(): ValidityState;
75
74
  /** The component's `selectedItem` value. */
76
75
  accessor value: string;
77
76
  /**
@@ -84,7 +83,7 @@ export abstract class SegmentedControl extends LitElement {
84
83
  * Sets focus on the component.
85
84
  *
86
85
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
87
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
86
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
88
87
  */
89
88
  setFocus(options?: FocusOptions): Promise<void>;
90
89
  /** Fires when the `calcite-segmented-control-item` selection changes. */
@@ -4,13 +4,13 @@ import { css, isServer, nothing, html } from "lit";
4
4
  import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
5
5
  import { useDirection } from "@arcgis/lumina/controllers";
6
6
  import { a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
7
- import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
8
7
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
9
8
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
10
9
  import { V as Validation } from "../../chunks/Validation.js";
11
10
  import { u as useT9n } from "../../chunks/useT9n.js";
12
11
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
13
12
  import { u as useInteractive } from "../../chunks/useInteractive.js";
13
+ import { u as useForm } from "../../chunks/useForm.js";
14
14
  const CSS = {
15
15
  itemWrapper: "item-wrapper"
16
16
  };
@@ -22,6 +22,7 @@ class SegmentedControl extends LitElement {
22
22
  constructor() {
23
23
  super();
24
24
  this.direction = useDirection();
25
+ this.formSupport = useForm({ inputType: "text" })(this);
25
26
  this.items = [];
26
27
  this.messages = useT9n();
27
28
  this.focusSetter = useSetFocus()(this);
@@ -32,19 +33,6 @@ class SegmentedControl extends LitElement {
32
33
  this.required = false;
33
34
  this.scale = "m";
34
35
  this.status = "idle";
35
- this.validity = {
36
- valid: false,
37
- badInput: false,
38
- customError: false,
39
- patternMismatch: false,
40
- rangeOverflow: false,
41
- rangeUnderflow: false,
42
- stepMismatch: false,
43
- tooLong: false,
44
- tooShort: false,
45
- typeMismatch: false,
46
- valueMissing: false
47
- };
48
36
  this.value = null;
49
37
  this.width = "auto";
50
38
  this.calciteSegmentedControlChange = createEvent({ cancelable: false });
@@ -53,7 +41,10 @@ class SegmentedControl extends LitElement {
53
41
  this.listen("click", this.handleClick);
54
42
  }
55
43
  static {
56
- this.properties = { appearance: [3, {}, { reflect: true }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], layout: [3, {}, { reflect: true }], labelText: 1, messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedItem: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [0, {}, { attribute: false }], value: 1, width: [3, {}, { reflect: true }] };
44
+ this.properties = { appearance: [3, {}, { reflect: true }], disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], layout: [3, {}, { reflect: true }], labelText: 1, messageOverrides: [0, {}, { attribute: false }], name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedItem: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1, width: [3, {}, { reflect: true }] };
45
+ }
46
+ static {
47
+ this.formAssociated = true;
57
48
  }
58
49
  static {
59
50
  this.styles = styles;
@@ -64,7 +55,6 @@ class SegmentedControl extends LitElement {
64
55
  connectedCallback() {
65
56
  super.connectedCallback();
66
57
  connectLabel(this);
67
- connectForm(this);
68
58
  }
69
59
  willUpdate(changes) {
70
60
  if (changes.has("appearance") && (this.hasUpdated || this.appearance !== "solid") || changes.has("layout") && (this.hasUpdated || this.layout !== "horizontal") || changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
@@ -78,12 +68,11 @@ class SegmentedControl extends LitElement {
78
68
  }
79
69
  }
80
70
  loaded() {
81
- afterConnectDefaultValueSet(this, this.value);
71
+ this.formSupport.overrideDefaultValue(this.value);
82
72
  }
83
73
  disconnectedCallback() {
84
74
  super.disconnectedCallback();
85
75
  disconnectLabel(this);
86
- disconnectForm(this);
87
76
  }
88
77
  valueHandler(value) {
89
78
  const { items } = this;
@@ -218,7 +207,7 @@ class SegmentedControl extends LitElement {
218
207
  }
219
208
  render() {
220
209
  this.el.role = "radiogroup";
221
- return html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div aria-errormessage=${IDS.validationMessage} aria-label=${getLabelText(this) ?? nothing} .ariaInvalid=${this.status === "invalid"} .ariaRequired=${this.required} class=${safeClassMap(CSS.itemWrapper)}>${this.interactiveContainer({ disabled: this.disabled, children: html`<slot @slotchange=${this.handleDefaultSlotChange}></slot>${HiddenFormInputSlot({ component: this })}` })}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}`;
210
+ return html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div aria-errormessage=${IDS.validationMessage} aria-label=${getLabelText(this) ?? nothing} .ariaInvalid=${this.status === "invalid"} .ariaRequired=${this.required} class=${safeClassMap(CSS.itemWrapper)}>${this.interactiveContainer({ disabled: this.disabled, children: html`<slot @slotchange=${this.handleDefaultSlotChange}></slot>` })}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}`;
222
211
  }
223
212
  }
224
213
  customElement("calcite-segmented-control", SegmentedControl);
@@ -5,7 +5,6 @@ import type { IconName } from "../calcite-icon/interfaces.js";
5
5
  /**
6
6
  * @cssproperty [--calcite-segmented-control-color] - Specifies the component's color.
7
7
  * @cssproperty [--calcite-segmented-control-background-color] - Specifies the component's background color.
8
- * @cssproperty [--calcite-segmented-control-border-color] - Specifies the component's border color.
9
8
  * @cssproperty [--calcite-segmented-control-shadow] - Specifies the component's shadow.
10
9
  * @cssproperty [--calcite-segmented-control-icon-color] - Specifies the icons's color.
11
10
  */
@@ -16,7 +16,7 @@ const CSS = {
16
16
  icon: "icon",
17
17
  iconSolo: "icon--solo"
18
18
  };
19
- const styles = css`:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-animation-timing) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);border-color:var(--calcite-segmented-control-border-color);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,border-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:.625rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-segmented-control-border-color, var(--calcite-color-brand));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`;
19
+ const styles = css`:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);outline-color:transparent;transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out}.label{pointer-events:none;margin:.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-segmented-control-color, var(--calcite-color-text-3));background-color:var(--calcite-segmented-control-background-color);box-shadow:var(--calcite-segmented-control-shadow);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out,color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host(:focus){outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:-1px;z-index:var(--calcite-z-index)}.label--scale-s{padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);padding-block:.125rem}.label--scale-m{padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);padding-block:.375rem}.label--scale-l{padding-inline:1rem;padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host(:hover) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-2));color:var(--calcite-segmented-control-color, var(--calcite-color-text-1))}:host(:active) .label{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-3))}:host([checked]) .label{cursor:default;background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-text-inverse))}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{background-color:var(--calcite-segmented-control-background-color, var(--calcite-color-foreground-1));box-shadow:var(--calcite-segmented-control-shadow, inset 0 0 0 1px var(--calcite-color-brand));color:var(--calcite-segmented-control-color, var(--calcite-color-brand))}:host([checked]) .label--outline{background-color:var(--calcite-segmented-control-background-color, transparent)}::slotted(input){display:none}@media(forced-colors:active){:host([checked]) .label{background-color:highlight}:host([checked]) .label--outline,:host([checked]) .label--outline-fill{outline:2px solid transparent;outline-offset:2px}:host([checked]) .label:not([class~=label--outline]) .icon{color:highlightText}}.icon{position:relative;margin:0;display:inline-flex;line-height:inherit;margin-inline-start:var(--calcite-internal-segmented-control-icon-margin-start);margin-inline-end:var(--calcite-internal-segmented-control-icon-margin-end);--calcite-icon-color: var(--calcite-segmented-control-icon-color)}:host([icon-start]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-end: .5rem}:host([icon-end]) .label--scale-s{--calcite-internal-segmented-control-icon-margin-start: .5rem}:host([icon-start]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-end: .75rem}:host([icon-end]) .label--scale-m{--calcite-internal-segmented-control-icon-margin-start: .75rem}:host([icon-start]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-end: 1rem}:host([icon-end]) .label--scale-l{--calcite-internal-segmented-control-icon-margin-start: 1rem}.label .icon--solo{--calcite-internal-segmented-control-icon-margin-start: 0;--calcite-internal-segmented-control-icon-margin-end: 0}:host([hidden]){display:none}[hidden]{display:none}`;
20
20
  class SegmentedControlItem extends LitElement {
21
21
  constructor() {
22
22
  super(...arguments);
@@ -1,6 +1,5 @@
1
1
  /// <reference path="../../index.d.ts" />
2
2
  import type { PublicLitElement as LitElement } from "@arcgis/lumina";
3
- import type { MutableValidityState } from "../../utils/form.js";
4
3
  import type { Scale, Status, Width } from "../interfaces.js";
5
4
  import type { IconName } from "../calcite-icon/interfaces.js";
6
5
  import type { Option } from "../calcite-option/customElement.js";
@@ -70,9 +69,9 @@ export abstract class Select extends LitElement {
70
69
  /**
71
70
  * The component's current validation state.
72
71
  *
73
- * @mdn [ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
72
+ * @see [MDN - ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
74
73
  */
75
- get validity(): MutableValidityState;
74
+ get validity(): ValidityState;
76
75
  /** The component's `selectedOption` value. */
77
76
  accessor value: string;
78
77
  /**
@@ -85,7 +84,7 @@ export abstract class Select extends LitElement {
85
84
  * Sets focus on the component.
86
85
  *
87
86
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
88
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
87
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
89
88
  */
90
89
  setFocus(options?: FocusOptions): Promise<void>;
91
90
  /** Fires when the `selectedOption` changes. */
@@ -4,7 +4,6 @@ import { css, html } from "lit";
4
4
  import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { u as useT9n } from "../../chunks/useT9n.js";
7
- import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
8
7
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
9
8
  import { c as createObserver } from "../../chunks/observers.js";
10
9
  import { g as getIconScale } from "../../chunks/component.js";
@@ -12,7 +11,8 @@ import { I as InternalLabel } from "../../chunks/InternalLabel.js";
12
11
  import { V as Validation } from "../../chunks/Validation.js";
13
12
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
14
13
  import { u as useInteractive } from "../../chunks/useInteractive.js";
15
- const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;font-size:var(--calcite-select-font-size);font-weight:var(--calcite-internal-select-font-weight, var(--calcite-font-weight-regular))}.wrapper{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width);block-size:var(--calcite-internal-select-block-size, 32px)}.wrapper:focus-within .icon,.wrapper:active .icon,.wrapper:hover .icon{color:var(--calcite-select-icon-color-hover, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-sm);--calcite-select-spacing-inline: .5rem 2rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 24px}:host([scale=m]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-base);--calcite-select-spacing-inline: .75rem 2.5rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-md);--calcite-select-spacing-inline: 1rem 3rem;--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-lg);--calcite-internal-select-block-size: 44px}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0;box-sizing:border-box;inline-size:100%;cursor:pointer;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-style:solid;font-family:inherit;outline-color:transparent;font-weight:inherit;font-size:var(--calcite-select-font-size, var(--calcite-internal-select-font-size));color:var(--calcite-select-text-color, var(--calcite-color-text-2));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-width:var(--calcite-select-internal-border-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-select-spacing-inline);padding-block:var(--calcite-internal-select-spacing-block);border-inline-end-width:0;line-height:var(--calcite-internal-select-line-height, normal);background-color:var(--calcite-select-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-select-shadow, var(--calcite-shadow-small))}.select:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}select:disabled{border-color:var(--calcite-color-border-input);--tw-bg-opacity: 1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:transparent;color:var(--calcite-color-text-2);inset-inline-end:0px;border-start-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-start-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-inline-width:0 var(--calcite-select-internal-icon-border-inline-end-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-icon-container-padding-inline)}.icon-container .icon{color:var(--calcite-select-icon-color, var(--calcite-color-text-3))}:host([status=invalid]) select,:host([status=invalid]) .icon-container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) select:focus,:host([status=invalid]) .icon-container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.select:focus~.icon-container{border-color:transparent}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;
14
+ import { u as useForm } from "../../chunks/useForm.js";
15
+ const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;font-size:var(--calcite-select-font-size);font-weight:var(--calcite-internal-select-font-weight, var(--calcite-font-weight-regular))}.wrapper{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width);block-size:var(--calcite-internal-select-block-size, 32px)}.wrapper:focus-within .icon,.wrapper:active .icon,.wrapper:hover .icon{color:var(--calcite-select-icon-color-hover, var(--calcite-color-text-1))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-sm);--calcite-internal-select-spacing-inline: var(--calcite-space-sm) var(--calcite-space-2xl);--calcite-internal-select-icon-container-padding-inline: var(--calcite-space-2xs);--calcite-internal-select-block-size: 24px}:host([scale=m]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-base);--calcite-internal-select-spacing-inline: var(--calcite-space-md) var(--calcite-space-3xl);--calcite-internal-select-icon-container-padding-inline: var(--calcite-space-sm)}:host([scale=l]){--calcite-internal-select-font-size: var(--calcite-font-size-relative-md);--calcite-internal-select-spacing-inline: var(--calcite-space-lg) var(--calcite-space-4xl);--calcite-internal-select-icon-container-padding-inline: var(--calcite-space-sm-plus);--calcite-internal-select-block-size: 44px}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0;box-sizing:border-box;inline-size:100%;cursor:pointer;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-style:solid;font-family:inherit;outline-color:transparent;font-weight:inherit;font-size:var(--calcite-select-font-size, var(--calcite-internal-select-font-size));color:var(--calcite-select-text-color, var(--calcite-color-text-2));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-width:var(--calcite-select-internal-border-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-spacing-inline);padding-block:var(--calcite-internal-select-spacing-block);border-inline-end-width:0;line-height:var(--calcite-internal-select-line-height, normal);background-color:var(--calcite-select-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-select-shadow, var(--calcite-shadow-none))}.select:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}select:disabled{border-color:var(--calcite-color-border-input);--tw-bg-opacity: 1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-color-border-input);background-color:transparent;color:var(--calcite-color-text-2);inset-inline-end:0px;border-start-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-start-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-start-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-end-end-radius:var(--calcite-select-corner-radius, var(--calcite-corner-radius-none));border-color:var(--calcite-select-border-color, var(--calcite-color-border-input));border-inline-width:0 var(--calcite-select-internal-icon-border-inline-end-width, var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-select-icon-container-padding-inline)}.icon-container .icon{color:var(--calcite-select-icon-color, var(--calcite-color-text-3))}:host([status=invalid]) select,:host([status=invalid]) .icon-container{border-color:var(--calcite-color-status-danger)}:host([status=invalid]) select:focus,:host([status=invalid]) .icon-container:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.select:focus~.icon-container{border-color:transparent}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`;
16
16
  const CSS = {
17
17
  icon: "icon",
18
18
  iconContainer: "icon-container",
@@ -32,6 +32,7 @@ class Select extends LitElement {
32
32
  constructor() {
33
33
  super();
34
34
  this.componentToNativeEl = /* @__PURE__ */ new Map();
35
+ this.formSupport = useForm({ inputType: "text" })(this);
35
36
  this.mutationObserver = createObserver("mutation", () => this.populateInternalSelect());
36
37
  this.selectRef = createRef();
37
38
  this.messages = useT9n();
@@ -41,19 +42,6 @@ class Select extends LitElement {
41
42
  this.required = false;
42
43
  this.scale = "m";
43
44
  this.status = "idle";
44
- this.validity = {
45
- valid: false,
46
- badInput: false,
47
- customError: false,
48
- patternMismatch: false,
49
- rangeOverflow: false,
50
- rangeUnderflow: false,
51
- stepMismatch: false,
52
- tooLong: false,
53
- tooShort: false,
54
- typeMismatch: false,
55
- valueMissing: false
56
- };
57
45
  this.value = null;
58
46
  this.width = "auto";
59
47
  this.calciteSelectChange = createEvent({ cancelable: false });
@@ -61,7 +49,10 @@ class Select extends LitElement {
61
49
  this.listen("calciteInternalOptionGroupChange", this.handleOptionOrGroupChange);
62
50
  }
63
51
  static {
64
- this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], label: 1, labelText: 1, name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedOption: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [0, {}, { attribute: false }], value: 1, width: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }] };
52
+ this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], label: 1, labelText: 1, name: [3, {}, { reflect: true }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], selectedOption: [0, {}, { attribute: false }], status: [3, {}, { reflect: true }], validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [32, {}, { readOnly: true, attribute: false }], value: 1, width: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }] };
53
+ }
54
+ static {
55
+ this.formAssociated = true;
65
56
  }
66
57
  static {
67
58
  this.styles = styles;
@@ -76,7 +67,6 @@ class Select extends LitElement {
76
67
  childList: true
77
68
  });
78
69
  connectLabel(this);
79
- connectForm(this);
80
70
  }
81
71
  willUpdate(changes) {
82
72
  if (changes.has("value") && (this.hasUpdated || this.value !== null)) {
@@ -93,13 +83,12 @@ class Select extends LitElement {
93
83
  this.populateInternalSelect();
94
84
  const selected = this.selectRef.value?.selectedOptions[0];
95
85
  this.selectFromNativeOption(selected);
96
- afterConnectDefaultValueSet(this, this.selectedOption?.value ?? "");
86
+ this.formSupport.overrideDefaultValue(this.selectedOption?.value ?? "");
97
87
  }
98
88
  disconnectedCallback() {
99
89
  super.disconnectedCallback();
100
90
  this.mutationObserver?.disconnect();
101
91
  disconnectLabel(this);
102
- disconnectForm(this);
103
92
  }
104
93
  handleInternalSelectChange() {
105
94
  const selected = this.selectRef.value.selectedOptions[0];
@@ -196,7 +185,7 @@ class Select extends LitElement {
196
185
  }
197
186
  render() {
198
187
  const { disabled } = this;
199
- return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.wrapper)}><select aria-errormessage=${IDS.validationMessage} .ariaInvalid=${this.status === "invalid"} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.select)} .disabled=${disabled} @change=${this.handleInternalSelectChange} .required=${this.required} ${ref(this.selectRef)}><slot></slot></select>${this.renderChevron()}${HiddenFormInputSlot({ component: this })}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
188
+ return this.interactiveContainer({ disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div class=${safeClassMap(CSS.wrapper)}><select aria-errormessage=${IDS.validationMessage} .ariaInvalid=${this.status === "invalid"} .ariaLabel=${getLabelText(this)} class=${safeClassMap(CSS.select)} .disabled=${disabled} @change=${this.handleInternalSelectChange} .required=${this.required} ${ref(this.selectRef)}><slot></slot></select>${this.renderChevron()}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
200
189
  }
201
190
  }
202
191
  customElement("calcite-select", Select);