@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
@@ -1,12 +1,11 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { ref } from "lit/directives/ref.js";
4
- import { css, nothing, html } from "lit";
4
+ import { css, html } from "lit";
5
5
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
6
- import { queryAssignedElements } from "lit/decorators.js";
7
- import { f as focusElementInGroup, j as focusElement, u as nextFrame } from "../../chunks/dom.js";
6
+ import { useDirection } from "@arcgis/lumina/controllers";
7
+ import { u as nextFrame } from "../../chunks/dom.js";
8
8
  import { d as defaultMenuPlacement, r as reposition, c as connectFloatingUI, a as disconnectFloatingUI, f as filterValidFlipPlacements, h as hideFloatingUI, F as FloatingCSS } from "../../chunks/floating-ui.js";
9
- import { g as guid } from "../../chunks/guid.js";
10
9
  import { i as isActivationKey } from "../../chunks/key.js";
11
10
  import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
12
11
  import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
@@ -14,6 +13,7 @@ import { g as getDimensionClass } from "../../chunks/dynamicClasses.js";
14
13
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
15
14
  import { u as useInteractive } from "../../chunks/useInteractive.js";
16
15
  import { u as useTopLayer } from "../../chunks/useTopLayer.js";
16
+ import { u as useReferenceElement, r as referenceElementManager } from "../../chunks/manager.js";
17
17
  const SLOTS = {
18
18
  trigger: "trigger"
19
19
  };
@@ -22,31 +22,21 @@ const CSS = {
22
22
  wrapper: "wrapper",
23
23
  triggerContainer: "trigger-container"
24
24
  };
