@esri/calcite-components 3.0.0-next.99 → 3.0.0

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 (604) hide show
  1. package/dist/calcite/22RQB3WE.js +4 -0
  2. package/dist/calcite/{2JRSKQML.js → 24SER2VV.js} +4 -6
  3. package/dist/calcite/2BGMAPSV.js +4 -0
  4. package/dist/calcite/2JKKAEPM.js +4 -0
  5. package/dist/calcite/{JLIVSPKC.js → 2M4WCGKG.js} +4 -6
  6. package/dist/calcite/2YAXZHP2.js +4 -0
  7. package/dist/calcite/{AUEN6VFD.js → 345Q4UHX.js} +4 -6
  8. package/dist/calcite/{O7B4THLC.js → 36DMRAV2.js} +4 -6
  9. package/dist/calcite/{EBQYJBDQ.js → 3DGJ6ZQI.js} +4 -6
  10. package/dist/calcite/3GICXOBQ.js +4 -0
  11. package/dist/calcite/3IV6JSC2.js +4 -0
  12. package/dist/calcite/{Y5IWWVKB.js → 3TOVZEQB.js} +4 -6
  13. package/dist/calcite/45GA6INB.js +4 -0
  14. package/dist/calcite/46U4MKUU.js +4 -0
  15. package/dist/calcite/4BSCJ722.js +4 -0
  16. package/dist/calcite/4SEPDFCP.js +5 -0
  17. package/dist/calcite/{B77QRUX7.js → 4TQLSUKH.js} +4 -6
  18. package/dist/calcite/4YZ27QWL.js +4 -0
  19. package/dist/calcite/4Z7JRTON.js +4 -0
  20. package/dist/calcite/5AVZLE2Q.js +4 -0
  21. package/dist/calcite/{OMBBOPRI.js → 5EPP4MG3.js} +4 -6
  22. package/dist/calcite/{KWWKG3YN.js → 66B2H27W.js} +4 -6
  23. package/dist/calcite/6LW27BEV.js +4 -0
  24. package/dist/calcite/6OZRZ36X.js +4 -0
  25. package/dist/calcite/6X2SD2PW.js +4 -0
  26. package/dist/calcite/{ZWGCNMZF.js → 6XTYGXNG.js} +4 -6
  27. package/dist/calcite/6ZTWHW63.js +4 -0
  28. package/dist/calcite/{BZOCG27F.js → 7D3VEEUX.js} +4 -6
  29. package/dist/calcite/7E342YOK.js +4 -0
  30. package/dist/calcite/{4OYBMKUB.js → 7KSGVDSR.js} +4 -6
  31. package/dist/calcite/{DF7SVAJW.js → 7PWETOIU.js} +4 -6
  32. package/dist/calcite/7QHUEK5R.js +4 -0
  33. package/dist/calcite/{BGQR3WLU.js → 7SX3RD7P.js} +4 -6
  34. package/dist/calcite/7U7FF3Y4.js +4 -0
  35. package/dist/calcite/7WG5I3MP.js +4 -0
  36. package/dist/calcite/{KHDHQPVO.js → A5GGYTUQ.js} +4 -6
  37. package/dist/calcite/{3SE2Z2VK.js → AI3R3SU6.js} +5 -7
  38. package/dist/calcite/ARHYATTG.js +4 -0
  39. package/dist/calcite/{ELXZUEDC.js → ATHBUWBY.js} +4 -6
  40. package/dist/calcite/AXXJNFKZ.js +4 -0
  41. package/dist/calcite/{AASA6526.js → AYZ73RWQ.js} +4 -6
  42. package/dist/calcite/{S6AE7RHT.js → BAHIPAHM.js} +4 -6
  43. package/dist/calcite/BRTDMTZ3.js +4 -0
  44. package/dist/calcite/BRTESQOJ.js +4 -0
  45. package/dist/calcite/{3LYDW23E.js → BSRMWMHQ.js} +4 -6
  46. package/dist/calcite/{2UYJUU43.js → BZKF5ZXQ.js} +4 -6
  47. package/dist/calcite/C46JYVUP.js +4 -0
  48. package/dist/calcite/C54C5E23.js +4 -0
  49. package/dist/calcite/CBSMKHOY.js +4 -0
  50. package/dist/calcite/CFRBQXK4.js +4 -0
  51. package/dist/calcite/CIV3PH3Z.js +4 -0
  52. package/dist/calcite/CJYTY62F.js +4 -0
  53. package/dist/calcite/CK6HQQX6.js +4 -0
  54. package/dist/calcite/CMO3X257.js +4 -0
  55. package/dist/calcite/{3Z3RDAUW.js → CNO6NFH5.js} +4 -6
  56. package/dist/calcite/CWPRBG3T.js +4 -0
  57. package/dist/calcite/CY6C2FDZ.js +4 -0
  58. package/dist/calcite/D2HDFE7S.js +22 -0
  59. package/dist/calcite/D36VWSDW.js +4 -0
  60. package/dist/calcite/{3QV5TGZD.js → DBVNMM6Q.js} +4 -6
  61. package/dist/calcite/{4JU7BKXB.js → DDJ75RTI.js} +4 -6
  62. package/dist/calcite/DH4ISGHV.js +4 -0
  63. package/dist/calcite/{3PJ42556.js → DNYBIAUI.js} +4 -6
  64. package/dist/calcite/DT67ZFPX.js +4 -0
  65. package/dist/calcite/{EWQKTTIO.js → DTL2LM6T.js} +4 -6
  66. package/dist/calcite/E3R5SMVW.js +4 -0
  67. package/dist/calcite/{AGLAEQKV.js → E4NMFIKN.js} +4 -6
  68. package/dist/calcite/{FMI6FJW4.js → EAML4EDI.js} +4 -6
  69. package/dist/calcite/{XEW3B3B5.js → ECEZ4R6E.js} +4 -6
  70. package/dist/calcite/EFI2G5WL.js +4 -0
  71. package/dist/calcite/EHZCT5YZ.js +4 -0
  72. package/dist/calcite/{SYOTV4D4.js → EOHVH6PN.js} +4 -6
  73. package/dist/calcite/ESBOJTBS.js +4 -0
  74. package/dist/calcite/F6EGRKXW.js +4 -0
  75. package/dist/calcite/FCN5RMLA.js +4 -0
  76. package/dist/calcite/FDIM6DYL.js +4 -0
  77. package/dist/calcite/FE3A3YUN.js +4 -0
  78. package/dist/calcite/FHBFGCTR.js +4 -0
  79. package/dist/calcite/FNFWOOMR.js +4 -0
  80. package/dist/calcite/{UPY24BFQ.js → FNM4DZZH.js} +3 -5
  81. package/dist/calcite/G2KHDAZD.js +4 -0
  82. package/dist/calcite/{P64WY2HI.js → G3LH75CQ.js} +4 -6
  83. package/dist/calcite/{UZAQE6XP.js → G3ZJ2KQT.js} +4 -6
  84. package/dist/calcite/{GIRDDKPZ.js → G7WFYVUC.js} +4 -6
  85. package/dist/calcite/{3RLXG3NR.js → GAAXSGWK.js} +4 -6
  86. package/dist/calcite/{QNGBOTGF.js → GE63ETFI.js} +4 -6
  87. package/dist/calcite/{DO5AYUNU.js → GFC7NS6P.js} +4 -6
  88. package/dist/calcite/GGO5TMB4.js +4 -0
  89. package/dist/calcite/GKKCWEZX.js +4 -0
  90. package/dist/calcite/GN5CPLSJ.js +4 -0
  91. package/dist/calcite/GNUSLZWJ.js +4 -0
  92. package/dist/calcite/{L4IJ6KQT.js → GOOHYN3D.js} +4 -6
  93. package/dist/calcite/GPUFLCIT.js +4 -0
  94. package/dist/calcite/GSXEMGSW.js +4 -0
  95. package/dist/calcite/GYQTRH4V.js +4 -0
  96. package/dist/calcite/HFIRIAQA.js +4 -0
  97. package/dist/calcite/{6EFD6XES.js → HGTV36FX.js} +4 -6
  98. package/dist/calcite/HKHPJJ34.js +4 -0
  99. package/dist/calcite/{CM4U5UKC.js → HMVKZP47.js} +4 -6
  100. package/dist/calcite/I2OIH73C.js +4 -0
  101. package/dist/calcite/{W4D5O4P2.js → I32TMNTO.js} +3 -5
  102. package/dist/calcite/{KBVTFWRR.js → I62DUDHI.js} +4 -6
  103. package/dist/calcite/IH4RXHJJ.js +4 -0
  104. package/dist/calcite/{EUXG27WD.js → IJCTXZQB.js} +4 -6
  105. package/dist/calcite/{5LAQP62T.js → IXRMDUEL.js} +4 -6
  106. package/dist/calcite/IYDN67SF.js +4 -0
  107. package/dist/calcite/JCWM5Z43.js +4 -0
  108. package/dist/calcite/{26ES3CRO.js → JEX42CPR.js} +4 -6
  109. package/dist/calcite/JFYDLHH7.js +4 -0
  110. package/dist/calcite/JLZYAYOL.js +4 -0
  111. package/dist/calcite/{3KND2KKH.js → JUNCR7R2.js} +4 -6
  112. package/dist/calcite/{K3F2CI4A.js → JVNEJ36Z.js} +4 -6
  113. package/dist/calcite/K3ZBW4GY.js +4 -0
  114. package/dist/calcite/{G4Q2QH6B.js → KBDXI6DJ.js} +4 -6
  115. package/dist/calcite/{XFHDAVBK.js → KBNS3CCT.js} +4 -6
  116. package/dist/calcite/KI2NOBMU.js +4 -0
  117. package/dist/calcite/KSNEQFZX.js +4 -0
  118. package/dist/calcite/KSVYAIHK.js +4 -0
  119. package/dist/calcite/KULDQOV2.js +4 -0
  120. package/dist/calcite/KVSCG5E3.js +6 -0
  121. package/dist/calcite/{JFBHBHJE.js → KW57BHXD.js} +4 -6
  122. package/dist/calcite/{VP4IW6MN.js → KWOOGTG2.js} +4 -6
  123. package/dist/calcite/L5FDXQMT.js +4 -0
  124. package/dist/calcite/{UFV4E5V5.js → LB5ATL5Q.js} +4 -6
  125. package/dist/calcite/LH7KSBQC.js +4 -0
  126. package/dist/calcite/{6YQ42X6L.js → LHSAAMYQ.js} +4 -6
  127. package/dist/calcite/LILDCWFX.js +4 -0
  128. package/dist/calcite/LLSB73WA.js +4 -0
  129. package/dist/calcite/{MRVEUN2O.js → LOZEGKG2.js} +4 -6
  130. package/dist/calcite/{LR6EXHT2.js → MBQZPRQ5.js} +4 -6
  131. package/dist/calcite/MCSX2S5T.js +4 -0
  132. package/dist/calcite/{5MEU7SU4.js → MIKGJ3NM.js} +4 -6
  133. package/dist/calcite/MPAVJ7UH.js +4 -0
  134. package/dist/calcite/{RWW7CETF.js → MPX2M2VX.js} +4 -6
  135. package/dist/calcite/{N7NWH5SX.js → MQYH4ONZ.js} +3 -5
  136. package/dist/calcite/MUWK32IE.js +4 -0
  137. package/dist/calcite/{6FI3WN2Y.js → MZRO54UT.js} +4 -6
  138. package/dist/calcite/N2BVYYYP.js +4 -0
  139. package/dist/calcite/{WIGL5RKK.js → N4MN6VQ7.js} +4 -6
  140. package/dist/calcite/{ESS6BUTG.js → N55N67N5.js} +4 -6
  141. package/dist/calcite/NODC2JA6.js +4 -0
  142. package/dist/calcite/{FSQJ72IH.js → NVBNX55L.js} +4 -6
  143. package/dist/calcite/{Z2ZTWA3F.js → NWVCPRVB.js} +3 -5
  144. package/dist/calcite/{W3WKINVO.js → O4O3TSE5.js} +4 -6
  145. package/dist/calcite/OE2AH2NC.js +4 -0
  146. package/dist/calcite/OGED6PPP.js +4 -0
  147. package/dist/calcite/{QBG5T6W3.js → OHOS32IT.js} +4 -6
  148. package/dist/calcite/{KA53KK35.js → OLMX7G3J.js} +3 -5
  149. package/dist/calcite/OOSULFCY.js +4 -0
  150. package/dist/calcite/OPBQNK7J.js +4 -0
  151. package/dist/calcite/OTHVFLNW.js +4 -0
  152. package/dist/calcite/{G75XVKLZ.js → OTUG3NVT.js} +4 -6
  153. package/dist/calcite/PNHR5K2L.js +4 -0
  154. package/dist/calcite/{2YSVELPG.js → PT2XMADA.js} +3 -5
  155. package/dist/calcite/PZLVQQMT.js +4 -0
  156. package/dist/calcite/{I2N2BRJR.js → QAYSDI3M.js} +3 -5
  157. package/dist/calcite/QCGLMLKW.js +4 -0
  158. package/dist/calcite/QHASLHZN.js +4 -0
  159. package/dist/calcite/QK2H5T7J.js +4 -0
  160. package/dist/calcite/QLKHJI4P.js +4 -0
  161. package/dist/calcite/QQ67AVDV.js +4 -0
  162. package/dist/calcite/{CTQ5YHOP.js → QU33PBBI.js} +4 -6
  163. package/dist/calcite/QYGED6CL.js +4 -0
  164. package/dist/calcite/R3HMG2D6.js +4 -0
  165. package/dist/calcite/{OU4N4K2U.js → R4RMVIKH.js} +4 -6
  166. package/dist/calcite/R6GNPMSV.js +4 -0
  167. package/dist/calcite/{ARFAFPKS.js → RAFCSOOQ.js} +4 -6
  168. package/dist/calcite/{GU2SFYM4.js → RAQWKUOJ.js} +4 -6
  169. package/dist/calcite/RESHLE2Y.js +4 -0
  170. package/dist/calcite/RJLKHCRB.js +4 -0
  171. package/dist/calcite/RLSQLIV6.js +4 -0
  172. package/dist/calcite/{57L4ZYLO.js → RMGYRZXR.js} +4 -6
  173. package/dist/calcite/RSAEDAEX.js +4 -0
  174. package/dist/calcite/{SFWNFANJ.js → RUTUU2EH.js} +4 -6
  175. package/dist/calcite/{XFKIMAJU.js → RVMVJW6K.js} +4 -6
  176. package/dist/calcite/RVQMJBNS.js +4 -0
  177. package/dist/calcite/{QLJX2F4K.js → S76CXQTI.js} +4 -6
  178. package/dist/calcite/SBZ6VJ75.js +4 -0
  179. package/dist/calcite/SJKTCGW6.js +4 -0
  180. package/dist/calcite/{G27BUJJG.js → SKDMJE3X.js} +3 -5
  181. package/dist/calcite/SMUXJLDL.js +4 -0
  182. package/dist/calcite/SYEQSDHG.js +4 -0
  183. package/dist/calcite/T3NRBBZP.js +4 -0
  184. package/dist/calcite/T5UPGHU3.js +4 -0
  185. package/dist/calcite/{XOA2TSHC.js → T6HODD4B.js} +4 -6
  186. package/dist/calcite/TNR5VZG2.js +4 -0
  187. package/dist/calcite/TQIVV2F7.js +4 -0
  188. package/dist/calcite/{UCGUHOUO.js → TQTAM3XB.js} +4 -6
  189. package/dist/calcite/{XR2WLB7D.js → TSJJLMPA.js} +3 -5
  190. package/dist/calcite/{VM4VUQ54.js → TVDZM7WT.js} +4 -6
  191. package/dist/calcite/U3WK4DZT.js +4 -0
  192. package/dist/calcite/U725E4ID.js +4 -0
  193. package/dist/calcite/UELGJSYH.js +4 -0
  194. package/dist/calcite/UJL3BWDH.js +4 -0
  195. package/dist/calcite/{AFH6KP7M.js → URM3R65T.js} +4 -6
  196. package/dist/calcite/US3PQV6O.js +4 -0
  197. package/dist/calcite/{BNYX7IBO.js → V4JZRN7T.js} +4 -6
  198. package/dist/calcite/{3JQJ24PZ.js → VCSXFNPO.js} +4 -6
  199. package/dist/calcite/VG7BJBFG.js +4 -0
  200. package/dist/calcite/{6LWRLBVD.js → VJD4CRQ3.js} +4 -6
  201. package/dist/calcite/VMRLYKNI.js +4 -0
  202. package/dist/calcite/{LQ5ITYNE.js → VNQNKQ2J.js} +4 -6
  203. package/dist/calcite/VST65PDC.js +4 -0
  204. package/dist/calcite/WKTGTKRJ.js +4 -0
  205. package/dist/calcite/WPAMFFBY.js +4 -0
  206. package/dist/calcite/{3ATQZBKY.js → WSGL37LB.js} +4 -6
  207. package/dist/calcite/{4TWMM7Z6.js → WWUBU6N5.js} +4 -6
  208. package/dist/calcite/{QFH3VN2R.js → X2UHFJHG.js} +4 -6
  209. package/dist/calcite/XBZLGRRI.js +4 -0
  210. package/dist/calcite/XOVG6UH3.js +4 -0
  211. package/dist/calcite/{7NVGCG7Q.js → XT32TCZG.js} +3 -5
  212. package/dist/calcite/XXZIOSXQ.js +4 -0
  213. package/dist/calcite/{MNBTRJLH.js → Y6VF7HSM.js} +4 -6
  214. package/dist/calcite/YA5A7PJR.js +4 -0
  215. package/dist/calcite/{MYJH43DB.js → YMRTHS5X.js} +4 -6
  216. package/dist/calcite/{ZQSF4K7D.js → YTRT5XZT.js} +4 -6
  217. package/dist/calcite/{O2KBYT33.js → YXLQFMOA.js} +4 -6
  218. package/dist/calcite/{J7RY7DXT.js → YYJSHQR3.js} +3 -5
  219. package/dist/calcite/{SZP7YBVQ.js → Z6GA347Y.js} +4 -6
  220. package/dist/calcite/{VFBPWVKE.js → Z7VNUC77.js} +4 -6
  221. package/dist/calcite/ZA76CHET.js +4 -0
  222. package/dist/calcite/ZGXTLCGJ.js +4 -0
  223. package/dist/calcite/{KMLCSDZJ.js → ZQO6E4FO.js} +4 -6
  224. package/dist/calcite/ZV442E6X.js +4 -0
  225. package/dist/calcite/assets/icon/crosshair16.json +1 -0
  226. package/dist/calcite/assets/icon/crosshair24.json +1 -0
  227. package/dist/calcite/assets/icon/crosshair32.json +1 -0
  228. package/dist/calcite/assets/icon/dualImageArea16.json +1 -0
  229. package/dist/calcite/assets/icon/dualImageArea24.json +1 -0
  230. package/dist/calcite/assets/icon/dualImageArea32.json +1 -0
  231. package/dist/calcite/assets/icon/dualImageDistance16.json +1 -0
  232. package/dist/calcite/assets/icon/dualImageDistance24.json +1 -0
  233. package/dist/calcite/assets/icon/dualImageDistance32.json +1 -0
  234. package/dist/calcite/assets/icon/dualImageLocation16.json +1 -0
  235. package/dist/calcite/assets/icon/dualImageLocation24.json +1 -0
  236. package/dist/calcite/assets/icon/dualImageLocation32.json +1 -0
  237. package/dist/calcite/assets/icon/hammerCoin16.json +1 -0
  238. package/dist/calcite/assets/icon/hammerCoin24.json +1 -0
  239. package/dist/calcite/assets/icon/hammerCoin32.json +1 -0
  240. package/dist/calcite/assets/icon/hammerLock16.json +1 -0
  241. package/dist/calcite/assets/icon/hammerLock24.json +1 -0
  242. package/dist/calcite/assets/icon/hammerLock32.json +1 -0
  243. package/dist/calcite/assets/icon/utilityNetworkLayer16.json +1 -0
  244. package/dist/calcite/assets/icon/utilityNetworkLayer24.json +1 -0
  245. package/dist/calcite/assets/icon/utilityNetworkLayer32.json +1 -0
  246. package/dist/calcite/calcite.css +1 -1
  247. package/dist/calcite/calcite.esm.js +4 -6
  248. package/dist/chunks/ExpandToggle.js +3 -5
  249. package/dist/chunks/FloatingArrow.js +6 -8
  250. package/dist/chunks/Heading.js +3 -5
  251. package/dist/chunks/Validation.js +3 -5
  252. package/dist/chunks/_commonjsHelpers.js +3 -5
  253. package/dist/chunks/array.js +3 -5
  254. package/dist/chunks/component.js +13 -11
  255. package/dist/chunks/core.js +3 -5
  256. package/dist/chunks/date.js +3 -5
  257. package/dist/chunks/dom.js +218 -234
  258. package/dist/chunks/dynamicClasses.js +3 -5
  259. package/dist/chunks/filter.js +3 -5
  260. package/dist/chunks/floating-ui.js +61 -65
  261. package/dist/chunks/focusTrapComponent.js +25 -30
  262. package/dist/chunks/form.js +19 -21
  263. package/dist/chunks/global.js +14 -14
  264. package/dist/chunks/guid.js +3 -5
  265. package/dist/chunks/input.js +3 -5
  266. package/dist/chunks/interact.min.js +3 -5
  267. package/dist/chunks/interactive.js +3 -5
  268. package/dist/chunks/key.js +3 -5
  269. package/dist/chunks/label.js +7 -9
  270. package/dist/chunks/loadable.js +11 -22
  271. package/dist/chunks/locale.js +3 -5
  272. package/dist/chunks/logger.js +3 -5
  273. package/dist/chunks/math.js +3 -5
  274. package/dist/chunks/observers.js +3 -5
  275. package/dist/chunks/openCloseComponent.js +5 -7
  276. package/dist/chunks/resources.js +3 -5
  277. package/dist/chunks/resources2.js +3 -5
  278. package/dist/chunks/resources3.js +8 -14
  279. package/dist/chunks/resources4.js +3 -5
  280. package/dist/chunks/resources5.js +3 -5
  281. package/dist/chunks/resources6.js +3 -5
  282. package/dist/chunks/resources7.js +3 -5
  283. package/dist/chunks/responsive.js +9 -12
  284. package/dist/chunks/runtime.js +39 -43
  285. package/dist/chunks/sortableComponent.js +49 -39
  286. package/dist/chunks/text.js +3 -5
  287. package/dist/chunks/time.js +12 -14
  288. package/dist/chunks/useFocusTrap.js +49 -0
  289. package/dist/chunks/useT9n.js +3 -5
  290. package/dist/chunks/utils.js +19 -17
  291. package/dist/chunks/utils2.js +3 -5
  292. package/dist/chunks/utils3.js +15 -16
  293. package/dist/chunks/utils4.js +264 -271
  294. package/dist/components/calcite-accordion/customElement.js +3 -5
  295. package/dist/components/calcite-accordion-item/customElement.js +10 -14
  296. package/dist/components/calcite-action/customElement.js +17 -21
  297. package/dist/components/calcite-action-bar/customElement.js +24 -27
  298. package/dist/components/calcite-action-group/customElement.js +20 -24
  299. package/dist/components/calcite-action-menu/customElement.js +14 -18
  300. package/dist/components/calcite-action-pad/customElement.js +21 -25
  301. package/dist/components/calcite-alert/customElement.js +50 -63
  302. package/dist/components/calcite-autocomplete/customElement.d.ts +10 -4
  303. package/dist/components/calcite-autocomplete/customElement.js +50 -52
  304. package/dist/components/calcite-autocomplete-item/customElement.js +17 -21
  305. package/dist/components/calcite-autocomplete-item-group/customElement.js +3 -5
  306. package/dist/components/calcite-avatar/customElement.js +8 -10
  307. package/dist/components/calcite-block/customElement.d.ts +18 -1
  308. package/dist/components/calcite-block/customElement.js +54 -40
  309. package/dist/components/calcite-block/index.d.ts +1 -1
  310. package/dist/components/calcite-block/index.js +1 -1
  311. package/dist/components/calcite-block/utils.d.ts +2 -0
  312. package/dist/components/calcite-block-group/customElement.d.ts +50 -0
  313. package/dist/components/calcite-block-group/customElement.js +177 -0
  314. package/dist/components/calcite-block-group/index.d.ts +2 -0
  315. package/dist/components/calcite-block-group/index.js +2 -0
  316. package/dist/components/calcite-block-group/interfaces.d.ts +14 -0
  317. package/dist/components/calcite-block-group/resources.d.ts +8 -0
  318. package/dist/components/calcite-block-group/utils.d.ts +1 -0
  319. package/dist/components/calcite-block-section/customElement.js +19 -23
  320. package/dist/components/calcite-button/customElement.js +28 -30
  321. package/dist/components/calcite-card/customElement.js +17 -23
  322. package/dist/components/calcite-card-group/customElement.js +15 -18
  323. package/dist/components/calcite-carousel/customElement.js +29 -32
  324. package/dist/components/calcite-carousel-item/customElement.js +3 -5
  325. package/dist/components/calcite-checkbox/customElement.d.ts +4 -1
  326. package/dist/components/calcite-checkbox/customElement.js +18 -22
  327. package/dist/components/calcite-chip/customElement.js +42 -44
  328. package/dist/components/calcite-chip-group/customElement.js +10 -14
  329. package/dist/components/calcite-color-picker/customElement.d.ts +1 -1
  330. package/dist/components/calcite-color-picker/customElement.js +200 -178
  331. package/dist/components/calcite-color-picker/resources.d.ts +7 -16
  332. package/dist/components/calcite-color-picker/utils.d.ts +4 -3
  333. package/dist/components/calcite-color-picker-hex-input/customElement.js +27 -31
  334. package/dist/components/calcite-color-picker-swatch/customElement.js +3 -5
  335. package/dist/components/calcite-combobox/customElement.d.ts +5 -3
  336. package/dist/components/calcite-combobox/customElement.js +166 -160
  337. package/dist/components/calcite-combobox/resources.d.ts +1 -0
  338. package/dist/components/calcite-combobox-item/customElement.d.ts +2 -1
  339. package/dist/components/calcite-combobox-item/customElement.js +47 -38
  340. package/dist/components/calcite-combobox-item-group/customElement.js +13 -15
  341. package/dist/components/calcite-date-picker/customElement.d.ts +8 -2
  342. package/dist/components/calcite-date-picker/customElement.js +28 -31
  343. package/dist/components/calcite-date-picker-day/customElement.js +16 -19
  344. package/dist/components/calcite-date-picker-month/customElement.js +39 -41
  345. package/dist/components/calcite-date-picker-month-header/customElement.js +40 -44
  346. package/dist/components/calcite-dialog/customElement.d.ts +20 -4
  347. package/dist/components/calcite-dialog/customElement.js +78 -72
  348. package/dist/components/calcite-dialog/resources.d.ts +1 -0
  349. package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
  350. package/dist/components/calcite-dropdown/customElement.js +63 -70
  351. package/dist/components/calcite-dropdown/resources.d.ts +1 -0
  352. package/dist/components/calcite-dropdown-group/customElement.js +4 -6
  353. package/dist/components/calcite-dropdown-item/customElement.js +20 -23
  354. package/dist/components/calcite-fab/customElement.js +19 -23
  355. package/dist/components/calcite-filter/customElement.js +20 -25
  356. package/dist/components/calcite-flow/customElement.js +19 -22
  357. package/dist/components/calcite-flow-item/customElement.js +26 -30
  358. package/dist/components/calcite-graph/customElement.js +52 -50
  359. package/dist/components/calcite-graph/interfaces.d.ts +1 -5
  360. package/dist/components/calcite-graph/resources.d.ts +5 -0
  361. package/dist/components/calcite-handle/customElement.d.ts +3 -0
  362. package/dist/components/calcite-handle/customElement.js +20 -18
  363. package/dist/components/calcite-icon/customElement.js +23 -25
  364. package/dist/components/calcite-inline-editable/customElement.js +25 -29
  365. package/dist/components/calcite-input/customElement.d.ts +14 -6
  366. package/dist/components/calcite-input/customElement.js +26 -29
  367. package/dist/components/calcite-input-date-picker/customElement.d.ts +12 -3
  368. package/dist/components/calcite-input-date-picker/customElement.js +84 -88
  369. package/dist/components/calcite-input-message/customElement.js +3 -5
  370. package/dist/components/calcite-input-number/customElement.d.ts +12 -5
  371. package/dist/components/calcite-input-number/customElement.js +30 -36
  372. package/dist/components/calcite-input-text/customElement.d.ts +10 -4
  373. package/dist/components/calcite-input-text/customElement.js +61 -65
  374. package/dist/components/calcite-input-time-picker/customElement.d.ts +8 -3
  375. package/dist/components/calcite-input-time-picker/customElement.js +45 -47
  376. package/dist/components/calcite-input-time-zone/customElement.js +53 -55
  377. package/dist/components/calcite-label/customElement.js +3 -5
  378. package/dist/components/calcite-link/customElement.js +10 -14
  379. package/dist/components/calcite-list/customElement.js +67 -70
  380. package/dist/components/calcite-list-item/customElement.js +54 -73
  381. package/dist/components/calcite-list-item/utils.d.ts +1 -0
  382. package/dist/components/calcite-list-item-group/customElement.js +3 -5
  383. package/dist/components/calcite-loader/customElement.js +3 -7
  384. package/dist/components/calcite-menu/customElement.js +12 -16
  385. package/dist/components/calcite-menu-item/customElement.js +12 -16
  386. package/dist/components/calcite-meter/customElement.js +26 -28
  387. package/dist/components/calcite-modal/customElement.d.ts +16 -3
  388. package/dist/components/calcite-modal/customElement.js +61 -61
  389. package/dist/components/calcite-navigation/customElement.js +17 -21
  390. package/dist/components/calcite-navigation-logo/customElement.js +12 -16
  391. package/dist/components/calcite-navigation-user/customElement.js +10 -14
  392. package/dist/components/calcite-notice/customElement.js +25 -28
  393. package/dist/components/calcite-option/customElement.js +3 -5
  394. package/dist/components/calcite-option-group/customElement.js +3 -5
  395. package/dist/components/calcite-pagination/customElement.js +15 -17
  396. package/dist/components/calcite-panel/customElement.js +45 -48
  397. package/dist/components/calcite-popover/customElement.d.ts +10 -7
  398. package/dist/components/calcite-popover/customElement.js +70 -79
  399. package/dist/components/calcite-progress/customElement.js +3 -5
  400. package/dist/components/calcite-radio-button/customElement.d.ts +4 -1
  401. package/dist/components/calcite-radio-button/customElement.js +17 -20
  402. package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -1
  403. package/dist/components/calcite-radio-button-group/customElement.js +14 -17
  404. package/dist/components/calcite-rating/customElement.js +21 -23
  405. package/dist/components/calcite-scrim/customElement.js +3 -5
  406. package/dist/components/calcite-segmented-control/customElement.d.ts +4 -1
  407. package/dist/components/calcite-segmented-control/customElement.js +14 -17
  408. package/dist/components/calcite-segmented-control-item/customElement.js +28 -30
  409. package/dist/components/calcite-select/customElement.d.ts +4 -1
  410. package/dist/components/calcite-select/customElement.js +19 -22
  411. package/dist/components/calcite-sheet/customElement.d.ts +17 -3
  412. package/dist/components/calcite-sheet/customElement.js +59 -62
  413. package/dist/components/calcite-shell/customElement.js +3 -6
  414. package/dist/components/calcite-shell-center-row/customElement.js +3 -5
  415. package/dist/components/calcite-shell-panel/customElement.js +16 -20
  416. package/dist/components/calcite-slider/customElement.d.ts +4 -1
  417. package/dist/components/calcite-slider/customElement.js +18 -21
  418. package/dist/components/calcite-sort-handle/customElement.js +45 -35
  419. package/dist/components/calcite-sort-handle/index.d.ts +1 -1
  420. package/dist/components/calcite-sort-handle/index.js +1 -1
  421. package/dist/components/calcite-sortable-list/customElement.d.ts +4 -1
  422. package/dist/components/calcite-sortable-list/customElement.js +21 -16
  423. package/dist/components/calcite-split-button/customElement.js +13 -20
  424. package/dist/components/calcite-stack/customElement.js +4 -6
  425. package/dist/components/calcite-stepper/customElement.js +36 -39
  426. package/dist/components/calcite-stepper-item/customElement.js +23 -22
  427. package/dist/components/calcite-switch/customElement.js +10 -14
  428. package/dist/components/calcite-tab/customElement.js +3 -5
  429. package/dist/components/calcite-tab-nav/customElement.js +3 -5
  430. package/dist/components/calcite-tab-title/customElement.js +3 -5
  431. package/dist/components/calcite-table/customElement.js +44 -47
  432. package/dist/components/calcite-table-cell/customElement.js +22 -25
  433. package/dist/components/calcite-table-header/customElement.js +18 -21
  434. package/dist/components/calcite-table-row/customElement.js +6 -8
  435. package/dist/components/calcite-tabs/customElement.js +3 -5
  436. package/dist/components/calcite-text-area/customElement.d.ts +10 -3
  437. package/dist/components/calcite-text-area/customElement.js +30 -37
  438. package/dist/components/calcite-tile/customElement.js +16 -20
  439. package/dist/components/calcite-tile-group/customElement.js +3 -5
  440. package/dist/components/calcite-tile-select/customElement.js +17 -22
  441. package/dist/components/calcite-tile-select-group/customElement.js +3 -5
  442. package/dist/components/calcite-time-picker/customElement.d.ts +1 -0
  443. package/dist/components/calcite-time-picker/customElement.js +19 -23
  444. package/dist/components/calcite-tip/customElement.js +3 -5
  445. package/dist/components/calcite-tip-group/customElement.js +3 -5
  446. package/dist/components/calcite-tip-manager/customElement.js +3 -5
  447. package/dist/components/calcite-tooltip/customElement.js +41 -40
  448. package/dist/components/calcite-tree/customElement.js +3 -5
  449. package/dist/components/calcite-tree-item/customElement.js +16 -14
  450. package/dist/components/interfaces.d.ts +4 -0
  451. package/dist/controllers/useFocusTrap.d.ts +67 -0
  452. package/dist/custom-theme/block.d.ts +4 -5
  453. package/dist/custom-theme/calcite-shell-panel.d.ts +13 -0
  454. package/dist/custom-theme/date-picker.d.ts +28 -0
  455. package/dist/custom-theme/flow.d.ts +21 -0
  456. package/dist/custom-theme/graph.d.ts +4 -0
  457. package/dist/custom-theme/inline-editable.d.ts +10 -0
  458. package/dist/custom-theme/segmented-control.d.ts +7 -0
  459. package/dist/docs/api.json +1141 -159
  460. package/dist/docs/docs.json +1093 -126
  461. package/dist/docs/supported-browsers.json +1 -1
  462. package/dist/docs/vscode.css-custom-data.json +315 -7
  463. package/dist/docs/vscode.html-custom-data.json +107 -60
  464. package/dist/docs/web-types.json +659 -119
  465. package/dist/extras/vscode-data.json +107 -60
  466. package/dist/index.d.ts +25 -0
  467. package/dist/index.js +3 -5
  468. package/dist/loader.js +16 -17
  469. package/dist/types/lumina.d.ts +18 -6
  470. package/dist/types/preact.d.ts +19 -6
  471. package/dist/types/react.d.ts +180 -165
  472. package/dist/types/stencil.d.ts +18 -6
  473. package/dist/utils/component.d.ts +4 -0
  474. package/dist/utils/focusTrapComponent.d.ts +9 -0
  475. package/dist/utils/loadable.d.ts +26 -43
  476. package/dist/utils/openCloseComponent.d.ts +17 -18
  477. package/hydrate/index.d.ts +1 -0
  478. package/hydrate/index.js +1 -0
  479. package/hydrate/index.mjs +1 -0
  480. package/package.json +11 -12
  481. package/readme.md +5 -69
  482. package/dist/calcite/2AZY343I.js +0 -6
  483. package/dist/calcite/2CPZ6K5L.js +0 -6
  484. package/dist/calcite/2M35C4DF.js +0 -6
  485. package/dist/calcite/2VVNNU7Q.js +0 -6
  486. package/dist/calcite/2XACBT2N.js +0 -6
  487. package/dist/calcite/32P7BAVF.js +0 -6
  488. package/dist/calcite/3HC2LTHR.js +0 -6
  489. package/dist/calcite/455MOJA6.js +0 -6
  490. package/dist/calcite/4DVWRXRA.js +0 -6
  491. package/dist/calcite/4TF5UO7R.js +0 -6
  492. package/dist/calcite/572RARTY.js +0 -6
  493. package/dist/calcite/5I36CFLM.js +0 -6
  494. package/dist/calcite/5OJMVZTI.js +0 -6
  495. package/dist/calcite/5YZTHYBK.js +0 -6
  496. package/dist/calcite/6L5EBECQ.js +0 -6
  497. package/dist/calcite/73JK3C3F.js +0 -6
  498. package/dist/calcite/7557S5FH.js +0 -6
  499. package/dist/calcite/7FJOFJBG.js +0 -6
  500. package/dist/calcite/7KUN772K.js +0 -6
  501. package/dist/calcite/7LABYE24.js +0 -6
  502. package/dist/calcite/7NPWRWEK.js +0 -6
  503. package/dist/calcite/7PQTHMQD.js +0 -6
  504. package/dist/calcite/AEIISXUM.js +0 -6
  505. package/dist/calcite/AT2QAEKC.js +0 -6
  506. package/dist/calcite/BHLCJMB4.js +0 -6
  507. package/dist/calcite/BOMPAJVU.js +0 -6
  508. package/dist/calcite/BYURAML5.js +0 -6
  509. package/dist/calcite/CRBGPV2Y.js +0 -6
  510. package/dist/calcite/CY2QE4I2.js +0 -6
  511. package/dist/calcite/D26RI2OE.js +0 -6
  512. package/dist/calcite/DCAWR655.js +0 -6
  513. package/dist/calcite/DSYDJ57C.js +0 -6
  514. package/dist/calcite/E2PVAX5K.js +0 -6
  515. package/dist/calcite/EH7S4XKL.js +0 -6
  516. package/dist/calcite/FGCHRTFU.js +0 -6
  517. package/dist/calcite/FIJQNNLL.js +0 -6
  518. package/dist/calcite/FIVGOTUL.js +0 -6
  519. package/dist/calcite/FPZSDG22.js +0 -6
  520. package/dist/calcite/FQJWCM6B.js +0 -6
  521. package/dist/calcite/FRK56FXW.js +0 -6
  522. package/dist/calcite/FSORFWYW.js +0 -6
  523. package/dist/calcite/FWSMKN2T.js +0 -6
  524. package/dist/calcite/GGQW5H6B.js +0 -6
  525. package/dist/calcite/GHY53YEU.js +0 -6
  526. package/dist/calcite/GWGCBSIN.js +0 -6
  527. package/dist/calcite/HH5FL6GD.js +0 -6
  528. package/dist/calcite/HNNE5R46.js +0 -6
  529. package/dist/calcite/HRVN7KZA.js +0 -6
  530. package/dist/calcite/I3TEC7IS.js +0 -6
  531. package/dist/calcite/I5SQS3SN.js +0 -6
  532. package/dist/calcite/I74ZLJFG.js +0 -6
  533. package/dist/calcite/I7SBXLRM.js +0 -6
  534. package/dist/calcite/IEJMBPJU.js +0 -6
  535. package/dist/calcite/IK3QCAZN.js +0 -6
  536. package/dist/calcite/IKOOMPAX.js +0 -6
  537. package/dist/calcite/IPDH2LDG.js +0 -6
  538. package/dist/calcite/IUBUCDD6.js +0 -6
  539. package/dist/calcite/JCMCWR7J.js +0 -6
  540. package/dist/calcite/JHGP2C56.js +0 -6
  541. package/dist/calcite/JMNIVK3R.js +0 -6
  542. package/dist/calcite/KDCUMRGX.js +0 -6
  543. package/dist/calcite/KEFBUO23.js +0 -6
  544. package/dist/calcite/KHNXDA3R.js +0 -6
  545. package/dist/calcite/KLEV3IGL.js +0 -6
  546. package/dist/calcite/LIT6HBCV.js +0 -6
  547. package/dist/calcite/LKXA7MRG.js +0 -6
  548. package/dist/calcite/LMTPIXJD.js +0 -6
  549. package/dist/calcite/M3MFRN64.js +0 -6
  550. package/dist/calcite/M5MPF4VA.js +0 -6
  551. package/dist/calcite/MWGGE65N.js +0 -6
  552. package/dist/calcite/MXNAKF47.js +0 -6
  553. package/dist/calcite/NNKZWGGT.js +0 -6
  554. package/dist/calcite/NVQN43XK.js +0 -6
  555. package/dist/calcite/OHLVZUJX.js +0 -6
  556. package/dist/calcite/OHR7IMVY.js +0 -6
  557. package/dist/calcite/OJ5D52RG.js +0 -6
  558. package/dist/calcite/OJ5H4H4N.js +0 -6
  559. package/dist/calcite/OTT2SAVW.js +0 -6
  560. package/dist/calcite/OTYNRKUI.js +0 -6
  561. package/dist/calcite/PB4E6L52.js +0 -6
  562. package/dist/calcite/PO4EKM6H.js +0 -6
  563. package/dist/calcite/PPU55N5C.js +0 -6
  564. package/dist/calcite/PRGXXMHF.js +0 -6
  565. package/dist/calcite/PZ34QZ44.js +0 -6
  566. package/dist/calcite/PZ65523C.js +0 -6
  567. package/dist/calcite/PZGFP3J5.js +0 -6
  568. package/dist/calcite/Q2OAKI4L.js +0 -7
  569. package/dist/calcite/QIOSM7C2.js +0 -6
  570. package/dist/calcite/QS2B427U.js +0 -6
  571. package/dist/calcite/QVG465DZ.js +0 -6
  572. package/dist/calcite/RJU34JMH.js +0 -6
  573. package/dist/calcite/RL6ENWBS.js +0 -6
  574. package/dist/calcite/RWRTOY74.js +0 -6
  575. package/dist/calcite/S66ATD4V.js +0 -6
  576. package/dist/calcite/SHIZHTEP.js +0 -6
  577. package/dist/calcite/SY776R43.js +0 -6
  578. package/dist/calcite/T2M3KJPZ.js +0 -6
  579. package/dist/calcite/T7AHSVKE.js +0 -6
  580. package/dist/calcite/TBZM4XEW.js +0 -6
  581. package/dist/calcite/THTH4FYX.js +0 -6
  582. package/dist/calcite/TI4ZYY5Y.js +0 -6
  583. package/dist/calcite/TKE6VYZT.js +0 -6
  584. package/dist/calcite/TR3TLSTJ.js +0 -6
  585. package/dist/calcite/TSUCKRY4.js +0 -6
  586. package/dist/calcite/TWZNPBFB.js +0 -6
  587. package/dist/calcite/U5AZRHO7.js +0 -6
  588. package/dist/calcite/UE43U5QZ.js +0 -6
  589. package/dist/calcite/UHCCT74Q.js +0 -6
  590. package/dist/calcite/USP47AIY.js +0 -6
  591. package/dist/calcite/V3ZZW4SK.js +0 -6
  592. package/dist/calcite/WBOLRFTK.js +0 -6
  593. package/dist/calcite/WH3NETOG.js +0 -6
  594. package/dist/calcite/WHD4MFC3.js +0 -6
  595. package/dist/calcite/WJ6LOMWZ.js +0 -6
  596. package/dist/calcite/WKI76QXV.js +0 -6
  597. package/dist/calcite/WRQMW4QF.js +0 -24
  598. package/dist/calcite/X4RLJXN2.js +0 -6
  599. package/dist/calcite/XDGCDDNX.js +0 -8
  600. package/dist/calcite/XL6QBGWC.js +0 -6
  601. package/dist/calcite/XVBU5M6P.js +0 -6
  602. package/dist/calcite/Z4XCJ5VE.js +0 -6
  603. package/dist/calcite/ZQERQE2F.js +0 -6
  604. package/dist/calcite/ZYUUIPOD.js +0 -6
