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

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 (268) hide show
  1. package/dist/cdn/{GW7IPUQS.js → 232WBXIW.js} +1 -1
  2. package/dist/cdn/27KIJJVA.js +2 -0
  3. package/dist/cdn/{KVSU3DLB.js → 27S7SCHF.js} +1 -1
  4. package/dist/cdn/2CV466KR.js +2 -0
  5. package/dist/cdn/{LHJSBAM5.js → 2M3L5CHC.js} +1 -1
  6. package/dist/cdn/2XWHTJYS.js +2 -0
  7. package/dist/cdn/{QBLAE2O5.js → 3HLHTUY5.js} +1 -1
  8. package/dist/cdn/{IFHMJCAE.js → 3N3YST3P.js} +1 -1
  9. package/dist/cdn/3OCOXFJX.js +2 -0
  10. package/dist/cdn/3ZTULMLE.js +2 -0
  11. package/dist/cdn/{LGKOEBZ4.js → 44K6CFSA.js} +1 -1
  12. package/dist/cdn/46ATGQXN.js +2 -0
  13. package/dist/cdn/{CDTY6WOM.js → 4HL2Z5HN.js} +1 -1
  14. package/dist/cdn/{QOSBMGOZ.js → 526JZ6Y2.js} +1 -1
  15. package/dist/cdn/{AYPT6VGV.js → 56V6AANR.js} +1 -1
  16. package/dist/cdn/{5HQ3O27G.js → 57UFQM3M.js} +1 -1
  17. package/dist/cdn/{FCNCDBSI.js → 5D32LNQR.js} +1 -1
  18. package/dist/cdn/{FDGUUC3D.js → 5G2KVW4P.js} +1 -1
  19. package/dist/cdn/5H7EBO5K.js +2 -0
  20. package/dist/cdn/{CZYFEVKF.js → 5HB4KJ7Y.js} +1 -1
  21. package/dist/cdn/{HRUVPNCI.js → 633FBLBS.js} +1 -1
  22. package/dist/cdn/{JKLX623E.js → 66YZFACX.js} +1 -1
  23. package/dist/cdn/672VGWH7.js +2 -0
  24. package/dist/cdn/{R6D5F2V7.js → 67O6G5DT.js} +1 -1
  25. package/dist/cdn/6CKEQZO7.js +2 -0
  26. package/dist/cdn/{ZZNRLKQQ.js → 6E6JZIDL.js} +1 -1
  27. package/dist/cdn/{MXRMT4RB.js → 6UH6TKTT.js} +1 -1
  28. package/dist/cdn/6XNHTAM2.js +2 -0
  29. package/dist/cdn/7KPHVGVG.js +2 -0
  30. package/dist/cdn/{SBPWZDAB.js → 7MRH7XSL.js} +1 -1
  31. package/dist/cdn/7UOYXJ3K.js +2 -0
  32. package/dist/cdn/{7B4D4WJ2.js → AECJNJ7Y.js} +1 -1
  33. package/dist/cdn/{HXS3PD57.js → AELSFDTC.js} +1 -1
  34. package/dist/cdn/{YOYLPMEA.js → AKVWZOJU.js} +1 -1
  35. package/dist/cdn/ARN4B4IT.js +2 -0
  36. package/dist/cdn/{GJE7FY35.js → B4SHCCW6.js} +1 -1
  37. package/dist/cdn/BCO3LX7A.js +2 -0
  38. package/dist/cdn/{Q7WYXKFZ.js → BRMCZ6ZG.js} +1 -1
  39. package/dist/cdn/BRXJTIAG.js +2 -0
  40. package/dist/cdn/{QKUQGG2M.js → BVFHM66P.js} +1 -1
  41. package/dist/cdn/{SXVCUXNL.js → C44ME3U7.js} +1 -1
  42. package/dist/cdn/{VLGFWPBL.js → CILYQWNA.js} +1 -1
  43. package/dist/cdn/{5TWM6GKK.js → CSXVZ7IA.js} +1 -1
  44. package/dist/cdn/{6IZMIAV2.js → D2EYC7T6.js} +1 -1
  45. package/dist/cdn/{5YROPSGB.js → DNYQCUGR.js} +1 -1
  46. package/dist/cdn/{KNDQJ2XX.js → EMOZ2DH3.js} +1 -1
  47. package/dist/cdn/{HXVXRVZW.js → ETPCGFQN.js} +1 -1
  48. package/dist/cdn/{2ZJ5ADD2.js → FC5MLLP5.js} +1 -1
  49. package/dist/cdn/{7DA7BZM3.js → FIYBHBE3.js} +1 -1
  50. package/dist/cdn/FO3VFHYC.js +2 -0
  51. package/dist/cdn/GCGNKBZK.js +2 -0
  52. package/dist/cdn/{OVU2NGHU.js → HAVRDDW3.js} +1 -1
  53. package/dist/cdn/{YQY6DOSF.js → HBRWGV2Z.js} +1 -1
  54. package/dist/cdn/{CPDXUV3S.js → HGX7LZAA.js} +1 -1
  55. package/dist/cdn/{X7JEHH2B.js → HJRA23WV.js} +1 -1
  56. package/dist/cdn/{3TCEXRVB.js → HMZKLPV5.js} +1 -1
  57. package/dist/cdn/{FAOX7WLQ.js → IBP55ZGE.js} +1 -1
  58. package/dist/cdn/IIYUSLAE.js +2 -0
  59. package/dist/cdn/{F7XISEIT.js → IYMANB2G.js} +1 -1
  60. package/dist/cdn/{FAHLSHDH.js → JN5O4TLZ.js} +1 -1
  61. package/dist/cdn/{Z3IVC2AV.js → JQY63BDJ.js} +1 -1
  62. package/dist/cdn/JVNG2BRO.js +2 -0
  63. package/dist/cdn/{CAAZHUX4.js → JVZSWSGV.js} +1 -1
  64. package/dist/cdn/JX4VBEH7.js +2 -0
  65. package/dist/cdn/{R3EE76WN.js → K724PPGV.js} +1 -1
  66. package/dist/cdn/{RROGXGP5.js → KJ42NLHR.js} +1 -1
  67. package/dist/cdn/KP6U3OB3.js +2 -0
  68. package/dist/cdn/{YUJ33VWR.js → KT4JL3GM.js} +1 -1
  69. package/dist/cdn/KZ5EXCXL.js +2 -0
  70. package/dist/cdn/{EIFNZZAD.js → L3TZLATI.js} +1 -1
  71. package/dist/cdn/{AMZPSRIA.js → L62IP5MG.js} +1 -1
  72. package/dist/cdn/{7KCC74EE.js → LCHIHTFT.js} +1 -1
  73. package/dist/cdn/{MUGKSK5F.js → LKQBHGZ7.js} +1 -1
  74. package/dist/cdn/LOPKPGRY.js +2 -0
  75. package/dist/cdn/{HYYJZO6T.js → LRM2CLPW.js} +1 -1
  76. package/dist/cdn/LRM7ZHT5.js +2 -0
  77. package/dist/cdn/LSDUQPFS.js +2 -0
  78. package/dist/cdn/LTLVP6R6.js +2 -0
  79. package/dist/cdn/{7TEW7OYZ.js → MCSIAIDA.js} +1 -1
  80. package/dist/cdn/{HVBNJRAQ.js → MFSDYV4U.js} +1 -1
  81. package/dist/cdn/{LIJYENWJ.js → NCCVRAIB.js} +1 -1
  82. package/dist/cdn/{SYSNPKVM.js → NGDCIJ3J.js} +1 -1
  83. package/dist/cdn/{RA4KNUNM.js → NLVQFJ3Z.js} +1 -1
  84. package/dist/cdn/{WR6QBFCR.js → NU744SVB.js} +1 -1
  85. package/dist/cdn/{PS64W4X6.js → NXCII3YU.js} +1 -1
  86. package/dist/cdn/{XYAZINKS.js → O24SM7OF.js} +1 -1
  87. package/dist/cdn/{Z22BRBT4.js → O535TZZ6.js} +1 -1
  88. package/dist/cdn/O7YWW6X6.js +2 -0
  89. package/dist/cdn/OIYWPY2M.js +2 -0
  90. package/dist/cdn/{4MFRMO5M.js → OS5HZHBU.js} +1 -1
  91. package/dist/cdn/{DFXECQ6Z.js → OSCPBA6O.js} +1 -1
  92. package/dist/cdn/{GZNBU3BV.js → OX5RYOW4.js} +1 -1
  93. package/dist/cdn/{ED2GANBI.js → P3W4A5BT.js} +1 -1
  94. package/dist/cdn/{UTFS3HNB.js → PKKVWQIA.js} +1 -1
  95. package/dist/cdn/PT5LBDUL.js +2 -0
  96. package/dist/cdn/{MASQZEFU.js → Q5SNHQHW.js} +1 -1
  97. package/dist/cdn/QID335AW.js +2 -0
  98. package/dist/cdn/{HCJDTU7F.js → QMSQZWET.js} +1 -1
  99. package/dist/cdn/{MJCRT7H4.js → QX54642B.js} +1 -1
  100. package/dist/cdn/{XDOFVA4S.js → REPXOUSM.js} +1 -1
  101. package/dist/cdn/RJSLWYFJ.js +2 -0
  102. package/dist/cdn/RTJOU72W.js +2 -0
  103. package/dist/cdn/{A4OYPK5D.js → RZSXCJTK.js} +1 -1
  104. package/dist/cdn/S3FVUTIY.js +2 -0
  105. package/dist/cdn/SJYYS7RH.js +2 -0
  106. package/dist/cdn/SMSVNRM4.js +2 -0
  107. package/dist/cdn/{GDTRICJF.js → SSQXPR3D.js} +1 -1
  108. package/dist/cdn/{7CZHE7FZ.js → TBVIBCHL.js} +1 -1
  109. package/dist/cdn/{MTNYIXZQ.js → THSY4EQU.js} +1 -1
  110. package/dist/cdn/TR56QFJC.js +2 -0
  111. package/dist/cdn/{A22XLAKZ.js → TT5S3S4L.js} +1 -1
  112. package/dist/cdn/{BWUA5WU5.js → TWXMFG7A.js} +1 -1
  113. package/dist/cdn/{P7U46JDU.js → U3AOFOT7.js} +1 -1
  114. package/dist/cdn/UPE6RIV2.js +2 -0
  115. package/dist/cdn/{7CLOFSLV.js → V4NX2X3B.js} +1 -1
  116. package/dist/cdn/V6NB5CGO.js +2 -0
  117. package/dist/cdn/{ILES2J66.js → VESBDAE7.js} +1 -1
  118. package/dist/cdn/{V4KATS7H.js → VKQJIDXT.js} +1 -1
  119. package/dist/cdn/{IMOAPVVW.js → VMMRWNOB.js} +1 -1
  120. package/dist/cdn/{IOSK2I75.js → W4HQGAKN.js} +1 -1
  121. package/dist/cdn/{FRI4RPRX.js → W5FGAVGO.js} +1 -1
  122. package/dist/cdn/{XLGGANFA.js → W5HANC6S.js} +1 -1
  123. package/dist/cdn/{37APBABQ.js → WBP5XEJH.js} +1 -1
  124. package/dist/cdn/{5WKPS2ZT.js → WE2SWJDR.js} +1 -1
  125. package/dist/cdn/{WAC3IAWB.js → WNADDPUF.js} +1 -1
  126. package/dist/cdn/{GAUJK4Z7.js → XGRU4PI2.js} +1 -1
  127. package/dist/cdn/{TCAGY7OI.js → XI7FVSES.js} +1 -1
  128. package/dist/cdn/{LRL6N22U.js → XRGPWSUO.js} +1 -1
  129. package/dist/cdn/{3W4NT367.js → XZX7ZHUA.js} +1 -1
  130. package/dist/cdn/{6NGWODBG.js → Y36WJADK.js} +1 -1
  131. package/dist/cdn/{TLAXB6HU.js → Y555OQ57.js} +1 -1
  132. package/dist/cdn/{GM6FZWSL.js → YBIQF3JQ.js} +1 -1
  133. package/dist/cdn/{ULBA6IRN.js → YGHVUKLM.js} +1 -1
  134. package/dist/cdn/{RRHN2PDB.js → YGKHTZ4V.js} +1 -1
  135. package/dist/cdn/{KKH2HVQW.js → YNGZPTWY.js} +1 -1
  136. package/dist/cdn/{S22OVJTO.js → YPOMUQHV.js} +2 -2
  137. package/dist/cdn/{RSCA2AM5.js → YWIQC7RF.js} +1 -1
  138. package/dist/cdn/{ZIOXZBYF.js → ZB7NSHVW.js} +1 -1
  139. package/dist/cdn/{EW6277QZ.js → ZCJDNXK2.js} +1 -1
  140. package/dist/cdn/{GFZYTB3O.js → ZHOHVRUX.js} +1 -1
  141. package/dist/cdn/index.js +1 -1
  142. package/dist/chunks/ExpandToggle.js +4 -5
  143. package/dist/chunks/dom.js +22 -29
  144. package/dist/chunks/floating-ui.js +2 -2
  145. package/dist/chunks/input.js +17 -7
  146. package/dist/chunks/label.js +1 -1
  147. package/dist/chunks/openCloseComponent.js +1 -1
  148. package/dist/chunks/runtime.js +4 -4
  149. package/dist/chunks/useFocusTrap.js +1 -1
  150. package/dist/chunks/useSetFocus.js +1 -1
  151. package/dist/chunks/utils2.js +1 -1
  152. package/dist/components/calcite-accordion-item/customElement.js +4 -3
  153. package/dist/components/calcite-action-bar/customElement.d.ts +9 -0
  154. package/dist/components/calcite-action-bar/customElement.js +40 -13
  155. package/dist/components/calcite-action-pad/customElement.js +4 -2
  156. package/dist/components/calcite-alert/customElement.js +1 -1
  157. package/dist/components/calcite-autocomplete/customElement.js +3 -1
  158. package/dist/components/calcite-avatar/customElement.js +1 -1
  159. package/dist/components/calcite-block/customElement.js +1 -1
  160. package/dist/components/calcite-block-group/customElement.js +1 -1
  161. package/dist/components/calcite-button/customElement.js +1 -1
  162. package/dist/components/calcite-carousel/customElement.js +27 -25
  163. package/dist/components/calcite-checkbox/customElement.js +3 -2
  164. package/dist/components/calcite-chip/customElement.js +1 -1
  165. package/dist/components/calcite-chip-group/customElement.js +1 -1
  166. package/dist/components/calcite-color-picker/customElement.js +4 -2
  167. package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
  168. package/dist/components/calcite-combobox/customElement.d.ts +11 -1
  169. package/dist/components/calcite-combobox/customElement.js +8 -3
  170. package/dist/components/calcite-combobox-item/customElement.js +10 -4
  171. package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
  172. package/dist/components/calcite-dialog/customElement.d.ts +2 -2
  173. package/dist/components/calcite-dialog/customElement.js +1 -1
  174. package/dist/components/calcite-dropdown/customElement.js +4 -1
  175. package/dist/components/calcite-flow-item/customElement.d.ts +3 -3
  176. package/dist/components/calcite-flow-item/customElement.js +3 -3
  177. package/dist/components/calcite-icon/customElement.js +4 -3
  178. package/dist/components/calcite-inline-editable/customElement.js +1 -1
  179. package/dist/components/calcite-input/customElement.js +4 -3
  180. package/dist/components/calcite-input-date-picker/customElement.js +3 -0
  181. package/dist/components/calcite-input-message/customElement.js +1 -1
  182. package/dist/components/calcite-input-number/customElement.js +4 -3
  183. package/dist/components/calcite-input-text/customElement.d.ts +1 -1
  184. package/dist/components/calcite-input-text/customElement.js +174 -27
  185. package/dist/components/calcite-input-time-picker/customElement.js +3 -2
  186. package/dist/components/calcite-link/customElement.js +4 -3
  187. package/dist/components/calcite-list/customElement.js +1 -1
  188. package/dist/components/calcite-list-item/customElement.js +5 -3
  189. package/dist/components/calcite-menu/customElement.js +1 -1
  190. package/dist/components/calcite-menu-item/customElement.js +4 -2
  191. package/dist/components/calcite-meter/customElement.js +1 -1
  192. package/dist/components/calcite-notice/customElement.js +1 -1
  193. package/dist/components/calcite-panel/customElement.d.ts +4 -4
  194. package/dist/components/calcite-panel/customElement.js +1 -1
  195. package/dist/components/calcite-popover/customElement.js +4 -1
  196. package/dist/components/calcite-progress/customElement.js +3 -2
  197. package/dist/components/calcite-radio-button/customElement.js +3 -3
  198. package/dist/components/calcite-scrim/customElement.js +1 -1
  199. package/dist/components/calcite-segmented-control/customElement.js +5 -3
  200. package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
  201. package/dist/components/calcite-sheet/customElement.js +8 -5
  202. package/dist/components/calcite-shell/customElement.js +1 -1
  203. package/dist/components/calcite-shell-panel/customElement.js +7 -5
  204. package/dist/components/calcite-slider/customElement.js +1 -1
  205. package/dist/components/calcite-sortable-list/customElement.js +1 -1
  206. package/dist/components/calcite-stepper/customElement.js +1 -1
  207. package/dist/components/calcite-stepper-item/customElement.js +1 -1
  208. package/dist/components/calcite-swatch-group/customElement.js +1 -1
  209. package/dist/components/calcite-tab/customElement.js +1 -1
  210. package/dist/components/calcite-tab-nav/customElement.js +4 -2
  211. package/dist/components/calcite-tab-title/customElement.js +5 -3
  212. package/dist/components/calcite-table-cell/customElement.js +3 -2
  213. package/dist/components/calcite-tabs/customElement.js +1 -1
  214. package/dist/components/calcite-time-picker/customElement.js +3 -2
  215. package/dist/components/calcite-tooltip/customElement.js +4 -1
  216. package/dist/components/calcite-tree/customElement.js +1 -1
  217. package/dist/components/calcite-tree-item/customElement.js +4 -2
  218. package/dist/controllers/useForm.d.ts +3 -0
  219. package/dist/docs/api.json +1 -1
  220. package/dist/docs/docs.json +1 -1
  221. package/dist/docs/supported-browsers.json +1 -1
  222. package/dist/docs/vscode.css-custom-data.json +1 -1
  223. package/dist/docs/vscode.html-custom-data.json +1 -1
  224. package/dist/docs/web-types.json +1 -1
  225. package/dist/loader.js +4 -4
  226. package/dist/types/lumina.d.ts +2 -2
  227. package/dist/types/preact.d.ts +2 -2
  228. package/dist/types/react.d.ts +2 -2
  229. package/dist/types/stencil.d.ts +2 -2
  230. package/package.json +7 -7
  231. package/dist/cdn/256EMMKX.js +0 -2
  232. package/dist/cdn/3OIE2RR5.js +0 -2
  233. package/dist/cdn/43T3HPVW.js +0 -2
  234. package/dist/cdn/4ET37OQN.js +0 -2
  235. package/dist/cdn/4SJVPWEI.js +0 -2
  236. package/dist/cdn/7WPF3NTF.js +0 -2
  237. package/dist/cdn/F7SGO63N.js +0 -2
  238. package/dist/cdn/G6R56WT6.js +0 -2
  239. package/dist/cdn/HBVQ77SB.js +0 -2
  240. package/dist/cdn/HD23H6LX.js +0 -2
  241. package/dist/cdn/I6CQ5UW5.js +0 -2
  242. package/dist/cdn/IR6Z2XSF.js +0 -2
  243. package/dist/cdn/IUAHSZQ6.js +0 -2
  244. package/dist/cdn/JLB2FYLL.js +0 -2
  245. package/dist/cdn/JRCEHRYP.js +0 -2
  246. package/dist/cdn/L6F7C3O7.js +0 -2
  247. package/dist/cdn/LIZ5IMMJ.js +0 -2
  248. package/dist/cdn/LR57FDVO.js +0 -2
  249. package/dist/cdn/LYKD5N65.js +0 -2
  250. package/dist/cdn/MAXAPKJ5.js +0 -2
  251. package/dist/cdn/MQPFYNQR.js +0 -2
  252. package/dist/cdn/N6QRZM7N.js +0 -2
  253. package/dist/cdn/NQEVKT6K.js +0 -2
  254. package/dist/cdn/OS7NHPEF.js +0 -2
  255. package/dist/cdn/P7RXOG72.js +0 -2
  256. package/dist/cdn/PBMFDSRI.js +0 -2
  257. package/dist/cdn/Q52SIZ3L.js +0 -2
  258. package/dist/cdn/R6YSSNOG.js +0 -2
  259. package/dist/cdn/SFEXJ2YW.js +0 -2
  260. package/dist/cdn/TPXLAPIE.js +0 -2
  261. package/dist/cdn/TSZAQNPK.js +0 -2
  262. package/dist/cdn/U6LKEFFT.js +0 -2
  263. package/dist/cdn/UAADJQTQ.js +0 -2
  264. package/dist/cdn/UOIMVKXE.js +0 -2
  265. package/dist/cdn/XSSG2WBN.js +0 -2
  266. package/dist/cdn/YHGC7HRA.js +0 -2
  267. package/dist/cdn/Z53AVC5H.js +0 -2
  268. package/dist/cdn/ZXUITROT.js +0 -2