25
- const idPrefix = "calcite-dropdown";
26
- const IDS = {
27
- menuButton: (id) => `${idPrefix}-${id}-menubutton`,
28
- menu: (id) => `${idPrefix}-${id}-menu`
29
- };
30
25
  const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}.wrapper{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{.wrapper{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .wrapper{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .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}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
31
- var __defProp = Object.defineProperty;
32
- var __decorateClass = (decorators, target, key, kind) => {
33
- var result = void 0;
34
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
35
- if (decorator = decorators[i])
36
- result = decorator(target, key, result) || result;
37
- if (result) __defProp(target, key, result);
38
- return result;
39
- };
26
+ const manager = referenceElementManager({ click: true, hover: true });
40
27
  class Dropdown extends LitElement {
41
28
  constructor() {
42
29
  super();
30
+ this.referenceElementController = useReferenceElement({ manager })(this);
31
+ this.direction = useDirection();
43
32
  this.focusLastDropdownItem = false;
33
+ this.activeItemIndex = -1;
44
34
  this.groups = [];
45
- this.guid = guid();
46
35
  this.items = [];
47
36
  this.mutationObserver = createObserver("mutation", () => this.updateItems());
48
37
  this.transitionProp = "opacity";
49
38
  this.resizeObserver = createObserver("resize", (entries) => this.resizeObserverCallback(entries));
39
+ this.onReferenceElementKeyDown = (event) => this.keyDownHandler(event);
50
40
  this.focusSetter = useSetFocus()(this);
51
41
  this.interactiveContainer = useInteractive(this);
52
42
  this.topLayer = useTopLayer({
@@ -70,15 +60,13 @@ class Dropdown extends LitElement {
70
60
  this.calciteDropdownOpen = createEvent({ cancelable: false });
71
61
  this.calciteDropdownSelect = createEvent({ cancelable: false });
72
62
  this.listenOn(window, "click", this.closeCalciteDropdownOnClick);
73
- this.listen("calciteInternalDropdownCloseRequest", this.closeCalciteDropdownOnEvent);
74
63
  this.listenOn(window, "calciteDropdownOpen", this.closeCalciteDropdownOnOpenEvent);
75
64
  this.listen("pointerenter", this.pointerEnterHandler);
76
65
  this.listen("pointerleave", this.pointerLeaveHandler);
77
- this.listen("calciteInternalDropdownItemKeyEvent", this.calciteInternalDropdownItemKeyEvent);
78
66
  this.listen("calciteInternalDropdownItemSelect", this.handleItemSelect);
79
67
  }
80
68
  static {
81
- this.properties = { closeOnSelectDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], maxItems: [11, {}, { reflect: true, type: Number }], offsetDistance: [11, {}, { type: Number, reflect: true }], offsetSkidding: [11, {}, { reflect: true, type: Number }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selectedItems: [0, {}, { attribute: false }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], type: [3, {}, { reflect: true }], widthScale: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }] };
69
+ this.properties = { activeDescendantElement: [16, {}, { state: true }], referenceEl: [16, {}, { state: true }], closeOnSelectDisabled: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], flipPlacements: [0, {}, { attribute: false }], maxItems: [11, {}, { reflect: true, type: Number }], offsetDistance: [11, {}, { type: Number, reflect: true }], offsetSkidding: [11, {}, { reflect: true, type: Number }], open: [7, {}, { reflect: true, type: Boolean }], overlayPositioning: [3, {}, { reflect: true }], placement: [3, {}, { reflect: true }], referenceElement: 1, scale: [3, {}, { reflect: true }], selectedItems: [0, {}, { attribute: false }], topLayerDisabled: [7, {}, { reflect: true, type: Boolean }], type: [3, {}, { reflect: true }], widthScale: [3, {}, { reflect: true }], width: [3, {}, { reflect: true }] };
82
70
  }
83
71
  static {
84
72
  this.shadowRootOptions = { mode: "open", delegatesFocus: true };
@@ -86,9 +74,13 @@ class Dropdown extends LitElement {
86
74
  static {
87
75
  this.styles = styles;
88
76
  }
77
+ get referenceElementType() {
78
+ return this.referenceElement ? this.type : null;
79
+ }
89
80
  async reposition(delayed = false) {
90
81
  const { filteredFlipPlacements, floatingEl, offsetDistance, offsetSkidding, overlayPositioning, placement, referenceEl } = this;
91
82
  return reposition(this, {
83
+ direction: this.direction,
92
84
  floatingEl,
93
85
  referenceEl,
94
86
  offsetDistance,
@@ -100,7 +92,7 @@ class Dropdown extends LitElement {
100
92
  }, delayed);
101
93
  }
102
94
  async setFocus(options) {
103
- return this.focusSetter(() => this.referenceEl, options);
95
+ return this.focusSetter(() => this.referenceEl instanceof HTMLElement ? this.referenceEl : this.floatingEl, options);
104
96
  }
105
97
  connectedCallback() {
106
98
  super.connectedCallback();
@@ -128,6 +120,14 @@ class Dropdown extends LitElement {
128
120
  if (changes.has("scale") && (this.hasUpdated || this.scale !== "m")) {
129
121
  this.handlePropsChange();
130
122
  }
123
+ if (changes.has("referenceElement") && !this.referenceElement && this.open) {
124
+ this.topLayer.hide();
125
+ }
126
+ }
127
+ updated(changes) {
128
+ if (changes.has("referenceEl") && this.referenceElementType) {
129
+ connectFloatingUI(this);
130
+ }
131
131
  }
132
132
  loaded() {
133
133
  this.updateSelectedItems();
@@ -160,29 +160,25 @@ class Dropdown extends LitElement {
160
160
  this.updateGroupProps();
161
161
  }
162
162
  closeCalciteDropdownOnClick(event) {
163
- if (this.disabled || !this.open || event.composedPath().includes(this.el)) {
163
+ if (this.referenceElementType || this.disabled || !this.open || event.composedPath().includes(this.el)) {
164
164
  return;
165
165
  }
166
- this.closeCalciteDropdown(false);
167
- }
168
- closeCalciteDropdownOnEvent(event) {
169
166
  this.closeCalciteDropdown();
170
- event.stopPropagation();
171
167
  }
172
168
  closeCalciteDropdownOnOpenEvent(event) {
173
- if (event.composedPath().includes(this.el)) {
169
+ if (this.referenceElementType || event.composedPath().includes(this.el)) {
174
170
  return;
175
171
  }
176
- this.open = false;
172
+ this.closeCalciteDropdown();
177
173
  }
178
174
  pointerEnterHandler() {
179
- if (this.disabled || this.type !== "hover") {
175
+ if (this.referenceElementType || this.disabled || this.type !== "hover") {
180
176
  return;
181
177
  }
182
- this.toggleDropdown();
178
+ this.open = true;
183
179
  }
184
180
  pointerLeaveHandler() {
185
- if (this.disabled || this.type !== "hover") {
181
+ if (this.referenceElementType || this.disabled || this.type !== "hover") {
186
182
  return;
187
183
  }
188
184
  this.closeCalciteDropdown();
@@ -190,34 +186,12 @@ class Dropdown extends LitElement {
190
186
  getTraversableItems() {
191
187
  return this.items.filter((item) => !item.disabled && !item.hidden);
192
188
  }
193
- calciteInternalDropdownItemKeyEvent(event) {
194
- const { keyboardEvent } = event.detail;
195
- const target = keyboardEvent.target;
196
- const traversableItems = this.getTraversableItems();
197
- switch (keyboardEvent.key) {
198
- case "Tab":
199
- this.open = false;
200
- this.updateTabIndexOfItems(target);
201
- break;
202
- case "ArrowDown":
203
- focusElementInGroup(traversableItems, target, "next");
204
- break;
205
- case "ArrowUp":
206
- focusElementInGroup(traversableItems, target, "previous");
207
- break;
208
- case "Home":
209
- focusElementInGroup(traversableItems, target, "first");
210
- break;
211
- case "End":
212
- focusElementInGroup(traversableItems, target, "last");
213
- break;
214
- }
215
- event.stopPropagation();
216
- }
217
- handleItemSelect(event) {
189
+ async handleItemSelect(event) {
218
190
  this.updateSelectedItems();
191
+ this.syncActiveItemFromTraversableItems();
219
192
  event.stopPropagation();
220
193
  this.calciteDropdownSelect.emit();
194
+ await this.setFocus();
221
195
  if (!this.closeOnSelectDisabled) {
222
196
  this.closeCalciteDropdown();
223
197
  }
@@ -229,6 +203,7 @@ class Dropdown extends LitElement {
229
203
  updateItems() {
230
204
  this.items = this.groups.map((group) => Array.from(group?.querySelectorAll("calcite-dropdown-item"))).reduce((previousValue, currentValue) => [...previousValue, ...currentValue], []);
231
205
  this.updateSelectedItems();
206
+ this.syncActiveItemFromTraversableItems();
232
207
  this.reposition(true);
233
208
  this.items.forEach((item) => item.scale = this.scale);
234
209
  }
@@ -255,7 +230,7 @@ class Dropdown extends LitElement {
255
230
  }
256
231
  setDropdownWidth() {
257
232
  const { referenceEl, scrollerEl } = this;
258
- if (!scrollerEl || !referenceEl) {
233
+ if (!scrollerEl || !(referenceEl instanceof HTMLElement)) {
259
234
  return;
260
235
  }
261
236
  scrollerEl.style.minWidth = `${referenceEl.clientWidth}px`;
@@ -275,7 +250,7 @@ class Dropdown extends LitElement {
275
250
  this.transitionEl = el;
276
251
  }
277
252
  onBeforeOpen() {
278
- this.focusOnFirstActiveOrDefaultItem();
253
+ this.setInitialActiveItem();
279
254
  this.calciteDropdownBeforeOpen.emit();
280
255
  this.topLayer.show();
281
256
  }
@@ -291,7 +266,9 @@ class Dropdown extends LitElement {
291
266
  this.topLayer.hide();
292
267
  }
293
268
  setReferenceEl(el) {
294
- updateRefObserver(this.resizeObserver, this.referenceEl, el);
269
+ const previousReferenceEl = this.referenceEl instanceof HTMLElement ? this.referenceEl : null;
270
+ const nextReferenceEl = el instanceof HTMLElement ? el : null;
271
+ updateRefObserver(this.resizeObserver, previousReferenceEl, nextReferenceEl);
295
272
  this.referenceEl = el;
296
273
  connectFloatingUI(this);
297
274
  }
@@ -300,30 +277,59 @@ class Dropdown extends LitElement {
300
277
  connectFloatingUI(this);
301
278
  }
302
279
  keyDownHandler(event) {
303
- if (!event.composedPath().includes(this.referenceEl)) {
280
+ if (!(this.referenceEl instanceof HTMLElement) || !event.composedPath().includes(this.referenceEl)) {
304
281
  return;
305
282
  }
306
283
  const { defaultPrevented, key } = event;
307
284
  if (defaultPrevented) {
308
285
  return;
309
286
  }
310
- if (key === "Escape") {
287
+ if (this.open && key === "Escape") {
311
288
  this.closeCalciteDropdown();
312
289
  event.preventDefault();
313
290
  return;
314
291
  }
315
- if (this.open && event.shiftKey && key === "Tab") {
316
- this.closeCalciteDropdown();
292
+ if (!this.open && isActivationKey(key)) {
293
+ this.open = true;
317
294
  event.preventDefault();
318
295
  return;
319
296
  }
320
- if (isActivationKey(key)) {
321
- this.toggleDropdown();
322
- event.preventDefault();
323
- } else if (key === "ArrowDown" || key === "ArrowUp") {
297
+ if (!this.open && (key === "ArrowDown" || key === "ArrowUp")) {
324
298
  event.preventDefault();
325
299
  this.focusLastDropdownItem = key === "ArrowUp";
326
300
  this.open = true;
301
+ return;
302
+ }
303
+ if (!this.open) {
304
+ return;
305
+ }
306
+ if (key === "Tab") {
307
+ this.closeCalciteDropdown();
308
+ return;
309
+ }
310
+ if (key === "ArrowDown") {
311
+ event.preventDefault();
312
+ this.navigateActiveItem("next");
313
+ return;
314
+ }
315
+ if (key === "ArrowUp") {
316
+ event.preventDefault();
317
+ this.navigateActiveItem("previous");
318
+ return;
319
+ }
320
+ if (key === "Home") {
321
+ event.preventDefault();
322
+ this.navigateActiveItem("first");
323
+ return;
324
+ }
325
+ if (key === "End") {
326
+ event.preventDefault();
327
+ this.navigateActiveItem("last");
328
+ return;
329
+ }
330
+ if (isActivationKey(key)) {
331
+ event.preventDefault();
332
+ this.activateActiveItem();
327
333
  }
328
334
  }
329
335
  updateSelectedItems() {
@@ -333,48 +339,120 @@ class Dropdown extends LitElement {
333
339
  const style = last.getBoundingClientRect();
334
340
  return last.offsetTop + style.height;
335
341
  }
336
- closeCalciteDropdown(focusTrigger = true) {
342
+ closeCalciteDropdown() {
337
343
  this.open = false;
338
- if (focusTrigger) {
339
- focusElement(this.triggerEls[0]);
340
- }
344
+ this.setActiveItemByIndex(-1);
341
345
  }
342
- async focusOnFirstActiveOrDefaultItem() {
343
- const selectedItem = this.getTraversableItems().find((item) => item.selected);
344
- const target = selectedItem || (this.focusLastDropdownItem ? this.items.at(-1) : this.items[0]);
346
+ async setInitialActiveItem() {
347
+ const traversableItems = this.getTraversableItems();
348
+ const target = this.focusLastDropdownItem ? traversableItems.at(-1) : traversableItems[0];
345
349
  this.focusLastDropdownItem = false;
350
+ if (!target) {
351
+ this.setActiveItemByIndex(-1);
352
+ return;
353
+ }
354
+ const targetIndex = traversableItems.findIndex((item) => item === target);
355
+ this.setActiveItemByIndex(targetIndex);
356
+ await this.scrollActiveItemIntoView(target);
357
+ }
358
+ syncActiveItemFromTraversableItems() {
359
+ const traversableItems = this.getTraversableItems();
360
+ if (!traversableItems.length) {
361
+ this.setActiveItemByIndex(-1);
362
+ return;
363
+ }
364
+ if (this.activeItemIndex < 0 || this.activeItemIndex >= traversableItems.length) {
365
+ this.setActiveItemByIndex(0);
366
+ return;
367
+ }
368
+ this.updateActiveDescendantElement(traversableItems[this.activeItemIndex]);
369
+ }
370
+ setActiveItemByIndex(index) {
371
+ this.activeItemIndex = index;
372
+ const traversableItems = this.getTraversableItems();
373
+ const activeItem = index >= 0 ? traversableItems[index] : null;
374
+ this.updateActiveDescendantElement(activeItem);
375
+ }
376
+ updateActiveDescendantElement(activeItem) {
377
+ this.items.forEach((item) => {
378
+ item.activeDescendant = item === activeItem;
379
+ });
380
+ this.activeDescendantElement = activeItem ?? null;
381
+ }
382
+ navigateActiveItem(direction) {
383
+ const traversableItems = this.getTraversableItems();
384
+ if (!traversableItems.length) {
385
+ return;
386
+ }
387
+ const totalItems = traversableItems.length;
388
+ let index = this.activeItemIndex;
389
+ if (index < 0 || index >= totalItems) {
390
+ index = direction === "previous" || direction === "last" ? totalItems - 1 : 0;
391
+ } else if (direction === "next") {
392
+ index = (index + 1) % totalItems;
393
+ } else if (direction === "previous") {
394
+ index = (index - 1 + totalItems) % totalItems;
395
+ } else if (direction === "first") {
396
+ index = 0;
397
+ } else if (direction === "last") {
398
+ index = totalItems - 1;
399
+ }
400
+ const activeItem = traversableItems[index];
401
+ this.setActiveItemByIndex(index);
402
+ void this.scrollActiveItemIntoView(activeItem);
403
+ }
404
+ async scrollActiveItemIntoView(target) {
346
405
  if (!target) {
347
406
  return;
348
407
  }
349
408
  await this.updateComplete;
350
409
  await nextFrame();
351
410
  await nextFrame();
352
- await focusElement(target);
353
411
  target.scrollIntoView({ block: "nearest" });
354
412
  }
355
- toggleDropdown() {
356
- this.open = !this.open;
413
+ activateActiveItem() {
414
+ const traversableItems = this.getTraversableItems();
415
+ const activeItem = traversableItems[this.activeItemIndex] || traversableItems[0];
416
+ if (!activeItem) {
417
+ return;
418
+ }
419
+ this.setActiveItemByIndex(traversableItems.findIndex((item) => item === activeItem));
420
+ activeItem.activateItem();
357
421
  }
358
- updateTabIndexOfItems(target) {
359
- this.items.forEach((item) => {
360
- item.tabIndex = target !== item ? -1 : 0;
361
- });
422
+ openHoverDropdown() {
423
+ if (this.open || this.disabled || this.type !== "hover") {
424
+ return;
425
+ }
426
+ this.open = true;
427
+ }
428
+ closeHoverDropdown(event) {
429
+ if (!this.open || this.disabled || this.type !== "hover") {
430
+ return;
431
+ }
432
+ const relatedTarget = event.relatedTarget;
433
+ if (relatedTarget && (this.el.contains(relatedTarget) || this.referenceEl != null && this.referenceEl instanceof HTMLElement && this.referenceEl.contains(relatedTarget))) {
434
+ return;
435
+ }
436
+ this.closeCalciteDropdown();
437
+ }
438
+ toggleClickDropdown() {
439
+ if (this.disabled || this.type !== "click") {
440
+ return;
441
+ }
442
+ this.open = !this.open;
362
443
  }
363
444
  render() {
364
- const { open, guid: guid2 } = this;
365
- return this.interactiveContainer({ disabled: this.disabled, children: html`<div class=${safeClassMap(CSS.triggerContainer)} id=${IDS.menuButton(guid2) ?? nothing} @click=${this.toggleDropdown} @keydown=${this.keyDownHandler} ${ref(this.setReferenceEl)}><slot aria-controls=${IDS.menu(guid2) ?? nothing} .ariaExpanded=${open} aria-haspopup=menu name=${SLOTS.trigger}></slot></div><div .ariaHidden=${!open} class=${safeClassMap({
445
+ const { open } = this;
446
+ return this.interactiveContainer({ disabled: this.disabled, children: html`${!this.referenceElementType ? html`<div class=${safeClassMap(CSS.triggerContainer)} @click=${this.toggleClickDropdown} @focusin=${this.openHoverDropdown} @focusout=${this.closeHoverDropdown} @keydown=${this.keyDownHandler} ${ref(this.setReferenceEl)}><slot .ariaActiveDescendantElement=${this.activeDescendantElement ?? null} .ariaControlsElements=${this.scrollerEl ? [this.scrollerEl] : void 0} .ariaExpanded=${open} aria-haspopup=menu name=${SLOTS.trigger}></slot></div>` : null}<div class=${safeClassMap({
366
447
  [CSS.wrapper]: true,
367
448
  [getDimensionClass("width", this.width, this.widthScale)]: !!(this.width || this.widthScale)
368
- })} popover=manual ${ref(this.setFloatingEl)}><div aria-labelledby=${IDS.menuButton(guid2) ?? nothing} class=${safeClassMap({
449
+ })} .inert=${!open} popover=manual ${ref(this.setFloatingEl)}><div .ariaLabelledByElements=${this.referenceEl instanceof HTMLElement ? [this.referenceEl] : void 0} class=${safeClassMap({
369
450
  [CSS.content]: true,
370
451
  [FloatingCSS.animation]: true,
371
452
  [FloatingCSS.animationActive]: open
372
- })} id=${IDS.menu(guid2) ?? nothing} role=menu ${ref(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>` });
453
+ })} role=menu ${ref(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>` });
373
454
  }
374
455
  }
375
- __decorateClass([
376
- queryAssignedElements({ slot: SLOTS.trigger })
377
- ], Dropdown.prototype, "triggerEls");
378
456
  customElement("calcite-dropdown", Dropdown);
379
457
  export {
380
458
  Dropdown
@@ -6,7 +6,7 @@ import type { IconName } from "../calcite-icon/interfaces.js";
6
6
  /**
7
7
  * @cssproperty [--calcite-dropdown-item-background-color-hover] - Specifies the component's background color when hovered.
8
8
  * @cssproperty [--calcite-dropdown-item-background-color-press] - Specifies the component's background color when `selected` or active.
9
- * @cssproperty [--calcite-dropdown-item-icon-color-hover] - [Deprecated] Specifies the color of the component's selection icon when hovered.
9
+ * @cssproperty [--calcite-dropdown-item-icon-color-hover] - [Deprecated] in v5.0.0, removal target v6.0.0 - Specifies the color of the component's selection icon when hovered.
10
10
  * @cssproperty [--calcite-dropdown-item-icon-color-press] - Specifies the color of the component's selection icon when `selected` or active.
11
11
  * @cssproperty [--calcite-dropdown-item-text-color-press] - Specifies the component's text color when `selected` or active.
12
12
  * @cssproperty [--calcite-dropdown-item-text-color] - Specifies the component's text color.
@@ -47,7 +47,7 @@ export abstract class DropdownItem extends LitElement {
47
47
  * Sets focus on the component.
48
48
  *
49
49
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
50
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
50
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
51
51
  */
52
52
  setFocus(options?: FocusOptions): Promise<void>;
53
53
  /** Fires when the component is selected. */
@@ -8,7 +8,7 @@ import { g as getIconScale } from "../../chunks/component.js";
8
8
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
9
9
  import { u as useInteractive } from "../../chunks/useInteractive.js";
10
10
  import { C as CSS, I as ICONS } from "../../chunks/resources7.js";
11
- const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;flex-grow:1;align-items:center;outline:2px solid transparent;outline-offset:2px}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1));text-align:start}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1))}.content{flex:1 1 auto}.icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}.icon--start,.icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .icon,:host([scale=s]) .icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .icon,:host([scale=m]) .icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block:.625rem;padding-inline:1rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .icon,:host([scale=l]) .icon--start{padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .icon--end{padding-inline-start:var(--calcite-spacing-lg)}:host(:focus) .container{text-decoration-line:none;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-hover, var(--calcite-color-foreground-2))}:host(:active:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-press, var(--calcite-color-foreground-3))}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{text-decoration-line:none;color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .icon--start,:host(:hover:not([disabled])) .icon--end,:host(:active:not([disabled])) .icon--start,:host(:active:not([disabled])) .icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .link,:host(:active:not([disabled])) .link{color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection),:host([selected]) .link{font-weight:var(--calcite-font-weight-medium);--calcite-internal-dropdown-item-text-color: var( --calcite-dropdown-item-text-color-press, var(--calcite-color-text-1) );color:var(--calcite-internal-dropdown-item-text-color)}:host([selected]) .container:not(.container--none-selection) .icon,:host([selected]) .link .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-press, var(--calcite-color-brand))}:host([selected]) .container:not(.container--none-selection) .icon--start,:host([selected]) .container:not(.container--none-selection) .icon--end,:host([selected]) .link .icon--start,:host([selected]) .link .icon--end{--calcite-icon-color: var(--calcite-internal-dropdown-item-text-color)}:host(:hover:not([disabled])) .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-hover)}:host([selected]) .icon{opacity:1}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
11
+ const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;flex-grow:1;align-items:center;outline:2px solid transparent;outline-offset:2px}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1));text-align:start}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1))}.content{flex:1 1 auto}.icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}.icon--start,.icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .icon,:host([scale=s]) .icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .icon,:host([scale=m]) .icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block:var(--calcite-space-sm-plus);padding-inline:1rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .icon,:host([scale=l]) .icon--start{padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .icon--end{padding-inline-start:var(--calcite-spacing-lg)}:host(:focus) .container,:host([active-descendant]) .container{text-decoration-line:none;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-hover, var(--calcite-color-foreground-2))}:host(:active:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-press, var(--calcite-color-foreground-3))}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{text-decoration-line:none;color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .icon--start,:host(:hover:not([disabled])) .icon--end,:host(:active:not([disabled])) .icon--start,:host(:active:not([disabled])) .icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .link,:host(:active:not([disabled])) .link{color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection),:host([selected]) .link{font-weight:var(--calcite-font-weight-medium);--calcite-internal-dropdown-item-text-color: var( --calcite-dropdown-item-text-color-press, var(--calcite-color-text-1) );color:var(--calcite-internal-dropdown-item-text-color)}:host([selected]) .container:not(.container--none-selection) .icon,:host([selected]) .link .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-press, var(--calcite-color-brand))}:host([selected]) .container:not(.container--none-selection) .icon--start,:host([selected]) .container:not(.container--none-selection) .icon--end,:host([selected]) .link .icon--start,:host([selected]) .link .icon--end{--calcite-icon-color: var(--calcite-internal-dropdown-item-text-color)}:host(:hover:not([disabled])) .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-hover)}:host([selected]) .icon{opacity:1}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`;
12
12
  class DropdownItem extends LitElement {
13
13
  constructor() {
14
14
  super();
@@ -16,19 +16,17 @@ class DropdownItem extends LitElement {
16
16
  this.focusSetter = useSetFocus()(this);
17
17
  this.interactiveContainer = useInteractive(this);
18
18
  this.disabled = false;
19
+ this.activeDescendant = false;
19
20
  this.scale = "m";
20
21
  this.selected = false;
21
22
  this.selectionMode = "single";
22
23
  this.calciteDropdownItemSelect = createEvent({ cancelable: false });
23
- this.calciteInternalDropdownCloseRequest = createEvent({ cancelable: false });
24
- this.calciteInternalDropdownItemKeyEvent = createEvent({ cancelable: false });
25
24
  this.calciteInternalDropdownItemSelect = createEvent({ cancelable: false });
26
25
  this.listen("click", this.onClick);
27
- this.listen("keydown", this.keyDownHandler);
28
26
  this.listenOn(document.body, "calciteInternalDropdownItemChange", this.updateActiveItemOnChange);
29
27
  }
30
28
  static {
31
- this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], href: [3, {}, { reflect: true }], iconEnd: [3, { type: String }, { reflect: true }], iconFlipRtl: [3, {}, { reflect: true }], iconStart: [3, { type: String }, { reflect: true }], label: 1, rel: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selected: [7, {}, { reflect: true, type: Boolean }], selectionMode: 1, target: [3, {}, { reflect: true }] };
29
+ this.properties = { disabled: [7, {}, { reflect: true, type: Boolean }], activeDescendant: [7, {}, { reflect: true, type: Boolean }], href: [3, {}, { reflect: true }], iconEnd: [3, { type: String }, { reflect: true }], iconFlipRtl: [3, {}, { reflect: true }], iconStart: [3, { type: String }, { reflect: true }], label: 1, rel: [3, {}, { reflect: true }], scale: [3, {}, { reflect: true }], selected: [7, {}, { reflect: true, type: Boolean }], selectionMode: 1, target: [3, {}, { reflect: true }] };
32
30
  }
33
31
  static {
34
32
  this.styles = styles;
@@ -36,6 +34,16 @@ class DropdownItem extends LitElement {
36
34
  async setFocus(options) {
37
35
  return this.focusSetter(() => this.el, options);
38
36
  }
37
+ async activateItem() {
38
+ if (this.disabled) {
39
+ return;
40
+ }
41
+ if (this.href) {
42
+ this.childLinkRef.value?.click();
43
+ return;
44
+ }
45
+ this.emitRequestedItem();
46
+ }
39
47
  connectedCallback() {
40
48
  super.connectedCallback();
41
49
  this.initialize();
@@ -46,32 +54,6 @@ class DropdownItem extends LitElement {
46
54
  onClick() {
47
55
  this.emitRequestedItem();
48
56
  }
49
- keyDownHandler(event) {
50
- switch (event.key) {
51
- case " ":
52
- case "Enter":
53
- this.emitRequestedItem();
54
- if (this.href) {
55
- this.childLinkRef.value.click();
56
- }
57
- event.preventDefault();
58
- break;
59
- case "Escape":
60
- this.calciteInternalDropdownCloseRequest.emit();
61
- event.preventDefault();
62
- break;
63
- case "Tab":
64
- this.calciteInternalDropdownItemKeyEvent.emit({ keyboardEvent: event });
65
- break;
66
- case "ArrowUp":
67
- case "ArrowDown":
68
- case "Home":
69
- case "End":
70
- event.preventDefault();
71
- this.calciteInternalDropdownItemKeyEvent.emit({ keyboardEvent: event });
72
- break;
73
- }
74
- }
75
57
  updateActiveItemOnChange(event) {
76
58
  const parentEmittedChange = event.composedPath().includes(this.parentDropdownGroupEl);
77
59
  if (parentEmittedChange) {
@@ -126,7 +108,7 @@ class DropdownItem extends LitElement {
126
108
  this.el.ariaChecked = itemAria;
127
109
  this.el.ariaLabel = !href ? label : "";
128
110
  this.el.role = itemRole;
129
- setAttribute(this.el, "tabIndex", disabled ? -1 : 0);
111
+ setAttribute(this.el, "tabIndex", -1);
130
112
  return this.interactiveContainer({ disabled, children: html`<div class=${safeClassMap({
131
113
  [CSS.container]: true,
132
114
  [CSS.containerNone]: selectionMode === "none"
@@ -64,7 +64,7 @@ export abstract class Fab extends LitElement {
64
64
  * Sets focus on the component.
65
65
  *
66
66
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
67
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
67
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
68
68
  */
69
69
  setFocus(options?: FocusOptions): Promise<void>;
70
70
  }
@@ -66,7 +66,7 @@ export abstract class Filter extends LitElement {
66
66
  * Sets focus on the component.
67
67
  *
68
68
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
69
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
69
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
70
70
  */
71
71
  setFocus(options?: FocusOptions): Promise<void>;
72
72
  /** Fires when the filter text changes. */
@@ -19,7 +19,7 @@ export abstract class Flow extends LitElement {
19
19
  *
20
20
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
21
21
  * @returns Promise<void>
22
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
22
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
23
23
  */
24
24
  setFocus(options?: FocusOptions): Promise<void>;
25
25
  }
@@ -6,20 +6,20 @@ import type { Scale } from "../interfaces.js";
6
6
  import type { IconName } from "../calcite-icon/interfaces.js";
7
7
 
8
8
  /**
9
- * @cssproperty [--calcite-flow-item-footer-padding] - [Deprecated] Use `--calcite-flow-footer-space` instead. Specifies the padding of the component's footer.
10
- * @cssproperty [--calcite-flow-item-header-border-block-end] - [Deprecated] Use `--calcite-flow-border-color` instead. Specifies the component header's block end border.
9
+ * @cssproperty [--calcite-flow-item-footer-padding] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-flow-footer-space` instead. Specifies the padding of the component's footer.
10
+ * @cssproperty [--calcite-flow-item-header-border-block-end] - [Deprecated] in v3.0.0, removal target v6.0.0 - Use `--calcite-flow-border-color` instead. Specifies the component header's block end border.
11
11
  * @cssproperty [--calcite-flow-corner-radius] - Specifies the component's corner radius.
12
12
  * @cssproperty [--calcite-flow-heading-text-color] - Specifies the text color of the component's `heading`.
13
13
  * @cssproperty [--calcite-flow-icon-color] - Specifies the color of the component's `icon`.
14
14
  * @cssproperty [--calcite-flow-description-text-color] - Specifies the text color of the component's `description`.
15
15
  * @cssproperty [--calcite-flow-border-color] - Specifies the component's border color.
16
16
  * @cssproperty [--calcite-flow-background-color] - Specifies the component's background color.
17
- * @cssproperty [--calcite-flow-content-top-space] - Specifies the padding of the `"content-top"` slot.
18
- * @cssproperty [--calcite-flow-content-bottom-space] - Specifies the padding of the `"content-bottom"` slot.
17
+ * @cssproperty [--calcite-flow-content-top-space] - Specifies the padding of the component's `content-top` slot.
18
+ * @cssproperty [--calcite-flow-content-bottom-space] - Specifies the padding of the component's `content-bottom` slot.
19
19
  * @cssproperty [--calcite-flow-header-background-color] - Specifies the background color of the component's header.
20
20
  * @cssproperty [--calcite-flow-footer-background-color] - Specifies the background color of the component's footer.
21
21
  * @cssproperty [--calcite-flow-space] - Specifies the padding of the component's `unnamed (default)` slot.
22
- * @cssproperty [--calcite-flow-header-content-space] - Specifies the padding of the `header-content` slot.
22
+ * @cssproperty [--calcite-flow-header-content-space] - Specifies the padding of the component's `header-content` slot.
23
23
  * @cssproperty [--calcite-flow-footer-space] - Specifies the padding of the component's footer.
24
24
  * @cssproperty [--calcite-action-background-color] - Specifies the background color of the component's `closable`, `collapsible`, and `back` `calcite-action`s. Applies to any slotted `calcite-action`s.
25
25
  * @cssproperty [--calcite-action-background-color-hover] - Specifies the background color of the component's `closable`, `collapsible`, and `back` `calcite-action`s when hovered. Applies to any slotted `calcite-action`s.
@@ -42,6 +42,8 @@ import type { IconName } from "../calcite-icon/interfaces.js";
42
42
  * @slot [header-actions-end] - A slot for adding `calcite-action`s or content to the end side of the component's header.
43
43
  * @slot [header-content] - A slot for adding custom content to the component's header.
44
44
  * @slot [header-menu-actions] - A slot for adding an overflow menu with `calcite-action`s inside a `calcite-dropdown`.
45
+ * @slot [heading] - A slot for adding content to the heading area of the default header. Takes precedence over the `heading` property.
46
+ * @slot [description] - A slot for adding content to the description area of the default header. Takes precedence over the `description` property.
45
47
  * @slot [fab] - A slot for adding a `calcite-fab` (floating action button) to perform an action.
46
48
  * @slot [footer] - A slot for adding custom content to the component's footer. Should not be used with the `footer-start` or `footer-end` slots.
47
49
  * @slot [footer-end] - A slot for adding a trailing footer custom content. Should not be used with the `footer` slot.
@@ -149,7 +151,7 @@ export abstract class FlowItem extends LitElement {
149
151
  * Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
150
152
  *
151
153
  * @default false
152
- * @mdn [Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
154
+ * @see [MDN - Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
153
155
  */
154
156
  accessor topLayerDisabled: boolean;
155
157
  /**
@@ -170,7 +172,7 @@ export abstract class FlowItem extends LitElement {
170
172
  *
171
173
  * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
172
174
  * @returns promise.
173
- * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
175
+ * @see [MDN - focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
174
176
  */
175
177
  setFocus(options?: FocusOptions): Promise<void>;
176
178
  /** Fires when the component's back button is clicked. */