@@ -1,56 +1,72 @@
1
- import { c as ie } from "../../chunks/runtime.js";
1
+ import { c as se } from "../../chunks/runtime.js";
2
2
  import { ref as v } from "lit-html/directives/ref.js";
3
- import { repeat as ae } from "lit-html/directives/repeat.js";
4
- import { keyed as D } from "lit-html/directives/keyed.js";
5
- import { H as p, D as m, e as K, f as I, n as O, h as S, p as H, C as b, g as P, j as $, k as le, l as se, m as U, O as y, R as x, q as n, o as z, t as ne, s as j, u as N, v as re, c as R, S as W } from "../../chunks/utils4.js";
6
- import { throttle as ce } from "lodash-es";
7
- import { html as u, nothing as A } from "lit";
8
- import { LitElement as he, createEvent as _, safeClassMap as c, safeStyleMap as k } from "@arcgis/lumina";
9
- import { i as B, h as de, g as pe } from "../../chunks/dom.js";
10
- import { u as ue, I as Ce } from "../../chunks/interactive.js";
11
- import { i as fe } from "../../chunks/key.js";
12
- import { c as ge, s as me, a as ve } from "../../chunks/loadable.js";
13
- import { r as V, c as Se, a as be } from "../../chunks/math.js";
3
+ import { repeat as le } from "lit-html/directives/repeat.js";
4
+ import { keyed as I } from "lit-html/directives/keyed.js";
5
+ import { D as g, e as E, S as $, g as ne, f as re, n as O, h as S, p as K, C as b, j as P, k as x, l as ce, m as H, O as y, R as A, H as p, q as n, o as U, t as he, s as j, u as W, v as de, c as R, w as N } from "../../chunks/utils4.js";
6
+ import { throttle as _ } from "lodash-es";
7
+ import { html as u, nothing as D } from "lit";
8
+ import { LitElement as pe, createEvent as B, safeClassMap as c, safeStyleMap as k } from "@arcgis/lumina";
9
+ import { i as V, h as ue, g as Ce } from "../../chunks/dom.js";
10
+ import { u as fe, I as me } from "../../chunks/interactive.js";
11
+ import { i as ge } from "../../chunks/key.js";
12
+ import { c as ve } from "../../chunks/loadable.js";
13
+ import { c as Se, r as X, a as be } from "../../chunks/math.js";
14
14
  import { u as ye } from "../../chunks/useT9n.js";
