@esri/calcite-components 5.1.0-next.4 → 5.1.0-next.41

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 (483) hide show
  1. package/dist/cdn/{CAAZHUX4.js → 24MYDDCX.js} +1 -1
  2. package/dist/cdn/2CMEG656.js +2 -0
  3. package/dist/cdn/{SYSNPKVM.js → 2ERRVHOG.js} +1 -1
  4. package/dist/cdn/{5WKPS2ZT.js → 2FA462GH.js} +1 -1
  5. package/dist/cdn/2HNLUEFE.js +2 -0
  6. package/dist/cdn/{3W4NT367.js → 2S7YK3XB.js} +1 -1
  7. package/dist/cdn/2ZVRANSV.js +2 -0
  8. package/dist/cdn/3JPPSAVC.js +2 -0
  9. package/dist/cdn/{5TWM6GKK.js → 3PMEQAA4.js} +1 -1
  10. package/dist/cdn/3Z3BLSQV.js +2 -0
  11. package/dist/cdn/45PPV4KB.js +2 -0
  12. package/dist/cdn/{HRUVPNCI.js → 4BN3NFQE.js} +1 -1
  13. package/dist/cdn/{X7JEHH2B.js → 4EQVX3RN.js} +1 -1
  14. package/dist/cdn/4JQR5BFT.js +2 -0
  15. package/dist/cdn/{EW6277QZ.js → 4LF7JOWB.js} +1 -1
  16. package/dist/cdn/4R2OUXIA.js +2 -0
  17. package/dist/cdn/4RK74RAX.js +2 -0
  18. package/dist/cdn/{F7XISEIT.js → 4Y2EOU6I.js} +1 -1
  19. package/dist/cdn/{RRHN2PDB.js → 564OQMMG.js} +1 -1
  20. package/dist/cdn/{WR6QBFCR.js → 5DNRIF2T.js} +1 -1
  21. package/dist/cdn/5LFL3RZM.js +2 -0
  22. package/dist/cdn/{RROGXGP5.js → 5W3NUC35.js} +1 -1
  23. package/dist/cdn/{AYPT6VGV.js → 5XXHCJWT.js} +1 -1
  24. package/dist/cdn/{UTFS3HNB.js → 5YJHDAMC.js} +1 -1
  25. package/dist/cdn/{FAHLSHDH.js → 6ALR2RKE.js} +1 -1
  26. package/dist/cdn/{HXS3PD57.js → 6FYE5EO4.js} +1 -1
  27. package/dist/cdn/{DFXECQ6Z.js → 6HUNPYIU.js} +1 -1
  28. package/dist/cdn/6IXX24B5.js +2 -0
  29. package/dist/cdn/6OIJRLWE.js +2 -0
  30. package/dist/cdn/6OJ75BQL.js +2 -0
  31. package/dist/cdn/6W5UQMJB.js +2 -0
  32. package/dist/cdn/6WINJYQB.js +2 -0
  33. package/dist/cdn/{XDOFVA4S.js → 7FDVLRYA.js} +1 -1
  34. package/dist/cdn/{R6D5F2V7.js → 7MRRY2FG.js} +1 -1
  35. package/dist/cdn/7ZM7AHRH.js +2 -0
  36. package/dist/cdn/A3EVLDK2.js +2 -0
  37. package/dist/cdn/ABWDY3S3.js +2 -0
  38. package/dist/cdn/{GM6FZWSL.js → AGJOJXT7.js} +1 -1
  39. package/dist/cdn/AGT4E2MR.js +2 -0
  40. package/dist/cdn/AKNE222R.js +2 -0
  41. package/dist/cdn/AMBU24RT.js +2 -0
  42. package/dist/cdn/B5HEG3NU.js +2 -0
  43. package/dist/cdn/B6IJE67V.js +2 -0
  44. package/dist/cdn/{7DA7BZM3.js → B74NISG7.js} +1 -1
  45. package/dist/cdn/C3ZMZ6DZ.js +2 -0
  46. package/dist/cdn/CKN7KBBX.js +2 -0
  47. package/dist/cdn/{LGKOEBZ4.js → CQTKLBEA.js} +1 -1
  48. package/dist/cdn/CUEFJU5M.js +2 -0
  49. package/dist/cdn/CX6NYW6U.js +2 -0
  50. package/dist/cdn/DAN2REQH.js +2 -0
  51. package/dist/cdn/{EHIAXJAL.js → DCWL5FUH.js} +1 -1
  52. package/dist/cdn/DM4TDFHC.js +2 -0
  53. package/dist/cdn/DNCPJ3MF.js +2 -0
  54. package/dist/cdn/DQX5RKEG.js +2 -0
  55. package/dist/cdn/DREDLWCT.js +2 -0
  56. package/dist/cdn/{MTNYIXZQ.js → DSZEUV6U.js} +1 -1
  57. package/dist/cdn/DVT6XGRX.js +2 -0
  58. package/dist/cdn/{VLGFWPBL.js → E4G4YBUV.js} +1 -1
  59. package/dist/cdn/EDZNJS2P.js +2 -0
  60. package/dist/cdn/{XLGGANFA.js → EYQJAUTS.js} +1 -1
  61. package/dist/cdn/F2OT6ZS7.js +2 -0
  62. package/dist/cdn/FNUCXO5T.js +2 -0
  63. package/dist/cdn/FO5KZ2B4.js +2 -0
  64. package/dist/cdn/{TCAGY7OI.js → FUAQVSMM.js} +1 -1
  65. package/dist/cdn/FUUTIPHY.js +2 -0
  66. package/dist/cdn/FVJPSUND.js +2 -0
  67. package/dist/cdn/{A4OYPK5D.js → FWIH6QX6.js} +1 -1
  68. package/dist/cdn/FXPBVOSU.js +2 -0
  69. package/dist/cdn/G2N5QQQC.js +2 -0
  70. package/dist/cdn/{Z22BRBT4.js → GA7UTPCH.js} +1 -1
  71. package/dist/cdn/GEWK7CNC.js +2 -0
  72. package/dist/cdn/{QOSBMGOZ.js → GF6UHDWG.js} +1 -1
  73. package/dist/cdn/{TLAXB6HU.js → GPB37IZK.js} +1 -1
  74. package/dist/cdn/GRAXNZVF.js +2 -0
  75. package/dist/cdn/{KKH2HVQW.js → I2C2U4EG.js} +1 -1
  76. package/dist/cdn/{CZYFEVKF.js → II5Q35BQ.js} +1 -1
  77. package/dist/cdn/J75WMG5K.js +2 -0
  78. package/dist/cdn/JGCSNM6I.js +2 -0
  79. package/dist/cdn/{BWUA5WU5.js → JIPOSCDQ.js} +1 -1
  80. package/dist/cdn/{MXRMT4RB.js → JMESEQBV.js} +1 -1
  81. package/dist/cdn/{HCJDTU7F.js → JQ2SIN67.js} +1 -1
  82. package/dist/cdn/{AMZPSRIA.js → JQWPSLVQ.js} +1 -1
  83. package/dist/cdn/{OVU2NGHU.js → JTIOKO5Z.js} +1 -1
  84. package/dist/cdn/K2J5VOGN.js +2 -0
  85. package/dist/cdn/K3TXMTAA.js +2 -0
  86. package/dist/cdn/KGN7LNPW.js +2 -0
  87. package/dist/cdn/{IFHMJCAE.js → KKCLSEGI.js} +1 -1
  88. package/dist/cdn/KT5ZBHYJ.js +2 -0
  89. package/dist/cdn/KZ26ANWU.js +2 -0
  90. package/dist/cdn/LQJ57QQT.js +2 -0
  91. package/dist/cdn/M2AV52WE.js +2 -0
  92. package/dist/cdn/M3F5QBVV.js +2 -0
  93. package/dist/cdn/MDIOA3TB.js +2 -0
  94. package/dist/cdn/MHY3UNM6.js +4 -0
  95. package/dist/cdn/MWRUONCP.js +2 -0
  96. package/dist/cdn/{3GV45XL7.js → MYDCGCGV.js} +1 -1
  97. package/dist/cdn/N7RECCIH.js +2 -0
  98. package/dist/cdn/{ED2GANBI.js → NBJNGORU.js} +1 -1
  99. package/dist/cdn/{ZZNRLKQQ.js → NPL2RAJH.js} +1 -1
  100. package/dist/cdn/{6IZMIAV2.js → NT3HJBBX.js} +1 -1
  101. package/dist/cdn/OW7J4OUX.js +2 -0
  102. package/dist/cdn/PQFBEGNW.js +2 -0
  103. package/dist/cdn/{LIJYENWJ.js → PS3RNTX7.js} +1 -1
  104. package/dist/cdn/{4MFRMO5M.js → Q43RHQO7.js} +1 -1
  105. package/dist/cdn/{ZIOXZBYF.js → QA5WKG2V.js} +1 -1
  106. package/dist/cdn/{YQY6DOSF.js → QB4POCYZ.js} +1 -1
  107. package/dist/cdn/{QKUQGG2M.js → QH3YRMT7.js} +1 -1
  108. package/dist/cdn/QKTDNEVV.js +2 -0
  109. package/dist/cdn/R6ION3EX.js +2 -0
  110. package/dist/cdn/{A22XLAKZ.js → RBNGWGBY.js} +3 -3
  111. package/dist/cdn/{IMOAPVVW.js → RGLX6ZUD.js} +1 -1
  112. package/dist/cdn/RLDG7JKF.js +2 -0
  113. package/dist/cdn/{HYYJZO6T.js → RUV4NSFE.js} +1 -1
  114. package/dist/cdn/RVXWIAKA.js +2 -0
  115. package/dist/cdn/S6W6A66Z.js +2 -0
  116. package/dist/cdn/{Z3IVC2AV.js → S7XRYSLC.js} +1 -1
  117. package/dist/cdn/{7TEW7OYZ.js → SOV3TN4E.js} +1 -1
  118. package/dist/cdn/{XYAZINKS.js → T5FTXYCC.js} +1 -1
  119. package/dist/cdn/T5OE6UXW.js +2 -0
  120. package/dist/cdn/T5QTQYSJ.js +2 -0
  121. package/dist/cdn/{GZNBU3BV.js → TDPJ5IO7.js} +1 -1
  122. package/dist/cdn/{5HQ3O27G.js → TIOSPWRC.js} +1 -1
  123. package/dist/cdn/{KVSU3DLB.js → TRGMORRC.js} +1 -1
  124. package/dist/cdn/TWAQRNOV.js +2 -0
  125. package/dist/cdn/U4RNEEDS.js +2 -0
  126. package/dist/cdn/U66XQE3L.js +2 -0
  127. package/dist/cdn/UWTFVQZZ.js +2 -0
  128. package/dist/cdn/V2V4HEZE.js +2 -0
  129. package/dist/cdn/{IOSK2I75.js → V3MIT2UF.js} +1 -1
  130. package/dist/cdn/{RA4KNUNM.js → V7U5TUOP.js} +1 -1
  131. package/dist/cdn/{7B4D4WJ2.js → VFQ6FGYV.js} +1 -1
  132. package/dist/cdn/{LHJSBAM5.js → VG74OPNP.js} +1 -1
  133. package/dist/cdn/VIV5RTB5.js +2 -0
  134. package/dist/cdn/VJUAN25O.js +2 -0
  135. package/dist/cdn/{CDTY6WOM.js → VS7QNWXR.js} +1 -1
  136. package/dist/cdn/WLMV5NME.js +2 -0
  137. package/dist/cdn/{GJE7FY35.js → XDZU4ZCM.js} +1 -1
  138. package/dist/cdn/{HXVXRVZW.js → XL6HVXTT.js} +1 -1
  139. package/dist/cdn/{5YROPSGB.js → XQ2A5CAB.js} +1 -1
  140. package/dist/cdn/XWE4Y4LH.js +2 -0
  141. package/dist/cdn/Y73IXKXQ.js +2 -0
  142. package/dist/cdn/YK2YMJCK.js +2 -0
  143. package/dist/cdn/YZZ2SHC2.js +2 -0
  144. package/dist/cdn/{QBLAE2O5.js → Z3PR5L6P.js} +1 -1
  145. package/dist/cdn/{MJCRT7H4.js → ZDXIPCCV.js} +1 -1
  146. package/dist/cdn/assets/combobox/t9n/messages.ar.json +1 -1
  147. package/dist/cdn/assets/combobox/t9n/messages.bg.json +1 -1
  148. package/dist/cdn/assets/combobox/t9n/messages.bs.json +1 -1
  149. package/dist/cdn/assets/combobox/t9n/messages.ca.json +1 -1
  150. package/dist/cdn/assets/combobox/t9n/messages.cs.json +1 -1
  151. package/dist/cdn/assets/combobox/t9n/messages.da.json +1 -1
  152. package/dist/cdn/assets/combobox/t9n/messages.de.json +1 -1
  153. package/dist/cdn/assets/combobox/t9n/messages.el.json +1 -1
  154. package/dist/cdn/assets/combobox/t9n/messages.en.json +1 -1
  155. package/dist/cdn/assets/combobox/t9n/messages.es.json +1 -1
  156. package/dist/cdn/assets/combobox/t9n/messages.et.json +1 -1
  157. package/dist/cdn/assets/combobox/t9n/messages.fi.json +1 -1
  158. package/dist/cdn/assets/combobox/t9n/messages.fr.json +1 -1
  159. package/dist/cdn/assets/combobox/t9n/messages.he.json +1 -1
  160. package/dist/cdn/assets/combobox/t9n/messages.hr.json +1 -1
  161. package/dist/cdn/assets/combobox/t9n/messages.hu.json +1 -1
  162. package/dist/cdn/assets/combobox/t9n/messages.id.json +1 -1
  163. package/dist/cdn/assets/combobox/t9n/messages.it.json +1 -1
  164. package/dist/cdn/assets/combobox/t9n/messages.ja.json +1 -1
  165. package/dist/cdn/assets/combobox/t9n/messages.json +1 -1
  166. package/dist/cdn/assets/combobox/t9n/messages.ko.json +1 -1
  167. package/dist/cdn/assets/combobox/t9n/messages.lt.json +1 -1
  168. package/dist/cdn/assets/combobox/t9n/messages.lv.json +1 -1
  169. package/dist/cdn/assets/combobox/t9n/messages.nl.json +1 -1
  170. package/dist/cdn/assets/combobox/t9n/messages.no.json +1 -1
  171. package/dist/cdn/assets/combobox/t9n/messages.pl.json +1 -1
  172. package/dist/cdn/assets/combobox/t9n/messages.pt-BR.json +1 -1
  173. package/dist/cdn/assets/combobox/t9n/messages.pt-PT.json +1 -1
  174. package/dist/cdn/assets/combobox/t9n/messages.ro.json +1 -1
  175. package/dist/cdn/assets/combobox/t9n/messages.ru.json +1 -1
  176. package/dist/cdn/assets/combobox/t9n/messages.sk.json +1 -1
  177. package/dist/cdn/assets/combobox/t9n/messages.sl.json +1 -1
  178. package/dist/cdn/assets/combobox/t9n/messages.sr.json +1 -1
  179. package/dist/cdn/assets/combobox/t9n/messages.sv.json +1 -1
  180. package/dist/cdn/assets/combobox/t9n/messages.th.json +1 -1
  181. package/dist/cdn/assets/combobox/t9n/messages.tr.json +1 -1
  182. package/dist/cdn/assets/combobox/t9n/messages.uk.json +1 -1
  183. package/dist/cdn/assets/combobox/t9n/messages.vi.json +1 -1
  184. package/dist/cdn/assets/combobox/t9n/messages.zh-CN.json +1 -1
  185. package/dist/cdn/assets/combobox/t9n/messages.zh-HK.json +1 -1
  186. package/dist/cdn/assets/combobox/t9n/messages.zh-TW.json +1 -1
  187. package/dist/cdn/assets/icon/arcgisQuickcapture16.json +1 -0
  188. package/dist/cdn/assets/icon/arcgisQuickcapture24.json +1 -0
  189. package/dist/cdn/assets/icon/arcgisQuickcapture32.json +1 -0
  190. package/dist/cdn/assets/icon/arcgisSurvey12316.json +1 -0
  191. package/dist/cdn/assets/icon/arcgisSurvey12324.json +1 -0
  192. package/dist/cdn/assets/icon/arcgisSurvey12332.json +1 -0
  193. package/dist/cdn/assets/icon/gpsReceiver16.json +1 -0
  194. package/dist/cdn/assets/icon/gpsReceiver24.json +1 -0
  195. package/dist/cdn/assets/icon/gpsReceiver32.json +1 -0
  196. package/dist/cdn/assets/icon/layerStreamSetting16.json +1 -0
  197. package/dist/cdn/assets/icon/layerStreamSetting24.json +1 -0
  198. package/dist/cdn/assets/icon/layerStreamSetting32.json +1 -0
  199. package/dist/cdn/assets/icon/publish16.json +1 -0
  200. package/dist/cdn/assets/icon/publish24.json +1 -0
  201. package/dist/cdn/assets/icon/publish32.json +1 -0
  202. package/dist/cdn/assets/icon/totalStation16.json +1 -0
  203. package/dist/cdn/assets/icon/totalStation24.json +1 -0
  204. package/dist/cdn/assets/icon/totalStation32.json +1 -0
  205. package/dist/cdn/assets/icon/velocityServer16.json +1 -0
  206. package/dist/cdn/assets/icon/velocityServer24.json +1 -0
  207. package/dist/cdn/assets/icon/velocityServer32.json +1 -0
  208. package/dist/cdn/index.js +2 -2
  209. package/dist/cdn/main.css +1 -1
  210. package/dist/chunks/ClearButton.js +16 -0
  211. package/dist/chunks/ExpandToggle.js +4 -5
  212. package/dist/chunks/Heading.js +3 -3
  213. package/dist/chunks/dom.js +63 -49
  214. package/dist/chunks/floating-ui.js +3 -6
  215. package/dist/chunks/label.js +1 -1
  216. package/dist/chunks/locale.js +29 -12
  217. package/dist/chunks/manager.js +505 -0
  218. package/dist/chunks/openCloseComponent.js +1 -1
  219. package/dist/chunks/resources5.js +2 -1
  220. package/dist/chunks/resources6.js +2 -0
  221. package/dist/chunks/runtime.js +4 -4
  222. package/dist/chunks/useFocusTrap.js +22 -1
  223. package/dist/chunks/useForm.js +294 -0
  224. package/dist/chunks/useFormTrigger.js +25 -0
  225. package/dist/chunks/useSetFocus.js +1 -1
  226. package/dist/chunks/{sortableComponent.js → useSortable.js} +70 -44
  227. package/dist/chunks/utils2.js +1 -1
  228. package/dist/components/calcite-accordion-item/customElement.d.ts +6 -6
  229. package/dist/components/calcite-accordion-item/customElement.js +4 -3
  230. package/dist/components/calcite-action/customElement.d.ts +14 -12
  231. package/dist/components/calcite-action/customElement.js +8 -14
  232. package/dist/components/calcite-action-bar/customElement.d.ts +12 -3
  233. package/dist/components/calcite-action-bar/customElement.js +43 -15
  234. package/dist/components/calcite-action-group/customElement.d.ts +6 -6
  235. package/dist/components/calcite-action-menu/customElement.d.ts +2 -2
  236. package/dist/components/calcite-action-pad/customElement.d.ts +3 -3
  237. package/dist/components/calcite-action-pad/customElement.js +5 -3
  238. package/dist/components/calcite-alert/customElement.d.ts +2 -2
  239. package/dist/components/calcite-alert/customElement.js +2 -2
  240. package/dist/components/calcite-autocomplete/customElement.d.ts +16 -13
  241. package/dist/components/calcite-autocomplete/customElement.js +23 -32
  242. package/dist/components/calcite-autocomplete-item/customElement.d.ts +6 -0
  243. package/dist/components/calcite-autocomplete-item/customElement.js +9 -4
  244. package/dist/components/calcite-avatar/customElement.js +1 -1
  245. package/dist/components/calcite-block/customElement.d.ts +5 -5
  246. package/dist/components/calcite-block/customElement.js +2 -2
  247. package/dist/components/calcite-block-group/customElement.d.ts +1 -1
  248. package/dist/components/calcite-block-group/customElement.js +5 -12
  249. package/dist/components/calcite-block-group/interfaces.d.ts +2 -6
  250. package/dist/components/calcite-block-section/customElement.d.ts +1 -1
  251. package/dist/components/calcite-button/customElement.d.ts +6 -6
  252. package/dist/components/calcite-button/customElement.js +11 -23
  253. package/dist/components/calcite-card/customElement.d.ts +4 -4
  254. package/dist/components/calcite-card/customElement.js +5 -3
  255. package/dist/components/calcite-card-group/customElement.d.ts +9 -3
  256. package/dist/components/calcite-card-group/customElement.js +11 -1
  257. package/dist/components/calcite-carousel/customElement.d.ts +1 -1
  258. package/dist/components/calcite-carousel/customElement.js +27 -25
  259. package/dist/components/calcite-checkbox/customElement.d.ts +4 -5
  260. package/dist/components/calcite-checkbox/customElement.js +10 -23
  261. package/dist/components/calcite-chip/customElement.d.ts +2 -2
  262. package/dist/components/calcite-chip/customElement.js +2 -2
  263. package/dist/components/calcite-chip-group/customElement.d.ts +1 -1
  264. package/dist/components/calcite-chip-group/customElement.js +1 -1
  265. package/dist/components/calcite-color-picker/customElement.d.ts +2 -2
  266. package/dist/components/calcite-color-picker/customElement.js +4 -2
  267. package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
  268. package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
  269. package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
  270. package/dist/components/calcite-combobox/customElement.d.ts +16 -6
  271. package/dist/components/calcite-combobox/customElement.js +189 -106
  272. package/dist/components/calcite-combobox/index.js +2 -1
  273. package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
  274. package/dist/components/calcite-combobox-item/customElement.js +10 -4
  275. package/dist/components/calcite-date-picker/customElement.d.ts +1 -1
  276. package/dist/components/calcite-date-picker-day/customElement.d.ts +1 -1
  277. package/dist/components/calcite-date-picker-month/customElement.js +1 -1
  278. package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
  279. package/dist/components/calcite-dialog/customElement.d.ts +8 -6
  280. package/dist/components/calcite-dialog/customElement.js +5 -3
  281. package/dist/components/calcite-dropdown/customElement.d.ts +15 -5
  282. package/dist/components/calcite-dropdown/customElement.js +168 -90
  283. package/dist/components/calcite-dropdown-item/customElement.d.ts +2 -2
  284. package/dist/components/calcite-dropdown-item/customElement.js +14 -32
  285. package/dist/components/calcite-fab/customElement.d.ts +1 -1
  286. package/dist/components/calcite-filter/customElement.d.ts +1 -1
  287. package/dist/components/calcite-flow/customElement.d.ts +1 -1
  288. package/dist/components/calcite-flow-item/customElement.d.ts +9 -7
  289. package/dist/components/calcite-flow-item/customElement.js +6 -4
  290. package/dist/components/calcite-handle/customElement.d.ts +1 -1
  291. package/dist/components/calcite-icon/customElement.d.ts +1 -1
  292. package/dist/components/calcite-icon/customElement.js +4 -3
  293. package/dist/components/calcite-inline-editable/customElement.d.ts +1 -1
  294. package/dist/components/calcite-inline-editable/customElement.js +1 -1
  295. package/dist/components/calcite-input/customElement.d.ts +17 -18
  296. package/dist/components/calcite-input/customElement.js +30 -52
  297. package/dist/components/calcite-input/index.js +1 -0
  298. package/dist/components/calcite-input-date-picker/customElement.d.ts +6 -7
  299. package/dist/components/calcite-input-date-picker/customElement.js +34 -28
  300. package/dist/components/calcite-input-message/customElement.d.ts +1 -1
  301. package/dist/components/calcite-input-message/customElement.js +1 -1
  302. package/dist/components/calcite-input-number/customElement.d.ts +13 -14
  303. package/dist/components/calcite-input-number/customElement.js +26 -51
  304. package/dist/components/calcite-input-number/index.js +1 -0
  305. package/dist/components/calcite-input-text/customElement.d.ts +11 -12
  306. package/dist/components/calcite-input-text/customElement.js +20 -44
  307. package/dist/components/calcite-input-text/index.js +1 -0
  308. package/dist/components/calcite-input-time-picker/customElement.d.ts +6 -7
  309. package/dist/components/calcite-input-time-picker/customElement.js +14 -25
  310. package/dist/components/calcite-input-time-zone/customElement.d.ts +5 -6
  311. package/dist/components/calcite-input-time-zone/customElement.js +21 -19
  312. package/dist/components/calcite-link/customElement.d.ts +9 -9
  313. package/dist/components/calcite-link/customElement.js +31 -25
  314. package/dist/components/calcite-list/customElement.d.ts +1 -1
  315. package/dist/components/calcite-list/customElement.js +30 -11
  316. package/dist/components/calcite-list/interfaces.d.ts +2 -6
  317. package/dist/components/calcite-list-item/customElement.d.ts +2 -2
  318. package/dist/components/calcite-list-item/customElement.js +6 -4
  319. package/dist/components/calcite-list-item-group/customElement.js +1 -1
  320. package/dist/components/calcite-loader/customElement.d.ts +1 -1
  321. package/dist/components/calcite-menu/customElement.d.ts +1 -1
  322. package/dist/components/calcite-menu/customElement.js +2 -2
  323. package/dist/components/calcite-menu-item/customElement.d.ts +3 -3
  324. package/dist/components/calcite-menu-item/customElement.js +4 -2
  325. package/dist/components/calcite-meter/customElement.d.ts +7 -1
  326. package/dist/components/calcite-meter/customElement.js +4 -8
  327. package/dist/components/calcite-navigation/customElement.d.ts +2 -2
  328. package/dist/components/calcite-navigation-logo/customElement.d.ts +3 -3
  329. package/dist/components/calcite-navigation-user/customElement.d.ts +1 -1
  330. package/dist/components/calcite-notice/customElement.d.ts +3 -3
  331. package/dist/components/calcite-notice/customElement.js +2 -2
  332. package/dist/components/calcite-pagination/customElement.d.ts +1 -1
  333. package/dist/components/calcite-pagination/customElement.js +1 -1
  334. package/dist/components/calcite-panel/customElement.d.ts +11 -9
  335. package/dist/components/calcite-panel/customElement.js +20 -8
  336. package/dist/components/calcite-popover/customElement.d.ts +2 -2
  337. package/dist/components/calcite-popover/customElement.js +14 -175
  338. package/dist/components/calcite-progress/customElement.js +3 -2
  339. package/dist/components/calcite-radio-button/customElement.d.ts +1 -1
  340. package/dist/components/calcite-radio-button/customElement.js +173 -5
  341. package/dist/components/calcite-radio-button-group/customElement.d.ts +1 -1
  342. package/dist/components/calcite-rating/customElement.d.ts +3 -4
  343. package/dist/components/calcite-rating/customElement.js +12 -18
  344. package/dist/components/calcite-scrim/customElement.js +1 -1
  345. package/dist/components/calcite-segmented-control/customElement.d.ts +3 -4
  346. package/dist/components/calcite-segmented-control/customElement.js +13 -22
  347. package/dist/components/calcite-segmented-control-item/customElement.js +2 -2
  348. package/dist/components/calcite-select/customElement.d.ts +3 -4
  349. package/dist/components/calcite-select/customElement.js +8 -19
  350. package/dist/components/calcite-sheet/customElement.d.ts +2 -2
  351. package/dist/components/calcite-sheet/customElement.js +10 -11
  352. package/dist/components/calcite-shell/customElement.js +1 -1
  353. package/dist/components/calcite-shell-panel/customElement.d.ts +2 -2
  354. package/dist/components/calcite-shell-panel/customElement.js +11 -5
  355. package/dist/components/calcite-slider/customElement.d.ts +3 -4
  356. package/dist/components/calcite-slider/customElement.js +12 -22
  357. package/dist/components/calcite-sort-handle/customElement.d.ts +4 -4
  358. package/dist/components/calcite-sort-handle/customElement.js +44 -17
  359. package/dist/components/calcite-sortable-list/customElement.d.ts +1 -1
  360. package/dist/components/calcite-sortable-list/customElement.js +4 -4
  361. package/dist/components/calcite-split-button/customElement.d.ts +8 -8
  362. package/dist/components/calcite-stepper/customElement.d.ts +2 -2
  363. package/dist/components/calcite-stepper/customElement.js +30 -43
  364. package/dist/components/calcite-stepper-item/customElement.d.ts +1 -1
  365. package/dist/components/calcite-stepper-item/customElement.js +3 -9
  366. package/dist/components/calcite-swatch/customElement.d.ts +1 -1
  367. package/dist/components/calcite-swatch-group/customElement.js +1 -1
  368. package/dist/components/calcite-switch/customElement.d.ts +4 -4
  369. package/dist/components/calcite-switch/customElement.js +9 -8
  370. package/dist/components/calcite-tab/customElement.d.ts +1 -1
  371. package/dist/components/calcite-tab/customElement.js +2 -2
  372. package/dist/components/calcite-tab-nav/customElement.js +4 -2
  373. package/dist/components/calcite-tab-title/customElement.js +6 -4
  374. package/dist/components/calcite-table/customElement.js +1 -1
  375. package/dist/components/calcite-table-cell/customElement.d.ts +2 -2
  376. package/dist/components/calcite-table-cell/customElement.js +3 -2
  377. package/dist/components/calcite-table-header/customElement.d.ts +2 -2
  378. package/dist/components/calcite-table-row/customElement.d.ts +1 -1
  379. package/dist/components/calcite-tabs/customElement.js +1 -1
  380. package/dist/components/calcite-text-area/customElement.d.ts +13 -14
  381. package/dist/components/calcite-text-area/customElement.js +32 -37
  382. package/dist/components/calcite-tile/customElement.d.ts +1 -1
  383. package/dist/components/calcite-time-picker/customElement.d.ts +1 -1
  384. package/dist/components/calcite-time-picker/customElement.js +5 -4
  385. package/dist/components/calcite-tooltip/customElement.d.ts +15 -2
  386. package/dist/components/calcite-tooltip/customElement.js +27 -315
  387. package/dist/components/calcite-tree/customElement.js +1 -1
  388. package/dist/components/calcite-tree-item/customElement.js +5 -4
  389. package/dist/controllers/useSortable.d.ts +7 -0
  390. package/dist/docs/api.json +1 -1
  391. package/dist/docs/docs.json +1 -1
  392. package/dist/docs/supported-browsers.json +1 -1
  393. package/dist/docs/translations.json +1 -1
  394. package/dist/docs/vscode.css-custom-data.json +1 -1
  395. package/dist/docs/vscode.html-custom-data.json +1 -1
  396. package/dist/docs/web-types.json +1 -1
  397. package/dist/loader.js +25 -25
  398. package/dist/types/lumina.d.ts +6 -6
  399. package/dist/types/preact.d.ts +6 -6
  400. package/dist/types/react.d.ts +6 -6
  401. package/dist/types/stencil.d.ts +6 -6
  402. package/package.json +14 -13
  403. package/dist/cdn/256EMMKX.js +0 -2
  404. package/dist/cdn/2ZJ5ADD2.js +0 -2
  405. package/dist/cdn/37APBABQ.js +0 -2
  406. package/dist/cdn/3OIE2RR5.js +0 -2
  407. package/dist/cdn/3TCEXRVB.js +0 -2
  408. package/dist/cdn/43T3HPVW.js +0 -2
  409. package/dist/cdn/4ET37OQN.js +0 -2
  410. package/dist/cdn/4SJVPWEI.js +0 -2
  411. package/dist/cdn/6NGWODBG.js +0 -2
  412. package/dist/cdn/7CLOFSLV.js +0 -2
  413. package/dist/cdn/7CZHE7FZ.js +0 -2
  414. package/dist/cdn/7KCC74EE.js +0 -2
  415. package/dist/cdn/7WPF3NTF.js +0 -2
  416. package/dist/cdn/CPDXUV3S.js +0 -2
  417. package/dist/cdn/EIFNZZAD.js +0 -2
  418. package/dist/cdn/F7SGO63N.js +0 -2
  419. package/dist/cdn/FAOX7WLQ.js +0 -2
  420. package/dist/cdn/FCNCDBSI.js +0 -2
  421. package/dist/cdn/FDGUUC3D.js +0 -2
  422. package/dist/cdn/FRI4RPRX.js +0 -2
  423. package/dist/cdn/G6R56WT6.js +0 -2
  424. package/dist/cdn/GAUJK4Z7.js +0 -2
  425. package/dist/cdn/GDTRICJF.js +0 -2
  426. package/dist/cdn/GFZYTB3O.js +0 -2
  427. package/dist/cdn/GW7IPUQS.js +0 -2
  428. package/dist/cdn/HBVQ77SB.js +0 -2
  429. package/dist/cdn/HD23H6LX.js +0 -2
  430. package/dist/cdn/HVBNJRAQ.js +0 -2
  431. package/dist/cdn/I6CQ5UW5.js +0 -2
  432. package/dist/cdn/ILES2J66.js +0 -2
  433. package/dist/cdn/IR6Z2XSF.js +0 -2
  434. package/dist/cdn/IUAHSZQ6.js +0 -2
  435. package/dist/cdn/JKLX623E.js +0 -2
  436. package/dist/cdn/JLB2FYLL.js +0 -2
  437. package/dist/cdn/JRCEHRYP.js +0 -2
  438. package/dist/cdn/KNDQJ2XX.js +0 -2
  439. package/dist/cdn/L6F7C3O7.js +0 -2
  440. package/dist/cdn/LIZ5IMMJ.js +0 -2
  441. package/dist/cdn/LR57FDVO.js +0 -2
  442. package/dist/cdn/LRL6N22U.js +0 -2
  443. package/dist/cdn/LYKD5N65.js +0 -2
  444. package/dist/cdn/MASQZEFU.js +0 -2
  445. package/dist/cdn/MAXAPKJ5.js +0 -2
  446. package/dist/cdn/MQPFYNQR.js +0 -2
  447. package/dist/cdn/MUGKSK5F.js +0 -2
  448. package/dist/cdn/N6QRZM7N.js +0 -2
  449. package/dist/cdn/NQEVKT6K.js +0 -2
  450. package/dist/cdn/OS7NHPEF.js +0 -2
  451. package/dist/cdn/P7RXOG72.js +0 -2
  452. package/dist/cdn/P7U46JDU.js +0 -2
  453. package/dist/cdn/PBMFDSRI.js +0 -2
  454. package/dist/cdn/PS64W4X6.js +0 -2
  455. package/dist/cdn/Q52SIZ3L.js +0 -2
  456. package/dist/cdn/Q7WYXKFZ.js +0 -2
  457. package/dist/cdn/R3EE76WN.js +0 -2
  458. package/dist/cdn/R6YSSNOG.js +0 -2
  459. package/dist/cdn/RSCA2AM5.js +0 -2
  460. package/dist/cdn/S22OVJTO.js +0 -3
  461. package/dist/cdn/SBPWZDAB.js +0 -2
  462. package/dist/cdn/SFEXJ2YW.js +0 -2
  463. package/dist/cdn/SXVCUXNL.js +0 -2
  464. package/dist/cdn/TPXLAPIE.js +0 -2
  465. package/dist/cdn/TSZAQNPK.js +0 -2
  466. package/dist/cdn/U6LKEFFT.js +0 -2
  467. package/dist/cdn/UAADJQTQ.js +0 -2
  468. package/dist/cdn/ULBA6IRN.js +0 -2
  469. package/dist/cdn/UOIMVKXE.js +0 -2
  470. package/dist/cdn/V4KATS7H.js +0 -2
  471. package/dist/cdn/WAC3IAWB.js +0 -2
  472. package/dist/cdn/WJXZ7BPV.js +0 -2
  473. package/dist/cdn/XSSG2WBN.js +0 -2
  474. package/dist/cdn/YHGC7HRA.js +0 -2
  475. package/dist/cdn/YOYLPMEA.js +0 -2
  476. package/dist/cdn/YUJ33VWR.js +0 -2
  477. package/dist/cdn/Z53AVC5H.js +0 -2
  478. package/dist/cdn/ZQLGBHLZ.js +0 -2
  479. package/dist/cdn/ZXUITROT.js +0 -2
  480. package/dist/chunks/form.js +0 -268
  481. package/dist/chunks/input.js +0 -30
  482. package/dist/utils/form.d.ts +0 -3
  483. package/dist/utils/sortableComponent.d.ts +0 -7
