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

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 (269) hide show
  1. package/dist/cdn/{WUW46I4S.js → 22IPJDDL.js} +1 -1
  2. package/dist/cdn/25CWB6HX.js +2 -0
  3. package/dist/cdn/25YVFVC7.js +2 -0
  4. package/dist/cdn/{HJ45IHRA.js → 2GS6R2BX.js} +1 -1
  5. package/dist/cdn/2QARK4VJ.js +2 -0
  6. package/dist/cdn/{NPTVRXRO.js → 2Z4Z3NMS.js} +1 -1
  7. package/dist/cdn/{2SXQFDOQ.js → 3KLZFJXW.js} +1 -1
  8. package/dist/cdn/3L2WKJUB.js +2 -0
  9. package/dist/cdn/{DKD23HP3.js → 3LOKHBAB.js} +1 -1
  10. package/dist/cdn/3NNVHOGK.js +2 -0
  11. package/dist/cdn/{32TBZZTY.js → 3WLFK4RW.js} +1 -1
  12. package/dist/cdn/{A26SXPLB.js → 42NQN6DY.js} +1 -1
  13. package/dist/cdn/462JN5WF.js +2 -0
  14. package/dist/cdn/{XSMU7S2O.js → 464S36UH.js} +1 -1
  15. package/dist/cdn/{QHUMJCWK.js → 4ALKCXNH.js} +1 -1
  16. package/dist/cdn/4GQPJFUJ.js +2 -0
  17. package/dist/cdn/{FH7GL6DM.js → 4GVH7HTQ.js} +1 -1
  18. package/dist/cdn/{C7TED56N.js → 4J6YW6EK.js} +1 -1
  19. package/dist/cdn/{DADGP3DW.js → 52ZOO5HQ.js} +1 -1
  20. package/dist/cdn/5HTRQR7F.js +2 -0
  21. package/dist/cdn/{LDLJRK76.js → 5J2UYJYX.js} +1 -1
  22. package/dist/cdn/{LJIHBKNI.js → 5L7CGWWD.js} +1 -1
  23. package/dist/cdn/{XRVUSKBQ.js → 5SU52VYR.js} +1 -1
  24. package/dist/cdn/5TCLHXAD.js +2 -0
  25. package/dist/cdn/{UMLQ6PVE.js → 6NEHFZMJ.js} +1 -1
  26. package/dist/cdn/{I5LZP3DC.js → 6VRXKEA7.js} +1 -1
  27. package/dist/cdn/{2HPKL5UL.js → 6XJYCX76.js} +1 -1
  28. package/dist/cdn/{RBGGE65K.js → 752PQ7IA.js} +1 -1
  29. package/dist/cdn/{I6XABN6A.js → 7RSGSW76.js} +1 -1
  30. package/dist/cdn/7UOYXJ3K.js +2 -0
  31. package/dist/cdn/{IQ23RSWK.js → A2UZRUUF.js} +1 -1
  32. package/dist/cdn/{EQ4Z4LBA.js → A7IQIXR3.js} +1 -1
  33. package/dist/cdn/{X6LSQXQT.js → AEUCGVU4.js} +1 -1
  34. package/dist/cdn/{VZDUTHQS.js → AJKEEG2Z.js} +1 -1
  35. package/dist/cdn/{QQYOGIVS.js → ALC6PGDZ.js} +1 -1
  36. package/dist/cdn/{WTL6TTVY.js → B55VO4LW.js} +1 -1
  37. package/dist/cdn/{QJ2FRJRU.js → BIEIKUB2.js} +1 -1
  38. package/dist/cdn/{D3ZA3ZSE.js → BPSXK66S.js} +1 -1
  39. package/dist/cdn/BS22M3WT.js +2 -0
  40. package/dist/cdn/{46F46R3T.js → BWDCDFXW.js} +1 -1
  41. package/dist/cdn/C25VFIND.js +2 -0
  42. package/dist/cdn/{3ZYN3227.js → CWQZDXHH.js} +1 -1
  43. package/dist/cdn/CXVISA7Y.js +2 -0
  44. package/dist/cdn/{N234JPQQ.js → D7UER3G6.js} +1 -1
  45. package/dist/cdn/{4ILCK5CI.js → DR7JKZAI.js} +1 -1
  46. package/dist/cdn/{UG6FM2IU.js → DY6SXW3X.js} +1 -1
  47. package/dist/cdn/{RHJW4CXA.js → ED7SQQHM.js} +1 -1
  48. package/dist/cdn/EFNE45MK.js +2 -0
  49. package/dist/cdn/{4DX77VVY.js → EGK4PSW5.js} +1 -1
  50. package/dist/cdn/{4ZGFXXYL.js → EJCQCHH7.js} +1 -1
  51. package/dist/cdn/{XLOC3L55.js → ENCYKNKN.js} +1 -1
  52. package/dist/cdn/EY4MG3NU.js +2 -0
  53. package/dist/cdn/{UQBN3Z6H.js → EZW5GK73.js} +1 -1
  54. package/dist/cdn/{N5SFF63Q.js → FWEFFYYZ.js} +1 -1
  55. package/dist/cdn/{MTIRRGHA.js → G4QI7VSJ.js} +1 -1
  56. package/dist/cdn/{TDDLSMO5.js → GEQ3EBJO.js} +1 -1
  57. package/dist/cdn/GLJVCFQW.js +2 -0
  58. package/dist/cdn/GNDNKP2Q.js +2 -0
  59. package/dist/cdn/H77SNVVI.js +2 -0
  60. package/dist/cdn/{5XFHSV4Z.js → HAUWZRL4.js} +1 -1
  61. package/dist/cdn/{UODBUSON.js → HBUNMGZ3.js} +1 -1
  62. package/dist/cdn/{GY6M2LPM.js → HFGDCX3I.js} +1 -1
  63. package/dist/cdn/{ZJ34LWXC.js → HGRVTRR3.js} +1 -1
  64. package/dist/cdn/{ECURCDZ2.js → HHOMMC4H.js} +1 -1
  65. package/dist/cdn/{Z2R5VRT7.js → HUNZU2OF.js} +1 -1
  66. package/dist/cdn/{YKP66AQ5.js → IFLPCKYL.js} +1 -1
  67. package/dist/cdn/{SK7CWKMU.js → IJP6ZKHZ.js} +1 -1
  68. package/dist/cdn/{RRN6YM7F.js → IU4TJIME.js} +1 -1
  69. package/dist/cdn/J42TNDHM.js +2 -0
  70. package/dist/cdn/J4J65DN5.js +2 -0
  71. package/dist/cdn/{732QLUKT.js → K4R3HUW3.js} +1 -1
  72. package/dist/cdn/KBHLSIAR.js +2 -0
  73. package/dist/cdn/{REAIBS67.js → KKMGV3S6.js} +1 -1
  74. package/dist/cdn/{SDDDIVHA.js → KUC6KV4R.js} +1 -1
  75. package/dist/cdn/{LCPYWUGK.js → KVPLQQ75.js} +1 -1
  76. package/dist/cdn/{GJ5VSZCN.js → KVRUYI63.js} +1 -1
  77. package/dist/cdn/MLQDQZZR.js +2 -0
  78. package/dist/cdn/{YQST67WD.js → MM6LZCYO.js} +1 -1
  79. package/dist/cdn/{ILHS3TD7.js → MQMNX7AM.js} +1 -1
  80. package/dist/cdn/N47CSPB7.js +2 -0
  81. package/dist/cdn/{RTSHUMUI.js → NAFJ5ZYO.js} +1 -1
  82. package/dist/cdn/{HFPBP7XA.js → NIBBUVHR.js} +1 -1
  83. package/dist/cdn/NMIBGEIB.js +2 -0
  84. package/dist/cdn/{ULGKAMEK.js → NNSUCRNU.js} +1 -1
  85. package/dist/cdn/{QOXTJ7PA.js → NT6RQTF7.js} +1 -1
  86. package/dist/cdn/O6ZRTXVO.js +2 -0
  87. package/dist/cdn/{XGISY6QA.js → O75ZRZLS.js} +1 -1
  88. package/dist/cdn/{YUZXLNNW.js → OCFKSX5L.js} +1 -1
  89. package/dist/cdn/{FUL4JV2P.js → ODOOWGRW.js} +1 -1
  90. package/dist/cdn/{IZBELXZC.js → OGOI7JTF.js} +1 -1
  91. package/dist/cdn/{MTQHRNJW.js → OO556Q5A.js} +1 -1
  92. package/dist/cdn/PGUOVY7V.js +2 -0
  93. package/dist/cdn/{EPKWV7TT.js → PJ3GHZ7T.js} +1 -1
  94. package/dist/cdn/PNXNTD3R.js +2 -0
  95. package/dist/cdn/{IF5AIFNS.js → PYD5GHXA.js} +1 -1
  96. package/dist/cdn/{ETXIJA2R.js → Q4EG6G7W.js} +1 -1
  97. package/dist/cdn/{SQLDNSI6.js → Q52IY7SS.js} +1 -1
  98. package/dist/cdn/{U63GYZ74.js → QEPJF6TC.js} +2 -2
  99. package/dist/cdn/{3TLJ5JOP.js → QHZAKDI7.js} +1 -1
  100. package/dist/cdn/{7J3JDTWK.js → QIUVPLV2.js} +1 -1
  101. package/dist/cdn/{RMERVJA5.js → QVTLP2LK.js} +1 -1
  102. package/dist/cdn/R3DLH5BB.js +2 -0
  103. package/dist/cdn/R5DGN3O6.js +2 -0
  104. package/dist/cdn/{MSGQMPT6.js → RGKOGN5W.js} +1 -1
  105. package/dist/cdn/{TG6MK4QD.js → RRNEZXM4.js} +1 -1
  106. package/dist/cdn/{7PFEVHWG.js → RU3YCR42.js} +1 -1
  107. package/dist/cdn/{7CVLFVE5.js → SF7SFEKA.js} +1 -1
  108. package/dist/cdn/SKOYS4HM.js +2 -0
  109. package/dist/cdn/{6KLHDA5V.js → SP22KLIK.js} +1 -1
  110. package/dist/cdn/{YX5LYAIV.js → SVHI2LRC.js} +1 -1
  111. package/dist/cdn/{LKHFQ3U6.js → T2MUZ4UN.js} +1 -1
  112. package/dist/cdn/{N6YVNJ3O.js → TAS3P2HU.js} +1 -1
  113. package/dist/cdn/{MHSIIKU2.js → TBA5ATIB.js} +1 -1
  114. package/dist/cdn/{EYR3DX5M.js → TW2SRS2O.js} +1 -1
  115. package/dist/cdn/{PNBC2B77.js → TZFOTRCX.js} +1 -1
  116. package/dist/cdn/{QGBPRJIT.js → UUHRTJGO.js} +1 -1
  117. package/dist/cdn/{KHE57SV3.js → UVJ3XYK5.js} +1 -1
  118. package/dist/cdn/{R265ZYQR.js → UYYGQ6AY.js} +1 -1
  119. package/dist/cdn/V2PPBU7J.js +2 -0
  120. package/dist/cdn/{2EN543JD.js → VB7GHJWK.js} +1 -1
  121. package/dist/cdn/VIMF6KPF.js +2 -0
  122. package/dist/cdn/{YT6UJRLT.js → VYSJFEY6.js} +1 -1
  123. package/dist/cdn/WI7KEIGV.js +2 -0
  124. package/dist/cdn/WOJJ53FN.js +2 -0
  125. package/dist/cdn/WSRLM2TQ.js +2 -0
  126. package/dist/cdn/{4NDBPQOW.js → X53XDNBL.js} +1 -1
  127. package/dist/cdn/{QUJE6MIQ.js → XPXJW5E3.js} +1 -1
  128. package/dist/cdn/XXVIE4SD.js +2 -0
  129. package/dist/cdn/{B4VMCAZI.js → Y5FMVLYP.js} +1 -1
  130. package/dist/cdn/{NB3LG2PS.js → YBZVV5BN.js} +1 -1
  131. package/dist/cdn/{GIV3RH7X.js → YQOYGBGD.js} +1 -1
  132. package/dist/cdn/{4I67VFAN.js → Z3B276DZ.js} +1 -1
  133. package/dist/cdn/Z6LSD6MR.js +2 -0
  134. package/dist/cdn/ZDZGWD2Y.js +2 -0
  135. package/dist/cdn/{JC2AVKOO.js → ZIKLLQSU.js} +1 -1
  136. package/dist/cdn/{KBSNJSUL.js → ZKCFISUX.js} +1 -1
  137. package/dist/cdn/{6C5JMRKM.js → ZKPCUAN2.js} +1 -1
  138. package/dist/cdn/{FXFRKJEJ.js → ZPJ4FGXO.js} +1 -1
  139. package/dist/cdn/{4PZDI5YW.js → ZVFZSDLX.js} +1 -1
  140. package/dist/cdn/ZZ746O36.js +2 -0
  141. package/dist/cdn/index.js +1 -1
  142. package/dist/chunks/ExpandToggle.js +2 -3
  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 +8 -1
  154. package/dist/components/calcite-action-bar/customElement.js +4 -2
  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 -0
  173. package/dist/components/calcite-dialog/customElement.js +2 -2
  174. package/dist/components/calcite-dropdown/customElement.js +4 -1
  175. package/dist/components/calcite-flow-item/customElement.d.ts +3 -1
  176. package/dist/components/calcite-flow-item/customElement.js +4 -4
  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 -2
  194. package/dist/components/calcite-panel/customElement.js +2 -2
  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 +2 -2
  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 +3 -3
  226. package/dist/types/lumina.d.ts +1 -1
  227. package/dist/types/preact.d.ts +1 -1
  228. package/dist/types/react.d.ts +1 -1
  229. package/dist/types/stencil.d.ts +1 -1
  230. package/package.json +6 -6
  231. package/dist/cdn/2CCRLQOV.js +0 -2
  232. package/dist/cdn/2UXQ7FQU.js +0 -2
  233. package/dist/cdn/3KAMTN22.js +0 -2
  234. package/dist/cdn/4ET37OQN.js +0 -2
  235. package/dist/cdn/66NDMEG2.js +0 -2
  236. package/dist/cdn/76VE6QGI.js +0 -2
  237. package/dist/cdn/7AJLMSNL.js +0 -2
  238. package/dist/cdn/ALRQOPMQ.js +0 -2
  239. package/dist/cdn/AO7ZTAVY.js +0 -2
  240. package/dist/cdn/BEHKDUR6.js +0 -2
  241. package/dist/cdn/BKAZFAPN.js +0 -2
  242. package/dist/cdn/CSRCARFW.js +0 -2
  243. package/dist/cdn/EC3GCET5.js +0 -2
  244. package/dist/cdn/EREDWMAC.js +0 -2
  245. package/dist/cdn/EVZEXLBF.js +0 -2
  246. package/dist/cdn/GETIWK4G.js +0 -2
  247. package/dist/cdn/HSNJW6OM.js +0 -2
  248. package/dist/cdn/JLJULYTE.js +0 -2
  249. package/dist/cdn/JRAIIHMU.js +0 -2
  250. package/dist/cdn/JZWQZ5BO.js +0 -2
  251. package/dist/cdn/KFPRUCQK.js +0 -2
  252. package/dist/cdn/LFGU3E4X.js +0 -2
  253. package/dist/cdn/LGDOYO5J.js +0 -2
  254. package/dist/cdn/MOZ5AAJM.js +0 -2
  255. package/dist/cdn/NNVU3JV4.js +0 -2
  256. package/dist/cdn/O5XHZCXZ.js +0 -2
  257. package/dist/cdn/OXJIN4W5.js +0 -2
  258. package/dist/cdn/OXZJMSLQ.js +0 -2
  259. package/dist/cdn/P2745LUP.js +0 -2
  260. package/dist/cdn/RKSFMXT4.js +0 -2
  261. package/dist/cdn/RMKYCARB.js +0 -2
  262. package/dist/cdn/S5KQDAMG.js +0 -2
  263. package/dist/cdn/SUIJIBLR.js +0 -2
  264. package/dist/cdn/TQQTV5HV.js +0 -2
  265. package/dist/cdn/X2HWVZ5U.js +0 -2
  266. package/dist/cdn/XPGAQQQC.js +0 -2
  267. package/dist/cdn/YZ4W6DFR.js +0 -2
  268. package/dist/cdn/Z2BYWKFB.js +0 -2
  269. package/dist/cdn/ZCBRPKAV.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,6 +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 component's `content-top` slot.