15
- import { css as we } from "@lit/reactive-element/css-tag.js";
16
- /*!
17
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
18
- * See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
19
- * v3.0.0-next.99
20
- */
21
- const $e = we`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-color-picker-spacing: 8px}:host([scale=s]) .container{inline-size:198px}:host([scale=s]) .saved-colors{gap:.25rem;grid-template-columns:repeat(auto-fill,20px)}:host([scale=m]){--calcite-color-picker-spacing: 12px}:host([scale=m]) .container{inline-size:238px}:host([scale=l]){--calcite-color-picker-spacing: 16px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:302px}:host([scale=l]) .section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill,32px)}:host([scale=l]) .control-section{flex-wrap:nowrap;align-items:baseline;flex-wrap:wrap}:host([scale=l]) .color-hex-options{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-color-foreground-1);display:inline-block;border:1px solid var(--calcite-color-border-1)}.control-and-scope{position:relative;display:flex;cursor:pointer;touch-action:none}.color-field,.control-and-scope{-webkit-user-select:none;user-select:none}.scope{pointer-events:none;position:absolute;z-index:var(--calcite-z-index);block-size:1px;inline-size:1px;border-radius:9999px;background-color:transparent;font-size:var(--calcite-font-size--1);outline-color:transparent}.scope:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:6px}.hex-and-channels-group{inline-size:100%}.hex-and-channels-group,.control-section{display:flex;flex-direction:row;flex-wrap:wrap}.section{padding-block:0 var(--calcite-color-picker-spacing);padding-inline:var(--calcite-color-picker-spacing)}.section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}.sliders{display:flex;flex-direction:column;justify-content:space-between;margin-inline-start:var(--calcite-color-picker-spacing);gap:var(--calcite-spacing-xxs)}.preview-and-sliders{display:flex;align-items:center;padding:var(--calcite-color-picker-spacing)}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;color:var(--calcite-color-text-1)}.color-mode-container{padding-block-start:var(--calcite-color-picker-spacing)}.channels{display:flex}.channel{flex-grow:1}.channel[data-channel-index="3"]{margin-inline-start:-1px;min-inline-size:81px}:host([scale=s]) .channel[data-channel-index="3"]{min-inline-size:68px}:host([scale=l]) .channel[data-channel-index="3"]{min-inline-size:88px}.saved-colors{display:grid;gap:.5rem;padding-block-start:var(--calcite-color-picker-spacing);grid-template-columns:repeat(auto-fill,24px)}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-color-border-2);outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`, xe = 16;
22
- class Ae extends he {
15
+ import { c as we } from "../../chunks/observers.js";
16
+ import { css as $e } from "@lit/reactive-element/css-tag.js";
17
+ /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
18
+ See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
19
+ v3.0.0 */
20
+ const xe = $e`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);inline-size:var(--calcite-internal-color-picker-min-width);min-inline-size:var(--calcite-internal-color-picker-min-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-color-picker-min-width: 200px;--calcite-color-picker-spacing: 8px}:host([scale=s]) .saved-colors{gap:.25rem;grid-template-columns:repeat(auto-fill,20px)}:host([scale=m]){--calcite-internal-color-picker-min-width: 240px;--calcite-color-picker-spacing: 12px}:host([scale=l]){--calcite-internal-color-picker-min-width: 304px;--calcite-color-picker-spacing: 16px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill,32px)}:host([scale=l]) .control-section{display:flex;flex-direction:column;flex-wrap:wrap;align-items:baseline}:host([scale=l]) .color-hex-options{inline-size:100%;display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-color-foreground-1);display:flex;flex-direction:column;block-size:min-content;border:1px solid var(--calcite-color-border-1)}.control-and-scope{position:relative;display:flex;cursor:pointer;touch-action:none}.color-field,.control-and-scope{-webkit-user-select:none;user-select:none}.scope{pointer-events:none;position:absolute;z-index:var(--calcite-z-index);block-size:1px;inline-size:1px;border-radius:9999px;background-color:transparent;font-size:var(--calcite-font-size--1);outline-color:transparent}.scope:focus{outline:2px solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));outline-offset:6px}.hex-and-channels-group{display:flex;inline-size:100%;flex-direction:column;flex-wrap:wrap}.section{padding-block:0 var(--calcite-color-picker-spacing);padding-inline:var(--calcite-color-picker-spacing)}.section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}.sliders{display:flex;flex-direction:column;justify-content:space-between;margin-inline-start:var(--calcite-color-picker-spacing);gap:var(--calcite-spacing-xxs)}.preview-and-sliders{display:flex;align-items:center;padding:var(--calcite-color-picker-spacing)}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;color:var(--calcite-color-text-1)}.color-mode-container{padding-block-start:var(--calcite-color-picker-spacing)}.channels{display:flex}.channel{flex-grow:1}.channel[data-channel-index="3"]{margin-inline-start:-1px;min-inline-size:81px}:host([scale=s]) .channel[data-channel-index="3"]{min-inline-size:68px}:host([scale=l]) .channel[data-channel-index="3"]{min-inline-size:88px}.saved-colors{display:grid;gap:.5rem;padding-block-start:var(--calcite-color-picker-spacing);grid-template-columns:repeat(auto-fill,24px)}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-color-border-2);outline-offset:2px}:host([hidden]){display:none}[hidden]{display:none}`, q = 16;
21
+ class Ae extends pe {
23
22
  // #endregion
24
23
  // #region Lifecycle
25
24
  constructor() {
26
- super(), this.captureColorFieldColor = (e, t, o = !0) => {
27
- const { dimensions: { colorField: { height: i, width: a } } } = this, l = Math.round(p.s / a * e), s = Math.round(p.v / i * (i - t));
28
- this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(l).value(s), o);
29
- }, this._color = m, this.drawColorControls = ce((e = "all") => {
25
+ super(), this._color = g, this.internalColorUpdateContext = null, this.isActiveChannelInputEmpty = !1, this.mode = E.HEX, this.resizeObserver = we("resize", (e) => this.resizeCanvas(e)), this.shiftKeyChannelAdjustment = 0, this.upOrDownArrowKeyTracker = null, this._valueWasSet = !1, this.channelMode = "rgb", this.channels = this.toChannels(g), this.staticDimensions = $.m, this.savedColors = [], this.allowEmpty = !1, this.alphaChannel = !1, this.channelsDisabled = !1, this.clearable = !1, this.disabled = !1, this.format = "auto", this.hexDisabled = !1, this.messages = ye({ blocking: !0 }), this.savedDisabled = !1, this.scale = "m", this.calciteColorPickerChange = B({ cancelable: !1 }), this.calciteColorPickerInput = B({ cancelable: !1 }), this.captureColorFieldColor = (e, t, i = !0) => {
26
+ const { width: o, height: a } = this.dynamicDimensions.colorField, s = Math.round(p.s / o * e), l = Math.round(p.v / a * (a - t));
27
+ this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(l), i);
28
+ }, this.drawColorControls = _((e = "all") => {
30
29
  (e === "all" || e === "color-field") && this.colorFieldRenderingContext && this.drawColorField(), (e === "all" || e === "hue-slider") && this.hueSliderRenderingContext && this.drawHueSlider(), this.alphaChannel && (e === "all" || e === "opacity-slider") && this.opacitySliderRenderingContext && this.drawOpacitySlider();
31
- }, xe), this.globalPointerMoveHandler = (e) => {
32
- const { activeCanvasInfo: t, el: o } = this;
33
- if (!o.isConnected || !t)
30
+ }, q), this.globalPointerMoveHandler = (e) => {
31
+ const { activeCanvasInfo: t, el: i } = this;
32
+ if (!i.isConnected || !t)
34
33
  return;
35
- const { context: i, bounds: a } = t;
36
- let l, s;
34
+ const { context: o, bounds: a } = t;
35
+ let s, l;
37
36
  const { clientX: r, clientY: h } = e;
38
- i.canvas.matches(":hover") ? (l = r - a.x, s = h - a.y) : (r < a.x + a.width && r > a.x ? l = r - a.x : r < a.x ? l = 0 : l = a.width, h < a.y + a.height && h > a.y ? s = h - a.y : h < a.y ? s = 0 : s = a.height), i === this.colorFieldRenderingContext ? this.captureColorFieldColor(l, s, !1) : i === this.hueSliderRenderingContext ? this.captureHueSliderColor(l) : i === this.opacitySliderRenderingContext && this.captureOpacitySliderValue(l);
37
+ o.canvas.matches(":hover") ? (s = r - a.x, l = h - a.y) : (r < a.x + a.width && r > a.x ? s = r - a.x : r < a.x ? s = 0 : s = a.width, h < a.y + a.height && h > a.y ? l = h - a.y : h < a.y ? l = 0 : l = a.height), o === this.colorFieldRenderingContext ? this.captureColorFieldColor(s, l, !1) : o === this.hueSliderRenderingContext ? this.captureHueSliderColor(s) : o === this.opacitySliderRenderingContext && this.captureOpacitySliderValue(s);
39
38
  }, this.globalPointerUpHandler = (e) => {
40
- if (!B(e))
39
+ if (!V(e))
41
40
  return;
42
41
  const t = this.activeCanvasInfo;
43
42
  this.activeCanvasInfo = null, this.drawColorControls(), t && this.calciteColorPickerChange.emit();
44
- }, this.internalColorUpdateContext = null, this.isActiveChannelInputEmpty = !1, this.mode = K.HEX, this.shiftKeyChannelAdjustment = 0, this.upOrDownArrowKeyTracker = null, this._valueWasSet = !1, this.channelMode = "rgb", this.channels = this.toChannels(m), this.dimensions = I.m, this.savedColors = [], this.allowEmpty = !1, this.alphaChannel = !1, this.channelsDisabled = !1, this.clearable = !1, this.disabled = !1, this.format = "auto", this.hexDisabled = !1, this.messages = ye({ blocking: !0 }), this.savedDisabled = !1, this.scale = "m", this.calciteColorPickerChange = _({ cancelable: !1 }), this.calciteColorPickerInput = _({ cancelable: !1 }), this.listen("keydown", this.handleChannelKeyUpOrDown, { capture: !0 }), this.listen("keyup", this.handleChannelKeyUpOrDown, { capture: !0 });
43
+ }, this.resizeCanvas = _((e) => {
44
+ if (!this.hasUpdated)
45
+ return;
46
+ const [t] = e, i = Math.floor(t.contentBoxSize[0].inlineSize);
47
+ this.dynamicDimensions.colorField.width !== i && (this.updateDynamicDimensions(i), this.updateCanvasSize(), this.drawColorControls());
48
+ }, q), this.updateDynamicDimensions = (e) => {
49
+ const t = {
50
+ width: ne(e, this.staticDimensions, this.alphaChannel),
51
+ height: this.staticDimensions.slider.height
52
+ };
53
+ this.dynamicDimensions = {
54
+ colorField: re(e),
55
+ slider: t
56
+ };
57
+ }, this.listen("keydown", this.handleChannelKeyUpOrDown, { capture: !0 }), this.listen("keyup", this.handleChannelKeyUpOrDown, { capture: !0 });
45
58
  }