@@ -0,0 +1,294 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import { makeGenericController, bypassReadOnly } from "@arcgis/lumina/controllers";
3
+ import { uncapitalize, kebabToPascal } from "@arcgis/toolkit/string";
4
+ import { r as isCalciteFocusable } from "./dom.js";
5
+ import "lit";
6
+ const minMaxStepTypes = ["date", "datetime-local", "month", "number", "range", "time", "week"];
7
+ const patternTypes = ["email", "password", "search", "tel", "text", "url"];
8
+ const minMaxLengthTypes = ["email", "password", "search", "tel", "text", "textarea", "url"];
9
+ function updateConstraintValidation(inputComponent, input, propName, matchesType) {
10
+ const attributeName = propName.toLowerCase();
11
+ const value = inputComponent[propName];
12
+ if (matchesType && value != null) {
13
+ input.setAttribute(attributeName, `${value}`);
14
+ } else {
15
+ input.removeAttribute(attributeName);
16
+ }
17
+ }
18
+ function syncInputDelegate(type, inputComponent, input) {
19
+ input.type = type;
20
+ const isMinMaxStepType = minMaxStepTypes.includes(type);
21
+ const numericInputComponent = inputComponent;
22
+ updateConstraintValidation(numericInputComponent, input, "min", isMinMaxStepType);
23
+ updateConstraintValidation(numericInputComponent, input, "max", isMinMaxStepType);
24
+ updateConstraintValidation(numericInputComponent, input, "step", isMinMaxStepType);
25
+ const isMinMaxLengthType = minMaxLengthTypes.includes(type);
26
+ const textualInputComponent = inputComponent;
27
+ updateConstraintValidation(textualInputComponent, input, "minLength", isMinMaxLengthType);
28
+ updateConstraintValidation(textualInputComponent, input, "maxLength", isMinMaxLengthType);
29
+ const isPatternType = patternTypes.includes(type);
30
+ updateConstraintValidation(textualInputComponent, input, "pattern", isPatternType);
31
+ }
32
+ function isSupportedType(type) {
33
+ const effectiveType = type === "textarea" ? "text" : type;
34
+ return minMaxStepTypes.includes(effectiveType) || patternTypes.includes(effectiveType) || minMaxLengthTypes.includes(effectiveType);
35
+ }
36
+ const joinableValueTypes = ["text", "email", "search", "hidden", "tel", "url"];
37
+ const allValid = Object.freeze({ validity: {}, validationMessage: "" });
38
+ function validate(input, value) {
39
+ if (!Array.isArray(value)) {
40
+ if (validateValue(input, value)) {
41
+ return allValid;
42
+ }
43
+ return {
44
+ validity: getValidityFlags(input.validity),
45
+ validationMessage: input.validationMessage
46
+ };
47
+ }
48
+ if (joinableValueTypes.includes(input.type)) {
49
+ if (validateValue(input, value.join(","))) {
50
+ return allValid;
51
+ }
52
+ return {
53
+ validity: getValidityFlags(input.validity),
54
+ validationMessage: input.validationMessage
55
+ };
56
+ }
57
+ const mergedValidity = {};
58
+ const validationMessages = [];
59
+ for (const item of value) {
60
+ if (validateValue(input, item)) {
61
+ continue;
62
+ }
63
+ Object.assign(mergedValidity, getValidityFlags(input.validity));
64
+ if (input.validationMessage) {
65
+ validationMessages.push(input.validationMessage);
66
+ }
67
+ }
68
+ return {
69
+ validity: mergedValidity,
70
+ validationMessage: validationMessages.join("; ")
71
+ };
72
+ }
73
+ function validateValue(inputDelegate, valueToValidate) {
74
+ inputDelegate.value = // file will throw if non-empty string is provided
75
+ inputDelegate.type === "file" || valueToValidate == null ? "" : String(valueToValidate);
76
+ return inputDelegate.validity.valid;
77
+ }
78
+ function getValidityFlags(validityState) {
79
+ const validityFlags = {};
80
+ for (const key in validityState) {
81
+ if (key !== "valid" && validityState[key]) {
82
+ validityFlags[key] = true;
83
+ }
84
+ }
85
+ return validityFlags;
86
+ }
87
+ const componentsWithInputEvent = [
88
+ "calcite-input",
89
+ "calcite-input-number",
90
+ "calcite-input-text",
91
+ "calcite-text-area"
92
+ ];
93
+ function getClearValidationEventName(componentTag) {
94
+ const componentTagCamelCase = uncapitalize(kebabToPascal(componentTag));
95
+ return `${componentTagCamelCase}${componentsWithInputEvent.includes(componentTag) ? "Input" : "Change"}`;
96
+ }
97
+ function isFormComponentEl(el) {
98
+ return "form" in el && "name" in el && isCalciteFocusable(el);
99
+ }
100
+ function displayValidationMessage(component, { status, message, icon }) {
101
+ if ("status" in component) {
102
+ component.status = status;
103
+ }
104
+ if ("validationIcon" in component && typeof component.validationIcon !== "string") {
105
+ component.validationIcon = icon;
106
+ }
107
+ if ("validationMessage" in component && !component.validationMessage) {
108
+ component.validationMessage = message;
109
+ }
110
+ }
111
+ function syncInternalInput(component, input) {
112
+ const { disabled, required } = component;
113
+ input.disabled = disabled;
114
+ input.required = !!required;
115
+ if (isCheckable(component)) {
116
+ input.checked = component.checked;
117
+ } else if (isInputComponent(component, input)) {
118
+ syncInputDelegate(input.type, component, input);
119
+ }
120
+ }
121
+ function isCheckable(component) {
122
+ return "checked" in component;
123
+ }
124
+ function isInputComponent(component, input) {
125
+ return component && isSupportedType(input.type);
126
+ }
127
+ function focusFirstInvalidFormElement(form) {
128
+ const formElements = Array.from(form.elements);
129
+ requestAnimationFrame(() => {
130
+ const invalidEls = formElements.filter(
131
+ (el) => el.matches("[status=invalid]") && isFormComponentEl(el)
132
+ );
133
+ for (const el of invalidEls) {
134
+ if (el.validationMessage) {
135
+ el.setFocus();
136
+ break;
137
+ }
138
+ }
139
+ });
140
+ }
141
+ const useForm = (options) => {
142
+ return makeGenericController((component, controller) => {
143
+ let customValidityMessage = "";
144
+ let inputDelegate;
145
+ let lastAssociatedForm = null;
146
+ let effectiveInputType = options.inputType;
147
+ if (effectiveInputType) {
148
+ inputDelegate = document.createElement("input");
149
+ }
150
+ function invalidFormHandler(event) {
151
+ if (event.defaultPrevented) {
152
+ return;
153
+ }
154
+ event.preventDefault();
155
+ const form = event.currentTarget;
156
+ focusFirstInvalidFormElement(form);
157
+ }
158
+ function onFormReset() {
159
+ if ("status" in component) {
160
+ component.status = "idle";
161
+ }
162
+ if ("validationIcon" in component) {
163
+ component.validationIcon = false;
164
+ }
165
+ if ("validationMessage" in component) {
166
+ component.validationMessage = "";
167
+ }
168
+ if (isCheckable(component)) {
169
+ component.checked = component.defaultChecked;
170
+ }
171
+ component.value = component.defaultValue;
172
+ }
173
+ component.listen("luminaFormResetCallback", () => {
174
+ onFormReset();
175
+ });
176
+ component.listen("luminaFormAssociatedCallback", ({ detail: [form] }) => {
177
+ if (form) {
178
+ form.addEventListener("invalid", invalidFormHandler, { capture: true });
179
+ } else {
180
+ lastAssociatedForm?.removeEventListener("invalid", invalidFormHandler, { capture: true });
181
+ }
182
+ lastAssociatedForm = form;
183
+ });
184
+ function handleInvalidInput() {
185
+ const validationMsg = customValidityMessage || inputDelegate?.validationMessage || "";
186
+ component.el.dispatchEvent(
187
+ // allows users to set custom validation messages
188
+ new CustomEvent("calciteInvalid", { bubbles: true, composed: true })
189
+ );
190
+ displayValidationMessage(component, {
191
+ message: validationMsg,
192
+ icon: true,
193
+ status: "invalid"
194
+ });
195
+ const clearValidationEvent = getClearValidationEventName(component.el.tagName.toLowerCase());
196
+ component.listen(
197
+ clearValidationEvent,
198
+ () => {
199
+ if ("status" in component) {
200
+ component.status = "idle";
201
+ }
202
+ if ("validationIcon" in component && (!component.validationIcon || component.validationIcon === true)) {
203
+ component.validationIcon = false;
204
+ }
205
+ if ("validationMessage" in component && component.validationMessage === validationMsg) {
206
+ component.validationMessage = "";
207
+ }
208
+ },
209
+ { once: true }
210
+ );
211
+ }
212
+ controller.onConnected(() => {
213
+ component.el.addEventListener("invalid", handleInvalidInput);
214
+ });
215
+ controller.onDisconnected(() => {
216
+ component.el.removeEventListener("invalid", handleInvalidInput);
217
+ });
218
+ controller.onUpdate((changes) => {
219
+ if (!component.hasUpdated) {
220
+ component.defaultValue = component.value;
221
+ if (isCheckable(component)) {
222
+ component.defaultChecked = component.checked;
223
+ }
224
+ }
225
+ if (changes.has("name") || changes.has("value") || isCheckable(component) && changes.has("checked")) {
226
+ component.elementInternals.setFormValue(getFormValue());
227
+ }
228
+ updateValidity();
229
+ });
230
+ function updateValidity() {
231
+ const { elementInternals } = component;
232
+ let validity = {};
233
+ let validationMessage = "";
234
+ if (inputDelegate) {
235
+ inputDelegate.type = effectiveInputType;
236
+ syncInternalInput(component, inputDelegate);
237
+ ({ validity, validationMessage } = validate(inputDelegate, getComponentValue()));
238
+ }
239
+ if (customValidityMessage) {
240
+ validity = { ...validity, customError: true };
241
+ validationMessage = customValidityMessage;
242
+ }
243
+ elementInternals.setValidity(validity, validationMessage);
244
+ if ("validity" in component) {
245
+ bypassReadOnly(() => {
246
+ component.validity = elementInternals.validity;
247
+ });
248
+ }
249
+ }
250
+ function getComponentValue() {
251
+ if (options.getValue) {
252
+ return options.getValue();
253
+ }
254
+ return component.value;
255
+ }
256
+ function getFormValue() {
257
+ const value = getComponentValue();
258
+ if (Array.isArray(value)) {
259
+ const formData = new FormData();
260
+ value.forEach((value2) => formData.append(component.name, value2));
261
+ return formData;
262
+ }
263
+ if (isCheckable(component)) {
264
+ if (component.checked) {
265
+ return value || "on";
266
+ }
267
+ return null;
268
+ }
269
+ return value;
270
+ }
271
+ return {
272
+ get active() {
273
+ return !!component.elementInternals.form;
274
+ },
275
+ overrideDefaultValue: (value) => {
276
+ component.defaultValue = value;
277
+ },
278
+ overrideInputType: (type) => {
279
+ effectiveInputType = type;
280
+ updateValidity();
281
+ },
282
+ requestSubmit: () => {
283
+ component.elementInternals.form?.requestSubmit();
284
+ },
285
+ setCustomValidity: (message) => {
286
+ customValidityMessage = message;
287
+ updateValidity();
288
+ }
289
+ };
290
+ });
291
+ };
292
+ export {
293
+ useForm as u
294
+ };
@@ -0,0 +1,25 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import { makeGenericController } from "@arcgis/lumina/controllers";
3
+ const useFormTrigger = (options) => makeGenericController((component) => {
4
+ function clickHandler(event) {
5
+ const { form } = component.elementInternals;
6
+ if (event.defaultPrevented || component.disabled || options?.disabled?.() || !form || component.type === "button") {
7
+ return;
8
+ }
9
+ if (component.type === "submit") {
10
+ form.requestSubmit();
11
+ return;
12
+ }
13
+ form.reset();
14
+ }
15
+ component.listen("luminaFormAssociatedCallback", ({ detail: [form] }) => {
16
+ if (form) {
17
+ component.el.addEventListener("click", clickHandler);
18
+ } else {
19
+ component.el.removeEventListener("click", clickHandler);
20
+ }
21
+ });
22
+ });
23
+ export {
24
+ useFormTrigger as u
25
+ };
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { makeGenericController } from "@arcgis/lumina/controllers";
3
3
  import { c as componentFocusable } from "./component.js";