@@ -4,17 +4,175 @@ import { live } from "lit/directives/live.js";
4
4
  import { css, html, nothing } from "lit";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
7
- import { useWatchAttributes } from "@arcgis/lumina/controllers";
8
- import { d as setRequestedIcon, g as getElementDir } from "../../chunks/dom.js";
9
- import { c as connectForm, i as internalHiddenInputInputEvent, d as disconnectForm, s as submitForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
7
+ import { makeGenericController, useWatchAttributes, useDirection } from "@arcgis/lumina/controllers";
8
+ import { b as setRequestedIcon } from "../../chunks/dom.js";
9
+ import { uncapitalize, kebabToPascal } from "@arcgis/toolkit/string";
10
+ import { a as syncInputDelegate, i as isSupportedType } from "../../chunks/input.js";
10
11
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
11
12
  import { g as getIconScale } from "../../chunks/component.js";
12
13
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
13
14
  import { V as Validation } from "../../chunks/Validation.js";
14
- import { s as syncHiddenFormInput } from "../../chunks/input.js";
15
15
  import { u as useT9n } from "../../chunks/useT9n.js";
16
16
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
17
17
  import { u as useInteractive } from "../../chunks/useInteractive.js";
18
+ const componentsWithInputEvent = [
19
+ "calcite-input",
20
+ "calcite-input-number",
21
+ "calcite-input-text",
22
+ "calcite-text-area"
23
+ ];
24
+ function getClearValidationEventName(componentTag) {
25
+ const componentTagCamelCase = uncapitalize(kebabToPascal(componentTag));
26
+ return `${componentTagCamelCase}${componentsWithInputEvent.includes(componentTag) ? "Input" : "Change"}`;
27
+ }
28
+ function displayValidationMessage(component, { status, message, icon }) {
29
+ if ("status" in component) {
30
+ component.status = status;
31
+ }
32
+ if ("validationIcon" in component && typeof component.validationIcon !== "string") {
33
+ component.validationIcon = icon;
34
+ }
35
+ if ("validationMessage" in component && !component.validationMessage) {
36
+ component.validationMessage = message;
37
+ }
38
+ }
39
+ function syncInternalInput(component, input) {
40
+ const { disabled, required } = component;
41
+ input.disabled = disabled;
42
+ input.required = !!required;
43
+ if (isCheckable(component)) {
44
+ input.checked = component.checked;
45
+ } else if (isInputComponent(component, input)) {
46
+ syncInputDelegate(input.type, component, input);
47
+ }
48
+ }
49
+ function isCheckable(component) {
50
+ return "checked" in component;
51
+ }
52
+ function isInputComponent(component, input) {
53
+ return component && isSupportedType(input.type);
54
+ }
55
+ const useForm = (options) => {
56
+ return makeGenericController((component, controller) => {
57
+ let defaultValueDirty = false;
58
+ let defaultCheckedDirty = false;
59
+ let inputDelegate;
60
+ let lastAssociatedForm = null;
61
+ if (options.inputType) {
62
+ inputDelegate = document.createElement("input");
63
+ inputDelegate.type = options.inputType;
64
+ }
65
+ function invalidFormHandler(event) {
66
+ event?.preventDefault();
67
+ }
68
+ function onFormReset() {
69
+ if ("status" in component) {
70
+ component.status = "idle";
71
+ }
72
+ if ("validationIcon" in component) {
73
+ component.validationIcon = false;
74
+ }
75
+ if ("validationMessage" in component) {
76
+ component.validationMessage = "";
77
+ }
78
+ if (isCheckable(component)) {
79
+ component.checked = defaultCheckedDirty ? component.defaultChecked : component.checked;
80
+ }
81
+ component.value = defaultValueDirty ? component.defaultValue : component.value;
82
+ defaultValueDirty = false;
83
+ defaultCheckedDirty = false;
84
+ }
85
+ component.listen("luminaFormResetCallback", () => {
86
+ onFormReset();
87
+ });
88
+ component.listen("luminaFormAssociatedCallback", ({ detail: [form] }) => {
89
+ if (form) {
90
+ form.addEventListener("invalid", invalidFormHandler, { capture: true });
91
+ } else {
92
+ lastAssociatedForm?.removeEventListener("invalid", invalidFormHandler, { capture: true });
93
+ }
94
+ lastAssociatedForm = form;
95
+ });
96
+ function handleInvalidInput() {
97
+ const validationMsg = inputDelegate?.validationMessage || "";
98
+ component.el.dispatchEvent(
99
+ // allows users to set custom validation messages
100
+ new CustomEvent("calciteInvalid", { bubbles: true, composed: true })
101
+ );
102
+ displayValidationMessage(component, {
103
+ message: validationMsg,
104
+ icon: true,
105
+ status: "invalid"
106
+ });
107
+ const clearValidationEvent = getClearValidationEventName(component.el.tagName.toLowerCase());
108
+ component.listen(
109
+ clearValidationEvent,
110
+ () => {
111
+ if ("status" in component) {
112
+ component.status = "idle";
113
+ }
114
+ if ("validationIcon" in component && (!component.validationIcon || component.validationIcon === true)) {
115
+ component.validationIcon = false;
116
+ }
117
+ if ("validationMessage" in component && component.validationMessage === validationMsg) {
118
+ component.validationMessage = "";
119
+ }
120
+ },
121
+ { once: true }
122
+ );
123
+ }
124
+ controller.onConnected(() => {
125
+ component.el.addEventListener("invalid", handleInvalidInput);
126
+ });
127
+ controller.onDisconnected(() => {
128
+ component.el.removeEventListener("invalid", handleInvalidInput);
129
+ });
130
+ controller.onUpdate((changes) => {
131
+ if (changes.has("value") && !defaultValueDirty) {
132
+ defaultValueDirty = true;
133
+ component.defaultValue = component.value;
134
+ }
135
+ if (isCheckable(component) && changes.has("checked") && !defaultCheckedDirty) {
136
+ defaultCheckedDirty = true;
137
+ component.defaultChecked = component.checked;
138
+ }
139
+ if (changes.has("value") || isCheckable(component) && changes.has("checked")) {
140
+ component.elementInternals.setFormValue(getFormValue());
141
+ }
142
+ if (inputDelegate) {
143
+ inputDelegate.value = component.value;
144
+ syncInternalInput(component, inputDelegate);
145
+ inputDelegate.checkValidity();
146
+ component.elementInternals.setValidity(inputDelegate.validity, inputDelegate.validationMessage);
147
+ if ("validity" in component) {
148
+ component.validity = component.elementInternals.validity;
149
+ }
150
+ }
151
+ });
152
+ function getFormValue() {
153
+ if (Array.isArray(component.value)) {
154
+ const formData = new FormData();
155
+ component.value.forEach((value) => formData.append(component.name, value));
156
+ return formData;
157
+ }
158
+ if (isCheckable(component)) {
159
+ if (component.checked) {
160
+ return component.defaultValue === void 0 && !defaultValueDirty && component.value === void 0 ? "on" : component.value;
161
+ }
162
+ return null;
163
+ }
164
+ return component.value;
165
+ }
166
+ return {
167
+ get active() {
168
+ return !!component.elementInternals.form;
169
+ },
170
+ requestSubmit: () => {
171
+ component.elementInternals.form?.requestSubmit();
172
+ }
173
+ };
174
+ });
175
+ };
18
176
  const CSS = {
19
177
  loader: "loader",
20
178
  clearable: "clearable",
@@ -43,22 +201,16 @@ class InputText extends LitElement {
43
201
  this.actionWrapperRef = createRef();
44
202
  this.attributeWatch = useWatchAttributes(["autofocus", "enterkeyhint", "inputmode", "spellcheck"], this.handleGlobalAttributesChanged);
45
203
  this.childRef = createRef();
204
+ this.direction = useDirection();
46
205
  this.inputWrapperRef = createRef();
47
- this.onHiddenFormInputInput = (event) => {
48
- if (event.target.name === this.name) {
49
- this.setValue({
50
- value: event.target.value,
51
- origin: "direct"
52
- });
53
- }
54
- this.setFocus();
55
- event.stopPropagation();
56
- };
57
206
  this.previousValueOrigin = "initial";
58
207
  this.userChangedValue = false;
59
208
  this._value = "";
60
209
  this.messages = useT9n();
61
210
  this.focusSetter = useSetFocus()(this);
211
+ this.formSupport = useForm({
212
+ inputType: "text"
213
+ })(this);
62
214
  this.interactiveContainer = useInteractive(this);
63
215
  this.slottedActionElDisabledInternally = false;
64
216
  this.alignment = "start";
@@ -94,6 +246,9 @@ class InputText extends LitElement {
94
246
  static {
95
247
  this.properties = { slottedActionElDisabledInternally: [16, {}, { state: true }], alignment: [3, {}, { reflect: true }], autocomplete: 1, clearable: [7, {}, { reflect: true, type: Boolean }], disabled: [7, {}, { reflect: true, type: Boolean }], editingEnabled: [7, {}, { reflect: true, type: Boolean }], form: [3, {}, { reflect: true }], icon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], iconFlipRtl: [7, {}, { reflect: true, type: Boolean }], label: 1, labelText: 1, loading: [7, {}, { reflect: true, type: Boolean }], maxLength: [11, {}, { reflect: true, type: Number }], messageOverrides: [0, {}, { attribute: false }], minLength: [11, {}, { reflect: true, type: Number }], name: [3, {}, { reflect: true }], pattern: 1, placeholder: 1, prefixText: 1, readOnly: [7, {}, { reflect: true, type: Boolean }], required: [7, {}, { reflect: true, type: Boolean }], scale: [3, {}, { reflect: true }], status: [3, {}, { reflect: true }], suffixText: 1, validationIcon: [3, { converter: stringOrBoolean, type: String }, { reflect: true }], validationMessage: 1, validity: [0, {}, { attribute: false }], value: 1 };
96
248
  }
249
+ static {
250
+ this.formAssociated = true;
251
+ }
97
252
  static {
98
253
  this.styles = styles;
99
254
  }
@@ -123,8 +278,6 @@ class InputText extends LitElement {
123
278
  this.editingEnabled = this.inlineEditableEl.editingEnabled || false;
124
279
  }
125
280
  connectLabel(this);
126
- connectForm(this);
127
- this.el.addEventListener(internalHiddenInputInputEvent, this.onHiddenFormInputInput);
128
281
  }
129
282
  async load() {
130
283
  this.requestedIcon = setRequestedIcon({}, this.icon, "text");
@@ -139,8 +292,6 @@ class InputText extends LitElement {
139
292
  disconnectedCallback() {
140
293
  super.disconnectedCallback();
141
294
  disconnectLabel(this);
142
- disconnectForm(this);
143
- this.el.removeEventListener(internalHiddenInputInputEvent, this.onHiddenFormInputInput);
144
295
  }
145
296
  handleGlobalAttributesChanged() {
146
297
  this.requestUpdate();
@@ -163,10 +314,9 @@ class InputText extends LitElement {
163
314
  this.clearInputTextValue(event);
164
315
  event.preventDefault();
165
316
  }
166
- if (event.key === "Enter") {
167
- if (submitForm(this)) {
168
- event.preventDefault();
169
- }
317
+ if (event.key === "Enter" && this.formSupport.active) {
318
+ this.formSupport.requestSubmit();
319
+ event.preventDefault();
170
320
  }
171
321
  }
172
322
  onLabelClick() {
@@ -227,9 +377,6 @@ class InputText extends LitElement {
227
377
  this.emitChangeIfUserModified();
228
378
  }
229
379
  }
230
- syncHiddenFormInput(input) {
231
- syncHiddenFormInput("text", this, input);
232
- }
233
380
  setInputValue(newInputValue) {
234
381
  if (!this.childRef.value) {
235
382
  return;
@@ -261,7 +408,7 @@ class InputText extends LitElement {
261
408
  }
262
409
  }
263
410
  render() {
264
- const dir = getElementDir(this.el);
411
+ const dir = this.direction;
265
412
  const loader = html`<div class=${safeClassMap(CSS.loader)}><calcite-progress .label=${this.messages.loading} type=indeterminate></calcite-progress></div>`;
266
413
  const inputClearButton = html`<button .ariaLabel=${this.messages.clear} class=${safeClassMap(CSS.clearButton)} .disabled=${this.disabled || this.readOnly} @click=${this.clearInputTextValue} tabindex=-1 type=button><calcite-icon icon=x .scale=${getIconScale(this.scale)}></calcite-icon></button>`;
267
414
  const iconEl = html`<calcite-icon class=${safeClassMap(CSS.inputIcon)} .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${getIconScale(this.scale)}></calcite-icon>`;
@@ -277,7 +424,7 @@ class InputText extends LitElement {
277
424
  [CSS.clearable]: this.isClearable,
278
425
  [CSS.hasSuffix]: this.suffixText,
279
426
  [CSS.hasPrefix]: this.prefixText
280
- })} ${ref(this.inputWrapperRef)}>${this.prefixText ? prefixText : null}<div class=${safeClassMap(CSS.wrapper)}>${childEl}${this.isClearable ? inputClearButton : null}${this.requestedIcon ? iconEl : null}${this.loading ? loader : null}</div><div class=${safeClassMap(CSS.actionWrapper)} ${ref(this.actionWrapperRef)}><slot name=${SLOTS.action}></slot></div>${this.suffixText ? suffixText : null}${HiddenFormInputSlot({ component: this })}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
427
+ })} ${ref(this.inputWrapperRef)}>${this.prefixText ? prefixText : null}<div class=${safeClassMap(CSS.wrapper)}>${childEl}${this.isClearable ? inputClearButton : null}${this.requestedIcon ? iconEl : null}${this.loading ? loader : null}</div><div class=${safeClassMap(CSS.actionWrapper)} ${ref(this.actionWrapperRef)}><slot name=${SLOTS.action}></slot></div>${this.suffixText ? suffixText : null}</div>${this.validationMessage && this.status === "invalid" ? Validation({ icon: this.validationIcon, id: IDS.validationMessage, message: this.validationMessage, scale: this.scale, status: this.status }) : null}` });
281
428
  }
282
429
  }
283
430
  customElement("calcite-input-text", InputText);
@@ -3,13 +3,13 @@ import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, nothing, html } from "lit";
4
4
  import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
+ import { useDirection } from "@arcgis/lumina/controllers";
6
7
  import { c as connectForm, d as disconnectForm, s as submitForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
7
8
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
8
9
  import { d as decimalPlaces } from "../../chunks/math.js";
9
10
  import { g as getIconScale } from "../../chunks/component.js";
10
11
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
11
12
  import { V as Validation } from "../../chunks/Validation.js";
12
- import { g as getElementDir } from "../../chunks/dom.js";
13
13
  import { s as syncHiddenFormInput } from "../../chunks/input.js";
14
14
  import { u as useT9n } from "../../chunks/useT9n.js";
15
15
  import { i as isValidNumber } from "../../chunks/locale.js";
@@ -49,6 +49,7 @@ class InputTimePicker extends LitElement {
49
49
  super();
50
50
  this.messages = useT9n();
51
51
  this.containerRef = createRef();
52
+ this.direction = useDirection();
52
53
  this.focusSetter = useSetFocus()(this);
53
54
  this.fractionalSecondRef = createRef();
54
55
  this.hourRef = createRef();
@@ -311,7 +312,7 @@ class InputTimePicker extends LitElement {
311
312
  const showFractionalSecond = decimalPlaces(this.step) > 0;
312
313
  const showMeridiem = hourFormat === "12";
313
314
  const showSecond = this.step < 60;
314
- const meridiemStart = meridiemOrder === 0 || getElementDir(this.el) === "rtl";
315
+ const meridiemStart = meridiemOrder === 0 || this.direction === "rtl";
315
316
  const isInteractive = !this.disabled && !this.readOnly;
316
317
  return this.interactiveContainer({ disabled: this.disabled, children: html`${this.labelText && InternalLabel({ labelText: this.labelText, onClick: this.onLabelClick, required: this.required, tooltipText: this.messages.required }) || ""}<div aria-controls=${IDS.inputContainer} aria-labelledby=${IDS.inputContainer} class=${safeClassMap({
317
318
  [CSS.container]: true,
@@ -4,7 +4,7 @@ import { css, html } from "lit";
4
4
  import { literal, html as html$1 } from "lit/static-html.js";
5
5
  import { LitElement, stringOrBoolean, safeClassMap, nothing } from "@arcgis/lumina";
6
6
  import { createRef, ref } from "lit/directives/ref.js";
7
- import { g as getElementDir } from "../../chunks/dom.js";
7
+ import { useDirection } from "@arcgis/lumina/controllers";
8
8
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
9
9
  import { u as useInteractive } from "../../chunks/useInteractive.js";
10
10
  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}:host a,:host button{position:relative;display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0;border-style:none;font-family:inherit;text-decoration:none;line-height:inherit;font-size:inherit;-webkit-appearance:none}:host a:hover,:host button:hover{text-decoration:none}:host a,:host button{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform,background-size;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}calcite-icon{inline-size:1em;block-size:1em;min-inline-size:unset;min-block-size:unset}.calcite-link--icon{vertical-align:middle;margin-block-start:-.25em}:host .calcite-link--icon.icon-start{margin-inline-end:.5rem}:host .calcite-link--icon.icon-end{margin-inline-start:.5rem}:host button,:host a{position:relative;display:inline;border-style:none;background-color:transparent;padding:0;color:var(--calcite-link-text-color, var(--calcite-color-text-link));line-height:inherit;white-space:initial;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px}:host button:hover,:host button:focus,:host a:hover,:host a:focus{background-size:100% 1px,100% 1px}:host button:active,:host a:active{background-size:100% 2px,100% 2px}:host button.calcite--rtl,:host a.calcite--rtl{background-position:100% 100%,100% 100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;
@@ -17,6 +17,7 @@ class Link extends LitElement {
17
17
  constructor() {
18
18
  super();
19
19
  this.childRef = createRef();
20
+ this.direction = useDirection();
20
21
  this.focusSetter = useSetFocus()(this);
21
22
  this.interactiveContainer = useInteractive(this);
22
23
  this.disabled = false;
@@ -46,8 +47,8 @@ class Link extends LitElement {
46
47
  }
47
48
  }
48
49
  render() {
49
- const { download, el } = this;
50
- const dir = getElementDir(el);
50
+ const { download } = this;
51
+ const dir = this.direction;
51
52
  const childElType = this.href ? "a" : "button";
52
53
  const iconStartEl = html`<calcite-icon class=${safeClassMap({ [CSS.calciteLinkIcon]: true, [CSS.iconStart]: true })} .flipRtl=${this.iconFlipRtl === "start" || this.iconFlipRtl === "both"} .icon=${this.iconStart} scale=s></calcite-icon>`;
53
54
  const iconEndEl = html`<calcite-icon class=${safeClassMap({ [CSS.calciteLinkIcon]: true, [CSS.iconEnd]: true })} .flipRtl=${this.iconFlipRtl === "end" || this.iconFlipRtl === "both"} .icon=${this.iconEnd} scale=s></calcite-icon>`;
@@ -5,7 +5,7 @@ import { keyed } from "lit/directives/keyed.js";
5
5
  import { debounce } from "es-toolkit";
6
6
  import { css, html } from "lit";
7
7
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
8
- import { n as slotChangeHasContent, s as slotChangeHasAssignedElement, h as getRootNode } from "../../chunks/dom.js";
8
+ import { m as slotChangeHasContent, s as slotChangeHasAssignedElement, e as getRootNode } from "../../chunks/dom.js";
9
9
  import { c as createObserver } from "../../chunks/observers.js";
10
10
  import { l as listItemSelector, i as isListItem, a as listSelector, u as updateListItemChildren, b as listItemGroupSelector, e as expandedAncestors } from "../../chunks/utils4.js";
11
11
  import { d as disconnectSortableComponent, c as connectSortableComponent } from "../../chunks/sortableComponent.js";
@@ -4,7 +4,8 @@ import { keyed } from "lit/directives/keyed.js";
4
4
  import { css, html, nothing } from "lit";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
7
- import { s as slotChangeHasAssignedElement, v as getFirstTabbable, g as getElementDir } from "../../chunks/dom.js";
7
+ import { useDirection } from "@arcgis/lumina/controllers";
8
+ import { s as slotChangeHasAssignedElement, u as getFirstTabbable } from "../../chunks/dom.js";
8
9
  import { u as useT9n } from "../../chunks/useT9n.js";
9
10
  import { g as getIconScale } from "../../chunks/component.js";
10
11
  import { l as logger } from "../../chunks/logger.js";
@@ -23,6 +24,7 @@ class ListItem extends LitElement {
23
24
  this.containerRef = createRef();
24
25
  this.contentRef = createRef();
25
26
  this.defaultSlotRef = createRef();
27
+ this.direction = useDirection();
26
28
  this.handleGridRef = createRef();
27
29
  this.messages = useT9n();
28
30
  this.focusSetter = useSetFocus()(this);
@@ -375,11 +377,11 @@ class ListItem extends LitElement {
375
377
  return dragHandle ? keyed("drag-handle-container", html`<div .ariaLabel=${label} class=${safeClassMap({ [CSS.dragContainer]: true, [CSS.gridCell]: true })} role=gridcell ${ref(this.handleGridRef)}><calcite-sort-handle .addToItems=${addToItems} .disabled=${dragDisabled} .label=${label} .moveToItems=${moveToItems} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${setPosition} .setSize=${setSize} .sortDisabled=${sortDisabled} .topLayerDisabled=${this.topLayerDisabled} ${ref(this.setSortHandleEl)}></calcite-sort-handle></div>`) : null;
376
378
  }
377
379
  renderExpanded() {
378
- const { el, expanded, expandable, messages, displayMode, scale } = this;
380
+ const { expanded, expandable, messages, displayMode, scale } = this;
379
381
  if (displayMode !== "nested") {
380
382
  return null;
381
383
  }
382
- const dir = getElementDir(el);
384
+ const dir = this.direction;
383
385
  const icon = expandable ? expanded ? ICONS.open : dir === "rtl" ? ICONS.collapsedRTL : ICONS.collapsedLTR : ICONS.blank;
384
386
  const iconScale = getIconScale(scale);
385
387
  const tooltip = expandable ? expanded ? messages.collapse : messages.expand : void 0;
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, html } from "lit";
4
4
  import { LitElement } from "@arcgis/lumina";
5
5
  import { useWatchAttributes } from "@arcgis/lumina/controllers";
6
- import { f as focusElementInGroup, b as slotChangeGetAssignedElements, j as focusElement } from "../../chunks/dom.js";
6
+ import { f as focusElementInGroup, a as slotChangeGetAssignedElements, i as focusElement } from "../../chunks/dom.js";
7
7
  import { u as useT9n } from "../../chunks/useT9n.js";
8
8
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
9
9
  const styles = css`:host{display:flex}ul{margin:0;display:inline-flex;block-size:100%;align-items:center;padding:0}:host([layout=vertical]) ul{display:flex;inline-size:100%;flex-direction:column}:host([hidden]){display:none}[hidden]{display:none}`;
@@ -4,7 +4,8 @@ import { css, html } from "lit";
4
4
  import { keyed } from "lit/directives/keyed.js";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { LitElement, createEvent, safeClassMap, nothing } from "@arcgis/lumina";
7
- import { b as slotChangeGetAssignedElements, g as getElementDir } from "../../chunks/dom.js";
7
+ import { useDirection } from "@arcgis/lumina/controllers";
8
+ import { a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
8
9
  import { u as useT9n } from "../../chunks/useT9n.js";
9
10
  import { u as useSetFocus } from "../../chunks/useSetFocus.js";
10
11
  const CSS = {
@@ -42,6 +43,7 @@ class MenuItem extends LitElement {
42
43
  constructor() {
43
44
  super();
44
45
  this.anchorRef = createRef();
46
+ this.direction = useDirection();
45
47
  this.dropdownActionRef = createRef();
46
48
  this.messages = useT9n();
47
49
  this.focusSetter = useSetFocus()(this);
@@ -193,7 +195,7 @@ class MenuItem extends LitElement {
193
195
  return html`${this.iconStart && this.renderIconStart() || ""}<div class=${safeClassMap(CSS.textContainer)}><span>${this.text}</span></div>${hasHref && this.renderHrefIcon(dir) || ""}${this.iconEnd && this.renderIconEnd() || ""}${this.breadcrumb ? this.renderBreadcrumbIcon(dir) : null}${!this.href && this.hasSubmenu ? this.renderDropdownIcon(dir) : null}`;
194
196
  }
195
197
  render() {
196
- const dir = getElementDir(this.el);
198
+ const dir = this.direction;
197
199
  return html`<li class=${safeClassMap({
198
200
  [CSS.container]: true,
199
201
  [CSS.isParentVertical]: this.topLevelMenuLayout === "vertical"
@@ -6,7 +6,7 @@ import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { LitElement, safeClassMap, safeStyleMap } from "@arcgis/lumina";
7
7
  import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm } from "../../chunks/form.js";
8
8
  import { n as numberStringFormatter } from "../../chunks/locale.js";
9
- import { x as intersects } from "../../chunks/dom.js";
9
+ import { v as intersects } from "../../chunks/dom.js";
10
10
  import { c as createObserver } from "../../chunks/observers.js";
11
11
  import { u as useT9n } from "../../chunks/useT9n.js";
12
12
  const CSS = {
@@ -3,7 +3,7 @@ import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, html } from "lit";
4
4
  import { createRef, ref } from "lit/directives/ref.js";
5
5
  import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
6
- import { d as setRequestedIcon, s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
6
+ import { b as setRequestedIcon, s as slotChangeHasAssignedElement } from "../../chunks/dom.js";
7
7
  import { K as KindIcons, a as KindIconsFilled } from "../../chunks/resources4.js";
8
8
  import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
9
9
  import { g as getIconScale } from "../../chunks/component.js";
@@ -12,8 +12,8 @@ import type { IconName } from "../calcite-icon/interfaces.js";
12
12
  * @cssproperty [--calcite-panel-description-text-color] - Specifies the text color of the component's `description`.
13
13
  * @cssproperty [--calcite-panel-border-color] - Specifies the component's border color.
14
14
  * @cssproperty [--calcite-panel-background-color] - Specifies the component's background color.
15
- * @cssproperty [--calcite-panel-content-top-space] - Specifies the padding of the `"content-top"` slot.
16
- * @cssproperty [--calcite-panel-content-bottom-space] - Specifies the padding of the `"content-bottom"` slot.
15
+ * @cssproperty [--calcite-panel-content-top-space] - Specifies the padding of the component's `content-top` slot.
16
+ * @cssproperty [--calcite-panel-content-bottom-space] - Specifies the padding of the component's `content-bottom` slot.
17
17
  * @cssproperty [--calcite-panel-header-background-color] - Specifies the background color of the component's header.
18
18
  * @cssproperty [--calcite-panel-header-action-background-color] - Specifies the background color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions`.
19
19
  * @cssproperty [--calcite-panel-header-action-background-color-hover] - Specifies the background color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions` when hovered.
@@ -21,8 +21,8 @@ import type { IconName } from "../calcite-icon/interfaces.js";
21
21
  * @cssproperty [--calcite-panel-header-action-text-color] - Specifies the text color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions`.
22
22
  * @cssproperty [--calcite-panel-header-action-text-color-press] - Specifies the text color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions` when pressed or hovered.
23
23
  * @cssproperty [--calcite-panel-footer-background-color] - Specifies the background color of the component's footer.
24
- * @cssproperty [--calcite-panel-space] - Specifies the padding of the component's `"unnamed (default)"` slot.
25
- * @cssproperty [--calcite-panel-header-content-space] - Specifies the padding of the `"header-content"` slot.
24
+ * @cssproperty [--calcite-panel-space] - Specifies the padding of the component's `unnamed (default)` slot.
25
+ * @cssproperty [--calcite-panel-header-content-space] - Specifies the padding of the component's `header-content` slot.
26
26
  * @cssproperty [--calcite-panel-footer-space] - Specifies the padding of the component's footer.
27
27
  * @cssproperty [--calcite-popover-border-color] - Specifies the border color of the component's internally rendered `calcite-popover`, which is rendered within a `calcite-action` menu when slotted `calcite-action`s are present in the `header-actions-end` slot. Applies to any slotted `calcite-popover`s.
28
28
  * @cssproperty [--calcite-panel-content-space] - [Deprecated] Use `--calcite-panel-space` instead. Specifies the padding of the component's content.
@@ -4,7 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
4
4
  import { css, html, nothing } from "lit";
5
5
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
6
6
  import { createRef, ref } from "lit/directives/ref.js";
7
- import { s as slotChangeHasAssignedElement, b as slotChangeGetAssignedElements } from "../../chunks/dom.js";
7
+ import { s as slotChangeHasAssignedElement, a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
8
8
  import { g as getIconScale } from "../../chunks/component.js";
9
9
  import { c as createObserver, u as updateRefObserver } from "../../chunks/observers.js";
10
10
  import { S as SLOTS$1 } from "../../chunks/resources2.js";
@@ -4,8 +4,9 @@ import { keyed } from "lit/directives/keyed.js";
4
4
  import { css, html } from "lit";
5
5
  import { LitElement, createEvent, safeClassMap, setAttribute } from "@arcgis/lumina";
6
6
  import { createRef, ref } from "lit/directives/ref.js";
7
+ import { useDirection } from "@arcgis/lumina/controllers";
7
8
  import { e as defaultOffsetDistance, r as reposition, a as disconnectFloatingUI, f as filterValidFlipPlacements, c as connectFloatingUI, h as hideFloatingUI, F as FloatingCSS } from "../../chunks/floating-ui.js";
8
- import { k as isPrimaryPointerButton, y as isKeyboardTriggeredClick, q as queryElementRoots } from "../../chunks/dom.js";
9
+ import { j as isPrimaryPointerButton, x as isKeyboardTriggeredClick, q as queryElementRoots } from "../../chunks/dom.js";
9
10
  import { t as toAriaBoolean } from "../../chunks/aria.js";
10
11
  import { g as guid } from "../../chunks/guid.js";
11
12
  import { t as toggleOpenClose } from "../../chunks/openCloseComponent.js";
@@ -129,6 +130,7 @@ const manager = new PopoverManager();
129
130
  class Popover extends LitElement {
130
131
  constructor() {
131
132
  super(...arguments);
133
+ this.direction = useDirection();
132
134
  this.focusTrap = useFocusTrap({
133
135
  triggerProp: "open",
134
136
  focusTrapOptions: {
@@ -181,6 +183,7 @@ class Popover extends LitElement {
181
183
  async reposition(delayed = false) {
182
184
  const { referenceEl, placement, overlayPositioning, flipDisabled, filteredFlipPlacements, offsetDistance, offsetSkidding, arrowEl, floatingEl } = this;
183
185
  return reposition(this, {
186
+ direction: this.direction,
184
187
  floatingEl,
185
188
  referenceEl,
186
189
  overlayPositioning,
@@ -2,7 +2,7 @@
2
2
  import { C as CSS_UTILITY, c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, html } from "lit";
4
4
  import { LitElement, safeClassMap, safeStyleMap } from "@arcgis/lumina";
5
- import { g as getElementDir } from "../../chunks/dom.js";
5
+ import { useDirection } from "@arcgis/lumina/controllers";
6
6
  const styles = css`:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:var(--calcite-z-index);inline-size:100%;overflow:hidden;background-color:var(--calcite-progress-background-color, var(--calcite-color-border-3))}.bar{z-index:var(--calcite-z-index);background-color:var(--calcite-progress-fill-color, var(--calcite-color-brand))}@media(forced-colors:active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) / var(--calcite-internal-duration-factor) * 11 / var(--calcite-internal-duration-factor)) linear infinite}.indeterminate.calcite--rtl{animation-name:looping-progress-bar-ani-rtl}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-progress-text-color, var(--calcite-color-text-2))}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%,0,0)}50%{inline-size:40%}to{transform:translate3d(600%,0,0)}}@keyframes looping-progress-bar-ani-rtl{0%{transform:translate3d(100%,0,0)}50%{inline-size:40%}to{transform:translate3d(-600%,0,0)}}:host([hidden]){display:none}[hidden]{display:none}`;
7
7
  const CSS = {
8
8
  track: "track",
@@ -12,6 +12,7 @@ const CSS = {
12
12
  class Progress extends LitElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
+ this.direction = useDirection();
15
16
  this.reversed = false;
16
17
  this.type = "determinate";
17
18
  this.value = 0;
@@ -25,7 +26,7 @@ class Progress extends LitElement {
25
26
  render() {
26
27
  const isDeterminate = this.type === "determinate";
27
28
  const barStyles = isDeterminate ? { width: `${this.value}%` } : {};
28
- const dir = getElementDir(this.el);
29
+ const dir = this.direction;
29
30
  return html`<div .ariaLabel=${this.label || this.text} .ariaValueMax=${isDeterminate ? "100" : void 0} .ariaValueMin=${isDeterminate ? "0" : void 0} .ariaValueNow=${isDeterminate ? this.value : void 0} role=progressbar><div class=${safeClassMap(CSS.track)}><div class=${safeClassMap({
30
31
  [CSS.bar]: true,
31
32
  indeterminate: this.type === "indeterminate",
@@ -3,8 +3,8 @@ import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, nothing, html } from "lit";
4
4
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
+ import { useDirection } from "@arcgis/lumina/controllers";
6
7
  import { g as getRoundRobinIndex } from "../../chunks/array.js";
7
- import { g as getElementDir } from "../../chunks/dom.js";
8
8
  import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
9
9
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
10
10
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
@@ -19,6 +19,7 @@ class RadioButton extends LitElement {
19
19
  constructor() {
20
20
  super();
21
21
  this.containerRef = createRef();
22
+ this.direction = useDirection();
22
23
  this.focusSetter = useSetFocus()(this);
23
24
  this.interactiveContainer = useInteractive(this);
24
25
  this.checked = false;
@@ -196,7 +197,6 @@ class RadioButton extends LitElement {
196
197
  handleKeyDown(event) {
197
198
  const keys = ["ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown", " "];
198
199
  const { key } = event;
199
- const { el } = this;
200
200
  if (keys.indexOf(key) === -1) {
201
201
  return;
202
202
  }
@@ -206,7 +206,7 @@ class RadioButton extends LitElement {
206
206
  return;
207
207
  }
208
208
  let adjustedKey = key;
209
- if (getElementDir(el) === "rtl") {
209
+ if (this.direction === "rtl") {
210
210
  if (key === "ArrowRight") {
211
211
  adjustedKey = "ArrowLeft";
212
212
  }
@@ -4,7 +4,7 @@ import { css, html } from "lit";
4
4
  import { LitElement, safeClassMap } from "@arcgis/lumina";
5
5
  import { createRef, ref } from "lit/directives/ref.js";
6
6
  import { c as createObserver } from "../../chunks/observers.js";
7
- import { n as slotChangeHasContent } from "../../chunks/dom.js";
7
+ import { m as slotChangeHasContent } from "../../chunks/dom.js";
8
8
  import { u as useT9n } from "../../chunks/useT9n.js";
9
9
  const CSS = {
10
10
  scrim: "scrim",
@@ -2,7 +2,8 @@
2
2
  import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, isServer, nothing, html } from "lit";
4
4
  import { LitElement, createEvent, stringOrBoolean, safeClassMap } from "@arcgis/lumina";
5
- import { g as getElementDir, b as slotChangeGetAssignedElements } from "../../chunks/dom.js";
5
+ import { useDirection } from "@arcgis/lumina/controllers";
6
+ import { a as slotChangeGetAssignedElements } from "../../chunks/dom.js";
6
7
  import { c as connectForm, a as afterConnectDefaultValueSet, d as disconnectForm, H as HiddenFormInputSlot } from "../../chunks/form.js";
7
8
  import { c as connectLabel, d as disconnectLabel, g as getLabelText } from "../../chunks/label.js";
8
9
  import { I as InternalLabel } from "../../chunks/InternalLabel.js";
@@ -20,6 +21,7 @@ const styles = css`:host([disabled]){cursor:default;-webkit-user-select:none;use
20
21
  class SegmentedControl extends LitElement {
21
22
  constructor() {
22
23
  super();
24
+ this.direction = useDirection();
23
25
  this.items = [];
24
26
  this.messages = useT9n();
25
27
  this.focusSetter = useSetFocus()(this);
@@ -119,12 +121,12 @@ class SegmentedControl extends LitElement {
119
121
  handleKeyDown(event) {
120
122
  const keys = ["ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown", " "];
121
123
  const { key } = event;
122
- const { el, selectedItem } = this;
124
+ const { selectedItem } = this;
123
125
  if (keys.indexOf(key) === -1) {
124
126
  return;
125
127
  }
126
128
  let adjustedKey = key;
127
- if (getElementDir(el) === "rtl") {
129
+ if (this.direction === "rtl") {
128
130
  if (key === "ArrowRight") {
129
131
  adjustedKey = "ArrowLeft";
130
132
  }
@@ -2,7 +2,7 @@
2
2
  import { c as customElement } from "../../chunks/runtime.js";
3
3
  import { css, html } from "lit";
4
4
  import { LitElement, createEvent, safeClassMap } from "@arcgis/lumina";
5
- import { n as slotChangeHasContent } from "../../chunks/dom.js";
5
+ import { m as slotChangeHasContent } from "../../chunks/dom.js";
6
6
  import { t as toAriaBoolean } from "../../chunks/aria.js";
7
7
  const SLOTS = {
8
8
  input: "input"