@esri/calcite-components 5.1.0-next.5 → 5.1.0-next.51

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 (481) hide show
  1. package/dist/cdn/2I23BJUK.js +2 -0
  2. package/dist/cdn/2MK42DZ4.js +2 -0
  3. package/dist/cdn/2RVF53XU.js +2 -0
  4. package/dist/cdn/{25YVFVC7.js → 2VEIQ62E.js} +1 -1
  5. package/dist/cdn/36JLOHBC.js +2 -0
  6. package/dist/cdn/{HHOMMC4H.js → 3B5PYTVX.js} +1 -1
  7. package/dist/cdn/3BZBBTUA.js +2 -0
  8. package/dist/cdn/3FXX3SBS.js +2 -0
  9. package/dist/cdn/3JTJC2PS.js +2 -0
  10. package/dist/cdn/3N3O22QG.js +2 -0
  11. package/dist/cdn/3ZXALV6G.js +2 -0
  12. package/dist/cdn/43E5QBXB.js +2 -0
  13. package/dist/cdn/{IJP6ZKHZ.js → 456IFPIW.js} +1 -1
  14. package/dist/cdn/{GNDNKP2Q.js → 4F5KQIRB.js} +1 -1
  15. package/dist/cdn/4HQ5QYH2.js +2 -0
  16. package/dist/cdn/{ZKPCUAN2.js → 4J3DARRE.js} +1 -1
  17. package/dist/cdn/4R54D2BX.js +2 -0
  18. package/dist/cdn/4RTJFM5B.js +2 -0
  19. package/dist/cdn/4TA4AAFT.js +2 -0
  20. package/dist/cdn/52IJCUEV.js +2 -0
  21. package/dist/cdn/5EOFDLJO.js +2 -0
  22. package/dist/cdn/{2QARK4VJ.js → 5M27WGKA.js} +1 -1
  23. package/dist/cdn/5WVRAQRW.js +2 -0
  24. package/dist/cdn/6BFJTIPA.js +2 -0
  25. package/dist/cdn/{5TCLHXAD.js → 6D5PCSHS.js} +1 -1
  26. package/dist/cdn/6TSA7FLB.js +2 -0
  27. package/dist/cdn/{HUNZU2OF.js → 73ORJJZS.js} +1 -1
  28. package/dist/cdn/{5SU52VYR.js → 75SY2WE4.js} +1 -1
  29. package/dist/cdn/{VB7GHJWK.js → 7ECSU3T3.js} +1 -1
  30. package/dist/cdn/{RGKOGN5W.js → 7GZ4RW44.js} +1 -1
  31. package/dist/cdn/{NAFJ5ZYO.js → 7NDXWX7R.js} +1 -1
  32. package/dist/cdn/{5L7CGWWD.js → 7RZYNANK.js} +1 -1
  33. package/dist/cdn/{DY6SXW3X.js → A2KNWLOL.js} +1 -1
  34. package/dist/cdn/{BPSXK66S.js → AEPM5SJO.js} +1 -1
  35. package/dist/cdn/{ZVFZSDLX.js → AEZOU5JE.js} +1 -1
  36. package/dist/cdn/{NIBBUVHR.js → AK66BMBC.js} +1 -1
  37. package/dist/cdn/{RRNEZXM4.js → AR7ZPQQG.js} +1 -1
  38. package/dist/cdn/B6R2YN2X.js +2 -0
  39. package/dist/cdn/{NNSUCRNU.js → BF7DR726.js} +1 -1
  40. package/dist/cdn/BHS72XYT.js +2 -0
  41. package/dist/cdn/{UUHRTJGO.js → C42SNF33.js} +1 -1
  42. package/dist/cdn/C53YAAVC.js +2 -0
  43. package/dist/cdn/CDSIG642.js +2 -0
  44. package/dist/cdn/CJGERVGF.js +4 -0
  45. package/dist/cdn/{3NNVHOGK.js → CRL6VQWS.js} +1 -1
  46. package/dist/cdn/{KVPLQQ75.js → DAQX6BT3.js} +1 -1
  47. package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
  48. package/dist/cdn/{AJKEEG2Z.js → DUAPF33E.js} +1 -1
  49. package/dist/cdn/DWPX74WA.js +2 -0
  50. package/dist/cdn/{YQOYGBGD.js → EBGVT22W.js} +1 -1
  51. package/dist/cdn/EW3UPJT7.js +2 -0
  52. package/dist/cdn/FB545PKU.js +2 -0
  53. package/dist/cdn/GFPWU57X.js +2 -0
  54. package/dist/cdn/{O75ZRZLS.js → GTALENKO.js} +1 -1
  55. package/dist/cdn/H5UVCR64.js +2 -0
  56. package/dist/cdn/{ODOOWGRW.js → H6UBX3WZ.js} +1 -1
  57. package/dist/cdn/HGRS2NBC.js +2 -0
  58. package/dist/cdn/{QVTLP2LK.js → HM2E526S.js} +1 -1
  59. package/dist/cdn/HPVBLELP.js +2 -0
  60. package/dist/cdn/{FWEFFYYZ.js → HPWLGQL6.js} +1 -1
  61. package/dist/cdn/{752PQ7IA.js → HULUX4S6.js} +1 -1
  62. package/dist/cdn/{MQMNX7AM.js → I24CZVLP.js} +1 -1
  63. package/dist/cdn/{2GS6R2BX.js → IHLWJXZV.js} +1 -1
  64. package/dist/cdn/{NMIBGEIB.js → IIBZXYLU.js} +1 -1
  65. package/dist/cdn/{SVHI2LRC.js → IRVWWA2A.js} +1 -1
  66. package/dist/cdn/{DR7JKZAI.js → ISMO77VP.js} +1 -1
  67. package/dist/cdn/{2Z4Z3NMS.js → IZEFSP2C.js} +1 -1
  68. package/dist/cdn/JA5TE633.js +2 -0
  69. package/dist/cdn/JKAB4LS7.js +2 -0
  70. package/dist/cdn/{42NQN6DY.js → JLGDNYBI.js} +1 -1
  71. package/dist/cdn/{PNXNTD3R.js → JOTX7MS6.js} +1 -1
  72. package/dist/cdn/{3LOKHBAB.js → K43SJYRB.js} +1 -1
  73. package/dist/cdn/{ALC6PGDZ.js → K7UPFMP3.js} +1 -1
  74. package/dist/cdn/{X53XDNBL.js → KC5UAIPG.js} +1 -1
  75. package/dist/cdn/{6XJYCX76.js → KDMQ3W3P.js} +1 -1
  76. package/dist/cdn/{HGRVTRR3.js → KIIYDDSF.js} +1 -1
  77. package/dist/cdn/KJUZSP7X.js +2 -0
  78. package/dist/cdn/KVNTMFIR.js +2 -0
  79. package/dist/cdn/{OGOI7JTF.js → KWNGJXWC.js} +1 -1
  80. package/dist/cdn/{K4R3HUW3.js → KXSIX7V7.js} +1 -1
  81. package/dist/cdn/LA3AJSXV.js +2 -0
  82. package/dist/cdn/LSOSPUDS.js +2 -0
  83. package/dist/cdn/M4BORA6H.js +2 -0
  84. package/dist/cdn/{3L2WKJUB.js → M77EYDBR.js} +1 -1
  85. package/dist/cdn/{D7UER3G6.js → MAH7GW3L.js} +1 -1
  86. package/dist/cdn/{UYYGQ6AY.js → MFLXU5FA.js} +1 -1
  87. package/dist/cdn/{C25VFIND.js → MRXZATZZ.js} +1 -1
  88. package/dist/cdn/MU5LNKS7.js +2 -0
  89. package/dist/cdn/MUMG74E5.js +2 -0
  90. package/dist/cdn/MVK6LWK5.js +2 -0
  91. package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
  92. package/dist/cdn/MYKZPZDR.js +2 -0
  93. package/dist/cdn/{CWQZDXHH.js → NIASU3O6.js} +1 -1
  94. package/dist/cdn/{22IPJDDL.js → NKBT2QG4.js} +1 -1
  95. package/dist/cdn/NL6QGGPB.js +2 -0
  96. package/dist/cdn/NPKYZEEF.js +2 -0
  97. package/dist/cdn/{ZPJ4FGXO.js → OFR37WBK.js} +1 -1
  98. package/dist/cdn/{SP22KLIK.js → OL7ZYBX6.js} +1 -1
  99. package/dist/cdn/P6VMV62Z.js +2 -0
  100. package/dist/cdn/{B55VO4LW.js → PDXU6HPZ.js} +1 -1
  101. package/dist/cdn/PIKLS5KR.js +2 -0
  102. package/dist/cdn/PJ4SD5FY.js +2 -0
  103. package/dist/cdn/PLG6IIYK.js +3 -0
  104. package/dist/cdn/{NT6RQTF7.js → PPBHKZJI.js} +1 -1
  105. package/dist/cdn/{H77SNVVI.js → Q75PWKQ3.js} +1 -1
  106. package/dist/cdn/QJBPXLTP.js +2 -0
  107. package/dist/cdn/{Q52IY7SS.js → QLOR2RB5.js} +1 -1
  108. package/dist/cdn/QTHYRIFY.js +2 -0
  109. package/dist/cdn/QVXAQXDL.js +2 -0
  110. package/dist/cdn/R2ZRQO3L.js +2 -0
  111. package/dist/cdn/RGLUZ76B.js +2 -0
  112. package/dist/cdn/{EY4MG3NU.js → RPAL2ENA.js} +1 -1
  113. package/dist/cdn/{ZKCFISUX.js → RRJKRT7F.js} +1 -1
  114. package/dist/cdn/S7EIG7Q5.js +2 -0
  115. package/dist/cdn/{5J2UYJYX.js → SCXKWH7Z.js} +1 -1
  116. package/dist/cdn/{PYD5GHXA.js → SKAIHX6Z.js} +1 -1
  117. package/dist/cdn/{IU4TJIME.js → SXV7WCPS.js} +1 -1
  118. package/dist/cdn/T4Q6C4CT.js +2 -0
  119. package/dist/cdn/TGQJUML7.js +2 -0
  120. package/dist/cdn/TSNOYPVI.js +2 -0
  121. package/dist/cdn/{MM6LZCYO.js → TZ7BLX2N.js} +1 -1
  122. package/dist/cdn/{TZFOTRCX.js → U63LB523.js} +1 -1
  123. package/dist/cdn/U6HPCAAW.js +2 -0
  124. package/dist/cdn/{UVJ3XYK5.js → UPTGE4WC.js} +1 -1
  125. package/dist/cdn/USOHYTXD.js +2 -0
  126. package/dist/cdn/{T2MUZ4UN.js → UY7QVK74.js} +1 -1
  127. package/dist/cdn/VFLSIH3H.js +2 -0
  128. package/dist/cdn/{Y5FMVLYP.js → VHLCDJKY.js} +1 -1
  129. package/dist/cdn/{G4QI7VSJ.js → VRI5YMPE.js} +1 -1
  130. package/dist/cdn/{Z6LSD6MR.js → WBP7WHU4.js} +1 -1
  131. package/dist/cdn/WCTTX5WL.js +2 -0
  132. package/dist/cdn/{RH6ZIP65.js → WGGFNK4Z.js} +1 -1
  133. package/dist/cdn/WXDRYIO2.js +2 -0
  134. package/dist/cdn/WZ6F5SCK.js +2 -0
  135. package/dist/cdn/X2NBQO5I.js +2 -0
  136. package/dist/cdn/{IFLPCKYL.js → X44HUYME.js} +1 -1
  137. package/dist/cdn/XKYXT27V.js +2 -0
  138. package/dist/cdn/XUU2MRGP.js +2 -0
  139. package/dist/cdn/XUYLYALV.js +2 -0
  140. package/dist/cdn/XYFV7S74.js +2 -0
  141. package/dist/cdn/ZEUCKTPG.js +2 -0
  142. package/dist/cdn/ZKHWMGW5.js +2 -0
  143. package/dist/cdn/ZMX2MKUW.js +2 -0
  144. package/dist/cdn/ZOQOJDXL.js +2 -0
  145. package/dist/cdn/ZQCRV5XI.js +2 -0
  146. package/dist/cdn/ZRXGDZZT.js +4 -0
  147. package/dist/cdn/assets/combobox/t9n/messages.ar.json +1 -1
  148. package/dist/cdn/assets/combobox/t9n/messages.bg.json +1 -1
  149. package/dist/cdn/assets/combobox/t9n/messages.bs.json +1 -1
  150. package/dist/cdn/assets/combobox/t9n/messages.ca.json +1 -1
  151. package/dist/cdn/assets/combobox/t9n/messages.cs.json +1 -1
  152. package/dist/cdn/assets/combobox/t9n/messages.da.json +1 -1
  153. package/dist/cdn/assets/combobox/t9n/messages.de.json +1 -1
  154. package/dist/cdn/assets/combobox/t9n/messages.el.json +1 -1
  155. package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
  156. package/dist/cdn/assets/combobox/t9n/messages.es.json +1 -1
  157. package/dist/cdn/assets/combobox/t9n/messages.et.json +1 -1
  158. package/dist/cdn/assets/combobox/t9n/messages.fi.json +1 -1
  159. package/dist/cdn/assets/combobox/t9n/messages.fr.json +1 -1
  160. package/dist/cdn/assets/combobox/t9n/messages.he.json +1 -1
  161. package/dist/cdn/assets/combobox/t9n/messages.hr.json +1 -1
  162. package/dist/cdn/assets/combobox/t9n/messages.hu.json +1 -1
  163. package/dist/cdn/assets/combobox/t9n/messages.id.json +1 -1
  164. package/dist/cdn/assets/combobox/t9n/messages.it.json +1 -1
  165. package/dist/cdn/assets/combobox/t9n/messages.ja.json +1 -1
  166. package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
  167. package/dist/cdn/assets/combobox/t9n/messages.ko.json +1 -1
  168. package/dist/cdn/assets/combobox/t9n/messages.lt.json +1 -1
  169. package/dist/cdn/assets/combobox/t9n/messages.lv.json +1 -1
  170. package/dist/cdn/assets/combobox/t9n/messages.nl.json +1 -1
  171. package/dist/cdn/assets/combobox/t9n/messages.no.json +1 -1
  172. package/dist/cdn/assets/combobox/t9n/messages.pl.json +1 -1
  173. package/dist/cdn/assets/combobox/t9n/messages.pt-BR.json +1 -1
  174. package/dist/cdn/assets/combobox/t9n/messages.pt-PT.json +1 -1
  175. package/dist/cdn/assets/combobox/t9n/messages.ro.json +1 -1
  176. package/dist/cdn/assets/combobox/t9n/messages.ru.json +1 -1
  177. package/dist/cdn/assets/combobox/t9n/messages.sk.json +1 -1
  178. package/dist/cdn/assets/combobox/t9n/messages.sl.json +1 -1
  179. package/dist/cdn/assets/combobox/t9n/messages.sr.json +1 -1
  180. package/dist/cdn/assets/combobox/t9n/messages.sv.json +1 -1
  181. package/dist/cdn/assets/combobox/t9n/messages.th.json +1 -1
  182. package/dist/cdn/assets/combobox/t9n/messages.tr.json +1 -1
  183. package/dist/cdn/assets/combobox/t9n/messages.uk.json +1 -1
  184. package/dist/cdn/assets/combobox/t9n/messages.vi.json +1 -1
  185. package/dist/cdn/assets/combobox/t9n/messages.zh-CN.json +1 -1
  186. package/dist/cdn/assets/combobox/t9n/messages.zh-HK.json +1 -1
  187. package/dist/cdn/assets/combobox/t9n/messages.zh-TW.json +1 -1
  188. package/dist/cdn/assets/icon/arcgisQuickcapture16.json +1 -0
  189. package/dist/cdn/assets/icon/arcgisQuickcapture24.json +1 -0
  190. package/dist/cdn/assets/icon/arcgisQuickcapture32.json +1 -0
  191. package/dist/cdn/assets/icon/arcgisSurvey12316.json +1 -0
  192. package/dist/cdn/assets/icon/arcgisSurvey12324.json +1 -0
  193. package/dist/cdn/assets/icon/arcgisSurvey12332.json +1 -0
  194. package/dist/cdn/assets/icon/buttons16.json +1 -0
  195. package/dist/cdn/assets/icon/buttons24.json +1 -0
  196. package/dist/cdn/assets/icon/buttons32.json +1 -0
  197. package/dist/cdn/assets/icon/entityTypes16.json +1 -0
  198. package/dist/cdn/assets/icon/entityTypes24.json +1 -0
  199. package/dist/cdn/assets/icon/entityTypes32.json +1 -0
  200. package/dist/cdn/assets/icon/gpsReceiver16.json +1 -0
  201. package/dist/cdn/assets/icon/gpsReceiver24.json +1 -0
  202. package/dist/cdn/assets/icon/gpsReceiver32.json +1 -0
  203. package/dist/cdn/assets/icon/layerStreamSetting16.json +1 -0
  204. package/dist/cdn/assets/icon/layerStreamSetting24.json +1 -0
  205. package/dist/cdn/assets/icon/layerStreamSetting32.json +1 -0
  206. package/dist/cdn/assets/icon/publish16.json +1 -0
  207. package/dist/cdn/assets/icon/publish24.json +1 -0
  208. package/dist/cdn/assets/icon/publish32.json +1 -0
  209. package/dist/cdn/assets/icon/totalStation16.json +1 -0
  210. package/dist/cdn/assets/icon/totalStation24.json +1 -0
  211. package/dist/cdn/assets/icon/totalStation32.json +1 -0
  212. package/dist/cdn/assets/icon/velocityServer16.json +1 -0
  213. package/dist/cdn/assets/icon/velocityServer24.json +1 -0
  214. package/dist/cdn/assets/icon/velocityServer32.json +1 -0
  215. package/dist/cdn/index.js +2 -2
  216. package/dist/cdn/main.css +1 -1
  217. package/dist/chunks/ClearButton.js +16 -0
  218. package/dist/chunks/ExpandToggle.js +3 -3
  219. package/dist/chunks/Heading.js +3 -3
  220. package/dist/chunks/component.js +1 -1
  221. package/dist/chunks/dom.js +49 -28
  222. package/dist/chunks/floating-ui.js +2 -5
  223. package/dist/chunks/locale.js +29 -12
  224. package/dist/chunks/manager.js +505 -0
  225. package/dist/chunks/resources5.js +2 -1
  226. package/dist/chunks/resources6.js +2 -0
  227. package/dist/chunks/runtime.js +4 -4
  228. package/dist/chunks/useFocusTrap.js +25 -0
  229. package/dist/chunks/useForm.js +327 -0
  230. package/dist/chunks/useFormTrigger.js +25 -0
  231. package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
  232. package/dist/chunks/utils.js +6 -6
  233. package/dist/chunks/utils3.js +18 -3
  234. package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
  235. package/dist/components/calcite-action/customElement.d.ts +14 -12
  236. package/dist/components/calcite-action/customElement.js +8 -14
  237. package/dist/components/calcite-action-bar/customElement.d.ts +12 -3
  238. package/dist/components/calcite-action-bar/customElement.js +47 -16
  239. package/dist/components/calcite-action-group/customElement.d.ts +12 -6
  240. package/dist/components/calcite-action-group/customElement.js +2 -1
  241. package/dist/components/calcite-action-menu/customElement.d.ts +2 -2
  242. package/dist/components/calcite-action-pad/customElement.d.ts +3 -3
  243. package/dist/components/calcite-action-pad/customElement.js +11 -6
  244. package/dist/components/calcite-alert/customElement.d.ts +2 -2
  245. package/dist/components/calcite-alert/customElement.js +1 -1
  246. package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
  247. package/dist/components/calcite-autocomplete/customElement.js +20 -31
  248. package/dist/components/calcite-autocomplete-item/customElement.d.ts +6 -0
  249. package/dist/components/calcite-autocomplete-item/customElement.js +9 -4
  250. package/dist/components/calcite-block/customElement.d.ts +5 -5
  251. package/dist/components/calcite-block/customElement.js +1 -1
  252. package/dist/components/calcite-block-group/customElement.d.ts +1 -1
  253. package/dist/components/calcite-block-group/customElement.js +4 -11
  254. package/dist/components/calcite-block-group/interfaces.d.ts +2 -6
  255. package/dist/components/calcite-block-section/customElement.d.ts +1 -1
  256. package/dist/components/calcite-button/customElement.d.ts +6 -6
  257. package/dist/components/calcite-button/customElement.js +10 -22
  258. package/dist/components/calcite-card/customElement.d.ts +11 -5
  259. package/dist/components/calcite-card/customElement.js +5 -3
  260. package/dist/components/calcite-card-group/customElement.d.ts +9 -3
  261. package/dist/components/calcite-card-group/customElement.js +11 -1
  262. package/dist/components/calcite-carousel/customElement.d.ts +1 -1
  263. package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
  264. package/dist/components/calcite-checkbox/customElement.js +8 -22
  265. package/dist/components/calcite-chip/customElement.d.ts +2 -2
  266. package/dist/components/calcite-chip/customElement.js +1 -1
  267. package/dist/components/calcite-chip-group/customElement.d.ts +1 -1
  268. package/dist/components/calcite-color-picker/customElement.d.ts +2 -2
  269. package/dist/components/calcite-color-picker/customElement.js +2 -2
  270. package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
  271. package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
  272. package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
  273. package/dist/components/calcite-combobox/customElement.d.ts +5 -5
  274. package/dist/components/calcite-combobox/customElement.js +195 -108
  275. package/dist/components/calcite-combobox/index.js +2 -1
  276. package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
  277. package/dist/components/calcite-combobox-item/customElement.js +1 -1
  278. package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
  279. package/dist/components/calcite-date-picker/customElement.js +4 -14
  280. package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
  281. package/dist/components/calcite-date-picker-month/customElement.js +2 -2
  282. package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
  283. package/dist/components/calcite-dialog/customElement.d.ts +7 -5
  284. package/dist/components/calcite-dialog/customElement.js +4 -2
  285. package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
  286. package/dist/components/calcite-dropdown/customElement.js +165 -90
  287. package/dist/components/calcite-dropdown-item/customElement.d.ts +2 -2
  288. package/dist/components/calcite-dropdown-item/customElement.js +14 -32
  289. package/dist/components/calcite-fab/customElement.d.ts +1 -1
  290. package/dist/components/calcite-fab/customElement.js +1 -1
  291. package/dist/components/calcite-filter/customElement.d.ts +1 -1
  292. package/dist/components/calcite-flow/customElement.d.ts +1 -1
  293. package/dist/components/calcite-flow-item/customElement.d.ts +8 -5
  294. package/dist/components/calcite-flow-item/customElement.js +4 -2
  295. package/dist/components/calcite-graph/customElement.js +1 -1
  296. package/dist/components/calcite-handle/customElement.d.ts +1 -1
  297. package/dist/components/calcite-icon/customElement.d.ts +1 -1
  298. package/dist/components/calcite-inline-editable/customElement.d.ts +2 -2
  299. package/dist/components/calcite-inline-editable/customElement.js +1 -1
  300. package/dist/components/calcite-input/customElement.d.ts +17 -18
  301. package/dist/components/calcite-input/customElement.js +26 -49
  302. package/dist/components/calcite-input/index.js +1 -0
  303. package/dist/components/calcite-input-date-picker/customElement.d.ts +6 -7
  304. package/dist/components/calcite-input-date-picker/customElement.js +66 -75
  305. package/dist/components/calcite-input-message/customElement.d.ts +1 -1
  306. package/dist/components/calcite-input-number/customElement.d.ts +13 -14
  307. package/dist/components/calcite-input-number/customElement.js +22 -48
  308. package/dist/components/calcite-input-number/index.js +1 -0
  309. package/dist/components/calcite-input-text/customElement.d.ts +11 -12
  310. package/dist/components/calcite-input-text/customElement.js +8 -179
  311. package/dist/components/calcite-input-text/index.js +1 -0
  312. package/dist/components/calcite-input-time-picker/customElement.d.ts +6 -7
  313. package/dist/components/calcite-input-time-picker/customElement.js +11 -23
  314. package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -6
  315. package/dist/components/calcite-input-time-zone/customElement.js +21 -19
  316. package/dist/components/calcite-label/customElement.js +1 -1
  317. package/dist/components/calcite-link/customElement.d.ts +9 -9
  318. package/dist/components/calcite-link/customElement.js +28 -23
  319. package/dist/components/calcite-list/customElement.d.ts +1 -1
  320. package/dist/components/calcite-list/customElement.js +33 -14
  321. package/dist/components/calcite-list/interfaces.d.ts +2 -6
  322. package/dist/components/calcite-list-item/customElement.d.ts +2 -2
  323. package/dist/components/calcite-list-item/customElement.js +4 -4
  324. package/dist/components/calcite-list-item-group/customElement.js +1 -1
  325. package/dist/components/calcite-loader/customElement.d.ts +1 -1
  326. package/dist/components/calcite-menu/customElement.d.ts +1 -1
  327. package/dist/components/calcite-menu/customElement.js +1 -1
  328. package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
  329. package/dist/components/calcite-meter/customElement.d.ts +7 -1
  330. package/dist/components/calcite-meter/customElement.js +4 -8
  331. package/dist/components/calcite-navigation/customElement.d.ts +9 -2
  332. package/dist/components/calcite-navigation/customElement.js +42 -3
  333. package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
  334. package/dist/components/calcite-navigation-logo/customElement.js +4 -3
  335. package/dist/components/calcite-navigation-user/customElement.d.ts +2 -2
  336. package/dist/components/calcite-navigation-user/customElement.js +11 -6
  337. package/dist/components/calcite-notice/customElement.d.ts +3 -3
  338. package/dist/components/calcite-notice/customElement.js +1 -1
  339. package/dist/components/calcite-pagination/customElement.d.ts +1 -1
  340. package/dist/components/calcite-pagination/customElement.js +1 -1
  341. package/dist/components/calcite-panel/customElement.d.ts +7 -5
  342. package/dist/components/calcite-panel/customElement.js +20 -8
  343. package/dist/components/calcite-popover/customElement.d.ts +2 -2
  344. package/dist/components/calcite-popover/customElement.js +11 -175
  345. package/dist/components/calcite-radio-button/customElement.d.ts +16 -1
  346. package/dist/components/calcite-radio-button/customElement.js +10 -18
  347. package/dist/components/calcite-radio-button-group/customElement.d.ts +1 -1
  348. package/dist/components/calcite-rating/customElement.d.ts +3 -4
  349. package/dist/components/calcite-rating/customElement.js +12 -18
  350. package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
  351. package/dist/components/calcite-segmented-control/customElement.js +8 -19
  352. package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
  353. package/dist/components/calcite-select/customElement.d.ts +3 -4
  354. package/dist/components/calcite-select/customElement.js +9 -20
  355. package/dist/components/calcite-sheet/customElement.d.ts +3 -3
  356. package/dist/components/calcite-sheet/customElement.js +3 -7
  357. package/dist/components/calcite-shell-panel/customElement.d.ts +3 -3
  358. package/dist/components/calcite-shell-panel/customElement.js +4 -0
  359. package/dist/components/calcite-slider/customElement.d.ts +3 -4
  360. package/dist/components/calcite-slider/customElement.js +12 -22
  361. package/dist/components/calcite-sort-handle/customElement.d.ts +4 -4
  362. package/dist/components/calcite-sort-handle/customElement.js +44 -17
  363. package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
  364. package/dist/components/calcite-sortable-list/customElement.js +3 -3
  365. package/dist/components/calcite-split-button/customElement.d.ts +8 -8
  366. package/dist/components/calcite-stepper/customElement.d.ts +2 -2
  367. package/dist/components/calcite-stepper/customElement.js +29 -42
  368. package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
  369. package/dist/components/calcite-stepper-item/customElement.js +2 -8
  370. package/dist/components/calcite-swatch/customElement.d.ts +1 -1
  371. package/dist/components/calcite-switch/customElement.d.ts +4 -4
  372. package/dist/components/calcite-switch/customElement.js +9 -8
  373. package/dist/components/calcite-tab/customElement.d.ts +1 -1
  374. package/dist/components/calcite-tab/customElement.js +1 -1
  375. package/dist/components/calcite-tab-nav/customElement.js +1 -1
  376. package/dist/components/calcite-tab-title/customElement.js +1 -1
  377. package/dist/components/calcite-table/customElement.js +1 -1
  378. package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
  379. package/dist/components/calcite-table-header/customElement.d.ts +2 -2
  380. package/dist/components/calcite-table-row/customElement.d.ts +1 -1
  381. package/dist/components/calcite-tabs/customElement.js +1 -1
  382. package/dist/components/calcite-text-area/customElement.d.ts +13 -14
  383. package/dist/components/calcite-text-area/customElement.js +32 -37
  384. package/dist/components/calcite-tile/customElement.d.ts +1 -1
  385. package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
  386. package/dist/components/calcite-time-picker/customElement.js +2 -2
  387. package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
  388. package/dist/components/calcite-tooltip/customElement.js +24 -315
  389. package/dist/components/calcite-tree-item/customElement.js +2 -3
  390. package/dist/controllers/useSortable.d.ts +7 -0
  391. package/dist/docs/api.json +1 -1
  392. package/dist/docs/docs.json +1 -1
  393. package/dist/docs/supported-browsers.json +1 -1
  394. package/dist/docs/translations.json +1 -1
  395. package/dist/docs/vscode.css-custom-data.json +1 -1
  396. package/dist/docs/vscode.html-custom-data.json +1 -1
  397. package/dist/docs/web-types.json +1 -1
  398. package/dist/loader.js +28 -28
  399. package/dist/types/lumina.d.ts +8 -8
  400. package/dist/types/preact.d.ts +8 -8
  401. package/dist/types/react.d.ts +8 -8
  402. package/dist/types/stencil.d.ts +8 -8
  403. package/package.json +15 -16
  404. package/dist/cdn/25CWB6HX.js +0 -2
  405. package/dist/cdn/3KLZFJXW.js +0 -2
  406. package/dist/cdn/3WLFK4RW.js +0 -2
  407. package/dist/cdn/462JN5WF.js +0 -2
  408. package/dist/cdn/464S36UH.js +0 -2
  409. package/dist/cdn/4ALKCXNH.js +0 -2
  410. package/dist/cdn/4GQPJFUJ.js +0 -2
  411. package/dist/cdn/4GVH7HTQ.js +0 -2
  412. package/dist/cdn/4J6YW6EK.js +0 -2
  413. package/dist/cdn/52ZOO5HQ.js +0 -2
  414. package/dist/cdn/5HTRQR7F.js +0 -2
  415. package/dist/cdn/6NEHFZMJ.js +0 -2
  416. package/dist/cdn/6VRXKEA7.js +0 -2
  417. package/dist/cdn/7RSGSW76.js +0 -2
  418. package/dist/cdn/7UOYXJ3K.js +0 -2
  419. package/dist/cdn/A2UZRUUF.js +0 -2
  420. package/dist/cdn/A7IQIXR3.js +0 -2
  421. package/dist/cdn/AEUCGVU4.js +0 -2
  422. package/dist/cdn/BIEIKUB2.js +0 -2
  423. package/dist/cdn/BS22M3WT.js +0 -2
  424. package/dist/cdn/BWDCDFXW.js +0 -2
  425. package/dist/cdn/CXVISA7Y.js +0 -2
  426. package/dist/cdn/ED7SQQHM.js +0 -3
  427. package/dist/cdn/EFNE45MK.js +0 -2
  428. package/dist/cdn/EGK4PSW5.js +0 -2
  429. package/dist/cdn/EJCQCHH7.js +0 -2
  430. package/dist/cdn/ENCYKNKN.js +0 -4
  431. package/dist/cdn/EZW5GK73.js +0 -2
  432. package/dist/cdn/GEQ3EBJO.js +0 -2
  433. package/dist/cdn/GLJVCFQW.js +0 -2
  434. package/dist/cdn/HAUWZRL4.js +0 -2
  435. package/dist/cdn/HBUNMGZ3.js +0 -2
  436. package/dist/cdn/HFGDCX3I.js +0 -2
  437. package/dist/cdn/J42TNDHM.js +0 -2
  438. package/dist/cdn/J4J65DN5.js +0 -2
  439. package/dist/cdn/KBHLSIAR.js +0 -2
  440. package/dist/cdn/KKMGV3S6.js +0 -2
  441. package/dist/cdn/KUC6KV4R.js +0 -2
  442. package/dist/cdn/KVRUYI63.js +0 -2
  443. package/dist/cdn/MLQDQZZR.js +0 -2
  444. package/dist/cdn/N47CSPB7.js +0 -2
  445. package/dist/cdn/O6ZRTXVO.js +0 -2
  446. package/dist/cdn/OCFKSX5L.js +0 -2
  447. package/dist/cdn/OO556Q5A.js +0 -2
  448. package/dist/cdn/PGUOVY7V.js +0 -2
  449. package/dist/cdn/PJ3GHZ7T.js +0 -2
  450. package/dist/cdn/Q4EG6G7W.js +0 -2
  451. package/dist/cdn/QEPJF6TC.js +0 -3
  452. package/dist/cdn/QHZAKDI7.js +0 -2
  453. package/dist/cdn/QIUVPLV2.js +0 -2
  454. package/dist/cdn/R3DLH5BB.js +0 -2
  455. package/dist/cdn/R5DGN3O6.js +0 -2
  456. package/dist/cdn/RU3YCR42.js +0 -2
  457. package/dist/cdn/SF7SFEKA.js +0 -2
  458. package/dist/cdn/SKOYS4HM.js +0 -2
  459. package/dist/cdn/TAS3P2HU.js +0 -2
  460. package/dist/cdn/TBA5ATIB.js +0 -2
  461. package/dist/cdn/TW2SRS2O.js +0 -2
  462. package/dist/cdn/V2PPBU7J.js +0 -2
  463. package/dist/cdn/VIMF6KPF.js +0 -2
  464. package/dist/cdn/VYSJFEY6.js +0 -2
  465. package/dist/cdn/WI7KEIGV.js +0 -2
  466. package/dist/cdn/WJXZ7BPV.js +0 -2
  467. package/dist/cdn/WOJJ53FN.js +0 -2
  468. package/dist/cdn/WSRLM2TQ.js +0 -2
  469. package/dist/cdn/XPXJW5E3.js +0 -2
  470. package/dist/cdn/XXVIE4SD.js +0 -2
  471. package/dist/cdn/YBZVV5BN.js +0 -2
  472. package/dist/cdn/Z3B276DZ.js +0 -2
  473. package/dist/cdn/ZDZGWD2Y.js +0 -2
  474. package/dist/cdn/ZIKLLQSU.js +0 -2
  475. package/dist/cdn/ZQLGBHLZ.js +0 -2
  476. package/dist/cdn/ZZ746O36.js +0 -2
  477. package/dist/chunks/form.js +0 -268
  478. package/dist/chunks/input.js +0 -40
  479. package/dist/controllers/useForm.d.ts +0 -3
  480. package/dist/utils/form.d.ts +0 -3
  481. package/dist/utils/sortableComponent.d.ts +0 -7
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
4
4
  import { css, html, nothing } from "lit";