46
59
  static {
47
- this.properties = { channelMode: 16, channels: 16, colorFieldScopeLeft: 16, colorFieldScopeTop: 16, dimensions: 16, hueScopeLeft: 16, opacityScopeLeft: 16, savedColors: 16, scopeOrientation: 16, allowEmpty: 7, alphaChannel: 5, channelsDisabled: 5, clearable: 7, color: 0, disabled: 7, format: 3, hexDisabled: 5, messageOverrides: 0, numberingSystem: 3, savedDisabled: 7, scale: 3, storageId: 3, value: 1 };
60
+ this.properties = { channelMode: 16, channels: 16, colorFieldScopeLeft: 16, colorFieldScopeTop: 16, staticDimensions: 16, hueScopeLeft: 16, opacityScopeLeft: 16, savedColors: 16, scopeOrientation: 16, allowEmpty: 7, alphaChannel: 5, channelsDisabled: 5, clearable: 7, color: 0, disabled: 7, format: 3, hexDisabled: 5, messageOverrides: 0, numberingSystem: 3, savedDisabled: 7, scale: 3, storageId: 3, value: 1 };
48
61
  }
49
62
  static {
50
- this.styles = $e;
63
+ this.styles = xe;
51
64
  }
52
65
  get baseColorFieldColor() {
53
- return this.color || this.previousColor || m;
66
+ return this.color || this.previousColor || g;
67
+ }
68
+ get effectiveSliderWidth() {
69
+ return this.dynamicDimensions.slider.width;
54
70
  }