16
+ * @cssproperty [--calcite-panel-content-bottom-space] - Specifies the padding of the component's `content-bottom` slot.
15
17
  * @cssproperty [--calcite-panel-header-background-color] - Specifies the background color of the component's header.
16
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`.
17
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.
@@ -19,8 +21,8 @@ import type { IconName } from "../calcite-icon/interfaces.js";
19
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`.
20
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.
21
23
  * @cssproperty [--calcite-panel-footer-background-color] - Specifies the background color of the component's footer.
22
- * @cssproperty [--calcite-panel-space] - Specifies the padding of the component's `"unnamed (default)"` slot.
23
- * @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.
24
26
  * @cssproperty [--calcite-panel-footer-space] - Specifies the padding of the component's footer.
25
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.
26
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";
@@ -15,7 +15,7 @@ import { u as useSetFocus } from "../../chunks/useSetFocus.js";
15
15
  import { s as styles$1 } from "../../chunks/header.js";
16
16
  import { u as useInteractive } from "../../chunks/useInteractive.js";
17
17
  import { C as CSS, S as SLOTS, I as ICONS, a as IDS } from "../../chunks/resources6.js";
18
- 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;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;padding:var(--calcite-internal-panel-default-space);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{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))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`;
18
+ 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;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{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))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`;
19
19
  class Panel extends LitElement {
20
20
  constructor() {
21
21
  super();
@@ -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",