5
5
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
6
6
  import { createRef, ref } from "lit/directives/ref.js";
7
- import { s as slotChangeHasAssignedElement, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
7
+ import { s as slotChangeHasAssignedElement, a as slotChangeGetAssignedElements, A as slotChangeHasTextContent, h as hasVisibleContent } from "../../chunks/dom.js";
8
8
  import { g as getIconScale } from "../../chunks/component.js";
9
9
  import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
10
10
  import { S as SLOTS$1 } from "../../chunks/resources2.js";
@@ -34,6 +34,8 @@ class Panel extends LitElement {
34
34
  this.hasFooterEndContent = false;
35
35
  this.hasFooterStartContent = false;
36
36
  this.hasHeaderContent = false;
37
+ this.hasHeaderDescription = false;
38
+ this.hasHeaderHeading = false;
37
39
  this.hasMenuItems = false;
38
40
  this.hasStartActions = false;
39
41
  this.showHeaderContent = false;
@@ -58,7 +60,7 @@ class Panel extends LitElement {
58
60
  this.listen("calcitePanelClose", this.panelCloseHandler);
59
61
  }
60
62
  static {
61
- this.properties = { hasActionBar: [16, {}, { state: true }], hasContentBottom: [16, {}, { state: true }], hasContentTop: [16, {}, { state: true }], hasEndActions: [16, {}, { state: true }], hasFab: [16, {}, { state: true }], hasFooterContent: [16, {}, { state: true }], hasFooterEndContent: [16, {}, { state: true }], hasFooterStartContent: [16, {}, { state: true }], hasHeaderContent: [16, {}, { state: true }], hasMenuItems: [16, {}, { state: true }], hasStartActions: [16, {}, { state: true }], showHeaderContent: [16, {}, { state: true }], beforeClose: [0, {}, { attribute: false }], closable: [7, {}, { reflect: true, type: Boolean }], closed: [7, {}, { reflect: true, type: Boolean }], collapseDirection: 1, collapsed: [7, {}, { reflect: true, type: Boolean }], collapsible: [7, {}, { reflect: true, type: Boolean }], description: 1, disabled: [7, {}, { reflect: true, type: Boolean }], heading: 1, headingLevel: [11, {}, { type: Number, reflect: true }], icon: [3, { type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], loading: [7, {}, { reflect: true, type: Boolean }], menuFlipPlacements: [0, {}, { attribute: false }], menuOpen: [7, {}, { reflect: true, type: Boolean }], menuPlacement: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
63
+ this.properties = { hasActionBar: [16, {}, { state: true }], hasContentBottom: [16, {}, { state: true }], hasContentTop: [16, {}, { state: true }], hasEndActions: [16, {}, { state: true }], hasFab: [16, {}, { state: true }], hasFooterContent: [16, {}, { state: true }], hasFooterEndContent: [16, {}, { state: true }], hasFooterStartContent: [16, {}, { state: true }], hasHeaderContent: [16, {}, { state: true }], hasHeaderDescription: [16, {}, { state: true }], hasHeaderHeading: [16, {}, { state: true }], hasMenuItems: [16, {}, { state: true }], hasStartActions: [16, {}, { state: true }], showHeaderContent: [16, {}, { state: true }], beforeClose: [0, {}, { attribute: false }], closable: [7, {}, { reflect: true, type: Boolean }], closed: [7, {}, { reflect: true, type: Boolean }], collapseDirection: 1, collapsed: [7, {}, { reflect: true, type: Boolean }], collapsible: [7, {}, { reflect: true, type: Boolean }], description: 1, disabled: [7, {}, { reflect: true, type: Boolean }], heading: 1, headingLevel: [11, {}, { type: Number, reflect: true }], icon: [3, { type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], loading: [7, {}, { reflect: true, type: Boolean }], menuFlipPlacements: [0, {}, { attribute: false }], menuOpen: [7, {}, { reflect: true, type: Boolean }], menuPlacement: [3, {}, { reflect: true }], messageOverrides: [0, {}, { attribute: false }], overlayPositioning: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }] };
62
64
  }
63
65
  static {
64
66
  this.styles = [styles$1, styles];
@@ -155,6 +157,12 @@ class Panel extends LitElement {
155
157
  handleHeaderContentSlotChange(event) {
156
158
  this.hasHeaderContent = slotChangeHasAssignedElement(event);
157
159
  }
160
+ handleHeaderDescriptionSlotChange(event) {
161
+ this.hasHeaderDescription = slotChangeHasTextContent(event) || slotChangeGetAssignedElements(event).some(hasVisibleContent);
162
+ }
163
+ handleHeaderHeadingSlotChange(event) {
164
+ this.hasHeaderHeading = slotChangeHasTextContent(event) || slotChangeGetAssignedElements(event).some(hasVisibleContent);
165
+ }
158
166
  handleFabSlotChange(event) {
159
167
  this.hasFab = slotChangeHasAssignedElement(event);
160
168
  }
@@ -185,11 +193,14 @@ class Panel extends LitElement {
185
193
  });
186
194
  }
187
195
  renderHeaderContent() {
188
- const { heading, headingLevel, description, hasHeaderContent, icon, scale } = this;
196
+ const { heading, headingLevel, description, hasHeaderContent, hasHeaderDescription, hasHeaderHeading, icon, scale } = this;
197
+ const showHeaderHeading = !!heading || hasHeaderHeading;
198
+ const showHeaderDescription = !!description || hasHeaderDescription;
199
+ const showHeaderTextContent = showHeaderHeading || showHeaderDescription;
189
200
  const iconNode = icon ? html`<calcite-icon class=${safeClassMap(CSS.icon)} .flipRtl=${this.iconFlipRtl} .icon=${icon} .scale=${getIconScale(scale)}></calcite-icon>` : null;
190
- const headingNode = heading ? Heading({ class: CSS.heading, level: headingLevel, children: heading }) : null;
191
- const descriptionNode = description ? html`<span class=${safeClassMap(CSS.description)}>${description}</span>` : null;
192
- return !hasHeaderContent && (headingNode || descriptionNode) ? keyed("header-content", html`<div class=${safeClassMap({ [CSS.headerContent]: true, [CSS.headerNonSlottedContent]: true })}>${iconNode}<div class=${safeClassMap(CSS.headingTextContent)}>${headingNode}${descriptionNode}</div></div>`) : null;
201
+ const headingNode = Heading({ class: CSS.heading, hidden: !showHeaderHeading, level: headingLevel, children: html`<slot .hidden=${!hasHeaderHeading} name=${SLOTS.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${!hasHeaderHeading ? heading : null}` });
202
+ const descriptionNode = html`<span class=${safeClassMap(CSS.description)} .hidden=${!showHeaderDescription}><slot .hidden=${!hasHeaderDescription} name=${SLOTS.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${!hasHeaderDescription ? description : null}</span>`;
203
+ return keyed("header-content", html`<div class=${safeClassMap({ [CSS.headerContent]: true, [CSS.headerNonSlottedContent]: true })} .hidden=${hasHeaderContent || !showHeaderTextContent}>${iconNode}<div class=${safeClassMap(CSS.headingTextContent)}>${headingNode}${descriptionNode}</div></div>`);
193
204
  }
194
205
  renderActionBar() {
195
206
  return html`<div class=${safeClassMap(CSS.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${SLOTS.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`;
@@ -219,9 +230,10 @@ class Panel extends LitElement {
219
230
  return keyed("menu", html`<calcite-action-menu .flipPlacements=${menuFlipPlacements ?? ["top", "bottom"]} .hidden=${!hasMenuItems} .label=${messages.options} .open=${menuOpen} .overlayPositioning=${this.overlayPositioning} .placement=${menuPlacement} .scale=${scale} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${safeClassMap(CSS.menuAction)} .icon=${ICONS.menu} .scale=${scale} slot=${SLOTS$1.trigger} .text=${messages.options}></calcite-action><slot name=${SLOTS.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`);
220
231
  }
221
232
  renderHeaderNode() {
222
- const { hasHeaderContent, hasStartActions, hasEndActions, closable, collapsible, hasMenuItems, hasActionBar, hasContentTop } = this;
233
+ const { hasHeaderContent, hasHeaderDescription, hasHeaderHeading, hasStartActions, hasEndActions, closable, collapsible, hasMenuItems, hasActionBar, hasContentTop, heading, description } = this;
223
234
  const headerContentNode = this.renderHeaderContent();
224
- const showHeaderContent = hasHeaderContent || !!headerContentNode || hasStartActions || hasEndActions || collapsible || closable || hasMenuItems || hasActionBar || hasContentTop;
235
+ const hasDefaultHeaderContent = !!heading || !!description || hasHeaderHeading || hasHeaderDescription;
236
+ const showHeaderContent = hasHeaderContent || hasDefaultHeaderContent || hasStartActions || hasEndActions || collapsible || closable || hasMenuItems || hasActionBar || hasContentTop;
225
237
  this.showHeaderContent = showHeaderContent;
226
238
  return html`<header class=${safeClassMap(CSS.header)} .hidden=${!(showHeaderContent || hasActionBar || hasContentTop)}><div class=${safeClassMap({ [CSS.headerContainer]: true, [CSS.headerContainerBorderEnd]: hasActionBar })} .hidden=${!showHeaderContent}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${headerContentNode}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`;
227
239
  }
@@ -122,7 +122,7 @@ export abstract class Popover extends LitElement {
122
122
  * Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
123
123
  *
124
124
  * @default false
125
- * @mdn [Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
125
+ * @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
126
126
  */
127
127
  accessor topLayerDisabled: boolean;
128
128
  /**
@@ -143,7 +143,7 @@ export abstract class Popover extends LitElement {
143
143
  * Sets focus on the component's first focusable element.
144
144
  *
145
145
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
146
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
146
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
147
147
  */
148
148
  setFocus(options?: FocusOptions): Promise<void>;
149
149
  /**
@@ -2,13 +2,10 @@
2
2
  import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { keyed } from "lit/directives/keyed.js";
4
4
  import { css, html } from "lit";
5
- import { LitElement, createEvent, safeClassMap, setAttribute } from "@arcgis/lumina";
5
+ import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
6
6
  import { createRef, ref } from "lit/directives/ref.js";
7
7
  import { useDirection } from "@arcgis/lumina/controllers";
8
- import { e as defaultOffsetDistance, r as reposition, a as disconnectFloatingUI, f as filterValidFlipPlacements, c as connectFloatingUI, h as hideFloatingUI, F as FloatingCSS } from "../../chunks/floating-ui.js";
9
- import { j as isPrimaryPointerButton, x as isKeyboardTriggeredClick, q as queryElementRoots } from "../../chunks/dom.js";
10
- import { t as toAriaBoolean } from "../../chunks/aria.js";
11
- import { g as guid } from "../../chunks/guid.js";
8
+ import { e as defaultOffsetDistance, r as reposition, c as connectFloatingUI, a as disconnectFloatingUI, f as filterValidFlipPlacements, h as hideFloatingUI, F as FloatingCSS } from "../../chunks/floating-ui.js";
12
9
  import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
13
10
  import { H as Heading } from "../../chunks/Heading.js";
14
11
  import { c as createObserver } from "../../chunks/observers.js";
@@ -17,100 +14,7 @@ import { u as useT9n } from "../../chunks/useT9n.js";
17
14
  import { u as useFocusTrap } from "../../chunks/useFocusTrap.js";
18
15
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
19
16
  import { u as useTopLayer } from "../../chunks/useTopLayer.js";
20
- import { i as isActivationKey } from "../../chunks/key.js";
21
- const clickTolerance = 5;
22
- function isDrag({
23
- startX,
24
- startY,
25
- endX,
26
- endY
27
- }) {
28
- const distance = Math.hypot(endX - startX, endY - startY);
29
- return distance > clickTolerance;
30
- }
31
- class PopoverManager {
32
- constructor() {
33
- this.registeredElements = /* @__PURE__ */ new Map();
34
- this.registeredElementCount = 0;
35
- this.queryPopover = (composedPath) => {
36
- const { registeredElements } = this;
37
- const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
38
- return registeredElements.get(registeredElement);
39
- };
40
- this.togglePopovers = (event) => {
41
- const composedPath = event.composedPath();
42
- const togglePopover = this.queryPopover(composedPath);
43
- if (togglePopover && !togglePopover.triggerDisabled) {
44
- togglePopover.open = !togglePopover.open;
45
- }
46
- Array.from(this.registeredElements.values()).filter(
47
- (popover) => popover !== togglePopover && popover.autoClose && popover.open && !composedPath.includes(popover)
48
- ).forEach((popover) => popover.open = false);
49
- };
50
- this.keyDownHandler = (event) => {
51
- if (event.defaultPrevented) {
52
- return;
53
- }
54
- if (event.key === "Escape") {
55
- this.closeAllPopovers();
56
- } else if (isActivationKey(event.key)) {
57
- this.togglePopovers(event);
58
- }
59
- };
60
- this.pointerDownHandler = (event) => {
61
- if (event.defaultPrevented || !isPrimaryPointerButton(event)) {
62
- return;
63
- }
64
- const { clientX, clientY } = event;
65
- this.pointerDownPosition = { x: clientX, y: clientY };
66
- };
67
- this.clickHandler = (event) => {
68
- if (isKeyboardTriggeredClick(event) || event.defaultPrevented || this.pointerDownPosition && isDrag({
69
- endY: event.clientY,
70
- endX: event.clientX,
71
- startY: this.pointerDownPosition.y,
72
- startX: this.pointerDownPosition.x
73
- })) {
74
- return;
75
- }
76
- this.pointerDownPosition = void 0;
77
- this.togglePopovers(event);
78
- };
79
- }
80
- // --------------------------------------------------------------------------
81
- //
82
- // Public Methods
83
- //
84
- // --------------------------------------------------------------------------
85
- registerElement(referenceEl, popover) {
86
- this.registeredElementCount++;
87
- this.registeredElements.set(referenceEl, popover);
88
- if (this.registeredElementCount === 1) {
89
- this.addListeners();
90
- }
91
- }
92
- unregisterElement(referenceEl) {
93
- if (this.registeredElements.delete(referenceEl)) {
94
- this.registeredElementCount--;
95
- }
96
- if (this.registeredElementCount === 0) {
97
- this.removeListeners();
98
- }
99
- }
100
- closeAllPopovers() {
101
- Array.from(this.registeredElements.values()).forEach((popover) => popover.open = false);
102
- }
103
- addListeners() {
104
- window.addEventListener("pointerdown", this.pointerDownHandler);
105
- window.addEventListener("click", this.clickHandler);
106
- window.addEventListener("keydown", this.keyDownHandler);
107
- }
108
- removeListeners() {
109
- window.removeEventListener("pointerdown", this.pointerDownHandler);
110
- window.removeEventListener("click", this.clickHandler);
111
- window.removeEventListener("keydown", this.keyDownHandler);
112
- }
113
- }
17
+ import { u as useReferenceElement, r as referenceElementManager } from "../../chunks/manager.js";
114
18
  const CSS = {
115
19
  positionContainer: "position-container",
116
20
  container: "container",
@@ -123,13 +27,13 @@ const CSS = {
123
27
  heading: "heading"
124
28
  };
125
29
  const defaultPopoverPlacement = "auto";
126
- const ARIA_CONTROLS = "aria-controls";
127
- const ARIA_EXPANDED = "aria-expanded";
128
30
  const styles = css`:host{display:contents}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-popup)}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-popover-max-size-x, 100vw)}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding:.5rem .75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host(:is([scale=s],[scale=m])){--calcite-internal-popover-close-spacing: var(--calcite-spacing-xs)}:host([scale=m]) .heading{padding:.75rem 1rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-internal-popover-close-spacing: var(--calcite-spacing-sm)}:host([scale=l]) .heading{padding:1rem 1.25rem;font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-popover-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-popover-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;border-block-end-color:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.heading{margin:0;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container{position:relative;display:flex;height:100%;flex-direction:row;flex-wrap:nowrap;border-radius:.25rem;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container.has-header{flex-direction:column}.content{display:flex;height:100%;width:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button{margin:auto;margin-inline-end:var(--calcite-internal-popover-close-spacing)}.close-button-container{display:flex;flex:0 0 auto}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}:host([hidden]){display:none}[hidden]{display:none}`;
129
- const manager = new PopoverManager();
31
+ const manager = referenceElementManager({ click: true });
130
32
  class Popover extends LitElement {
131
33
  constructor() {
132
34
  super(...arguments);
35
+ this.referenceElementType = "click";
36
+ this.referenceElementController = useReferenceElement({ manager })(this);
133
37
  this.direction = useDirection();
134
38
  this.focusTrap = useFocusTrap({
135
39
  triggerProp: "open",
@@ -144,8 +48,6 @@ class Popover extends LitElement {
144
48
  }
145
49
  }
146
50
  })(this);
147
- this.guid = `calcite-popover-${guid()}`;
148
- this.hasLoaded = false;
149
51
  this.mutationObserver = createObserver("mutation", () => this.focusTrap.updateContainerElements());
150
52
  this.transitionProp = "opacity";
151
53
  this.transitionRef = createRef();
@@ -207,7 +109,6 @@ class Popover extends LitElement {
207
109
  super.connectedCallback();
208
110
  this.mutationObserver?.observe(this.el, { childList: true, subtree: true });
209
111
  this.setFilteredPlacements();
210
- requestAnimationFrame(() => this.setUpReferenceElement(this.hasLoaded));
211
112
  }
212
113
  willUpdate(changes) {
213
114
  if (changes.has("flipPlacements")) {
@@ -219,23 +120,18 @@ class Popover extends LitElement {
219
120
  if (changes.has("offsetDistance") && (this.hasUpdated || this.offsetDistance !== defaultOffsetDistance) || changes.has("offsetSkidding") && (this.hasUpdated || this.offsetSkidding !== 0) || changes.has("overlayPositioning") && (this.hasUpdated || this.overlayPositioning !== "absolute") || changes.has("placement") && (this.hasUpdated || this.placement !== defaultPopoverPlacement)) {
220
121
  this.reposition(true);
221
122
  }
222
- if (changes.has("referenceElement")) {
223
- this.referenceElementHandler();
224
- if (!this.referenceElement && this.open) {
225
- this.topLayer.hide();
226
- }
123
+ if (changes.has("referenceElement") && !this.referenceElement && this.open) {
124
+ this.topLayer.hide();
227
125
  }
228
126
  }
229
- loaded() {
230
- if (this.referenceElement && !this.referenceEl) {
231
- this.setUpReferenceElement();
127
+ updated(changes) {
128
+ if (changes.has("referenceEl")) {
129
+ connectFloatingUI(this);
232
130
  }
233
- this.hasLoaded = true;
234
131
  }
235
132
  disconnectedCallback() {
236
133
  super.disconnectedCallback();
237
134
  this.mutationObserver?.disconnect();
238
- this.removeReferences();
239
135
  disconnectFloatingUI(this);
240
136
  }
241
137
  flipPlacementsHandler() {
@@ -245,73 +141,14 @@ class Popover extends LitElement {
245
141
  openHandler() {
246
142
  toggleOpenClose(this);
247
143
  this.reposition(true);
248
- this.setExpandedAttr();
249
- }
250
- referenceElementHandler() {
251
- this.setUpReferenceElement();
252
- this.reposition(true);
253
144
  }
254
145
  setFloatingEl(el) {
255
146
  this.floatingEl = el;
256
- if (el) {
257
- requestAnimationFrame(() => this.setUpReferenceElement());
258
- }
259
147
  }
260
148
  setFilteredPlacements() {
261
149
  const { el, flipPlacements } = this;
262
150
  this.filteredFlipPlacements = flipPlacements ? filterValidFlipPlacements(flipPlacements, el) : null;
263
151
  }
264
- setUpReferenceElement(warn = true) {
265
- this.removeReferences();
266
- this.referenceEl = this.getReferenceElement();
267
- connectFloatingUI(this);
268
- const { el, referenceElement, referenceEl } = this;
269
- if (warn && referenceElement && !referenceEl) {
270
- console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
271
- el
272
- });
273
- }
274
- this.addReferences();
275
- }
276
- getId() {
277
- return this.el.id || this.guid;
278
- }
279
- setExpandedAttr() {
280
- const { referenceEl, open } = this;
281
- if (!referenceEl) {
282
- return;
283
- }
284
- if ("setAttribute" in referenceEl) {
285
- referenceEl.setAttribute(ARIA_EXPANDED, toAriaBoolean(open));
286
- }
287
- }
288
- addReferences() {
289
- const { referenceEl } = this;
290
- if (!referenceEl) {
291
- return;
292
- }
293
- const id = this.getId();
294
- if ("setAttribute" in referenceEl) {
295
- referenceEl.setAttribute(ARIA_CONTROLS, id);
296
- }
297
- manager.registerElement(referenceEl, this.el);
298
- this.setExpandedAttr();
299
- }
300
- removeReferences() {
301
- const { referenceEl } = this;
302
- if (!referenceEl) {
303
- return;
304
- }
305
- if ("removeAttribute" in referenceEl) {
306
- referenceEl.removeAttribute(ARIA_CONTROLS);
307
- referenceEl.removeAttribute(ARIA_EXPANDED);
308
- }
309
- manager.unregisterElement(referenceEl);
310
- }
311
- getReferenceElement() {
312
- const { referenceElement, el } = this;
313
- return (typeof referenceElement === "string" ? queryElementRoots(el, { id: referenceElement }) : referenceElement) || null;
314
- }
315
152
  hide() {
316
153
  this.open = false;
317
154
  }
@@ -353,7 +190,6 @@ class Popover extends LitElement {
353
190
  this.el.inert = hidden;
354
191
  this.el.ariaLabel = label;
355
192
  this.el.ariaLive = "polite";
356
- setAttribute(this.el, "id", this.getId());
357
193
  this.el.role = "dialog";
358
194
  return html`<div class=${safeClassMap(CSS.positionContainer)} popover=manual ${ref(this.setFloatingEl)}><div class=${safeClassMap({
359
195
  [CSS.container]: true,
@@ -44,6 +44,13 @@ export abstract class RadioButton extends LitElement {
44
44
  * @default "m"
45
45
  */
46
46
  accessor scale: Scale;
47
+ /**
48
+ * The component's current validation state.
49
+ *
50
+ * @internal
51
+ * @mdn [ValidityState](https://developer.mozilla.org/en-US/docs/Web/API/ValidityState)
52
+ */
53
+ get validity(): ValidityState;
47
54
  /**
48
55
  * The component's value.
49
56
  *
@@ -54,9 +61,17 @@ export abstract class RadioButton extends LitElement {
54
61
  * Sets focus on the component.
55
62
  *
56
63
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
57
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
64
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
58
65
  */
59
66
  setFocus(options?: FocusOptions): Promise<void>;
67
+ /**
68
+ * Sets the component's validity state.
69
+ *
70
+ * @param validity
71
+ * @param validationMessage
72
+ * @internal
73
+ */
74
+ setValidity(validity: ValidityStateFlags, validationMessage?: string): Promise<void>;
60
75
  /**
61
76
  * Fires only when the radio button is checked. This behavior is identical to the native HTML input element.
62
77
  * Since this event does not fire when the radio button is unchecked, it's not recommended to attach a listener for this event
@@ -5,11 +5,11 @@ 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"
@@ -20,6 +20,7 @@ class RadioButton extends LitElement {
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;
@@ -38,7 +39,10 @@ class RadioButton extends LitElement {
38
39
  this.listen("keydown", this.handleKeyDown);
39
40
  }
40
41
  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 };
42
+ 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 }], validity: [32, {}, { readOnly: true, attribute: false }], value: 1 };
43
+ }
44
+ static {
45
+ this.formAssociated = true;
42
46
  }
43
47
  static {
44
48
  this.styles = styles;
@@ -49,13 +53,15 @@ class RadioButton extends LitElement {
49
53
  async setFocus(options) {
50
54
  return this.focusSetter(() => this.containerRef.value, options);
51
55
  }
56
+ async setValidity(validity, validationMessage = "") {
57
+ this.elementInternals.setValidity(validity, validationMessage);
58
+ }
52
59
  connectedCallback() {
53
60
  this.rootNode = this.el.getRootNode();
54
61
  if (this.name) {
55
62
  this.checkLastRadioButton();
56
63
  }
57
64
  connectLabel(this);
58
- connectForm(this);
59
65
  this.updateTabIndexOfOtherRadioButtonsInGroup();
60
66
  super.connectedCallback();
61
67
  }
@@ -78,7 +84,6 @@ class RadioButton extends LitElement {
78
84
  disconnectedCallback() {
79
85
  super.disconnectedCallback();
80
86
  disconnectLabel(this);
81
- disconnectForm(this);
82
87
  this.updateTabIndexOfOtherRadioButtonsInGroup();
83
88
  }
84
89
  checkedChanged(newChecked) {
@@ -87,9 +92,6 @@ class RadioButton extends LitElement {
87
92
  }
88
93
  this.calciteInternalRadioButtonCheckedChange.emit();
89
94
  }
90
- syncHiddenFormInput(input) {
91
- input.type = "radio";
92
- }
93
95
  selectItem(items, selectedIndex) {
94
96
  items[selectedIndex].click();
95
97
  }
@@ -111,7 +113,6 @@ class RadioButton extends LitElement {
111
113
  if (this.checked) {
112
114
  return;
113
115
  }
114
- this.uncheckAllRadioButtonsInGroup();
115
116
  this.checked = true;
116
117
  this.calciteRadioButtonChange.emit();
117
118
  }
@@ -150,15 +151,6 @@ class RadioButton extends LitElement {
150
151
  });
151
152
  }
152
153
  }
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
154
  uncheckOtherRadioButtonsInGroup() {
163
155
  const radioButtons = this.queryButtons();
164
156
  const otherRadioButtons = radioButtons.filter((radioButton) => radioButton !== this.el);
@@ -258,7 +250,7 @@ class RadioButton extends LitElement {
258
250
  }
259
251
  render() {
260
252
  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 })}` });
253
+ 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
254
  }
263
255
  }
264
256
  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. */
@@ -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. */