55
71
  /**
56
72
  * Internal prop for advanced use-cases.
@@ -85,38 +101,44 @@ class Ae extends he {
85
101
  // #region Public Methods
86
102
  /** Sets focus on the component's first focusable element. */
87
103
  async setFocus() {
88
- await ge(this), de(this.el);
104
+ await ve(this), ue(this.el);
105
+ }
106
+ connectedCallback() {
107
+ super.connectedCallback(), this.observeResize();
89
108
  }
90
109
  async load() {
91
- this._valueWasSet || (this._value ??= O(S(m, this.alphaChannel))), me(this), this.handleAllowEmptyOrClearableChange(), this.handleAlphaChannelDimensionsChange();
92
- const { isClearable: e, color: t, format: o, value: i } = this, a = e && !i, l = H(i), s = a || o === "auto" && l || o === l, r = a ? null : s ? b(i) : t;
93
- s || this.showIncompatibleColorWarning(i, o), this.setMode(o, !1), this.internalColorSet(r, !1, "initial"), this.updateDimensions(this.scale);
110
+ this._valueWasSet || (this._value ??= O(S(g, this.alphaChannel))), this.handleAllowEmptyOrClearableChange();
111
+ const { isClearable: e, color: t, format: i, value: o } = this, a = e && !o, s = K(o), l = a || i === "auto" && s || i === s, r = a ? null : l ? b(o) : t;
112
+ l || this.showIncompatibleColorWarning(o, i), this.setMode(i, !1), this.internalColorSet(r, !1, "initial"), this.updateStaticDimensions(this.scale), this.updateDynamicDimensions($[this.scale].minWidth);
94
113
  const h = `${P}${this.storageId}`;
95
114
  this.storageId && localStorage.getItem(h) && (this.savedColors = JSON.parse(localStorage.getItem(h)));
96
115
  }
97
116
  willUpdate(e) {
98
- (e.has("allowEmpty") && (this.hasUpdated || this.allowEmpty !== !1) || e.has("clearable") && (this.hasUpdated || this.clearable !== !1)) && this.handleAllowEmptyOrClearableChange(), e.has("alphaChannel") && (this.hasUpdated || this.alphaChannel !== !1) && this.handleAlphaChannelChange(this.alphaChannel), (e.has("alphaChannel") && (this.hasUpdated || this.alphaChannel !== !1) || e.has("dimensions") && (this.hasUpdated || this.dimensions !== I.m)) && this.handleAlphaChannelDimensionsChange(), (e.has("alphaChannel") && (this.hasUpdated || this.alphaChannel !== !1) || e.has("format") && (this.hasUpdated || this.format !== "auto")) && this.handleFormatOrAlphaChannelChange(), e.has("scale") && (this.hasUpdated || this.scale !== "m") && this.handleScaleChange(this.scale);
117
+ (e.has("allowEmpty") && (this.hasUpdated || this.allowEmpty !== !1) || e.has("clearable") && (this.hasUpdated || this.clearable !== !1)) && this.handleAllowEmptyOrClearableChange(), e.has("alphaChannel") && (this.hasUpdated || this.alphaChannel !== !1) && this.handleAlphaChannelChange(this.alphaChannel), this.hasUpdated && (e.has("alphaChannel") && this.alphaChannel !== !1 || e.has("staticDimensions") && this.staticDimensions !== $.m) && this.handleAlphaChannelDimensionsChange(), (e.has("alphaChannel") && (this.hasUpdated || this.alphaChannel !== !1) || e.has("format") && (this.hasUpdated || this.format !== "auto")) && this.handleFormatOrAlphaChannelChange(), e.has("scale") && (this.hasUpdated || this.scale !== "m") && this.handleScaleChange(this.scale);
99
118
  }
100
119
  updated() {
101
- ue(this);
120
+ fe(this);
102
121
  }
103
122
  loaded() {
104
- ve(this);
123
+ this.handleAlphaChannelDimensionsChange();
105
124
  }
106
125
  disconnectedCallback() {
107
- super.disconnectedCallback(), window.removeEventListener("pointermove", this.globalPointerMoveHandler), window.removeEventListener("pointerup", this.globalPointerUpHandler);
126
+ super.disconnectedCallback(), window.removeEventListener("pointermove", this.globalPointerMoveHandler), window.removeEventListener("pointerup", this.globalPointerUpHandler), this.resizeObserver?.disconnect();
108
127
  }
109
128
  // #endregion
110
129
  // #region Private Methods
130
+ observeResize() {
131
+ this.resizeObserver?.observe(this.el);
132
+ }
111
133
  handleAllowEmptyOrClearableChange() {
112
134
  this.isClearable = this.clearable || this.allowEmpty;
113
135
  }
114
136
  handleAlphaChannelChange(e) {
115
137
  const { format: t } = this;
116
- e && t !== "auto" && !$(t) && (console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`), this.alphaChannel = !1);
138
+ e && t !== "auto" && !x(t) && (console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`), this.alphaChannel = !1);
117
139
  }
118
140
  handleAlphaChannelDimensionsChange() {
119
- this.effectiveSliderWidth = le(this.dimensions, this.alphaChannel), this.drawColorControls();
141
+ this.drawColorControls();
120
142
  }