4
- import { h as getRootNode, j as focusElement } from "./dom.js";
4
+ import { e as getRootNode, i as focusElement } from "./dom.js";
5
5
  const useSetFocus = () => {
6
6
  return makeGenericController((component, controller) => {
7
7
  let abortController;
@@ -1,4 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import { makeGenericController } from "@arcgis/lumina/controllers";
2
3
  import Sortable from "sortablejs";
3
4
  const sortableComponentSet = /* @__PURE__ */ new Set();
4
5
  const CSS = {
@@ -7,15 +8,17 @@ const CSS = {
7
8
  dragClass: "calcite-sortable--drag",
8
9
  fallbackClass: "calcite-sortable--fallback"
9
10
  };
10
- function connectSortableComponent(component) {
11
- if (dragActive(component)) {
12
- return;
13
- }
14
- disconnectSortableComponent(component);
15
- sortableComponentSet.add(component);
11
+ function onGlobalDragStart() {
12
+ Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragStart());
13
+ }
14
+ function onGlobalDragEnd() {
15
+ Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragEnd());
16
+ }
17
+ const globalDragState = { active: false };
18
+ function createSortable(component) {
16
19
  const dataIdAttr = "id";
17
- const { group, handleSelector: handle, dragSelector: draggable, sortDisabled } = component;
18
- component.sortable = Sortable.create(component.el, {
20
+ const { el, group, handleSelector: handle, dragSelector: draggable, sortDisabled } = component;
21
+ return Sortable.create(el, {
19
22
  dataIdAttr,
20
23
  swapThreshold: 0.5,
21
24
  ...CSS,
@@ -25,22 +28,26 @@ function connectSortableComponent(component) {
25
28
  group: {
26
29
  name: group,
27
30
  ...!!component.canPull && {
28
- pull: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => component.canPull({
29
- toEl: to.el,
30
- fromEl: from.el,
31
- dragEl,
32
- newIndex,
33
- oldIndex
34
- })
31
+ pull: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
32
+ return component.canPull({
33
+ toEl: to.el,
34
+ fromEl: from.el,
35
+ dragEl,
36
+ newIndex,
37
+ oldIndex
38
+ });
39
+ }
35
40
  },
36
41
  ...!!component.canPut && {
37
- put: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => component.canPut({
38
- toEl: to.el,
39
- fromEl: from.el,
40
- dragEl,
41
- newIndex,
42
- oldIndex
43
- })
42
+ put: (to, from, dragEl, { newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
43
+ return component.canPut({
44
+ toEl: to.el,
45
+ fromEl: from.el,
46
+ dragEl,
47
+ newIndex,
48
+ oldIndex
49
+ });
50
+ }
44
51
  }
45
52
  }
46
53
  },
@@ -53,12 +60,12 @@ function connectSortableComponent(component) {
53
60
  handle,
54
61
  filter: `${handle}[disabled]`,
55
62
  onStart: ({ from: fromEl, item: dragEl, to: toEl, newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
56
- dragState.active = true;
63
+ globalDragState.active = true;
57
64
  onGlobalDragStart();
58
65
  component.onDragStart({ fromEl, dragEl, toEl, newIndex, oldIndex });
59
66
  },
60
67
  onEnd: ({ from: fromEl, item: dragEl, to: toEl, newDraggableIndex: newIndex, oldDraggableIndex: oldIndex }) => {
61
- dragState.active = false;
68
+ globalDragState.active = false;
62
69
  onGlobalDragEnd();
63
70
  component.onDragEnd({ fromEl, dragEl, toEl, newIndex, oldIndex });
64
71
  },
@@ -67,25 +74,44 @@ function connectSortableComponent(component) {
67
74
  }
68
75
  });
69
76
  }
70
- function disconnectSortableComponent(component) {
71
- if (dragActive(component)) {
72
- return;
73
- }
74
- sortableComponentSet.delete(component);
75
- component.sortable?.destroy();
76
- component.sortable = null;
77
- }
78
- const dragState = { active: false };
79
- function dragActive(component) {
80
- return component.dragEnabled && dragState.active;
81
- }
82
- function onGlobalDragStart() {
83
- Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragStart());
84
- }
85
- function onGlobalDragEnd() {
86
- Array.from(sortableComponentSet).forEach((component) => component.onGlobalDragEnd());
87
- }
77
+ const useSortable = () => {
78
+ return makeGenericController((component, controller) => {
79
+ let sortable;
80
+ function dragActive(component2) {
81
+ return component2.dragEnabled && globalDragState.active;
82
+ }
83
+ function setUpSortable(component2) {
84
+ if (dragActive(component2)) {
85
+ return;
86
+ }
87
+ tearDownSortable(component2);
88
+ if (!component2.dragEnabled) {
89
+ return;
90
+ }
91
+ sortableComponentSet.add(component2);
92
+ sortable = createSortable(component2);
93
+ }
94
+ function tearDownSortable(component2) {
95
+ if (dragActive(component2)) {
96
+ return;
97
+ }
98
+ sortableComponentSet.delete(component2);
99
+ sortable?.destroy();
100
+ sortable = void 0;
101
+ }
102
+ controller.onConnected(() => {
103
+ setUpSortable(component);
104
+ });
105
+ controller.onDisconnected(() => {
106
+ tearDownSortable(component);
107
+ });
108
+ return {
109
+ reset: () => {
110
+ setUpSortable(component);
111
+ }
112
+ };
113
+ });
114
+ };
88
115
  export {
89
- connectSortableComponent as c,
90
- disconnectSortableComponent as d
116
+ useSortable as u
91
117
  };
@@ -1,6 +1,6 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { isServer } from "lit";
3
- import { o as nodeListToArray } from "./dom.js";
3
+ import { n as nodeListToArray } from "./dom.js";
4
4
  import { A as AllComboboxChildrenSelector, a as ComboboxItemSelector, b as ComboboxItemGroupSelector } from "./resources5.js";
5
5
  function getAncestors(element) {
6
6
  const parent = element.parentElement?.closest(AllComboboxChildrenSelector);
@@ -10,8 +10,8 @@ import type { HeadingLevel } from "../functional/Heading.js";
10
10
  * @cssproperty [--calcite-accordion-text-color] - Specifies the component's text color.
11
11
  * @cssproperty [--calcite-accordion-text-color-hover] - Specifies the component's main text color on hover.
12
12
  * @cssproperty [--calcite-accordion-text-color-press] - Specifies the component's main text color when pressed.
13
- * @cssproperty [--calcite-accordion-item-background-color] - [Deprecated] Use `--calcite-accordion-background-color`. Specifies the component's background color.
14
- * @cssproperty [--calcite-accordion-item-border-color] - [Deprecated] Use `--calcite-accordion-border-color`. Specifies the component's border color.
13
+ * @cssproperty [--calcite-accordion-item-background-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-background-color` instead. Specifies the component's background color.
14
+ * @cssproperty [--calcite-accordion-item-border-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-border-color` instead. Specifies the component's border color.
15
15
  * @cssproperty [--calcite-accordion-item-content-space] - Specifies the component's padding.
16
16
  * @cssproperty [--calcite-accordion-item-end-icon-color] - Specifies the component's `iconEnd` color. Falls back to `--calcite-accordion-item-icon-color` or current color.
17
17
  * @cssproperty [--calcite-accordion-item-expand-icon-color] - Specifies the component's expand icon color.
@@ -19,10 +19,10 @@ import type { HeadingLevel } from "../functional/Heading.js";
19
19
  * @cssproperty [--calcite-accordion-item-header-background-color-hover] - Specifies the component's `heading` background color when hovered.
20
20
  * @cssproperty [--calcite-accordion-item-header-background-color-press] - Specifies the component's `heading` background color when pressed.
21
21
  * @cssproperty [--calcite-accordion-item-heading-text-color] - Specifies the component's `heading` text color.
22
- * @cssproperty [--calcite-accordion-item-icon-color] - [Deprecated] Use `--calcite-icon-color`. Specifies the component's default icon color.
22
+ * @cssproperty [--calcite-accordion-item-icon-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-icon-color` instead. Specifies the component's default icon color.
23
23
  * @cssproperty [--calcite-accordion-item-start-icon-color] - Specifies the component's `iconStart` color. Falls back to `--calcite-accordion-item-icon-color` or current color.
24
- * @cssproperty [--calcite-accordion-item-text-color] - [Deprecated] Use `--calcite-accordion-text-color`. Specifies the component's text color.
25
- * @cssproperty [--calcite-accordion-item-text-color-hover] - [Deprecated] Use `--calcite-accordion-text-color-hover`. Specifies the component's text color on hover.
24
+ * @cssproperty [--calcite-accordion-item-text-color] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-text-color` instead. Specifies the component's text color.
25
+ * @cssproperty [--calcite-accordion-item-text-color-hover] - [Deprecated] in v3.1.0, removal target v6.0.0 - Use `--calcite-accordion-text-color-hover` instead. Specifies the component's text color on hover.
26
26
  * @slot - A slot for adding custom content, including nested `calcite-accordion-item`s.
27
27
  * @slot [actions-end] - A slot for adding `calcite-action`s or content to the end side of the component's header.
28
28
  * @slot [actions-start] - A slot for adding `calcite-action`s or content to the start side of the component's header.
@@ -57,7 +57,7 @@ export abstract class AccordionItem extends LitElement {
57
57
  * Sets focus on the component.
58
58
  *
59
59
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
60
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
60
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
61
61
  */
62
62
  setFocus(options?: FocusOptions): Promise<void>;
63
63
  /** Fires when the component's content area is collapsed. */
@@ -3,8 +3,9 @@ import { C as CSS_UTILITY, c as customElement } from "../../chunks/runtime.js";
3
3
  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
+ import { useDirection } from "@arcgis/lumina/controllers";
6
7
  import { createRef, ref } from "lit/directives/ref.js";
7
- import { c as closestElementCrossShadowBoundary, s as slotChangeHasAssignedElement, g as getElementDir } from "../../chunks/dom.js";
8
+ import { c as closestElementCrossShadowBoundary, s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
8
9
  import { g as getIconScale } from "../../chunks/component.js";
9
10
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
10
11
  import { u as useT9n } from "../../chunks/useT9n.js";
@@ -51,6 +52,7 @@ const styles = css`.icon-position--end,.icon-position--start{--calcite-internal-
51
52
  class AccordionItem extends LitElement {
52
53
  constructor() {
53
54
  super();
55
+ this.direction = useDirection();
54
56
  this.headerRef = createRef();
55
57
  this.focusSetter = useSetFocus()(this);
56
58
  this.messages = useT9n();
@@ -173,7 +175,6 @@ class AccordionItem extends LitElement {
173
175
  }
174
176
  render() {
175
177
  const { iconFlipRtl, heading, headingLevel, messages, expanded } = this;
176
- const dir = getElementDir(this.el);
177
178
  const expandIconTitle = expanded ? messages.collapse : messages.expand;
178
179
  const iconStartEl = this.iconStart ? keyed("icon-start", html`<calcite-icon class=${safeClassMap({ [CSS.icon]: true, [CSS.iconStart]: true })} .flipRtl=${iconFlipRtl === "both" || iconFlipRtl === "start"} .icon=${this.iconStart} .scale=${getIconScale(this.scale)}></calcite-icon>`) : null;
179
180
  const iconEndEl = this.iconEnd ? keyed("icon-end", html`<calcite-icon class=${safeClassMap({ [CSS.iconEnd]: true, [CSS.icon]: true })} .flipRtl=${iconFlipRtl === "both" || iconFlipRtl === "end"} .icon=${this.iconEnd} .scale=${getIconScale(this.scale)}></calcite-icon>`) : null;
@@ -183,7 +184,7 @@ class AccordionItem extends LitElement {
183
184
  [CSS.iconType(this.iconType)]: true
184
185
  })}><div class=${safeClassMap({
185
186
  [CSS.header]: true,
186
- [CSS_UTILITY.rtl]: dir === "rtl",
187
+ [CSS_UTILITY.rtl]: this.direction === "rtl",
187
188
  [CSS.headerAppearance(this.appearance)]: true
188
189
  })}>${this.renderActionsStart()}<button aria-controls=${IDS.section} .ariaExpanded=${expanded} class=${safeClassMap(CSS.headerContent)} id=${IDS.sectionToggle} @click=${this.itemHeaderClickHandler} type=button ${ref(this.headerRef)}><div class=${safeClassMap(CSS.headerContainer)}>${this.renderContentStart()}${iconStartEl}<div class=${safeClassMap(CSS.headerText)}>${Heading({ class: CSS.heading, level: headingLevel, children: heading })}${description ? html`<span class=${safeClassMap(CSS.description)}>${description}</span>` : null}</div>${iconEndEl}${this.renderContentEnd()}</div><calcite-icon class=${safeClassMap(CSS.expandIcon)} .icon=${this.iconType === "chevron" ? ICONS.chevronDown : this.iconType === "caret" ? ICONS.caretDown : expanded ? ICONS.minus : ICONS.plus} .scale=${getIconScale(this.scale)} title=${expandIconTitle ?? nothing}></calcite-icon></button>${this.renderActionsEnd()}</div><section aria-labelledby=${IDS.sectionToggle} class=${safeClassMap(CSS.content)} id=${IDS.section}><slot></slot></section></div>`;
189
190
  }
@@ -6,16 +6,16 @@ import type { IconName } from "../calcite-icon/interfaces.js";
6
6
  /**
7
7
  * @cssproperty [--calcite-action-background-color-hover] - Specifies the component's background color when hovered.
8
8
  * @cssproperty [--calcite-action-background-color-press] - Specifies the component's background color when active.
9
- * @cssproperty [--calcite-action-background-color-pressed] - [Deprecated] Use --calcite-action-background-color-press. Specifies the component's background color when active.
9
+ * @cssproperty [--calcite-action-background-color-pressed] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-action-background-color-press` instead. Specifies the component's background color when active.
10
10
  * @cssproperty [--calcite-action-background-color] - Specifies the component's background color.
11
- * @cssproperty [--calcite-action-corner-radius-end-end] - [Deprecated] Use --calcite-action-corner-radius. Specifies the component's corner radius end end.
12
- * @cssproperty [--calcite-action-corner-radius-end-start] - [Deprecated] Use --calcite-action-corner-radius. Specifies the component's corner radius end start.
13
- * @cssproperty [--calcite-action-corner-radius-start-end] - [Deprecated] Use --calcite-action-corner-radius. Specifies the component's corner radius start end.
14
- * @cssproperty [--calcite-action-corner-radius-start-start] - [Deprecated] Use --calcite-action-corner-radius. Specifies the component's corner radius start start.
11
+ * @cssproperty [--calcite-action-corner-radius-end-end] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-action-corner-radius` instead. Specifies the component's corner radius end end.
12
+ * @cssproperty [--calcite-action-corner-radius-end-start] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-action-corner-radius` instead. Specifies the component's corner radius end start.
13
+ * @cssproperty [--calcite-action-corner-radius-start-end] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-action-corner-radius` instead. Specifies the component's corner radius start end.
14
+ * @cssproperty [--calcite-action-corner-radius-start-start] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-action-corner-radius` instead. Specifies the component's corner radius start start.
15
15
  * @cssproperty [--calcite-action-corner-radius] - Specifies the component's corner radius.
16
16
  * @cssproperty [--calcite-action-indicator-color] - Specifies the component's indicator color.
17
17
  * @cssproperty [--calcite-action-text-color-press] - Specifies the component's text color when pressed or hovered.
18
- * @cssproperty [--calcite-action-text-color-pressed] - [Deprecated] Use --calcite-action-text-color-press. Specifies the component's text color when hovered.
18
+ * @cssproperty [--calcite-action-text-color-pressed] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-action-text-color-press` instead. Specifies the component's text color when hovered.
19
19
  * @cssproperty [--calcite-action-text-color] - Specifies the component's text color.
20
20
  * @slot - A slot for adding non-interactive content, such as a `calcite-icon`.
21
21
  */
@@ -27,7 +27,7 @@ export abstract class Action extends LitElement {
27
27
  */
28
28
  accessor active: boolean;
29
29
  /** Specifies the horizontal alignment of button elements with text content. */
30
- accessor alignment: Alignment;
30
+ accessor alignment: Alignment | undefined;
31
31
  /**
32
32
  * Specifies the appearance of the component.
33
33
  *
@@ -55,9 +55,9 @@ export abstract class Action extends LitElement {
55
55
  *
56
56
  * When not set, the component is associated with its ancestor form element, if one exists.
57
57
  */
58
- accessor form: string;
58
+ accessor form: string | undefined;
59
59
  /** Specifies an icon to display. */
60
- accessor icon: IconName;
60
+ accessor icon: IconName | undefined;
61
61
  /**
62
62
  * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`).
63
63
  *
@@ -71,7 +71,7 @@ export abstract class Action extends LitElement {
71
71
  */
72
72
  accessor indicator: boolean;
73
73
  /** Specifies an accessible label for the component. If no label is provided, the label inherits what's provided for the `text` prop. */
74
- accessor label: string;
74
+ accessor label: string | undefined;
75
75
  /**
76
76
  * When `true`, a busy indicator is displayed.
77
77
  *
@@ -99,6 +99,8 @@ export abstract class Action extends LitElement {
99
99
  /**
100
100
  * When `true`, displays `text` adjacent to the `icon`.
101
101
  *
102
+ * When `true` and the component is used as a child of `calcite-action-bar`, the text will be shown initially regardless of the parent components `expanded` state.
103
+ *
102
104
  * @default false
103
105
  */
104
106
  accessor textEnabled: boolean;
@@ -106,14 +108,14 @@ export abstract class Action extends LitElement {
106
108
  * Specifies the default behavior of the component.
107
109
  *
108
110
  * @default "button"
109
- * @mdn [type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)
111
+ * @see [MDN - type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)
110
112
  */
111
113
  accessor type: HTMLButtonElement["type"];
112
114
  /**
113
115
  * Sets focus on the component.
114
116
  *
115
117
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
116
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
118
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
117
119
  */
118
120
  setFocus(options?: FocusOptions): Promise<void>;
119
121
  }