121
143
  handleColorChange(e, t) {
122
144
  this.drawColorControls(), this.updateChannelsFromColor(e), this.previousColor = t;
@@ -125,82 +147,82 @@ class Ae extends he {
125
147
  this.setMode(this.format), this.internalColorSet(this.color, !1, "internal");
126
148
  }
127
149
  handleScaleChange(e = "m") {
128
- this.updateDimensions(e), this.updateCanvasSize("all"), this.drawColorControls();
150
+ this.updateStaticDimensions(e), this.updateCanvasSize(), this.drawColorControls();
129
151
  }
130
152
  handleValueChange(e, t) {
131
- const { isClearable: o, format: i } = this, a = !o || e;
132
- let l = !1;
153
+ const { isClearable: i, format: o } = this, a = !i || e;
154
+ let s = !1;
133
155
  if (a) {
134
- const d = H(e);
135
- if (!d || i !== "auto" && d !== i) {
136
- this.showIncompatibleColorWarning(e, i), this._value = t;
156
+ const d = K(e);
157
+ if (!d || o !== "auto" && d !== o) {
158
+ this.showIncompatibleColorWarning(e, o), this._value = t;
137
159
  return;
138
160
  }
139
- l = this.mode !== d, this.setMode(d, this.internalColorUpdateContext === null);
161
+ s = this.mode !== d, this.setMode(d, this.internalColorUpdateContext === null);
140
162
  }
141
- const s = this.activeCanvasInfo;
163
+ const l = this.activeCanvasInfo;
142
164
  if (this.internalColorUpdateContext === "initial")
143
165
  return;
144
166
  if (this.internalColorUpdateContext === "user-interaction") {
145
- this.calciteColorPickerInput.emit(), s || this.calciteColorPickerChange.emit();
167
+ this.calciteColorPickerInput.emit(), l || this.calciteColorPickerChange.emit();
146
168
  return;
147
169
  }
148
- const r = o && !e ? null : b(e != null && typeof e == "object" && $(this.mode) ? se(e) : e), h = !U(r, this.color);
149
- (l || h) && this.internalColorSet(r, this.alphaChannel && !(this.mode.endsWith("a") || this.mode.endsWith("a-css")), "internal");
170
+ const r = i && !e ? null : b(e != null && typeof e == "object" && x(this.mode) ? ce(e) : e), h = !H(r, this.color);
171
+ (s || h) && this.internalColorSet(r, this.alphaChannel && !(this.mode.endsWith("a") || this.mode.endsWith("a-css")) || this.internalColorUpdateContext === "internal", "internal");
150
172
  }
151
173
  handleTabActivate(e) {
152
174
  this.channelMode = e.currentTarget.getAttribute("data-color-mode"), this.updateChannelsFromColor(this.color);
153
175
  }
154
176
  handleColorFieldScopeKeyDown(e) {
155
- const { key: t } = e, o = {
177
+ const { key: t } = e, i = {
156
178
  ArrowUp: { x: 0, y: -10 },
157
179
  ArrowRight: { x: 10, y: 0 },
158
180
  ArrowDown: { x: 0, y: 10 },
159
181
  ArrowLeft: { x: -10, y: 0 }
160
182
  };
161
- o[t] && (e.preventDefault(), this.scopeOrientation = t === "ArrowDown" || t === "ArrowUp" ? "vertical" : "horizontal", this.captureColorFieldColor(this.colorFieldScopeLeft + o[t].x || 0, this.colorFieldScopeTop + o[t].y || 0, !1));
183
+ i[t] && (e.preventDefault(), this.scopeOrientation = t === "ArrowDown" || t === "ArrowUp" ? "vertical" : "horizontal", this.captureColorFieldColor(this.colorFieldScopeLeft + i[t].x || 0, this.colorFieldScopeTop + i[t].y || 0, !1));
162
184
  }
163
185
  handleHueScopeKeyDown(e) {
164
- const t = e.shiftKey ? 10 : 1, { key: o } = e, i = {
186
+ const t = e.shiftKey ? 10 : 1, { key: i } = e, o = {
165
187
  ArrowUp: 1,
166
188
  ArrowRight: 1,
167
189
  ArrowDown: -1,
168
190
  ArrowLeft: -1
169
191
  };
170
- if (i[o]) {
192
+ if (o[i]) {
171
193
  e.preventDefault();
172
- const a = i[o] * t, l = this.baseColorFieldColor.hue(), s = this.baseColorFieldColor.hue(l + a);
173
- this.internalColorSet(s, !1);
194
+ const a = o[i] * t, s = this.baseColorFieldColor.hue(), l = this.baseColorFieldColor.hue(s + a);
195
+ this.internalColorSet(l, !1);
174
196
  }
175
197
  }
176
198
  handleHexInputChange(e) {
177
199
  e.stopPropagation();
178
- const { isClearable: t, color: o } = this, a = e.target.value;
200
+ const { isClearable: t, color: i } = this, a = e.target.value;
179
201
  if (t && !a) {
180
202
  this.internalColorSet(null);
181
203
  return;
182
204
  }
183
- const l = o && O(S(o, $(this.mode)));
184
- a !== l && this.internalColorSet(b(a));
205
+ const s = i && O(S(i, x(this.mode)));
206
+ a !== s && this.internalColorSet(b(a));
185
207
  }
186
208
  handleSavedColorSelect(e) {
187
209
  const t = e.currentTarget;
188
210
  this.internalColorSet(b(t.color));
189
211
  }
190
212
  handleChannelInput(e) {
191
- const t = e.currentTarget, o = Number(t.getAttribute("data-channel-index")), a = o === 3 ? y.max : this.channelMode === "rgb" ? x[Object.keys(x)[o]] : p[Object.keys(p)[o]];
192
- let l;
213
+ const t = e.currentTarget, i = Number(t.getAttribute("data-channel-index")), a = i === 3 ? y.max : this.channelMode === "rgb" ? A[Object.keys(A)[i]] : p[Object.keys(p)[i]];
214
+ let s;
193
215
  if (!t.value)
194
- l = "", this.isActiveChannelInputEmpty = !0, this.upOrDownArrowKeyTracker = null;
216
+ s = "", this.isActiveChannelInputEmpty = !0, this.upOrDownArrowKeyTracker = null;
195
217
  else {
196
218
  const r = Number(t.value) + this.shiftKeyChannelAdjustment;
197
- l = Se(r, 0, a).toString();
219
+ s = Se(r, 0, a).toString();
198
220
  }
199
- t.value = l, l !== "" && this.shiftKeyChannelAdjustment !== 0 ? this.handleChannelChange(e) : l !== "" && this.handleChannelChange(e);
221
+ t.value = s, s !== "" && this.shiftKeyChannelAdjustment !== 0 ? this.handleChannelChange(e) : s !== "" && this.handleChannelChange(e);
200
222
  }
201
223
  handleChannelBlur(e) {
202
- const t = e.currentTarget, o = Number(t.getAttribute("data-channel-index")), i = [...this.channels];
203
- !t.value && !this.isClearable && (t.value = i[o]?.toString());
224
+ const t = e.currentTarget, i = Number(t.getAttribute("data-channel-index")), o = [...this.channels];
225
+ !t.value && !this.isClearable && (t.value = o[i]?.toString());
204
226
  }
205
227
  handleChannelFocus(e) {
206
228
  e.currentTarget.selectText();
@@ -211,30 +233,30 @@ class Ae extends he {
211
233
  const { key: t } = e;
212
234
  if (t !== "ArrowUp" && t !== "ArrowDown" || !e.composedPath().some((a) => a.classList?.contains(n.channel)))
213
235
  return;
214
- const { shiftKey: o } = e;
236
+ const { shiftKey: i } = e;
215
237
  if (e.preventDefault(), !this.color) {
216
238
  this.internalColorSet(this.previousColor), e.stopPropagation();
217
239
  return;
218
240
  }
219
- const i = 9;
220
- this.shiftKeyChannelAdjustment = t === "ArrowUp" && o ? i : t === "ArrowDown" && o ? -9 : 0, t === "ArrowUp" && (this.upOrDownArrowKeyTracker = "up"), t === "ArrowDown" && (this.upOrDownArrowKeyTracker = "down");
241
+ const o = 9;
242
+ this.shiftKeyChannelAdjustment = t === "ArrowUp" && i ? o : t === "ArrowDown" && i ? -9 : 0, t === "ArrowUp" && (this.upOrDownArrowKeyTracker = "up"), t === "ArrowDown" && (this.upOrDownArrowKeyTracker = "down");
221
243
  }
222
244
  getChannelInputLimit(e) {
223
- return this.channelMode === "rgb" ? x[Object.keys(x)[e]] : p[Object.keys(p)[e]];
245
+ return this.channelMode === "rgb" ? A[Object.keys(A)[e]] : p[Object.keys(p)[e]];
224
246
  }
225
247
  handleChannelChange(e) {
226
- const t = e.currentTarget, o = Number(t.getAttribute("data-channel-index")), i = [...this.channels];
248
+ const t = e.currentTarget, i = Number(t.getAttribute("data-channel-index")), o = [...this.channels];
227
249
  if (this.isClearable && !t.value) {
228
250
  this.channels = [null, null, null, null], this.internalColorSet(null);
229
251
  return;
230
252
  }
231
- const l = o === 3;
232
- this.isActiveChannelInputEmpty && this.upOrDownArrowKeyTracker && (t.value = this.upOrDownArrowKeyTracker === "up" ? (i[o] + 1 <= this.getChannelInputLimit(o) ? i[o] + 1 : this.getChannelInputLimit(o)).toString() : (i[o] - 1 >= 0 ? i[o] - 1 : 0).toString(), this.isActiveChannelInputEmpty = !1, this.upOrDownArrowKeyTracker = null);
233
- const s = t.value ? Number(t.value) : i[o];
234
- i[o] = l ? z(s) : s, this.updateColorFromChannels(i);
253
+ const s = i === 3;
254
+ this.isActiveChannelInputEmpty && this.upOrDownArrowKeyTracker && (t.value = this.upOrDownArrowKeyTracker === "up" ? (o[i] + 1 <= this.getChannelInputLimit(i) ? o[i] + 1 : this.getChannelInputLimit(i)).toString() : (o[i] - 1 >= 0 ? o[i] - 1 : 0).toString(), this.isActiveChannelInputEmpty = !1, this.upOrDownArrowKeyTracker = null);
255
+ const l = t.value ? Number(t.value) : o[i];
256
+ o[i] = s ? U(l) : l, this.updateColorFromChannels(o);
235
257
  }
236
258
  handleSavedColorKeyDown(e) {
237
- fe(e.key) && (e.preventDefault(), this.handleSavedColorSelect(e));
259
+ ge(e.key) && (e.preventDefault(), this.handleSavedColorSelect(e));
238
260
  }
239
261
  handleColorFieldPointerDown(e) {
240
262
  this.handleCanvasControlPointerDown(e, this.colorFieldRenderingContext, this.captureColorFieldColor, this.colorFieldScopeNode);
@@ -250,13 +272,13 @@ class Ae extends he {
250
272
  handleOpacitySliderPointerDown(e) {
251
273
  this.handleCanvasControlPointerDown(e, this.opacitySliderRenderingContext, this.captureOpacitySliderValue, this.opacityScopeNode);
252
274
  }
253
- handleCanvasControlPointerDown(e, t, o, i) {
254
- B(e) && (window.addEventListener("pointermove", this.globalPointerMoveHandler), window.addEventListener("pointerup", this.globalPointerUpHandler, {
275
+ handleCanvasControlPointerDown(e, t, i, o) {
276
+ V(e) && (window.addEventListener("pointermove", this.globalPointerMoveHandler), window.addEventListener("pointerup", this.globalPointerUpHandler, {
255
277
  once: !0
256
278
  }), this.activeCanvasInfo = {
257
279
  context: t,
258
280
  bounds: t.canvas.getBoundingClientRect()
259
- }, o.call(this, e.offsetX, e.offsetY), this.focusScope(i));
281
+ }, i.call(this, e.offsetX, e.offsetY), this.focusScope(o));
260
282
  }
261
283
  storeColorFieldScope(e) {
262
284
  this.colorFieldScopeNode = e;
@@ -271,91 +293,91 @@ class Ae extends he {
271
293
  console.warn(`ignoring color value (${e}) as it is not compatible with the current format (${t})`);
272
294
  }
273
295
  setMode(e, t = !0) {
274
- const o = e === "auto" ? this.mode : e;
275
- this.mode = this.ensureCompatibleMode(o, t);
296
+ const i = e === "auto" ? this.mode : e;
297
+ this.mode = this.ensureCompatibleMode(i, t);
276
298
  }
277
299
  ensureCompatibleMode(e, t) {
278
- const { alphaChannel: o } = this, i = $(e);
279
- if (o && !i) {
280
- const a = ne(e);
300
+ const { alphaChannel: i } = this, o = x(e);
301
+ if (i && !o) {
302
+ const a = he(e);
281
303
  return t && console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`), a;
282
304
  }
283
- if (!o && i) {
305
+ if (!i && o) {
284
306
  const a = j(e);
285
307
  return t && console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`), a;
286
308
  }
287
309
  return e;
288
310
  }
289
311
  captureHueSliderColor(e) {
290
- const t = N / this.effectiveSliderWidth * e;
312
+ const t = W / this.effectiveSliderWidth * e;
291
313
  this.internalColorSet(this.baseColorFieldColor.hue(t), !1);
292
314
  }
293
315
  captureOpacitySliderValue(e) {
294
- const t = z(y.max / this.effectiveSliderWidth * e);
316
+ const t = U(y.max / this.effectiveSliderWidth * e);
295
317
  this.internalColorSet(this.baseColorFieldColor.alpha(t), !1);
296
318
  }
297
- internalColorSet(e, t = !0, o = "user-interaction") {
298
- t && U(e, this.color) || (this.internalColorUpdateContext = o, this.color = e, this.value = this.toValue(e), this.internalColorUpdateContext = null);
319
+ internalColorSet(e, t = !0, i = "user-interaction") {
320
+ t && H(e, this.color) || (this.internalColorUpdateContext = i, this.color = e, this.value = this.toValue(e), this.internalColorUpdateContext = null);
299
321
  }
300
322
  toValue(e, t = this.mode) {
301
323
  if (!e)
302
324
  return null;
303
325
  if (t.includes("hex")) {
304
- const a = t === K.HEXA;
326
+ const a = t === E.HEXA;
305
327
  return O(S(e.round(), a), a);
306
328
  }
307
329
  if (t.includes("-css")) {
308
330
  const a = e[t.replace("-css", "").replace("a", "")]().round().string();
309
331
  if ((t.endsWith("a") || t.endsWith("a-css")) && e.alpha() === 1) {
310
- const s = a.slice(0, 3), r = a.slice(4, -1);
311
- return `${s}a(${r}, ${e.alpha()})`;
332
+ const l = a.slice(0, 3), r = a.slice(4, -1);
333
+ return `${l}a(${r}, ${e.alpha()})`;
312
334
  }
313
335
  return a;
314
336
  }
315
- const i = (
337
+ const o = (
316
338
  /* Color() does not support hsva, hsla nor rgba, so we use the non-alpha mode */
317
339
  e[j(t)]().round().object()
318
340
  );
319
- return t.endsWith("a") ? re(i) : i;
341
+ return t.endsWith("a") ? de(o) : o;
320
342
  }
321
343
  getSliderCapSpacing() {
322
- const { dimensions: { slider: { height: e }, thumb: { radius: t } } } = this;
344
+ const { staticDimensions: { slider: { height: e }, thumb: { radius: t } } } = this;
323
345
  return t * 2 - e;
324
346
  }
325
- updateDimensions(e = "m") {
326
- this.dimensions = I[e];
347
+ updateStaticDimensions(e = "m") {
348
+ this.staticDimensions = $[e];
327
349
  }
328
350
  deleteColor() {
329
351
  const e = S(this.color, this.alphaChannel);
330
352
  if (!(this.savedColors.indexOf(e) > -1))
331
353
  return;
332
- const o = this.savedColors.filter((a) => a !== e);
333
- this.savedColors = o;
334
- const i = `${P}${this.storageId}`;
335
- this.storageId && localStorage.setItem(i, JSON.stringify(o));
354
+ const i = this.savedColors.filter((a) => a !== e);
355
+ this.savedColors = i;
356
+ const o = `${P}${this.storageId}`;
357
+ this.storageId && localStorage.setItem(o, JSON.stringify(i));
336
358
  }
337
359
  saveColor() {
338
360
  const e = S(this.color, this.alphaChannel);
339
361
  if (this.savedColors.indexOf(e) > -1)
340
362
  return;
341
- const o = [...this.savedColors, e];
342
- this.savedColors = o;
343
- const i = `${P}${this.storageId}`;
344
- this.storageId && localStorage.setItem(i, JSON.stringify(o));
363
+ const i = [...this.savedColors, e];
364
+ this.savedColors = i;
365
+ const o = `${P}${this.storageId}`;
366
+ this.storageId && localStorage.setItem(o, JSON.stringify(i));
345
367
  }
346
368
  drawColorField() {
347
- const e = this.colorFieldRenderingContext, { dimensions: { colorField: { height: t, width: o } } } = this;
348
- e.fillStyle = this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(), e.fillRect(0, 0, o, t);
349
- const i = e.createLinearGradient(0, 0, o, 0);
350
- i.addColorStop(0, "rgba(255,255,255,1)"), i.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = i, e.fillRect(0, 0, o, t);
351
- const a = e.createLinearGradient(0, 0, 0, t);
352
- a.addColorStop(0, "rgba(0,0,0,0)"), a.addColorStop(1, "rgba(0,0,0,1)"), e.fillStyle = a, e.fillRect(0, 0, o, t), this.drawActiveColorFieldColor();
353
- }
354
- setCanvasContextSize(e, { height: t, width: o }) {
369
+ const e = this.colorFieldRenderingContext, { width: t, height: i } = this.dynamicDimensions.colorField;
370
+ e.fillStyle = this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(), e.fillRect(0, 0, t, i);
371
+ const o = e.createLinearGradient(0, 0, t, 0);
372
+ o.addColorStop(0, "rgba(255,255,255,1)"), o.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = o, e.fillRect(0, 0, t, i);
373
+ const a = e.createLinearGradient(0, 0, 0, i);
374
+ a.addColorStop(0, "rgba(0,0,0,0)"), a.addColorStop(1, "rgba(0,0,0,1)"), e.fillStyle = a, e.fillRect(0, 0, t, i), this.drawActiveColorFieldColor();
375
+ }
376
+ setCanvasContextSize(e, { height: t, width: i }) {
355
377
  if (!e)
356
378
  return;
357
- const i = window.devicePixelRatio || 1;
358
- e.width = o * i, e.height = t * i, e.style.height = `${t}px`, e.style.width = `${o}px`, e.getContext("2d").scale(i, i);
379
+ const o = window.devicePixelRatio || 1;
380
+ e.width = i * o, e.height = t * o, e.style.height = `${t}px`, e.style.width = `${i}px`, e.getContext("2d").scale(o, o);
359
381
  }
360
382
  initColorField(e) {
361
383
  e && (this.colorFieldRenderingContext = e.getContext("2d"), this.updateCanvasSize("color-field"), this.drawColorControls());
@@ -367,11 +389,11 @@ class Ae extends he {
367
389
  e && (this.opacitySliderRenderingContext = e.getContext("2d"), this.updateCanvasSize("opacity-slider"), this.drawOpacitySlider());
368
390
  }
369
391
  updateCanvasSize(e = "all") {
370
- const { dimensions: t } = this;
392
+ const { dynamicDimensions: t, staticDimensions: i } = this;
371
393
  (e === "all" || e === "color-field") && this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas, t.colorField);
372
394
  const o = {
373
395
  width: this.effectiveSliderWidth,
374
- height: t.slider.height + (t.thumb.radius - t.slider.height / 2) * 2
396
+ height: i.slider.height + (i.thumb.radius - t.slider.height / 2) * 2
375
397
  };
376
398
  (e === "all" || e === "hue-slider") && this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas, o), (e === "all" || e === "opacity-slider") && this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas, o);
377
399
  }
@@ -379,32 +401,32 @@ class Ae extends he {
379
401
  const { color: e } = this;
380
402
  if (!e)
381
403
  return;
382
- const t = e.hsv(), { dimensions: { colorField: { height: o, width: i }, thumb: { radius: a } } } = this, l = t.saturationv() / (p.s / i), s = o - t.value() / (p.v / o);
404
+ const t = e.hsv(), { staticDimensions: { thumb: { radius: i } } } = this, { width: o, height: a } = this.dynamicDimensions.colorField, s = t.saturationv() / (p.s / o), l = a - t.value() / (p.v / a);
383
405
  requestAnimationFrame(() => {
384
- this.colorFieldScopeLeft = l, this.colorFieldScopeTop = s;
385
- }), this.drawThumb(this.colorFieldRenderingContext, a, l, s, t, !1);
406
+ this.colorFieldScopeLeft = s, this.colorFieldScopeTop = l;
407
+ }), this.drawThumb(this.colorFieldRenderingContext, i, s, l, t, !1);
386
408
  }
387
- drawThumb(e, t, o, i, a, l) {
409
+ drawThumb(e, t, i, o, a, s) {
388
410
  const r = 2 * Math.PI, h = 1;
389
- if (e.beginPath(), e.arc(o, i, t, 0, r), e.fillStyle = "#fff", e.fill(), e.strokeStyle = "rgba(0,0,0,0.3)", e.lineWidth = h, e.stroke(), l && a.alpha() < 1) {
411
+ if (e.beginPath(), e.arc(i, o, t, 0, r), e.fillStyle = "#fff", e.fill(), e.strokeStyle = "rgba(0,0,0,0.3)", e.lineWidth = h, e.stroke(), s && a.alpha() < 1) {
390
412
  const C = e.createPattern(this.getCheckeredBackgroundPattern(), "repeat");
391
- e.beginPath(), e.arc(o, i, t - 3, 0, r), e.fillStyle = C, e.fill();
413
+ e.beginPath(), e.arc(i, o, t - 3, 0, r), e.fillStyle = C, e.fill();
392
414
  }
393
- e.globalCompositeOperation = "source-atop", e.beginPath(), e.arc(o, i, t - 3, 0, r);
394
- const d = l ? a.alpha() : 1;
415
+ e.globalCompositeOperation = "source-atop", e.beginPath(), e.arc(i, o, t - 3, 0, r);
416
+ const d = s ? a.alpha() : 1;
395
417
  e.fillStyle = a.rgb().alpha(d).string(), e.fill(), e.globalCompositeOperation = "source-over";
396
418
  }
397
419
  drawActiveHueSliderColor() {
398
420
  const { color: e } = this;
399
421
  if (!e)
400
422
  return;
401
- const t = e.hsv().saturationv(100).value(100), { dimensions: { thumb: { radius: o } } } = this, i = this.effectiveSliderWidth, a = t.hue() / (N / i), l = o, s = this.getSliderBoundX(a, i, o);
423
+ const t = e.hsv().saturationv(100).value(100), { staticDimensions: { thumb: { radius: i } } } = this, o = this.effectiveSliderWidth, a = t.hue() / (W / o), s = i, l = this.getSliderBoundX(a, o, i);
402
424
  requestAnimationFrame(() => {
403
- this.hueScopeLeft = s;
404
- }), this.drawThumb(this.hueSliderRenderingContext, o, s, l, t, !1);
425
+ this.hueScopeLeft = l;
426
+ }), this.drawThumb(this.hueSliderRenderingContext, i, l, s, t, !1);
405
427
  }
406
428
  drawHueSlider() {
407
- const e = this.hueSliderRenderingContext, { dimensions: { slider: { height: t }, thumb: { radius: o } } } = this, i = 0, a = o - t / 2, l = this.effectiveSliderWidth, s = e.createLinearGradient(0, 0, l, 0), r = [
429
+ const e = this.hueSliderRenderingContext, { staticDimensions: { slider: { height: t }, thumb: { radius: i } } } = this, o = 0, a = i - t / 2, s = this.effectiveSliderWidth, l = e.createLinearGradient(0, 0, s, 0), r = [
408
430
  "red",
409
431
  "yellow",
410
432
  "lime",
@@ -415,20 +437,20 @@ class Ae extends he {
415
437
  ], h = 1 / (r.length - 1);
416
438
  let d = 0;
417
439
  r.forEach((C) => {
418
- s.addColorStop(d, b(C).string()), d += h;
419
- }), e.clearRect(0, 0, l, t + this.getSliderCapSpacing() * 2), this.drawSliderPath(e, t, l, i, a), e.fillStyle = s, e.fill(), e.strokeStyle = "rgba(0,0,0,0.3)", e.lineWidth = 1, e.stroke(), this.drawActiveHueSliderColor();
440
+ l.addColorStop(d, b(C).string()), d += h;
441
+ }), e.clearRect(0, 0, s, t + this.getSliderCapSpacing() * 2), this.drawSliderPath(e, t, s, o, a), e.fillStyle = l, e.fill(), e.strokeStyle = "rgba(0,0,0,0.3)", e.lineWidth = 1, e.stroke(), this.drawActiveHueSliderColor();
420
442
  }
421
443
  drawOpacitySlider() {
422
- const e = this.opacitySliderRenderingContext, { baseColorFieldColor: t, dimensions: { slider: { height: o }, thumb: { radius: i } } } = this, a = 0, l = i - o / 2, s = this.effectiveSliderWidth;
423
- e.clearRect(0, 0, s, o + this.getSliderCapSpacing() * 2);
424
- const r = e.createLinearGradient(0, l, s, 0), h = t.rgb().alpha(0), d = t.rgb().alpha(0.5), C = t.rgb().alpha(1);
425
- r.addColorStop(0, h.string()), r.addColorStop(0.5, d.string()), r.addColorStop(1, C.string()), this.drawSliderPath(e, o, s, a, l);
444
+ const e = this.opacitySliderRenderingContext, { baseColorFieldColor: t, staticDimensions: { slider: { height: i }, thumb: { radius: o } } } = this, a = 0, s = o - i / 2, l = this.effectiveSliderWidth;
445
+ e.clearRect(0, 0, l, i + this.getSliderCapSpacing() * 2);
446
+ const r = e.createLinearGradient(0, s, l, 0), h = t.rgb().alpha(0), d = t.rgb().alpha(0.5), C = t.rgb().alpha(1);
447
+ r.addColorStop(0, h.string()), r.addColorStop(0.5, d.string()), r.addColorStop(1, C.string()), this.drawSliderPath(e, i, l, a, s);
426
448
  const f = e.createPattern(this.getCheckeredBackgroundPattern(), "repeat");
427
449
  e.fillStyle = f, e.fill(), e.fillStyle = r, e.fill(), e.strokeStyle = "rgba(0,0,0,0.3)", e.lineWidth = 1, e.stroke(), this.drawActiveOpacitySliderColor();
428
450
  }
429
- drawSliderPath(e, t, o, i, a) {
430
- const l = t / 2 + 1;
431
- e.beginPath(), e.moveTo(i + l, a), e.lineTo(i + o - l, a), e.quadraticCurveTo(i + o, a, i + o, a + l), e.lineTo(i + o, a + t - l), e.quadraticCurveTo(i + o, a + t, i + o - l, a + t), e.lineTo(i + l, a + t), e.quadraticCurveTo(i, a + t, i, a + t - l), e.lineTo(i, a + l), e.quadraticCurveTo(i, a, i + l, a), e.closePath();
451
+ drawSliderPath(e, t, i, o, a) {
452
+ const s = t / 2 + 1;
453
+ e.beginPath(), e.moveTo(o + s, a), e.lineTo(o + i - s, a), e.quadraticCurveTo(o + i, a, o + i, a + s), e.lineTo(o + i, a + t - s), e.quadraticCurveTo(o + i, a + t, o + i - s, a + t), e.lineTo(o + s, a + t), e.quadraticCurveTo(o, a + t, o, a + t - s), e.lineTo(o, a + s), e.quadraticCurveTo(o, a, o + s, a), e.closePath();
432
454
  }
433
455
  getCheckeredBackgroundPattern() {
434
456
  if (this.checkerPattern)
@@ -442,29 +464,29 @@ class Ae extends he {
442
464
  const { color: e } = this;
443
465
  if (!e)
444
466
  return;
445
- const t = e, { dimensions: { thumb: { radius: o } } } = this, i = this.effectiveSliderWidth, a = R(t.alpha()) / (y.max / i), l = o, s = this.getSliderBoundX(a, i, o);
467
+ const t = e, { staticDimensions: { thumb: { radius: i } } } = this, o = this.effectiveSliderWidth, a = R(t.alpha()) / (y.max / o), s = i, l = this.getSliderBoundX(a, o, i);
446
468
  requestAnimationFrame(() => {
447
- this.opacityScopeLeft = s;
448
- }), this.drawThumb(this.opacitySliderRenderingContext, o, s, l, t, !0);
469
+ this.opacityScopeLeft = l;
470
+ }), this.drawThumb(this.opacitySliderRenderingContext, i, l, s, t, !0);
449
471
  }
450
- getSliderBoundX(e, t, o) {
451
- const i = be(e, t, o);
452
- return i === 0 ? e : i === -1 ? V(e, 0, t, o, o * 2) : V(e, 0, t, t - o * 2, t - o);
472
+ getSliderBoundX(e, t, i) {
473
+ const o = be(e, t, i);
474
+ return o === 0 ? e : o === -1 ? X(e, 0, t, i, i * 2) : X(e, 0, t, t - i * 2, t - i);
453
475
  }
454
476
  storeOpacityScope(e) {
455
477
  this.opacityScopeNode = e;
456
478
  }
457
479
  handleOpacityScopeKeyDown(e) {
458
- const t = e.shiftKey ? 10 : 1, { key: o } = e, i = {
480
+ const t = e.shiftKey ? 10 : 1, { key: i } = e, o = {
459
481
  ArrowUp: 0.01,
460
482
  ArrowRight: 0.01,
461
483
  ArrowDown: -0.01,
462
484
  ArrowLeft: -0.01
463
485
  };
464
- if (i[o]) {
486
+ if (o[i]) {
465
487
  e.preventDefault();
466
- const a = i[o] * t, l = this.baseColorFieldColor.alpha(), s = this.baseColorFieldColor.alpha(l + a);
467
- this.internalColorSet(s, !1);
488
+ const a = o[i] * t, s = this.baseColorFieldColor.alpha(), l = this.baseColorFieldColor.alpha(s + a);
489
+ this.internalColorSet(l, !1);
468
490
  }
469
491
  }
470
492
  updateColorFromChannels(e) {
@@ -474,51 +496,51 @@ class Ae extends he {
474
496
  this.channels = e ? this.toChannels(e) : [null, null, null, null];
475
497
  }
476
498
  toChannels(e) {
477
- const { channelMode: t } = this, o = e[t]().array().map((i, a) => a === 3 ? i : Math.floor(i));
478
- return o.length === 3 && o.push(1), o;
499
+ const { channelMode: t } = this, i = e[t]().array().map((o, a) => a === 3 ? o : Math.floor(o));
500
+ return i.length === 3 && i.push(1), i;
479
501
  }
480
502
  getAdjustedScopePosition(e, t) {
481
- return [e - W / 2, t - W / 2];
503
+ return [e - N / 2, t - N / 2];
482
504
  }
483
505
  // #endregion
484
506
  // #region Rendering
485
507
  render() {
486
- const { channelsDisabled: e, color: t, colorFieldScopeLeft: o, colorFieldScopeTop: i, dimensions: { thumb: { radius: a } }, hexDisabled: l, hueScopeLeft: s, messages: r, alphaChannel: h, opacityScopeLeft: d, savedColors: C, savedDisabled: f, scale: g, scopeOrientation: w } = this, L = this.effectiveSliderWidth, M = t ? S(t, h) : null, X = a, q = s ?? L * m.hue() / p.h, G = a, Y = d ?? L * R(m.alpha()) / y.max, E = t === void 0, T = w === "vertical", [J, Z] = this.getAdjustedScopePosition(o, i), [Q, ee] = this.getAdjustedScopePosition(q, X), [te, oe] = this.getAdjustedScopePosition(Y, G);
487
- return Ce({ disabled: this.disabled, children: u`<div class=${c(n.container)}><div class=${c(n.controlAndScope)}><canvas class=${c(n.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${v(this.initColorField)}></canvas><div .ariaLabel=${T ? r.value : r.saturation} .ariaValueMax=${T ? p.v : p.s} aria-valuemin=0 .ariaValueNow=${(T ? t?.saturationv() : t?.value()) || "0"} class=${c({ [n.scope]: !0, [n.colorFieldScope]: !0 })} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${k({
488
- top: `${Z || 0}px`,
489
- left: `${J || 0}px`
490
- })} tabindex=0 ${v(this.storeColorFieldScope)}></div></div><div class=${c(n.previewAndSliders)}><calcite-color-picker-swatch class=${c(n.preview)} .color=${M} .scale=${this.alphaChannel ? "l" : this.scale}></calcite-color-picker-swatch><div class=${c(n.sliders)}><div class=${c(n.controlAndScope)}><canvas class=${c({ [n.slider]: !0, [n.hueSlider]: !0 })} @pointerdown=${this.handleHueSliderPointerDown} ${v(this.initHueSlider)}></canvas><div .ariaLabel=${r.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue() || m.round().hue()} class=${c({ [n.scope]: !0, [n.hueScope]: !0 })} @keydown=${this.handleHueScopeKeyDown} role=slider style=${k({
491
- top: `${ee}px`,
492
- left: `${Q}px`
493
- })} tabindex=0 ${v(this.storeHueScope)}></div></div>${h ? u`<div class=${c(n.controlAndScope)}><canvas class=${c({ [n.slider]: !0, [n.opacitySlider]: !0 })} @pointerdown=${this.handleOpacitySliderPointerDown} ${v(this.initOpacitySlider)}></canvas><div .ariaLabel=${r.opacity} .ariaValueMax=${y.max} .ariaValueMin=${y.min} .ariaValueNow=${(t || m).round().alpha()} class=${c({ [n.scope]: !0, [n.opacityScope]: !0 })} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${k({
494
- top: `${oe}px`,
508
+ const { channelsDisabled: e, color: t, colorFieldScopeLeft: i, colorFieldScopeTop: o, staticDimensions: { thumb: { radius: a } }, hexDisabled: s, hueScopeLeft: l, messages: r, alphaChannel: h, opacityScopeLeft: d, savedColors: C, savedDisabled: f, scale: m, scopeOrientation: w } = this, M = this.effectiveSliderWidth, z = t ? S(t, h) : null, G = a, Y = l ?? M * g.hue() / p.h, J = a, Z = d ?? M * R(g.alpha()) / y.max, L = t === void 0, F = w === "vertical", [Q, ee] = this.getAdjustedScopePosition(i, o), [te, ie] = this.getAdjustedScopePosition(Y, G), [oe, ae] = this.getAdjustedScopePosition(Z, J);
509
+ return me({ disabled: this.disabled, children: u`<div class=${c(n.container)}><div class=${c(n.controlAndScope)}><canvas class=${c(n.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${v(this.initColorField)}></canvas><div .ariaLabel=${F ? r.value : r.saturation} .ariaValueMax=${F ? p.v : p.s} aria-valuemin=0 .ariaValueNow=${(F ? t?.saturationv() : t?.value()) || "0"} class=${c({ [n.scope]: !0, [n.colorFieldScope]: !0 })} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${k({
510
+ top: `${ee || 0}px`,
511
+ left: `${Q || 0}px`
512
+ })} tabindex=0 ${v(this.storeColorFieldScope)}></div></div><div class=${c(n.previewAndSliders)}><calcite-color-picker-swatch class=${c(n.preview)} .color=${z} .scale=${this.alphaChannel ? "l" : this.scale}></calcite-color-picker-swatch><div class=${c(n.sliders)}><div class=${c(n.controlAndScope)}><canvas class=${c({ [n.slider]: !0, [n.hueSlider]: !0 })} @pointerdown=${this.handleHueSliderPointerDown} ${v(this.initHueSlider)}></canvas><div .ariaLabel=${r.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue() || g.round().hue()} class=${c({ [n.scope]: !0, [n.hueScope]: !0 })} @keydown=${this.handleHueScopeKeyDown} role=slider style=${k({
513
+ top: `${ie}px`,
495
514
  left: `${te}px`
496
- })} tabindex=0 ${v(this.storeOpacityScope)}></div></div>` : null}</div></div>${l && e ? null : u`<div class=${c({
515
+ })} tabindex=0 ${v(this.storeHueScope)}></div></div>${h ? u`<div class=${c(n.controlAndScope)}><canvas class=${c({ [n.slider]: !0, [n.opacitySlider]: !0 })} @pointerdown=${this.handleOpacitySliderPointerDown} ${v(this.initOpacitySlider)}></canvas><div .ariaLabel=${r.opacity} .ariaValueMax=${y.max} .ariaValueMin=${y.min} .ariaValueNow=${(t || g).round().alpha()} class=${c({ [n.scope]: !0, [n.opacityScope]: !0 })} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${k({
516
+ top: `${ae}px`,
517
+ left: `${oe}px`
518
+ })} tabindex=0 ${v(this.storeOpacityScope)}></div></div>` : null}</div></div>${s && e ? null : u`<div class=${c({
497
519
  [n.controlSection]: !0,
498
520
  [n.section]: !0
499
- })}><div class=${c(n.hexAndChannelsGroup)}>${l ? null : u`<div class=${c(n.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.isClearable} .alphaChannel=${h} class=${c(n.control)} .messages=${r} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${g} .value=${M}></calcite-color-picker-hex-input></div>`}${e ? null : u`<calcite-tabs class=${c({
521
+ })}><div class=${c(n.hexAndChannelsGroup)}>${s ? null : u`<div class=${c(n.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.isClearable} .alphaChannel=${h} class=${c(n.control)} .messages=${r} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${m} .value=${z}></calcite-color-picker-hex-input></div>`}${e ? null : u`<calcite-tabs class=${c({
500
522
  [n.colorModeContainer]: !0,
501
523
  [n.splitSection]: !0
502
- })} .scale=${g === "l" ? "m" : "s"}><calcite-tab-nav slot=title-group>${this.renderChannelsTabTitle("rgb")}${this.renderChannelsTabTitle("hsv")}</calcite-tab-nav>${this.renderChannelsTab("rgb")}${this.renderChannelsTab("hsv")}</calcite-tabs>`}</div></div>`}${f ? null : u`<div class=${c({ [n.savedColorsSection]: !0, [n.section]: !0 })}><div class=${c(n.header)}><label>${r.saved}</label><div class=${c(n.savedColorsButtons)}><calcite-button appearance=transparent class=${c(n.deleteColor)} .disabled=${E} icon-start=minus kind=neutral .label=${r.deleteColor} @click=${this.deleteColor} .scale=${g} type=button></calcite-button><calcite-button appearance=transparent class=${c(n.saveColor)} .disabled=${E} icon-start=plus kind=neutral .label=${r.saveColor} @click=${this.saveColor} .scale=${g} type=button></calcite-button></div></div>${C.length > 0 ? u`<div class=${c(n.savedColors)}>${ae(C, (F) => F, (F) => u`<calcite-color-picker-swatch class=${c(n.savedColor)} .color=${F} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${g} tabindex=0></calcite-color-picker-swatch>`)}</div>` : null}</div>`}</div>` });
524
+ })} .scale=${m === "l" ? "m" : "s"}><calcite-tab-nav slot=title-group>${this.renderChannelsTabTitle("rgb")}${this.renderChannelsTabTitle("hsv")}</calcite-tab-nav>${this.renderChannelsTab("rgb")}${this.renderChannelsTab("hsv")}</calcite-tabs>`}</div></div>`}${f ? null : u`<div class=${c({ [n.savedColorsSection]: !0, [n.section]: !0 })}><div class=${c(n.header)}><label>${r.saved}</label><div class=${c(n.savedColorsButtons)}><calcite-button appearance=transparent class=${c(n.deleteColor)} .disabled=${L} icon-start=minus kind=neutral .label=${r.deleteColor} @click=${this.deleteColor} .scale=${m} type=button></calcite-button><calcite-button appearance=transparent class=${c(n.saveColor)} .disabled=${L} icon-start=plus kind=neutral .label=${r.saveColor} @click=${this.saveColor} .scale=${m} type=button></calcite-button></div></div>${C.length > 0 ? u`<div class=${c(n.savedColors)}>${le(C, (T) => T, (T) => u`<calcite-color-picker-swatch class=${c(n.savedColor)} .color=${T} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${m} tabindex=0></calcite-color-picker-swatch>`)}</div>` : null}</div>`}</div>` });
503
525
  }
504
526
  renderChannelsTabTitle(e) {
505
- const { channelMode: t, messages: o } = this, i = e === t, a = e === "rgb" ? o.rgb : o.hsv;
506
- return D(e, u`<calcite-tab-title class=${c(n.colorMode)} data-color-mode=${e ?? A} @calciteTabsActivate=${this.handleTabActivate} .selected=${i}>${a}</calcite-tab-title>`);
527
+ const { channelMode: t, messages: i } = this, o = e === t, a = e === "rgb" ? i.rgb : i.hsv;
528
+ return I(e, u`<calcite-tab-title class=${c(n.colorMode)} data-color-mode=${e ?? D} @calciteTabsActivate=${this.handleTabActivate} .selected=${o}>${a}</calcite-tab-title>`);
507
529
  }
508
530
  renderChannelsTab(e) {
509
- const { isClearable: t, channelMode: o, channels: i, messages: a, alphaChannel: l } = this, s = e === o, h = e === "rgb" ? [a.red, a.green, a.blue] : [a.hue, a.saturation, a.value], d = pe(this.el), C = l ? i : i.slice(0, 3);
510
- return D(e, u`<calcite-tab class=${c(n.control)} .selected=${s}><div class=${c(n.channels)} dir=ltr>${C.map((f, g) => {
511
- const w = g === 3;
512
- return w && (f = t && !f ? f : R(f)), this.renderChannel(f, g, h[g], d, w ? "%" : "");
531
+ const { isClearable: t, channelMode: i, channels: o, messages: a, alphaChannel: s } = this, l = e === i, h = e === "rgb" ? [a.red, a.green, a.blue] : [a.hue, a.saturation, a.value], d = Ce(this.el), C = s ? o : o.slice(0, 3);
532
+ return I(e, u`<calcite-tab class=${c(n.control)} .selected=${l}><div class=${c(n.channels)} dir=ltr>${C.map((f, m) => {
533
+ const w = m === 3;
534
+ return w && (f = t && !f ? f : R(f)), this.renderChannel(f, m, h[m], d, w ? "%" : "");
513
535
  })}</div></calcite-tab>`);
514
536
  }
515
- renderChannel(e, t, o, i, a) {
516
- return D(t, u`<calcite-input-number class=${c(n.channel)} data-channel-index=${t ?? A} dir=${i ?? A} .label=${o} lang=${this.messages._lang ?? A} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.handleKeyDown} @calciteInputNumberChange=${this.handleChannelChange} @calciteInputNumberInput=${this.handleChannelInput} @calciteInternalInputNumberBlur=${this.handleChannelBlur} @calciteInternalInputNumberFocus=${this.handleChannelFocus} .scale=${this.scale === "l" ? "m" : "s"} style=${k({
537
+ renderChannel(e, t, i, o, a) {
538
+ return I(t, u`<calcite-input-number class=${c(n.channel)} data-channel-index=${t ?? D} dir=${o ?? D} .label=${i} lang=${this.messages._lang ?? D} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.handleKeyDown} @calciteInputNumberChange=${this.handleChannelChange} @calciteInputNumberInput=${this.handleChannelInput} @calciteInternalInputNumberBlur=${this.handleChannelBlur} @calciteInternalInputNumberFocus=${this.handleChannelFocus} .scale=${this.scale === "l" ? "m" : "s"} style=${k({
517
539
  marginLeft: t > 0 && !(this.scale === "s" && this.alphaChannel && t === 3) ? "-1px" : ""
518
540
  })} .suffixText=${a} .value=${e?.toString()}></calcite-input-number>`);
519
541
  }
520
542
  }
521
- ie("calcite-color-picker", Ae);
543
+ se("calcite-color-picker", Ae);
522
544
  export {
523
545
  Ae as ColorPicker
524
546
  };